From e403232cc5d3025af51ce913fc838fb6ac3387b9 Mon Sep 17 00:00:00 2001 From: Alejandro Lopez Osornio Date: Tue, 7 Jan 2025 17:24:37 -0300 Subject: [PATCH] Animating transitions between questions --- docs/index.html | 4 +- ...65480d9922.js => main.7039fd160b124446.js} | 2 +- ...5f43f5.css => styles.891591f966c73916.css} | 2 +- .../maturity-main.component.html | 12 ++-- .../maturity-main/maturity-main.component.ts | 58 ++++++++++++------- 5 files changed, 48 insertions(+), 30 deletions(-) rename docs/{main.ff1d9a65480d9922.js => main.7039fd160b124446.js} (60%) rename docs/{styles.6f8567121c5f43f5.css => styles.891591f966c73916.css} (99%) diff --git a/docs/index.html b/docs/index.html index b918300..13d8946 100644 --- a/docs/index.html +++ b/docs/index.html @@ -30,8 +30,8 @@ gtag('config', 'G-7SK998GPMX', { 'page_path': '/home' }); } - + - + diff --git a/docs/main.ff1d9a65480d9922.js b/docs/main.7039fd160b124446.js similarity index 60% rename from docs/main.ff1d9a65480d9922.js rename to docs/main.7039fd160b124446.js index c5e42b8..0e00b55 100644 --- a/docs/main.ff1d9a65480d9922.js +++ b/docs/main.7039fd160b124446.js @@ -1 +1 @@ -(self.webpackChunksct_implementation_demonstrator=self.webpackChunksct_implementation_demonstrator||[]).push([[792],{951:(Gs,kd,ps)=>{"use strict";function Do(e,i,t,n,r,s,o){try{var l=e[s](o),w=l.value}catch(C){return void t(C)}l.done?i(w):Promise.resolve(w).then(n,r)}function de(e){return function(){var i=this,t=arguments;return new Promise(function(n,r){var s=e.apply(i,t);function o(w){Do(s,n,r,o,l,"next",w)}function l(w){Do(s,n,r,o,l,"throw",w)}o(void 0)})}}let k=null,a=!1,b=1;const T=Symbol("SIGNAL");function g(e){const i=k;return k=e,i}const u={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 p(e){if((!F(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==b)){if(!e.producerMustRecompute(e)&&!A(e))return e.dirty=!1,void(e.lastCleanEpoch=b);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=b}}function y(e){e.dirty=!0,function v(e){if(void 0===e.liveConsumerNode)return;const i=a;a=!0;try{for(const t of e.liveConsumerNode)t.dirty||y(t)}finally{a=i}}(e),e.consumerMarkedDirty?.(e)}function _(e){return e&&(e.nextProducerIndex=0),g(e)}function E(e,i){if(g(i),e&&void 0!==e.producerNode&&void 0!==e.producerIndexOfThis&&void 0!==e.producerLastReadVersion){if(F(e))for(let t=e.nextProducerIndex;te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function A(e){N(e);for(let i=0;i0}function N(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}let at=null;const Yt=()=>{},$t={...u,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:e=>{null!==e.schedule&&e.schedule(e.ref)},hasRun:!1,cleanupFn:Yt};function ne(e){return"function"==typeof e}function le(e){const t=e(n=>{Error.call(n),n.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const Me=le(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function pi(e,i){if(e){const t=e.indexOf(i);0<=t&&e.splice(t,1)}}class Ie{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const s of t)s.remove(this);else t.remove(this);const{initialTeardown:n}=this;if(ne(n))try{n()}catch(s){i=s instanceof Me?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{ni(s)}catch(o){i=i??[],o instanceof Me?i=[...i,...o.errors]:i.push(o)}}if(i)throw new Me(i)}}add(i){var t;if(i&&i!==this)if(this.closed)ni(i);else{if(i instanceof Ie){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(i)}}_hasParent(i){const{_parentage:t}=this;return t===i||Array.isArray(t)&&t.includes(i)}_addParent(i){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(i),t):t?[t,i]:i}_removeParent(i){const{_parentage:t}=this;t===i?this._parentage=null:Array.isArray(t)&&pi(t,i)}remove(i){const{_finalizers:t}=this;t&&pi(t,i),i instanceof Ie&&i._removeParent(this)}}Ie.EMPTY=(()=>{const e=new Ie;return e.closed=!0,e})();const _i=Ie.EMPTY;function be(e){return e instanceof Ie||e&&"closed"in e&&ne(e.remove)&&ne(e.add)&&ne(e.unsubscribe)}function ni(e){ne(e)?e():e.unsubscribe()}const Ke={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zi={setTimeout(e,i,...t){const{delegate:n}=zi;return n?.setTimeout?n.setTimeout(e,i,...t):setTimeout(e,i,...t)},clearTimeout(e){const{delegate:i}=zi;return(i?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Cn(e){zi.setTimeout(()=>{const{onUnhandledError:i}=Ke;if(!i)throw e;i(e)})}function sr(){}const vn=cs("C",void 0,void 0);function cs(e,i,t){return{kind:e,value:i,error:t}}let Dn=null;function xr(e){if(Ke.useDeprecatedSynchronousErrorHandling){const i=!Dn;if(i&&(Dn={errorThrown:!1,error:null}),e(),i){const{errorThrown:t,error:n}=Dn;if(Dn=null,t)throw n}}else e()}class Hs extends Ie{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,be(i)&&i.add(this)):this.destination=Nnt}static create(i,t,n){return new Ho(i,t,n)}next(i){this.isStopped?YA(function Fr(e){return cs("N",e,void 0)}(i),this):this._next(i)}error(i){this.isStopped?YA(function bn(e){return cs("E",void 0,e)}(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?YA(vn,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Pd=Function.prototype.bind;function lc(e,i){return Pd.call(e,i)}class Fd{constructor(i){this.partialObserver=i}next(i){const{partialObserver:t}=this;if(t.next)try{t.next(i)}catch(n){Fl(n)}}error(i){const{partialObserver:t}=this;if(t.error)try{t.error(i)}catch(n){Fl(n)}else Fl(i)}complete(){const{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(t){Fl(t)}}}class Ho extends Hs{constructor(i,t,n){let r;if(super(),ne(i)||!i)r={next:i??void 0,error:t??void 0,complete:n??void 0};else{let s;this&&Ke.useDeprecatedNextContext?(s=Object.create(i),s.unsubscribe=()=>this.unsubscribe(),r={next:i.next&&lc(i.next,s),error:i.error&&lc(i.error,s),complete:i.complete&&lc(i.complete,s)}):r=i}this.destination=new Fd(r)}}function Fl(e){Ke.useDeprecatedSynchronousErrorHandling?function ts(e){Ke.useDeprecatedSynchronousErrorHandling&&Dn&&(Dn.errorThrown=!0,Dn.error=e)}(e):Cn(e)}function YA(e,i){const{onStoppedNotification:t}=Ke;t&&zi.setTimeout(()=>t(e,i))}const Nnt={closed:!0,next:sr,error:function Lnt(e){throw e},complete:sr},$A="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ju(e){return e}function N4(e){return 0===e.length?Ju:1===e.length?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}let ur=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const n=new e;return n.source=this,n.operator=t,n}subscribe(t,n,r){const s=function Unt(e){return e&&e instanceof Hs||function Vnt(e){return e&&ne(e.next)&&ne(e.error)&&ne(e.complete)}(e)&&be(e)}(t)?t:new Ho(t,n,r);return xr(()=>{const{operator:o,source:l}=this;s.add(o?o.call(s,l):l?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return new(n=B4(n))((r,s)=>{const o=new Ho({next:l=>{try{t(l)}catch(w){s(w),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(t){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(t)}[$A](){return this}pipe(...t){return N4(t)(this)}toPromise(t){return new(t=B4(t))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return e.create=i=>new e(i),e})();function B4(e){var i;return null!==(i=e??Ke.Promise)&&void 0!==i?i:Promise}const znt=le(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Pe=(()=>{class e extends ur{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const n=new V4(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new znt}next(t){xr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(t)}})}error(t){xr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){xr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:n,isStopped:r,observers:s}=this;return n||r?_i:(this.currentObservers=null,s.push(t),new Ie(()=>{this.currentObservers=null,pi(s,t)}))}_checkFinalizedStatuses(t){const{hasError:n,thrownError:r,isStopped:s}=this;n?t.error(r):s&&t.complete()}asObservable(){const t=new ur;return t.source=this,t}}return e.create=(i,t)=>new V4(i,t),e})();class V4 extends Pe{constructor(i,t){super(),this.destination=i,this.source=t}next(i){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,i)}error(i){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,i)}complete(){var i,t;null===(t=null===(i=this.destination)||void 0===i?void 0:i.complete)||void 0===t||t.call(i)}_subscribe(i){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(i))&&void 0!==n?n:_i}}class Wr extends Pe{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){const t=super._subscribe(i);return!t.closed&&i.next(this._value),t}getValue(){const{hasError:i,thrownError:t,_value:n}=this;if(i)throw t;return this._throwIfClosed(),n}next(i){super.next(this._value=i)}}function U4(e){return ne(e?.lift)}function ds(e){return i=>{if(U4(i))return i.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Xr(e,i,t,n,r){return new Gnt(e,i,t,n,r)}class Gnt extends Hs{constructor(i,t,n,r,s,o){super(i),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=t?function(l){try{t(l)}catch(w){i.error(w)}}:super._next,this._error=r?function(l){try{r(l)}catch(w){i.error(w)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(l){i.error(l)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(i=this.onFinalize)||void 0===i||i.call(this))}}}function Di(e,i){return ds((t,n)=>{let r=0;t.subscribe(Xr(n,s=>{n.next(e.call(i,s,r++))}))})}const z4="https://g.co/ng/security#xss";class ue extends Error{constructor(i,t){super(function Ep(e,i){return`NG0${Math.abs(e)}${i?": "+i:""}`}(i,t)),this.code=i}}function Od(e){return{toString:e}.toString()}const Dp="__parameters__";function Ip(e,i,t){return Od(()=>{const n=function QA(e){return function(...t){if(e){const n=e(...t);for(const r in n)this[r]=n[r]}}}(i);function r(...s){if(this instanceof r)return n.apply(this,s),this;const o=new r(...s);return l.annotation=o,l;function l(w,C,M){const P=w.hasOwnProperty(Dp)?w[Dp]:Object.defineProperty(w,Dp,{value:[]})[Dp];for(;P.length<=M;)P.push(null);return(P[M]=P[M]||[]).push(o),w}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const hr=globalThis;function yr(e){for(let i in e)if(e[i]===yr)return i;throw Error("Could not find renamed property on target object.")}function Hnt(e,i){for(const t in i)i.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=i[t])}function qs(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(qs).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const i=e.toString();if(null==i)return""+i;const t=i.indexOf("\n");return-1===t?i:i.substring(0,t)}function KA(e,i){return null==e||""===e?null===i?"":i:null==i||""===i?e:e+" "+i}const Wnt=yr({__forward_ref__:yr});function Sn(e){return e.__forward_ref__=Sn,e.toString=function(){return qs(this())},e}function Hi(e){return uw(e)?e():e}function uw(e){return"function"==typeof e&&e.hasOwnProperty(Wnt)&&e.__forward_ref__===Sn}function Ae(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Pi(e){return{providers:e.providers||[],imports:e.imports||[]}}function hw(e){return X4(e,mw)||X4(e,j4)}function X4(e,i){return e.hasOwnProperty(i)?e[i]:null}function fw(e){return e&&(e.hasOwnProperty(ZA)||e.hasOwnProperty(Knt))?e[ZA]:null}const mw=yr({\u0275prov:yr}),ZA=yr({\u0275inj:yr}),j4=yr({ngInjectableDef:yr}),Knt=yr({ngInjectorDef:yr});class ee{constructor(i,t){this._desc=i,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Ae({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function iD(e){return e&&!!e.\u0275providers}const F0=yr({\u0275cmp:yr}),nD=yr({\u0275dir:yr}),rD=yr({\u0275pipe:yr}),$4=yr({\u0275mod:yr}),Ld=yr({\u0275fac:yr}),O0=yr({__NG_ELEMENT_ID__:yr}),Q4=yr({__NG_ENV_ID__:yr});function nn(e){return"string"==typeof e?e:null==e?"":String(e)}function sD(e,i){throw new ue(-201,!1)}var On=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(On||{});let aD;function K4(){return aD}function Wo(e){const i=aD;return aD=e,i}function Z4(e,i,t){const n=hw(e);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:t&On.Optional?null:void 0!==i?i:void sD()}const L0={},oD="__NG_DI_FLAG__",pw="ngTempTokenPath",irt=/\n/gm,J4="__source";let Rp;function th(e){const i=Rp;return Rp=e,i}function srt(e,i=On.Default){if(void 0===Rp)throw new ue(-203,!1);return null===Rp?Z4(e,void 0,i):Rp.get(e,i&On.Optional?null:void 0,i)}function Jt(e,i=On.Default){return(K4()||srt)(Hi(e),i)}function me(e,i=On.Default){return Jt(e,gw(i))}function gw(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function lD(e){const i=[];for(let t=0;tArray.isArray(t)?kp(t,i):i(t))}function t3(e,i,t){i>=e.length?e.push(t):e.splice(i,0,t)}function vw(e,i){return i>=e.length-1?e.pop():e.splice(i,1)[0]}function ll(e,i,t){let n=Pp(e,i);return n>=0?e[1|n]=t:(n=~n,function e3(e,i,t,n){let r=e.length;if(r==i)e.push(t,n);else if(1===r)e.push(n,e[0]),e[0]=t;else{for(r--,e.push(e[r-1],e[r]);r>i;)e[r]=e[r-2],r--;e[i]=t,e[i+1]=n}}(e,n,i,t)),n}function dD(e,i){const t=Pp(e,i);if(t>=0)return e[1|t]}function Pp(e,i){return function n3(e,i,t){let n=0,r=e.length>>t;for(;r!==n;){const s=n+(r-n>>1),o=e[s<i?r=s:n=s+1}return~(r<i){o=s-1;break}}}for(;s-1){let s;for(;++rs?"":r[M+1].toLowerCase(),2&n&&C!==P){if(dc(n))return!1;o=!0}}}}else{if(!o&&!dc(n)&&!dc(w))return!1;if(o&&dc(w))continue;o=!1,n=w|1&n}}return dc(n)||o}function dc(e){return!(1&e)}function vrt(e,i,t,n){if(null===i)return-1;let r=0;if(n||!t){let s=!1;for(;r-1)for(t++;t0?'="'+l+'"':"")+"]"}else 8&n?r+="."+o:4&n&&(r+=" "+o);else""!==r&&!dc(o)&&(i+=d3(s,r),r=""),n=o,s=s||!dc(n);t++}return""!==r&&(i+=d3(s,r)),i}function je(e){return Od(()=>{const i=h3(e),t={...i,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===bw.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||cc.Emulated,styles:e.styles||Qn,_:null,schemas:e.schemas||null,tView:null,id:""};f3(t);const n=e.dependencies;return t.directiveDefs=ww(n,!1),t.pipeDefs=ww(n,!0),t.id=function Drt(e){let i=0;const t=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const r of t)i=Math.imul(31,i)+r.charCodeAt(0)|0;return i+=2147483648,"c"+i}(t),t})}function Srt(e){return En(e)||ta(e)}function Ert(e){return null!==e}function Li(e){return Od(()=>({type:e.type,bootstrap:e.bootstrap||Qn,declarations:e.declarations||Qn,imports:e.imports||Qn,exports:e.exports||Qn,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function u3(e,i){if(null==e)return Lc;const t={};for(const n in e)if(e.hasOwnProperty(n)){const r=e[n];let s,o,l=Wt.None;Array.isArray(r)?(l=r[0],s=r[1],o=r[2]??s):(s=r,o=r),i?(t[s]=l!==Wt.None?[n,l]:n,i[s]=o):t[s]=n}return t}function ce(e){return Od(()=>{const i=h3(e);return f3(i),i})}function $a(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function En(e){return e[F0]||null}function ta(e){return e[nD]||null}function Fa(e){return e[rD]||null}function Qa(e,i){const t=e[$4]||null;if(!t&&!0===i)throw new Error(`Type ${qs(e)} does not have '\u0275mod' property.`);return t}function h3(e){const i={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:i,inputTransforms:null,inputConfig:e.inputs||Lc,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Qn,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:u3(e.inputs,i),outputs:u3(e.outputs),debugInfo:null}}function f3(e){e.features?.forEach(i=>i(e))}function ww(e,i){if(!e)return null;const t=i?Fa:Srt;return()=>("function"==typeof e?e():e).map(n=>t(n)).filter(Ert)}function Mrt(...e){return{\u0275providers:mD(0,e),\u0275fromNgModule:!0}}function mD(e,...i){const t=[],n=new Set;let r;const s=o=>{t.push(o)};return kp(i,o=>{const l=o;_w(l,s,[],n)&&(r||=[],r.push(l))}),void 0!==r&&m3(r,s),t}function m3(e,i){for(let t=0;t{i(s,n)})}}function _w(e,i,t,n){if(!(e=Hi(e)))return!1;let r=null,s=fw(e);const o=!s&&En(e);if(s||o){if(o&&!o.standalone)return!1;r=e}else{const w=e.ngModule;if(s=fw(w),!s)return!1;r=w}const l=n.has(r);if(o){if(l)return!1;if(n.add(r),o.dependencies){const w="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const C of w)_w(C,i,t,n)}}else{if(!s)return!1;{if(null!=s.imports&&!l){let C;n.add(r);try{kp(s.imports,M=>{_w(M,i,t,n)&&(C||=[],C.push(M))})}finally{}void 0!==C&&m3(C,i)}if(!l){const C=Cf(r)||(()=>new r);i({provide:r,useFactory:C,deps:Qn},r),i({provide:uD,useValue:r,multi:!0},r),i({provide:Sf,useValue:()=>Jt(r),multi:!0},r)}const w=s.providers;if(null!=w&&!l){const C=e;pD(w,M=>{i(M,C)})}}}return r!==e&&void 0!==e.providers}function pD(e,i){for(let t of e)iD(t)&&(t=t.\u0275providers),Array.isArray(t)?pD(t,i):i(t)}const Irt=yr({provide:String,useValue:yr});function gD(e){return null!==e&&"object"==typeof e&&Irt in e}function Ef(e){return"function"==typeof e}const vD=new ee(""),Tw={},krt={};let xD;function Cw(){return void 0===xD&&(xD=new yw),xD}class jo{}class Fp extends jo{get destroyed(){return this._destroyed}constructor(i,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,bD(i,o=>this.processProvider(o)),this.records.set(r3,Op(void 0,this)),r.has("environment")&&this.records.set(jo,Op(void 0,this));const s=this.records.get(vD);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(uD,Qn,On.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const i=g(null);try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();const t=this._onDestroyHooks;this._onDestroyHooks=[];for(const n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),g(i)}}onDestroy(i){return this.assertNotDestroyed(),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){this.assertNotDestroyed();const t=th(this),n=Wo(void 0);try{return i()}finally{th(t),Wo(n)}}get(i,t=L0,n=On.Default){if(this.assertNotDestroyed(),i.hasOwnProperty(Q4))return i[Q4](this);n=gw(n);const s=th(this),o=Wo(void 0);try{if(!(n&On.SkipSelf)){let w=this.records.get(i);if(void 0===w){const C=function Nrt(e){return"function"==typeof e||"object"==typeof e&&e instanceof ee}(i)&&hw(i);w=C&&this.injectableDefInScope(C)?Op(yD(i),Tw):null,this.records.set(i,w)}if(null!=w)return this.hydrate(i,w)}return(n&On.Self?Cw():this.parent).get(i,t=n&On.Optional&&t===L0?null:t)}catch(l){if("NullInjectorError"===l.name){if((l[pw]=l[pw]||[]).unshift(qs(i)),s)throw l;return function ort(e,i,t,n){const r=e[pw];throw i[J4]&&r.unshift(i[J4]),e.message=function lrt(e,i,t,n=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let r=qs(i);if(Array.isArray(i))r=i.map(qs).join(" -> ");else if("object"==typeof i){let s=[];for(let o in i)if(i.hasOwnProperty(o)){let l=i[o];s.push(o+":"+("string"==typeof l?JSON.stringify(l):qs(l)))}r=`{${s.join(", ")}}`}return`${t}${n?"("+n+")":""}[${r}]: ${e.replace(irt,"\n ")}`}("\n"+e.message,r,t,n),e.ngTokenPath=r,e[pw]=null,e}(l,i,"R3InjectorError",this.source)}throw l}finally{Wo(o),th(s)}}resolveInjectorInitializers(){const i=g(null),t=th(this),n=Wo(void 0);try{const s=this.get(Sf,Qn,On.Self);for(const o of s)o()}finally{th(t),Wo(n),g(i)}}toString(){const i=[],t=this.records;for(const n of t.keys())i.push(qs(n));return`R3Injector[${i.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new ue(205,!1)}processProvider(i){let t=Ef(i=Hi(i))?i:Hi(i&&i.provide);const n=function Frt(e){return gD(e)?Op(void 0,e.useValue):Op(v3(e),Tw)}(i);if(!Ef(i)&&!0===i.multi){let r=this.records.get(t);r||(r=Op(void 0,Tw,!0),r.factory=()=>lD(r.multi),this.records.set(t,r)),t=i,r.multi.push(i)}this.records.set(t,n)}hydrate(i,t){const n=g(null);try{return t.value===Tw&&(t.value=krt,t.value=t.factory()),"object"==typeof t.value&&t.value&&function Lrt(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{g(n)}}injectableDefInScope(i){if(!i.providedIn)return!1;const t=Hi(i.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(i){const t=this._onDestroyHooks.indexOf(i);-1!==t&&this._onDestroyHooks.splice(t,1)}}function yD(e){const i=hw(e),t=null!==i?i.factory:Cf(e);if(null!==t)return t;if(e instanceof ee)throw new ue(204,!1);if(e instanceof Function)return function Prt(e){if(e.length>0)throw new ue(204,!1);const t=function Qnt(e){return e&&(e[mw]||e[j4])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new ue(204,!1)}function v3(e,i,t){let n;if(Ef(e)){const r=Hi(e);return Cf(r)||yD(r)}if(gD(e))n=()=>Hi(e.useValue);else if(function g3(e){return!(!e||!e.useFactory)}(e))n=()=>e.useFactory(...lD(e.deps||[]));else if(function p3(e){return!(!e||!e.useExisting)}(e))n=()=>Jt(Hi(e.useExisting));else{const r=Hi(e&&(e.useClass||e.provide));if(!function Ort(e){return!!e.deps}(e))return Cf(r)||yD(r);n=()=>new r(...lD(e.deps))}return n}function Op(e,i,t=!1){return{factory:e,value:i,multi:t?[]:void 0}}function bD(e,i){for(const t of e)Array.isArray(t)?bD(t,i):t&&iD(t)?bD(t.\u0275providers,i):i(t)}function Nc(e,i){e instanceof Fp&&e.assertNotDestroyed();const n=th(e),r=Wo(void 0);try{return i()}finally{th(n),Wo(r)}}function x3(){return void 0!==K4()||null!=function rrt(){return Rp}()}function Sw(e){if(!x3())throw new ue(-203,!1)}const es=0,$e=1,Fi=2,Ts=3,uc=4,Ka=5,cl=6,Np=7,Or=8,Oa=9,hc=10,$i=11,z0=12,b3=13,Bp=14,us=15,G0=16,Vp=17,Bd=18,H0=19,w3=20,ih=21,Aw=22,Af=23,rn=25,_D=1,Bc=7,Up=9,Cs=10;var TD=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(TD||{});function Za(e){return Array.isArray(e)&&"object"==typeof e[_D]}function Ja(e){return Array.isArray(e)&&!0===e[_D]}function CD(e){return!!(4&e.flags)}function Df(e){return e.componentOffset>-1}function Mw(e){return!(1&~e.flags)}function fc(e){return!!e.template}function SD(e){return!!(512&e[Fi])}class Krt{constructor(i,t,n){this.previousValue=i,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}}function S3(e,i,t,n){null!==i?i.applyValueToInputSignal(i,n):e[t]=n}function tr(){return E3}function E3(e){return e.type.prototype.ngOnChanges&&(e.setInput=Jrt),Zrt}function Zrt(){const e=D3(this),i=e?.current;if(i){const t=e.previous;if(t===Lc)e.previous=i;else for(let n in i)t[n]=i[n];e.current=null,this.ngOnChanges(i)}}function Jrt(e,i,t,n,r){const s=this.declaredInputs[n],o=D3(e)||function qrt(e,i){return e[A3]=i}(e,{previous:Lc,current:null}),l=o.current||(o.current={}),w=o.previous,C=w[s];l[s]=new Krt(C&&C.currentValue,t,w===Lc),S3(e,i,r,t)}tr.ngInherit=!0;const A3="__ngSimpleChanges__";function D3(e){return e[A3]||null}const Vc=function(e,i,t){},M3="svg";let R3=!1;function Sr(e){for(;Array.isArray(e);)e=e[es];return e}function X0(e,i){return Sr(i[e])}function Mo(e,i){return Sr(i[e.index])}function j0(e,i){return e.data[i]}function zp(e,i){return e[i]}function dl(e,i){const t=i[e];return Za(t)?t:t[es]}function ID(e){return!(128&~e[Fi])}function Uc(e,i){return null==i?null:e[i]}function k3(e){e[Vp]=0}function sst(e){1024&e[Fi]||(e[Fi]|=1024,ID(e)&&Y0(e))}function RD(e){return!!(9216&e[Fi]||e[Af]?.dirty)}function kD(e){e[hc].changeDetectionScheduler?.notify(1),RD(e)?Y0(e):64&e[Fi]&&(function est(){return R3}()?(e[Fi]|=1024,Y0(e)):e[hc].changeDetectionScheduler?.notify())}function Y0(e){e[hc].changeDetectionScheduler?.notify();let i=Mf(e);for(;null!==i&&!(8192&i[Fi])&&(i[Fi]|=8192,ID(i));)i=Mf(i)}function Iw(e,i){if(!(256&~e[Fi]))throw new ue(911,!1);null===e[ih]&&(e[ih]=[]),e[ih].push(i)}function Mf(e){const i=e[Ts];return Ja(i)?i[Ts]:i}const Qi={lFrame:G3(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function O3(){return Qi.bindingsEnabled}function Gp(){return null!==Qi.skipHydrationRootTNode}function ye(){return Qi.lFrame.lView}function Ln(){return Qi.lFrame.tView}function Ut(e){return Qi.lFrame.contextLView=e,e[Or]}function zt(e){return Qi.lFrame.contextLView=null,e}function br(){let e=L3();for(;null!==e&&64===e.type;)e=e.parent;return e}function L3(){return Qi.lFrame.currentTNode}function zc(e,i){const t=Qi.lFrame;t.currentTNode=e,t.isParent=i}function FD(){return Qi.lFrame.isParent}function OD(){Qi.lFrame.isParent=!1}function Io(){const e=Qi.lFrame;let i=e.bindingRootIndex;return-1===i&&(i=e.bindingRootIndex=e.tView.bindingStartIndex),i}function Vd(){return Qi.lFrame.bindingIndex}function mc(){return Qi.lFrame.bindingIndex++}function Ud(e){const i=Qi.lFrame,t=i.bindingIndex;return i.bindingIndex=i.bindingIndex+e,t}function gst(e,i){const t=Qi.lFrame;t.bindingIndex=t.bindingRootIndex=e,LD(i)}function LD(e){Qi.lFrame.currentDirectiveIndex=e}function ND(e){const i=Qi.lFrame.currentDirectiveIndex;return-1===i?null:e[i]}function BD(){return Qi.lFrame.currentQueryIndex}function Rw(e){Qi.lFrame.currentQueryIndex=e}function xst(e){const i=e[$e];return 2===i.type?i.declTNode:1===i.type?e[Ka]:null}function U3(e,i,t){if(t&On.SkipSelf){let r=i,s=e;for(;!(r=r.parent,null!==r||t&On.Host||(r=xst(s),null===r||(s=s[Bp],10&r.type))););if(null===r)return!1;i=r,e=s}const n=Qi.lFrame=z3();return n.currentTNode=i,n.lView=e,!0}function VD(e){const i=z3(),t=e[$e];Qi.lFrame=i,i.currentTNode=t.firstChild,i.lView=e,i.tView=t,i.contextLView=e,i.bindingIndex=t.bindingStartIndex,i.inI18n=!1}function z3(){const e=Qi.lFrame,i=null===e?null:e.child;return null===i?G3(e):i}function G3(e){const i={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:e,child:null,inI18n:!1};return null!==e&&(e.child=i),i}function H3(){const e=Qi.lFrame;return Qi.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const W3=H3;function UD(){const e=H3();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function qa(){return Qi.lFrame.selectedIndex}function If(e){Qi.lFrame.selectedIndex=e}function Lr(){const e=Qi.lFrame;return j0(e.tView,e.selectedIndex)}function ul(){Qi.lFrame.currentNamespace=M3}function Q0(){!function wst(){Qi.lFrame.currentNamespace=null}()}let j3=!0;function K0(){return j3}function Gc(e){j3=e}function kw(e,i){for(let t=i.directiveStart,n=i.directiveEnd;t=n)break}else i[w]<0&&(e[Vp]+=65536),(l>14>16&&(3&e[Fi])===i&&(e[Fi]+=16384,$3(l,s)):$3(l,s)}const Hp=-1;class Z0{constructor(i,t,n){this.factory=i,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}}function HD(e){return e!==Hp}function J0(e){return 32767&e}function q0(e,i){let t=function Dst(e){return e>>16}(e),n=i;for(;t>0;)n=n[Bp],t--;return n}let WD=!0;function Ow(e){const i=WD;return WD=e,i}const Q3=255,K3=5;let Mst=0;const Hc={};function Lw(e,i){const t=Z3(e,i);if(-1!==t)return t;const n=i[$e];n.firstCreatePass&&(e.injectorIndex=i.length,XD(n.data,e),XD(i,null),XD(n.blueprint,null));const r=Nw(e,i),s=e.injectorIndex;if(HD(r)){const o=J0(r),l=q0(r,i),w=l[$e].data;for(let C=0;C<8;C++)i[s+C]=l[o+C]|w[o+C]}return i[s+8]=r,s}function XD(e,i){e.push(0,0,0,0,0,0,0,0,i)}function Z3(e,i){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===i[e.injectorIndex+8]?-1:e.injectorIndex}function Nw(e,i){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,n=null,r=i;for(;null!==r;){if(n=rB(r),null===n)return Hp;if(t++,r=r[Bp],-1!==n.injectorIndex)return n.injectorIndex|t<<16}return Hp}function jD(e,i,t){!function Ist(e,i,t){let n;"string"==typeof t?n=t.charCodeAt(0)||0:t.hasOwnProperty(O0)&&(n=t[O0]),null==n&&(n=t[O0]=Mst++);const r=n&Q3;i.data[e+(r>>K3)]|=1<=0?i&Q3:Fst:i}(t);if("function"==typeof s){if(!U3(i,e,n))return n&On.Host?J3(r,0,n):q3(i,t,n,r);try{let o;if(o=s(n),null!=o||n&On.Optional)return o;sD()}finally{W3()}}else if("number"==typeof s){let o=null,l=Z3(e,i),w=Hp,C=n&On.Host?i[us][Ka]:null;for((-1===l||n&On.SkipSelf)&&(w=-1===l?Nw(e,i):i[l+8],w!==Hp&&nB(n,!1)?(o=i[$e],l=J0(w),i=q0(w,i)):l=-1);-1!==l;){const M=i[$e];if(iB(s,l,M.data)){const P=kst(l,i,t,o,n,C);if(P!==Hc)return P}w=i[l+8],w!==Hp&&nB(n,i[$e].data[l+8]===C)&&iB(s,l,i)?(o=M,l=J0(w),i=q0(w,i)):l=-1}}return r}function kst(e,i,t,n,r,s){const o=i[$e],l=o.data[e+8],M=Bw(l,o,t,null==n?Df(l)&&WD:n!=o&&!!(3&l.type),r&On.Host&&s===l);return null!==M?Rf(i,o,M,l):Hc}function Bw(e,i,t,n,r){const s=e.providerIndexes,o=i.data,l=1048575&s,w=e.directiveStart,M=s>>20,O=r?l+M:e.directiveEnd;for(let L=n?l:l+M;L=w&&U.type===t)return L}if(r){const L=o[w];if(L&&fc(L)&&L.type===t)return w}return null}function Rf(e,i,t,n){let r=e[t];const s=i.data;if(function Cst(e){return e instanceof Z0}(r)){const o=r;o.resolving&&function qnt(e,i){throw i&&i.join(" > "),new ue(-200,e)}(function ar(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():nn(e)}(s[t]));const l=Ow(o.canSeeViewProviders);o.resolving=!0;const C=o.injectImpl?Wo(o.injectImpl):null;U3(e,n,On.Default);try{r=e[t]=o.factory(void 0,s,e,n),i.firstCreatePass&&t>=n.directiveStart&&function _st(e,i,t){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=i.type.prototype;if(n){const o=E3(i);(t.preOrderHooks??=[]).push(e,o),(t.preOrderCheckHooks??=[]).push(e,o)}r&&(t.preOrderHooks??=[]).push(0-e,r),s&&((t.preOrderHooks??=[]).push(e,s),(t.preOrderCheckHooks??=[]).push(e,s))}(t,s[t],i)}finally{null!==C&&Wo(C),Ow(l),o.resolving=!1,W3()}}return r}function iB(e,i,t){return!!(t[i+(e>>K3)]&1<{const i=e.prototype.constructor,t=i[Ld]||YD(i),n=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==n;){const s=r[Ld]||YD(r);if(s&&s!==t)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function YD(e){return uw(e)?()=>{const i=YD(Hi(e));return i&&i()}:Cf(e)}function rB(e){const i=e[$e],t=i.type;return 2===t?i.declTNode:1===t?e[Ka]:null}function hl(e){return function Rst(e,i){if("class"===i)return e.classes;if("style"===i)return e.styles;const t=e.attrs;if(t){const n=t.length;let r=0;for(;r{class e{static#t=this.THROW_IF_NOT_FOUND=L0;static#e=this.NULL=new yw;static create(t,n){if(Array.isArray(t))return cB({name:""},n,t,"");{const r=t.name??"";return cB({name:r},t.parent,t.providers,r)}}static#i=this.\u0275prov=Ae({token:e,providedIn:"any",factory:()=>Jt(r3)});static#n=this.__NG_ELEMENT_ID__=-1}return e})();function QD(e){return e.ngOriginalError}class fl{constructor(){this._console=console}handleError(i){const t=this._findOriginalError(i);this._console.error("ERROR",i),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(i){let t=i&&QD(i);for(;t&&QD(t);)t=QD(t);return t||null}}const hB=new ee("",{providedIn:"root",factory:()=>me(fl).handleError.bind(void 0)});let jp=(()=>{class e{static#t=this.__NG_ELEMENT_ID__=Wst;static#e=this.__NG_ENV_ID__=t=>t}return e})();class Hst extends jp{constructor(i){super(),this._lView=i}onDestroy(i){return Iw(this._lView,i),()=>function PD(e,i){if(null===e[ih])return;const t=e[ih].indexOf(i);-1!==t&&e[ih].splice(t,1)}(this._lView,i)}}function Wst(){return new Hst(ye())}function Xst(){return Yp(br(),ye())}function Yp(e,i){return new ri(Mo(e,i))}let ri=(()=>{class e{constructor(t){this.nativeElement=t}static#t=this.__NG_ELEMENT_ID__=Xst}return e})();function mB(e){return e instanceof ri?e.nativeElement:e}function KD(e){return i=>{setTimeout(e,void 0,i)}}const De=class jst extends Pe{constructor(i=!1){super(),this.destroyRef=void 0,this.__isAsync=i,x3()&&(this.destroyRef=me(jp,{optional:!0})??void 0)}emit(i){const t=g(null);try{super.next(i)}finally{g(t)}}subscribe(i,t,n){let r=i,s=t||(()=>null),o=n;if(i&&"object"==typeof i){const w=i;r=w.next?.bind(w),s=w.error?.bind(w),o=w.complete?.bind(w)}this.__isAsync&&(s=KD(s),r&&(r=KD(r)),o&&(o=KD(o)));const l=super.subscribe({next:r,error:s,complete:o});return i instanceof Ie&&i.add(l),l}};function Yst(){return this._results[Symbol.iterator]()}class nh{static#t=Symbol.iterator;get changes(){return this._changes??=new De}constructor(i=!1){this._emitDistinctChangesOnly=i,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 t=nh.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=Yst)}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,t){return this._results.reduce(i,t)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,t){this.dirty=!1;const n=function Xo(e){return e.flat(Number.POSITIVE_INFINITY)}(i);(this._changesDetected=!function hrt(e,i,t){if(e.length!==i.length)return!1;for(let n=0;npat}),pat="ng",FB=new ee(""),zd=new ee("",{providedIn:"platform",factory:()=>"unknown"}),Nr=new ee(""),e2=new ee("",{providedIn:"root",factory:()=>rh().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let OB=()=>null;function d2(e,i,t=!1){return OB(e,i,t)}const UB=new ee("",{providedIn:"root",factory:()=>!1});let Qw,Kw;function Kp(e){return function m2(){if(void 0===Qw&&(Qw=null,hr.trustedTypes))try{Qw=hr.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Qw}()?.createHTML(e)||e}function GB(e){return function p2(){if(void 0===Kw&&(Kw=null,hr.trustedTypes))try{Kw=hr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Kw}()?.createHTML(e)||e}class kf{constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${z4})`}}class Mat extends kf{getTypeName(){return"HTML"}}class Iat extends kf{getTypeName(){return"Style"}}class Rat extends kf{getTypeName(){return"Script"}}class kat extends kf{getTypeName(){return"URL"}}class Pat extends kf{getTypeName(){return"ResourceURL"}}function ml(e){return e instanceof kf?e.changingThisBreaksApplicationSecurity:e}function Wc(e,i){const t=function Fat(e){return e instanceof kf&&e.getTypeName()||null}(e);if(null!=t&&t!==i){if("ResourceURL"===t&&"URL"===i)return!0;throw new Error(`Required a safe ${i}, got a ${t} (see ${z4})`)}return t===i}class Uat{constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{const t=(new window.DOMParser).parseFromString(Kp(i),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(i):(t.removeChild(t.firstChild),t)}catch{return null}}}class zat{constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){const t=this.inertDocument.createElement("template");return t.innerHTML=Kp(i),t}}const Hat=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Zw(e){return(e=String(e)).match(Hat)?e:"unsafe:"+e}function Gd(e){const i={};for(const t of e.split(","))i[t]=!0;return i}function ox(...e){const i={};for(const t of e)for(const n in t)t.hasOwnProperty(n)&&(i[n]=!0);return i}const jB=Gd("area,br,col,hr,img,wbr"),YB=Gd("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$B=Gd("rp,rt"),g2=ox(jB,ox(YB,Gd("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")),ox($B,Gd("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")),ox($B,YB)),v2=Gd("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),QB=ox(v2,Gd("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"),Gd("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")),Wat=Gd("script,style,template");class Xat{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(i){let t=i.firstChild,n=!0,r=[];for(;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)r.push(t),t=$at(t);else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let s=Yat(t);if(s){t=s;break}t=r.pop()}return this.buf.join("")}startElement(i){const t=KB(i).toLowerCase();if(!g2.hasOwnProperty(t))return this.sanitizedSomething=!0,!Wat.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const n=i.attributes;for(let r=0;r"),!0}endElement(i){const t=KB(i).toLowerCase();g2.hasOwnProperty(t)&&!jB.hasOwnProperty(t)&&(this.buf.push(""))}chars(i){this.buf.push(JB(i))}}function Yat(e){const i=e.nextSibling;if(i&&e!==i.previousSibling)throw ZB(i);return i}function $at(e){const i=e.firstChild;if(i&&function jat(e,i){return(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,i))throw ZB(i);return i}function KB(e){const i=e.nodeName;return"string"==typeof i?i:"FORM"}function ZB(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}const Qat=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Kat=/([^\#-~ |!])/g;function JB(e){return e.replace(/&/g,"&").replace(Qat,function(i){return"&#"+(1024*(i.charCodeAt(0)-55296)+(i.charCodeAt(1)-56320)+65536)+";"}).replace(Kat,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}let Jw;function qB(e,i){let t=null;try{Jw=Jw||function XB(e){const i=new zat(e);return function Gat(){try{return!!(new window.DOMParser).parseFromString(Kp(""),"text/html")}catch{return!1}}()?new Uat(i):i}(e);let n=i?String(i):"";t=Jw.getInertBodyElement(n);let r=5,s=n;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=t.innerHTML,t=Jw.getInertBodyElement(n)}while(n!==s);return Kp((new Xat).sanitizeChildren(x2(t)||t))}finally{if(t){const n=x2(t)||t;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function x2(e){return"content"in e&&function Zat(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var La=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(La||{});function Pf(e){const i=cx();return i?GB(i.sanitize(La.HTML,e)||""):Wc(e,"HTML")?GB(ml(e)):qB(rh(),nn(e))}function lx(e){const i=cx();return i?i.sanitize(La.URL,e)||"":Wc(e,"URL")?ml(e):Zw(nn(e))}function cx(){const e=ye();return e&&e[hc].sanitizer}const not=/^>|^->||--!>|)/g,sot="\u200b$1\u200b";function pl(e){return e instanceof Function?e():e}var ah=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(ah||{});let _2;function T2(e,i){return _2(e,i)}function Jp(e,i,t,n,r){if(null!=n){let s,o=!1;Ja(n)?s=n:Za(n)&&(o=!0,n=n[es]);const l=Sr(n);0===e&&null!==t?null==r?f5(i,t,l):Ff(i,t,l,r||null,!0):1===e&&null!==t?Ff(i,t,l,r||null,!0):2===e?function hx(e,i,t){const n=n_(e,i);n&&function Cot(e,i,t,n){e.removeChild(i,t,n)}(e,n,i,t)}(i,l,o):3===e&&i.destroyNode(l),null!=s&&function Aot(e,i,t,n,r){const s=t[Bc];s!==Sr(t)&&Jp(i,e,n,s,r);for(let l=Cs;li.replace(rot,sot))}(i))}function e_(e,i,t){return e.createElement(i,t)}function d5(e,i){i[hc].changeDetectionScheduler?.notify(1),s_(e,i,i[$i],2,null,null)}function u5(e,i){const t=e[Up],n=t.indexOf(i);t.splice(n,1)}function dx(e,i){if(e.length<=Cs)return;const t=Cs+i,n=e[t];if(n){const r=n[G0];null!==r&&r!==e&&u5(r,n),i>0&&(e[t-1][uc]=n[uc]);const s=vw(e,Cs+i);!function vot(e,i){d5(e,i),i[es]=null,i[Ka]=null}(n[$e],n);const o=s[Bd];null!==o&&o.detachView(s[$e]),n[Ts]=null,n[uc]=null,n[Fi]&=-129}return n}function i_(e,i){if(!(256&i[Fi])){const t=i[$i];t.destroyNode&&s_(e,i,t,3,null,null),function yot(e){let i=e[z0];if(!i)return E2(e[$e],e);for(;i;){let t=null;if(Za(i))t=i[z0];else{const n=i[Cs];n&&(t=n)}if(!t){for(;i&&!i[uc]&&i!==e;)Za(i)&&E2(i[$e],i),i=i[Ts];null===i&&(i=e),Za(i)&&E2(i[$e],i),t=i&&i[uc]}i=t}}(i)}}function E2(e,i){if(256&i[Fi])return;const t=g(null);try{i[Fi]&=-129,i[Fi]|=256,i[Af]&&D(i[Af]),function Tot(e,i){let t;if(null!=e&&null!=(t=e.destroyHooks))for(let n=0;n=0?n[o]():n[-o].unsubscribe(),s+=2}else t[s].call(n[t[s+1]]);null!==n&&(i[Np]=null);const r=i[ih];if(null!==r){i[ih]=null;for(let s=0;s-1){const{encapsulation:s}=e.data[n.directiveStart+r];if(s===cc.None||s===cc.Emulated)return null}return Mo(n,t)}}(e,i.parent,t)}function Ff(e,i,t,n,r){e.insertBefore(i,t,n,r)}function f5(e,i,t){e.appendChild(i,t)}function m5(e,i,t,n,r){null!==n?Ff(e,i,t,n,r):f5(e,i,t)}function n_(e,i){return e.parentNode(i)}function p5(e,i,t){return v5(e,i,t)}let D2,v5=function g5(e,i,t){return 40&e.type?Mo(e,t):null};function r_(e,i,t,n){const r=A2(e,n,i),s=i[$i],l=p5(n.parent||i[Ka],n,i);if(null!=r)if(Array.isArray(t))for(let w=0;wrn&&C5(e,i,rn,!1),Vc(o?2:0,r),t(n,r)}finally{If(s),Vc(o?3:1,r)}}function k2(e,i,t){if(CD(i)){const n=g(null);try{const s=i.directiveEnd;for(let o=i.directiveStart;onull;function M5(e,i,t,n,r){for(let s in i){if(!i.hasOwnProperty(s))continue;const o=i[s];if(void 0===o)continue;n??={};let l,w=Wt.None;Array.isArray(o)?(l=o[0],w=o[1]):l=o;let C=s;if(null!==r){if(!r.hasOwnProperty(s))continue;C=r[s]}0===e?I5(n,t,C,l,w):I5(n,t,C,l)}return n}function I5(e,i,t,n,r){let s;e.hasOwnProperty(t)?(s=e[t]).push(i,n):s=e[t]=[i,n],void 0!==r&&s.push(r)}function $o(e,i,t,n,r,s,o,l){const w=Mo(i,t);let M,C=i.inputs;!l&&null!=C&&(M=C[n])?(U2(e,t,M,n,r),Df(i)&&function Uot(e,i){const t=dl(i,e);16&t[Fi]||(t[Fi]|=64)}(t,i.index)):3&i.type&&(n=function Vot(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(n),r=null!=o?o(r,i.value||"",n):r,s.setProperty(w,n,r))}function L2(e,i,t,n){if(O3()){const r=null===n?null:{"":-1},s=function jot(e,i){const t=e.directiveRegistry;let n=null,r=null;if(t)for(let s=0;s0;){const t=e[--i];if("number"==typeof t&&t<0)return t}return 0})(o)!=l&&o.push(l),o.push(t,n,s)}}(e,i,n,fx(e,t,r.hostVars,sn),r)}function Xc(e,i,t,n,r,s){const o=Mo(e,i);!function B2(e,i,t,n,r,s,o){if(null==s)e.removeAttribute(i,r,t);else{const l=null==o?nn(s):o(s,n||"",r);e.setAttribute(i,r,l,t)}}(i[$i],o,s,e.value,t,n,r)}function Jot(e,i,t,n,r,s){const o=s[i];if(null!==o)for(let l=0;l0&&(t[r-1][uc]=i),n{Y0(e.lView)},consumerOnSignalRead(){this.lView[Af]=this}},z5=100;function d_(e,i=!0,t=0){const n=e[hc],r=n.rendererFactory;r.begin?.();try{!function olt(e,i){H2(e,i);let t=0;for(;RD(e);){if(t===z5)throw new ue(103,!1);t++,H2(e,1)}}(e,t)}catch(o){throw i&&c_(e,o),o}finally{r.end?.(),n.inlineEffectRunner?.flush()}}function llt(e,i,t,n){const r=i[Fi];if(!(256&~r))return;i[hc].inlineEffectRunner?.flush(),VD(i);let o=null,l=null;(function clt(e){return 2!==e.type})(e)&&(l=function nlt(e){return e[Af]??function rlt(e){const i=U5.pop()??Object.create(alt);return i.lView=e,i}(e)}(i),o=_(l));try{k3(i),function B3(e){return Qi.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==t&&E5(e,i,t,2,n);const w=!(3&~r);if(w){const P=e.preOrderCheckHooks;null!==P&&Pw(i,P,null)}else{const P=e.preOrderHooks;null!==P&&Fw(i,P,0,null),zD(i,0)}if(function dlt(e){for(let i=CB(e);null!==i;i=SB(i)){if(!(i[Fi]&TD.HasTransplantedViews))continue;const t=i[Up];for(let n=0;n-1&&(dx(i,n),vw(t,n))}this._attachedToViewContainer=!1}i_(this._lView[$e],this._lView)}onDestroy(i){Iw(this._lView,i)}markForCheck(){vx(this._cdRefInjectingView||this._lView)}detach(){this._lView[Fi]&=-129}reattach(){kD(this._lView),this._lView[Fi]|=128}detectChanges(){this._lView[Fi]|=1024,d_(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ue(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,d5(this._lView[$e],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new ue(902,!1);this._appRef=i,kD(this._lView)}}let fr=(()=>{class e{static#t=this.__NG_ELEMENT_ID__=mlt}return e})();const hlt=fr,flt=class extends hlt{constructor(i,t,n){super(),this._declarationLView=i,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(i,t){return this.createEmbeddedViewImpl(i,t)}createEmbeddedViewImpl(i,t,n){const r=mx(this._declarationLView,this._declarationTContainer,i,{embeddedViewInjector:t,dehydratedView:n});return new xx(r)}};function mlt(){return u_(br(),ye())}function u_(e,i){return 4&e.type?new flt(i,e,Yp(e,i)):null}let K5=()=>null;function eg(e,i){return K5(e,i)}class g_{}class Blt{}class Z5{}class Ult{resolveComponentFactory(i){throw function Vlt(e){const i=Error(`No component factory found for ${qs(e)}.`);return i.ngComponent=e,i}(i)}}let Of=(()=>{class e{static#t=this.NULL=new Ult}return e})();class Q2{}let Wd=(()=>{class e{constructor(){this.destroyNode=null}static#t=this.__NG_ELEMENT_ID__=()=>function zlt(){const e=ye(),t=dl(br().index,e);return(Za(t)?t:e)[$i]}()}return e})(),Glt=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>null})}return e})();const K2={},q5=new Set;function jc(e){q5.has(e)||(q5.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function tV(...e){}class ei{constructor({enableLongStackTrace:i=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new De(!1),this.onMicrotaskEmpty=new De(!1),this.onStable=new De(!1),this.onError=new De(!1),typeof Zone>"u")throw new ue(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),i&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&t,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Hlt(){const e="function"==typeof hr.requestAnimationFrame;let i=hr[e?"requestAnimationFrame":"setTimeout"],t=hr[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&i&&t){const n=i[Zone.__symbol__("OriginalDelegate")];n&&(i=n);const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r)}return{nativeRequestAnimationFrame:i,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function jlt(e){const i=()=>{!function Xlt(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(hr,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,J2(e),e.isCheckStableRunning=!0,Z2(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),J2(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,n,r,s,o,l)=>{if(function Ylt(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(l))return t.invokeTask(r,s,o,l);try{return eV(e),t.invokeTask(r,s,o,l)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||e.shouldCoalesceRunChangeDetection)&&i(),iV(e)}},onInvoke:(t,n,r,s,o,l,w)=>{try{return eV(e),t.invoke(r,s,o,l,w)}finally{e.shouldCoalesceRunChangeDetection&&i(),iV(e)}},onHasTask:(t,n,r,s)=>{t.hasTask(r,s),n===r&&("microTask"==s.change?(e._hasPendingMicrotasks=s.microTask,J2(e),Z2(e)):"macroTask"==s.change&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(t,n,r,s)=>(t.handleError(r,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ei.isInAngularZone())throw new ue(909,!1)}static assertNotInAngularZone(){if(ei.isInAngularZone())throw new ue(909,!1)}run(i,t,n){return this._inner.run(i,t,n)}runTask(i,t,n,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,i,Wlt,tV,tV);try{return s.runTask(o,t,n)}finally{s.cancelTask(o)}}runGuarded(i,t,n){return this._inner.runGuarded(i,t,n)}runOutsideAngular(i){return this._outer.run(i)}}const Wlt={};function Z2(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function J2(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function eV(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function iV(e){e._nesting--,Z2(e)}class nV{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new De,this.onMicrotaskEmpty=new De,this.onStable=new De,this.onError=new De}run(i,t,n){return i.apply(t,n)}runGuarded(i,t,n){return i.apply(t,n)}runOutsideAngular(i){return i()}runTask(i,t,n,r){return i.apply(t,n)}}var Lf=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Lf||{});const rV={destroy(){}};function sV(e,i){!i&&Sw();const t=i?.injector??me(is);if(!function sh(e){return"browser"===(e??me(is)).get(zd)}(t))return rV;jc("NgAfterNextRender");const n=t.get(Tx),r=n.handler??=new oV,s=i?.phase??Lf.MixedReadWrite,o=()=>{r.unregister(w),l()},l=t.get(jp).onDestroy(o),w=Nc(t,()=>new aV(s,()=>{o(),e()}));return r.register(w),{destroy:o}}class aV{constructor(i,t){this.phase=i,this.callbackFn=t,this.zone=me(ei),this.errorHandler=me(fl,{optional:!0}),me(g_,{optional:!0})?.notify(1)}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(i){this.errorHandler?.handleError(i)}}}class oV{constructor(){this.executingCallbacks=!1,this.buckets={[Lf.EarlyRead]:new Set,[Lf.Write]:new Set,[Lf.MixedReadWrite]:new Set,[Lf.Read]:new Set},this.deferredCallbacks=new Set}register(i){(this.executingCallbacks?this.deferredCallbacks:this.buckets[i.phase]).add(i)}unregister(i){this.buckets[i.phase].delete(i),this.deferredCallbacks.delete(i)}execute(){this.executingCallbacks=!0;for(const i of Object.values(this.buckets))for(const t of i)t.invoke();this.executingCallbacks=!1;for(const i of this.deferredCallbacks)this.buckets[i.phase].add(i);this.deferredCallbacks.clear()}destroy(){for(const i of Object.values(this.buckets))i.clear();this.deferredCallbacks.clear()}}let Tx=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const t=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const n of t)n()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>new e})}return e})();function x_(e,i,t){let n=t?e.styles:null,r=t?e.classes:null,s=0;if(null!==i)for(let o=0;o0&&_5(e,t,s.join(" "))}}(L,Mt,X,n),void 0!==t&&function sct(e,i,t){const n=e.projection=[];for(let r=0;r{class e{static#t=this.__NG_ELEMENT_ID__=oct}return e})();function oct(){return mV(br(),ye())}const lct=Ir,hV=class extends lct{constructor(i,t,n){super(),this._lContainer=i,this._hostTNode=t,this._hostLView=n}get element(){return Yp(this._hostTNode,this._hostLView)}get injector(){return new ia(this._hostTNode,this._hostLView)}get parentInjector(){const i=Nw(this._hostTNode,this._hostLView);if(HD(i)){const t=q0(i,this._hostLView),n=J0(i);return new ia(t[$e].data[n+8],t)}return new ia(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){const t=fV(this._lContainer);return null!==t&&t[i]||null}get length(){return this._lContainer.length-Cs}createEmbeddedView(i,t,n){let r,s;"number"==typeof n?r=n:null!=n&&(r=n.index,s=n.injector);const o=eg(this._lContainer,i.ssrId),l=i.createEmbeddedViewImpl(t||{},s,o);return this.insertImpl(l,r,tg(this._hostTNode,o)),l}createComponent(i,t,n,r,s){const o=i&&!function U0(e){return"function"==typeof e}(i);let l;if(o)l=t;else{const U=t||{};l=U.index,n=U.injector,r=U.projectableNodes,s=U.environmentInjector||U.ngModuleRef}const w=o?i:new Ex(En(i)),C=n||this.parentInjector;if(!s&&null==w.ngModule){const X=(o?C:this.parentInjector).get(jo,null);X&&(s=X)}const M=En(w.componentType??{}),P=eg(this._lContainer,M?.id??null),L=w.create(C,r,P?.firstChild??null,s);return this.insertImpl(L.hostView,l,tg(this._hostTNode,P)),L}insert(i,t){return this.insertImpl(i,t,!0)}insertImpl(i,t,n){const r=i._lView;if(function rst(e){return Ja(e[Ts])}(r)){const l=this.indexOf(i);if(-1!==l)this.detach(l);else{const w=r[Ts],C=new hV(w,w[Ka],w[Ts]);C.detach(C.indexOf(i))}}const s=this._adjustIndex(t),o=this._lContainer;return px(o,r,s,n),i.attachToViewContainerRef(),t3(iM(o),s,i),i}move(i,t){return this.insert(i,t)}indexOf(i){const t=fV(this._lContainer);return null!==t?t.indexOf(i):-1}remove(i){const t=this._adjustIndex(i,-1),n=dx(this._lContainer,t);n&&(vw(iM(this._lContainer),t),i_(n[$e],n))}detach(i){const t=this._adjustIndex(i,-1),n=dx(this._lContainer,t);return n&&null!=vw(iM(this._lContainer),t)?new xx(n):null}_adjustIndex(i,t=0){return i??this.length+t}};function fV(e){return e[8]}function iM(e){return e[8]||(e[8]=[])}function mV(e,i){let t;const n=i[e.index];return Ja(n)?t=n:(t=P5(n,i,null,e),i[e.index]=t,l_(i,t)),pV(t,i,e,n),new hV(t,e,i)}let pV=function vV(e,i,t,n){if(e[Bc])return;let r;r=8&t.type?Sr(n):function cct(e,i){const t=e[$i],n=t.createComment(""),r=Mo(i,e);return Ff(t,n_(t,r),n,function Sot(e,i){return e.nextSibling(i)}(t,r),!1),n}(i,t),e[Bc]=r},nM=()=>!1;class rM{constructor(i){this.queryList=i,this.matches=null}clone(){return new rM(this.queryList)}setDirty(){this.queryList.setDirty()}}class sM{constructor(i=[]){this.queries=i}createEmbeddedView(i){const t=i.queries;if(null!==t){const n=null!==i.contentQueries?i.contentQueries[0]:t.length,r=[];for(let s=0;si.trim())}(i):i}}class aM{constructor(i=[]){this.queries=i}elementStart(i,t){for(let n=0;n0)n.push(o[l/2]);else{const C=s[l+1],M=i[-w];for(let P=Cs;P=0;n--){const r=e[n];r.hostVars=i+=r.hostVars,r.hostAttrs=B0(r.hostAttrs,t=B0(t,r.hostAttrs))}}(n)}function Mct(e,i){for(const t in i.inputs){if(!i.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const n=i.inputs[t];if(void 0!==n&&(e.inputs[t]=n,e.declaredInputs[t]=i.declaredInputs[t],null!==i.inputTransforms)){const r=Array.isArray(n)?n[0]:n;if(!i.inputTransforms.hasOwnProperty(r))continue;e.inputTransforms??={},e.inputTransforms[r]=i.inputTransforms[r]}}}function __(e){return e===Lc?{}:e===Qn?[]:e}function Rct(e,i){const t=e.viewQuery;e.viewQuery=t?(n,r)=>{i(n,r),t(n,r)}:i}function kct(e,i){const t=e.contentQueries;e.contentQueries=t?(n,r,s)=>{i(n,r,s),t(n,r,s)}:i}function Pct(e,i){const t=e.hostBindings;e.hostBindings=t?(n,r)=>{i(n,r),t(n,r)}:i}function on(e){const i=e.inputConfig,t={};for(const n in i)if(i.hasOwnProperty(n)){const r=i[n];Array.isArray(r)&&r[3]&&(t[n]=r[3])}e.inputTransforms=t}class Nf{}class zV{}class hM extends Nf{constructor(i,t,n){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new dV(this);const r=Qa(i);this._bootstrapComponents=pl(r.bootstrap),this._r3Injector=dB(i,t,[{provide:Nf,useValue:this},{provide:Of,useValue:this.componentFactoryResolver},...n],qs(i),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(i)}get injector(){return this._r3Injector}destroy(){const i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}}class fM extends zV{constructor(i){super(),this.moduleType=i}create(i){return new hM(this.moduleType,i,[])}}class GV extends Nf{constructor(i){super(),this.componentFactoryResolver=new dV(this),this.instance=null;const t=new Fp([...i.providers,{provide:Nf,useValue:this},{provide:Of,useValue:this.componentFactoryResolver}],i.parent||Cw(),i.debugName,new Set(["environment"]));this.injector=t,i.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}}function T_(e,i,t=null){return new GV({providers:e,parent:i,debugName:t,runEnvironmentInitializers:!0}).injector}let ch=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Wr(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function S_(e){return!!mM(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function mM(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function Yc(e,i,t){return e[i]=t}function Ss(e,i,t){return!Object.is(e[i],t)&&(e[i]=t,!0)}function Bf(e,i,t,n){const r=Ss(e,i,t);return Ss(e,i+1,n)||r}function Gt(e,i,t,n,r,s,o,l){const w=ye(),C=Ln(),M=e+rn,P=C.firstCreatePass?function jct(e,i,t,n,r,s,o,l,w){const C=i.consts,M=qp(i,e,4,o||null,Uc(C,l));L2(i,t,M,Uc(C,w)),kw(i,M);const P=M.tView=O2(2,M,n,r,s,i.directiveRegistry,i.pipeRegistry,null,i.schemas,C,null);return null!==i.queries&&(i.queries.template(i,M),P.queries=i.queries.embeddedTView(M)),M}(M,C,w,i,t,n,r,s,o):C.data[M];zc(P,!1);const O=HV(C,w,P,e);K0()&&r_(C,w,O,P),to(O,w);const L=P5(O,w,O,P);return w[M]=L,l_(w,L),function gV(e,i,t){return nM(e,i,t)}(L,P,w),Mw(P)&&P2(C,w,P),null!=o&&F2(w,P,l),Gt}let HV=function WV(e,i,t,n){return Gc(!0),i[$i].createComment("")};function Ti(e,i,t,n){const r=ye();return Ss(r,mc(),i)&&(Ln(),Xc(Lr(),r,e,i,t,n)),Ti}function dg(e,i,t,n){return Ss(e,mc(),t)?i+nn(t)+n:sn}function hg(e,i,t,n,r,s,o,l){const C=function E_(e,i,t,n,r){const s=Bf(e,i,t,n);return Ss(e,i+2,r)||s}(e,Vd(),t,r,o);return Ud(3),C?i+nn(t)+n+nn(r)+s+nn(o)+l:sn}function k_(e,i){return e<<17|i<<2}function uh(e){return e>>17&32767}function CM(e){return 2|e}function Uf(e){return(131068&e)>>2}function SM(e,i){return-131069&e|i<<2}function EM(e){return 1|e}function w8(e,i,t,n){const r=e[t+1],s=null===i;let o=n?uh(r):Uf(r),l=!1;for(;0!==o&&(!1===l||s);){const C=e[o+1];Rdt(e[o],i)&&(l=!0,e[o+1]=n?EM(C):CM(C)),o=n?uh(C):Uf(C)}l&&(e[t+1]=n?CM(r):EM(r))}function Rdt(e,i){return null===e||null==i||(Array.isArray(e)?e[1]:e)===i||!(!Array.isArray(e)||"string"!=typeof i)&&Pp(e,i)>=0}const na={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function _8(e){return e.substring(na.key,na.keyEnd)}function T8(e,i){const t=na.textEnd;return t===i?-1:(i=na.keyEnd=function Odt(e,i,t){for(;i32;)i++;return i}(e,na.key=i,t),xg(e,i,t))}function xg(e,i,t){for(;i=0;t=T8(i,t))ll(e,_8(i),!0)}function pc(e,i,t,n){const r=ye(),s=Ln(),o=Ud(2);s.firstUpdatePass&&M8(s,e,o,n),i!==sn&&Ss(r,o,i)&&R8(s,s.data[qa()],r,r[$i],e,r[o+1]=function jdt(e,i){return null==e||""===e||("string"==typeof i?e+=i:"object"==typeof e&&(e=qs(ml(e)))),e}(i,t),n,o)}function gc(e,i,t,n){const r=Ln(),s=Ud(2);r.firstUpdatePass&&M8(r,null,s,n);const o=ye();if(t!==sn&&Ss(o,s,t)){const l=r.data[qa()];if(P8(l,n)&&!D8(r,s)){let w=n?l.classesWithoutHost:l.stylesWithoutHost;null!==w&&(t=KA(w,t||"")),AM(r,l,o,t,n)}else!function Xdt(e,i,t,n,r,s,o,l){r===sn&&(r=Qn);let w=0,C=0,M=0=e.expandoStartIndex}function M8(e,i,t,n){const r=e.data;if(null===r[t+1]){const s=r[qa()],o=D8(e,t);P8(s,n)&&null===i&&!o&&(i=!1),i=function Vdt(e,i,t,n){const r=ND(e);let s=n?i.residualClasses:i.residualStyles;if(null===r)0===(n?i.classBindings:i.styleBindings)&&(t=Px(t=DM(null,e,i,t,n),i.attrs,n),s=null);else{const o=i.directiveStylingLast;if(-1===o||e[o]!==r)if(t=DM(r,e,i,t,n),null===s){let w=function Udt(e,i,t){const n=t?i.classBindings:i.styleBindings;if(0!==Uf(n))return e[uh(n)]}(e,i,n);void 0!==w&&Array.isArray(w)&&(w=DM(null,e,i,w[1],n),w=Px(w,i.attrs,n),function zdt(e,i,t,n){e[uh(t?i.classBindings:i.styleBindings)]=n}(e,i,n,w))}else s=function Gdt(e,i,t){let n;const r=i.directiveEnd;for(let s=1+i.directiveStylingLast;s0)&&(C=!0)):M=t,r)if(0!==w){const O=uh(e[l+1]);e[n+1]=k_(O,l),0!==O&&(e[O+1]=SM(e[O+1],n)),e[l+1]=function Adt(e,i){return 131071&e|i<<17}(e[l+1],n)}else e[n+1]=k_(l,0),0!==l&&(e[l+1]=SM(e[l+1],n)),l=n;else e[n+1]=k_(w,0),0===l?l=n:e[w+1]=SM(e[w+1],n),w=n;C&&(e[n+1]=CM(e[n+1])),w8(e,M,n,!0),w8(e,M,n,!1),function Idt(e,i,t,n,r){const s=r?e.residualClasses:e.residualStyles;null!=s&&"string"==typeof i&&Pp(s,i)>=0&&(t[n+1]=EM(t[n+1]))}(i,M,e,n,s),o=k_(l,w),s?i.classBindings=o:i.styleBindings=o}(r,s,i,t,o,n)}}function DM(e,i,t,n,r){let s=null;const o=t.directiveEnd;let l=t.directiveStylingLast;for(-1===l?l=t.directiveStart:l++;l0;){const w=e[r],C=Array.isArray(w),M=C?w[1]:w,P=null===M;let O=t[r+1];O===sn&&(O=P?Qn:void 0);let L=P?dD(O,n):M===n?O:void 0;if(C&&!P_(L)&&(L=dD(w,n)),P_(L)&&(l=L,o))return l;const U=e[r+1];r=o?uh(U):Uf(U)}if(null!==i){let w=s?i.residualClasses:i.residualStyles;null!=w&&(l=dD(w,n))}return l}function P_(e){return void 0!==e}function P8(e,i){return!!(e.flags&(i?8:16))}class iut{destroy(i){}updateValue(i,t){}swap(i,t){const n=Math.min(i,t),r=Math.max(i,t),s=this.detach(r);if(r-n>1){const o=this.detach(n);this.attach(n,s),this.attach(r,o)}else this.attach(n,s)}move(i,t){this.attach(t,this.detach(i))}}function MM(e,i,t,n,r){return e===t&&Object.is(i,n)?1:Object.is(r(e,i),r(t,n))?-1:0}function IM(e,i,t,n){return!(void 0===i||!i.has(n)||(e.attach(t,i.get(n)),i.delete(n),0))}function O8(e,i,t,n,r){if(IM(e,i,n,t(n,r)))e.updateValue(n,r);else{const s=e.create(n,r);e.attach(n,s)}}function L8(e,i,t,n){const r=new Set;for(let s=i;s<=t;s++)r.add(n(s,e.at(s)));return r}class N8{constructor(){this.kvMap=new Map,this._vMap=void 0}has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;const t=this.kvMap.get(i);return void 0!==this._vMap&&this._vMap.has(t)?(this.kvMap.set(i,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,t){if(this.kvMap.has(i)){let n=this.kvMap.get(i);void 0===this._vMap&&(this._vMap=new Map);const r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(i,t)}forEach(i){for(let[t,n]of this.kvMap)if(i(n,t),void 0!==this._vMap){const r=this._vMap;for(;r.has(n);)n=r.get(n),i(n,t)}}}function xn(e,i,t){jc("NgControlFlow");const n=ye(),r=mc(),s=RM(n,rn+e);if(Ss(n,r,i)){const l=g(null);try{if(G2(s,0),-1!==i){const w=kM(n[$e],rn+i),C=eg(s,w.tView.ssrId);px(s,mx(n,w,t,{dehydratedView:C}),0,tg(w,C))}}finally{g(l)}}else{const l=B5(s,0);void 0!==l&&(l[Or]=t)}}class rut{constructor(i,t,n){this.lContainer=i,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Cs}}function F_(e,i){return i}class aut{constructor(i,t,n){this.hasEmptyBlock=i,this.trackByFn=t,this.liveCollection=n}}function O_(e,i,t,n,r,s,o,l,w,C,M,P,O){jc("NgControlFlow");const L=void 0!==w,U=ye(),X=l?o.bind(U[us][Or]):o,W=new aut(L,X);U[rn+e]=W,Gt(e+1,i,t,n,r,s),L&&Gt(e+2,w,C,M,P,O)}class out extends iut{constructor(i,t,n){super(),this.lContainer=i,this.hostLView=t,this.templateTNode=n,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-Cs}at(i){return this.getLView(i)[Or].$implicit}attach(i,t){const n=t[cl];this.needsIndexUpdate||=i!==this.length,px(this.lContainer,t,i,tg(this.templateTNode,n))}detach(i){return this.needsIndexUpdate||=i!==this.length-1,function lut(e,i){return dx(e,i)}(this.lContainer,i)}create(i,t){const n=eg(this.lContainer,this.templateTNode.tView.ssrId);return mx(this.hostLView,this.templateTNode,new rut(this.lContainer,t,i),{dehydratedView:n})}destroy(i){i_(i[$e],i)}updateValue(i,t){this.getLView(i)[Or].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i{e.destroy(l)})}(o,e,s.trackByFn),o.updateIndexes(),s.hasEmptyBlock){const l=mc(),w=0===o.length;if(Ss(n,l,w)){const C=t+2,M=RM(n,C);if(w){const P=kM(r,C),O=eg(M,P.tView.ssrId);px(M,mx(n,P,void 0,{dehydratedView:O}),0,tg(P,O))}else G2(M,0)}}}finally{g(i)}}function RM(e,i){return e[i]}function kM(e,i){return j0(e,i)}function tt(e,i,t,n){const r=ye(),s=Ln(),o=rn+e,l=r[$i],w=s.firstCreatePass?function dut(e,i,t,n,r,s){const o=i.consts,w=qp(i,e,2,n,Uc(o,r));return L2(i,t,w,Uc(o,s)),null!==w.attrs&&x_(w,w.attrs,!1),null!==w.mergedAttrs&&x_(w,w.mergedAttrs,!0),null!==i.queries&&i.queries.elementStart(i,w),w}(o,s,r,i,t,n):s.data[o],C=B8(s,r,w,l,i,e);r[o]=C;const M=Mw(w);return zc(w,!0),T5(l,C,w),!function Mx(e){return!(32&~e.flags)}(w)&&K0()&&r_(s,r,C,w),0===function ast(){return Qi.lFrame.elementDepthCount}()&&to(C,r),function ost(){Qi.lFrame.elementDepthCount++}(),M&&(P2(s,r,w),k2(s,w,r)),null!==n&&F2(r,w),tt}function et(){let e=br();FD()?OD():(e=e.parent,zc(e,!1));const i=e;(function cst(e){return Qi.skipHydrationRootTNode===e})(i)&&function fst(){Qi.skipHydrationRootTNode=null}(),function lst(){Qi.lFrame.elementDepthCount--}();const t=Ln();return t.firstCreatePass&&(kw(t,e),CD(e)&&t.queries.elementEnd(e)),null!=i.classesWithoutHost&&function Est(e){return!!(8&e.flags)}(i)&&AM(t,i,ye(),i.classesWithoutHost,!0),null!=i.stylesWithoutHost&&function Ast(e){return!!(16&e.flags)}(i)&&AM(t,i,ye(),i.stylesWithoutHost,!1),et}function we(e,i,t,n){return tt(e,i,t,n),et(),we}let B8=(e,i,t,n,r,s)=>(Gc(!0),e_(n,r,function X3(){return Qi.lFrame.currentNamespace}()));function Wi(e,i,t){const n=ye(),r=Ln(),s=e+rn,o=r.firstCreatePass?function fut(e,i,t,n,r){const s=i.consts,o=Uc(s,n),l=qp(i,e,8,"ng-container",o);return null!==o&&x_(l,o,!0),L2(i,t,l,Uc(s,r)),null!==i.queries&&i.queries.elementStart(i,l),l}(s,r,n,i,t):r.data[s];zc(o,!0);const l=V8(r,n,o,e);return n[s]=l,K0()&&r_(r,n,l,o),to(l,n),Mw(o)&&(P2(r,n,o),k2(r,o,n)),null!=t&&F2(n,o),Wi}function Xi(){let e=br();const i=Ln();return FD()?OD():(e=e.parent,zc(e,!1)),i.firstCreatePass&&(kw(i,e),CD(e)&&i.queries.elementEnd(e)),Xi}function ra(e,i,t){return Wi(e,i,t),Xi(),ra}let V8=(e,i,t,n)=>(Gc(!0),S2(i[$i],""));function ve(){return ye()}function Kc(e,i,t){const n=ye();return Ss(n,mc(),i)&&$o(Ln(),Lr(),n,e,i,n[$i],t,!0),Kc}function N_(e,i,t){const n=ye();if(Ss(n,mc(),i)){const s=Ln(),o=Lr();$o(s,o,n,e,i,N5(ND(s.data),o,n),t,!0)}return N_}const zf=void 0;var vut=["en",[["a","p"],["AM","PM"],zf],[["AM","PM"],zf,zf],[["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"]],zf,[["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"]],zf,[["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}",zf,"{1} 'at' {0}",zf],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function gut(e){const t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];let yg={};function Ro(e){const i=function xut(e){return e.toLowerCase().replace(/_/g,"-")}(e);let t=z8(i);if(t)return t;const n=i.split("-")[0];if(t=z8(n),t)return t;if("en"===n)return vut;throw new ue(701,!1)}function z8(e){return e in yg||(yg[e]=hr.ng&&hr.ng.common&&hr.ng.common.locales&&hr.ng.common.locales[e]),yg[e]}var Br=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(Br||{});const bg="en-US";let G8=bg;function Vt(e,i,t,n){const r=ye(),s=Ln(),o=br();return OM(s,r,r[$i],o,e,i,n),Vt}function G_(e,i){const t=br(),n=ye(),r=Ln();return OM(r,n,N5(ND(r.data),t,n),t,e,i),G_}function OM(e,i,t,n,r,s,o){const l=Mw(n),C=e.firstCreatePass&&L5(e),M=i[Or],P=O5(i);let O=!0;if(3&n.type||o){const X=Mo(n,i),W=o?o(X):X,Z=P.length,rt=o?vt=>o(Sr(vt[n.index])):n.index;let st=null;if(!o&&l&&(st=function mht(e,i,t,n){const r=e.cleanup;if(null!=r)for(let s=0;sw?l[w]:null}"string"==typeof o&&(s+=2)}return null}(e,i,r,n.index)),null!==st)(st.__ngLastListenerFn__||st).__ngNextListenerFn__=s,st.__ngLastListenerFn__=s,O=!1;else{s=p6(n,i,M,s,!1);const vt=t.listen(W,r,s);P.push(s,vt),C&&C.push(r,rt,Z,Z+1)}}else s=p6(n,i,M,s,!1);const L=n.outputs;let U;if(O&&null!==L&&(U=L[r])){const X=U.length;if(X)for(let W=0;W-1?dl(e.index,i):i);let w=m6(i,t,n,o),C=s.__ngNextListenerFn__;for(;C;)w=m6(i,t,C,o)&&w,C=C.__ngNextListenerFn__;return r&&!1===w&&o.preventDefault(),w}}function Ct(e=1){return function yst(e){return(Qi.lFrame.contextLView=function P3(e,i){for(;e>0;)i=i[Bp],e--;return i}(e,Qi.lFrame.contextLView))[Or]}(e)}function pht(e,i){let t=null;const n=function xrt(e){const i=e.attrs;if(null!=i){const t=i.indexOf(5);if(!(1&t))return i[t+1]}return null}(e);for(let r=0;r(Gc(!0),function C2(e,i){return e.createText(i)}(i[$i],n));function Ze(e){return Ye("",e,""),Ze}function Ye(e,i,t){const n=ye(),r=dg(n,e,i,t);return r!==sn&&Hd(n,qa(),r),Ye}function Zc(e,i,t,n,r){const s=ye(),o=function ug(e,i,t,n,r,s){const l=Bf(e,Vd(),t,r);return Ud(2),l?i+nn(t)+n+nn(r)+s:sn}(s,e,i,t,n,r);return o!==sn&&Hd(s,qa(),o),Zc}function Ux(e,i,t,n,r,s,o){const l=ye(),w=hg(l,e,i,t,n,r,s,o);return w!==sn&&Hd(l,qa(),w),Ux}function ba(e,i,t){EV(i)&&(i=i());const n=ye();return Ss(n,mc(),i)&&$o(Ln(),Lr(),n,e,i,n[$i],t,!1),ba}function Na(e,i){const t=EV(e);return t&&e.set(i),t}function wa(e,i){const t=ye(),n=Ln(),r=br();return OM(n,t,t[$i],r,e,i),wa}function LM(e,i,t,n,r){if(e=Hi(e),Array.isArray(e))for(let s=0;s>20;if(Ef(e)||!e.multi){const L=new Z0(C,r,mt),U=BM(w,i,r?M:M+O,P);-1===U?(jD(Lw(l,o),s,w),NM(s,e,i.length),i.push(w),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),t.push(L),o.push(L)):(t[U]=L,o[U]=L)}else{const L=BM(w,i,M+O,P),U=BM(w,i,M,M+O),W=U>=0&&t[U];if(r&&!W||!r&&!(L>=0&&t[L])){jD(Lw(l,o),s,w);const Z=function Fht(e,i,t,n,r){const s=new Z0(e,t,mt);return s.multi=[],s.index=i,s.componentProviders=0,U6(s,r,n&&!t),s}(r?Pht:kht,t.length,r,n,C);!r&&W&&(t[U].providerFactory=Z),NM(s,e,i.length,0),i.push(w),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),t.push(Z),o.push(Z)}else NM(s,e,L>-1?L:U,U6(t[r?U:L],C,!r&&n));!r&&n&&W&&t[U].componentProviders++}}}function NM(e,i,t,n){const r=Ef(i),s=function Rrt(e){return!!e.useClass}(i);if(r||s){const w=(s?Hi(i.useClass):i).prototype.ngOnDestroy;if(w){const C=e.destroyHooks||(e.destroyHooks=[]);if(!r&&i.multi){const M=C.indexOf(t);-1===M?C.push(t,[n,w]):C[M+1].push(n,w)}else C.push(t,w)}}}function U6(e,i,t){return t&&e.componentProviders++,e.multi.push(i)-1}function BM(e,i,t,n){for(let r=t;r{t.providersResolver=(n,r)=>function Rht(e,i,t){const n=Ln();if(n.firstCreatePass){const r=fc(e);LM(t,n.data,n.blueprint,r,!0),LM(i,n.data,n.blueprint,r,!1)}}(n,r?r(e):e,i)}}let Oht=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const n=mD(0,t.type),r=n.length>0?T_([n],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static#t=this.\u0275prov=Ae({token:e,providedIn:"environment",factory:()=>new e(Jt(jo))})}return e})();function Vi(e){jc("NgStandalone"),e.getStandaloneInjector=i=>i.get(Oht).getOrCreateStandaloneInjector(e)}function Ko(e,i,t){const n=Io()+e,r=ye();return r[n]===sn?Yc(r,n,t?i.call(t):i()):function Dx(e,i){return e[i]}(r,n)}function vc(e,i,t,n){return G6(ye(),Io(),e,i,t,n)}function UM(e,i,t,n,r){return H6(ye(),Io(),e,i,t,n,r)}function zx(e,i){const t=e[i];return t===sn?void 0:t}function G6(e,i,t,n,r,s){const o=i+t;return Ss(e,o,r)?Yc(e,o+1,s?n.call(s,r):n(r)):zx(e,o+1)}function H6(e,i,t,n,r,s,o){const l=i+t;return Bf(e,l,r,s)?Yc(e,l+2,o?n.call(o,r,s):n(r,s)):zx(e,l+2)}function sa(e,i){const t=Ln();let n;const r=e+rn;t.firstCreatePass?(n=function Xht(e,i){if(i)for(let t=i.length-1;t>=0;t--){const n=i[t];if(e===n.name)return n}}(i,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];const s=n.factory||(n.factory=Cf(n.type)),l=Wo(mt);try{const w=Ow(!1),C=s();return Ow(w),function yht(e,i,t,n){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),i[t]=n}(t,ye(),r,C),C}finally{Wo(l)}}function xc(e,i,t){const n=e+rn,r=ye(),s=zp(r,n);return Gx(r,n)?G6(r,Io(),i,s.transform,t,s):s.transform(t)}function Xd(e,i,t,n){const r=e+rn,s=ye(),o=zp(s,r);return Gx(s,r)?H6(s,Io(),i,o.transform,t,n,o):o.transform(t,n)}function Gx(e,i){return e[$e].data[i].pure}function wg(e,i){return u_(e,i)}let l9=(()=>{class e{log(t){console.log(t)}warn(t){console.warn(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();const f9=new ee(""),Y_=new ee("");let $M,jM=(()=>{class e{constructor(t,n,r){this._ngZone=t,this.registry=n,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,$M||(function zft(e){$M=e}(r),r.addToWindow(n)),this._watchAngularEvents(),t.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:()=>{ei.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(t)||(clearTimeout(n.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,n,r){let s=-1;n&&n>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t()},n)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,n,r){if(r&&!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(t,n,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,n,r){return[]}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ei),Jt(YM),Jt(Y_))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})(),YM=(()=>{class e{constructor(){this._applications=new Map}registerApplication(t,n){this._applications.set(t,n)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,n=!0){return $M?.findTestabilityInTree(this,t,n)??null}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function Xx(e){return!!e&&"function"==typeof e.then}function m9(e){return!!e&&"function"==typeof e.subscribe}const QM=new ee("");let KM=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n}),this.appInits=me(QM,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const r of this.appInits){const s=r();if(Xx(s))t.push(s);else if(m9(s)){const o=new Promise((l,w)=>{s.subscribe({complete:l,error:w})});t.push(o)}}const n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),0===t.length&&n(),this.initialized=!0}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const ZM=new ee("");function v9(e,i){return Array.isArray(i)?i.reduce(v9,e):{...e,...i}}let jd=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=me(hB),this.afterRenderEffectManager=me(Tx),this.externalTestViews=new Set,this.beforeRender=new Pe,this.afterTick=new Pe,this.componentTypes=[],this.components=[],this.isStable=me(ch).hasPendingTasks.pipe(Di(t=>!t)),this._injector=me(jo)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(t,n){const r=t instanceof Z5;if(!this._injector.get(KM).done)throw!r&&function eh(e){const i=En(e)||ta(e)||Fa(e);return null!==i&&i.standalone}(t),new ue(405,!1);let o;o=r?t:this._injector.get(Of).resolveComponentFactory(t),this.componentTypes.push(o.componentType);const l=function Gft(e){return e.isBoundToModule}(o)?void 0:this._injector.get(Nf),C=o.create(is.NULL,[],n||o.selector,l),M=C.location.nativeElement,P=C.injector.get(f9,null);return P?.registerApplication(M),C.onDestroy(()=>{this.detachView(C.hostView),$_(this.components,C),P?.unregisterApplication(M)}),this._loadComponent(C),C}tick(){this._tick(!0)}_tick(t){if(this._runningTick)throw new ue(101,!1);const n=g(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(t)}catch(r){this.internalErrorHandler(r)}finally{this.afterTick.next(),this._runningTick=!1,g(n)}}detectChangesInAttachedViews(t){let n=0;const r=this.afterRenderEffectManager;for(;;){if(n===z5)throw new ue(103,!1);if(t){const s=0===n;this.beforeRender.next(s);for(let{_lView:o,notifyErrorHandler:l}of this._views)Wft(o,s,l)}if(n++,r.executeInternalCallbacks(),![...this.externalTestViews.keys(),...this._views].some(({_lView:s})=>JM(s))&&(r.execute(),![...this.externalTestViews.keys(),...this._views].some(({_lView:s})=>JM(s))))break}}attachView(t){const n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){const n=t;$_(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const n=this._injector.get(ZM,[]);[...this._bootstrapListeners,...n].forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>$_(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new ue(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function $_(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}function Wft(e,i,t){!i&&!JM(e)||function Xft(e,i,t){let n;t?(n=0,e[Fi]|=1024):n=64&e[Fi]?0:1,d_(e,i,n)}(e,t,i)}function JM(e){return RD(e)}class jft{constructor(i,t){this.ngModuleFactory=i,this.componentFactories=t}}let x9=(()=>{class e{compileModuleSync(t){return new fM(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const n=this.compileModuleSync(t),s=pl(Qa(t).declarations).reduce((o,l)=>{const w=En(l);return w&&o.push(new Ex(w)),o},[]);return new jft(n,s)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Qft=(()=>{class e{constructor(){this.zone=me(ei),this.applicationRef=me(jd)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Kft(){const e=me(ei),i=me(fl);return t=>e.runOutsideAngular(()=>i.handleError(t))}let Jft=(()=>{class e{constructor(){this.subscription=new Ie,this.initialized=!1,this.zone=me(ei),this.pendingTasks=me(ch)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ei.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ei.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Jc=new ee("",{providedIn:"root",factory:()=>me(Jc,On.Optional|On.SkipSelf)||function qft(){return typeof $localize<"u"&&$localize.locale||bg}()}),qM=new ee("");let _9=(()=>{class e{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,n){const r=function $lt(e="zone.js",i){return"noop"===e?new nV:"zone.js"===e?new ei(i):e}(n?.ngZone,function w9(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:n?.ngZoneEventCoalescing,runCoalescing:n?.ngZoneRunCoalescing}));return r.run(()=>{const s=function Uct(e,i,t){return new hM(e,i,t)}(t.moduleType,this.injector,function b9(e){return[{provide:ei,useFactory:e},{provide:Sf,multi:!0,useFactory:()=>{const i=me(Qft,{optional:!0});return()=>i.initialize()}},{provide:Sf,multi:!0,useFactory:()=>{const i=me(Jft);return()=>{i.initialize()}}},{provide:hB,useFactory:Kft}]}(()=>r)),o=s.injector.get(fl,null);return r.runOutsideAngular(()=>{const l=r.onError.subscribe({next:w=>{o.handleError(w)}});s.onDestroy(()=>{$_(this._modules,s),l.unsubscribe()})}),function g9(e,i,t){try{const n=t();return Xx(n)?n.catch(r=>{throw i.runOutsideAngular(()=>e.handleError(r)),r}):n}catch(n){throw i.runOutsideAngular(()=>e.handleError(n)),n}}(o,r,()=>{const l=s.injector.get(KM);return l.runInitializers(),l.donePromise.then(()=>(function H8(e){"string"==typeof e&&(G8=e.toLowerCase().replace(/_/g,"-"))}(s.injector.get(Jc,bg)||bg),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,n=[]){const r=v9({},n);return function $ft(e,i,t){const n=new fM(t);return Promise.resolve(n)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(t){const n=t.injector.get(jd);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new ue(-403,!1);t.instance.ngDoBootstrap(n)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new ue(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const t=this._injector.get(qM,null);t&&(t.forEach(n=>n()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(is))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})(),fh=null;const T9=new ee("");function C9(e,i,t=[]){const n=`Platform: ${i}`,r=new ee(n);return(s=[])=>{let o=tI();if(!o||o.injector.get(T9,!1)){const l=[...t,...s,{provide:r,useValue:!0}];e?e(l):function imt(e){if(fh&&!fh.get(T9,!1))throw new ue(400,!1);(function p9(){!function J(e){at=e}(()=>{throw new ue(600,!1)})})(),fh=e;const i=e.get(_9);(function E9(e){e.get(FB,null)?.forEach(t=>t())})(e)}(function S9(e=[],i){return is.create({name:i,providers:[{provide:vD,useValue:"platform"},{provide:qM,useValue:new Set([()=>fh=null])},...e]})}(l,n))}return function nmt(e){const i=tI();if(!i)throw new ue(401,!1);return i}()}}function tI(){return fh?.get(_9)??null}let Mn=(()=>{class e{static#t=this.__NG_ELEMENT_ID__=smt}return e})();function smt(e){return function amt(e,i,t){if(Df(e)&&!t){const n=dl(e.index,i);return new xx(n,n)}return 47&e.type?new xx(i[us],i):null}(br(),ye(),!(16&~e))}class R9{constructor(){}supports(i){return S_(i)}create(i){return new umt(i)}}const dmt=(e,i)=>i;class umt{constructor(i){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=i||dmt}forEachItem(i){let t;for(t=this._itHead;null!==t;t=t._next)i(t)}forEachOperation(i){let t=this._itHead,n=this._removalsHead,r=0,s=null;for(;t||n;){const o=!n||t&&t.currentIndex{o=this._trackByFn(r,l),null!==t&&Object.is(t.trackById,o)?(n&&(t=this._verifyReinsertion(t,l,o,r)),Object.is(t.item,l)||this._addIdentityChange(t,l)):(t=this._mismatch(t,l,o,r),n=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=i,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;null!==i;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;null!==i;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,t,n,r){let s;return null===i?s=this._itTail:(s=i._prev,this._remove(i)),null!==(i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(i.item,t)||this._addIdentityChange(i,t),this._reinsertAfter(i,s,r)):null!==(i=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(i.item,t)||this._addIdentityChange(i,t),this._moveAfter(i,s,r)):i=this._addAfter(new hmt(t,n),s,r),i}_verifyReinsertion(i,t,n,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?i=this._reinsertAfter(s,i._prev,r):i.currentIndex!=r&&(i.currentIndex=r,this._addToMoves(i,r)),i}_truncate(i){for(;null!==i;){const t=i._next;this._addToRemovals(this._unlink(i)),i=t}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(i,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(i);const r=i._prevRemoved,s=i._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(i,t,n),this._addToMoves(i,n),i}_moveAfter(i,t,n){return this._unlink(i),this._insertAfter(i,t,n),this._addToMoves(i,n),i}_addAfter(i,t,n){return this._insertAfter(i,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=i:this._additionsTail._nextAdded=i,i}_insertAfter(i,t,n){const r=null===t?this._itHead:t._next;return i._next=r,i._prev=t,null===r?this._itTail=i:r._prev=i,null===t?this._itHead=i:t._next=i,null===this._linkedRecords&&(this._linkedRecords=new k9),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){null!==this._linkedRecords&&this._linkedRecords.remove(i);const t=i._prev,n=i._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,i}_addToMoves(i,t){return i.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=i:this._movesTail._nextMoved=i),i}_addToRemovals(i){return null===this._unlinkedRecords&&(this._unlinkedRecords=new k9),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,t){return i.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=i:this._identityChangesTail._nextIdentityChange=i,i}}class hmt{constructor(i,t){this.item=i,this.trackById=t,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 fmt{constructor(){this._head=null,this._tail=null}add(i){null===this._head?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,t){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){const t=i._prevDup,n=i._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}class k9{constructor(){this.map=new Map}put(i){const t=i.trackById;let n=this.map.get(t);n||(n=new fmt,this.map.set(t,n)),n.add(i)}get(i,t){const r=this.map.get(i);return r?r.get(i,t):null}remove(i){const t=i.trackById;return this.map.get(t).remove(i)&&this.map.delete(t),i}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function P9(e,i,t){const n=e.previousIndex;if(null===n)return n;let r=0;return t&&n{if(t&&t.key===r)this._maybeAddToChanges(t,n),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,n);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let n=t;null!==n;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,t){if(i){const n=i._prev;return t._next=i,t._prev=n,i._prev=t,n&&(n._next=t),i===this._mapHead&&(this._mapHead=t),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(i,t){if(this._records.has(i)){const r=this._records.get(i);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const n=new pmt(i);return this._records.set(i,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;null!==i;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;null!=i;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,t){Object.is(t,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=t,this._addToChanges(i))}_addToAdditions(i){null===this._additionsHead?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){null===this._changesHead?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,t){i instanceof Map?i.forEach(t):Object.keys(i).forEach(n=>t(i[n],n))}}class pmt{constructor(i){this.key=i,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 O9(){return new mh([new R9])}let mh=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:O9});constructor(t){this.factories=t}static create(t,n){if(null!=n){const r=n.factories.slice();t=t.concat(r)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>e.create(t,n||O9()),deps:[[e,new Tf,new Nd]]}}find(t){const n=this.factories.find(r=>r.supports(t));if(null!=n)return n;throw new ue(901,!1)}}return e})();function L9(){return new J_([new F9])}let J_=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:L9});constructor(t){this.factories=t}static create(t,n){if(n){const r=n.factories.slice();t=t.concat(r)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>e.create(t,n||L9()),deps:[[e,new Tf,new Nd]]}}find(t){const n=this.factories.find(r=>r.supports(t));if(n)return n;throw new ue(901,!1)}}return e})();const xmt=C9(null,"core",[]);let ymt=(()=>{class e{constructor(t){}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(jd))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();function Je(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function jr(e,i=NaN){return isNaN(parseFloat(e))||isNaN(Number(e))?i:Number(e)}function rU(e){const i=g(null);try{return e()}finally{g(i)}}const Qmt=new ee("",{providedIn:"root",factory:()=>me(Kmt)});let Kmt=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>new Zmt})}return e})();class Zmt{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=me(ch),this.taskId=null}scheduleEffect(i){if(this.enqueue(i),null===this.taskId){const t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(i){const t=i.creationZone;this.queues.has(t)||this.queues.set(t,new Set);const n=this.queues.get(t);n.has(i)||(this.queuedEffectCount++,n.add(i))}flush(){for(;this.queuedEffectCount>0;)for(const[i,t]of this.queues)null===i?this.flushQueue(t):i.run(()=>this.flushQueue(t))}flushQueue(i){for(const t of i)i.delete(t),this.queuedEffectCount--,t.run()}}class Jmt{constructor(i,t,n,r,s,o){this.scheduler=i,this.effectFn=t,this.creationZone=n,this.injector=s,this.watcher=function Bt(e,i,t){const n=Object.create($t);t&&(n.consumerAllowSignalWrites=!0),n.fn=e,n.schedule=i;const r=w=>{n.cleanupFn=w};return n.ref={notify:()=>y(n),run:()=>{if(null===n.fn)return;if(function h(){return a}())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(n.dirty=!1,n.hasRun&&!A(n))return;n.hasRun=!0;const w=_(n);try{n.cleanupFn(),n.cleanupFn=Yt,n.fn(r)}finally{E(n,w)}},cleanup:()=>n.cleanupFn(),destroy:()=>function o(w){(function s(w){return null===w.fn&&null===w.schedule})(w)||(D(w),w.cleanupFn(),w.fn=null,w.schedule=null,w.cleanupFn=Yt)}(n),[T]:n},n.ref}(l=>this.runEffect(l),()=>this.schedule(),o),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(i){try{this.effectFn(i)}catch(t){this.injector.get(fl,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}}let aU=null;function ph(){return aU}class ept{}const Ni=new ee("");let oI=(()=>{class e{historyGo(t){throw new Error("")}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(npt),providedIn:"platform"})}return e})();const ipt=new ee("");let npt=(()=>{class e extends oI{constructor(){super(),this._doc=me(Ni),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ph().getBaseHref(this._doc)}onPopState(t){const n=ph().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){const n=ph().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}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(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function lI(e,i){if(0==e.length)return i;if(0==i.length)return e;let t=0;return e.endsWith("/")&&t++,i.startsWith("/")&&t++,2==t?e+i.substring(1):1==t?e+i:e+"/"+i}function oU(e){const i=e.match(/#|\?|$/),t=i&&i.index||e.length;return e.slice(0,t-("/"===e[t-1]?1:0))+e.slice(t)}function Yd(e){return e&&"?"!==e[0]?"?"+e:e}let Wf=(()=>{class e{historyGo(t){throw new Error("")}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(cU),providedIn:"root"})}return e})();const lU=new ee("");let cU=(()=>{class e extends Wf{constructor(t,n){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??me(Ni).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return lI(this._baseHref,t)}path(t=!1){const n=this._platformLocation.pathname+Yd(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${n}${r}`:n}pushState(t,n,r,s){const o=this.prepareExternalUrl(r+Yd(s));this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){const o=this.prepareExternalUrl(r+Yd(s));this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(oI),Jt(lU,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),rpt=(()=>{class e extends Wf{constructor(t,n){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){const n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(t){const n=lI(this._baseHref,t);return n.length>0?"#"+n:n}pushState(t,n,r,s){let o=this.prepareExternalUrl(r+Yd(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){let o=this.prepareExternalUrl(r+Yd(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(oI),Jt(lU,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})(),Xf=(()=>{class e{constructor(t){this._subject=new De,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const n=this._locationStrategy.getBaseHref();this._basePath=function opt(e){if(new RegExp("^(https?:)?//").test(e)){const[,t]=e.split(/\/\/[^\/]+/);return t}return e}(oU(dU(n))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,n=""){return this.path()==this.normalize(t+Yd(n))}normalize(t){return e.stripTrailingSlash(function apt(e,i){if(!e||!i.startsWith(e))return i;const t=i.substring(e.length);return""===t||["/",";","?","#"].includes(t[0])?t:i}(this._basePath,dU(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,n="",r=null){this._locationStrategy.pushState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Yd(n)),r)}replaceState(t,n="",r=null){this._locationStrategy.replaceState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Yd(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{const n=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",n){this._urlChangeListeners.forEach(r=>r(t,n))}subscribe(t,n,r){return this._subject.subscribe({next:t,error:n,complete:r})}static#t=this.normalizeQueryParams=Yd;static#e=this.joinWithSlash=lI;static#i=this.stripTrailingSlash=oU;static#n=this.\u0275fac=function(n){return new(n||e)(Jt(Wf))};static#r=this.\u0275prov=Ae({token:e,factory:()=>function spt(){return new Xf(Jt(Wf))}(),providedIn:"root"})}return e})();function dU(e){return e.replace(/\/index.html$/,"")}var rT=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(rT||{}),Po=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Po||{}),Rr=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(Rr||{}),vl=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(vl||{});const Ws={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};function sT(e,i){return Bl(Ro(e)[Br.DateFormat],i)}function aT(e,i){return Bl(Ro(e)[Br.TimeFormat],i)}function oT(e,i){return Bl(Ro(e)[Br.DateTimeFormat],i)}function Nl(e,i){const t=Ro(e),n=t[Br.NumberSymbols][i];if(typeof n>"u"){if(i===Ws.CurrencyDecimal)return t[Br.NumberSymbols][Ws.Decimal];if(i===Ws.CurrencyGroup)return t[Br.NumberSymbols][Ws.Group]}return n}function hU(e){if(!e[Br.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[Br.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Bl(e,i){for(let t=i;t>-1;t--)if(typeof e[t]<"u")return e[t];throw new Error("Locale data API: locale data undefined")}function dI(e){const[i,t]=e.split(":");return{hours:+i,minutes:+t}}const wpt=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,lT={},_pt=/((?:[^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 $d=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}($d||{}),or=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(or||{}),lr=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(lr||{});function Tpt(e,i,t,n){let r=function kpt(e){if(pU(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){const[r,s=1,o=1]=e.split("-").map(l=>+l);return cT(r,s-1,o)}const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(wpt))return function Ppt(e){const i=new Date(0);let t=0,n=0;const r=e[8]?i.setUTCFullYear:i.setFullYear,s=e[8]?i.setUTCHours:i.setHours;e[9]&&(t=Number(e[9]+e[10]),n=Number(e[9]+e[11])),r.call(i,Number(e[1]),Number(e[2])-1,Number(e[3]));const o=Number(e[4]||0)-t,l=Number(e[5]||0)-n,w=Number(e[6]||0),C=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return s.call(i,o,l,w,C),i}(n)}const i=new Date(e);if(!pU(i))throw new Error(`Unable to convert "${e}" into a date`);return i}(e);i=Qd(t,i)||i;let l,o=[];for(;i;){if(l=_pt.exec(i),!l){o.push(i);break}{o=o.concat(l.slice(1));const M=o.pop();if(!M)break;i=M}}let w=r.getTimezoneOffset();n&&(w=mU(n,w),r=function Rpt(e,i,t){const n=t?-1:1,r=e.getTimezoneOffset();return function Ipt(e,i){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+i),e}(e,n*(mU(i,r)-r))}(r,n,!0));let C="";return o.forEach(M=>{const P=function Mpt(e){if(hI[e])return hI[e];let i;switch(e){case"G":case"GG":case"GGG":i=Vr(lr.Eras,Rr.Abbreviated);break;case"GGGG":i=Vr(lr.Eras,Rr.Wide);break;case"GGGGG":i=Vr(lr.Eras,Rr.Narrow);break;case"y":i=Xs(or.FullYear,1,0,!1,!0);break;case"yy":i=Xs(or.FullYear,2,0,!0,!0);break;case"yyy":i=Xs(or.FullYear,3,0,!1,!0);break;case"yyyy":i=Xs(or.FullYear,4,0,!1,!0);break;case"Y":i=fT(1);break;case"YY":i=fT(2,!0);break;case"YYY":i=fT(3);break;case"YYYY":i=fT(4);break;case"M":case"L":i=Xs(or.Month,1,1);break;case"MM":case"LL":i=Xs(or.Month,2,1);break;case"MMM":i=Vr(lr.Months,Rr.Abbreviated);break;case"MMMM":i=Vr(lr.Months,Rr.Wide);break;case"MMMMM":i=Vr(lr.Months,Rr.Narrow);break;case"LLL":i=Vr(lr.Months,Rr.Abbreviated,Po.Standalone);break;case"LLLL":i=Vr(lr.Months,Rr.Wide,Po.Standalone);break;case"LLLLL":i=Vr(lr.Months,Rr.Narrow,Po.Standalone);break;case"w":i=uI(1);break;case"ww":i=uI(2);break;case"W":i=uI(1,!0);break;case"d":i=Xs(or.Date,1);break;case"dd":i=Xs(or.Date,2);break;case"c":case"cc":i=Xs(or.Day,1);break;case"ccc":i=Vr(lr.Days,Rr.Abbreviated,Po.Standalone);break;case"cccc":i=Vr(lr.Days,Rr.Wide,Po.Standalone);break;case"ccccc":i=Vr(lr.Days,Rr.Narrow,Po.Standalone);break;case"cccccc":i=Vr(lr.Days,Rr.Short,Po.Standalone);break;case"E":case"EE":case"EEE":i=Vr(lr.Days,Rr.Abbreviated);break;case"EEEE":i=Vr(lr.Days,Rr.Wide);break;case"EEEEE":i=Vr(lr.Days,Rr.Narrow);break;case"EEEEEE":i=Vr(lr.Days,Rr.Short);break;case"a":case"aa":case"aaa":i=Vr(lr.DayPeriods,Rr.Abbreviated);break;case"aaaa":i=Vr(lr.DayPeriods,Rr.Wide);break;case"aaaaa":i=Vr(lr.DayPeriods,Rr.Narrow);break;case"b":case"bb":case"bbb":i=Vr(lr.DayPeriods,Rr.Abbreviated,Po.Standalone,!0);break;case"bbbb":i=Vr(lr.DayPeriods,Rr.Wide,Po.Standalone,!0);break;case"bbbbb":i=Vr(lr.DayPeriods,Rr.Narrow,Po.Standalone,!0);break;case"B":case"BB":case"BBB":i=Vr(lr.DayPeriods,Rr.Abbreviated,Po.Format,!0);break;case"BBBB":i=Vr(lr.DayPeriods,Rr.Wide,Po.Format,!0);break;case"BBBBB":i=Vr(lr.DayPeriods,Rr.Narrow,Po.Format,!0);break;case"h":i=Xs(or.Hours,1,-12);break;case"hh":i=Xs(or.Hours,2,-12);break;case"H":i=Xs(or.Hours,1);break;case"HH":i=Xs(or.Hours,2);break;case"m":i=Xs(or.Minutes,1);break;case"mm":i=Xs(or.Minutes,2);break;case"s":i=Xs(or.Seconds,1);break;case"ss":i=Xs(or.Seconds,2);break;case"S":i=Xs(or.FractionalSeconds,1);break;case"SS":i=Xs(or.FractionalSeconds,2);break;case"SSS":i=Xs(or.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":i=uT($d.Short);break;case"ZZZZZ":i=uT($d.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=uT($d.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":i=uT($d.Long);break;default:return null}return hI[e]=i,i}(M);C+=P?P(r,t,w):"''"===M?"'":M.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),C}function cT(e,i,t){const n=new Date(0);return n.setFullYear(e,i,t),n.setHours(0,0,0),n}function Qd(e,i){const t=function cpt(e){return Ro(e)[Br.LocaleId]}(e);if(lT[t]??={},lT[t][i])return lT[t][i];let n="";switch(i){case"shortDate":n=sT(e,vl.Short);break;case"mediumDate":n=sT(e,vl.Medium);break;case"longDate":n=sT(e,vl.Long);break;case"fullDate":n=sT(e,vl.Full);break;case"shortTime":n=aT(e,vl.Short);break;case"mediumTime":n=aT(e,vl.Medium);break;case"longTime":n=aT(e,vl.Long);break;case"fullTime":n=aT(e,vl.Full);break;case"short":const r=Qd(e,"shortTime"),s=Qd(e,"shortDate");n=dT(oT(e,vl.Short),[r,s]);break;case"medium":const o=Qd(e,"mediumTime"),l=Qd(e,"mediumDate");n=dT(oT(e,vl.Medium),[o,l]);break;case"long":const w=Qd(e,"longTime"),C=Qd(e,"longDate");n=dT(oT(e,vl.Long),[w,C]);break;case"full":const M=Qd(e,"fullTime"),P=Qd(e,"fullDate");n=dT(oT(e,vl.Full),[M,P])}return n&&(lT[t][i]=n),n}function dT(e,i){return i&&(e=e.replace(/\{([^}]+)}/g,function(t,n){return null!=i&&n in i?i[n]:t})),e}function yc(e,i,t="-",n,r){let s="";(e<0||r&&e<=0)&&(r?e=1-e:(e=-e,s=t));let o=String(e);for(;o.length0||l>-t)&&(l+=t),e===or.Hours)0===l&&-12===t&&(l=12);else if(e===or.FractionalSeconds)return function Cpt(e,i){return yc(e,3).substring(0,i)}(l,i);const w=Nl(o,Ws.MinusSign);return yc(l,i,w,n,r)}}function Vr(e,i,t=Po.Format,n=!1){return function(r,s){return function Ept(e,i,t,n,r,s){switch(t){case lr.Months:return function hpt(e,i,t){const n=Ro(e),s=Bl([n[Br.MonthsFormat],n[Br.MonthsStandalone]],i);return Bl(s,t)}(i,r,n)[e.getMonth()];case lr.Days:return function upt(e,i,t){const n=Ro(e),s=Bl([n[Br.DaysFormat],n[Br.DaysStandalone]],i);return Bl(s,t)}(i,r,n)[e.getDay()];case lr.DayPeriods:const o=e.getHours(),l=e.getMinutes();if(s){const C=function gpt(e){const i=Ro(e);return hU(i),(i[Br.ExtraData][2]||[]).map(n=>"string"==typeof n?dI(n):[dI(n[0]),dI(n[1])])}(i),M=function vpt(e,i,t){const n=Ro(e);hU(n);const s=Bl([n[Br.ExtraData][0],n[Br.ExtraData][1]],i)||[];return Bl(s,t)||[]}(i,r,n),P=C.findIndex(O=>{if(Array.isArray(O)){const[L,U]=O,X=o>=L.hours&&l>=L.minutes,W=o0?Math.floor(r/60):Math.ceil(r/60);switch(e){case $d.Short:return(r>=0?"+":"")+yc(o,2,s)+yc(Math.abs(r%60),2,s);case $d.ShortGMT:return"GMT"+(r>=0?"+":"")+yc(o,1,s);case $d.Long:return"GMT"+(r>=0?"+":"")+yc(o,2,s)+":"+yc(Math.abs(r%60),2,s);case $d.Extended:return 0===n?"Z":(r>=0?"+":"")+yc(o,2,s)+":"+yc(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}const Apt=0,hT=4;function fU(e){const i=e.getDay(),t=0===i?-3:hT-i;return cT(e.getFullYear(),e.getMonth(),e.getDate()+t)}function uI(e,i=!1){return function(t,n){let r;if(i){const s=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,o=t.getDate();r=1+Math.floor((o+s)/7)}else{const s=fU(t),o=function Dpt(e){const i=cT(e,Apt,1).getDay();return cT(e,0,1+(i<=hT?hT:hT+7)-i)}(s.getFullYear()),l=s.getTime()-o.getTime();r=1+Math.round(l/6048e5)}return yc(r,e,Nl(n,Ws.MinusSign))}}function fT(e,i=!1){return function(t,n){return yc(fU(t).getFullYear(),e,Nl(n,Ws.MinusSign),i)}}const hI={};function mU(e,i){e=e.replace(/:/g,"");const t=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(t)?i:t}function pU(e){return e instanceof Date&&!isNaN(e.valueOf())}const Fpt=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function gI(e){const i=parseInt(e);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+e);return i}function yU(e,i){i=encodeURIComponent(i);for(const t of e.split(";")){const n=t.indexOf("="),[r,s]=-1==n?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===i)return decodeURIComponent(s)}return null}const xI=/\s+/,bU=[];let bc=(()=>{class e{constructor(t,n){this._ngEl=t,this._renderer=n,this.initialClasses=bU,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(xI):bU}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(xI):t}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const n of t)this._updateState(n,!0);else if(null!=t)for(const n of Object.keys(t))this._updateState(n,!!t[n]);this._applyStateDiff()}_updateState(t,n){const r=this.stateMap.get(t);void 0!==r?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(t,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const n=t[0],r=t[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(t,n){(t=t.trim()).length>0&&t.split(xI).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Wd))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngClass",""]],inputs:{klass:[Wt.None,"class","klass"],ngClass:"ngClass"},standalone:!0})}return e})();class jpt{constructor(i,t,n,r){this.$implicit=i,this.ngForOf=t,this.index=n,this.count=r}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}}let gs=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,n,r){this._viewContainer=t,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const n=this._viewContainer;t.forEachOperation((r,s,o)=>{if(null==r.previousIndex)n.createEmbeddedView(this._template,new jpt(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)n.remove(null===s?void 0:s);else if(null!==s){const l=n.get(s);n.move(l,o),_U(l,r)}});for(let r=0,s=n.length;r{_U(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,n){return!0}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(fr),mt(mh))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return e})();function _U(e,i){e.context.$implicit=i.item}let Ms=(()=>{class e{constructor(t,n){this._viewContainer=t,this._context=new Ypt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){TU("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){TU("ngIfElse",t),this._elseTemplateRef=t,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(t,n){return!0}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return e})();class Ypt{constructor(){this.$implicit=null,this.ngIf=null}}function TU(e,i){if(i&&!i.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${qs(i)}'.`)}let pT=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,n,r),get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[tr]})}return e})();function wc(e,i){return new ue(2100,!1)}class qpt{createSubscription(i,t){return rU(()=>i.subscribe({next:t,error:n=>{throw n}}))}dispose(i){rU(()=>i.unsubscribe())}}class tgt{createSubscription(i,t){return i.then(t,n=>{throw n})}dispose(i){}}const egt=new tgt,igt=new qpt;let wI=(()=>{class e{constructor(t){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){if(!this._obj){if(t)try{this.markForCheckOnValueUpdate=!1,this._subscribe(t)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,n=>this._updateLatestValue(t,n))}_selectStrategy(t){if(Xx(t))return egt;if(m9(t))return igt;throw wc()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,n){t===this._obj&&(this._latestValue=n,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn,16))};static#e=this.\u0275pipe=$a({name:"async",type:e,pure:!1,standalone:!0})}return e})();const rgt=/(?:[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;let SU=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw wc();return t.replace(rgt,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"titlecase",type:e,pure:!0,standalone:!0})}return e})(),_I=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw wc();return t.toUpperCase()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"uppercase",type:e,pure:!0,standalone:!0})}return e})();const agt=new ee(""),ogt=new ee("");let gh=(()=>{class e{constructor(t,n,r){this.locale=t,this.defaultTimezone=n,this.defaultOptions=r}transform(t,n,r,s){if(null==t||""===t||t!=t)return null;try{return Tpt(t,n??this.defaultOptions?.dateFormat??"mediumDate",s||this.locale,r??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(o){throw wc()}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Jc,16),mt(agt,24),mt(ogt,24))};static#e=this.\u0275pipe=$a({name:"date",type:e,pure:!0,standalone:!0})}return e})(),EU=(()=>{class e{constructor(t){this.differs=t,this.keyValues=[],this.compareFn=AU}transform(t,n=AU){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ??=this.differs.find(t).create();const r=this.differ.diff(t),s=n!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function hgt(e,i){return{key:e,value:i}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}static#t=this.\u0275fac=function(n){return new(n||e)(mt(J_,16))};static#e=this.\u0275pipe=$a({name:"keyvalue",type:e,pure:!1,standalone:!0})}return e})();function AU(e,i){const t=e.key,n=i.key;if(t===n)return 0;if(void 0===t)return 1;if(void 0===n)return-1;if(null===t)return 1;if(null===n)return-1;if("string"==typeof t&&"string"==typeof n)return t{class e{constructor(t){this._locale=t}transform(t,n,r){if(!function TI(e){return!(null==e||""===e||e!=e)}(t))return null;r||=this._locale;try{return function Upt(e,i,t){return function mI(e,i,t,n,r,s,o=!1){let l="",w=!1;if(isFinite(e)){let C=function Gpt(e){let n,r,s,o,l,i=Math.abs(e)+"",t=0;for((r=i.indexOf("."))>-1&&(i=i.replace(".","")),(s=i.search(/e/i))>0?(r<0&&(r=s),r+=+i.slice(s+1),i=i.substring(0,s)):r<0&&(r=i.length),s=0;"0"===i.charAt(s);s++);if(s===(l=i.length))n=[0],r=1;else{for(l--;"0"===i.charAt(l);)l--;for(r-=s,n=[],o=0;s<=l;s++,o++)n[o]=Number(i.charAt(s))}return r>22&&(n=n.splice(0,21),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}(e);o&&(C=function zpt(e){if(0===e.digits[0])return e;const i=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===i?e.digits.push(0,0):1===i&&e.digits.push(0),e.integerLen+=2),e}(C));let M=i.minInt,P=i.minFrac,O=i.maxFrac;if(s){const rt=s.match(Fpt);if(null===rt)throw new Error(`${s} is not a valid digit info`);const st=rt[1],vt=rt[3],_t=rt[5];null!=st&&(M=gI(st)),null!=vt&&(P=gI(vt)),null!=_t?O=gI(_t):null!=vt&&P>O&&(O=P)}!function Hpt(e,i,t){if(i>t)throw new Error(`The minimum number of digits after fraction (${i}) is higher than the maximum (${t}).`);let n=e.digits,r=n.length-e.integerLen;const s=Math.min(Math.max(i,r),t);let o=s+e.integerLen,l=n[o];if(o>0){n.splice(Math.max(e.integerLen,o));for(let P=o;P=5)if(o-1<0){for(let P=0;P>o;P--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[o-1]++;for(;r=C?U.pop():w=!1),O>=10?1:0},0);M&&(n.unshift(M),e.integerLen++)}(C,P,O);let L=C.digits,U=C.integerLen;const X=C.exponent;let W=[];for(w=L.every(rt=>!rt);U0?W=L.splice(U,L.length):(W=L,L=[0]);const Z=[];for(L.length>=i.lgSize&&Z.unshift(L.splice(-i.lgSize,L.length).join(""));L.length>i.gSize;)Z.unshift(L.splice(-i.gSize,L.length).join(""));L.length&&Z.unshift(L.join("")),l=Z.join(Nl(t,n)),W.length&&(l+=Nl(t,r)+W.join("")),X&&(l+=Nl(t,Ws.Exponential)+"+"+X)}else l=Nl(t,Ws.Infinity);return l=e<0&&!w?i.negPre+l+i.negSuf:i.posPre+l+i.posSuf,l}(e,function pI(e,i="-"){const t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=e.split(";"),r=n[0],s=n[1],o=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],l=o[0],w=o[1]||"";t.posPre=l.substring(0,l.indexOf("#"));for(let M=0;M{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const MU="browser";function IU(e){return e===MU}function RU(e){return"server"===e}let xgt=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>IU(me(zd))?new ygt(me(Ni),window):new wgt})}return e})();class ygt{constructor(i,t){this.document=i,this.window=t,this.offset=()=>[0,0]}setOffset(i){this.offset=Array.isArray(i)?()=>i:i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i){this.window.scrollTo(i[0],i[1])}scrollToAnchor(i){const t=function bgt(e,i){const t=e.getElementById(i)||e.getElementsByName(i)[0];if(t)return t;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const n=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let r=n.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(i)||s.querySelector(`[name="${i}"]`);if(o)return o}r=n.nextNode()}}return null}(this.document,i);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(i){this.window.history.scrollRestoration=i}scrollToElement(i){const t=i.getBoundingClientRect(),n=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}}class wgt{setOffset(i){}getScrollPosition(){return[0,0]}scrollToPosition(i){}scrollToAnchor(i){}setHistoryScrollRestoration(i){}}class kU{}class Qgt extends ept{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class EI extends Qgt{static makeCurrent(){!function tpt(e){aU??=e}(new EI)}onAndCancel(i,t,n){return i.addEventListener(t,n),()=>{i.removeEventListener(t,n)}}dispatchEvent(i,t){i.dispatchEvent(t)}remove(i){i.parentNode&&i.parentNode.removeChild(i)}createElement(i,t){return(t=t||this.getDefaultDocument()).createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,t){return"window"===t?window:"document"===t?i:"body"===t?i.body:null}getBaseHref(i){const t=function Kgt(){return Zx=Zx||document.querySelector("base"),Zx?Zx.getAttribute("href"):null}();return null==t?null:function Zgt(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){Zx=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return yU(document.cookie,i)}}let Zx=null,qgt=(()=>{class e{build(){return new XMLHttpRequest}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const AI=new ee("");let zU=(()=>{class e{constructor(t,n){this._zone=n,this._eventNameToPlugin=new Map,t.forEach(r=>{r.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,n,r){return this._findPluginFor(n).addEventListener(t,n,r)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(s=>s.supports(t)),!n)throw new ue(5101,!1);return this._eventNameToPlugin.set(t,n),n}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(AI),Jt(ei))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();class GU{constructor(i){this._doc=i}}const DI="ng-app-id";let HU=(()=>{class e{constructor(t,n,r,s={}){this.doc=t,this.appId=n,this.nonce=r,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=RU(s),this.resetHostNodes()}addStyles(t){for(const n of t)1===this.changeUsageCount(n,1)&&this.onStyleAdded(n)}removeStyles(t){for(const n of t)this.changeUsageCount(n,-1)<=0&&this.onStyleRemoved(n)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(n=>n.remove()),t.clear());for(const n of this.getAllStyles())this.onStyleRemoved(n);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const n of this.getAllStyles())this.addStyleToHost(t,n)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const n of this.hostNodes)this.addStyleToHost(n,t)}onStyleRemoved(t){const n=this.styleRef;n.get(t)?.elements?.forEach(r=>r.remove()),n.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${DI}="${this.appId}"]`);if(t?.length){const n=new Map;return t.forEach(r=>{null!=r.textContent&&n.set(r.textContent,r)}),n}return null}changeUsageCount(t,n){const r=this.styleRef;if(r.has(t)){const s=r.get(t);return s.usage+=n,s.usage}return r.set(t,{usage:n,elements:[]}),n}getStyleElement(t,n){const r=this.styleNodesInDOM,s=r?.get(n);if(s?.parentNode===t)return r.delete(n),s.removeAttribute(DI),s;{const o=this.doc.createElement("style");return this.nonce&&o.setAttribute("nonce",this.nonce),o.textContent=n,this.platformIsServer&&o.setAttribute(DI,this.appId),t.appendChild(o),o}}addStyleToHost(t,n){const r=this.getStyleElement(t,n),s=this.styleRef,o=s.get(n)?.elements;o?o.push(r):s.set(n,{elements:[r],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ix),Jt(e2,8),Jt(zd))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const MI={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/MathML/"},II=/%COMP%/g,nvt=new ee("",{providedIn:"root",factory:()=>!0});function XU(e,i){return i.map(t=>t.replace(II,e))}let RI=(()=>{class e{constructor(t,n,r,s,o,l,w,C=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=l,this.ngZone=w,this.nonce=C,this.rendererByCompId=new Map,this.platformIsServer=RU(l),this.defaultRenderer=new kI(t,o,w,this.platformIsServer)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===cc.ShadowDom&&(n={...n,encapsulation:cc.Emulated});const r=this.getOrCreateRenderer(t,n);return r instanceof YU?r.applyToHost(t):r instanceof PI&&r.applyStyles(),r}getOrCreateRenderer(t,n){const r=this.rendererByCompId;let s=r.get(n.id);if(!s){const o=this.doc,l=this.ngZone,w=this.eventManager,C=this.sharedStylesHost,M=this.removeStylesOnCompDestroy,P=this.platformIsServer;switch(n.encapsulation){case cc.Emulated:s=new YU(w,C,n,this.appId,M,o,l,P);break;case cc.ShadowDom:return new ovt(w,C,t,n,o,l,this.nonce,P);default:s=new PI(w,C,n,M,o,l,P)}r.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(zU),Jt(HU),Jt(ix),Jt(nvt),Jt(Ni),Jt(zd),Jt(ei),Jt(e2))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();class kI{constructor(i,t,n,r){this.eventManager=i,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(i,t){return t?this.doc.createElementNS(MI[t]||t,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,t){(jU(i)?i.content:i).appendChild(t)}insertBefore(i,t,n){i&&(jU(i)?i.content:i).insertBefore(t,n)}removeChild(i,t){i&&i.removeChild(t)}selectRootElement(i,t){let n="string"==typeof i?this.doc.querySelector(i):i;if(!n)throw new ue(-5104,!1);return t||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,t,n,r){if(r){t=r+":"+t;const s=MI[r];s?i.setAttributeNS(s,t,n):i.setAttribute(t,n)}else i.setAttribute(t,n)}removeAttribute(i,t,n){if(n){const r=MI[n];r?i.removeAttributeNS(r,t):i.removeAttribute(`${n}:${t}`)}else i.removeAttribute(t)}addClass(i,t){i.classList.add(t)}removeClass(i,t){i.classList.remove(t)}setStyle(i,t,n,r){r&(ah.DashCase|ah.Important)?i.style.setProperty(t,n,r&ah.Important?"important":""):i.style[t]=n}removeStyle(i,t,n){n&ah.DashCase?i.style.removeProperty(t):i.style[t]=""}setProperty(i,t,n){null!=i&&(i[t]=n)}setValue(i,t){i.nodeValue=t}listen(i,t,n){if("string"==typeof i&&!(i=ph().getGlobalEventTarget(this.doc,i)))throw new Error(`Unsupported event target ${i} for event ${t}`);return this.eventManager.addEventListener(i,t,this.decoratePreventDefault(n))}decoratePreventDefault(i){return t=>{if("__ngUnwrap__"===t)return i;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>i(t)):i(t))&&t.preventDefault()}}}function jU(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class ovt extends kI{constructor(i,t,n,r,s,o,l,w){super(i,s,o,w),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const C=XU(r.id,r.styles);for(const M of C){const P=document.createElement("style");l&&P.setAttribute("nonce",l),P.textContent=M,this.shadowRoot.appendChild(P)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,t){return super.appendChild(this.nodeOrShadowRoot(i),t)}insertBefore(i,t,n){return super.insertBefore(this.nodeOrShadowRoot(i),t,n)}removeChild(i,t){return super.removeChild(this.nodeOrShadowRoot(i),t)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class PI extends kI{constructor(i,t,n,r,s,o,l,w){super(i,s,o,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=w?XU(w,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class YU extends PI{constructor(i,t,n,r,s,o,l,w){const C=r+"-"+n.id;super(i,t,n,s,o,l,w,C),this.contentAttr=function rvt(e){return"_ngcontent-%COMP%".replace(II,e)}(C),this.hostAttr=function svt(e){return"_nghost-%COMP%".replace(II,e)}(C)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,t){const n=super.createElement(i,t);return super.setAttribute(n,this.contentAttr,""),n}}let lvt=(()=>{class e extends GU{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r){return t.addEventListener(n,r,!1),()=>this.removeEventListener(t,n,r)}removeEventListener(t,n,r){return t.removeEventListener(n,r)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const $U=["alt","control","meta","shift"],cvt={"\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"},dvt={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let uvt=(()=>{class e extends GU{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,n,r){const s=e.parseEventName(n),o=e.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ph().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const s=e._normalizeKey(n.pop());let o="",l=n.indexOf("code");if(l>-1&&(n.splice(l,1),o="code."),$U.forEach(C=>{const M=n.indexOf(C);M>-1&&(n.splice(M,1),o+=C+".")}),o+=s,0!=n.length||0===s.length)return null;const w={};return w.domEventName=r,w.fullKey=o,w}static matchEventFullKeyCode(t,n){let r=cvt[t.key]||t.key,s="";return n.indexOf("code.")>-1&&(r=t.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),$U.forEach(o=>{o!==r&&(0,dvt[o])(t)&&(s+=o+".")}),s+=r,s===n)}static eventCallback(t,n,r){return s=>{e.matchEventFullKeyCode(s,t)&&r.runGuarded(()=>n(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const pvt=C9(xmt,"browser",[{provide:zd,useValue:MU},{provide:FB,useValue:function hvt(){EI.makeCurrent()},multi:!0},{provide:Ni,useFactory:function mvt(){return function mat(e){t2=e}(document),document},deps:[]}]),gvt=new ee(""),ZU=[{provide:Y_,useClass:class Jgt{addToWindow(i){hr.getAngularTestability=(n,r=!0)=>{const s=i.findTestabilityInTree(n,r);if(null==s)throw new ue(5103,!1);return s},hr.getAllAngularTestabilities=()=>i.getAllTestabilities(),hr.getAllAngularRootElements=()=>i.getAllRootElements(),hr.frameworkStabilizers||(hr.frameworkStabilizers=[]),hr.frameworkStabilizers.push(n=>{const r=hr.getAllAngularTestabilities();let s=r.length;const o=function(){s--,0==s&&n()};r.forEach(l=>{l.whenStable(o)})})}findTestabilityInTree(i,t,n){return null==t?null:i.getTestability(t)??(n?ph().isShadowRoot(t)?this.findTestabilityInTree(i,t.host,!0):this.findTestabilityInTree(i,t.parentElement,!0):null)}},deps:[]},{provide:f9,useClass:jM,deps:[ei,YM,Y_]},{provide:jM,useClass:jM,deps:[ei,YM,Y_]}],JU=[{provide:vD,useValue:"root"},{provide:fl,useFactory:function fvt(){return new fl},deps:[]},{provide:AI,useClass:lvt,multi:!0,deps:[Ni,ei,zd]},{provide:AI,useClass:uvt,multi:!0,deps:[Ni]},RI,HU,zU,{provide:Q2,useExisting:RI},{provide:kU,useClass:qgt,deps:[]},[]];let qU=(()=>{class e{constructor(t){}static withServerTransition(t){return{ngModule:e,providers:[{provide:ix,useValue:t.appId}]}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(gvt,12))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[...JU,...ZU],imports:[qc,ymt]})}return e})(),vvt=(()=>{class e{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),FI=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:function(n){let r=null;return r=n?new(n||e):Jt(wvt),r},providedIn:"root"})}return e})(),wvt=(()=>{class e extends FI{constructor(t){super(),this._doc=t}sanitize(t,n){if(null==n)return null;switch(t){case La.NONE:return n;case La.HTML:return Wc(n,"HTML")?ml(n):qB(this._doc,String(n)).toString();case La.STYLE:return Wc(n,"Style")?ml(n):n;case La.SCRIPT:if(Wc(n,"Script"))return ml(n);throw new ue(5200,!1);case La.URL:return Wc(n,"URL")?ml(n):Zw(String(n));case La.RESOURCE_URL:if(Wc(n,"ResourceURL"))return ml(n);throw new ue(5201,!1);default:throw new ue(5202,!1)}}bypassSecurityTrustHtml(t){return function Oat(e){return new Mat(e)}(t)}bypassSecurityTrustStyle(t){return function Lat(e){return new Iat(e)}(t)}bypassSecurityTrustScript(t){return function Nat(e){return new Rat(e)}(t)}bypassSecurityTrustUrl(t){return function Bat(e){return new kat(e)}(t)}bypassSecurityTrustResourceUrl(t){return function Vat(e){return new Pat(e)}(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function OI(e){return!!e&&(e instanceof ur||ne(e.lift)&&ne(e.subscribe))}function vh(e){return this instanceof vh?(this.v=e,this):new vh(e)}function az(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=function VI(e){var i="function"==typeof Symbol&&Symbol.iterator,t=i&&e[i],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=e[s]&&function(o){return new Promise(function(l,w){!function r(s,o,l,w){Promise.resolve(w).then(function(C){s({value:C,done:l})},o)}(l,w,(o=e[s](o)).done,o.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const UI=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function oz(e){return ne(e?.then)}function lz(e){return ne(e[$A])}function cz(e){return Symbol.asyncIterator&&ne(e?.[Symbol.asyncIterator])}function dz(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const uz=function Hvt(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function hz(e){return ne(e?.[uz])}function fz(e){return function sz(e,i,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=t.apply(e,i||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(O){n[O]&&(r[O]=function(L){return new Promise(function(U,X){s.push([O,L,U,X])>1||l(O,L)})})}function l(O,L){try{!function w(O){O.value instanceof vh?Promise.resolve(O.value.v).then(C,M):P(s[0][2],O)}(n[O](L))}catch(U){P(s[0][3],U)}}function C(O){l("next",O)}function M(O){l("throw",O)}function P(O,L){O(L),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:n,done:r}=yield vh(t.read());if(r)return yield vh(void 0);yield yield vh(n)}}finally{t.releaseLock()}})}function mz(e){return ne(e?.getReader)}function eo(e){if(e instanceof ur)return e;if(null!=e){if(lz(e))return function Wvt(e){return new ur(i=>{const t=e[$A]();if(ne(t.subscribe))return t.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(UI(e))return function Xvt(e){return new ur(i=>{for(let t=0;t{e.then(t=>{i.closed||(i.next(t),i.complete())},t=>i.error(t)).then(null,Cn)})}(e);if(cz(e))return pz(e);if(hz(e))return function Yvt(e){return new ur(i=>{for(const t of e)if(i.next(t),i.closed)return;i.complete()})}(e);if(mz(e))return function $vt(e){return pz(fz(e))}(e)}throw dz(e)}function pz(e){return new ur(i=>{(function Qvt(e,i){var t,n,r,s;return function nz(e,i,t,n){return new(t||(t=Promise))(function(s,o){function l(M){try{C(n.next(M))}catch(P){o(P)}}function w(M){try{C(n.throw(M))}catch(P){o(P)}}function C(M){M.done?s(M.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(M.value).then(l,w)}C((n=n.apply(e,i||[])).next())})}(this,void 0,void 0,function*(){try{for(t=az(e);!(n=yield t.next()).done;)if(i.next(n.value),i.closed)return}catch(o){r={error:o}}finally{try{n&&!n.done&&(s=t.return)&&(yield s.call(t))}finally{if(r)throw r.error}}i.complete()})})(e,i).catch(t=>i.error(t))})}function Kd(e,i,t,n=0,r=!1){const s=i.schedule(function(){t(),r?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!r)return s}function gz(e,i=0){return ds((t,n)=>{t.subscribe(Xr(n,r=>Kd(n,e,()=>n.next(r),i),()=>Kd(n,e,()=>n.complete(),i),r=>Kd(n,e,()=>n.error(r),i)))})}function vz(e,i=0){return ds((t,n)=>{n.add(e.schedule(()=>t.subscribe(n),i))})}function xz(e,i){if(!e)throw new Error("Iterable cannot be null");return new ur(t=>{Kd(t,i,()=>{const n=e[Symbol.asyncIterator]();Kd(t,i,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function Is(e,i){return i?function e0t(e,i){if(null!=e){if(lz(e))return function Kvt(e,i){return eo(e).pipe(vz(i),gz(i))}(e,i);if(UI(e))return function Jvt(e,i){return new ur(t=>{let n=0;return i.schedule(function(){n===e.length?t.complete():(t.next(e[n++]),t.closed||this.schedule())})})}(e,i);if(oz(e))return function Zvt(e,i){return eo(e).pipe(vz(i),gz(i))}(e,i);if(cz(e))return xz(e,i);if(hz(e))return function qvt(e,i){return new ur(t=>{let n;return Kd(t,i,()=>{n=e[uz](),Kd(t,i,()=>{let r,s;try{({value:r,done:s}=n.next())}catch(o){return void t.error(o)}s?t.complete():t.next(r)},0,!0)}),()=>ne(n?.return)&&n.return()})}(e,i);if(mz(e))return function t0t(e,i){return xz(fz(e),i)}(e,i)}throw dz(e)}(e,i):eo(e)}function yz(e){return e&&ne(e.schedule)}function zI(e){return e[e.length-1]}function bz(e){return ne(zI(e))?e.pop():void 0}function qx(e){return yz(zI(e))?e.pop():void 0}function vi(...e){return Is(e,qx(e))}const{isArray:n0t}=Array,{getPrototypeOf:r0t,prototype:s0t,keys:a0t}=Object;function wz(e){if(1===e.length){const i=e[0];if(n0t(i))return{args:i,keys:null};if(function o0t(e){return e&&"object"==typeof e&&r0t(e)===s0t}(i)){const t=a0t(i);return{args:t.map(n=>i[n]),keys:t}}}return{args:e,keys:null}}const{isArray:l0t}=Array;function GI(e){return Di(i=>function c0t(e,i){return l0t(i)?e(...i):e(i)}(e,i))}function _z(e,i){return e.reduce((t,n,r)=>(t[n]=i[r],t),{})}function Zd(...e){const i=qx(e),t=bz(e),{args:n,keys:r}=wz(e);if(0===n.length)return Is([],i);const s=new ur(function d0t(e,i,t=Ju){return n=>{Tz(i,()=>{const{length:r}=e,s=new Array(r);let o=r,l=r;for(let w=0;w{const C=Is(e[w],i);let M=!1;C.subscribe(Xr(n,P=>{s[w]=P,M||(M=!0,l--),l||n.next(t(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,i,r?o=>_z(r,o):Ju));return t?s.pipe(GI(t)):s}function Tz(e,i,t){e?Kd(t,e,i):i()}const Eg=le(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function _a(e,i,t=1/0){return ne(i)?_a((n,r)=>Di((s,o)=>i(n,s,r,o))(eo(e(n,r))),t):("number"==typeof i&&(t=i),ds((n,r)=>function u0t(e,i,t,n,r,s,o,l){const w=[];let C=0,M=0,P=!1;const O=()=>{P&&!w.length&&!C&&i.complete()},L=X=>C{s&&i.next(X),C++;let W=!1;eo(t(X,M++)).subscribe(Xr(i,Z=>{r?.(Z),s?L(Z):i.next(Z)},()=>{W=!0},void 0,()=>{if(W)try{for(C--;w.length&&CU(Z)):U(Z)}O()}catch(Z){i.error(Z)}}))};return e.subscribe(Xr(i,L,()=>{P=!0,O()})),()=>{l?.()}}(n,r,e,t)))}function Ag(e=1/0){return _a(Ju,e)}function ty(...e){return function h0t(){return Ag(1)}()(Is(e,qx(e)))}function Dg(e){return new ur(i=>{eo(e()).subscribe(i)})}function Mg(e,i){const t=ne(e)?e:()=>e,n=r=>r.error(t());return new ur(i?r=>i.schedule(n,0,r):n)}const Zo=new ur(e=>e.complete());function HI(){return ds((e,i)=>{let t=null;e._refCount++;const n=Xr(i,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(t=null);const r=e._connection,s=t;t=null,r&&(!s||r===s)&&r.unsubscribe(),i.unsubscribe()});e.subscribe(n),n.closed||(t=e.connect())})}class WI extends ur{constructor(i,t){super(),this.source=i,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,U4(i)&&(this.lift=i.lift)}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){const i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:i}=this;this._subject=this._connection=null,i?.unsubscribe()}connect(){let i=this._connection;if(!i){i=this._connection=new Ie;const t=this.getSubject();i.add(this.source.subscribe(Xr(t,void 0,()=>{this._teardown(),t.complete()},n=>{this._teardown(),t.error(n)},()=>this._teardown()))),i.closed&&(this._connection=null,i=Ie.EMPTY)}return i}refCount(){return HI()(this)}}function Rs(e,i){return ds((t,n)=>{let r=null,s=0,o=!1;const l=()=>o&&!r&&n.complete();t.subscribe(Xr(n,w=>{r?.unsubscribe();let C=0;const M=s++;eo(e(w,M)).subscribe(r=Xr(n,P=>n.next(i?i(w,P,M,C++):P),()=>{r=null,l()}))},()=>{o=!0,l()}))})}function er(e){return e<=0?()=>Zo:ds((i,t)=>{let n=0;i.subscribe(Xr(t,r=>{++n<=e&&(t.next(r),e<=n&&t.complete())}))})}function Ta(...e){const i=qx(e);return ds((t,n)=>{(i?ty(e,t,i):ty(e,t)).subscribe(n)})}function In(e,i){return ds((t,n)=>{let r=0;t.subscribe(Xr(n,s=>e.call(i,s,r++)&&n.next(s)))})}function yT(e){return ds((i,t)=>{let n=!1;i.subscribe(Xr(t,r=>{n=!0,t.next(r)},()=>{n||t.next(e),t.complete()}))})}function Cz(e=m0t){return ds((i,t)=>{let n=!1;i.subscribe(Xr(t,r=>{n=!0,t.next(r)},()=>n?t.complete():t.error(e())))})}function m0t(){return new Eg}function Vl(e,i){const t=arguments.length>=2;return n=>n.pipe(e?In((r,s)=>e(r,s,n)):Ju,er(1),t?yT(i):Cz(()=>new Eg))}function Ig(e,i){return ne(i)?_a(e,i,1):_a(e,1)}function hs(e,i,t){const n=ne(e)||i||t?{next:e,error:i,complete:t}:e;return n?ds((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let l=!0;r.subscribe(Xr(s,w=>{var C;null===(C=n.next)||void 0===C||C.call(n,w),s.next(w)},()=>{var w;l=!1,null===(w=n.complete)||void 0===w||w.call(n),s.complete()},w=>{var C;l=!1,null===(C=n.error)||void 0===C||C.call(n,w),s.error(w)},()=>{var w,C;l&&(null===(w=n.unsubscribe)||void 0===w||w.call(n)),null===(C=n.finalize)||void 0===C||C.call(n)}))}):Ju}function oa(e){return ds((i,t)=>{let s,n=null,r=!1;n=i.subscribe(Xr(t,void 0,void 0,o=>{s=eo(e(o,oa(e)(i))),n?(n.unsubscribe(),n=null,s.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(t))})}function XI(e){return e<=0?()=>Zo:ds((i,t)=>{let n=[];i.subscribe(Xr(t,r=>{n.push(r),e{for(const r of n)t.next(r);t.complete()},void 0,()=>{n=null}))})}function bT(e){return Di(()=>e)}function Rg(e){return ds((i,t)=>{try{i.subscribe(t)}finally{t.add(e)}})}function Ui(e){return ds((i,t)=>{eo(e).subscribe(Xr(t,()=>t.complete(),sr)),!t.closed&&i.subscribe(t)})}const yn="primary",ey=Symbol("RouteTitle");class x0t{constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){const t=this.params[i];return Array.isArray(t)?t[0]:t}return null}getAll(i){if(this.has(i)){const t=this.params[i];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function kg(e){return new x0t(e)}function y0t(e,i,t){const n=t.path.split("/");if(n.length>e.length||"full"===t.pathMatch&&(i.hasChildren()||n.lengthn[s]===r)}return e===i}function Ez(e){return e.length>0?e[e.length-1]:null}function xh(e){return OI(e)?e:Xx(e)?Is(Promise.resolve(e)):vi(e)}const w0t={exact:function Mz(e,i,t){if(!jf(e.segments,i.segments)||!wT(e.segments,i.segments,t)||e.numberOfChildren!==i.numberOfChildren)return!1;for(const n in i.children)if(!e.children[n]||!Mz(e.children[n],i.children[n],t))return!1;return!0},subset:Iz},Az={exact:function _0t(e,i){return td(e,i)},subset:function T0t(e,i){return Object.keys(i).length<=Object.keys(e).length&&Object.keys(i).every(t=>Sz(e[t],i[t]))},ignored:()=>!0};function Dz(e,i,t){return w0t[t.paths](e.root,i.root,t.matrixParams)&&Az[t.queryParams](e.queryParams,i.queryParams)&&!("exact"===t.fragment&&e.fragment!==i.fragment)}function Iz(e,i,t){return Rz(e,i,i.segments,t)}function Rz(e,i,t,n){if(e.segments.length>t.length){const r=e.segments.slice(0,t.length);return!(!jf(r,t)||i.hasChildren()||!wT(r,t,n))}if(e.segments.length===t.length){if(!jf(e.segments,t)||!wT(e.segments,t,n))return!1;for(const r in i.children)if(!e.children[r]||!Iz(e.children[r],i.children[r],n))return!1;return!0}{const r=t.slice(0,e.segments.length),s=t.slice(e.segments.length);return!!(jf(e.segments,r)&&wT(e.segments,r,n)&&e.children[yn])&&Rz(e.children[yn],i,s,n)}}function wT(e,i,t){return i.every((n,r)=>Az[t](e[r].parameters,n.parameters))}class Pg{constructor(i=new Er([],{}),t={},n=null){this.root=i,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=kg(this.queryParams),this._queryParamMap}toString(){return E0t.serialize(this)}}class Er{constructor(i,t){this.segments=i,this.children=t,this.parent=null,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return _T(this)}}class iy{constructor(i,t){this.path=i,this.parameters=t}get parameterMap(){return this._parameterMap??=kg(this.parameters),this._parameterMap}toString(){return Fz(this)}}function jf(e,i){return e.length===i.length&&e.every((t,n)=>t.path===i[n].path)}let Fg=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>new YI,providedIn:"root"})}return e})();class YI{parse(i){const t=new N0t(i);return new Pg(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(i){const t=`/${ny(i.root,!0)}`,n=function M0t(e){const i=Object.entries(e).map(([t,n])=>Array.isArray(n)?n.map(r=>`${TT(t)}=${TT(r)}`).join("&"):`${TT(t)}=${TT(n)}`).filter(t=>t);return i.length?`?${i.join("&")}`:""}(i.queryParams);return`${t}${n}${"string"==typeof i.fragment?`#${function A0t(e){return encodeURI(e)}(i.fragment)}`:""}`}}const E0t=new YI;function _T(e){return e.segments.map(i=>Fz(i)).join("/")}function ny(e,i){if(!e.hasChildren())return _T(e);if(i){const t=e.children[yn]?ny(e.children[yn],!1):"",n=[];return Object.entries(e.children).forEach(([r,s])=>{r!==yn&&n.push(`${r}:${ny(s,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}{const t=function S0t(e,i){let t=[];return Object.entries(e.children).forEach(([n,r])=>{n===yn&&(t=t.concat(i(r,n)))}),Object.entries(e.children).forEach(([n,r])=>{n!==yn&&(t=t.concat(i(r,n)))}),t}(e,(n,r)=>r===yn?[ny(e.children[yn],!1)]:[`${r}:${ny(n,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[yn]?`${_T(e)}/${t[0]}`:`${_T(e)}/(${t.join("//")})`}}function kz(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function TT(e){return kz(e).replace(/%3B/gi,";")}function $I(e){return kz(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function CT(e){return decodeURIComponent(e)}function Pz(e){return CT(e.replace(/\+/g,"%20"))}function Fz(e){return`${$I(e.path)}${function D0t(e){return Object.entries(e).map(([i,t])=>`;${$I(i)}=${$I(t)}`).join("")}(e.parameters)}`}const I0t=/^[^\/()?;#]+/;function QI(e){const i=e.match(I0t);return i?i[0]:""}const R0t=/^[^\/()?;=#]+/,P0t=/^[^=?&#]+/,O0t=/^[^&#]+/;class N0t{constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Er([],{}):new Er([],this.parseChildren())}parseQueryParams(){const i={};if(this.consumeOptional("?"))do{this.parseQueryParam(i)}while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const i=[];for(this.peekStartsWith("(")||i.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),i.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(i.length>0||Object.keys(t).length>0)&&(n[yn]=new Er(i,t)),n}parseSegment(){const i=QI(this.remaining);if(""===i&&this.peekStartsWith(";"))throw new ue(4009,!1);return this.capture(i),new iy(CT(i),this.parseMatrixParams())}parseMatrixParams(){const i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){const t=function k0t(e){const i=e.match(R0t);return i?i[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const r=QI(this.remaining);r&&(n=r,this.capture(n))}i[CT(t)]=CT(n)}parseQueryParam(i){const t=function F0t(e){const i=e.match(P0t);return i?i[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const o=function L0t(e){const i=e.match(O0t);return i?i[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=Pz(t),s=Pz(n);if(i.hasOwnProperty(r)){let o=i[r];Array.isArray(o)||(o=[o],i[r]=o),o.push(s)}else i[r]=s}parseParens(i){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=QI(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new ue(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):i&&(s=yn);const o=this.parseChildren();t[s]=1===Object.keys(o).length?o[yn]:new Er([],o),this.consumeOptional("//")}return t}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return!!this.peekStartsWith(i)&&(this.remaining=this.remaining.substring(i.length),!0)}capture(i){if(!this.consumeOptional(i))throw new ue(4011,!1)}}function Oz(e){return e.segments.length>0?new Er([],{[yn]:e}):e}function Lz(e){const i={};for(const[n,r]of Object.entries(e.children)){const s=Lz(r);if(n===yn&&0===s.segments.length&&s.hasChildren())for(const[o,l]of Object.entries(s.children))i[o]=l;else(s.segments.length>0||s.hasChildren())&&(i[n]=s)}return function B0t(e){if(1===e.numberOfChildren&&e.children[yn]){const i=e.children[yn];return new Er(e.segments.concat(i.segments),i.children)}return e}(new Er(e.segments,i))}function Og(e){return e instanceof Pg}function Nz(e){let i;const r=Oz(function t(s){const o={};for(const w of s.children){const C=t(w);o[w.outlet]=C}const l=new Er(s.url,o);return s===e&&(i=l),l}(e.root));return i??r}function Bz(e,i,t,n){let r=e;for(;r.parent;)r=r.parent;if(0===i.length)return KI(r,r,r,t,n);const s=function U0t(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new Uz(!0,0,e);let i=0,t=!1;const n=e.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const l={};return Object.entries(s.outlets).forEach(([w,C])=>{l[w]="string"==typeof C?C.split("/"):C}),[...r,{outlets:l}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((l,w)=>{0==w&&"."===l||(0==w&&""===l?t=!0:".."===l?i++:""!=l&&r.push(l))}),r):[...r,s]},[]);return new Uz(t,i,n)}(i);if(s.toRoot())return KI(r,r,new Er([],{}),t,n);const o=function z0t(e,i,t){if(e.isAbsolute)return new ET(i,!0,0);if(!t)return new ET(i,!1,NaN);if(null===t.parent)return new ET(t,!0,0);const n=ST(e.commands[0])?0:1;return function G0t(e,i,t){let n=e,r=i,s=t;for(;s>r;){if(s-=r,n=n.parent,!n)throw new ue(4005,!1);r=n.segments.length}return new ET(n,!1,r-s)}(t,t.segments.length-1+n,e.numberOfDoubleDots)}(s,r,e),l=o.processChildren?sy(o.segmentGroup,o.index,s.commands):zz(o.segmentGroup,o.index,s.commands);return KI(r,o.segmentGroup,l,t,n)}function ST(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function ry(e){return"object"==typeof e&&null!=e&&e.outlets}function KI(e,i,t,n,r){let o,s={};n&&Object.entries(n).forEach(([w,C])=>{s[w]=Array.isArray(C)?C.map(M=>`${M}`):`${C}`}),o=e===i?t:Vz(e,i,t);const l=Oz(Lz(o));return new Pg(l,s,r)}function Vz(e,i,t){const n={};return Object.entries(e.children).forEach(([r,s])=>{n[r]=s===i?t:Vz(s,i,t)}),new Er(e.segments,n)}class Uz{constructor(i,t,n){if(this.isAbsolute=i,this.numberOfDoubleDots=t,this.commands=n,i&&n.length>0&&ST(n[0]))throw new ue(4003,!1);const r=n.find(ry);if(r&&r!==Ez(n))throw new ue(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ET{constructor(i,t,n){this.segmentGroup=i,this.processChildren=t,this.index=n}}function zz(e,i,t){if(e??=new Er([],{}),0===e.segments.length&&e.hasChildren())return sy(e,i,t);const n=function W0t(e,i,t){let n=0,r=i;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return s;const o=e.segments[r],l=t[n];if(ry(l))break;const w=`${l}`,C=n0&&void 0===w)break;if(w&&C&&"object"==typeof C&&void 0===C.outlets){if(!Hz(w,C,o))return s;n+=2}else{if(!Hz(w,{},o))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}(e,i,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndexs!==yn)&&e.children[yn]&&1===e.numberOfChildren&&0===e.children[yn].segments.length){const s=sy(e.children[yn],i,t);return new Er(e.segments,s.children)}return Object.entries(n).forEach(([s,o])=>{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=zz(e.children[s],i,o))}),Object.entries(e.children).forEach(([s,o])=>{void 0===n[s]&&(r[s]=o)}),new Er(e.segments,r)}}function ZI(e,i,t){const n=e.segments.slice(0,i);let r=0;for(;r{"string"==typeof n&&(n=[n]),null!==n&&(i[t]=ZI(new Er([],{}),0,n))}),i}function Gz(e){const i={};return Object.entries(e).forEach(([t,n])=>i[t]=`${n}`),i}function Hz(e,i,t){return e==t.path&&td(i,t.parameters)}const ay="imperative";var Wn=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Wn||{});class ed{constructor(i,t){this.id=i,this.url=t}}class AT extends ed{constructor(i,t,n="imperative",r=null){super(i,t),this.type=Wn.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class id extends ed{constructor(i,t,n){super(i,t),this.urlAfterRedirects=n,this.type=Wn.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var xl=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(xl||{}),DT=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(DT||{});class Lg extends ed{constructor(i,t,n,r){super(i,t),this.reason=n,this.code=r,this.type=Wn.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Ng extends ed{constructor(i,t,n,r){super(i,t),this.reason=n,this.code=r,this.type=Wn.NavigationSkipped}}class MT extends ed{constructor(i,t,n,r){super(i,t),this.error=n,this.target=r,this.type=Wn.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Wz extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class j0t extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y0t extends ed{constructor(i,t,n,r,s){super(i,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=s,this.type=Wn.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class $0t extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Q0t extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class K0t{constructor(i){this.route=i,this.type=Wn.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Z0t{constructor(i){this.route=i,this.type=Wn.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class J0t{constructor(i){this.snapshot=i,this.type=Wn.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q0t{constructor(i){this.snapshot=i,this.type=Wn.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class txt{constructor(i){this.snapshot=i,this.type=Wn.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ext{constructor(i){this.snapshot=i,this.type=Wn.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Xz{constructor(i,t,n){this.routerEvent=i,this.position=t,this.anchor=n,this.type=Wn.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class JI{}class qI{constructor(i){this.url=i}}class ixt{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new oy,this.attachRef=null}}let oy=(()=>{class e{constructor(){this.contexts=new Map}onChildOutletCreated(t,n){const r=this.getOrCreateContext(t);r.outlet=n,this.contexts.set(t,r)}onChildOutletDestroyed(t){const n=this.getContext(t);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let n=this.getContext(t);return n||(n=new ixt,this.contexts.set(t,n)),n}getContext(t){return this.contexts.get(t)||null}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class jz{constructor(i){this._root=i}get root(){return this._root.value}parent(i){const t=this.pathFromRoot(i);return t.length>1?t[t.length-2]:null}children(i){const t=tR(i,this._root);return t?t.children.map(n=>n.value):[]}firstChild(i){const t=tR(i,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(i){const t=eR(i,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==i)}pathFromRoot(i){return eR(i,this._root).map(t=>t.value)}}function tR(e,i){if(e===i.value)return i;for(const t of i.children){const n=tR(e,t);if(n)return n}return null}function eR(e,i){if(e===i.value)return[i];for(const t of i.children){const n=eR(e,t);if(n.length)return n.unshift(i),n}return[]}class _c{constructor(i,t){this.value=i,this.children=t}toString(){return`TreeNode(${this.value})`}}function Bg(e){const i={};return e&&e.children.forEach(t=>i[t.value.outlet]=t),i}class Yz extends jz{constructor(i,t){super(i),this.snapshot=t,rR(this,i)}toString(){return this.snapshot.toString()}}function $z(e){const i=function nxt(e){const s=new nR([],{},{},"",{},yn,e,null,{});return new Qz("",new _c(s,[]))}(e),t=new Wr([new iy("",{})]),n=new Wr({}),r=new Wr({}),s=new Wr({}),o=new Wr(""),l=new Tc(t,n,s,o,r,yn,e,i.root);return l.snapshot=i.root,new Yz(new _c(l,[]),i)}class Tc{constructor(i,t,n,r,s,o,l,w){this.urlSubject=i,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=l,this._futureSnapshot=w,this.title=this.dataSubject?.pipe(Di(C=>C[ey]))??vi(void 0),this.url=i,this.params=t,this.queryParams=n,this.fragment=r,this.data=s}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(Di(i=>kg(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Di(i=>kg(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function iR(e,i,t="emptyOnly"){let n;const{routeConfig:r}=e;return n=null===i||"always"!==t&&""!==r?.path&&(i.component||i.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...i.params,...e.params},data:{...i.data,...e.data},resolve:{...e.data,...i.data,...r?.data,...e._resolvedData}},r&&Zz(r)&&(n.resolve[ey]=r.title),n}class nR{get title(){return this.data?.[ey]}constructor(i,t,n,r,s,o,l,w,C){this.url=i,this.params=t,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=o,this.component=l,this.routeConfig=w,this._resolve=C}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??=kg(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=kg(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Qz extends jz{constructor(i,t){super(t),this.url=i,rR(this,t)}toString(){return Kz(this._root)}}function rR(e,i){i.value._routerState=e,i.children.forEach(t=>rR(e,t))}function Kz(e){const i=e.children.length>0?` { ${e.children.map(Kz).join(", ")} } `:"";return`${e.value}${i}`}function sR(e){if(e.snapshot){const i=e.snapshot,t=e._futureSnapshot;e.snapshot=t,td(i.queryParams,t.queryParams)||e.queryParamsSubject.next(t.queryParams),i.fragment!==t.fragment&&e.fragmentSubject.next(t.fragment),td(i.params,t.params)||e.paramsSubject.next(t.params),function b0t(e,i){if(e.length!==i.length)return!1;for(let t=0;ttd(t.parameters,i[n].parameters))}(e.url,i.url);return t&&!(!e.parent!=!i.parent)&&(!e.parent||aR(e.parent,i.parent))}function Zz(e){return"string"==typeof e.title||null===e.title}let oR=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=yn,this.activateEvents=new De,this.deactivateEvents=new De,this.attachEvents=new De,this.detachEvents=new De,this.parentContexts=me(oy),this.location=me(Ir),this.changeDetector=me(Mn),this.environmentInjector=me(jo),this.inputBinder=me(IT,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(t){if(t.name){const{firstChange:n,previousValue:r}=t.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new ue(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new ue(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new ue(4012,!1);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,n){this.activated=t,this._activatedRoute=n,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,n){if(this.isActivated)throw new ue(4013,!1);this._activatedRoute=t;const r=this.location,o=t.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,w=new rxt(t,l,r.injector);this.activated=r.createComponent(o,{index:r.length,injector:w,environmentInjector:n??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[tr]})}return e})();class rxt{constructor(i,t,n){this.route=i,this.childContexts=t,this.parent=n,this.__ngOutletInjector=!0}get(i,t){return i===Tc?this.route:i===oy?this.childContexts:this.parent.get(i,t)}}const IT=new ee("");let Jz=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){const{activatedRoute:n}=t,r=Zd([n.queryParams,n.params,n.data]).pipe(Rs(([s,o,l],w)=>(l={...s,...o,...l},0===w?vi(l):Promise.resolve(l)))).subscribe(s=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==n||null===n.component)return void this.unsubscribeFromRouteData(t);const o=function qmt(e){const i=En(e);if(!i)return null;const t=new Ex(i);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return i.standalone},get isSignal(){return i.signals}}}(n.component);if(o)for(const{templateName:l}of o.inputs)t.activatedComponentRef.setInput(l,s[l]);else this.unsubscribeFromRouteData(t)});this.outletDataSubscriptions.set(t,r)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function ly(e,i,t){if(t&&e.shouldReuseRoute(i.value,t.value.snapshot)){const n=t.value;n._futureSnapshot=i.value;const r=function axt(e,i,t){return i.children.map(n=>{for(const r of t.children)if(e.shouldReuseRoute(n.value,r.value.snapshot))return ly(e,n,r);return ly(e,n)})}(e,i,t);return new _c(n,r)}{if(e.shouldAttach(i.value)){const s=e.retrieve(i.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=i.value,o.children=i.children.map(l=>ly(e,l)),o}}const n=function oxt(e){return new Tc(new Wr(e.url),new Wr(e.params),new Wr(e.queryParams),new Wr(e.fragment),new Wr(e.data),e.outlet,e.component,e)}(i.value),r=i.children.map(s=>ly(e,s));return new _c(n,r)}}const qz="ngNavigationCancelingError";function tG(e,i){const{redirectTo:t,navigationBehaviorOptions:n}=Og(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,r=eG(!1,xl.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function eG(e,i){const t=new Error(`NavigationCancelingError: ${e||""}`);return t[qz]=!0,t.cancellationCode=i,t}function iG(e){return!!e&&e[qz]}let nG=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["ng-component"]],standalone:!0,features:[Vi],decls:1,vars:0,template:function(n,r){1&n&&we(0,"router-outlet")},dependencies:[oR],encapsulation:2})}return e})();function lR(e){const i=e.children&&e.children.map(lR),t=i?{...e,children:i}:{...e};return!t.component&&!t.loadComponent&&(i||t.loadChildren)&&t.outlet&&t.outlet!==yn&&(t.component=nG),t}function nd(e){return e.outlet||yn}function cy(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let i=e.parent;i;i=i.parent){const t=i.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class pxt{constructor(i,t,n,r,s){this.routeReuseStrategy=i,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=s}activate(i){const t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,i),sR(this.futureState.root),this.activateChildRoutes(t,n,i)}deactivateChildRoutes(i,t,n){const r=Bg(t);i.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(i,t,n){const r=i.value,s=t?t.value:null;if(r===s)if(r.component){const o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(i,t,o.children)}else this.deactivateChildRoutes(i,t,n);else s&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(i,t){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,t):this.deactivateRouteAndOutlet(i,t)}detachAndStoreRouteSubtree(i,t){const n=t.getContext(i.value.outlet),r=n&&i.value.component?n.children:t,s=Bg(i);for(const o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(n&&n.outlet){const o=n.outlet.detach(),l=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:o,route:i,contexts:l})}}deactivateRouteAndOutlet(i,t){const n=t.getContext(i.value.outlet),r=n&&i.value.component?n.children:t,s=Bg(i);for(const o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(i,t,n){const r=Bg(t);i.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new ext(s.value.snapshot))}),i.children.length&&this.forwardEvent(new q0t(i.value.snapshot))}activateRoutes(i,t,n){const r=i.value,s=t?t.value:null;if(sR(r),r===s)if(r.component){const o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(i,t,o.children)}else this.activateChildRoutes(i,t,n);else if(r.component){const o=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const l=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(l.contexts),o.attachRef=l.componentRef,o.route=l.route.value,o.outlet&&o.outlet.attach(l.componentRef,l.route.value),sR(l.route.value),this.activateChildRoutes(i,null,o.children)}else{const l=cy(r.snapshot);o.attachRef=null,o.route=r,o.injector=l,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(i,null,o.children)}}else this.activateChildRoutes(i,null,n)}}class rG{constructor(i){this.path=i,this.route=this.path[this.path.length-1]}}class RT{constructor(i,t){this.component=i,this.route=t}}function gxt(e,i,t){const n=e._root;return dy(n,i?i._root:null,t,[n.value])}function Vg(e,i){const t=Symbol(),n=i.get(e,t);return n===t?"function"!=typeof e||function $nt(e){return null!==hw(e)}(e)?i.get(e):e:n}function dy(e,i,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=Bg(i);return e.children.forEach(o=>{(function xxt(e,i,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=e.value,o=i?i.value:null,l=t?t.getContext(e.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const w=function yxt(e,i,t){if("function"==typeof t)return t(e,i);switch(t){case"pathParamsChange":return!jf(e.url,i.url);case"pathParamsOrQueryParamsChange":return!jf(e.url,i.url)||!td(e.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!aR(e,i)||!td(e.queryParams,i.queryParams);default:return!aR(e,i)}}(o,s,s.routeConfig.runGuardsAndResolvers);w?r.canActivateChecks.push(new rG(n)):(s.data=o.data,s._resolvedData=o._resolvedData),dy(e,i,s.component?l?l.children:null:t,n,r),w&&l&&l.outlet&&l.outlet.isActivated&&r.canDeactivateChecks.push(new RT(l.outlet.component,o))}else o&&uy(i,l,r),r.canActivateChecks.push(new rG(n)),dy(e,null,s.component?l?l.children:null:t,n,r)})(o,s[o.value.outlet],t,n.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,l])=>uy(l,t.getContext(o),r)),r}function uy(e,i,t){const n=Bg(e),r=e.value;Object.entries(n).forEach(([s,o])=>{uy(o,r.component?i?i.children.getContext(s):null:i,t)}),t.canDeactivateChecks.push(new RT(r.component&&i&&i.outlet&&i.outlet.isActivated?i.outlet.component:null,r))}function hy(e){return"function"==typeof e}function sG(e){return e instanceof Eg||"EmptyError"===e?.name}const kT=Symbol("INITIAL_VALUE");function Ug(){return Rs(e=>Zd(e.map(i=>i.pipe(er(1),Ta(kT)))).pipe(Di(i=>{for(const t of i)if(!0!==t){if(t===kT)return kT;if(!1===t||t instanceof Pg)return t}return!0}),In(i=>i!==kT),er(1)))}function aG(e){return function Bnt(...e){return N4(e)}(hs(i=>{if(Og(i))throw tG(0,i)}),Di(i=>!0===i))}class cR{constructor(i){this.segmentGroup=i||null}}class dR extends Error{constructor(i){super(),this.urlTree=i}}function zg(e){return Mg(new cR(e))}class Bxt{constructor(i,t){this.urlSerializer=i,this.urlTree=t}lineralizeSegments(i,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return vi(n);if(r.numberOfChildren>1||!r.children[yn])return Mg(new ue(4e3,!1));r=r.children[yn]}}applyRedirectCommands(i,t,n){const r=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),i,n);if(t.startsWith("/"))throw new dR(r);return r}applyRedirectCreateUrlTree(i,t,n,r){const s=this.createSegmentGroup(i,t.root,n,r);return new Pg(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(i,t){const n={};return Object.entries(i).forEach(([r,s])=>{if("string"==typeof s&&s.startsWith(":")){const l=s.substring(1);n[r]=t[l]}else n[r]=s}),n}createSegmentGroup(i,t,n,r){const s=this.createSegments(i,t.segments,n,r);let o={};return Object.entries(t.children).forEach(([l,w])=>{o[l]=this.createSegmentGroup(i,w,n,r)}),new Er(s,o)}createSegments(i,t,n,r){return t.map(s=>s.path.startsWith(":")?this.findPosParam(i,s,r):this.findOrReturn(s,n))}findPosParam(i,t,n){const r=n[t.path.substring(1)];if(!r)throw new ue(4001,!1);return r}findOrReturn(i,t){let n=0;for(const r of t){if(r.path===i.path)return t.splice(n),r;n++}return i}}const uR={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Vxt(e,i,t,n,r){const s=hR(e,i,t);return s.matched?(n=function cxt(e,i){return e.providers&&!e._injector&&(e._injector=T_(e.providers,i,`Route: ${e.path}`)),e._injector??i}(i,n),function Oxt(e,i,t,n){const r=i.canMatch;return r&&0!==r.length?vi(r.map(o=>{const l=Vg(o,e);return xh(function Sxt(e){return e&&hy(e.canMatch)}(l)?l.canMatch(i,t):Nc(e,()=>l(i,t)))})).pipe(Ug(),aG()):vi(!0)}(n,i,t).pipe(Di(o=>!0===o?s:{...uR}))):vi(s)}function hR(e,i,t){if("**"===i.path)return function Uxt(e){return{matched:!0,parameters:e.length>0?Ez(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(t);if(""===i.path)return"full"===i.pathMatch&&(e.hasChildren()||t.length>0)?{...uR}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const r=(i.matcher||y0t)(t,e,i);if(!r)return{...uR};const s={};Object.entries(r.posParams??{}).forEach(([l,w])=>{s[l]=w.path});const o=r.consumed.length>0?{...s,...r.consumed[r.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function oG(e,i,t,n){return t.length>0&&function Hxt(e,i,t){return t.some(n=>PT(e,i,n)&&nd(n)!==yn)}(e,t,n)?{segmentGroup:new Er(i,Gxt(n,new Er(t,e.children))),slicedSegments:[]}:0===t.length&&function Wxt(e,i,t){return t.some(n=>PT(e,i,n))}(e,t,n)?{segmentGroup:new Er(e.segments,zxt(e,t,n,e.children)),slicedSegments:t}:{segmentGroup:new Er(e.segments,e.children),slicedSegments:t}}function zxt(e,i,t,n){const r={};for(const s of t)if(PT(e,i,s)&&!n[nd(s)]){const o=new Er([],{});r[nd(s)]=o}return{...n,...r}}function Gxt(e,i){const t={};t[yn]=i;for(const n of e)if(""===n.path&&nd(n)!==yn){const r=new Er([],{});t[nd(n)]=r}return t}function PT(e,i,t){return(!(e.hasChildren()||i.length>0)||"full"!==t.pathMatch)&&""===t.path}class Yxt{}class Kxt{constructor(i,t,n,r,s,o,l){this.injector=i,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=l,this.applyRedirects=new Bxt(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(i){return new ue(4002,`'${i.segmentGroup}'`)}recognize(){const i=oG(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(i).pipe(Di(t=>{const n=new nR([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},yn,this.rootComponentType,null,{}),r=new _c(n,t),s=new Qz("",r),o=function V0t(e,i,t=null,n=null){return Bz(Nz(e),i,t,n)}(n,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),this.inheritParamsAndData(s._root,null),{state:s,tree:o}}))}match(i){return this.processSegmentGroup(this.injector,this.config,i,yn).pipe(oa(n=>{if(n instanceof dR)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof cR?this.noMatchError(n):n}))}inheritParamsAndData(i,t){const n=i.value,r=iR(n,t,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),i.children.forEach(s=>this.inheritParamsAndData(s,n))}processSegmentGroup(i,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.processChildren(i,t,n):this.processSegment(i,t,n,n.segments,r,!0).pipe(Di(s=>s instanceof _c?[s]:[]))}processChildren(i,t,n){const r=[];for(const s of Object.keys(n.children))"primary"===s?r.unshift(s):r.push(s);return Is(r).pipe(Ig(s=>{const o=n.children[s],l=function fxt(e,i){const t=e.filter(n=>nd(n)===i);return t.push(...e.filter(n=>nd(n)!==i)),t}(t,s);return this.processSegmentGroup(i,l,o,s)}),function g0t(e,i){return ds(function p0t(e,i,t,n,r){return(s,o)=>{let l=t,w=i,C=0;s.subscribe(Xr(o,M=>{const P=C++;w=l?e(w,M,P):(l=!0,M),n&&o.next(w)},r&&(()=>{l&&o.next(w),o.complete()})))}}(e,i,arguments.length>=2,!0))}((s,o)=>(s.push(...o),s)),yT(null),function v0t(e,i){const t=arguments.length>=2;return n=>n.pipe(e?In((r,s)=>e(r,s,n)):Ju,XI(1),t?yT(i):Cz(()=>new Eg))}(),_a(s=>{if(null===s)return zg(n);const o=lG(s);return function Zxt(e){e.sort((i,t)=>i.value.outlet===yn?-1:t.value.outlet===yn?1:i.value.outlet.localeCompare(t.value.outlet))}(o),vi(o)}))}processSegment(i,t,n,r,s,o){return Is(t).pipe(Ig(l=>this.processSegmentAgainstRoute(l._injector??i,t,l,n,r,s,o).pipe(oa(w=>{if(w instanceof cR)return vi(null);throw w}))),Vl(l=>!!l),oa(l=>{if(sG(l))return function jxt(e,i,t){return 0===i.length&&!e.children[t]}(n,r,s)?vi(new Yxt):zg(n);throw l}))}processSegmentAgainstRoute(i,t,n,r,s,o,l){return function Xxt(e,i,t,n){return!!(nd(e)===n||n!==yn&&PT(i,t,e))&&hR(i,e,t).matched}(n,r,s,o)?void 0===n.redirectTo?this.matchSegmentAgainstRoute(i,r,n,s,o):this.allowRedirects&&l?this.expandSegmentAgainstRouteUsingRedirect(i,r,t,n,s,o):zg(r):zg(r)}expandSegmentAgainstRouteUsingRedirect(i,t,n,r,s,o){const{matched:l,consumedSegments:w,positionalParamSegments:C,remainingSegments:M}=hR(t,r,s);if(!l)return zg(t);r.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const P=this.applyRedirects.applyRedirectCommands(w,r.redirectTo,C);return this.applyRedirects.lineralizeSegments(r,P).pipe(_a(O=>this.processSegment(i,n,t,O.concat(M),o,!1)))}matchSegmentAgainstRoute(i,t,n,r,s){const o=Vxt(t,n,r,i);return"**"===n.path&&(t.children={}),o.pipe(Rs(l=>l.matched?this.getChildConfig(i=n._injector??i,n,r).pipe(Rs(({routes:w})=>{const C=n._loadedInjector??i,{consumedSegments:M,remainingSegments:P,parameters:O}=l,L=new nR(M,O,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function qxt(e){return e.data||{}}(n),nd(n),n.component??n._loadedComponent??null,n,function tyt(e){return e.resolve||{}}(n)),{segmentGroup:U,slicedSegments:X}=oG(t,M,P,w);if(0===X.length&&U.hasChildren())return this.processChildren(C,w,U).pipe(Di(Z=>null===Z?null:new _c(L,Z)));if(0===w.length&&0===X.length)return vi(new _c(L,[]));const W=nd(n)===s;return this.processSegment(C,w,U,X,W?yn:s,!0).pipe(Di(Z=>new _c(L,Z instanceof _c?[Z]:[])))})):zg(t)))}getChildConfig(i,t,n){return t.children?vi({routes:t.children,injector:i}):t.loadChildren?void 0!==t._loadedRoutes?vi({routes:t._loadedRoutes,injector:t._loadedInjector}):function Fxt(e,i,t,n){const r=i.canLoad;return void 0===r||0===r.length?vi(!0):vi(r.map(o=>{const l=Vg(o,e);return xh(function wxt(e){return e&&hy(e.canLoad)}(l)?l.canLoad(i,t):Nc(e,()=>l(i,t)))})).pipe(Ug(),aG())}(i,t,n).pipe(_a(r=>r?this.configLoader.loadChildren(i,t).pipe(hs(s=>{t._loadedRoutes=s.routes,t._loadedInjector=s.injector})):function Nxt(e){return Mg(eG(!1,xl.GuardRejected))}())):vi({routes:[],injector:i})}}function Jxt(e){const i=e.value.routeConfig;return i&&""===i.path}function lG(e){const i=[],t=new Set;for(const n of e){if(!Jxt(n)){i.push(n);continue}const r=i.find(s=>n.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...n.children),t.add(r)):i.push(n)}for(const n of t){const r=lG(n.children);i.push(new _c(n.value,r))}return i.filter(n=>!t.has(n))}function cG(e){const i=e.children.map(t=>cG(t)).flat();return[e,...i]}function fR(e){return Rs(i=>{const t=e(i);return t?Is(t).pipe(Di(()=>i)):vi(i)})}let dG=(()=>{class e{buildTitle(t){let n,r=t.root;for(;void 0!==r;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(s=>s.outlet===yn);return n}getResolvedTitleForRoute(t){return t.data[ey]}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(ayt),providedIn:"root"})}return e})(),ayt=(()=>{class e extends dG{constructor(t){super(),this.title=t}updateTitle(t){const n=this.buildTitle(t);void 0!==n&&this.title.setTitle(n)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(vvt))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Gg=new ee("",{providedIn:"root",factory:()=>({})}),Hg=new ee("");let mR=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=me(x9)}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return vi(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const n=xh(t.loadComponent()).pipe(Di(uG),hs(s=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=s}),Rg(()=>{this.componentLoaders.delete(t)})),r=new WI(n,()=>new Pe).pipe(HI());return this.componentLoaders.set(t,r),r}loadChildren(t,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return vi({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=function oyt(e,i,t,n){return xh(e.loadChildren()).pipe(Di(uG),_a(r=>r instanceof zV||Array.isArray(r)?vi(r):Is(i.compileModuleAsync(r))),Di(r=>{n&&n(e);let s,o,l=!1;return Array.isArray(r)?(o=r,!0):(s=r.create(t).injector,o=s.get(Hg,[],{optional:!0,self:!0}).flat()),{routes:o.map(lR),injector:s}}))}(n,this.compiler,t,this.onLoadEndListener).pipe(Rg(()=>{this.childrenLoaders.delete(n)})),o=new WI(s,()=>new Pe).pipe(HI());return this.childrenLoaders.set(n,o),o}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uG(e){return function lyt(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let pR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(cyt),providedIn:"root"})}return e})(),cyt=(()=>{class e{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,n){return t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const hG=new ee(""),fG=new ee("");function dyt(e,i,t){const n=e.get(fG),r=e.get(Ni);return e.get(ei).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,Promise.resolve();let s;const o=new Promise(C=>{s=C}),l=r.startViewTransition(()=>(s(),function uyt(e){return new Promise(i=>{sV(i,{injector:e})})}(e))),{onViewTransitionCreated:w}=n;return w&&Nc(e,()=>w({transition:l,from:i,to:t})),o})}let FT=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Pe,this.transitionAbortSubject=new Pe,this.configLoader=me(mR),this.environmentInjector=me(jo),this.urlSerializer=me(Fg),this.rootContexts=me(oy),this.location=me(Xf),this.inputBindingEnabled=null!==me(IT,{optional:!0}),this.titleStrategy=me(dG),this.options=me(Gg,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=me(pR),this.createViewTransition=me(hG,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>vi(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Z0t(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new K0t(r))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const n=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:n})}setupNavigations(t,n,r){return this.transitions=new Wr({id:0,currentUrlTree:n,currentRawUrl:n,extractedUrl:this.urlHandlingStrategy.extract(n),urlAfterRedirects:this.urlHandlingStrategy.extract(n),rawUrl:n,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:ay,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(In(s=>0!==s.id),Di(s=>({...s,extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Rs(s=>{let o=!1,l=!1;return vi(s).pipe(Rs(w=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",xl.SupersededByNewNavigation),Zo;this.currentTransition=s,this.currentNavigation={id:w.id,initialUrl:w.rawUrl,extractedUrl:w.extractedUrl,trigger:w.source,extras:w.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const C=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!C&&"reload"!==(w.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const P="";return this.events.next(new Ng(w.id,this.urlSerializer.serialize(w.rawUrl),P,DT.IgnoredSameUrlNavigation)),w.resolve(null),Zo}if(this.urlHandlingStrategy.shouldProcessUrl(w.rawUrl))return vi(w).pipe(Rs(P=>{const O=this.transitions?.getValue();return this.events.next(new AT(P.id,this.urlSerializer.serialize(P.extractedUrl),P.source,P.restoredState)),O!==this.transitions?.getValue()?Zo:Promise.resolve(P)}),function eyt(e,i,t,n,r,s){return _a(o=>function $xt(e,i,t,n,r,s,o="emptyOnly"){return new Kxt(e,i,t,n,r,o,s).recognize()}(e,i,t,n,o.extractedUrl,r,s).pipe(Di(({state:l,tree:w})=>({...o,targetSnapshot:l,urlAfterRedirects:w}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),hs(P=>{s.targetSnapshot=P.targetSnapshot,s.urlAfterRedirects=P.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:P.urlAfterRedirects};const O=new Wz(P.id,this.urlSerializer.serialize(P.extractedUrl),this.urlSerializer.serialize(P.urlAfterRedirects),P.targetSnapshot);this.events.next(O)}));if(C&&this.urlHandlingStrategy.shouldProcessUrl(w.currentRawUrl)){const{id:P,extractedUrl:O,source:L,restoredState:U,extras:X}=w,W=new AT(P,this.urlSerializer.serialize(O),L,U);this.events.next(W);const Z=$z(this.rootComponentType).snapshot;return this.currentTransition=s={...w,targetSnapshot:Z,urlAfterRedirects:O,extras:{...X,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=O,vi(s)}{const P="";return this.events.next(new Ng(w.id,this.urlSerializer.serialize(w.extractedUrl),P,DT.IgnoredByUrlHandlingStrategy)),w.resolve(null),Zo}}),hs(w=>{const C=new j0t(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects),w.targetSnapshot);this.events.next(C)}),Di(w=>(this.currentTransition=s={...w,guards:gxt(w.targetSnapshot,w.currentSnapshot,this.rootContexts)},s)),function Ext(e,i){return _a(t=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=t;return 0===o.length&&0===s.length?vi({...t,guardsResult:!0}):function Axt(e,i,t,n){return Is(e).pipe(_a(r=>function Pxt(e,i,t,n,r){const s=i&&i.routeConfig?i.routeConfig.canDeactivate:null;return s&&0!==s.length?vi(s.map(l=>{const w=cy(i)??r,C=Vg(l,w);return xh(function Cxt(e){return e&&hy(e.canDeactivate)}(C)?C.canDeactivate(e,i,t,n):Nc(w,()=>C(e,i,t,n))).pipe(Vl())})).pipe(Ug()):vi(!0)}(r.component,r.route,t,i,n)),Vl(r=>!0!==r,!0))}(o,n,r,e).pipe(_a(l=>l&&function bxt(e){return"boolean"==typeof e}(l)?function Dxt(e,i,t,n){return Is(i).pipe(Ig(r=>ty(function Ixt(e,i){return null!==e&&i&&i(new J0t(e)),vi(!0)}(r.route.parent,n),function Mxt(e,i){return null!==e&&i&&i(new txt(e)),vi(!0)}(r.route,n),function kxt(e,i,t){const n=i[i.length-1],s=i.slice(0,i.length-1).reverse().map(o=>function vxt(e){const i=e.routeConfig?e.routeConfig.canActivateChild:null;return i&&0!==i.length?{node:e,guards:i}:null}(o)).filter(o=>null!==o).map(o=>Dg(()=>vi(o.guards.map(w=>{const C=cy(o.node)??t,M=Vg(w,C);return xh(function Txt(e){return e&&hy(e.canActivateChild)}(M)?M.canActivateChild(n,e):Nc(C,()=>M(n,e))).pipe(Vl())})).pipe(Ug())));return vi(s).pipe(Ug())}(e,r.path,t),function Rxt(e,i,t){const n=i.routeConfig?i.routeConfig.canActivate:null;if(!n||0===n.length)return vi(!0);const r=n.map(s=>Dg(()=>{const o=cy(i)??t,l=Vg(s,o);return xh(function _xt(e){return e&&hy(e.canActivate)}(l)?l.canActivate(i,e):Nc(o,()=>l(i,e))).pipe(Vl())}));return vi(r).pipe(Ug())}(e,r.route,t))),Vl(r=>!0!==r,!0))}(n,s,e,i):vi(l)),Di(l=>({...t,guardsResult:l})))})}(this.environmentInjector,w=>this.events.next(w)),hs(w=>{if(s.guardsResult=w.guardsResult,Og(w.guardsResult))throw tG(0,w.guardsResult);const C=new Y0t(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects),w.targetSnapshot,!!w.guardsResult);this.events.next(C)}),In(w=>!!w.guardsResult||(this.cancelNavigationTransition(w,"",xl.GuardRejected),!1)),fR(w=>{if(w.guards.canActivateChecks.length)return vi(w).pipe(hs(C=>{const M=new $0t(C.id,this.urlSerializer.serialize(C.extractedUrl),this.urlSerializer.serialize(C.urlAfterRedirects),C.targetSnapshot);this.events.next(M)}),Rs(C=>{let M=!1;return vi(C).pipe(function iyt(e,i){return _a(t=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return vi(t);const s=new Set(r.map(w=>w.route)),o=new Set;for(const w of s)if(!o.has(w))for(const C of cG(w))o.add(C);let l=0;return Is(o).pipe(Ig(w=>s.has(w)?function nyt(e,i,t,n){const r=e.routeConfig,s=e._resolve;return void 0!==r?.title&&!Zz(r)&&(s[ey]=r.title),function ryt(e,i,t,n){const r=jI(e);if(0===r.length)return vi({});const s={};return Is(r).pipe(_a(o=>function syt(e,i,t,n){const r=cy(i)??n,s=Vg(e,r);return xh(s.resolve?s.resolve(i,t):Nc(r,()=>s(i,t)))}(e[o],i,t,n).pipe(Vl(),hs(l=>{s[o]=l}))),XI(1),bT(s),oa(o=>sG(o)?Zo:Mg(o)))}(s,e,i,n).pipe(Di(o=>(e._resolvedData=o,e.data=iR(e,e.parent,t).resolve,null)))}(w,n,e,i):(w.data=iR(w,w.parent,e).resolve,vi(void 0))),hs(()=>l++),XI(1),_a(w=>l===o.size?vi(t):Zo))})}(this.paramsInheritanceStrategy,this.environmentInjector),hs({next:()=>M=!0,complete:()=>{M||this.cancelNavigationTransition(C,"",xl.NoDataFromResolver)}}))}),hs(C=>{const M=new Q0t(C.id,this.urlSerializer.serialize(C.extractedUrl),this.urlSerializer.serialize(C.urlAfterRedirects),C.targetSnapshot);this.events.next(M)}))}),fR(w=>{const C=M=>{const P=[];M.routeConfig?.loadComponent&&!M.routeConfig._loadedComponent&&P.push(this.configLoader.loadComponent(M.routeConfig).pipe(hs(O=>{M.component=O}),Di(()=>{})));for(const O of M.children)P.push(...C(O));return P};return Zd(C(w.targetSnapshot.root)).pipe(yT(null),er(1))}),fR(()=>this.afterPreactivation()),Rs(()=>{const{currentSnapshot:w,targetSnapshot:C}=s,M=this.createViewTransition?.(this.environmentInjector,w.root,C.root);return M?Is(M).pipe(Di(()=>s)):vi(s)}),Di(w=>{const C=function sxt(e,i,t){const n=ly(e,i._root,t?t._root:void 0);return new Yz(n,i)}(t.routeReuseStrategy,w.targetSnapshot,w.currentRouterState);return this.currentTransition=s={...w,targetRouterState:C},this.currentNavigation.targetRouterState=C,s}),hs(()=>{this.events.next(new JI)}),((e,i,t,n)=>Di(r=>(new pxt(i,r.targetRouterState,r.currentRouterState,t,n).activate(e),r)))(this.rootContexts,t.routeReuseStrategy,w=>this.events.next(w),this.inputBindingEnabled),er(1),hs({next:w=>{o=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new id(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects))),this.titleStrategy?.updateTitle(w.targetRouterState.snapshot),w.resolve(!0)},complete:()=>{o=!0}}),Ui(this.transitionAbortSubject.pipe(hs(w=>{throw w}))),Rg(()=>{!o&&!l&&this.cancelNavigationTransition(s,"",xl.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),oa(w=>{if(l=!0,iG(w))this.events.next(new Lg(s.id,this.urlSerializer.serialize(s.extractedUrl),w.message,w.cancellationCode)),function lxt(e){return iG(e)&&Og(e.url)}(w)?this.events.next(new qI(w.url)):s.resolve(!1);else{this.events.next(new MT(s.id,this.urlSerializer.serialize(s.extractedUrl),w,s.targetSnapshot??void 0));try{s.resolve(t.errorHandler(w))}catch(C){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(C)}}return Zo}))}))}cancelNavigationTransition(t,n,r){const s=new Lg(t.id,this.urlSerializer.serialize(t.extractedUrl),n,r);this.events.next(s),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hyt(e){return e!==ay}let fyt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(pyt),providedIn:"root"})}return e})();class myt{shouldDetach(i){return!1}store(i,t){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,t){return i.routeConfig===t.routeConfig}}let pyt=(()=>{class e extends myt{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),mG=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(gyt),providedIn:"root"})}return e})(),gyt=(()=>{class e extends mG{constructor(){super(...arguments),this.location=me(Xf),this.urlSerializer=me(Fg),this.options=me(Gg,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=me(pR),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Pg,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=$z(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(t){return this.location.subscribe(n=>{"popstate"===n.type&&t(n.url,n.state)})}handleRouterEvent(t,n){if(t instanceof AT)this.stateMemento=this.createStateMemento();else if(t instanceof Ng)this.rawUrlTree=n.initialUrl;else if(t instanceof Wz){if("eager"===this.urlUpdateStrategy&&!n.extras.skipLocationChange){const r=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl);this.setBrowserUrl(r,n)}}else t instanceof JI?(this.currentUrlTree=n.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl),this.routerState=n.targetRouterState,"deferred"===this.urlUpdateStrategy&&(n.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,n))):t instanceof Lg&&(t.code===xl.GuardRejected||t.code===xl.NoDataFromResolver)?this.restoreHistory(n):t instanceof MT?this.restoreHistory(n,!0):t instanceof id&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,n){const r=this.urlSerializer.serialize(t);if(this.location.isCurrentPathEqualTo(r)||n.extras.replaceUrl){const o={...n.extras.state,...this.generateNgRouterState(n.id,this.browserPageId)};this.location.replaceState(r,"",o)}else{const s={...n.extras.state,...this.generateNgRouterState(n.id,this.browserPageId+1)};this.location.go(r,"",s)}}restoreHistory(t,n=!1){if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-this.browserPageId;0!==s?this.location.historyGo(s):this.currentUrlTree===t.finalUrl&&0===s&&(this.resetState(t),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(n&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,n){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:n}:{navigationId:t}}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var fy=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(fy||{});function pG(e,i){e.events.pipe(In(t=>t instanceof id||t instanceof Lg||t instanceof MT||t instanceof Ng),Di(t=>t instanceof id||t instanceof Ng?fy.COMPLETE:t instanceof Lg&&(t.code===xl.Redirect||t.code===xl.SupersededByNewNavigation)?fy.REDIRECTING:fy.FAILED),In(t=>t!==fy.REDIRECTING),er(1)).subscribe(()=>{i()})}function vyt(e){throw e}const xyt={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},yyt={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Fo=(()=>{class e{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.isNgZoneEnabled=!1,this.console=me(l9),this.stateManager=me(mG),this.options=me(Gg,{optional:!0})||{},this.pendingTasks=me(ch),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=me(FT),this.urlSerializer=me(Fg),this.location=me(Xf),this.urlHandlingStrategy=me(pR),this._events=new Pe,this.errorHandler=this.options.errorHandler||vyt,this.navigated=!1,this.routeReuseStrategy=me(fyt),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=me(Hg,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!me(IT,{optional:!0}),this.eventsSubscription=new Ie,this.isNgZoneEnabled=me(ei)instanceof ei&&ei.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const t=this.navigationTransitions.events.subscribe(n=>{try{const r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(null!==r&&null!==s)if(this.stateManager.handleRouterEvent(n,s),n instanceof Lg&&n.code!==xl.Redirect&&n.code!==xl.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof id)this.navigated=!0;else if(n instanceof qI){const o=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),l={info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||hyt(r.source)};this.scheduleNavigation(o,ay,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}(function wyt(e){return!(e instanceof JI||e instanceof qI)})(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),ay,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,n)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(t,"popstate",n)},0)})}navigateToSyncWithBrowser(t,n,r){const s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){const w={...r};delete w.navigationId,delete w.\u0275routerPageId,0!==Object.keys(w).length&&(s.state=w)}const l=this.parseUrl(t);this.scheduleNavigation(l,n,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(lR),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(t,n={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:l,preserveFragment:w}=n,C=w?this.currentUrlTree.fragment:o;let P,M=null;switch(l){case"merge":M={...this.currentUrlTree.queryParams,...s};break;case"preserve":M=this.currentUrlTree.queryParams;break;default:M=s||null}null!==M&&(M=this.removeEmptyProps(M));try{P=Nz(r?r.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof t[0]||!t[0].startsWith("/"))&&(t=[]),P=this.currentUrlTree.root}return Bz(P,t,M,C??null)}navigateByUrl(t,n={skipLocationChange:!1}){const r=Og(t)?t:this.parseUrl(t),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,ay,null,n)}navigate(t,n={skipLocationChange:!1}){return function byt(e){for(let i=0;i(null!=s&&(n[r]=s),n),{})}scheduleNavigation(t,n,r,s,o){if(this.disposed)return Promise.resolve(!1);let l,w,C;o?(l=o.resolve,w=o.reject,C=o.promise):C=new Promise((P,O)=>{l=P,w=O});const M=this.pendingTasks.add();return pG(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(M))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:s,resolve:l,reject:w,promise:C,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),C.catch(P=>Promise.reject(P))}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class gG{}let Cyt=(()=>{class e{constructor(t,n,r,s,o){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(In(t=>t instanceof id),Ig(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,n){const r=[];for(const s of n){s.providers&&!s._injector&&(s._injector=T_(s.providers,t,`Route: ${s.path}`));const o=s._injector??t,l=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(l,s.children??s._loadedRoutes))}return Is(r).pipe(Ag())}preloadConfig(t,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(t,n):vi(null);const s=r.pipe(_a(o=>null===o?vi(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??t,o.routes))));return n.loadComponent&&!n._loadedComponent?Is([s,this.loader.loadComponent(n)]).pipe(Ag()):s})}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Fo),Jt(x9),Jt(jo),Jt(gG),Jt(mR))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const vR=new ee("");let vG=(()=>{class e{constructor(t,n,r,s,o={}){this.urlSerializer=t,this.transitions=n,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration||="disabled",o.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(t=>{t instanceof AT?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof id?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof Ng&&t.code===DT.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof Xz&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,n){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Xz(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#t=this.\u0275fac=function(n){a_()};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function rd(e,i){return{\u0275kind:e,\u0275providers:i}}function yG(){const e=me(is);return i=>{const t=e.get(jd);if(i!==t.components[0])return;const n=e.get(Fo),r=e.get(bG);1===e.get(xR)&&n.initialNavigation(),e.get(wG,null,On.Optional)?.setUpPreloading(),e.get(vR,null,On.Optional)?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const bG=new ee("",{factory:()=>new Pe}),xR=new ee("",{providedIn:"root",factory:()=>1}),wG=new ee("");function Dyt(e){return rd(0,[{provide:wG,useExisting:Cyt},{provide:gG,useExisting:e}])}function Iyt(e){return rd(9,[{provide:hG,useValue:dyt},{provide:fG,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const _G=new ee("ROUTER_FORROOT_GUARD"),Ryt=[Xf,{provide:Fg,useClass:YI},Fo,oy,{provide:Tc,useFactory:function xG(e){return e.routerState.root},deps:[Fo]},mR,[]];let TG=(()=>{class e{constructor(t){}static forRoot(t,n){return{ngModule:e,providers:[Ryt,[],{provide:Hg,multi:!0,useValue:t},{provide:_G,useFactory:Oyt,deps:[[Fo,new Nd,new Tf]]},{provide:Gg,useValue:n||{}},n?.useHash?{provide:Wf,useClass:rpt}:{provide:Wf,useClass:cU},{provide:vR,useFactory:()=>{const e=me(xgt),i=me(ei),t=me(Gg),n=me(FT),r=me(Fg);return t.scrollOffset&&e.setOffset(t.scrollOffset),new vG(r,n,e,i,t)}},n?.preloadingStrategy?Dyt(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?Lyt(n):[],n?.bindToComponentInputs?rd(8,[Jz,{provide:IT,useExisting:Jz}]).\u0275providers:[],n?.enableViewTransitions?Iyt().\u0275providers:[],[{provide:CG,useFactory:yG},{provide:ZM,multi:!0,useExisting:CG}]]}}static forChild(t){return{ngModule:e,providers:[{provide:Hg,multi:!0,useValue:t}]}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(_G,8))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();function Oyt(e){return"guarded"}function Lyt(e){return["disabled"===e.initialNavigation?rd(3,[{provide:QM,multi:!0,useFactory:()=>{const i=me(Fo);return()=>{i.setUpLocationChangeListener()}}},{provide:xR,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?rd(2,[{provide:xR,useValue:0},{provide:QM,multi:!0,deps:[is],useFactory:i=>{const t=i.get(ipt,Promise.resolve());return()=>t.then(()=>new Promise(n=>{const r=i.get(Fo),s=i.get(bG);pG(r,()=>{n(!0)}),i.get(FT).afterPreactivation=()=>(n(!0),s.closed?vi(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const CG=new ee("");class OT{}function yR(e){return e&&"function"==typeof e.connect&&!(e instanceof WI)}var Jd=function(e){return e[e.REPLACED=0]="REPLACED",e[e.INSERTED=1]="INSERTED",e[e.MOVED=2]="MOVED",e[e.REMOVED=3]="REMOVED",e}(Jd||{});const my=new ee("_ViewRepeater");class SG{applyChanges(i,t,n,r,s){i.forEachOperation((o,l,w)=>{let C,M;if(null==o.previousIndex){const P=n(o,l,w);C=t.createEmbeddedView(P.templateRef,P.context,P.index),M=Jd.INSERTED}else null==w?(t.remove(l),M=Jd.REMOVED):(C=t.get(l),t.move(C,w),M=Jd.MOVED);s&&s({context:C?.context,operation:M,record:o})})}detach(){}}class bR{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(i=!1,t,n=!0,r){this._multiple=i,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Pe,t&&t.length&&(i?t.forEach(s=>this._markSelected(s)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...i){this._verifyValueAssignment(i),i.forEach(n=>this._markSelected(n));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...i){this._verifyValueAssignment(i),i.forEach(n=>this._unmarkSelected(n));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...i){this._verifyValueAssignment(i);const t=this.selected,n=new Set(i);i.forEach(s=>this._markSelected(s)),t.filter(s=>!n.has(this._getConcreteValue(s,n))).forEach(s=>this._unmarkSelected(s));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(i){return this.isSelected(i)?this.deselect(i):this.select(i)}clear(i=!0){this._unmarkAll();const t=this._hasQueuedChanges();return i&&this._emitChangeEvent(),t}isSelected(i){return this._selection.has(this._getConcreteValue(i))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(i){this._multiple&&this.selected&&this._selected.sort(i)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(i){i=this._getConcreteValue(i),this.isSelected(i)||(this._multiple||this._unmarkAll(),this.isSelected(i)||this._selection.add(i),this._emitChanges&&this._selectedToEmit.push(i))}_unmarkSelected(i){i=this._getConcreteValue(i),this.isSelected(i)&&(this._selection.delete(i),this._emitChanges&&this._deselectedToEmit.push(i))}_unmarkAll(){this.isEmpty()||this._selection.forEach(i=>this._unmarkSelected(i))}_verifyValueAssignment(i){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(i,t){if(this.compareWith){t=t??this._selection;for(let n of t)if(this.compareWith(i,n))return n;return i}return i}}let wR=(()=>{class e{constructor(){this._listeners=[]}notify(t,n){for(let r of this._listeners)r(t,n)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(n=>t!==n)}}ngOnDestroy(){this._listeners=[]}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ca(e,i){const t="object"==typeof i;return new Promise((n,r)=>{let o,s=!1;e.subscribe({next:l=>{o=l,s=!0},error:r,complete:()=>{s?n(o):t?n(i.defaultValue):r(new Eg)}})})}const _R={now:()=>(_R.delegate||Date).now(),delegate:void 0};class py extends Pe{constructor(i=1/0,t=1/0,n=_R){super(),this._bufferSize=i,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,t)}next(i){const{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:s,_windowTime:o}=this;t||(n.push(i),!r&&n.push(s.now()+o)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(i),{_infiniteTimeWindow:n,_buffer:r}=this,s=r.slice();for(let o=0;o{this.headers=new Map,i.split("\n").forEach(t=>{const n=t.indexOf(":");if(n>0){const r=t.slice(0,n),s=r.toLowerCase(),o=t.slice(n+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((t,n)=>{this.setHeaderEntries(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();const t=this.headers.get(i.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,t){return this.clone({name:i,value:t,op:"a"})}set(i,t){return this.clone({name:i,value:t,op:"s"})}delete(i,t){return this.clone({name:i,value:t,op:"d"})}maybeSetNormalizedName(i,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,i)}init(){this.lazyInit&&(this.lazyInit instanceof Jo?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(t=>{this.headers.set(t,i.headers.get(t)),this.normalizedNames.set(t,i.normalizedNames.get(t))})}clone(i){const t=new Jo;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Jo?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([i]),t}applyUpdate(i){const t=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(i.name,t);const r=("a"===i.op?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":const s=i.value;if(s){let o=this.headers.get(t);if(!o)return;o=o.filter(l=>-1===s.indexOf(l)),0===o.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(i,t){const n=(Array.isArray(t)?t:[t]).map(s=>s.toString()),r=i.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(i,r)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>i(this.normalizedNames.get(t),this.headers.get(t)))}}class Byt{encodeKey(i){return AG(i)}encodeValue(i){return AG(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}}const Uyt=/%(\d[a-f0-9])/gi,zyt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function AG(e){return encodeURIComponent(e).replace(Uyt,(i,t)=>zyt[t]??i)}function BT(e){return`${e}`}class yh{constructor(i={}){if(this.updates=null,this.cloneFrom=null,this.encoder=i.encoder||new Byt,i.fromString){if(i.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function Vyt(e,i){const t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,l]=-1==s?[i.decodeKey(r),""]:[i.decodeKey(r.slice(0,s)),i.decodeValue(r.slice(s+1))],w=t.get(o)||[];w.push(l),t.set(o,w)}),t}(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(t=>{const n=i.fromObject[t],r=Array.isArray(n)?n.map(BT):[BT(n)];this.map.set(t,r)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();const t=this.map.get(i);return t?t[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,t){return this.clone({param:i,value:t,op:"a"})}appendAll(i){const t=[];return Object.keys(i).forEach(n=>{const r=i[n];Array.isArray(r)?r.forEach(s=>{t.push({param:n,value:s,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(i,t){return this.clone({param:i,value:t,op:"s"})}delete(i,t){return this.clone({param:i,value:t,op:"d"})}toString(){return this.init(),this.keys().map(i=>{const t=this.encoder.encodeKey(i);return this.map.get(i).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>""!==i).join("&")}clone(i){const t=new yh({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(i),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":const t=("a"===i.op?this.map.get(i.param):void 0)||[];t.push(BT(i.value)),this.map.set(i.param,t);break;case"d":if(void 0===i.value){this.map.delete(i.param);break}{let n=this.map.get(i.param)||[];const r=n.indexOf(BT(i.value));-1!==r&&n.splice(r,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}}}),this.cloneFrom=this.updates=null)}}class Gyt{constructor(){this.map=new Map}set(i,t){return this.map.set(i,t),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}}function DG(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function MG(e){return typeof Blob<"u"&&e instanceof Blob}function IG(e){return typeof FormData<"u"&&e instanceof FormData}class gy{constructor(i,t,n,r){let s;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=i.toUpperCase(),function Hyt(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,s=r):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new Jo,this.context??=new Gyt,this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{const l=t.indexOf("?");this.urlWithParams=t+(-1===l?"?":lO.set(L,i.setHeaders[L]),C)),i.setParams&&(M=Object.keys(i.setParams).reduce((O,L)=>O.set(L,i.setParams[L]),M)),new gy(t,n,o,{params:M,headers:C,context:P,reportProgress:w,responseType:r,withCredentials:l,transferCache:s})}}var bh=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(bh||{});class TR{constructor(i,t=vy.Ok,n="OK"){this.headers=i.headers||new Jo,this.status=void 0!==i.status?i.status:t,this.statusText=i.statusText||n,this.url=i.url||null,this.ok=this.status>=200&&this.status<300}}class VT extends TR{constructor(i={}){super(i),this.type=bh.ResponseHeader}clone(i={}){return new VT({headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class Yf extends TR{constructor(i={}){super(i),this.type=bh.Response,this.body=void 0!==i.body?i.body:null}clone(i={}){return new Yf({body:void 0!==i.body?i.body:this.body,headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class Wg extends TR{constructor(i){super(i,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${i.url||"(unknown url)"}`:`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}}var vy=function(e){return e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",e}(vy||{});function CR(e,i){return{body:i,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let sd=(()=>{class e{constructor(t){this.handler=t}request(t,n,r={}){let s;if(t instanceof gy)s=t;else{let w,C;w=r.headers instanceof Jo?r.headers:new Jo(r.headers),r.params&&(C=r.params instanceof yh?r.params:new yh({fromObject:r.params})),s=new gy(t,n,void 0!==r.body?r.body:null,{headers:w,context:r.context,params:C,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}const o=vi(s).pipe(Ig(w=>this.handler.handle(w)));if(t instanceof gy||"events"===r.observe)return o;const l=o.pipe(In(w=>w instanceof Yf));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(Di(w=>{if(null!==w.body&&!(w.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return w.body}));case"blob":return l.pipe(Di(w=>{if(null!==w.body&&!(w.body instanceof Blob))throw new Error("Response is not a Blob.");return w.body}));case"text":return l.pipe(Di(w=>{if(null!==w.body&&"string"!=typeof w.body)throw new Error("Response is not a string.");return w.body}));default:return l.pipe(Di(w=>w.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:(new yh).append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,CR(r,n))}post(t,n,r={}){return this.request("POST",t,CR(r,n))}put(t,n,r={}){return this.request("PUT",t,CR(r,n))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(LT))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function kG(e,i){return i(e)}function Qyt(e,i){return(t,n)=>i.intercept(t,{handle:r=>e(r,n)})}const Zyt=new ee(""),xy=new ee(""),PG=new ee(""),FG=new ee("");function Jyt(){let e=null;return(i,t)=>{null===e&&(e=(me(Zyt,{optional:!0})??[]).reduceRight(Qyt,kG));const n=me(ch),r=n.add();return e(i,t).pipe(Rg(()=>n.remove(r)))}}let OG=(()=>{class e extends LT{constructor(t,n){super(),this.backend=t,this.injector=n,this.chain=null,this.pendingTasks=me(ch);const r=me(FG,{optional:!0});this.backend=r??t}handle(t){if(null===this.chain){const r=Array.from(new Set([...this.injector.get(xy),...this.injector.get(PG,[])]));this.chain=r.reduceRight((s,o)=>function Kyt(e,i,t){return(n,r)=>Nc(t,()=>i(n,s=>e(s,r)))}(s,o,this.injector),kG)}const n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Rg(()=>this.pendingTasks.remove(n)))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(NT),Jt(jo))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const nbt=/^\)\]\}',?\n/;let NG=(()=>{class e{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new ue(-2800,!1);const n=this.xhrFactory;return(n.\u0275loadImpl?Is(n.\u0275loadImpl()):vi(null)).pipe(Rs(()=>new ur(s=>{const o=n.build();if(o.open(t.method,t.urlWithParams),t.withCredentials&&(o.withCredentials=!0),t.headers.forEach((X,W)=>o.setRequestHeader(X,W.join(","))),t.headers.has("Accept")||o.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const X=t.detectContentTypeHeader();null!==X&&o.setRequestHeader("Content-Type",X)}if(t.responseType){const X=t.responseType.toLowerCase();o.responseType="json"!==X?X:"text"}const l=t.serializeBody();let w=null;const C=()=>{if(null!==w)return w;const X=o.statusText||"OK",W=new Jo(o.getAllResponseHeaders()),Z=function rbt(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(o)||t.url;return w=new VT({headers:W,status:o.status,statusText:X,url:Z}),w},M=()=>{let{headers:X,status:W,statusText:Z,url:rt}=C(),st=null;W!==vy.NoContent&&(st=typeof o.response>"u"?o.responseText:o.response),0===W&&(W=st?vy.Ok:0);let vt=W>=200&&W<300;if("json"===t.responseType&&"string"==typeof st){const _t=st;st=st.replace(nbt,"");try{st=""!==st?JSON.parse(st):null}catch(Mt){st=_t,vt&&(vt=!1,st={error:Mt,text:st})}}vt?(s.next(new Yf({body:st,headers:X,status:W,statusText:Z,url:rt||void 0})),s.complete()):s.error(new Wg({error:st,headers:X,status:W,statusText:Z,url:rt||void 0}))},P=X=>{const{url:W}=C(),Z=new Wg({error:X,status:o.status||0,statusText:o.statusText||"Unknown Error",url:W||void 0});s.error(Z)};let O=!1;const L=X=>{O||(s.next(C()),O=!0);let W={type:bh.DownloadProgress,loaded:X.loaded};X.lengthComputable&&(W.total=X.total),"text"===t.responseType&&o.responseText&&(W.partialText=o.responseText),s.next(W)},U=X=>{let W={type:bh.UploadProgress,loaded:X.loaded};X.lengthComputable&&(W.total=X.total),s.next(W)};return o.addEventListener("load",M),o.addEventListener("error",P),o.addEventListener("timeout",P),o.addEventListener("abort",P),t.reportProgress&&(o.addEventListener("progress",L),null!==l&&o.upload&&o.upload.addEventListener("progress",U)),o.send(l),s.next({type:bh.Sent}),()=>{o.removeEventListener("error",P),o.removeEventListener("abort",P),o.removeEventListener("load",M),o.removeEventListener("timeout",P),t.reportProgress&&(o.removeEventListener("progress",L),null!==l&&o.upload&&o.upload.removeEventListener("progress",U)),o.readyState!==o.DONE&&o.abort()}})))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(kU))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const AR=new ee(""),BG=new ee("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),VG=new ee("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class UG{}let obt=(()=>{class e{constructor(t,n,r){this.doc=t,this.platform=n,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=yU(t,this.cookieName),this.lastCookieString=t),this.lastToken}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(zd),Jt(BG))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function lbt(e,i){const t=e.url.toLowerCase();if(!me(AR)||"GET"===e.method||"HEAD"===e.method||t.startsWith("http://")||t.startsWith("https://"))return i(e);const n=me(UG).getToken(),r=me(VG);return null!=n&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),i(e)}var wh=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(wh||{});function cbt(...e){const i=[sd,NG,OG,{provide:LT,useExisting:OG},{provide:NT,useExisting:NG},{provide:xy,useValue:lbt,multi:!0},{provide:AR,useValue:!0},{provide:UG,useClass:obt}];for(const t of e)i.push(...t.\u0275providers);return function V0(e){return{\u0275providers:e}}(i)}const zG=new ee("");function dbt(){return function $f(e,i){return{\u0275kind:e,\u0275providers:i}}(wh.LegacyInterceptors,[{provide:zG,useFactory:Jyt},{provide:xy,useExisting:zG,multi:!0}])}let DR,ubt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[cbt(dbt())]})}return e})();try{DR=typeof Intl<"u"&&Intl.v8BreakIterator}catch{DR=!1}let Xg,ir=(()=>{class e{constructor(t){this._platformId=t,this.isBrowser=this._platformId?IU(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!DR)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(zd))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const QG=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function KG(){if(Xg)return Xg;if("object"!=typeof document||!document)return Xg=new Set(QG),Xg;let e=document.createElement("input");return Xg=new Set(QG.filter(i=>(e.setAttribute("type",i),e.type===i))),Xg}let yy;function Cc(e){return function vbt(){if(null==yy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>yy=!0}))}finally{yy=yy||!1}return yy}()?e:!!e.capture}var ad=function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e}(ad||{});let zT,Qf,MR;function ZG(){if(null==Qf){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Qf=!1,Qf;if("scrollBehavior"in document.documentElement.style)Qf=!0;else{const e=Element.prototype.scrollTo;Qf=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return Qf}function by(){if("object"!=typeof document||!document)return ad.NORMAL;if(null==zT){const e=document.createElement("div"),i=e.style;e.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";const t=document.createElement("div"),n=t.style;n.width="2px",n.height="1px",e.appendChild(t),document.body.appendChild(e),zT=ad.NORMAL,0===e.scrollLeft&&(e.scrollLeft=1,zT=0===e.scrollLeft?ad.NEGATED:ad.INVERTED),e.remove()}return zT}function IR(e){if(function xbt(){if(null==MR){const e=typeof document<"u"?document.head:null;MR=!(!e||!e.createShadowRoot&&!e.attachShadow)}return MR}()){const i=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function GT(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){const i=e.shadowRoot.activeElement;if(i===e)break;e=i}return e}function yl(e){return e.composedPath?e.composedPath()[0]:e.target}function RR(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function io(e,...i){return i.length?i.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}class Rbt extends Ie{constructor(i,t){super()}schedule(i,t=0){return this}}const XT={setInterval(e,i,...t){const{delegate:n}=XT;return n?.setInterval?n.setInterval(e,i,...t):setInterval(e,i,...t)},clearInterval(e){const{delegate:i}=XT;return(i?.clearInterval||clearInterval)(e)},delegate:void 0};class PR extends Rbt{constructor(i,t){super(i,t),this.scheduler=i,this.work=t,this.pending=!1}schedule(i,t=0){var n;if(this.closed)return this;this.state=i;const r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this}requestAsyncId(i,t,n=0){return XT.setInterval(i.flush.bind(i,this),n)}recycleAsyncId(i,t,n=0){if(null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&XT.clearInterval(t)}execute(i,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(i,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(i,t){let r,n=!1;try{this.work(i)}catch(s){n=!0,r=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:i,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,pi(n,this),null!=i&&(this.id=this.recycleAsyncId(t,i,null)),this.delay=null,super.unsubscribe()}}}class _y{constructor(i,t=_y.now){this.schedulerActionCtor=i,this.now=t}schedule(i,t=0,n){return new this.schedulerActionCtor(this,i).schedule(n,t)}}_y.now=_R.now;class FR extends _y{constructor(i,t=_y.now){super(i,t),this.actions=[],this._active=!1}flush(i){const{actions:t}=this;if(this._active)return void t.push(i);let n;this._active=!0;do{if(n=i.execute(i.state,i.delay))break}while(i=t.shift());if(this._active=!1,n){for(;i=t.shift();)i.unsubscribe();throw n}}}const Ty=new FR(PR),kbt=Ty;function tu(e,i=Ty){return ds((t,n)=>{let r=null,s=null,o=null;const l=()=>{if(r){r.unsubscribe(),r=null;const C=s;s=null,n.next(C)}};function w(){const C=o+e,M=i.now();if(M{s=C,o=i.now(),r||(r=i.schedule(w,e),n.add(r))},()=>{l(),n.complete()},void 0,()=>{s=r=null}))})}function OR(e){return In((i,t)=>e<=t)}function eu(e,i=Ju){return e=e??Pbt,ds((t,n)=>{let r,s=!0;t.subscribe(Xr(n,o=>{const l=i(o);(s||!e(r,l))&&(s=!1,r=l,n.next(o))}))})}function Pbt(e,i){return e===i}function la(e){return null!=e&&"false"!=`${e}`}function Ch(e,i=0){return qG(e)?Number(e):i}function qG(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Cy(e){return Array.isArray(e)?e:[e]}function js(e){return null==e?"":"string"==typeof e?e:`${e}px`}function vs(e){return e instanceof ri?e.nativeElement:e}let tH=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Obt=(()=>{class e{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,n)=>this._cleanupObserver(n))}observe(t){const n=vs(t);return new ur(r=>{const o=this._observeElement(n).subscribe(r);return()=>{o.unsubscribe(),this._unobserveElement(n)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const n=new Pe,r=this._mutationObserverFactory.create(s=>n.next(s));r&&r.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:r,stream:n,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:n,stream:r}=this._observedElements.get(t);n&&n.disconnect(),r.complete(),this._observedElements.delete(t)}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(tH))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eH=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Ch(t),this._subscribe()}constructor(t,n,r){this._contentObserver=t,this._elementRef=n,this._ngZone=r,this.event=new De,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(tu(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Obt),mt(ri),mt(ei))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[Wt.HasDecoratorInputTransform,"cdkObserveContentDisabled","disabled",Je],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[on]})}return e})(),LR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[tH]})}return e})();const iH=new Set;let Kf,Lbt=(()=>{class e{constructor(t,n){this._platform=t,this._nonce=n,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Bbt}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function Nbt(e,i){if(!iH.has(e))try{Kf||(Kf=document.createElement("style"),i&&Kf.setAttribute("nonce",i),Kf.setAttribute("type","text/css"),document.head.appendChild(Kf)),Kf.sheet&&(Kf.sheet.insertRule(`@media ${e} {body{ }}`,0),iH.add(e))}catch(t){console.error(t)}}(t,this._nonce),this._matchMedia(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(e2,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Bbt(e){return{matches:"all"===e||""===e,media:e,addListener:()=>{},removeListener:()=>{}}}let nH=(()=>{class e{constructor(t,n){this._mediaMatcher=t,this._zone=n,this._queries=new Map,this._destroySubject=new Pe}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return rH(Cy(t)).some(r=>this._registerQuery(r).mql.matches)}observe(t){let s=Zd(rH(Cy(t)).map(o=>this._registerQuery(o).observable));return s=ty(s.pipe(er(1)),s.pipe(OR(1),tu(0))),s.pipe(Di(o=>{const l={matches:!1,breakpoints:{}};return o.forEach(({matches:w,query:C})=>{l.matches=l.matches||w,l.breakpoints[C]=w}),l}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const n=this._mediaMatcher.matchMedia(t),s={observable:new ur(o=>{const l=w=>this._zone.run(()=>o.next(w));return n.addListener(l),()=>{n.removeListener(l)}}).pipe(Ta(n),Di(({matches:o})=>({query:t,matches:o})),Ui(this._destroySubject)),mql:n};return this._queries.set(t,s),s}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Lbt),Jt(ei))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function rH(e){return e.map(i=>i.split(",")).reduce((i,t)=>i.concat(t)).map(i=>i.trim())}function jT(e,i,t){const n=YT(e,i);t=t.trim(),!n.some(r=>r.trim()===t)&&(n.push(t),e.setAttribute(i,n.join(" ")))}function Yg(e,i,t){const n=YT(e,i);t=t.trim();const r=n.filter(s=>s!==t);r.length?e.setAttribute(i,r.join(" ")):e.removeAttribute(i)}function YT(e,i){return e.getAttribute(i)?.match(/\S+/g)??[]}const aH="cdk-describedby-message",$T="cdk-describedby-host";let NR=0,oH=(()=>{class e{constructor(t,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+NR++,this._document=t,this._id=me(ix)+"-"+NR++}describe(t,n,r){if(!this._canBeDescribed(t,n))return;const s=BR(n,r);"string"!=typeof n?(lH(n,this._id),this._messageRegistry.set(s,{messageElement:n,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(n,r),this._isElementDescribedByMessage(t,s)||this._addMessageReference(t,s)}removeDescription(t,n,r){if(!n||!this._isElementNode(t))return;const s=BR(n,r);if(this._isElementDescribedByMessage(t,s)&&this._removeMessageReference(t,s),"string"==typeof n){const o=this._messageRegistry.get(s);o&&0===o.referenceCount&&this._deleteMessageElement(s)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const t=this._document.querySelectorAll(`[${$T}="${this._id}"]`);for(let n=0;n0!=r.indexOf(aH));t.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(t,n){const r=this._messageRegistry.get(n);jT(t,"aria-describedby",r.messageElement.id),t.setAttribute($T,this._id),r.referenceCount++}_removeMessageReference(t,n){const r=this._messageRegistry.get(n);r.referenceCount--,Yg(t,"aria-describedby",r.messageElement.id),t.removeAttribute($T)}_isElementDescribedByMessage(t,n){const r=YT(t,"aria-describedby"),s=this._messageRegistry.get(n),o=s&&s.messageElement.id;return!!o&&-1!=r.indexOf(o)}_canBeDescribed(t,n){if(!this._isElementNode(t))return!1;if(n&&"object"==typeof n)return!0;const r=null==n?"":`${n}`.trim(),s=t.getAttribute("aria-label");return!(!r||s&&s.trim()===r)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ir))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function BR(e,i){return"string"==typeof e?`${i||""}/${e}`:e}function lH(e,i){e.id||(e.id=`${aH}-${i}-${NR++}`)}class cH{constructor(i,t){this._items=i,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Pe,this._typeaheadSubscription=Ie.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=n=>n.disabled,this._pressedLetters=[],this.tabOut=new Pe,this.change=new Pe,i instanceof nh?this._itemChangesSubscription=i.changes.subscribe(n=>this._itemsChanged(n.toArray())):b_(i)&&(this._effectRef=function sU(e,i){jc("NgSignals"),!i?.injector&&Sw();const t=i?.injector??me(is),n=!0!==i?.manualCleanup?t.get(jp):null,r=new Jmt(t.get(Qmt),e,typeof Zone>"u"?null:Zone.current,n,t,i?.allowSignalWrites??!1),s=t.get(Mn,null,{optional:!0});return s&&8&s._lView[Fi]?(s._lView[Aw]??=[]).push(r.watcher.notify):r.watcher.notify(),r}(()=>this._itemsChanged(i()),{injector:t}))}skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(hs(t=>this._pressedLetters.push(t)),tu(i),In(()=>this._pressedLetters.length>0),Di(()=>this._pressedLetters.join(""))).subscribe(t=>{const n=this._getItemsArray();for(let r=1;r!i[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex+this._pageUpAndDown.delta,o=this._getItemsArray().length;this._setActiveItemByIndex(s=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],i.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(i){const t=this._getItemsArray(),n="number"==typeof i?i:t.indexOf(i);this._activeItem=t[n]??null,this._activeItemIndex=n}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(i){this._wrap?this._setActiveInWrapMode(i):this._setActiveInDefaultMode(i)}_setActiveInWrapMode(i){const t=this._getItemsArray();for(let n=1;n<=t.length;n++){const r=(this._activeItemIndex+i*n+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(i){this._setActiveItemByIndex(this._activeItemIndex+i,i)}_setActiveItemByIndex(i,t){const n=this._getItemsArray();if(n[i]){for(;this._skipPredicateFn(n[i]);)if(!n[i+=t])return;this.setActiveItem(i)}}_getItemsArray(){return b_(this._items)?this._items():this._items instanceof nh?this._items.toArray():this._items}_itemsChanged(i){if(this._activeItem){const t=i.indexOf(this._activeItem);t>-1&&t!==this._activeItemIndex&&(this._activeItemIndex=t)}}}class dH extends cH{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}}class VR extends cH{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}}let QT=(()=>{class e{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function zbt(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const n=function Ubt(e){try{return e.frameElement}catch{return null}}(function Qbt(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}(t));if(n&&(-1===hH(n)||!this.isVisible(n)))return!1;let r=t.nodeName.toLowerCase(),s=hH(t);return t.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function Ybt(e){let i=e.nodeName.toLowerCase(),t="input"===i&&e.type;return"text"===t||"password"===t||"select"===i||"textarea"===i}(t))&&("audio"===r?!!t.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,n){return function $bt(e){return!function Hbt(e){return function Xbt(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function Gbt(e){let i=e.nodeName.toLowerCase();return"input"===i||"select"===i||"button"===i||"textarea"===i}(e)||function Wbt(e){return function jbt(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||uH(e))}(t)&&!this.isDisabled(t)&&(n?.ignoreVisibility||this.isVisible(t))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uH(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;let i=e.getAttribute("tabindex");return!(!i||isNaN(parseInt(i,10)))}function hH(e){if(!uH(e))return null;const i=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}class fH{get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}constructor(i,t,n,r,s=!1){this._element=i,this._checker=t,this._ngZone=n,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}destroy(){const i=this._startAnchor,t=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){const t=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return"start"==i?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const n=this._getFirstTabbableElement(t);return n?.focus(i),!!n}return t.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){const t=this._getRegionBoundary("start");return t&&t.focus(i),!!t}focusLastTabbableElement(i){const t=this._getRegionBoundary("end");return t&&t.focus(i),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;const t=i.children;for(let n=0;n=0;n--){const r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){const i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,t){i?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._ngZone.isStable?i():this._ngZone.onStable.pipe(er(1)).subscribe(i)}}let UR=(()=>{class e{constructor(t,n,r){this._checker=t,this._ngZone=n,this._document=r}create(t,n=!1){return new fH(t,this._checker,this._ngZone,this._document,n)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(QT),Jt(ei),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function KT(e){return 0===e.buttons||0===e.detail}function ZT(e){const i=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!(!i||-1!==i.identifier||null!=i.radiusX&&1!==i.radiusX||null!=i.radiusY&&1!==i.radiusY)}const Kbt=new ee("cdk-input-modality-detector-options"),Zbt={ignoreKeys:[18,17,224,91,16]},$g=Cc({passive:!0,capture:!0});let Jbt=(()=>{class e{get mostRecentModality(){return this._modality.value}constructor(t,n,r,s){this._platform=t,this._mostRecentTarget=null,this._modality=new Wr(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(l=>l===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=yl(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(KT(o)?"keyboard":"mouse"),this._mostRecentTarget=yl(o))},this._onTouchstart=o=>{ZT(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=yl(o))},this._options={...Zbt,...s},this.modalityDetected=this._modality.pipe(OR(1)),this.modalityChanged=this.modalityDetected.pipe(eu()),t.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,$g),r.addEventListener("mousedown",this._onMousedown,$g),r.addEventListener("touchstart",this._onTouchstart,$g)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,$g),document.removeEventListener("mousedown",this._onMousedown,$g),document.removeEventListener("touchstart",this._onTouchstart,$g))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(ei),Jt(Ni),Jt(Kbt,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const qbt=new ee("liveAnnouncerElement",{providedIn:"root",factory:function t1t(){return null}}),e1t=new ee("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let i1t=0,pH=(()=>{class e{constructor(t,n,r,s){this._ngZone=n,this._defaultOptions=s,this._document=r,this._liveElement=t||this._createLiveElement()}announce(t,...n){const r=this._defaultOptions;let s,o;return 1===n.length&&"number"==typeof n[0]?o=n[0]:[s,o]=n,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(l=>this._currentResolve=l)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",n=this._document.getElementsByClassName(t),r=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class e{constructor(t,n,r,s,o){this._ngZone=t,this._platform=n,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Pe,this._rootNodeFocusAndBlurListener=l=>{for(let C=yl(l);C;C=C.parentElement)"focus"===l.type?this._onFocus(l,C):this._onBlur(l,C)},this._document=s,this._detectionMode=o?.detectionMode||JT.IMMEDIATE}monitor(t,n=!1){const r=vs(t);if(!this._platform.isBrowser||1!==r.nodeType)return vi();const s=IR(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return n&&(o.checkChildren=!0),o.subject;const l={checkChildren:n,subject:new Pe,rootNode:s};return this._elementInfo.set(r,l),this._registerGlobalListeners(l),l.subject}stopMonitoring(t){const n=vs(t),r=this._elementInfo.get(n);r&&(r.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(r))}focusVia(t,n,r){const s=vs(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([l,w])=>this._originChanged(l,n,w)):(this._setOrigin(n),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,n)=>this.stopMonitoring(n))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===JT.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,n){t.classList.toggle("cdk-focused",!!n),t.classList.toggle("cdk-touch-focused","touch"===n),t.classList.toggle("cdk-keyboard-focused","keyboard"===n),t.classList.toggle("cdk-mouse-focused","mouse"===n),t.classList.toggle("cdk-program-focused","program"===n)}_setOrigin(t,n=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&n,this._detectionMode===JT.IMMEDIATE&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,n){const r=this._elementInfo.get(n),s=yl(t);!r||!r.checkChildren&&n!==s||this._originChanged(n,this._getFocusOrigin(s),r)}_onBlur(t,n){const r=this._elementInfo.get(n);!r||r.checkChildren&&t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(this._setClasses(n),this._emitOrigin(r,null))}_emitOrigin(t,n){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(n))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const n=t.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,qT),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,qT)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ui(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(t){const n=t.rootNode;if(this._rootNodeFocusListenerCount.has(n)){const r=this._rootNodeFocusListenerCount.get(n);r>1?this._rootNodeFocusListenerCount.set(n,r-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,qT),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,qT),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,n,r){this._setClasses(t,n),this._emitOrigin(r,n),this._lastFocusOrigin=n}_getClosestElementsInfo(t){const n=[];return this._elementInfo.forEach((r,s)=>{(s===t||r.checkChildren&&s.contains(t))&&n.push([s,r])}),n}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:n,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!n||n===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const s=t.labels;if(s)for(let o=0;o{class e{constructor(t,n){this._elementRef=t,this._focusMonitor=n,this._focusOrigin=null,this.cdkFocusChange=new De}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){const t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(n=>{this._focusOrigin=n,this.cdkFocusChange.emit(n)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Ul))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"],standalone:!0})}return e})();var Zf=function(e){return e[e.NONE=0]="NONE",e[e.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",e[e.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",e}(Zf||{});const gH="cdk-high-contrast-black-on-white",vH="cdk-high-contrast-white-on-black",zR="cdk-high-contrast-active";let xH=(()=>{class e{constructor(t,n){this._platform=t,this._document=n,this._breakpointSubscription=me(nH).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Zf.NONE;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const n=this._document.defaultView||window,r=n&&n.getComputedStyle?n.getComputedStyle(t):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Zf.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Zf.BLACK_ON_WHITE}return Zf.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(zR,gH,vH),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();n===Zf.BLACK_ON_WHITE?t.add(zR,gH):n===Zf.WHITE_ON_BLACK&&t.add(zR,vH)}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),yH=(()=>{class e{constructor(t){t._applyBodyHighContrastModeCssClasses()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xH))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[LR]})}return e})();const s1t=new ee("cdk-dir-doc",{providedIn:"root",factory:function a1t(){return me(Ni)}}),o1t=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ba=(()=>{class e{constructor(t){this.value="ltr",this.change=new De,t&&(this.value=function l1t(e){const i=e?.toLowerCase()||"";return"auto"===i&&typeof navigator<"u"&&navigator?.language?o1t.test(navigator.language)?"rtl":"ltr":"rtl"===i?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(s1t,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Sy=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const c1t=["text"],d1t=[[["mat-icon"]],"*"],u1t=["mat-icon","*"];function h1t(e,i){if(1&e&&we(0,"mat-pseudo-checkbox",1),2&e){const t=Ct();yt("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function f1t(e,i){1&e&&we(0,"mat-pseudo-checkbox",3),2&e&&yt("disabled",Ct().disabled)}function m1t(e,i){if(1&e&&(tt(0,"span",4),ut(1),et()),2&e){const t=Ct();lt(),Ye("(",t.group.label,")")}}const p1t=["mat-internal-form-field",""],g1t=["*"];let v1t=(()=>{class e{static#t=this.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)";static#e=this.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)";static#i=this.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)";static#n=this.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)"}return e})(),x1t=(()=>{class e{static#t=this.COMPLEX="375ms";static#e=this.ENTERING="225ms";static#i=this.EXITING="195ms"}return e})();const b1t=new ee("mat-sanity-checks",{providedIn:"root",factory:function y1t(){return!0}});let Ki=(()=>{class e{constructor(t,n,r){this._sanityChecks=n,this._document=r,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!RR()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xH),Jt(b1t,8),Jt(Ni))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Sy,Sy]})}return e})();class GR{constructor(i,t,n,r,s){this._defaultMatcher=i,this.ngControl=t,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=s,this.errorState=!1}updateErrorState(){const i=this.errorState,t=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,s=n?.isErrorState(r,t)??!1;s!==i&&(this.errorState=s,this._stateChanges.next())}}let _H=(()=>{class e{isErrorState(t,n){return!!(t&&t.invalid&&(t.touched||n&&n.submitted))}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var zl=function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e}(zl||{});class E1t{constructor(i,t,n,r=!1){this._renderer=i,this.element=t,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=zl.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const TH=Cc({passive:!0,capture:!0});class A1t{constructor(){this._events=new Map,this._delegateEventHandler=i=>{const t=yl(i);t&&this._events.get(i.type)?.forEach((n,r)=>{(r===t||r.contains(t))&&n.forEach(s=>s.handleEvent(i))})}}addHandler(i,t,n,r){const s=this._events.get(t);if(s){const o=s.get(n);o?o.add(r):s.set(n,new Set([r]))}else this._events.set(t,new Map([[n,new Set([r])]])),i.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,TH)})}removeHandler(i,t,n){const r=this._events.get(i);if(!r)return;const s=r.get(t);s&&(s.delete(n),0===s.size&&r.delete(t),0===r.size&&(this._events.delete(i),document.removeEventListener(i,this._delegateEventHandler,TH)))}}const CH={enterDuration:225,exitDuration:150},SH=Cc({passive:!0,capture:!0}),EH=["mousedown","touchstart"],AH=["mouseup","mouseleave","touchend","touchcancel"];class Ay{static#t=this._eventManager=new A1t;constructor(i,t,n,r){this._target=i,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=vs(n))}fadeInRipple(i,t,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...CH,...n.animation};n.centered&&(i=r.left+r.width/2,t=r.top+r.height/2);const o=n.radius||function M1t(e,i,t){const n=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),r=Math.max(Math.abs(i-t.top),Math.abs(i-t.bottom));return Math.sqrt(n*n+r*r)}(i,t,r),l=i-r.left,w=t-r.top,C=s.enterDuration,M=document.createElement("div");M.classList.add("mat-ripple-element"),M.style.left=l-o+"px",M.style.top=w-o+"px",M.style.height=2*o+"px",M.style.width=2*o+"px",null!=n.color&&(M.style.backgroundColor=n.color),M.style.transitionDuration=`${C}ms`,this._containerElement.appendChild(M);const P=window.getComputedStyle(M),L=P.transitionDuration,U="none"===P.transitionProperty||"0s"===L||"0s, 0s"===L||0===r.width&&0===r.height,X=new E1t(this,M,n,U);M.style.transform="scale3d(1, 1, 1)",X.state=zl.FADING_IN,n.persistent||(this._mostRecentTransientRipple=X);let W=null;return!U&&(C||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const Z=()=>this._finishRippleTransition(X),rt=()=>this._destroyRipple(X);M.addEventListener("transitionend",Z),M.addEventListener("transitioncancel",rt),W={onTransitionEnd:Z,onTransitionCancel:rt}}),this._activeRipples.set(X,W),(U||!C)&&this._finishRippleTransition(X),X}fadeOutRipple(i){if(i.state===zl.FADING_OUT||i.state===zl.HIDDEN)return;const t=i.element,n={...CH,...i.config.animation};t.style.transitionDuration=`${n.exitDuration}ms`,t.style.opacity="0",i.state=zl.FADING_OUT,(i._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(i)}fadeOutAll(){this._getActiveRipples().forEach(i=>i.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(i=>{i.config.persistent||i.fadeOut()})}setupTriggerEvents(i){const t=vs(i);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,EH.forEach(n=>{Ay._eventManager.addHandler(this._ngZone,n,t,this)}))}handleEvent(i){"mousedown"===i.type?this._onMousedown(i):"touchstart"===i.type?this._onTouchStart(i):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{AH.forEach(t=>{this._triggerElement.addEventListener(t,this,SH)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(i){i.state===zl.FADING_IN?this._startFadeOutTransition(i):i.state===zl.FADING_OUT&&this._destroyRipple(i)}_startFadeOutTransition(i){const t=i===this._mostRecentTransientRipple,{persistent:n}=i.config;i.state=zl.VISIBLE,!n&&(!t||!this._isPointerDown)&&i.fadeOut()}_destroyRipple(i){const t=this._activeRipples.get(i)??null;this._activeRipples.delete(i),this._activeRipples.size||(this._containerRect=null),i===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),i.state=zl.HIDDEN,null!==t&&(i.element.removeEventListener("transitionend",t.onTransitionEnd),i.element.removeEventListener("transitioncancel",t.onTransitionCancel)),i.element.remove()}_onMousedown(i){const t=KT(i),n=this._lastTouchStartEvent&&Date.now(){!i.config.persistent&&(i.state===zl.VISIBLE||i.config.terminateOnPointerUp&&i.state===zl.FADING_IN)&&i.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const i=this._triggerElement;i&&(EH.forEach(t=>Ay._eventManager.removeHandler(t,i,this)),this._pointerUpEventsRegistered&&AH.forEach(t=>i.removeEventListener(t,this,SH)))}}const tC=new ee("mat-ripple-global-options");let iu=(()=>{class e{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,n,r,s,o){this._elementRef=t,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new Ay(this,n,t,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,n=0,r){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,n,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ei),mt(ir),mt(tC,8),mt(Nr,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-ripple-unbounded",r.unbounded)},inputs:{color:[Wt.None,"matRippleColor","color"],unbounded:[Wt.None,"matRippleUnbounded","unbounded"],centered:[Wt.None,"matRippleCentered","centered"],radius:[Wt.None,"matRippleRadius","radius"],animation:[Wt.None,"matRippleAnimation","animation"],disabled:[Wt.None,"matRippleDisabled","disabled"],trigger:[Wt.None,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}return e})(),Qg=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})(),I1t=(()=>{class e{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(n,r){2&n&&bi("mat-pseudo-checkbox-indeterminate","indeterminate"===r.state)("mat-pseudo-checkbox-checked","checked"===r.state)("mat-pseudo-checkbox-disabled",r.disabled)("mat-pseudo-checkbox-minimal","minimal"===r.appearance)("mat-pseudo-checkbox-full","full"===r.appearance)("_mat-animation-noopable","NoopAnimations"===r._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[Vi],decls:0,vars:0,template:function(n,r){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}return e})(),DH=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki]})}return e})();const HR=new ee("MAT_OPTION_PARENT_COMPONENT"),WR=new ee("MatOptgroup");let R1t=0;class MH{constructor(i,t=!1){this.source=i,this.isUserInput=t}}let nu=(()=>{class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=t}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(t,n,r,s){this._element=t,this._changeDetectorRef=n,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+R1t++,this.onSelectionChange=new De,this._stateChanges=new Pe}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(t=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}deselect(t=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}focus(t,n){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(n)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(13===t.keyCode||32===t.keyCode)&&!io(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new MH(this,t))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Mn),mt(HR,8),mt(WR,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-option"]],viewQuery:function(n,r){if(1&n&&Mi(c1t,7),2&n){let s;Be(s=Ve())&&(r._text=s.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(n,r){1&n&&Vt("click",function(){return r._selectViaInteraction()})("keydown",function(o){return r._handleKeydown(o)}),2&n&&(Kc("id",r.id),Ti("aria-selected",r.selected)("aria-disabled",r.disabled.toString()),bi("mdc-list-item--selected",r.selected)("mat-mdc-option-multiple",r.multiple)("mat-mdc-option-active",r.active)("mdc-list-item--disabled",r.disabled))},inputs:{value:"value",id:"id",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[on,Vi],ngContentSelectors:u1t,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(n,r){1&n&&(Kn(d1t),Gt(0,h1t,1,2,"mat-pseudo-checkbox",1),xi(1),tt(2,"span",2,0),xi(4,1),et(),Gt(5,f1t,1,1,"mat-pseudo-checkbox",3)(6,m1t,2,1,"span",4),we(7,"div",5)),2&n&&(xn(0,r.multiple?0:-1),lt(5),xn(5,r.multiple||!r.selected||r.hideSingleSelectionIndicator?-1:5),lt(),xn(6,r.group&&r.group._inert?6:-1),lt(),yt("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disabled||r.disableRipple))},dependencies:[I1t,iu],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color);font-family:var(--mat-option-label-text-font);line-height:var(--mat-option-label-text-line-height);font-size:var(--mat-option-label-text-size);letter-spacing:var(--mat-option-label-text-tracking);font-weight:var(--mat-option-label-text-weight);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color)}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return e})();function IH(e,i,t){if(t.length){let n=i.toArray(),r=t.toArray(),s=0;for(let o=0;ot+n?Math.max(0,e-n+i):t}let eC=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Qg,Ki,DH]})}return e})();const kH={capture:!0},PH=["focus","click","mouseenter","touchstart"],XR="mat-ripple-loader-uninitialized",jR="mat-ripple-loader-class-name",FH="mat-ripple-loader-centered",iC="mat-ripple-loader-disabled";let k1t=(()=>{class e{constructor(){this._document=me(Ni,{optional:!0}),this._animationMode=me(Nr,{optional:!0}),this._globalRippleOptions=me(tC,{optional:!0}),this._platform=me(ir),this._ngZone=me(ei),this._hosts=new Map,this._onInteraction=t=>{if(!(t.target instanceof HTMLElement))return;const r=t.target.closest(`[${XR}]`);r&&this._createRipple(r)},this._ngZone.runOutsideAngular(()=>{for(const t of PH)this._document?.addEventListener(t,this._onInteraction,kH)})}ngOnDestroy(){const t=this._hosts.keys();for(const n of t)this.destroyRipple(n);for(const n of PH)this._document?.removeEventListener(n,this._onInteraction,kH)}configureRipple(t,n){t.setAttribute(XR,""),(n.className||!t.hasAttribute(jR))&&t.setAttribute(jR,n.className||""),n.centered&&t.setAttribute(FH,""),n.disabled&&t.setAttribute(iC,"")}getRipple(t){return this._hosts.get(t)||this._createRipple(t)}setDisabled(t,n){const r=this._hosts.get(t);r?r.disabled=n:n?t.setAttribute(iC,""):t.removeAttribute(iC)}_createRipple(t){if(!this._document)return;const n=this._hosts.get(t);if(n)return n;t.querySelector(".mat-ripple")?.remove();const r=this._document.createElement("span");r.classList.add("mat-ripple",t.getAttribute(jR)),t.append(r);const s=new iu(new ri(r),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return s._isInitialized=!0,s.trigger=t,s.centered=t.hasAttribute(FH),s.disabled=t.hasAttribute(iC),this.attachRipple(t,s),s}attachRipple(t,n){t.removeAttribute(XR),this._hosts.set(t,n)}destroyRipple(t){const n=this._hosts.get(t);n&&(n.ngOnDestroy(),this._hosts.delete(t))}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),YR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-form-field--align-end","before"===r.labelPosition)},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[Vi],attrs:p1t,ngContentSelectors:g1t,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},styles:[".mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-form-field{font-family:var(--mdc-form-field-label-text-font);line-height:var(--mdc-form-field-label-text-line-height);font-size:var(--mdc-form-field-label-text-size);font-weight:var(--mdc-form-field-label-text-weight);letter-spacing:var(--mdc-form-field-label-text-tracking);color:var(--mdc-form-field-label-text-color)}.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}"],encapsulation:2,changeDetection:0})}return e})();const OH=["mat-button",""],LH=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],NH=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],BH=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",F1t=["mat-icon-button",""],O1t=["*"],L1t=new ee("MAT_BUTTON_CONFIG"),N1t=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}];let $R=(()=>{class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(t){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,t)}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}constructor(t,n,r,s){this._elementRef=t,this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=me(Ul),this._rippleLoader=me(k1t),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;const o=me(L1t,{optional:!0}),l=t.nativeElement,w=l.classList;this.disabledInteractive=o?.disabledInteractive??!1,this._rippleLoader?.configureRipple(l,{className:"mat-mdc-button-ripple"});for(const{attribute:C,mdcClasses:M}of N1t)l.hasAttribute(C)&&w.add(...M)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",n){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,n):this._elementRef.nativeElement.focus(n)}_getAriaDisabled(){return null!=this.ariaDisabled?this.ariaDisabled:!(!this.disabled||!this.disabledInteractive)||null}_getDisabledAttribute(){return!(this.disabledInteractive||!this.disabled)||null}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static#t=this.\u0275fac=function(n){a_()};static#e=this.\u0275dir=ce({type:e,inputs:{color:"color",disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],ariaDisabled:[Wt.HasDecoratorInputTransform,"aria-disabled","ariaDisabled",Je],disabledInteractive:[Wt.HasDecoratorInputTransform,"disabledInteractive","disabledInteractive",Je]},features:[on]})}return e})(),B1t=(()=>{class e extends $R{constructor(t,n,r,s){super(t,n,r,s),this._haltDisabledEvents=o=>{this.disabled&&(o.preventDefault(),o.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}_getAriaDisabled(){return null==this.ariaDisabled?this.disabled:this.ariaDisabled}static#t=this.\u0275fac=function(n){a_()};static#e=this.\u0275dir=ce({type:e,inputs:{tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?void 0:jr(t)]},features:[on,hi]})}return e})(),Sa=(()=>{class e extends $R{constructor(t,n,r,s){super(t,n,r,s)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ir),mt(ei),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(n,r){2&n&&(Ti("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[hi,Vi],attrs:OH,ngContentSelectors:NH,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(Kn(LH),we(0,"span",0),xi(1),tt(2,"span",1),xi(3,1),et(),xi(4,2),we(5,"span",2)(6,"span",3)),2&n&&bi("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px);display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);font-weight:var(--mdc-text-button-label-text-weight);text-transform:var(--mdc-text-button-label-text-transform);height:var(--mdc-text-button-container-height);border-radius:var(--mdc-text-button-container-shape);padding:0 var(--mat-text-button-horizontal-padding, 8px)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);font-weight:var(--mdc-filled-button-label-text-weight);text-transform:var(--mdc-filled-button-label-text-transform);height:var(--mdc-filled-button-container-height);border-radius:var(--mdc-filled-button-container-shape);padding:0 var(--mat-filled-button-horizontal-padding, 16px)}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color)}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);font-weight:var(--mdc-protected-button-label-text-weight);text-transform:var(--mdc-protected-button-label-text-transform);height:var(--mdc-protected-button-container-height);border-radius:var(--mdc-protected-button-container-shape);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow)}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color)}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);font-weight:var(--mdc-outlined-button-label-text-weight);text-transform:var(--mdc-outlined-button-label-text-transform);height:var(--mdc-outlined-button-container-height);border-radius:var(--mdc-outlined-button-container-shape);padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width);padding:0 var(--mat-outlined-button-horizontal-padding, 15px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color)}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape)}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width))}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button-base{text-decoration:none}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),V1t=(()=>{class e extends B1t{constructor(t,n,r,s){super(t,n,r,s)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ir),mt(ei),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:15,hostBindings:function(n,r){2&n&&(Ti("disabled",r._getDisabledAttribute())("tabindex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("aria-disabled",r._getDisabledAttribute()),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton","matAnchor"],standalone:!0,features:[hi,Vi],attrs:OH,ngContentSelectors:NH,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(Kn(LH),we(0,"span",0),xi(1),tt(2,"span",1),xi(3,1),et(),xi(4,2),we(5,"span",2)(6,"span",3)),2&n&&bi("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px);display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);font-weight:var(--mdc-text-button-label-text-weight);text-transform:var(--mdc-text-button-label-text-transform);height:var(--mdc-text-button-container-height);border-radius:var(--mdc-text-button-container-shape);padding:0 var(--mat-text-button-horizontal-padding, 8px)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);font-weight:var(--mdc-filled-button-label-text-weight);text-transform:var(--mdc-filled-button-label-text-transform);height:var(--mdc-filled-button-container-height);border-radius:var(--mdc-filled-button-container-shape);padding:0 var(--mat-filled-button-horizontal-padding, 16px)}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color)}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);font-weight:var(--mdc-protected-button-label-text-weight);text-transform:var(--mdc-protected-button-label-text-transform);height:var(--mdc-protected-button-container-height);border-radius:var(--mdc-protected-button-container-shape);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow)}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color)}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);font-weight:var(--mdc-outlined-button-label-text-weight);text-transform:var(--mdc-outlined-button-label-text-transform);height:var(--mdc-outlined-button-container-height);border-radius:var(--mdc-outlined-button-container-shape);padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width);padding:0 var(--mat-outlined-button-horizontal-padding, 15px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color)}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape)}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width))}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button-base{text-decoration:none}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',BH],encapsulation:2,changeDetection:0})}return e})(),Oo=(()=>{class e extends $R{constructor(t,n,r,s){super(t,n,r,s),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ir),mt(ei),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(n,r){2&n&&(Ti("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[hi,Vi],attrs:F1t,ngContentSelectors:O1t,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(Kn(),we(0,"span",0),xi(1),we(2,"span",1)(3,"span",2))},styles:['.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{color:var(--mdc-icon-button-icon-color)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button{border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',BH],encapsulation:2,changeDetection:0})}return e})(),QR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Qg,Ki]})}return e})();var Zi=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(Zi||{});const ru="*";function mr(e,i){return{type:Zi.Trigger,name:e,definitions:i,options:{}}}function an(e,i=null){return{type:Zi.Animate,styles:i,timings:e}}function KR(e,i=null){return{type:Zi.Group,steps:e,options:i}}function si(e){return{type:Zi.Style,styles:e,offset:null}}function Nn(e,i,t){return{type:Zi.State,name:e,styles:i,options:t}}function Kg(e){return{type:Zi.Keyframes,steps:e}}function ln(e,i,t=null){return{type:Zi.Transition,expr:e,animation:i,options:t}}function nC(e=null){return{type:Zi.AnimateChild,options:e}}function rC(e,i,t=null){return{type:Zi.Query,selector:e,animation:i,options:t}}class Dy{constructor(i=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=i+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){const t="start"==i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class VH{constructor(i){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=i;let t=0,n=0,r=0;const s=this.players.length;0==s?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==s&&this._onFinish()}),o.onDestroy(()=>{++n==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){const t=i*this.totalTime;this.players.forEach(n=>{const r=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(r)})}getPosition(){const i=this.players.reduce((t,n)=>null===t||n.totalTime>t.totalTime?n:t,null);return null!=i?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){const t="start"==i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class JR{attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;null!=i&&(this._attachedHost=null,i.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(i){this._attachedHost=i}}class Zg extends JR{constructor(i,t,n,r,s){super(),this.component=i,this.viewContainerRef=t,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class su extends JR{constructor(i,t,n,r){super(),this.templateRef=i,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(i,t=this.context){return this.context=t,super.attach(i)}detach(){return this.context=void 0,super.detach()}}class j1t extends JR{constructor(i){super(),this.element=i instanceof ri?i.nativeElement:i}}class sC{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(i){return i instanceof Zg?(this._attachedPortal=i,this.attachComponentPortal(i)):i instanceof su?(this._attachedPortal=i,this.attachTemplatePortal(i)):this.attachDomPortal&&i instanceof j1t?(this._attachedPortal=i,this.attachDomPortal(i)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Y1t extends sC{constructor(i,t,n,r,s){super(),this.outletElement=i,this._componentFactoryResolver=t,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=o=>{const l=o.element,w=this._document.createComment("dom-portal");l.parentNode.insertBefore(w,l),this.outletElement.appendChild(l),this._attachedPortal=o,super.setDisposeFn(()=>{w.parentNode&&w.parentNode.replaceChild(l,w)})},this._document=s}attachComponentPortal(i){const n=(i.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(i.component);let r;return i.viewContainerRef?(r=i.viewContainerRef.createComponent(n,i.viewContainerRef.length,i.injector||i.viewContainerRef.injector,i.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=n.create(i.injector||this._defaultInjector||is.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=i,r}attachTemplatePortal(i){let t=i.viewContainerRef,n=t.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);-1!==r&&t.remove(r)}),this._attachedPortal=i,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}}let $1t=(()=>{class e extends su{constructor(t,n){super(t,n)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(Ir))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],standalone:!0,features:[hi]})}return e})(),au=(()=>{class e extends sC{constructor(t,n,r){super(),this._componentFactoryResolver=t,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new De,this.attachDomPortal=s=>{const o=s.element,l=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(l,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(o,l)})},this._document=r}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const n=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,s=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=n.createComponent(s,n.length,t.injector||n.injector,t.projectableNodes||void 0);return n!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(t){t.setAttachedHost(this);const n=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Of),mt(Ir),mt(Ni))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[Wt.None,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[hi]})}return e})(),Jg=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const Q1t=["addListener","removeListener"],K1t=["addEventListener","removeEventListener"],Z1t=["on","off"];function Sc(e,i,t,n){if(ne(t)&&(n=t,t=void 0),n)return Sc(e,i,t).pipe(GI(n));const[r,s]=function twt(e){return ne(e.addEventListener)&&ne(e.removeEventListener)}(e)?K1t.map(o=>l=>e[o](i,l,t)):function J1t(e){return ne(e.addListener)&&ne(e.removeListener)}(e)?Q1t.map(UH(e,i)):function q1t(e){return ne(e.on)&&ne(e.off)}(e)?Z1t.map(UH(e,i)):[];if(!r&&UI(e))return _a(o=>Sc(o,i,t))(eo(e));if(!r)throw new TypeError("Invalid event target");return new ur(o=>{const l=(...w)=>o.next(1s(l)})}function UH(e,i){return t=>n=>e[t](i,n)}const My={schedule(e){let i=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:n}=My;n&&(i=n.requestAnimationFrame,t=n.cancelAnimationFrame);const r=i(s=>{t=void 0,e(s)});return new Ie(()=>t?.(r))},requestAnimationFrame(...e){const{delegate:i}=My;return(i?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){const{delegate:i}=My;return(i?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},zH=new class iwt extends FR{flush(i){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;i=i||n.shift();do{if(r=i.execute(i.state,i.delay))break}while((i=n[0])&&i.id===t&&n.shift());if(this._active=!1,r){for(;(i=n[0])&&i.id===t&&n.shift();)i.unsubscribe();throw r}}}(class ewt extends PR{constructor(i,t){super(i,t),this.scheduler=i,this.work=t}requestAsyncId(i,t,n=0){return null!==n&&n>0?super.requestAsyncId(i,t,n):(i.actions.push(this),i._scheduled||(i._scheduled=My.requestAnimationFrame(()=>i.flush(void 0))))}recycleAsyncId(i,t,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(i,t,n);const{actions:s}=i;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(My.cancelAnimationFrame(t),i._scheduled=void 0)}});let qR,nwt=1;const aC={};function GH(e){return e in aC&&(delete aC[e],!0)}const rwt={setImmediate(e){const i=nwt++;return aC[i]=!0,qR||(qR=Promise.resolve()),qR.then(()=>GH(i)&&e()),i},clearImmediate(e){GH(e)}},{setImmediate:swt,clearImmediate:awt}=rwt,oC={setImmediate(...e){const{delegate:i}=oC;return(i?.setImmediate||swt)(...e)},clearImmediate(e){const{delegate:i}=oC;return(i?.clearImmediate||awt)(e)},delegate:void 0},tk=new class lwt extends FR{flush(i){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;i=i||n.shift();do{if(r=i.execute(i.state,i.delay))break}while((i=n[0])&&i.id===t&&n.shift());if(this._active=!1,r){for(;(i=n[0])&&i.id===t&&n.shift();)i.unsubscribe();throw r}}}(class owt extends PR{constructor(i,t){super(i,t),this.scheduler=i,this.work=t}requestAsyncId(i,t,n=0){return null!==n&&n>0?super.requestAsyncId(i,t,n):(i.actions.push(this),i._scheduled||(i._scheduled=oC.setImmediate(i.flush.bind(i,void 0))))}recycleAsyncId(i,t,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(i,t,n);const{actions:s}=i;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(oC.clearImmediate(t),i._scheduled===t&&(i._scheduled=void 0))}});function Iy(e=0,i,t=kbt){let n=-1;return null!=i&&(yz(i)?t=i:n=i),new ur(r=>{let s=function dwt(e){return e instanceof Date&&!isNaN(e)}(e)?+e-t.now():e;s<0&&(s=0);let o=0;return t.schedule(function(){r.closed||(r.next(o++),0<=n?this.schedule(void 0,n):r.complete())},s)})}function HH(e,i=Ty){return function cwt(e){return ds((i,t)=>{let n=!1,r=null,s=null,o=!1;const l=()=>{if(s?.unsubscribe(),s=null,n){n=!1;const C=r;r=null,t.next(C)}o&&t.complete()},w=()=>{s=null,o&&t.complete()};i.subscribe(Xr(t,C=>{n=!0,r=C,s||eo(e(C)).subscribe(s=Xr(t,l,w))},()=>{o=!0,(!n||!s||s.closed)&&t.complete()}))})}(()=>Iy(e,i))}let Ry=(()=>{class e{constructor(t,n,r){this._ngZone=t,this._platform=n,this._scrolled=new Pe,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const n=this.scrollContainers.get(t);n&&(n.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new ur(n=>{this._globalSubscription||this._addGlobalListener();const r=t>0?this._scrolled.pipe(HH(t)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):vi()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(t,n){const r=this.getAncestorScrollContainers(t);return this.scrolled(n).pipe(In(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(t){const n=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,t)&&n.push(s)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,n){let r=vs(n),s=t.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Sc(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ei),Jt(ir),Jt(Ni,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),lC=(()=>{class e{constructor(t,n,r,s){this.elementRef=t,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Pe,this._elementScrolled=new ur(o=>this.ngZone.runOutsideAngular(()=>Sc(this.elementRef.nativeElement,"scroll").pipe(Ui(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const n=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=r?t.end:t.start),null==t.right&&(t.right=r?t.start:t.end),null!=t.bottom&&(t.top=n.scrollHeight-n.clientHeight-t.bottom),r&&by()!=ad.NORMAL?(null!=t.left&&(t.right=n.scrollWidth-n.clientWidth-t.left),by()==ad.INVERTED?t.left=t.right:by()==ad.NEGATED&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=n.scrollWidth-n.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const n=this.elementRef.nativeElement;ZG()?n.scrollTo(t):(null!=t.top&&(n.scrollTop=t.top),null!=t.left&&(n.scrollLeft=t.left))}measureScrollOffset(t){const n="left",r="right",s=this.elementRef.nativeElement;if("top"==t)return s.scrollTop;if("bottom"==t)return s.scrollHeight-s.clientHeight-s.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==t?t=o?r:n:"end"==t&&(t=o?n:r),o&&by()==ad.INVERTED?t==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&by()==ad.NEGATED?t==n?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:t==n?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Ry),mt(ei),mt(Ba,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0})}return e})(),ou=(()=>{class e{constructor(t,n,r){this._platform=t,this._change=new Pe,this._changeListener=s=>{this._change.next(s)},this._document=r,n.runOutsideAngular(()=>{if(t.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:n,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,n=this._getWindow(),r=t.documentElement,s=r.getBoundingClientRect();return{top:-s.top||t.body.scrollTop||n.scrollY||r.scrollTop||0,left:-s.left||t.body.scrollLeft||n.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(HH(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(ei),Jt(Ni,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),lu=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})(),ek=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Sy,lu,Sy,lu]})}return e})();function WH(e,i=!1){return ds((t,n)=>{let r=0;t.subscribe(Xr(n,s=>{const o=e(s,r++);(o||i)&&n.next(s),!o&&n.complete()}))})}function Yr(...e){const i=qx(e),t=function i0t(e,i){return"number"==typeof zI(e)?e.pop():i}(e,1/0),n=e;return n.length?1===n.length?eo(n[0]):Ag(t)(Is(n,i)):Zo}const XH=ZG();class fwt{constructor(i,t){this._viewportRuler=i,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=js(-this._previousScrollPosition.left),i.style.top=js(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const i=this._document.documentElement,n=i.style,r=this._document.body.style,s=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),XH&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),XH&&(n.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}}class mwt{constructor(i,t,n,r){this._scrollDispatcher=i,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(i){this._overlayRef=i}enable(){if(this._scrollSubscription)return;const i=this._scrollDispatcher.scrolled(0).pipe(In(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=i.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class jH{enable(){}disable(){}attach(){}}function ik(e,i){return i.some(t=>e.bottomt.bottom||e.rightt.right)}function YH(e,i){return i.some(t=>e.topt.bottom||e.leftt.right)}class pwt{constructor(i,t,n,r){this._scrollDispatcher=i,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(i){this._overlayRef=i}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();ik(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let gwt=(()=>{class e{constructor(t,n,r,s){this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new jH,this.close=o=>new mwt(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new fwt(this._viewportRuler,this._document),this.reposition=o=>new pwt(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ry),Jt(ou),Jt(ei),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class qg{constructor(i){if(this.scrollStrategy=new jH,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,i){const t=Object.keys(i);for(const n of t)void 0!==i[n]&&(this[n]=i[n])}}}class vwt{constructor(i,t){this.connectionPair=i,this.scrollableViewProperties=t}}let $H=(()=>{class e{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const n=this._attachedOverlays.indexOf(t);n>-1&&this._attachedOverlays.splice(n,1),0===this._attachedOverlays.length&&this.detach()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xwt=(()=>{class e extends $H{constructor(t,n){super(t),this._ngZone=n,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const l=s[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>l.next(r)):l.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ei,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ywt=(()=>{class e extends $H{constructor(t,n,r){super(t),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=yl(s)},this._clickListener=s=>{const o=yl(s),l="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const w=this._attachedOverlays.slice();for(let C=w.length-1;C>-1;C--){const M=w[C];if(M._outsidePointerEvents.observers.length<1||!M.hasAttached())continue;if(M.overlayElement.contains(o)||M.overlayElement.contains(l))break;const P=M._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>P.next(s)):P.next(s)}}}add(t){if(super.add(t),!this._isAttached){const n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ir),Jt(ei,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),cC=(()=>{class e{constructor(t,n){this._platform=n,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||RR()){const r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let s=0;sthis._backdropClick.next(P),this._backdropTransitionendHandler=P=>{this._disposeBackdrop(P.target)},this._keydownEvents=new Pe,this._outsidePointerEvents=new Pe,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(er(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const i=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){const i=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,i&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config={...this._config,...i},this._updateElementSize()}setDirection(i){this._config={...this._config,direction:i},this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){const i=this._config.direction;return i?"string"==typeof i?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const i=this._pane.style;i.width=js(this._config.width),i.height=js(this._config.height),i.minWidth=js(this._config.minWidth),i.minHeight=js(this._config.minHeight),i.maxWidth=js(this._config.maxWidth),i.maxHeight=js(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){const i="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(i)})}):this._backdropElement.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const i=this._backdropElement;if(i){if(this._animationsDisabled)return void this._disposeBackdrop(i);i.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{i.addEventListener("transitionend",this._backdropTransitionendHandler)}),i.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(i)},500))}}_toggleClasses(i,t,n){const r=Cy(t||[]).filter(s=>!!s);r.length&&(n?i.classList.add(...r):i.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const i=this._ngZone.onStable.pipe(Ui(Yr(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),i.unsubscribe())})})}_disposeScrollStrategy(){const i=this._scrollStrategy;i&&(i.disable(),i.detach&&i.detach())}_disposeBackdrop(i){i&&(i.removeEventListener("click",this._backdropClickHandler),i.removeEventListener("transitionend",this._backdropTransitionendHandler),i.remove(),this._backdropElement===i&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const QH="cdk-overlay-connected-position-bounding-box",bwt=/([A-Za-z%]+)$/;class wwt{get positions(){return this._preferredPositions}constructor(i,t,n,r,s){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Pe,this._resizeSubscription=Ie.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(i)}attach(i){this._validatePositions(),i.hostElement.classList.add(QH),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const i=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,s=[];let o;for(let l of this._preferredPositions){let w=this._getOriginPoint(i,r,l),C=this._getOverlayPoint(w,t,l),M=this._getOverlayFit(C,t,n,l);if(M.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(l,w);this._canFitWithFlexibleDimensions(M,C,n)?s.push({position:l,origin:w,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(w,l)}):(!o||o.overlayFit.visibleAreaw&&(w=M,l=C)}return this._isPushed=!1,void this._applyPosition(l.position,l.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Jf(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(QH),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const i=this._lastPosition;if(i){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,i);this._applyPosition(i,t)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,-1===i.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,t,n){let r,s;if("center"==n.originX)r=i.left+i.width/2;else{const o=this._isRtl()?i.right:i.left,l=this._isRtl()?i.left:i.right;r="start"==n.originX?o:l}return t.left<0&&(r-=t.left),s="center"==n.originY?i.top+i.height/2:"top"==n.originY?i.top:i.bottom,t.top<0&&(s-=t.top),{x:r,y:s}}_getOverlayPoint(i,t,n){let r,s;return r="center"==n.overlayX?-t.width/2:"start"===n.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,s="center"==n.overlayY?-t.height/2:"top"==n.overlayY?0:-t.height,{x:i.x+r,y:i.y+s}}_getOverlayFit(i,t,n,r){const s=ZH(t);let{x:o,y:l}=i,w=this._getOffset(r,"x"),C=this._getOffset(r,"y");w&&(o+=w),C&&(l+=C);let O=0-l,L=l+s.height-n.height,U=this._subtractOverflows(s.width,0-o,o+s.width-n.width),X=this._subtractOverflows(s.height,O,L),W=U*X;return{visibleArea:W,isCompletelyWithinViewport:s.width*s.height===W,fitsInViewportVertically:X===s.height,fitsInViewportHorizontally:U==s.width}}_canFitWithFlexibleDimensions(i,t,n){if(this._hasFlexibleDimensions){const r=n.bottom-t.y,s=n.right-t.x,o=KH(this._overlayRef.getConfig().minHeight),l=KH(this._overlayRef.getConfig().minWidth);return(i.fitsInViewportVertically||null!=o&&o<=r)&&(i.fitsInViewportHorizontally||null!=l&&l<=s)}return!1}_pushOverlayOnScreen(i,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};const r=ZH(t),s=this._viewportRect,o=Math.max(i.x+r.width-s.width,0),l=Math.max(i.y+r.height-s.height,0),w=Math.max(s.top-n.top-i.y,0),C=Math.max(s.left-n.left-i.x,0);let M=0,P=0;return M=r.width<=s.width?C||-o:i.xU&&!this._isInitialRender&&!this._growAfterOpen&&(o=i.y-U/2)}if("end"===t.overlayX&&!r||"start"===t.overlayX&&r)O=n.width-i.x+2*this._viewportMargin,M=i.x-this._viewportMargin;else if("start"===t.overlayX&&!r||"end"===t.overlayX&&r)P=i.x,M=n.right-i.x;else{const L=Math.min(n.right-i.x+n.left,i.x),U=this._lastBoundingBoxSize.width;M=2*L,P=i.x-L,M>U&&!this._isInitialRender&&!this._growAfterOpen&&(P=i.x-U/2)}return{top:o,left:P,bottom:l,right:O,width:M,height:s}}_setBoundingBoxStyles(i,t){const n=this._calculateBoundingBoxRect(i,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=js(n.height),r.top=js(n.top),r.bottom=js(n.bottom),r.width=js(n.width),r.left=js(n.left),r.right=js(n.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=js(s)),o&&(r.maxWidth=js(o))}this._lastBoundingBoxSize=n,Jf(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Jf(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Jf(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,t){const n={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const M=this._viewportRuler.getViewportScrollPosition();Jf(n,this._getExactOverlayY(t,i,M)),Jf(n,this._getExactOverlayX(t,i,M))}else n.position="static";let l="",w=this._getOffset(t,"x"),C=this._getOffset(t,"y");w&&(l+=`translateX(${w}px) `),C&&(l+=`translateY(${C}px)`),n.transform=l.trim(),o.maxHeight&&(r?n.maxHeight=js(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=js(o.maxWidth):s&&(n.maxWidth="")),Jf(this._pane.style,n)}_getExactOverlayY(i,t,n){let r={top:"",bottom:""},s=this._getOverlayPoint(t,this._overlayRect,i);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),"bottom"===i.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=js(s.y),r}_getExactOverlayX(i,t,n){let o,r={left:"",right:""},s=this._getOverlayPoint(t,this._overlayRect,i);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),o=this._isRtl()?"end"===i.overlayX?"left":"right":"end"===i.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=js(s.x),r}_getScrollVisibility(){const i=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:YH(i,n),isOriginOutsideView:ik(i,n),isOverlayClipped:YH(t,n),isOverlayOutsideView:ik(t,n)}}_subtractOverflows(i,...t){return t.reduce((n,r)=>n-Math.max(r,0),i)}_getNarrowedViewportRect(){const i=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+i-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:i-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,t){return"x"===t?null==i.offsetX?this._offsetX:i.offsetX:null==i.offsetY?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&Cy(i).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){const i=this._origin;if(i instanceof ri)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();const t=i.width||0,n=i.height||0;return{top:i.y,bottom:i.y+n,left:i.x,right:i.x+t,height:n,width:t}}}function Jf(e,i){for(let t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}function KH(e){if("number"!=typeof e&&null!=e){const[i,t]=e.split(bwt);return t&&"px"!==t?null:parseFloat(i)}return e||null}function ZH(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}const JH="cdk-global-overlay-wrapper";class Twt{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(i){const t=i.getConfig();this._overlayRef=i,this._width&&!t.width&&i.updateSize({width:this._width}),this._height&&!t.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(JH),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const i=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:l}=n,w=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),C=!("100%"!==s&&"100vh"!==s||l&&"100%"!==l&&"100vh"!==l),M=this._xPosition,P=this._xOffset,O="rtl"===this._overlayRef.getConfig().direction;let L="",U="",X="";w?X="flex-start":"center"===M?(X="center",O?U=P:L=P):O?"left"===M||"end"===M?(X="flex-end",L=P):("right"===M||"start"===M)&&(X="flex-start",U=P):"left"===M||"start"===M?(X="flex-start",L=P):("right"===M||"end"===M)&&(X="flex-end",U=P),i.position=this._cssPosition,i.marginLeft=w?"0":L,i.marginTop=C?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=w?"0":U,t.justifyContent=X,t.alignItems=C?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const i=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(JH),n.justifyContent=n.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}}let Cwt=(()=>{class e{constructor(t,n,r,s){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new Twt}flexibleConnectedTo(t){return new wwt(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ou),Jt(Ni),Jt(ir),Jt(cC))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Swt=0,xs=(()=>{class e{constructor(t,n,r,s,o,l,w,C,M,P,O,L){this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=l,this._ngZone=w,this._document=C,this._directionality=M,this._location=P,this._outsideClickDispatcher=O,this._animationsModuleType=L}create(t){const n=this._createHostElement(),r=this._createPaneElement(n),s=this._createPortalOutlet(r),o=new qg(t);return o.direction=o.direction||this._directionality.value,new dC(s,n,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(t){const n=this._document.createElement("div");return n.id="cdk-overlay-"+Swt++,n.classList.add("cdk-overlay-pane"),t.appendChild(n),n}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(jd)),new Y1t(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(gwt),Jt(cC),Jt(Of),Jt(Cwt),Jt(xwt),Jt(is),Jt(ei),Jt(Ni),Jt(Ba),Jt(Xf),Jt(ywt),Jt(Nr,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Ewt=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],qH=new ee("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}});let nk=(()=>{class e{constructor(t){this.elementRef=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0})}return e})(),t7=(()=>{class e{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(t){this._disposeOnNavigation=t}constructor(t,n,r,s,o){this._overlay=t,this._dir=o,this._backdropSubscription=Ie.EMPTY,this._attachSubscription=Ie.EMPTY,this._detachSubscription=Ie.EMPTY,this._positionSubscription=Ie.EMPTY,this._disposeOnNavigation=!1,this._ngZone=me(ei),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new De,this.positionChange=new De,this.attach=new De,this.detach=new De,this.overlayKeydown=new De,this.overlayOutsideClick=new De,this._templatePortal=new su(n,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Ewt);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(n=>{this.overlayKeydown.next(n),27===n.keyCode&&!this.disableClose&&!io(n)&&(n.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(n=>{this.overlayOutsideClick.next(n)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),n=new qg({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||0===this.width)&&(n.width=this.width),(this.height||0===this.height)&&(n.height=this.height),(this.minWidth||0===this.minWidth)&&(n.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(n.minHeight=this.minHeight),this.backdropClass&&(n.backdropClass=this.backdropClass),this.panelClass&&(n.panelClass=this.panelClass),n}_updatePositionStrategy(t){const n=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return t.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(t),t}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof nk?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(WH(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(xs),mt(fr),mt(Ir),mt(qH),mt(Ba,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[Wt.None,"cdkConnectedOverlayOrigin","origin"],positions:[Wt.None,"cdkConnectedOverlayPositions","positions"],positionStrategy:[Wt.None,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[Wt.None,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[Wt.None,"cdkConnectedOverlayOffsetY","offsetY"],width:[Wt.None,"cdkConnectedOverlayWidth","width"],height:[Wt.None,"cdkConnectedOverlayHeight","height"],minWidth:[Wt.None,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[Wt.None,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[Wt.None,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[Wt.None,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[Wt.None,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[Wt.None,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[Wt.None,"cdkConnectedOverlayOpen","open"],disableClose:[Wt.None,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[Wt.None,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayHasBackdrop","hasBackdrop",Je],lockPosition:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayLockPosition","lockPosition",Je],flexibleDimensions:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",Je],growAfterOpen:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",Je],push:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayPush","push",Je],disposeOnNavigation:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",Je]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[on,tr]})}return e})();const Dwt={provide:qH,deps:[xs],useFactory:function Awt(e){return()=>e.scrollStrategies.reposition()}};let qf=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[xs,Dwt],imports:[Sy,Jg,ek,ek]})}return e})();function Mwt(e,i){if(1&e){const t=ve();tt(0,"div",1)(1,"button",2),Vt("click",function(){return Ut(t),zt(Ct().action())}),ut(2),et()()}if(2&e){const t=Ct();lt(2),Ye(" ",t.data.action," ")}}const Iwt=["label"];function Rwt(e,i){}const kwt=Math.pow(2,31)-1;class uC{constructor(i,t){this._overlayRef=t,this._afterDismissed=new Pe,this._afterOpened=new Pe,this._onAction=new Pe,this._dismissedByAction=!1,this.containerInstance=i,i._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(i){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(i,kwt))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const rk=new ee("MatSnackBarData");class hC{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let e7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0})}return e})(),i7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0})}return e})(),n7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0})}return e})(),r7=(()=>{class e{constructor(t,n){this.snackBarRef=t,this.data=n}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static#t=this.\u0275fac=function(n){return new(n||e)(mt(uC),mt(rk))};static#e=this.\u0275cmp=je({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[Vi],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(n,r){1&n&&(tt(0,"div",0),ut(1),et(),Gt(2,Mwt,3,1,"div",1)),2&n&&(lt(),Ye(" ",r.data.message,"\n"),lt(),xn(2,r.hasAction?2:-1))},dependencies:[Sa,e7,i7,n7],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0})}return e})();const Pwt={snackBarState:mr("state",[Nn("void, hidden",si({transform:"scale(0.8)",opacity:0})),Nn("visible",si({transform:"scale(1)",opacity:1})),ln("* => visible",an("150ms cubic-bezier(0, 0, 0.2, 1)")),ln("* => void, * => hidden",an("75ms cubic-bezier(0.4, 0.0, 1, 1)",si({opacity:0})))])};let Fwt=0,s7=(()=>{class e extends sC{constructor(t,n,r,s,o){super(),this._ngZone=t,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=me(Ni),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Pe,this._onExit=new Pe,this._onEnter=new Pe,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+Fwt++,this.attachDomPortal=l=>{this._assertNotAttached();const w=this._portalOutlet.attachDomPortal(l);return this._afterPortalAttached(),w},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();const n=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),n}attachTemplatePortal(t){this._assertNotAttached();const n=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),n}onAnimationEnd(t){const{fromState:n,toState:r}=t;if(("void"===r&&"void"!==n||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){const t=this._elementRef.nativeElement,n=this.snackBarConfig.panelClass;n&&(Array.isArray(n)?n.forEach(o=>t.classList.add(o)):t.classList.add(n)),this._exposeToModals();const r=this._label.nativeElement,s="mdc-snackbar__label";r.classList.toggle(s,!r.querySelector(`.${s}`))}_exposeToModals(){const t=this._liveElementId,n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const n=t.getAttribute("aria-owns");if(n){const r=n.replace(this._liveElementId,"").trim();r.length>0?t.setAttribute("aria-owns",r):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),n=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&n){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(r=document.activeElement),t.removeAttribute("aria-hidden"),n.appendChild(t),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ei),mt(ri),mt(Mn),mt(ir),mt(hC))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(n,r){if(1&n&&(Mi(au,7),Mi(Iwt,7)),2&n){let s;Be(s=Ve())&&(r._portalOutlet=s.first),Be(s=Ve())&&(r._label=s.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(n,r){1&n&&G_("@state.done",function(o){return r.onAnimationEnd(o)}),2&n&&N_("@state",r._animationState)},standalone:!0,features:[hi,Vi],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(n,r){1&n&&(tt(0,"div",1)(1,"div",2,0)(3,"div",3),Gt(4,Rwt,0,0,"ng-template",4),et(),we(5,"div"),et()()),2&n&&(lt(5),Ti("aria-live",r._live)("role",r._role)("id",r._liveElementId))},dependencies:[au],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape)}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size);font-family:var(--mdc-snackbar-supporting-text-font);font-weight:var(--mdc-snackbar-supporting-text-weight);line-height:var(--mdc-snackbar-supporting-text-line-height)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color);--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[Pwt.snackBarState]}})}return e})();const Lwt=new ee("mat-snack-bar-default-options",{providedIn:"root",factory:function Owt(){return new hC}});let Sh=(()=>{class e{get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(t,n,r,s,o,l){this._overlay=t,this._live=n,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=l,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=r7,this.snackBarContainerComponent=s7,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(t,n){return this._attach(t,n)}openFromTemplate(t,n){return this._attach(t,n)}open(t,n="",r){const s={...this._defaultConfig,...r};return s.data={message:t,action:n},s.announcementMessage===t&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,n){const s=is.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:hC,useValue:n}]}),o=new Zg(this.snackBarContainerComponent,n.viewContainerRef,s),l=t.attach(o);return l.instance.snackBarConfig=n,l.instance}_attach(t,n){const r={...new hC,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),l=new uC(o,s);if(t instanceof fr){const w=new su(t,null,{$implicit:r.data,snackBarRef:l});l.instance=o.attachTemplatePortal(w)}else{const w=this._createInjector(r,l),C=new Zg(t,void 0,w),M=o.attachComponentPortal(C);l.instance=M.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ui(s.detachments())).subscribe(w=>{s.overlayElement.classList.toggle(this.handsetCssClass,w.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(l,r),this._openedSnackBarRef=l,this._openedSnackBarRef}_animateSnackBar(t,n){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),n.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),n.duration&&n.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(n.duration))}_createOverlay(t){const n=new qg;n.direction=t.direction;let r=this._overlay.position().global();const s="rtl"===t.direction,o="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!s||"end"===t.horizontalPosition&&s,l=!o&&"center"!==t.horizontalPosition;return o?r.left("0"):l?r.right("0"):r.centerHorizontally(),"top"===t.verticalPosition?r.top("0"):r.bottom("0"),n.positionStrategy=r,this._overlay.create(n)}_createInjector(t,n){return is.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:uC,useValue:n},{provide:rk,useValue:t.data}]})}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xs),Jt(pH),Jt(is),Jt(nH),Jt(e,12),Jt(Lwt))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Nwt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[Sh],imports:[qf,Jg,QR,Ki,r7,Ki]})}return e})(),Ar=(()=>{class e{constructor(t,n){this.sbRef=t,this.data=n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(uC),mt(rk))};static#e=this.\u0275cmp=je({type:e,selectors:[["snack-alert"]],decls:2,vars:1,consts:[[1,"example-alert"]],template:function(n,r){1&n&&(tt(0,"span",0),ut(1),et()),2&n&&(lt(),Ze(r.data))},styles:[".example-alert[_ngcontent-%COMP%]{color:#fff}"]})}return e})(),ca=(()=>{class e{constructor(t,n){this.http=t,this._snackBar=n,this.snowstormFhirBase="https://snowstorm.ihtsdotools.org/fhir",this.defaultFhirUrlParam="http://snomed.info/sct",this.fhirUrlParam=this.defaultFhirUrlParam,this.lang="en",this.snowstormFhirBaseSubject=new Wr(this.snowstormFhirBase),this.fhirUrlParamSubject=new Wr(this.fhirUrlParam),this.langSubject=new Wr(this.lang),this.snowstormFhirBase$=this.snowstormFhirBaseSubject.asObservable(),this.fhirUrlParam$=this.fhirUrlParamSubject.asObservable(),this.lang$=this.langSubject.asObservable(),this.conceptCache=new Map}setSnowstormFhirBase(t){this.snowstormFhirBase=t,this.snowstormFhirBaseSubject.next(t)}setFhirUrlParam(t){this.fhirUrlParam=t,this.fhirUrlParamSubject.next(t)}setLang(t){this.lang=t,this.langSubject.next(t)}getSnowstormFhirBase(){return this.snowstormFhirBase}getFhirUrlParam(){return this.fhirUrlParam}getLang(){return this.lang}getCodeSystems(){return this.http.get(`${this.snowstormFhirBase}/CodeSystem`).pipe(oa(this.handleError("getCodeSystems",{})))}getCodeSystem(t){return this.http.get(`${this.snowstormFhirBase}/CodeSystem?version=${t}`).pipe(oa(this.handleError("getCodeSystem",{})))}getValueSetExpansionUrl(t,n,r,s){return r||(r=0),s||(s=20),"string"!=typeof n&&(n=""),`${this.snowstormFhirBase}/ValueSet/$expand?url=${this.fhirUrlParam}?fhir_vs=ecl/${encodeURIComponent(t)}&count=${s}&offset=${r}&filter=${n}&language=${this.lang}&displayLanguage=${this.lang}`}expandValueSet(t,n,r,s){let o=this.getValueSetExpansionUrl(t,n,r,s);return this.http.get(o).pipe(oa(this.handleError("expandValueSet",{})))}translate(t,n,r){return r||(r=this.defaultFhirUrlParam),this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?url=http://snomed.info/sct?fhir_cm=${t}&code=${n}&system=${r}`).pipe(oa(this.handleError("translate",{})))}expandValueSetFromServer(t,n,r,s,o,l){o||(o=0),l||(l=20),t||(t=this.snowstormFhirBase),n||(n=this.fhirUrlParam),"string"!=typeof s&&(s="");let w=`${t}/ValueSet/$expand?url=${n}?fhir_vs=ecl/${encodeURIComponent(r)}&count=${l}&offset=${o}&filter=${s}&language=${this.lang}&displayLanguage=${this.lang}`;return this.http.get(w).pipe(oa(this.handleError("expandValueSet",{})))}handleError(t="operation",n){return r=>(console.error("There was an error!"),console.error(r),this._snackBar.openFromComponent(Ar,{duration:5e3,data:r.message,panelClass:["red-snackbar"]}),vi(n))}lookupConcept(t,n){n||(n=this.fhirUrlParam);const r=`${n}:${t}`,s=this.conceptCache.get(r);if(s)return vi(s);let o=`${this.snowstormFhirBase}/CodeSystem/$lookup?system=http://snomed.info/sct&code=${t}&property=normalForm`;"http://snomed.info/sct"!=n&&(o+=`&version=${n}`);const l={headers:new Jo({"Accept-Language":"en"})};return this.http.get(o,l).pipe(hs(w=>{this.conceptCache.set(r,w)}),oa(this.handleError("lookupConcept",{})))}getMRCMAttributes(t){let n=`${this.snowstormFhirBase.replace("fhir","snowstorm/snomed-ct")}mrcm/MAIN/domain-attributes?parentIds=${t}&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED`;return this.http.get(n).pipe(oa(this.handleError("getMRCMAttributes",{})))}addPostcoordinatedExpression(t){let n=`${this.snowstormFhirBase}/CodeSystem/sct_11000003104_EXP`;const r={headers:new Jo({"Content-Type":"application/fhir+json"})};return this.http.patch(n,{resourceType:"CodeSystem",concept:[{code:t}]},r).pipe(oa(this.handleError("addPostcoordinatedExpression",{})))}runEclLegacy(t){let n=`https://browser.ihtsdotools.org/snowstorm/snomed-ct/MAIN/SNOMEDCT-ES/2022-10-31/concepts?offset=0&limit=100&termActive=true&ecl=${encodeURIComponent(t)}`;return this.http.get(n).pipe(oa(this.handleError("expandValueSet",{})))}getIcd10MapTargets(t){return this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?code=${t}&system=http://snomed.info/sct&source=http://snomed.info/sct?fhir_vs&target=http://hl7.org/fhir/sid/icd-10&url=http://snomed.info/sct/900000000000207008/version/20200131?fhir_cm=447562003`).pipe(oa(this.handleError("translate",{})))}lookupOtherCodeSystems(t,n){return this.http.get(`${this.snowstormFhirBase}/CodeSystem/$lookup?system=${t}&code=${n}`).pipe(oa(this.handleError("lookup",{})))}getNormalForm(t){if(t.parameter)for(let n of t.parameter){let r=!1;if("property"==n.name){for(let s of n.part)"code"==s.name&&"normalForm"==s.valueString&&(r=!0);if(r)for(let s of n.part)if("valueString"==s.name)return s.valueString}}return""}parseNormmalForm(t){const n=[];return t.split("} {").forEach(s=>{const o=s.match(/\d+\|[^\|]+\|\s*=\s*\d+\|[^\|]+\|/g);if(!o)return;const l=o.map(w=>{const[C,M]=w.split("=").map(X=>X.trim()),[P,O]=C.split("|").map(X=>X.trim()),[L,U]=M.split("|").map(X=>X.trim());return{type:{code:P,display:O.replace(/\(.*\)/,"").trim()},target:{code:L,display:U}}});n.push(l)}),{groups:n}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(sd),Jt(Sh))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function a7(...e){const i=bz(e),{args:t,keys:n}=wz(e),r=new ur(s=>{const{length:o}=t;if(!o)return void s.complete();const l=new Array(o);let w=o,C=o;for(let M=0;M{P||(P=!0,C--),l[M]=O},()=>w--,void 0,()=>{(!w||!P)&&(C||s.next(n?_z(n,l):l),s.complete())}))}});return i?r.pipe(GI(i)):r}function o7(e={}){const{connector:i=(()=>new Pe),resetOnError:t=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=e;return s=>{let o,l,w,C=0,M=!1,P=!1;const O=()=>{l?.unsubscribe(),l=void 0},L=()=>{O(),o=w=void 0,M=P=!1},U=()=>{const X=o;L(),X?.unsubscribe()};return ds((X,W)=>{C++,!P&&!M&&O();const Z=w=w??i();W.add(()=>{C--,0===C&&!P&&!M&&(l=sk(U,r))}),Z.subscribe(W),!o&&C>0&&(o=new Ho({next:rt=>Z.next(rt),error:rt=>{P=!0,O(),l=sk(L,t,rt),Z.error(rt)},complete:()=>{M=!0,O(),l=sk(L,n),Z.complete()}}),eo(X).subscribe(o))})(s)}}function sk(e,i,...t){if(!0===i)return void e();if(!1===i)return;const n=new Ho({next:()=>{n.unsubscribe(),e()}});return eo(i(...t)).subscribe(n)}const Bwt=["*"];let fC;function ky(e){return function Vwt(){if(void 0===fC&&(fC=null,typeof window<"u")){const e=window;void 0!==e.trustedTypes&&(fC=e.trustedTypes.createPolicy("angular#components",{createHTML:i=>i}))}return fC}()?.createHTML(e)||e}function l7(e){return Error(`Unable to find icon with the name "${e}"`)}function c7(e){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${e}".`)}function d7(e){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${e}".`)}class tm{constructor(i,t,n){this.url=i,this.svgText=t,this.options=n}}let mC=(()=>{class e{constructor(t,n,r,s){this._httpClient=t,this._sanitizer=n,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(t,n,r){return this.addSvgIconInNamespace("",t,n,r)}addSvgIconLiteral(t,n,r){return this.addSvgIconLiteralInNamespace("",t,n,r)}addSvgIconInNamespace(t,n,r,s){return this._addSvgIconConfig(t,n,new tm(r,null,s))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,n,r,s){const o=this._sanitizer.sanitize(La.HTML,r);if(!o)throw d7(r);const l=ky(o);return this._addSvgIconConfig(t,n,new tm("",l,s))}addSvgIconSet(t,n){return this.addSvgIconSetInNamespace("",t,n)}addSvgIconSetLiteral(t,n){return this.addSvgIconSetLiteralInNamespace("",t,n)}addSvgIconSetInNamespace(t,n,r){return this._addSvgIconSetConfig(t,new tm(n,null,r))}addSvgIconSetLiteralInNamespace(t,n,r){const s=this._sanitizer.sanitize(La.HTML,n);if(!s)throw d7(n);const o=ky(s);return this._addSvgIconSetConfig(t,new tm("",o,r))}registerFontClassAlias(t,n=t){return this._fontCssClassesByAlias.set(t,n),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const n=this._sanitizer.sanitize(La.RESOURCE_URL,t);if(!n)throw c7(t);const r=this._cachedIconsByUrl.get(n);return r?vi(pC(r)):this._loadSvgIconFromConfig(new tm(t,null)).pipe(hs(s=>this._cachedIconsByUrl.set(n,s)),Di(s=>pC(s)))}getNamedSvgIcon(t,n=""){const r=u7(n,t);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(n,t),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(n);return o?this._getSvgFromIconSetConfigs(t,o):Mg(l7(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?vi(pC(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Di(n=>pC(n)))}_getSvgFromIconSetConfigs(t,n){const r=this._extractIconWithNameFromAnySet(t,n);return r?vi(r):a7(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(oa(l=>{const C=`Loading icon set URL: ${this._sanitizer.sanitize(La.RESOURCE_URL,o.url)} failed: ${l.message}`;return this._errorHandler.handleError(new Error(C)),vi(null)})))).pipe(Di(()=>{const o=this._extractIconWithNameFromAnySet(t,n);if(!o)throw l7(t);return o}))}_extractIconWithNameFromAnySet(t,n){for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.svgText&&s.svgText.toString().indexOf(t)>-1){const o=this._svgElementFromConfig(s),l=this._extractSvgIconFromSet(o,t,s.options);if(l)return l}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(hs(n=>t.svgText=n),Di(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?vi(null):this._fetchIcon(t).pipe(hs(n=>t.svgText=n))}_extractSvgIconFromSet(t,n,r){const s=t.querySelector(`[id="${n}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const l=this._svgElementFromString(ky(""));return l.appendChild(o),this._setSvgAttributes(l,r)}_svgElementFromString(t){const n=this._document.createElement("DIV");n.innerHTML=t;const r=n.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(t){const n=this._svgElementFromString(ky("")),r=t.attributes;for(let s=0;sky(C)),Rg(()=>this._inProgressUrlFetches.delete(o)),o7());return this._inProgressUrlFetches.set(o,w),w}_addSvgIconConfig(t,n,r){return this._svgIconConfigs.set(u7(t,n),r),this}_addSvgIconSetConfig(t,n){const r=this._iconSetConfigs.get(t);return r?r.push(n):this._iconSetConfigs.set(t,[n]),this}_svgElementFromConfig(t){if(!t.svgElement){const n=this._svgElementFromString(t.svgText);this._setSvgAttributes(n,t.options),t.svgElement=n}return t.svgElement}_getIconConfigFromResolvers(t,n){for(let r=0;ri?i.pathname+i.search:""}}}),h7=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],jwt=h7.map(e=>`[${e}]`).join(", "),Ywt=/^url\(['"]?#(.*?)['"]?\)$/;let da=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const n=this._cleanupFontValue(t);n!==this._fontSet&&(this._fontSet=n,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const n=this._cleanupFontValue(t);n!==this._fontIcon&&(this._fontIcon=n,this._updateFontIconClasses())}constructor(t,n,r,s,o,l){this._elementRef=t,this._iconRegistry=n,this._location=s,this._errorHandler=o,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Ie.EMPTY,l&&(l.color&&(this.color=this._defaultColor=l.color),l.fontSet&&(this.fontSet=l.fontSet)),r||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const n=t.split(":");switch(n.length){case 1:return["",n[0]];case 2:return n;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const n=this._location.getPathname();n!==this._previousPath&&(this._previousPath=n,this._prependPathToReferences(n))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let n=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();n--;){const r=t.childNodes[n];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,n=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>t.classList.remove(r)),n.forEach(r=>t.classList.add(r)),this._previousFontSetClass=n,this.fontIcon!==this._previousFontIconClass&&!n.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const n=this._elementsWithExternalReferences;n&&n.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){const n=t.querySelectorAll(jwt),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const l=n[s],w=l.getAttribute(o),C=w?w.match(Ywt):null;if(C){let M=r.get(l);M||(M=[],r.set(l,M)),M.push({name:o,value:C[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[n,r]=this._splitIconName(t);n&&(this._svgNamespace=n),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,n).pipe(er(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${n}:${r}! ${s.message}`))})}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(mC),hl("aria-hidden"),mt(Wwt),mt(fl),mt(Hwt,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(n,r){2&n&&(Ti("data-mat-icon-type",r._usingFontIcon()?"font":"svg")("data-mat-icon-name",r._svgName||r.fontIcon)("data-mat-icon-namespace",r._svgNamespace||r.fontSet)("fontIcon",r._usingFontIcon()?r.fontIcon:null),Ll(r.color?"mat-"+r.color:""),bi("mat-icon-inline",r.inline)("mat-icon-no-color","primary"!==r.color&&"accent"!==r.color&&"warn"!==r.color))},inputs:{color:"color",inline:[Wt.HasDecoratorInputTransform,"inline","inline",Je],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[on,Vi],ngContentSelectors:Bwt,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0})}return e})(),$wt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})();function f7(e,i){return i?t=>ty(i.pipe(er(1),function Qwt(){return ds((e,i)=>{e.subscribe(Xr(i,sr))})}()),t.pipe(f7(e))):_a((t,n)=>eo(e(t,n)).pipe(er(1),bT(t)))}function ak(e,i=Ty){const t=Iy(e,i);return f7(()=>t)}const Kwt=["mat-menu-item",""],Zwt=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Jwt=["mat-icon, [matMenuItemIcon]","*"];function qwt(e,i){1&e&&(ul(),tt(0,"svg",2),we(1,"polygon",3),et())}const t_t=["*"];function e_t(e,i){if(1&e){const t=ve();tt(0,"div",0),Vt("keydown",function(r){return Ut(t),zt(Ct()._handleKeydown(r))})("click",function(){return Ut(t),zt(Ct().closed.emit("click"))})("@transformMenu.start",function(r){return Ut(t),zt(Ct()._onAnimationStart(r))})("@transformMenu.done",function(r){return Ut(t),zt(Ct()._onAnimationDone(r))}),tt(1,"div",1),xi(2),et()()}if(2&e){const t=Ct();yt("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),Ti("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const ok=new ee("MAT_MENU_PANEL");let Gl=(()=>{class e{constructor(t,n,r,s,o){this._elementRef=t,this._document=n,this._focusMonitor=r,this._parentMenu=s,this._changeDetectorRef=o,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new Pe,this._focused=new Pe,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(t,n){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,n):this._getHostElement().focus(n),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement.cloneNode(!0),n=t.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",an("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1)"}))),ln("* => void",an("100ms 25ms linear",si({opacity:0})))]),fadeInItems:mr("fadeInItems",[Nn("showing",si({opacity:1})),ln("void => *",[si({opacity:0}),an("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let n_t=0;const r_t=new ee("mat-menu-default-options",{providedIn:"root",factory:function s_t(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let bl=(()=>{class e{get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}set panelClass(t){const n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}constructor(t,n,r,s){this._elementRef=t,this._ngZone=n,this._changeDetectorRef=s,this._elevationPrefix="mat-elevation-z",this._baseElevation=8,this._directDescendantItems=new nh,this._classList={},this._panelAnimationState="void",this._animationDone=new Pe,this.closed=new De,this.close=this.closed,this.panelId="mat-menu-panel-"+n_t++,this.overlayPanelClass=r.overlayPanelClass||"",this._xPosition=r.xPosition,this._yPosition=r.yPosition,this.backdropClass=r.backdropClass,this.overlapTrigger=r.overlapTrigger,this.hasBackdrop=r.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new VR(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ta(this._directDescendantItems),Rs(t=>Yr(...t.map(n=>n._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t)),this._directDescendantItems.changes.subscribe(t=>{const n=this._keyManager;if("enter"===this._panelAnimationState&&n.activeItem?._hasFocus()){const r=t.toArray(),s=Math.max(0,Math.min(r.length-1,n.activeItemIndex||0));r[s]&&!r[s].disabled?n.setActiveItem(s):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(Ta(this._directDescendantItems),Rs(n=>Yr(...n.map(r=>r._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const n=t.keyCode,r=this._keyManager;switch(n){case 27:io(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===n||40===n)&&r.setFocusOrigin("keyboard"),void r.onKeydown(t)}t.stopPropagation()}focusFirstItem(t="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(er(1)).subscribe(()=>{let n=null;if(this._directDescendantItems.length&&(n=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!n||!n.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(t).setFirstItemActive(),!r.activeItem&&n&&n.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const n=Math.min(this._baseElevation+t,24),r=`${this._elevationPrefix}${n}`,s=Object.keys(this._classList).find(o=>o.startsWith(this._elevationPrefix));(!s||s===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(t=this.xPosition,n=this.yPosition){const r=this._classList;r["mat-menu-before"]="before"===t,r["mat-menu-after"]="after"===t,r["mat-menu-above"]="above"===n,r["mat-menu-below"]="below"===n,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(Ta(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(n=>n._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ei),mt(r_t),mt(Mn))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-menu"]],contentQueries:function(n,r,s){if(1&n&&(An(s,i_t,5),An(s,Gl,5),An(s,Gl,4)),2&n){let o;Be(o=Ve())&&(r.lazyContent=o.first),Be(o=Ve())&&(r._allItems=o),Be(o=Ve())&&(r.items=o)}},viewQuery:function(n,r){if(1&n&&Mi(fr,5),2&n){let s;Be(s=Ve())&&(r.templateRef=s.first)}},hostVars:3,hostBindings:function(n,r){2&n&&Ti("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[Wt.HasDecoratorInputTransform,"overlapTrigger","overlapTrigger",Je],hasBackdrop:[Wt.HasDecoratorInputTransform,"hasBackdrop","hasBackdrop",t=>null==t?null:Je(t)],panelClass:[Wt.None,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[fi([{provide:ok,useExisting:e}]),on,Vi],ngContentSelectors:t_t,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id","ngClass"],[1,"mat-mdc-menu-content"]],template:function(n,r){1&n&&(Kn(),Gt(0,e_t,3,6,"ng-template"))},dependencies:[bc],styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font);line-height:var(--mat-menu-item-label-text-line-height);font-size:var(--mat-menu-item-label-text-size);letter-spacing:var(--mat-menu-item-label-text-tracking);font-weight:var(--mat-menu-item-label-text-weight)}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape);background-color:var(--mat-menu-container-color);will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-divider{color:var(--mat-menu-divider-color);margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;align-items:center;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:var(--mat-menu-item-trailing-spacing);padding-right:var(--mat-menu-item-leading-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]),.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon])[dir=rtl]{padding-left:var(--mat-menu-item-with-icon-trailing-spacing);padding-right:var(--mat-menu-item-with-icon-leading-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color)}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color)}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;padding-right:var(--mat-menu-item-spacing);padding-left:0}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[gC.transformMenu,gC.fadeInItems]},changeDetection:0})}return e})();const m7=new ee("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}}),o_t={provide:m7,deps:[xs],useFactory:function a_t(e){return()=>e.scrollStrategies.reposition()}},p7=Cc({passive:!0});let cu=(()=>{class e{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(n=>{this._destroyMenu(n),("click"===n||"tab"===n)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(t,n,r,s,o,l,w,C,M){this._overlay=t,this._element=n,this._viewContainerRef=r,this._menuItemInstance=l,this._dir=w,this._focusMonitor=C,this._ngZone=M,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Ie.EMPTY,this._hoverSubscription=Ie.EMPTY,this._menuCloseSubscription=Ie.EMPTY,this._changeDetectorRef=me(Mn),this._handleTouchStart=P=>{ZT(P)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new De,this.onMenuOpen=this.menuOpened,this.menuClosed=new De,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof bl?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,p7)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,p7),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const t=this.menu;if(this._menuOpen||!t)return;const n=this._createOverlay(t),r=n.getConfig(),s=r.positionStrategy;this._setPosition(t,s),r.hasBackdrop=null==t.hasBackdrop?!this.triggersSubmenu():t.hasBackdrop,n.attach(this._getPortal(t)),t.lazyContent&&t.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(t),t instanceof bl&&(t._startAnimation(),t._directDescendantItems.changes.pipe(Ui(t.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(t,n){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,n):this._element.nativeElement.focus(n)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(t){if(!this._overlayRef||!this.menuOpen)return;const n=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===t||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,n instanceof bl?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(In(r=>"void"===r.toState),er(1),Ui(n.lazyContent._attached)).subscribe({next:()=>n.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),n?.lazyContent?.detach())}_initMenu(t){t.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,this._setMenuElevation(t),t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(t){if(t.setElevation){let n=0,r=t.parentMenu;for(;r;)n++,r=r.parentMenu;t.setElevation(n)}}_setIsMenuOpen(t){t!==this._menuOpen&&(this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(t),this._changeDetectorRef.markForCheck())}_createOverlay(t){if(!this._overlayRef){const n=this._getOverlayConfig(t);this._subscribeToPositions(t,n.positionStrategy),this._overlayRef=this._overlay.create(n),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(t){return new qg({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:t.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:t.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t,n){t.setPositionClasses&&n.positionChanges.subscribe(r=>{const s="start"===r.connectionPair.overlayX?"after":"before",o="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>t.setPositionClasses(s,o)):t.setPositionClasses(s,o)})}_setPosition(t,n){let[r,s]="before"===t.xPosition?["end","start"]:["start","end"],[o,l]="above"===t.yPosition?["bottom","top"]:["top","bottom"],[w,C]=[o,l],[M,P]=[r,s],O=0;if(this.triggersSubmenu()){if(P=r="before"===t.xPosition?"start":"end",s=M="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const L=this._parentMaterialMenu.items.first;this._parentInnerPadding=L?L._getHostElement().offsetTop:0}O="bottom"===o?this._parentInnerPadding:-this._parentInnerPadding}}else t.overlapTrigger||(w="top"===o?"bottom":"top",C="top"===l?"bottom":"top");n.withPositions([{originX:r,originY:w,overlayX:M,overlayY:o,offsetY:O},{originX:s,originY:w,overlayX:P,overlayY:o,offsetY:O},{originX:r,originY:C,overlayX:M,overlayY:l,offsetY:-O},{originX:s,originY:C,overlayX:P,overlayY:l,offsetY:-O}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return Yr(t,this._parentMaterialMenu?this._parentMaterialMenu.closed:vi(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(In(o=>o!==this._menuItemInstance),In(()=>this._menuOpen)):vi(),n)}_handleMousedown(t){KT(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const n=t.keyCode;(13===n||32===n)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===n&&"ltr"===this.dir||37===n&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(In(t=>t===this._menuItemInstance&&!t.disabled),ak(0,tk)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof bl&&this.menu._isAnimating?this.menu._animationDone.pipe(er(1),ak(0,tk),Ui(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(t){return(!this._portal||this._portal.templateRef!==t.templateRef)&&(this._portal=new su(t.templateRef,this._viewContainerRef)),this._portal}static#t=this.\u0275fac=function(n){return new(n||e)(mt(xs),mt(ri),mt(Ir),mt(m7),mt(ok,8),mt(Gl,10),mt(Ba,8),mt(Ul),mt(ei))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(n,r){1&n&&Vt("click",function(o){return r._handleClick(o)})("mousedown",function(o){return r._handleMousedown(o)})("keydown",function(o){return r._handleKeydown(o)}),2&n&&Ti("aria-haspopup",r.menu?"menu":null)("aria-expanded",r.menuOpen)("aria-controls",r.menuOpen?r.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[Wt.None,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[Wt.None,"matMenuTriggerFor","menu"],menuData:[Wt.None,"matMenuTriggerData","menuData"],restoreFocus:[Wt.None,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0})}return e})(),l_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[o_t],imports:[qc,Qg,Ki,qf,lu,Ki]})}return e})();const c_t=["determinateSpinner"];function d_t(e,i){if(1&e&&(ul(),tt(0,"svg",11),we(1,"circle",12),et()),2&e){const t=Ct();Ti("viewBox",t._viewBox()),lt(),Ds("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Ti("r",t._circleRadius())}}const u_t=new ee("mat-progress-spinner-default-options",{providedIn:"root",factory:function h_t(){return{diameter:g7}}}),g7=100;let Eh=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}constructor(t,n,r){this._elementRef=t,this._defaultColor="primary",this._value=0,this._diameter=g7,this._noopAnimations="NoopAnimations"===n&&!!r&&!r._forceAnimations,this.mode="mat-spinner"===t.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",r&&(r.color&&(this.color=this._defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0))}get diameter(){return this._diameter}set diameter(t){this._diameter=t||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const t=2*this._circleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Nr,8),mt(u_t))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(1&n&&Mi(c_t,5),2&n){let s;Be(s=Ve())&&(r._determinateCircle=s.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){2&n&&(Ti("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===r.mode?r.value:null)("mode",r.mode),Ll("mat-"+r.color),Ds("width",r.diameter,"px")("height",r.diameter,"px")("--mdc-circular-progress-size",r.diameter+"px")("--mdc-circular-progress-active-indicator-width",r.diameter+"px"),bi("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===r.mode))},inputs:{color:"color",mode:"mode",value:[Wt.HasDecoratorInputTransform,"value","value",jr],diameter:[Wt.HasDecoratorInputTransform,"diameter","diameter",jr],strokeWidth:[Wt.HasDecoratorInputTransform,"strokeWidth","strokeWidth",jr]},exportAs:["matProgressSpinner"],standalone:!0,features:[on,Vi],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,r){if(1&n&&(Gt(0,d_t,2,8,"ng-template",null,0,wg),tt(2,"div",2,1),ul(),tt(4,"svg",3),we(5,"circle",4),et()(),Q0(),tt(6,"div",5)(7,"div",6)(8,"div",7),ra(9,8),et(),tt(10,"div",9),ra(11,8),et(),tt(12,"div",10),ra(13,8),et()()()),2&n){const s=qi(1);lt(4),Ti("viewBox",r._viewBox()),lt(),Ds("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),Ti("r",r._circleRadius()),lt(4),yt("ngTemplateOutlet",s),lt(2),yt("ngTemplateOutlet",s),lt(2),yt("ngTemplateOutlet",s)}},dependencies:[pT],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner .mdc-circular-progress{width:var(--mdc-circular-progress-size) !important;height:var(--mdc-circular-progress-size) !important}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0})}return e})(),m_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[qc,Ki]})}return e})();const p_t=["*"],x_t=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],y_t=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],b_t=new ee("MAT_CARD_CONFIG");let vC=(()=>{class e{constructor(t){this.appearance=t?.appearance||"raised"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(b_t,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(n,r){2&n&&bi("mat-mdc-card-outlined","outlined"===r.appearance)("mdc-card--outlined","outlined"===r.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],standalone:!0,features:[Vi],ngContentSelectors:p_t,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{color:rgba(0, 0, 0, 0.6);flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mdc-card__action--icon:not(:disabled){color:rgba(0, 0, 0, 0.6)}.mat-mdc-card{border-radius:var(--mdc-elevated-card-container-shape);background-color:var(--mdc-elevated-card-container-color);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color);box-shadow:var(--mdc-elevated-card-container-elevation)}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape)}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width);border-style:solid;border-color:var(--mdc-outlined-card-outline-color);border-radius:var(--mdc-outlined-card-container-shape);background-color:var(--mdc-outlined-card-container-color);box-shadow:var(--mdc-outlined-card-container-elevation)}.mat-mdc-card-outlined .mdc-card::after{border-radius:var(--mdc-outlined-card-container-shape)}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font);line-height:var(--mat-card-title-text-line-height);font-size:var(--mat-card-title-text-size);letter-spacing:var(--mat-card-title-text-tracking);font-weight:var(--mat-card-title-text-weight)}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color);font-family:var(--mat-card-subtitle-text-font);line-height:var(--mat-card-subtitle-text-line-height);font-size:var(--mat-card-subtitle-text-size);letter-spacing:var(--mat-card-subtitle-text-tracking);font-weight:var(--mat-card-subtitle-text-weight)}.mat-mdc-card{position:relative}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0})}return e})(),v7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"],standalone:!0})}return e})(),x7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"],standalone:!0})}return e})(),y7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-mdc-card-subtitle"],standalone:!0})}return e})(),b7=(()=>{class e{constructor(){this.align="start"}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-mdc-card-actions-align-end","end"===r.align)},inputs:{align:"align"},exportAs:["matCardActions"],standalone:!0})}return e})(),w7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],standalone:!0,features:[Vi],ngContentSelectors:y_t,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(n,r){1&n&&(Kn(x_t),xi(0),tt(1,"div",0),xi(2,1),et(),xi(3,2))},encapsulation:2,changeDetection:0})}return e})(),__t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,qc,Ki]})}return e})();const T_t=[[["caption"]],[["colgroup"],["col"]],"*"],C_t=["caption","colgroup, col","*"];function S_t(e,i){1&e&&xi(0,2)}function E_t(e,i){1&e&&(tt(0,"thead",0),ra(1,1),et(),tt(2,"tbody",0),ra(3,2)(4,3),et(),tt(5,"tfoot",0),ra(6,4),et())}function A_t(e,i){1&e&&ra(0,1)(1,2)(2,3)(3,4)}const od=new ee("CDK_TABLE");let tv=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkCellDef",""]],standalone:!0})}return e})(),ev=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkHeaderCellDef",""]],standalone:!0})}return e})(),xC=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkFooterCellDef",""]],standalone:!0})}return e})(),du=(()=>{class e{get name(){return this._name}set name(t){this._setNameInput(t)}get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}get stickyEnd(){return this._stickyEnd}set stickyEnd(t){t!==this._stickyEnd&&(this._stickyEnd=t,this._hasStickyChanged=!0)}constructor(t){this._table=t,this._hasStickyChanged=!1,this._sticky=!1,this._stickyEnd=!1}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static#t=this.\u0275fac=function(n){return new(n||e)(mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkColumnDef",""]],contentQueries:function(n,r,s){if(1&n&&(An(s,tv,5),An(s,ev,5),An(s,xC,5)),2&n){let o;Be(o=Ve())&&(r.cell=o.first),Be(o=Ve())&&(r.headerCell=o.first),Be(o=Ve())&&(r.footerCell=o.first)}},inputs:{name:[Wt.None,"cdkColumnDef","name"],sticky:[Wt.HasDecoratorInputTransform,"sticky","sticky",Je],stickyEnd:[Wt.HasDecoratorInputTransform,"stickyEnd","stickyEnd",Je]},standalone:!0,features:[fi([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),on]})}return e})();class lk{constructor(i,t){t.nativeElement.classList.add(...i._columnCssClassName)}}let ck=(()=>{class e extends lk{constructor(t,n){super(t,n)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(du),mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],standalone:!0,features:[hi]})}return e})(),dk=(()=>{class e extends lk{constructor(t,n){super(t,n);const r=t._table?._getCellRole();r&&n.nativeElement.setAttribute("role",r)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(du),mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],standalone:!0,features:[hi]})}return e})();class T7{constructor(){this.tasks=[],this.endTasks=[]}}const uk=new ee("_COALESCED_STYLE_SCHEDULER");let C7=(()=>{class e{constructor(t){this._ngZone=t,this._currentSchedule=null,this._destroyed=new Pe}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new T7,this._getScheduleObservable().pipe(Ui(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new T7;for(const n of t.tasks)n();for(const n of t.endTasks)n()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Is(Promise.resolve(void 0)):this._ngZone.onStable.pipe(er(1))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ei))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})(),hk=(()=>{class e{constructor(t,n){this.template=t,this._differs=n}ngOnChanges(t){if(!this._columnsDiffer){const n=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(n).create(),this._columnsDiffer.diff(n)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof Py?t.headerCell.template:this instanceof Fy?t.footerCell.template:t.cell.template}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh))};static#e=this.\u0275dir=ce({type:e,features:[tr]})}return e})(),Py=(()=>{class e extends hk{get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}constructor(t,n,r){super(t,n),this._table=r,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh),mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[Wt.None,"cdkHeaderRowDef","columns"],sticky:[Wt.HasDecoratorInputTransform,"cdkHeaderRowDefSticky","sticky",Je]},standalone:!0,features:[on,hi,tr]})}return e})(),Fy=(()=>{class e extends hk{get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}constructor(t,n,r){super(t,n),this._table=r,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh),mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[Wt.None,"cdkFooterRowDef","columns"],sticky:[Wt.HasDecoratorInputTransform,"cdkFooterRowDefSticky","sticky",Je]},standalone:!0,features:[on,hi,tr]})}return e})(),yC=(()=>{class e extends hk{constructor(t,n,r){super(t,n),this._table=r}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh),mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkRowDef",""]],inputs:{columns:[Wt.None,"cdkRowDefColumns","columns"],when:[Wt.None,"cdkRowDefWhen","when"]},standalone:!0,features:[hi]})}return e})(),uu=(()=>{class e{static#t=this.mostRecentCellOutlet=null;constructor(t){this._viewContainer=t,e.mostRecentCellOutlet=this}ngOnDestroy(){e.mostRecentCellOutlet===this&&(e.mostRecentCellOutlet=null)}static#e=this.\u0275fac=function(n){return new(n||e)(mt(Ir))};static#i=this.\u0275dir=ce({type:e,selectors:[["","cdkCellOutlet",""]],standalone:!0})}return e})(),fk=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],standalone:!0,features:[Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),pk=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],standalone:!0,features:[Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),bC=(()=>{class e{constructor(t){this.templateRef=t,this._contentClassName="cdk-no-data-row"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["ng-template","cdkNoDataRow",""]],standalone:!0})}return e})();const S7=["top","bottom","left","right"];class R_t{constructor(i,t,n,r,s=!0,o=!0,l){this._isNativeHtmlTable=i,this._stickCellCss=t,this.direction=n,this._coalescedStyleScheduler=r,this._isBrowser=s,this._needsPositionStickyOnElement=o,this._positionListener=l,this._cachedCellWidths=[],this._borderCellCss={top:`${t}-border-elem-top`,bottom:`${t}-border-elem-bottom`,left:`${t}-border-elem-left`,right:`${t}-border-elem-right`}}clearStickyPositioning(i,t){const n=[];for(const r of i)if(r.nodeType===r.ELEMENT_NODE){n.push(r);for(let s=0;s{for(const r of n)this._removeStickyStyle(r,t)})}updateStickyColumns(i,t,n,r=!0){i.length&&this._isBrowser&&(t.some(s=>s)||n.some(s=>s))?this._coalescedStyleScheduler.schedule(()=>{const s=i[0],o=s.children.length,l=this._getCellWidths(s,r),w=this._getStickyStartColumnPositions(l,t),C=this._getStickyEndColumnPositions(l,n),M=t.lastIndexOf(!0),P=n.indexOf(!0),O="rtl"===this.direction,L=O?"right":"left",U=O?"left":"right";for(const X of i)for(let W=0;Wt[W]?X:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===P?[]:l.slice(P).map((X,W)=>n[W+P]?X:null).reverse()}))}):this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]}))}stickRows(i,t,n){this._isBrowser&&this._coalescedStyleScheduler.schedule(()=>{const r="bottom"===n?i.slice().reverse():i,s="bottom"===n?t.slice().reverse():t,o=[],l=[],w=[];for(let M=0,P=0;M{const n=i.querySelector("tfoot");n&&(t.some(r=>!r)?this._removeStickyStyle(n,["bottom"]):this._addStickyStyle(n,"bottom",0,!1))})}_removeStickyStyle(i,t){for(const r of t)i.style[r]="",i.classList.remove(this._borderCellCss[r]);S7.some(r=>-1===t.indexOf(r)&&i.style[r])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,t,n,r){i.classList.add(this._stickCellCss),r&&i.classList.add(this._borderCellCss[t]),i.style[t]=`${n}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){const t={top:100,bottom:10,left:1,right:1};let n=0;for(const r of S7)i.style[r]&&(n+=t[r]);return n?`${n}`:""}_getCellWidths(i,t=!0){if(!t&&this._cachedCellWidths.length)return this._cachedCellWidths;const n=[],r=i.children;for(let s=0;s0;s--)t[s]&&(n[s]=r,r+=i[s]);return n}}const gk=new ee("CDK_SPL");let vk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._rowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["","rowOutlet",""]],standalone:!0})}return e})(),xk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._headerRowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["","headerRowOutlet",""]],standalone:!0})}return e})(),yk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._footerRowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["","footerRowOutlet",""]],standalone:!0})}return e})(),bk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._noDataRowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["","noDataRowOutlet",""]],standalone:!0})}return e})(),wC=(()=>{class e{_getCellRole(){if(void 0===this._cellRoleInternal){const t=this._elementRef.nativeElement.getAttribute("role"),n="grid"===t||"treegrid"===t?"gridcell":"cell";this._cellRoleInternal=this._isNativeHtmlTable&&"cell"===n?null:n}return this._cellRoleInternal}get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=t,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(t){this._fixedLayout=t,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(t,n,r,s,o,l,w,C,M,P,O,L){this._differs=t,this._changeDetectorRef=n,this._elementRef=r,this._dir=o,this._platform=w,this._viewRepeater=C,this._coalescedStyleScheduler=M,this._viewportRuler=P,this._stickyPositioningListener=O,this._ngZone=L,this._onDestroy=new Pe,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._hasAllOutlets=!1,this._hasInitialized=!1,this._cellRoleInternal=void 0,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new De,this.viewChange=new Wr({start:0,end:Number.MAX_VALUE}),s||r.nativeElement.setAttribute("role","table"),this._document=l,this._isServer=!w.isBrowser,this._isNativeHtmlTable="TABLE"===r.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n),this._viewportRuler.change().pipe(Ui(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(t=>{t?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),yR(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return this._updateNoDataRow(),void this.contentChanged.next();const n=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(t,n,(r,s,o)=>this._getEmbeddedViewArgs(r.item,o),r=>r.item.data,r=>{r.operation===Jd.INSERTED&&r.context&&this._renderCellTemplateForItem(r.record.item.rowDef,r.context)}),this._updateRowIndexContext(),t.forEachIdentityChange(r=>{n.get(r.currentIndex).context.$implicit=r.item.data}),this._updateNoDataRow(),this._ngZone&&ei.isInAngularZone()?this._ngZone.onStable.pipe(er(1),Ui(this._onDestroy)).subscribe(()=>{this.updateStickyColumnStyles()}):this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}setNoDataRow(t){this._customNoDataRow=t}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){const r=E7(this._headerRowOutlet,"thead");r&&(r.style.display=t.length?"":"none")}const n=this._headerRowDefs.map(r=>r.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach(r=>r.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){const r=E7(this._footerRowOutlet,"tfoot");r&&(r.style.display=t.length?"":"none")}const n=this._footerRowDefs.map(r=>r.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(r=>r.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),r=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...t,...n,...r],["left","right"]),this._stickyColumnStylesNeedReset=!1),t.forEach((s,o)=>{this._addStickyColumnStyles([s],this._headerRowDefs[o])}),this._rowDefs.forEach(s=>{const o=[];for(let l=0;l{this._addStickyColumnStyles([s],this._footerRowDefs[o])}),Array.from(this._columnDefsByName.values()).forEach(s=>s.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs();const n=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||n,this._forceRecalculateCellWidths=n,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){const t=[],n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=0;r{const l=r&&r.has(o)?r.get(o):[];if(l.length){const w=l.shift();return w.dataIndex=n,w}return{data:t,rowDef:o,dataIndex:n}})}_cacheColumnDefs(){this._columnDefsByName.clear(),_C(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(n=>{this._columnDefsByName.has(n.name),this._columnDefsByName.set(n.name,n)})}_cacheRowDefs(){this._headerRowDefs=_C(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=_C(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=_C(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(n=>!n.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(o,l)=>o||!!l.getColumnsDiff(),n=this._rowDefs.reduce(t,!1);n&&this._forceRenderDataRows();const r=this._headerRowDefs.reduce(t,!1);r&&this._forceRenderHeaderRows();const s=this._footerRowDefs.reduce(t,!1);return s&&this._forceRenderFooterRows(),n||r||s}_switchDataSource(t){this._data=[],yR(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;yR(this.dataSource)?t=this.dataSource.connect(this):OI(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=vi(this.dataSource)),this._renderChangeSubscription=t.pipe(Ui(this._onDestroy)).subscribe(n=>{this._data=n||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,n)=>this._renderRow(this._headerRowOutlet,t,n)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,n)=>this._renderRow(this._footerRowOutlet,t,n)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,n){const r=Array.from(n.columns||[]).map(l=>this._columnDefsByName.get(l)),s=r.map(l=>l.sticky),o=r.map(l=>l.stickyEnd);this._stickyStyler.updateStickyColumns(t,s,o,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(t){const n=[];for(let r=0;r!s.when||s.when(n,t));else{let s=this._rowDefs.find(o=>o.when&&o.when(n,t))||this._defaultRowDef;s&&r.push(s)}return r}_getEmbeddedViewArgs(t,n){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:n}}_renderRow(t,n,r,s={}){const o=t.viewContainer.createEmbeddedView(n.template,s,r);return this._renderCellTemplateForItem(n,s),o}_renderCellTemplateForItem(t,n){for(let r of this._getCellTemplates(t))uu.mostRecentCellOutlet&&uu.mostRecentCellOutlet._viewContainer.createEmbeddedView(r,n);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let n=0,r=t.length;n{const r=this._columnDefsByName.get(n);return t.extractCellTemplate(r)}):[]}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(n,r)=>n||r.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new R_t(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:vi()).pipe(Ui(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(n=>!n._table||n._table===this)}_updateNoDataRow(){const t=this._customNoDataRow||this._noDataRow;if(!t)return;const n=0===this._rowOutlet.viewContainer.length;if(n===this._isShowingNoDataRow)return;const r=this._noDataRowOutlet.viewContainer;if(n){const s=r.createEmbeddedView(t.templateRef),o=s.rootNodes[0];1===s.rootNodes.length&&o?.nodeType===this._document.ELEMENT_NODE&&(o.setAttribute("role","row"),o.classList.add(t._contentClassName))}else r.clear();this._isShowingNoDataRow=n,this._changeDetectorRef.markForCheck()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(mh),mt(Mn),mt(ri),hl("role"),mt(Ba,8),mt(Ni),mt(ir),mt(my),mt(uk),mt(ou),mt(gk,12),mt(ei,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(n,r,s){if(1&n&&(An(s,bC,5),An(s,du,5),An(s,yC,5),An(s,Py,5),An(s,Fy,5)),2&n){let o;Be(o=Ve())&&(r._noDataRow=o.first),Be(o=Ve())&&(r._contentColumnDefs=o),Be(o=Ve())&&(r._contentRowDefs=o),Be(o=Ve())&&(r._contentHeaderRowDefs=o),Be(o=Ve())&&(r._contentFooterRowDefs=o)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(n,r){2&n&&bi("cdk-table-fixed-layout",r.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[Wt.HasDecoratorInputTransform,"multiTemplateDataRows","multiTemplateDataRows",Je],fixedLayout:[Wt.HasDecoratorInputTransform,"fixedLayout","fixedLayout",Je]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],standalone:!0,features:[fi([{provide:od,useExisting:e},{provide:my,useClass:SG},{provide:uk,useClass:C7},{provide:gk,useValue:null}]),on,Vi],ngContentSelectors:C_t,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,r){1&n&&(Kn(T_t),xi(0),xi(1,1),Gt(2,S_t,1,0)(3,E_t,7,0)(4,A_t,4,0)),2&n&&(lt(2),xn(2,r._isServer?2:-1),lt(),xn(3,r._isNativeHtmlTable?3:4))},dependencies:[xk,vk,bk,yk],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2})}return e})();function _C(e,i){return e.concat(Array.from(i))}function E7(e,i){const t=i.toUpperCase();let n=e.viewContainer.element.nativeElement;for(;n;){const r=1===n.nodeType?n.nodeName:null;if(r===t)return n;if("TABLE"===r)break;n=n.parentNode}return null}let P_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[ek]})}return e})();const F_t=[[["caption"]],[["colgroup"],["col"]],"*"],O_t=["caption","colgroup, col","*"];function L_t(e,i){1&e&&xi(0,2)}function N_t(e,i){1&e&&(tt(0,"thead",0),ra(1,1),et(),tt(2,"tbody",2),ra(3,3)(4,4),et(),tt(5,"tfoot",0),ra(6,5),et())}function B_t(e,i){1&e&&ra(0,1)(1,3)(2,4)(3,5)}let Ah=(()=>{class e extends wC{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275cmp=je({type:e,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-table-fixed-layout",r.fixedLayout)},exportAs:["matTable"],standalone:!0,features:[fi([{provide:wC,useExisting:e},{provide:od,useExisting:e},{provide:uk,useClass:C7},{provide:my,useClass:SG},{provide:gk,useValue:null}]),hi,Vi],ngContentSelectors:O_t,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,r){1&n&&(Kn(F_t),xi(0),xi(1,1),Gt(2,L_t,1,0)(3,N_t,7,0)(4,B_t,4,0)),2&n&&(lt(2),xn(2,r._isServer?2:-1),lt(),xn(3,r._isNativeHtmlTable?3:4))},dependencies:[xk,vk,bk,yk],styles:[".mat-mdc-table-sticky{position:sticky !important}.mdc-data-table{-webkit-overflow-scrolling:touch;display:inline-flex;flex-direction:column;box-sizing:border-box;position:relative}.mdc-data-table__table-container{-webkit-overflow-scrolling:touch;overflow-x:auto;width:100%}.mdc-data-table__table{min-width:100%;border:0;white-space:nowrap;border-spacing:0;table-layout:fixed}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px 0 16px}.mdc-data-table__header-cell--checkbox,.mdc-data-table__cell--checkbox{padding-left:4px;padding-right:0}[dir=rtl] .mdc-data-table__header-cell--checkbox,[dir=rtl] .mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox[dir=rtl],.mdc-data-table__cell--checkbox[dir=rtl]{padding-left:0;padding-right:4px}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color)}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, rgba(0, 0, 0, 0.87));font-family:var(--mat-table-header-headline-font, Roboto, sans-serif);line-height:var(--mat-table-header-headline-line-height);font-size:var(--mat-table-header-headline-size, 14px);font-weight:var(--mat-table-header-headline-weight, 500)}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, rgba(0, 0, 0, 0.87))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, Roboto, sans-serif);line-height:var(--mat-table-row-item-label-text-line-height);font-size:var(--mat-table-row-item-label-text-size, 14px);font-weight:var(--mat-table-row-item-label-text-weight)}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, rgba(0, 0, 0, 0.87));font-family:var(--mat-table-footer-supporting-text-font, Roboto, sans-serif);line-height:var(--mat-table-footer-supporting-text-line-height);font-size:var(--mat-table-footer-supporting-text-size, 14px);font-weight:var(--mat-table-footer-supporting-text-weight);letter-spacing:var(--mat-table-footer-supporting-text-tracking)}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, rgba(0, 0, 0, 0.12));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking);font-weight:inherit;line-height:inherit}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, rgba(0, 0, 0, 0.12));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking);line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking)}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2})}return e})(),hu=(()=>{class e extends tv{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matCellDef",""]],standalone:!0,features:[fi([{provide:tv,useExisting:e}]),hi]})}return e})(),fu=(()=>{class e extends ev{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matHeaderCellDef",""]],standalone:!0,features:[fi([{provide:ev,useExisting:e}]),hi]})}return e})(),mu=(()=>{class e extends du{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matColumnDef",""]],inputs:{name:[Wt.None,"matColumnDef","name"]},standalone:!0,features:[fi([{provide:du,useExisting:e},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),hi]})}return e})(),pu=(()=>{class e extends ck{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],standalone:!0,features:[hi]})}return e})(),gu=(()=>{class e extends dk{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],standalone:!0,features:[hi]})}return e})(),Dh=(()=>{class e extends Py{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[Wt.None,"matHeaderRowDef","columns"],sticky:[Wt.HasDecoratorInputTransform,"matHeaderRowDefSticky","sticky",Je]},standalone:!0,features:[fi([{provide:Py,useExisting:e}]),on,hi]})}return e})(),Mh=(()=>{class e extends yC{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matRowDef",""]],inputs:{columns:[Wt.None,"matRowDefColumns","columns"],when:[Wt.None,"matRowDefWhen","when"]},standalone:!0,features:[fi([{provide:yC,useExisting:e}]),hi]})}return e})(),Ih=(()=>{class e extends fk{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275cmp=je({type:e,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],standalone:!0,features:[fi([{provide:fk,useExisting:e}]),hi,Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),Rh=(()=>{class e extends pk{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275cmp=je({type:e,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],standalone:!0,features:[fi([{provide:pk,useExisting:e}]),hi,Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),j_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,P_t,Ki]})}return e})();class em extends OT{get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}constructor(i=[]){super(),this._renderData=new Wr([]),this._filter=new Wr(""),this._internalPageChanges=new Pe,this._renderChangesSubscription=null,this.sortingDataAccessor=(t,n)=>{const r=t[n];if(qG(r)){const s=Number(r);return s<9007199254740991?s:r}return r},this.sortData=(t,n)=>{const r=n.active,s=n.direction;return r&&""!=s?t.sort((o,l)=>{let w=this.sortingDataAccessor(o,r),C=this.sortingDataAccessor(l,r);const M=typeof w,P=typeof C;M!==P&&("number"===M&&(w+=""),"number"===P&&(C+=""));let O=0;return null!=w&&null!=C?w>C?O=1:w{const r=Object.keys(t).reduce((o,l)=>o+t[l]+"\u25ec","").toLowerCase(),s=n.trim().toLowerCase();return-1!=r.indexOf(s)},this._data=new Wr(i),this._updateChangeSubscription()}_updateChangeSubscription(){const i=this._sort?Yr(this._sort.sortChange,this._sort.initialized):vi(null),t=this._paginator?Yr(this._paginator.page,this._internalPageChanges,this._paginator.initialized):vi(null),r=Zd([this._data,this._filter]).pipe(Di(([l])=>this._filterData(l))),s=Zd([r,i]).pipe(Di(([l])=>this._orderData(l))),o=Zd([s,t]).pipe(Di(([l])=>this._pageData(l)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=o.subscribe(l=>this._renderData.next(l))}_filterData(i){return this.filteredData=null==this.filter||""===this.filter?i:i.filter(t=>this.filterPredicate(t,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;const t=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(t,t+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{const t=this.paginator;if(t&&(t.length=i,t.pageIndex>0)){const n=Math.ceil(t.length/t.pageSize)-1||0,r=Math.min(t.pageIndex,n);r!==t.pageIndex&&(t.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}let D7=(()=>{class e{constructor(t,n){this._renderer=t,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Wd),mt(ri))};static#e=this.\u0275dir=ce({type:e})}return e})(),im=(()=>{class e extends D7{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,features:[hi]})}return e})();const ua=new ee(""),Q_t={provide:ua,useExisting:Sn(()=>Hl),multi:!0},Z_t=new ee("");let Hl=(()=>{class e extends D7{constructor(t,n,r){super(t,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function K_t(){const e=ph()?ph().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Wd),mt(ri),mt(Z_t,8))};static#e=this.\u0275dir=ce({type:e,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(n,r){1&n&&Vt("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[fi([Q_t]),hi]})}return e})();function kh(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function I7(e){return null!=e&&"number"==typeof e.length}const Ys=new ee(""),Ph=new ee(""),J_t=/^(?=.{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])?)*$/;class vu{static min(i){return function R7(e){return i=>{if(kh(i.value)||kh(e))return null;const t=parseFloat(i.value);return!isNaN(t)&&t{if(kh(i.value)||kh(e))return null;const t=parseFloat(i.value);return!isNaN(t)&&t>e?{max:{max:e,actual:i.value}}:null}}(i)}static required(i){return P7(i)}static requiredTrue(i){return function F7(e){return!0===e.value?null:{required:!0}}(i)}static email(i){return function O7(e){return kh(e.value)||J_t.test(e.value)?null:{email:!0}}(i)}static minLength(i){return L7(i)}static maxLength(i){return function N7(e){return i=>I7(i.value)&&i.value.length>e?{maxlength:{requiredLength:e,actualLength:i.value.length}}:null}(i)}static pattern(i){return B7(i)}static nullValidator(i){return null}static compose(i){return W7(i)}static composeAsync(i){return X7(i)}}function P7(e){return kh(e.value)?{required:!0}:null}function L7(e){return i=>kh(i.value)||!I7(i.value)?null:i.value.length{if(kh(n.value))return null;const r=n.value;return i.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function TC(e){return null}function V7(e){return null!=e}function U7(e){return Xx(e)?Is(e):e}function z7(e){let i={};return e.forEach(t=>{i=null!=t?{...i,...t}:i}),0===Object.keys(i).length?null:i}function G7(e,i){return i.map(t=>t(e))}function H7(e){return e.map(i=>function q_t(e){return!e.validate}(i)?i:t=>i.validate(t))}function W7(e){if(!e)return null;const i=e.filter(V7);return 0==i.length?null:function(t){return z7(G7(t,i))}}function wk(e){return null!=e?W7(H7(e)):null}function X7(e){if(!e)return null;const i=e.filter(V7);return 0==i.length?null:function(t){return a7(G7(t,i).map(U7)).pipe(Di(z7))}}function _k(e){return null!=e?X7(H7(e)):null}function j7(e,i){return null===e?[i]:Array.isArray(e)?[...e,i]:[e,i]}function Y7(e){return e._rawValidators}function $7(e){return e._rawAsyncValidators}function Tk(e){return e?Array.isArray(e)?e:[e]:[]}function CC(e,i){return Array.isArray(e)?e.includes(i):e===i}function Q7(e,i){const t=Tk(i);return Tk(e).forEach(r=>{CC(t,r)||t.push(r)}),t}function K7(e,i){return Tk(i).filter(t=>!CC(e,t))}class Z7{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(i){this._rawValidators=i||[],this._composedValidatorFn=wk(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=_k(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,t){return!!this.control&&this.control.hasError(i,t)}getError(i,t){return this.control?this.control.getError(i,t):null}}class Lo extends Z7{get formDirective(){return null}get path(){return null}}class ld extends Z7{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class J7{constructor(i){this._cd=i}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let No=(()=>{class e extends J7{constructor(t){super(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ld,2))};static#e=this.\u0275dir=ce({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){2&n&&bi("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[hi]})}return e})(),nm=(()=>{class e extends J7{constructor(t){super(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Lo,10))};static#e=this.\u0275dir=ce({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){2&n&&bi("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[hi]})}return e})();const Oy="VALID",EC="INVALID",iv="PENDING",Ly="DISABLED";function Ek(e){return(AC(e)?e.validators:e)||null}function Ak(e,i){return(AC(i)?i.asyncValidators:e)||null}function AC(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function tW(e,i,t){const n=e.controls;if(!(i?Object.keys(n):n).length)throw new ue(1e3,"");if(!n[t])throw new ue(1001,"")}function eW(e,i,t){e._forEachChild((n,r)=>{if(void 0===t[r])throw new ue(1002,"")})}class DC{constructor(i,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(i),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get valid(){return this.status===Oy}get invalid(){return this.status===EC}get pending(){return this.status==iv}get disabled(){return this.status===Ly}get enabled(){return this.status!==Ly}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(Q7(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(Q7(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(K7(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(K7(i,this._rawAsyncValidators))}hasValidator(i){return CC(this._rawValidators,i)}hasAsyncValidator(i){return CC(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){this.touched=!0,this._parent&&!i.onlySelf&&this._parent.markAsTouched(i)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(i=>i.markAllAsTouched())}markAsUntouched(i={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}markAsDirty(i={}){this.pristine=!1,this._parent&&!i.onlySelf&&this._parent.markAsDirty(i)}markAsPristine(i={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}markAsPending(i={}){this.status=iv,!1!==i.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!i.onlySelf&&this._parent.markAsPending(i)}disable(i={}){const t=this._parentMarkedDirty(i.onlySelf);this.status=Ly,this.errors=null,this._forEachChild(n=>{n.disable({...i,onlySelf:!0})}),this._updateValue(),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...i,skipPristineCheck:t}),this._onDisabledChange.forEach(n=>n(!0))}enable(i={}){const t=this._parentMarkedDirty(i.onlySelf);this.status=Oy,this._forEachChild(n=>{n.enable({...i,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors({...i,skipPristineCheck:t}),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Oy||this.status===iv)&&this._runAsyncValidator(i.emitEvent)),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(i)}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ly:Oy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i){if(this.asyncValidator){this.status=iv,this._hasOwnPendingAsyncValidator=!0;const t=U7(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:i})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(i,t={}){this.errors=i,this._updateControlsErrors(!1!==t.emitEvent)}get(i){let t=i;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(i,t){const n=t?this.get(t):this;return n&&n.errors?n.errors[i]:null}hasError(i,t){return!!this.getError(i,t)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(i)}_initObservables(){this.valueChanges=new De,this.statusChanges=new De}_calculateStatus(){return this._allControlsDisabled()?Ly:this.errors?EC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(iv)?iv:this._anyControlsHaveStatus(EC)?EC:Oy}_anyControlsHaveStatus(i){return this._anyControls(t=>t.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i={}){this.pristine=!this._anyControlsDirty(),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}_updateTouched(i={}){this.touched=this._anyControlsTouched(),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){AC(i)&&null!=i.updateOn&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){return!i&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=function nTt(e){return Array.isArray(e)?wk(e):e||null}(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=function rTt(e){return Array.isArray(e)?_k(e):e||null}(this._rawAsyncValidators)}}class nv extends DC{constructor(i,t,n){super(Ek(t),Ak(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(i,t){return this.controls[i]?this.controls[i]:(this.controls[i]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(i,t,n={}){this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,t={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(i,t,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],t&&this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,t={}){eW(this,0,i),Object.keys(i).forEach(n=>{tW(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){null!=i&&(Object.keys(i).forEach(n=>{const r=this.controls[n];r&&r.patchValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i={},t={}){this._forEachChild((n,r)=>{n.reset(i?i[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(i,t,n)=>(i[n]=t.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(t,n)=>!!n._syncPendingControls()||t);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(t=>{const n=this.controls[t];n&&i(n,t)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(const[t,n]of Object.entries(this.controls))if(this.contains(t)&&i(n))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(i,t){let n=i;return this._forEachChild((r,s)=>{n=t(n,r,s)}),n}_allControlsDisabled(){for(const i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}}class iW extends nv{}const rm=new ee("CallSetDisabledState",{providedIn:"root",factory:()=>Ny}),Ny="always";function MC(e,i){return[...i.path,e]}function By(e,i,t=Ny){Dk(e,i),i.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&i.valueAccessor.setDisabledState?.(e.disabled),function aTt(e,i){i.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&nW(e,i)})}(e,i),function lTt(e,i){const t=(n,r)=>{i.valueAccessor.writeValue(n),r&&i.viewToModelUpdate(n)};e.registerOnChange(t),i._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,i),function oTt(e,i){i.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&nW(e,i),"submit"!==e.updateOn&&e.markAsTouched()})}(e,i),function sTt(e,i){if(i.valueAccessor.setDisabledState){const t=n=>{i.valueAccessor.setDisabledState(n)};e.registerOnDisabledChange(t),i._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,i)}function IC(e,i,t=!0){const n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),kC(e,i),e&&(i._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function RC(e,i){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(i)})}function Dk(e,i){const t=Y7(e);null!==i.validator?e.setValidators(j7(t,i.validator)):"function"==typeof t&&e.setValidators([t]);const n=$7(e);null!==i.asyncValidator?e.setAsyncValidators(j7(n,i.asyncValidator)):"function"==typeof n&&e.setAsyncValidators([n]);const r=()=>e.updateValueAndValidity();RC(i._rawValidators,r),RC(i._rawAsyncValidators,r)}function kC(e,i){let t=!1;if(null!==e){if(null!==i.validator){const r=Y7(e);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==i.validator);s.length!==r.length&&(t=!0,e.setValidators(s))}}if(null!==i.asyncValidator){const r=$7(e);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==i.asyncValidator);s.length!==r.length&&(t=!0,e.setAsyncValidators(s))}}}const n=()=>{};return RC(i._rawValidators,n),RC(i._rawAsyncValidators,n),t}function nW(e,i){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function rW(e,i){Dk(e,i)}function Ik(e,i){if(!e.hasOwnProperty("model"))return!1;const t=e.model;return!!t.isFirstChange()||!Object.is(i,t.currentValue)}function sW(e,i){e._syncPendingControls(),i.forEach(t=>{const n=t.control;"submit"===n.updateOn&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Rk(e,i){if(!i)return null;let t,n,r;return Array.isArray(i),i.forEach(s=>{s.constructor===Hl?t=s:function uTt(e){return Object.getPrototypeOf(e.constructor)===im}(s)?n=s:r=s}),r||n||t||null}const fTt={provide:Lo,useExisting:Sn(()=>sm)},Vy=Promise.resolve();let sm=(()=>{class e extends Lo{constructor(t,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new De,this.form=new nv({},wk(t),_k(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Vy.then(()=>{const n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),By(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Vy.then(()=>{const n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Vy.then(()=>{const n=this._findContainer(t.path),r=new nv({});rW(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Vy.then(()=>{const n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){Vy.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,sW(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ys,10),mt(Ph,10),mt(rm,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){1&n&&Vt("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:[Wt.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[fi([fTt]),hi]})}return e})();function aW(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}function oW(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const Va=class extends DC{constructor(i=null,t,n){super(Ek(t),Ak(n,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(i),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),AC(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=oW(i)?i.value:i)}setValue(i,t={}){this.value=this._pendingValue=i,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(n=>n(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(i,t={}){this.setValue(i,t)}reset(i=this.defaultValue,t={}){this._applyFormState(i),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){aW(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){aW(this._onDisabledChange,i)}_forEachChild(i){}_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(i){oW(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},mTt=Va,vTt={provide:ld,useExisting:Sn(()=>Wl)},dW=Promise.resolve();let Wl=(()=>{class e extends ld{constructor(t,n,r,s,o,l){super(),this._changeDetectorRef=o,this.callSetDisabledState=l,this.control=new Va,this._registered=!1,this.name="",this.update=new De,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Rk(0,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Ik(t,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(t){this.viewModel=t,this.update.emit(t)}_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(){By(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()}_updateValue(t){dW.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const n=t.isDisabled.currentValue,r=0!==n&&Je(n);dW.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?MC(t,this._parent):[t]}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Lo,9),mt(Ys,10),mt(Ph,10),mt(ua,10),mt(Mn,8),mt(rm,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[Wt.None,"disabled","isDisabled"],model:[Wt.None,"ngModel","model"],options:[Wt.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[fi([vTt]),hi,tr]})}return e})(),rv=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}return e})();const xTt={provide:ua,useExisting:Sn(()=>PC),multi:!0};let PC=(()=>{class e extends im{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=n=>{t(""==n?null:parseFloat(n))}}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){1&n&&Vt("input",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},features:[fi([xTt]),hi]})}return e})();const kk=new ee(""),_Tt={provide:ld,useExisting:Sn(()=>Uy)};let Uy=(()=>{class e extends ld{set isDisabled(t){}static#t=this._ngModelWarningSentOnce=!1;constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=o,this.update=new De,this._ngModelWarningSent=!1,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=Rk(0,r)}ngOnChanges(t){if(this._isControlChanged(t)){const n=t.form.previousValue;n&&IC(n,this,!1),By(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Ik(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&IC(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}static#e=this.\u0275fac=function(n){return new(n||e)(mt(Ys,10),mt(Ph,10),mt(ua,10),mt(kk,8),mt(rm,8))};static#i=this.\u0275dir=ce({type:e,selectors:[["","formControl",""]],inputs:{form:[Wt.None,"formControl","form"],isDisabled:[Wt.None,"disabled","isDisabled"],model:[Wt.None,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[fi([_Tt]),hi,tr]})}return e})();const TTt={provide:Lo,useExisting:Sn(()=>cd)};let cd=(()=>{class e extends Lo{constructor(t,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new De,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(kC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const n=this.form.get(t.path);return By(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){IC(t.control||null,t,!1),function hTt(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this.submitted=!0,sW(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const n=t.control,r=this.form.get(t.path);n!==r&&(IC(n||null,t),(e=>e instanceof Va)(r)&&(By(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const n=this.form.get(t.path);rW(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const n=this.form.get(t.path);n&&function cTt(e,i){return kC(e,i)}(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Dk(this.form,this),this._oldForm&&kC(this._oldForm,this)}_checkFormPresent(){}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ys,10),mt(Ph,10),mt(rm,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,r){1&n&&Vt("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{form:[Wt.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[fi([TTt]),hi,tr]})}return e})();const ETt={provide:ld,useExisting:Sn(()=>sv)};let sv=(()=>{class e extends ld{set isDisabled(t){}static#t=this._ngModelWarningSentOnce=!1;constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.name=null,this.update=new De,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Rk(0,s)}ngOnChanges(t){this._added||this._setUpControl(),Ik(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return MC(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#e=this.\u0275fac=function(n){return new(n||e)(mt(Lo,13),mt(Ys,10),mt(Ph,10),mt(ua,10),mt(kk,8))};static#i=this.\u0275dir=ce({type:e,selectors:[["","formControlName",""]],inputs:{name:[Wt.None,"formControlName","name"],isDisabled:[Wt.None,"disabled","isDisabled"],model:[Wt.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[fi([ETt]),hi,tr]})}return e})();let am=(()=>{class e{constructor(){this._validator=TC}ngOnChanges(t){if(this.inputName in t){const n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):TC,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,features:[tr]})}return e})();const OTt={provide:Ys,useExisting:Sn(()=>FC),multi:!0};let FC=(()=>{class e extends am{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Je,this.createValidator=t=>P7}enabled(t){return t}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,r){2&n&&Ti("required",r._enabled?"":null)},inputs:{required:"required"},features:[fi([OTt]),hi]})}return e})();const BTt={provide:Ys,useExisting:Sn(()=>Nk),multi:!0};let Nk=(()=>{class e extends am{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=t=>function gW(e){return"number"==typeof e?e:parseInt(e,10)}(t),this.createValidator=t=>L7(t)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,r){2&n&&Ti("minlength",r._enabled?r.minlength:null)},inputs:{minlength:"minlength"},features:[fi([BTt]),hi]})}return e})();const UTt={provide:Ys,useExisting:Sn(()=>LC),multi:!0};let LC=(()=>{class e extends am{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>B7(t)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(n,r){2&n&&Ti("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},features:[fi([UTt]),hi]})}return e})(),_W=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();class TW extends DC{constructor(i,t,n){super(Ek(t),Ak(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(i){return this.controls[this._adjustIndex(i)]}push(i,t={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(i,t,n={}){this.controls.splice(i,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,t={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(i,t,n={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,t={}){eW(this,0,i),i.forEach((n,r)=>{tW(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){null!=i&&(i.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i=[],t={}){this._forEachChild((n,r)=>{n.reset(i[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((t,n)=>!!n._syncPendingControls()||t,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((t,n)=>{i(t,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(t=>t.enabled&&i(t))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(const i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}}function CW(e){return!!e&&(void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn)}let NC=(()=>{class e{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new e;return t.useNonNullable=!0,t}group(t,n=null){const r=this._reduceControls(t);let s={};return CW(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new nv(r,s)}record(t,n=null){const r=this._reduceControls(t);return new iW(r,n)}control(t,n,r){let s={};return this.useNonNullable?(CW(n)?s=n:(s.validators=n,s.asyncValidators=r),new Va(t,{...s,nonNullable:!0})):new Va(t,n,r)}array(t,n,r){const s=t.map(o=>this._createControl(o));return new TW(s,n,r)}_reduceControls(t){const n={};return Object.keys(t).forEach(r=>{n[r]=this._createControl(t[r])}),n}_createControl(t){return t instanceof Va||t instanceof DC?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Bk=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:rm,useValue:t.callSetDisabledState??Ny}]}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[_W]})}return e})(),zTt=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:kk,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:rm,useValue:t.callSetDisabledState??Ny}]}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[_W]})}return e})();class HTt{constructor(i){this._box=i,this._destroyed=new Pe,this._resizeSubject=new Pe,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new ur(t=>{const n=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),n.unsubscribe(),this._elementObservables.delete(i)}}).pipe(In(t=>t.some(n=>n.target===i)),function GTt(e,i,t){let n,r=!1;return e&&"object"==typeof e?({bufferSize:n=1/0,windowTime:i=1/0,refCount:r=!1,scheduler:t}=e):n=e??1/0,o7({connector:()=>new py(n,i,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}({bufferSize:1,refCount:!0}),Ui(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}}let WTt=(()=>{class e{constructor(){this._observers=new Map,this._ngZone=me(ei)}ngOnDestroy(){for(const[,t]of this._observers)t.destroy();this._observers.clear()}observe(t,n){const r=n?.box||"content-box";return this._observers.has(r)||this._observers.set(r,new HTt(r)),this._observers.get(r).observe(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const XTt=["notch"],jTt=["matFormFieldNotchedOutline",""],YTt=["*"],$Tt=["textField"],QTt=["iconPrefixContainer"],KTt=["textPrefixContainer"],ZTt=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],JTt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function qTt(e,i){1&e&&we(0,"span",17)}function tCt(e,i){if(1&e&&(tt(0,"label",16),xi(1,1),Gt(2,qTt,1,0,"span",17),et()),2&e){const t=Ct(2);yt("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),Ti("for",t._control.id),lt(2),xn(2,!t.hideRequiredMarker&&t._control.required?2:-1)}}function eCt(e,i){1&e&&Gt(0,tCt,3,5,"label",16),2&e&&xn(0,Ct()._hasFloatingLabel()?0:-1)}function iCt(e,i){1&e&&we(0,"div",5)}function nCt(e,i){}function rCt(e,i){1&e&&Gt(0,nCt,0,0,"ng-template",11),2&e&&(Ct(2),yt("ngTemplateOutlet",qi(1)))}function sCt(e,i){if(1&e&&(tt(0,"div",7),Gt(1,rCt,1,1,null,11),et()),2&e){const t=Ct();yt("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),lt(),xn(1,t._forceDisplayInfixLabel()?-1:1)}}function aCt(e,i){1&e&&(tt(0,"div",8,2),xi(2,2),et())}function oCt(e,i){1&e&&(tt(0,"div",9,3),xi(2,3),et())}function lCt(e,i){}function cCt(e,i){1&e&&Gt(0,lCt,0,0,"ng-template",11),2&e&&(Ct(),yt("ngTemplateOutlet",qi(1)))}function dCt(e,i){1&e&&(tt(0,"div",12),xi(1,4),et())}function uCt(e,i){1&e&&(tt(0,"div",13),xi(1,5),et())}function hCt(e,i){1&e&&we(0,"div",14)}function fCt(e,i){1&e&&(tt(0,"div",18),xi(1,6),et()),2&e&&yt("@transitionMessages",Ct()._subscriptAnimationState)}function mCt(e,i){if(1&e&&(tt(0,"mat-hint",20),ut(1),et()),2&e){const t=Ct(2);yt("id",t._hintLabelId),lt(),Ze(t.hintLabel)}}function pCt(e,i){if(1&e&&(tt(0,"div",19),Gt(1,mCt,2,2,"mat-hint",20),xi(2,7),we(3,"div",21),xi(4,8),et()),2&e){const t=Ct();yt("@transitionMessages",t._subscriptAnimationState),lt(),xn(1,t.hintLabel?1:-1)}}let wl=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-label"]],standalone:!0})}return e})(),gCt=0;const SW=new ee("MatError");let EW=(()=>{class e{constructor(t,n){this.id="mat-mdc-error-"+gCt++,t||n.nativeElement.setAttribute("aria-live","polite")}static#t=this.\u0275fac=function(n){return new(n||e)(hl("aria-live"),mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(n,r){2&n&&Kc("id",r.id)},inputs:{id:"id"},standalone:!0,features:[fi([{provide:SW,useExisting:e}])]})}return e})(),vCt=0,om=(()=>{class e{constructor(){this.align="start",this.id="mat-mdc-hint-"+vCt++}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(n,r){2&n&&(Kc("id",r.id),Ti("align",null),bi("mat-mdc-form-field-hint-end","end"===r.align))},inputs:{align:"align",id:"id"},standalone:!0})}return e})();const xCt=new ee("MatPrefix"),AW=new ee("MatSuffix");let DW=(()=>{class e{constructor(){this._isText=!1}set _isTextSelector(t){this._isText=!0}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[Wt.None,"matTextSuffix","_isTextSelector"]},standalone:!0,features:[fi([{provide:AW,useExisting:e}])]})}return e})();const MW=new ee("FloatingLabelParent");let IW=(()=>{class e{get floating(){return this._floating}set floating(t){this._floating=t,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(t){this._monitorResize=t,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(t){this._elementRef=t,this._floating=!1,this._monitorResize=!1,this._resizeObserver=me(WTt),this._ngZone=me(ei),this._parent=me(MW),this._resizeSubscription=new Ie}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return function yCt(e){if(null!==e.offsetParent)return e.scrollWidth;const t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const n=t.scrollWidth;return t.remove(),n}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-floating-label--float-above",r.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0})}return e})();const RW="mdc-line-ripple--active",BC="mdc-line-ripple--deactivating";let kW=(()=>{class e{constructor(t,n){this._elementRef=t,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(BC);"opacity"===r.propertyName&&o&&s.remove(RW,BC)},n.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(BC),t.add(RW)}deactivate(){this._elementRef.nativeElement.classList.add(BC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ei))};static#e=this.\u0275dir=ce({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0})}return e})(),PW=(()=>{class e{constructor(t,n){this._elementRef=t,this._ngZone=n,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(t){this._notch.nativeElement.style.width=this.open&&t?`calc(${t}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:""}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ei))};static#e=this.\u0275cmp=je({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(n,r){if(1&n&&Mi(XTt,5),2&n){let s;Be(s=Ve())&&(r._notch=s.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-notched-outline--notched",r.open)},inputs:{open:[Wt.None,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[Vi],attrs:jTt,ngContentSelectors:YTt,decls:5,vars:0,consts:[["notch",""],[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(n,r){1&n&&(Kn(),we(0,"div",1),tt(1,"div",2,0),xi(3),et(),we(4,"div",3))},encapsulation:2,changeDetection:0})}return e})();const bCt={transitionMessages:mr("transitionMessages",[Nn("enter",si({opacity:1,transform:"translateY(0%)"})),ln("void => enter",[si({opacity:0,transform:"translateY(-5px)"}),an("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let VC=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e})}return e})();const UC=new ee("MatFormField"),wCt=new ee("MAT_FORM_FIELD_DEFAULT_OPTIONS");let FW=0,Xl=(()=>{class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=la(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const n=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==n&&(this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,n,r,s,o,l,w,C){this._elementRef=t,this._changeDetectorRef=n,this._ngZone=r,this._dir=s,this._platform=o,this._defaults=l,this._animationMode=w,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+FW++,this._hintLabelId="mat-mdc-hint-"+FW++,this._subscriptAnimationState="",this._destroyed=new Pe,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,l&&(l.appearance&&(this.appearance=l.appearance),this._hideRequiredMarker=!!l?.hideRequiredMarker,l.color&&(this.color=l.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${t.controlType}`),t.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Ui(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yr(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Ui(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ui(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(t){const n=this._control?this._control.ngControl:null;return n&&n[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){this._hasOutline()&&this._floatingLabel&&this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth()):this._notchedOutline?._setNotchWidth(0)}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const n=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;n?t.push(n.id):this._hintLabel&&t.push(this._hintLabelId),r&&t.push(r.id)}else this._errorChildren&&t.push(...this._errorChildren.map(n=>n.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const n=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,s=n?.getBoundingClientRect().width??0,o=r?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${s+o}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const n=t.getRootNode();return n&&n!==t}return document.documentElement.contains(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Mn),mt(ei),mt(Ba),mt(ir),mt(wCt,8),mt(Nr,8),mt(Ni))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-form-field"]],contentQueries:function(n,r,s){if(1&n&&(An(s,wl,5),An(s,wl,7),An(s,VC,5),An(s,xCt,5),An(s,AW,5),An(s,SW,5),An(s,om,5)),2&n){let o;Be(o=Ve())&&(r._labelChildNonStatic=o.first),Be(o=Ve())&&(r._labelChildStatic=o.first),Be(o=Ve())&&(r._formFieldControl=o.first),Be(o=Ve())&&(r._prefixChildren=o),Be(o=Ve())&&(r._suffixChildren=o),Be(o=Ve())&&(r._errorChildren=o),Be(o=Ve())&&(r._hintChildren=o)}},viewQuery:function(n,r){if(1&n&&(Mi($Tt,5),Mi(QTt,5),Mi(KTt,5),Mi(IW,5),Mi(PW,5),Mi(kW,5)),2&n){let s;Be(s=Ve())&&(r._textField=s.first),Be(s=Ve())&&(r._iconPrefixContainer=s.first),Be(s=Ve())&&(r._textPrefixContainer=s.first),Be(s=Ve())&&(r._floatingLabel=s.first),Be(s=Ve())&&(r._notchedOutline=s.first),Be(s=Ve())&&(r._lineRipple=s.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(n,r){2&n&&bi("mat-mdc-form-field-label-always-float",r._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",r._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",r._hasIconSuffix)("mat-form-field-invalid",r._control.errorState)("mat-form-field-disabled",r._control.disabled)("mat-form-field-autofilled",r._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===r._animationMode)("mat-form-field-appearance-fill","fill"==r.appearance)("mat-form-field-appearance-outline","outline"==r.appearance)("mat-form-field-hide-placeholder",r._hasFloatingLabel()&&!r._shouldLabelFloat())("mat-focused",r._control.focused)("mat-primary","accent"!==r.color&&"warn"!==r.color)("mat-accent","accent"===r.color)("mat-warn","warn"===r.color)("ng-untouched",r._shouldForward("untouched"))("ng-touched",r._shouldForward("touched"))("ng-pristine",r._shouldForward("pristine"))("ng-dirty",r._shouldForward("dirty"))("ng-valid",r._shouldForward("valid"))("ng-invalid",r._shouldForward("invalid"))("ng-pending",r._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[fi([{provide:UC,useExisting:e},{provide:MW,useExisting:e}]),Vi],ngContentSelectors:JTt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(n,r){if(1&n){const s=ve();Kn(ZTt),Gt(0,eCt,1,1,"ng-template",null,0,wg),tt(2,"div",4,1),Vt("click",function(l){return Ut(s),zt(r._control.onContainerClick(l))}),Gt(4,iCt,1,0,"div",5),tt(5,"div",6),Gt(6,sCt,2,2,"div",7)(7,aCt,3,0,"div",8)(8,oCt,3,0,"div",9),tt(9,"div",10),Gt(10,cCt,1,1,null,11),xi(11),et(),Gt(12,dCt,2,0,"div",12)(13,uCt,2,0,"div",13),et(),Gt(14,hCt,1,0,"div",14),et(),tt(15,"div",15),Gt(16,fCt,2,1)(17,pCt,5,2),et()}if(2&n){let s;lt(2),bi("mdc-text-field--filled",!r._hasOutline())("mdc-text-field--outlined",r._hasOutline())("mdc-text-field--no-label",!r._hasFloatingLabel())("mdc-text-field--disabled",r._control.disabled)("mdc-text-field--invalid",r._control.errorState),lt(2),xn(4,r._hasOutline()||r._control.disabled?-1:4),lt(2),xn(6,r._hasOutline()?6:-1),lt(),xn(7,r._hasIconPrefix?7:-1),lt(),xn(8,r._hasTextPrefix?8:-1),lt(2),xn(10,!r._hasOutline()||r._forceDisplayInfixLabel()?10:-1),lt(2),xn(12,r._hasTextSuffix?12:-1),lt(),xn(13,r._hasIconSuffix?13:-1),lt(),xn(14,r._hasOutline()?-1:14),lt(),bi("mat-mdc-form-field-subscript-dynamic-size","dynamic"===r.subscriptSizing),lt(),xn(16,"error"===(s=r._getDisplayedMessages())?16:"hint"===s?17:-1)}},dependencies:[IW,PW,pT,kW,om],styles:['.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 96px/0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-top:1px solid;border-bottom:1px solid}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{max-width:calc(100% - 12px*2)}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-text-field--filled{border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-text-field--filled .mdc-line-ripple::before{border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(.75*var(--mdc-outlined-text-field-label-text-size))}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mdc-outlined-text-field-label-text-size)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[bCt.transitionMessages]},changeDetection:0})}return e})(),zC=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,qc,LR,Ki]})}return e})();const CCt=["panel"],SCt=["*"];function ECt(e,i){if(1&e){const t=ve();tt(0,"div",1,0),Vt("@panelAnimation.done",function(r){return Ut(t),zt(Ct()._animationDone.next(r))}),xi(2),et()}if(2&e){const t=i.id,n=Ct();yt("id",n.id)("ngClass",n._classList)("@panelAnimation",n.isOpen?"visible":"hidden"),Ti("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}const ACt=mr("panelAnimation",[Nn("void, hidden",si({opacity:0,transform:"scaleY(0.8)"})),ln(":enter, hidden => visible",[KR([an("0.03s linear",si({opacity:1})),an("0.12s cubic-bezier(0, 0, 0.2, 1)",si({transform:"scaleY(1)"}))])]),ln(":leave, visible => hidden",[an("0.075s linear",si({opacity:0}))])]);let DCt=0;class MCt{constructor(i,t){this.source=i,this.option=t}}const NW=new ee("mat-autocomplete-default-options",{providedIn:"root",factory:function ICt(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}});let RCt=(()=>{class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(t){this._color=t,this._setThemeClasses(this._classList)}set classList(t){this._classList=t&&t.length?function Fbt(e,i=/\s+/){const t=[];if(null!=e){const n=Array.isArray(e)?e:`${e}`.split(i);for(const r of n){const s=`${r}`.trim();s&&t.push(s)}}return t}(t).reduce((n,r)=>(n[r]=!0,n),{}):{},this._setVisibilityClasses(this._classList),this._setThemeClasses(this._classList),this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}constructor(t,n,r,s){this._changeDetectorRef=t,this._elementRef=n,this._defaults=r,this._activeOptionChanges=Ie.EMPTY,this._visibleClass="mat-mdc-autocomplete-visible",this._hiddenClass="mat-mdc-autocomplete-hidden",this._animationDone=new De,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new De,this.opened=new De,this.closed=new De,this.optionActivated=new De,this._classList={},this.id="mat-autocomplete-"+DCt++,this.inertGroups=s?.SAFARI||!1,this.autoActiveFirstOption=!!r.autoActiveFirstOption,this.autoSelectActiveOption=!!r.autoSelectActiveOption,this.requireSelection=!!r.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new dH(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const n=new MCt(this,t);this.optionSelected.emit(n)}_getPanelAriaLabelledby(t){return this.ariaLabel?null:this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_setVisibilityClasses(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}_setThemeClasses(t){t["mat-primary"]="primary"===this._color,t["mat-warn"]="warn"===this._color,t["mat-accent"]="accent"===this._color}_skipPredicate(){return!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn),mt(ri),mt(NW),mt(ir))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(n,r,s){if(1&n&&(An(s,nu,5),An(s,WR,5)),2&n){let o;Be(o=Ve())&&(r.options=o),Be(o=Ve())&&(r.optionGroups=o)}},viewQuery:function(n,r){if(1&n&&(Mi(fr,7),Mi(CCt,5)),2&n){let s;Be(s=Ve())&&(r.template=s.first),Be(s=Ve())&&(r.panel=s.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[Wt.HasDecoratorInputTransform,"autoActiveFirstOption","autoActiveFirstOption",Je],autoSelectActiveOption:[Wt.HasDecoratorInputTransform,"autoSelectActiveOption","autoSelectActiveOption",Je],requireSelection:[Wt.HasDecoratorInputTransform,"requireSelection","requireSelection",Je],panelWidth:"panelWidth",disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],classList:[Wt.None,"class","classList"],hideSingleSelectionIndicator:[Wt.HasDecoratorInputTransform,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Je]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[fi([{provide:HR,useExisting:e}]),on,Vi],ngContentSelectors:SCt,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id","ngClass"]],template:function(n,r){1&n&&(Kn(),Gt(0,ECt,3,5,"ng-template"))},dependencies:[bc],styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape);box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[ACt]},changeDetection:0})}return e})();const kCt={provide:ua,useExisting:Sn(()=>VW),multi:!0},BW=new ee("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}}),FCt={provide:BW,deps:[xs],useFactory:function PCt(e){return()=>e.scrollStrategies.reposition()}};let VW=(()=>{class e{constructor(t,n,r,s,o,l,w,C,M,P,O){this._element=t,this._overlay=n,this._viewContainerRef=r,this._zone=s,this._changeDetectorRef=o,this._dir=w,this._formField=C,this._document=M,this._viewportRuler=P,this._defaults=O,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Ie.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Pe,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=Dg(()=>{const L=this.autocomplete?this.autocomplete.options:null;return L?L.changes.pipe(Ta(L),Rs(()=>Yr(...L.map(U=>U.onSelectionChange)))):this._zone.onStable.pipe(er(1),Rs(()=>this.optionSelections))}),this._handlePanelKeydown=L=>{(27===L.keyCode&&!io(L)||38===L.keyCode&&io(L,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),L.stopPropagation(),L.preventDefault())},this._trackedModal=null,this._scrollStrategy=l}ngAfterViewInit(){const t=this._getWindow();typeof t<"u"&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const t=this._getWindow();typeof t<"u"&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._isOpen=this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal)&&Yg(this._trackedModal,"aria-owns",this.autocomplete.id)}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Yr(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(In(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(In(()=>this._overlayAttached)):vi()).pipe(Di(t=>t instanceof MH?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Yr(Sc(this._document,"click"),Sc(this._document,"auxclick"),Sc(this._document,"touchend")).pipe(In(t=>{const n=yl(t),r=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,s=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&n!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(n))&&(!s||!s.contains(n))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(n)}))}writeValue(t){Promise.resolve(null).then(()=>this._assignOptionValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const n=t.keyCode,r=io(t);if(27===n&&!r&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&13===n&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const s=this.autocomplete._keyManager.activeItem,o=38===n||40===n;9===n||o&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):o&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(o||this.autocomplete._keyManager.activeItem!==s)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(t){let n=t.target,r=n.value;if("number"===n.type&&(r=""==r?null:parseFloat(r)),this._previousValue!==r){if(this._previousValue=r,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(r),r){if(this.panelOpen&&!this.autocomplete.requireSelection){const s=this.autocomplete.options?.find(o=>o.selected);s&&r!==this._getDisplayValue(s.value)&&s.deselect(!1)}}else this._clearPreviousSelectedOption(null,!1);if(this._canOpen()&&this._document.activeElement===t.target){const s=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(s)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return Yr(this._zone.onStable.pipe(er(1)),this.autocomplete.options.changes.pipe(hs(()=>this._positionStrategy.reapplyLastPosition()),ak(0))).pipe(Rs(()=>(this._zone.run(()=>{const r=this.panelOpen;this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit())}),this.panelClosingActions)),er(1)).subscribe(r=>this._setValueAndClose(r))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(t){const n=this.autocomplete;return n&&n.displayWith?n.displayWith(t):t}_assignOptionValue(t){const n=this._getDisplayValue(t);null==t&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(n??"")}_updateNativeInputValue(t){this._formField?this._formField._control.value=t:this._element.nativeElement.value=t,this._previousValue=t}_setValueAndClose(t){const n=this.autocomplete,r=t?t.source:this._pendingAutoselectedOption;r?(this._clearPreviousSelectedOption(r),this._assignOptionValue(r.value),this._onChange(r.value),n._emitSelectEvent(r),this._element.nativeElement.focus()):n.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),n._animationDone?n._animationDone.pipe(er(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(t,n){this.autocomplete?.options?.forEach(r=>{r!==t&&r.selected&&r.deselect(n)})}_openPanelInternal(t=this._element.nativeElement.value){this._attachOverlay(t),this._floatLabel(),this._trackedModal&&jT(this._trackedModal,"aria-owns",this.autocomplete.id)}_attachOverlay(t){let n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new su(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&n&&n.updateSize({width:this._getPanelWidth()})})),n&&!n.hasAttached()&&(n.attach(this._portal),this._valueOnAttach=t,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());const r=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&r!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){const t=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=t.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=t.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new qg({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){const t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){const n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,s=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];let o;o="above"===this.position?s:"below"===this.position?n:[...n,...s],t.withPositions(o)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const t=this.autocomplete;if(t.autoActiveFirstOption){let n=-1;for(let r=0;r .cdk-overlay-container [aria-modal="true"]');if(!t)return;const n=this.autocomplete.id;this._trackedModal&&Yg(this._trackedModal,"aria-owns",n),jT(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(Yg(this._trackedModal,"aria-owns",this.autocomplete.id),this._trackedModal=null)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(xs),mt(Ir),mt(ei),mt(Mn),mt(BW),mt(Ba,8),mt(UC,9),mt(Ni,8),mt(ou),mt(NW,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(n,r){1&n&&Vt("focusin",function(){return r._handleFocus()})("blur",function(){return r._onTouched()})("input",function(o){return r._handleInput(o)})("keydown",function(o){return r._handleKeydown(o)})("click",function(){return r._handleClick()}),2&n&&Ti("autocomplete",r.autocompleteAttribute)("role",r.autocompleteDisabled?null:"combobox")("aria-autocomplete",r.autocompleteDisabled?null:"list")("aria-activedescendant",r.panelOpen&&r.activeOption?r.activeOption.id:null)("aria-expanded",r.autocompleteDisabled?null:r.panelOpen.toString())("aria-controls",r.autocompleteDisabled||!r.panelOpen||null==r.autocomplete?null:r.autocomplete.id)("aria-haspopup",r.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[Wt.None,"matAutocomplete","autocomplete"],position:[Wt.None,"matAutocompletePosition","position"],connectedTo:[Wt.None,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[Wt.None,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[Wt.HasDecoratorInputTransform,"matAutocompleteDisabled","autocompleteDisabled",Je]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[fi([kCt]),on,tr]})}return e})(),OCt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[FCt],imports:[qf,eC,Ki,qc,lu,eC,Ki]})}return e})();const UW=Cc({passive:!0});let LCt=(()=>{class e{constructor(t,n){this._platform=t,this._ngZone=n,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return Zo;const n=vs(t),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Pe,o="cdk-text-field-autofilled",l=w=>{"cdk-text-field-autofill-start"!==w.animationName||n.classList.contains(o)?"cdk-text-field-autofill-end"===w.animationName&&n.classList.contains(o)&&(n.classList.remove(o),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!1}))):(n.classList.add(o),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{n.addEventListener("animationstart",l,UW),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",l,UW)}}),s}stopMonitoring(t){const n=vs(t),r=this._monitoredElements.get(n);r&&(r.unlisten(),r.subject.complete(),n.classList.remove("cdk-text-field-autofill-monitored"),n.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(n))}ngOnDestroy(){this._monitoredElements.forEach((t,n)=>this.stopMonitoring(n))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(ei))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),NCt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const BCt=new ee("MAT_INPUT_VALUE_ACCESSOR"),VCt=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let UCt=0,Fh=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=la(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(vu.required)??!1}set required(t){this._required=la(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&KG().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=la(t)}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,n,r,s,o,l,w,C,M,P){this._elementRef=t,this._platform=n,this.ngControl=r,this._autofillMonitor=C,this._formField=P,this._uid="mat-input-"+UCt++,this.focused=!1,this.stateChanges=new Pe,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(U=>KG().has(U)),this._iOSKeyupListener=U=>{const X=U.target;!X.value&&0===X.selectionStart&&0===X.selectionEnd&&(X.setSelectionRange(1,1),X.setSelectionRange(0,0))};const O=this._elementRef.nativeElement,L=O.nodeName.toLowerCase();this._inputValueAccessor=w||O,this._previousNativeValue=this.value,this.id=this.id,n.IOS&&M.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._errorStateTracker=new GR(l,r,o,s,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===L,this._isTextarea="textarea"===L,this._isInFormField=!!P,this._isNativeSelect&&(this.controlType=O.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(t){t!==this.focused&&(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_dirtyCheckPlaceholder(){const t=this._getPlaceholder();if(t!==this._previousPlaceholder){const n=this._elementRef.nativeElement;this._previousPlaceholder=t,t?n.setAttribute("placeholder",t):n.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){VCt.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,n=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&n&&n.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const t=this._elementRef.nativeElement;return this._isNativeSelect&&(t.multiple||t.size>1)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ir),mt(ld,10),mt(sm,8),mt(cd,8),mt(_H),mt(BCt,10),mt(LCt),mt(ei),mt(UC,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(n,r){1&n&&Vt("focus",function(){return r._focusChanged(!0)})("blur",function(){return r._focusChanged(!1)})("input",function(){return r._onInput()}),2&n&&(Kc("id",r.id)("disabled",r.disabled)("required",r.required),Ti("name",r.name||null)("readonly",r.readonly&&!r._isNativeSelect||null)("aria-invalid",r.empty&&r.required?null:r.errorState)("aria-required",r.required)("id",r.id),bi("mat-input-server",r._isServer)("mat-mdc-form-field-textarea-control",r._isInFormField&&r._isTextarea)("mat-mdc-form-field-input-control",r._isInFormField)("mdc-text-field__input",r._isInFormField)("mat-mdc-native-select-inline",r._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[Wt.None,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],standalone:!0,features:[fi([{provide:VC,useExisting:e}]),tr]})}return e})(),zCt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,zC,zC,NCt,Ki]})}return e})();function GCt(e,i){if(1&e&&(tt(0,"mat-label"),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.binding.title)}}function HCt(e,i){if(1&e){const t=ve();tt(0,"button",7),Vt("click",function(){return Ut(t),zt(Ct().clearInput())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function WCt(e,i){1&e&&(tt(0,"mat-option",8),we(1,"mat-spinner",9),et())}function XCt(e,i){if(1&e&&(tt(0,"mat-option",10)(1,"span",11),ut(2),et(),ut(3),et()),2&e){const t=i.$implicit;yt("value",t),lt(2),Ze(t.code),lt(),Ye("",t.display," ")}}let av=(()=>{class e{static#t=this.nextId=0;constructor(t){this.terminologyService=t,this.term="",this.selectionChange=new De,this.formControl=new mTt,this.loading=!1,this.selectedConcept={},this.stateChanges=new Pe,this.focused=!1,this.ngControl=null,this.errorState=!1,this.controlType="app-autocomplete-binding",this.id="app-autocomplete-binding-"+e.nextId++,this.describedBy="",this.onChange=()=>{},this.onTouched=()=>{}}get empty(){return!this.formControl.value}setDescribedByIds(t){this.describedBy=t.join(" ")}onContainerClick(t){}writeValue(t){this.formControl.setValue(t&&"object"==typeof t&&t.display?t.display:t,{emitEvent:!1})}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}ngOnChanges(t){t.term&&(this.term=t.term.currentValue,this.formControl.setValue(this.term&&"object"==typeof this.term&&this.term.display?this.term.display:this.term))}ngOnInit(){this.autoFilter=this.formControl.valueChanges.pipe(tu(300),eu(),Rs(t=>t?.length>=3?(this.loading=!0,this.terminologyService.expandValueSet(this.binding.ecl,t,0,50)):vi([])),hs(t=>{this.loading=!1}))}onTermChange(){this.formControl.setValue(this.term)}optionSelected(t){this.selectedConcept=t,this.selectionChange.emit(t),this.onChange(t)}clearInput(){this.formControl.reset(),this.selectedConcept={code:"",display:""},this.selectionChange.emit(this.selectedConcept)}change(t){const n=t?.option?.value;n&&(this.optionSelected({code:n.code,display:n.display}),this.formControl.setValue(n.display))}static#e=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#i=this.\u0275cmp=je({type:e,selectors:[["app-autocomplete-binding"]],inputs:{binding:"binding",term:"term"},outputs:{selectionChange:"selectionChange"},features:[fi([{provide:ua,useExisting:Sn(()=>e),multi:!0},{provide:VC,useExisting:e}]),tr],decls:11,vars:10,consts:[["auto","matAutocomplete"],[4,"ngIf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["disabled","","class","loading",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["disabled","",1,"loading"],["diameter","35"],[3,"value"],[1,"code"]],template:function(n,r){if(1&n){const s=ve();tt(0,"mat-form-field"),Gt(1,GCt,2,1,"mat-label",1),we(2,"input",2),tt(3,"mat-hint"),ut(4),et(),Gt(5,HCt,3,0,"button",3),tt(6,"mat-autocomplete",4,0),Vt("optionSelected",function(l){return Ut(s),zt(r.change(l))}),Gt(8,WCt,2,0,"mat-option",5)(9,XCt,4,3,"mat-option",6),sa(10,"async"),et()()}if(2&n){let s;const o=qi(7);lt(),yt("ngIf",r.binding.title),lt(),hh("placeholder",(null==r.formControl.value?null:r.formControl.value.display)||r.binding.title||"Search..."),yt("formControl",r.formControl)("matAutocomplete",o),lt(2),Ze(r.binding.note),lt(),yt("ngIf",r.formControl.value),lt(3),yt("ngIf",r.loading),lt(),yt("ngForOf",null==(s=xc(10,8,r.autoFilter))||null==s.expansion?null:s.expansion.contains)}},dependencies:[gs,Ms,Oo,da,Xl,wl,om,DW,RCt,nu,VW,Eh,Fh,Hl,No,Uy,wI],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}.id-icon[_ngcontent-%COMP%]{margin-left:10px;color:#2e8b57}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();function jCt(e,i){1&e&&we(0,"mat-spinner",20)}function YCt(e,i){1&e&&(tt(0,"th",21),ut(1," Date "),et())}function $Ct(e,i){if(1&e&&(tt(0,"td",22),ut(1),sa(2,"date"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",Xd(2,1,t.date,"yyyy-MM-dd")," ")}}function QCt(e,i){1&e&&(tt(0,"th",21),ut(1," ConceptId "),et())}function KCt(e,i){if(1&e&&(tt(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.code," ")}}function ZCt(e,i){1&e&&(tt(0,"th",21),ut(1," Term "),et())}function JCt(e,i){1&e&&(tt(0,"span",24),ut(1,"Allergy / Intolerance condition"),et())}function qCt(e,i){if(1&e&&(tt(0,"td",22),Gt(1,JCt,2,0,"span",23),ut(2),et()),2&e){const t=i.$implicit;lt(),yt("ngIf",t.allergy),lt(),Ye(" ",t.display," ")}}function tSt(e,i){1&e&&we(0,"tr",25)}function eSt(e,i){1&e&&we(0,"tr",26)}function iSt(e,i){1&e&&(tt(0,"th",21),ut(1," ConceptId "),et())}function nSt(e,i){if(1&e&&(tt(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.code," ")}}function rSt(e,i){1&e&&(tt(0,"th",21),ut(1," Term "),et())}function sSt(e,i){if(1&e&&(tt(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.display," ")}}function aSt(e,i){1&e&&we(0,"tr",25)}function oSt(e,i){1&e&&we(0,"tr",26)}const lSt=[],cSt=[];let zW=(()=>{class e{constructor(t){this.terminologyService=t,this.problemBinding={ecl:"< 404684003 |Clinical finding|",title:"Search..."},this.eclProblem="< 404684003 |Clinical finding|",this.term="",this.displayedColumns=["date","code","display"],this.dataToDisplay=[...lSt],this.dataSource=new dSt(this.dataToDisplay),this.loading=!1,this.displayedColumns2=["code","display"],this.dataToDisplay2=[...cSt],this.dataSource2=new uSt(this.dataToDisplay2)}updateProblem(t){var n=this;return de(function*(){n.selectedProblemSct=t})()}addProblem(t){var n=this;return de(function*(){if(n.selectedProblemSct||t){let r=t||n.selectedProblemSct;if(n.loading=!0,n.term=r.display,r.date=new Date,r.code.indexOf(":")>-1){r.allergy=!0;let s=r.substance;n.dataToDisplay2.find(o=>o.code===s.code)||(n.dataToDisplay2=[...n.dataToDisplay2,s],n.dataSource2.setData(n.dataToDisplay2))}else(yield n.getAllergyData(r))?.expansion?.contains?.length>0&&(r.allergy=!0,n.addAllergySubstanceToList(r));n.dataToDisplay.find(s=>s.code===r.code)||(n.dataToDisplay=[...n.dataToDisplay,r],n.dataSource.setData(n.dataToDisplay)),n.loading=!1,n.term=""}})()}addAllergySubstanceToList(t){var n=this;return de(function*(){(yield n.getAllergySubstance(t))?.expansion?.contains?.forEach(s=>{n.dataToDisplay2.find(o=>o.code===s.code)||(n.dataToDisplay2=[...n.dataToDisplay2,s],n.dataSource2.setData(n.dataToDisplay2))})})()}getAllergyData(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet("<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",t.code,0,1)).pipe(Di(s=>s)))})()}getAllergySubstance(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . (246075003 |Causative agent (attribute)| OR 47429007 |Associated with (attribute)|)`,"")).pipe(Di(s=>s)))})()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies-problem-list"]],decls:60,vars:11,consts:[["substancePopoverMenu","matMenu"],["id","main-card"],[1,"container-space"],[1,"problem-list"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],[1,"container"],[1,"item"],[3,"selectionChange","binding","term"],["mat-flat-button","","color","primary",3,"click"],["diameter","35",4,"ngIf"],["mat-table","",3,"dataSource"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","code"],["matColumnDef","display"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35"],["mat-header-cell",""],["mat-cell",""],["class","tag pill",4,"ngIf"],[1,"tag","pill"],["mat-header-row",""],["mat-row",""]],template:function(n,r){if(1&n){const s=ve();tt(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"h4"),ut(4,"Problem List "),tt(5,"button",4)(6,"mat-icon"),ut(7,"info"),et()(),tt(8,"mat-menu",null,0)(10,"span",5),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(11,"h4"),ut(12,"Problem list"),et(),tt(13,"p"),ut(14,"Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),et(),tt(15,"p"),ut(16,"For practical guidance using SNOMED CT to document hypersensitivity to specific substances in a problem list, it is suggested to map to the appropriate concepts under the 473011001 |Allergic condition (finding)|hierarchies. This is due to the lack of sufficient content under 609433001 |Hypersensitivity disposition (finding)|and 421961002 |Hypersensitivity reaction (disorder)| and that many of the concepts under 609328004 |Allergic disposition (finding)|and 419076005 |Allergic reaction (disorder)| have unclear mechanisms which may actually represent non-allergic hypersensitivity. Please note that SNOMED international does not plan to create new children concepts of hypersensitivity disposition to specific substances unless more than one Member country would submit a request for them to answer to an active use-case."),et(),tt(17,"p"),ut(18,"Almost all allergy concepts are modeled by substances in SNOMED CT. A very small number of allergy concepts are modeled by products but with explicit description for the specific intended meaning. Records of allergy to multiple substances or to multi-ingredient products should be recoded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),et(),tt(19,"p"),ut(20,"Vaccine allergy is an example where allergy concepts are modeled using a product concept. For example, \u2018Allergy to component of vaccine product (finding)\u2019 with a synonym \u2018vaccine allergy\u2019 has been modeled by vaccine product. The concept represents that allergy is caused by any substance in a vaccine product."),et(),tt(21,"p"),ut(22,"To record the level of certainty or verification status, it is recommended to use additional data elements in the EHR information model. Even though it is possible to utilize the SNOMED CT model for \u2018situation with explicit context\u2019 to express certainty, this is not recommended due to potential ambiguity. For example, \u201csuspected penicillin allergy\u201d can mean uncertainty with the condition (is it real allergy?) or with the causative agent (is it penicillin?). Even though SNOMED CT editorial guideline is clear that the first interpretation is correct, it is better to use other methods to represent the uncertainty to avoid confusion."),et(),tt(23,"p"),ut(24,"For more information check the "),tt(25,"a",6),ut(26,"Implementation Guide"),et(),ut(27," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),tt(28,"div",7)(29,"div",8)(30,"app-autocomplete-binding",9),Vt("selectionChange",function(l){return Ut(s),zt(r.updateProblem(l))}),et()(),tt(31,"div",8)(32,"button",10),Vt("click",function(){return Ut(s),zt(r.addProblem())}),ut(33,"Add problem"),et()(),tt(34,"div",8),Gt(35,jCt,1,0,"mat-spinner",11),et()(),tt(36,"table",12),Wi(37,13),Gt(38,YCt,2,0,"th",14)(39,$Ct,3,4,"td",15),Xi(),Wi(40,16),Gt(41,QCt,2,0,"th",14)(42,KCt,2,1,"td",15),Xi(),Wi(43,17),Gt(44,ZCt,2,0,"th",14)(45,qCt,3,2,"td",15),Xi(),Gt(46,tSt,1,0,"tr",18)(47,eSt,1,0,"tr",19),et()(),tt(48,"div",3)(49,"h4"),ut(50,"Substances the patient is allergic to:"),et(),tt(51,"table",12),Wi(52,16),Gt(53,iSt,2,0,"th",14)(54,nSt,2,1,"td",15),Xi(),Wi(55,17),Gt(56,rSt,2,0,"th",14)(57,sSt,2,1,"td",15),Xi(),Gt(58,aSt,1,0,"tr",18)(59,oSt,1,0,"tr",19),et()()()()}if(2&n){const s=qi(9);lt(5),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(20),yt("binding",r.problemBinding)("term",r.term),lt(5),yt("ngIf",r.loading),lt(),yt("dataSource",r.dataSource),lt(10),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(4),yt("dataSource",r.dataSource2),lt(7),yt("matHeaderRowDef",r.displayedColumns2),lt(),yt("matRowDefColumns",r.displayedColumns2)}},dependencies:[Ms,Sa,Oo,da,bl,Gl,cu,Eh,vC,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,av,gh],styles:["#main-card[_ngcontent-%COMP%]{padding:10px}app-autocomplete-binding[_ngcontent-%COMP%]{display:block;min-width:500px}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;margin:10px 0;gap:10px}.container-space[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin:10px 0;gap:10px}.problem-list[_ngcontent-%COMP%]{width:60%}.tag[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding-left:10px;padding-right:10px;margin-top:5px}td[_ngcontent-%COMP%]{position:relative}.pill[_ngcontent-%COMP%]{display:inline-block;font-size:10px;background-color:orange;color:#fff;padding:4px 8px;border-radius:20px;position:absolute;top:0;right:0;margin-top:1rem}.mat-column-display[_ngcontent-%COMP%]{min-width:350px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return e})();class dSt extends OT{constructor(i){super(),this._dataStream=new py,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}}class uSt extends OT{constructor(i){super(),this._dataStream=new py,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}}const Vk=["*"];function hSt(e,i){1&e&&xi(0)}const fSt=["tabListContainer"],mSt=["tabList"],pSt=["tabListInner"],gSt=["nextPaginator"],vSt=["previousPaginator"],xSt=e=>({animationDuration:e}),ySt=(e,i)=>({value:e,params:i});function bSt(e,i){}const wSt=["tabBodyWrapper"],_St=["tabHeader"];function TSt(e,i){}function CSt(e,i){1&e&&Gt(0,TSt,0,0,"ng-template",12),2&e&&yt("cdkPortalOutlet",Ct().$implicit.templateLabel)}function SSt(e,i){1&e&&ut(0),2&e&&Ze(Ct().$implicit.textLabel)}function ESt(e,i){if(1&e){const t=ve();tt(0,"div",7,2),Vt("click",function(){const r=Ut(t),s=r.$implicit,o=r.$index,l=Ct(),w=qi(1);return zt(l._handleClick(s,w,o))})("cdkFocusChange",function(r){const s=Ut(t).$index;return zt(Ct()._tabFocusChanged(r,s))}),we(2,"span",8)(3,"div",9),tt(4,"span",10)(5,"span",11),Gt(6,CSt,1,1,null,12)(7,SSt,1,1),et()()()}if(2&e){const t=i.$implicit,n=i.$index,r=qi(1),s=Ct();bi("mdc-tab--active",s.selectedIndex===n),yt("id",s._getTabLabelId(n))("ngClass",t.labelClass)("disabled",t.disabled)("fitInkBarToContent",s.fitInkBarToContent),Ti("tabIndex",s._getTabIndex(n))("aria-posinset",n+1)("aria-setsize",s._tabs.length)("aria-controls",s._getTabContentId(n))("aria-selected",s.selectedIndex===n)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),lt(3),yt("matRippleTrigger",r)("matRippleDisabled",t.disabled||s.disableRipple),lt(3),xn(6,t.templateLabel?6:7)}}function ASt(e,i){1&e&&xi(0)}function DSt(e,i){if(1&e){const t=ve();tt(0,"mat-tab-body",13),Vt("_onCentered",function(){return Ut(t),zt(Ct()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return Ut(t),zt(Ct()._setTabBodyWrapperHeight(r))}),et()}if(2&e){const t=i.$implicit,n=i.$index,r=Ct();bi("mat-mdc-tab-body-active",r.selectedIndex===n),yt("id",r._getTabContentId(n))("ngClass",t.bodyClass)("content",t.content)("position",t.position)("origin",t.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),Ti("tabindex",null!=r.contentTabIndex&&r.selectedIndex===n?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(n))("aria-hidden",r.selectedIndex!==n)}}const MSt=new ee("MatTabContent");let ISt=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTabContent",""]],standalone:!0,features:[fi([{provide:MSt,useExisting:e}])]})}return e})();const RSt=new ee("MatTabLabel"),GW=new ee("MAT_TAB");let kSt=(()=>{class e extends $1t{constructor(t,n,r){super(t,n),this._closestTab=r}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(Ir),mt(GW,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],standalone:!0,features:[fi([{provide:RSt,useExisting:e}]),hi]})}return e})();const HW=new ee("MAT_TAB_GROUP");let zy=(()=>{class e{get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}get content(){return this._contentPortal}constructor(t,n){this._viewContainerRef=t,this._closestTabGroup=n,this.disabled=!1,this._explicitContent=void 0,this.textLabel="",this._contentPortal=null,this._stateChanges=new Pe,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new su(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(HW,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab"]],contentQueries:function(n,r,s){if(1&n&&(An(s,kSt,5),An(s,ISt,7,fr)),2&n){let o;Be(o=Ve())&&(r.templateLabel=o.first),Be(o=Ve())&&(r._explicitContent=o.first)}},viewQuery:function(n,r){if(1&n&&Mi(fr,7),2&n){let s;Be(s=Ve())&&(r._implicitContent=s.first)}},hostAttrs:["hidden",""],inputs:{disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],textLabel:[Wt.None,"label","textLabel"],ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},exportAs:["matTab"],standalone:!0,features:[fi([{provide:GW,useExisting:e}]),on,tr,Vi],ngContentSelectors:Vk,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),Gt(0,hSt,1,0,"ng-template"))},encapsulation:2})}return e})();const Uk="mdc-tab-indicator--active",WW="mdc-tab-indicator--no-transition";class PSt{constructor(i){this._items=i}hide(){this._items.forEach(i=>i.deactivateInkBar())}alignToElement(i){const t=this._items.find(r=>r.elementRef.nativeElement===i),n=this._currentItem;if(t!==n&&(n?.deactivateInkBar(),t)){const r=n?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(r),this._currentItem=t}}}let FSt=(()=>{class e{constructor(){this._elementRef=me(ri),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){const n=this._elementRef.nativeElement;if(!t||!n.getBoundingClientRect||!this._inkBarContentElement)return void n.classList.add(Uk);const r=n.getBoundingClientRect(),s=t.width/r.width,o=t.left-r.left;n.classList.add(WW),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${s})`),n.getBoundingClientRect(),n.classList.remove(WW),n.classList.add(Uk),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(Uk)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){const t=this._elementRef.nativeElement.ownerDocument||document,n=this._inkBarElement=t.createElement("span"),r=this._inkBarContentElement=t.createElement("span");n.className="mdc-tab-indicator",r.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",n.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){(this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement).appendChild(this._inkBarElement)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,inputs:{fitInkBarToContent:[Wt.HasDecoratorInputTransform,"fitInkBarToContent","fitInkBarToContent",Je]},features:[on]})}return e})(),XW=(()=>{class e extends FSt{constructor(t){super(),this.elementRef=t,this.disabled=!1}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(n,r){2&n&&(Ti("aria-disabled",!!r.disabled),bi("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},standalone:!0,features:[on,hi]})}return e})();const jW=Cc({passive:!0});let BSt=(()=>{class e{get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const n=isNaN(t)?0:t;this._selectedIndex!=n&&(this._selectedIndexChanged=!0,this._selectedIndex=n,this._keyManager&&this._keyManager.updateActiveItem(n))}constructor(t,n,r,s,o,l,w){this._elementRef=t,this._changeDetectorRef=n,this._viewportRuler=r,this._dir=s,this._ngZone=o,this._platform=l,this._animationMode=w,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Pe,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Pe,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new De,this.indexFocused=new De,o.runOutsideAngular(()=>{Sc(t.nativeElement,"mouseleave").pipe(Ui(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){Sc(this._previousPaginator.nativeElement,"touchstart",jW).pipe(Ui(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Sc(this._nextPaginator.nativeElement,"touchstart",jW).pipe(Ui(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const t=this._dir?this._dir.change:vi("ltr"),n=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new VR(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(er(1)).subscribe(r),Yr(t,n,this._items.changes,this._itemsResized()).pipe(Ui(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(s=>{this.indexFocused.emit(s),this._setTabFocus(s)})}_itemsResized(){return"function"!=typeof ResizeObserver?Zo:this._items.changes.pipe(Ta(this._items),Rs(t=>new ur(n=>this._ngZone.runOutsideAngular(()=>{const r=new ResizeObserver(s=>n.next(s));return t.forEach(s=>r.observe(s.elementRef.nativeElement)),()=>{r.disconnect()}}))),OR(1),In(t=>t.some(n=>n.contentRect.width>0&&n.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!io(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){const n=this._items.get(this.focusIndex);n&&!n.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager.onKeydown(t)}}_onContentChanges(){const t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return!this._items||!!this._items.toArray()[t]}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();const n=this._tabListContainer.nativeElement;n.scrollLeft="ltr"==this._getLayoutDirection()?0:n.scrollWidth-n.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const t=this.scrollDistance,n="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(n)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;const n=this._items?this._items.toArray()[t]:null;if(!n)return;const r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:s,offsetWidth:o}=n.elementRef.nativeElement;let l,w;"ltr"==this._getLayoutDirection()?(l=s,w=l+o):(w=this._tabListInner.nativeElement.offsetWidth-s,l=w-o);const C=this.scrollDistance,M=this.scrollDistance+r;lM&&(this.scrollDistance+=Math.min(w-M,l-C))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const t=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,n=t?t.elementRef.nativeElement:null;n?this._inkBar.alignToElement(n):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,n){n&&null!=n.button&&0!==n.button||(this._stopInterval(),Iy(650,100).pipe(Ui(Yr(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:r,distance:s}=this._scrollHeader(t);(0===s||s>=r)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const n=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(n,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:n,distance:this._scrollDistance}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Mn),mt(ou),mt(Ba,8),mt(ei),mt(ir),mt(Nr,8))};static#e=this.\u0275dir=ce({type:e,inputs:{disablePagination:[Wt.HasDecoratorInputTransform,"disablePagination","disablePagination",Je],selectedIndex:[Wt.HasDecoratorInputTransform,"selectedIndex","selectedIndex",jr]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[on]})}return e})(),VSt=(()=>{class e extends BSt{constructor(t,n,r,s,o,l,w){super(t,n,r,s,o,l,w),this.disableRipple=!1}ngAfterContentInit(){this._inkBar=new PSt(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Mn),mt(ou),mt(Ba,8),mt(ei),mt(ir),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab-header"]],contentQueries:function(n,r,s){if(1&n&&An(s,XW,4),2&n){let o;Be(o=Ve())&&(r._items=o)}},viewQuery:function(n,r){if(1&n&&(Mi(fSt,7),Mi(mSt,7),Mi(pSt,7),Mi(gSt,5),Mi(vSt,5)),2&n){let s;Be(s=Ve())&&(r._tabListContainer=s.first),Be(s=Ve())&&(r._tabList=s.first),Be(s=Ve())&&(r._tabListInner=s.first),Be(s=Ve())&&(r._nextPaginator=s.first),Be(s=Ve())&&(r._previousPaginator=s.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(n,r){2&n&&bi("mat-mdc-tab-header-pagination-controls-enabled",r._showPaginationControls)("mat-mdc-tab-header-rtl","rtl"==r._getLayoutDirection())},inputs:{disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je]},standalone:!0,features:[on,hi,Vi],ngContentSelectors:Vk,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled","disabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled","disabled"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"button",5,0),Vt("click",function(){return Ut(s),zt(r._handlePaginatorClick("before"))})("mousedown",function(l){return Ut(s),zt(r._handlePaginatorPress("before",l))})("touchend",function(){return Ut(s),zt(r._stopInterval())}),we(2,"div",6),et(),tt(3,"div",7,1),Vt("keydown",function(l){return Ut(s),zt(r._handleKeydown(l))}),tt(5,"div",8,2),Vt("cdkObserveContent",function(){return Ut(s),zt(r._onContentChanges())}),tt(7,"div",9,3),xi(9),et()()(),tt(10,"button",10,4),Vt("mousedown",function(l){return Ut(s),zt(r._handlePaginatorPress("after",l))})("click",function(){return Ut(s),zt(r._handlePaginatorClick("after"))})("touchend",function(){return Ut(s),zt(r._stopInterval())}),we(12,"div",6),et()}2&n&&(bi("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),yt("matRippleDisabled",r._disableScrollBefore||r.disableRipple)("disabled",r._disableScrollBefore||null),lt(3),bi("_mat-animation-noopable","NoopAnimations"===r._animationMode),lt(7),bi("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),yt("matRippleDisabled",r._disableScrollAfter||r.disableRipple)("disabled",r._disableScrollAfter||null))},dependencies:[iu,eH],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color)}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color)}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height);border-top-color:var(--mat-tab-header-divider-color)}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2})}return e})();const USt=new ee("MAT_TABS_CONFIG"),zSt={translateTab:mr("translateTab",[Nn("center, void, left-origin-center, right-origin-center",si({transform:"none"})),Nn("left",si({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Nn("right",si({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),ln("* => left, * => right, left => center, right => center",an("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),ln("void => left-origin-center",[si({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),an("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),ln("void => right-origin-center",[si({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),an("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])};let GSt=(()=>{class e extends au{constructor(t,n,r,s){super(t,n,s),this._host=r,this._centeringSub=Ie.EMPTY,this._leavingSub=Ie.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Ta(this._host._isCenterPosition(this._host._position))).subscribe(t=>{t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Of),mt(Ir),mt(Sn(()=>YW)),mt(Ni))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTabBodyHost",""]],standalone:!0,features:[hi]})}return e})(),YW=(()=>{class e{set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(t,n,r){this._elementRef=t,this._dir=n,this._dirChangeSubscription=Ie.EMPTY,this._translateTabComplete=new Pe,this._onCentering=new De,this._beforeCentering=new De,this._afterLeavingCenter=new De,this._onCentered=new De(!0),this.animationDuration="500ms",this.preserveContent=!1,n&&(this._dirChangeSubscription=n.change.subscribe(s=>{this._computePositionAnimationState(s),r.markForCheck()})),this._translateTabComplete.pipe(eu((s,o)=>s.fromState===o.fromState&&s.toState===o.toState)).subscribe(s=>{this._isCenterPosition(s.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(s.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(t){const n=this._isCenterPosition(t.toState);this._beforeCentering.emit(n),n&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}_computePositionAnimationState(t=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}_computePositionFromOrigin(t){const n=this._getLayoutDirection();return"ltr"==n&&t<=0||"rtl"==n&&t>0?"left-origin-center":"right-origin-center"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Ba,8),mt(Mn))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab-body"]],viewQuery:function(n,r){if(1&n&&Mi(au,5),2&n){let s;Be(s=Ve())&&(r._portalHost=s.first)}},hostAttrs:[1,"mat-mdc-tab-body"],inputs:{_content:[Wt.None,"content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"},standalone:!0,features:[Vi],decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1,0),Vt("@translateTab.start",function(l){return Ut(s),zt(r._onTranslateTabStarted(l))})("@translateTab.done",function(l){return Ut(s),zt(r._translateTabComplete.next(l))}),Gt(2,bSt,0,0,"ng-template",2),et()}2&n&&yt("@translateTab",UM(3,ySt,r._position,vc(1,xSt,r.animationDuration)))},dependencies:[GSt,lC],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[zSt.translateTab]}})}return e})(),HSt=0,ov=(()=>{class e{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(t){this._fitInkBarToContent=t,this._changeDetectorRef.markForCheck()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=isNaN(t)?null:t}get animationDuration(){return this._animationDuration}set animationDuration(t){const n=t+"";this._animationDuration=/^\d+$/.test(n)?t+"ms":n}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(t){this._contentTabIndex=isNaN(t)?null:t}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const n=this._elementRef.nativeElement.classList;n.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&n.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}constructor(t,n,r,s){this._elementRef=t,this._changeDetectorRef=n,this._animationMode=s,this._tabs=new nh,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=Ie.EMPTY,this._tabLabelSubscription=Ie.EMPTY,this._fitInkBarToContent=!1,this.stretchTabs=!0,this.dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this.disablePagination=!1,this.disableRipple=!1,this.preserveContent=!1,this.selectedIndexChange=new De,this.focusChange=new De,this.animationDone=new De,this.selectedTabChange=new De(!0),this._isServer=!me(ir).isBrowser,this._groupId=HSt++,this.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",this.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,this.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,null!=r?.contentTabIndex&&(this.contentTabIndex=r.contentTabIndex),this.preserveContent=!!r?.preserveContent,this.fitInkBarToContent=!(!r||null==r.fitInkBarToContent)&&r.fitInkBarToContent,this.stretchTabs=!r||null==r.stretchTabs||r.stretchTabs}ngAfterContentChecked(){const t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){const n=null==this._selectedIndex;if(!n){this.selectedTabChange.emit(this._createChangeEvent(t));const r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,s)=>r.isActive=s===t),n||(this.selectedIndexChange.emit(t),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((n,r)=>{n.position=r-t,null!=this._selectedIndex&&0==n.position&&!n.origin&&(n.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{const t=this._clampTabIndex(this._indexToSelect);if(t===this._selectedIndex){const n=this._tabs.toArray();let r;for(let s=0;s{n[t].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(t))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(Ta(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(n=>n._closestTabGroup===this||!n._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(t){const n=this._tabHeader;n&&(n.focusIndex=t)}_focusChanged(t){this._lastFocusedTabIndex=t,this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){const n=new XSt;return n.index=t,this._tabs&&this._tabs.length&&(n.tab=this._tabs.toArray()[t]),n}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Yr(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t){return`mat-tab-label-${this._groupId}-${t}`}_getTabContentId(t){return`mat-tab-content-${this._groupId}-${t}`}_setTabBodyWrapperHeight(t){if(!this.dynamicHeight||!this._tabBodyWrapperHeight)return;const n=this._tabBodyWrapper.nativeElement;n.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(n.style.height=t+"px")}_removeTabBodyWrapperHeight(){const t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this.animationDone.emit()}_handleClick(t,n,r){n.focusIndex=r,t.disabled||(this.selectedIndex=r)}_getTabIndex(t){return t===(this._lastFocusedTabIndex??this.selectedIndex)?0:-1}_tabFocusChanged(t,n){t&&"mouse"!==t&&"touch"!==t&&(this._tabHeader.focusIndex=n)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Mn),mt(USt,8),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab-group"]],contentQueries:function(n,r,s){if(1&n&&An(s,zy,5),2&n){let o;Be(o=Ve())&&(r._allTabs=o)}},viewQuery:function(n,r){if(1&n&&(Mi(wSt,5),Mi(_St,5)),2&n){let s;Be(s=Ve())&&(r._tabBodyWrapper=s.first),Be(s=Ve())&&(r._tabHeader=s.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:10,hostBindings:function(n,r){2&n&&(Ll("mat-"+(r.color||"primary")),Ds("--mat-tab-animation-duration",r.animationDuration),bi("mat-mdc-tab-group-dynamic-height",r.dynamicHeight)("mat-mdc-tab-group-inverted-header","below"===r.headerPosition)("mat-mdc-tab-group-stretch-tabs",r.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[Wt.HasDecoratorInputTransform,"fitInkBarToContent","fitInkBarToContent",Je],stretchTabs:[Wt.HasDecoratorInputTransform,"mat-stretch-tabs","stretchTabs",Je],dynamicHeight:[Wt.HasDecoratorInputTransform,"dynamicHeight","dynamicHeight",Je],selectedIndex:[Wt.HasDecoratorInputTransform,"selectedIndex","selectedIndex",jr],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[Wt.HasDecoratorInputTransform,"contentTabIndex","contentTabIndex",jr],disablePagination:[Wt.HasDecoratorInputTransform,"disablePagination","disablePagination",Je],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],preserveContent:[Wt.HasDecoratorInputTransform,"preserveContent","preserveContent",Je],backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],standalone:!0,features:[fi([{provide:HW,useExisting:e}]),on,Vi],ngContentSelectors:Vk,decls:9,vars:6,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","mdc-tab--active","ngClass","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","mat-mdc-tab-body-active","ngClass","content","position","origin","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"click","cdkFocusChange","id","ngClass","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","id","ngClass","content","position","origin","animationDuration","preserveContent"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"mat-tab-header",3,0),Vt("indexFocused",function(l){return Ut(s),zt(r._focusChanged(l))})("selectFocusedIndex",function(l){return Ut(s),zt(r.selectedIndex=l)}),O_(2,ESt,8,16,"div",4,F_),et(),Gt(4,ASt,1,0),tt(5,"div",5,1),O_(7,DSt,1,12,"mat-tab-body",6,F_),et()}2&n&&(yt("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination),lt(2),L_(r._tabs),lt(2),xn(4,r._isServer?4:-1),lt(),bi("_mat-animation-noopable","NoopAnimations"===r._animationMode),lt(2),L_(r._tabs))},dependencies:[VSt,XW,r1t,bc,iu,au,YW],styles:['.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;font-family:var(--mat-tab-header-label-text-font);font-size:var(--mat-tab-header-label-text-size);letter-spacing:var(--mat-tab-header-label-text-tracking);line-height:var(--mat-tab-header-label-text-line-height);font-weight:var(--mat-tab-header-label-text-weight)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-top-width:var(--mdc-tab-indicator-active-indicator-height)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab:not(.mdc-tab--stacked){height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab:not(:disabled).mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color)}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color)}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color);display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2})}return e})();class XSt{}let jSt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})();var dd=ps(578);class YSt{constructor(i,t){this._document=t;const n=this._textarea=this._document.createElement("textarea"),r=n.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",n.setAttribute("aria-hidden","true"),n.value=i,n.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(n)}copy(){const i=this._textarea;let t=!1;try{if(i){const n=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),t=this._document.execCommand("copy"),n&&n.focus()}}catch{}return t}destroy(){const i=this._textarea;i&&(i.remove(),this._textarea=void 0)}}let zk=(()=>{class e{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),r=n.copy();return n.destroy(),r}beginCopy(t){return new YSt(t,this._document)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const $St=new ee("HighlightJs-Config");let GC=(()=>{class e{constructor(t,n,r,s,o){this.el=t,this.ngModel=n,this.doc=r,this.ngZone=o,this.lang="html",this.mode="simple",Object.assign(this,s)}escapeHTML(t){return(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}init(){this.ngZone.runOutsideAngular(()=>{this.destroy();const t=this.el.nativeElement,n=this.code||""+t.innerHTML.trim();if(this.codeEl=this.doc.createElement("default"===this.mode?"div":"pre"),null==this.codeEl)return;const r="simple"===this.mode;r?(this.lang&&(this.codeEl.className=this.lang),this.parentEl=t.parentNode,this.parentEl.insertBefore(this.codeEl,t.nextSibling)):(this.parentEl=t,this.parentEl.innerHTML="",this.parentEl.appendChild(this.codeEl)),this.codeEl.innerHTML=n,hljs.configure({...this.options}),r?hljs.highlightElement(this.codeEl):this.codeEl.querySelectorAll("pre code").forEach(s=>{hljs.highlightElement(s)})})}destroy(){this.codeEl&&this.parentEl&&(this.parentEl.removeChild(this.codeEl),this.codeEl=void 0)}ngAfterViewInit(){this.init(),this.ngModel?this.modelValue$=this.ngModel.valueChanges?.subscribe(t=>{this.code=this.escapeHTML(t),this.init()}):this.initMutation()}ngOnDestroy(){this.destroy(),this.destroyMutation(),this.modelValue$&&this.modelValue$.unsubscribe()}initMutation(){typeof MutationObserver>"u"||this.ngZone.runOutsideAngular(()=>{this.observer=new MutationObserver(this.init.bind(this)),this.observer.observe(this.el.nativeElement,{characterData:!0,childList:!0,subtree:!0})})}destroyMutation(){this.observer&&this.observer.disconnect()}}return e.\u0275fac=function(t){return new(t||e)(mt(ri),mt(Wl,8),mt(Ni),mt($St,8),mt(ei))},e.\u0275dir=ce({type:e,selectors:[["","highlight-js",""]],hostVars:2,hostBindings:function(t,n){2&t&&Ds("display","simple"===n.mode?"none":null)},inputs:{options:"options",lang:"lang",code:"code",mode:"mode"},exportAs:["highlightJs"],standalone:!0}),e})(),QSt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Li({type:e}),e.\u0275inj=Pi({imports:[Bk]}),e})();const KSt=["trigger"],ZSt=["panel"],JSt=[[["mat-select-trigger"]],"*"],qSt=["mat-select-trigger","*"];function tEt(e,i){if(1&e&&(tt(0,"span",4),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.placeholder)}}function eEt(e,i){1&e&&xi(0)}function iEt(e,i){if(1&e&&(tt(0,"span",11),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.triggerValue)}}function nEt(e,i){if(1&e&&(tt(0,"span",10),Gt(1,eEt,1,0)(2,iEt,2,1),et()),2&e){const t=Ct();lt(),xn(1,t.customTrigger?1:2)}}function rEt(e,i){if(1&e){const t=ve();tt(0,"div",12,1),Vt("@transformPanel.done",function(r){return Ut(t),zt(Ct()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return Ut(t),zt(Ct()._handleKeydown(r))}),xi(2,1),et()}if(2&e){const t=Ct();(function F8(e,i,t){gc(ll,Qc,dg(ye(),e,i,t),!0)})("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),yt("ngClass",t.panelClass)("@transformPanel","showing"),Ti("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const sEt={transformPanelWrap:mr("transformPanelWrap",[ln("* => void",rC("@transformPanel",[nC()],{optional:!0}))]),transformPanel:mr("transformPanel",[Nn("void",si({opacity:0,transform:"scale(1, 0.8)"})),ln("void => showing",an("120ms cubic-bezier(0, 0, 0.2, 1)",si({opacity:1,transform:"scale(1, 1)"}))),ln("* => void",an("100ms linear",si({opacity:0})))])};let $W=0;const QW=new ee("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}}),oEt=new ee("MAT_SELECT_CONFIG"),lEt={provide:QW,deps:[xs],useFactory:function aEt(e){return()=>e.scrollStrategies.reposition()}},cEt=new ee("MatSelectTrigger");class dEt{constructor(i,t){this.source=i,this.value=t}}let lv=(()=>{class e{_scrollOptionIntoView(t){const n=this.options.toArray()[t];if(n){const r=this.panel.nativeElement,s=IH(t,this.options,this.optionGroups),o=n._getHostElement();r.scrollTop=0===t&&1===s?0:RH(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new dEt(this,t)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(vu.required)??!1}set required(t){this._required=t,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=t}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,n,r,s,o,l,w,C,M,P,O,L,U,X){this._viewportRuler=t,this._changeDetectorRef=n,this._elementRef=o,this._dir=l,this._parentFormField=M,this.ngControl=P,this._liveAnnouncer=U,this._defaultOptions=X,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(W,Z)=>W===Z,this._uid="mat-select-"+$W++,this._triggerAriaLabelledBy=null,this._destroy=new Pe,this.stateChanges=new Pe,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+$W++,this._panelDoneAnimatingStream=new Pe,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new Pe,this.optionSelectionChanges=Dg(()=>{const W=this.options;return W?W.changes.pipe(Ta(W),Rs(()=>Yr(...W.map(Z=>Z.onSelectionChange)))):this._initialized.pipe(Rs(()=>this.optionSelectionChanges))}),this.openedChange=new De,this._openedStream=this.openedChange.pipe(In(W=>W),Di(()=>{})),this._closedStream=this.openedChange.pipe(In(W=>!W),Di(()=>{})),this.selectionChange=new De,this.valueChange=new De,this._trackedModal=null,this._skipPredicate=W=>!this.panelOpen&&W.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),null!=X?.typeaheadDebounceInterval&&(this.typeaheadDebounceInterval=X.typeaheadDebounceInterval),this._errorStateTracker=new GR(s,P,C,w,this.stateChanges),this._scrollStrategyFactory=L,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(O)||0,this.id=this.id}ngOnInit(){this._selectionModel=new bR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(eu(),Ui(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Ui(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Ui(this._destroy)).subscribe(t=>{t.added.forEach(n=>n.select()),t.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ta(null),Ui(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby(),n=this.ngControl;if(t!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?r.setAttribute("aria-labelledby",t):r.removeAttribute("aria-labelledby")}n&&(this._previousControl!==n.control&&(void 0!==this._previousControl&&null!==n.disabled&&n.disabled!==this.disabled&&(this.disabled=n.disabled),this._previousControl=n.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){const t=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;const n=`${this.id}-panel`;this._trackedModal&&Yg(this._trackedModal,"aria-owns",n),jT(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(Yg(this._trackedModal,"aria-owns",`${this.id}-panel`),this._trackedModal=null)}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(n=>n.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const n=t.keyCode,r=40===n||38===n||37===n||39===n,s=13===n||32===n,o=this._keyManager;if(!o.isTyping()&&s&&!io(t)||(this.multiple||t.altKey)&&r)t.preventDefault(),this.open();else if(!this.multiple){const l=this.selected;o.onKeydown(t);const w=this.selected;w&&l!==w&&this._liveAnnouncer.announce(w.viewValue,1e4)}}_handleOpenKeydown(t){const n=this._keyManager,r=t.keyCode,s=40===r||38===r,o=n.isTyping();if(s&&t.altKey)t.preventDefault(),this.close();else if(o||13!==r&&32!==r||!n.activeItem||io(t))if(!o&&this._multiple&&65===r&&t.ctrlKey){t.preventDefault();const l=this.options.some(w=>!w.disabled&&!w.selected);this.options.forEach(w=>{w.disabled||(l?w.select():w.deselect())})}else{const l=n.activeItemIndex;n.onKeydown(t),this._multiple&&s&&t.shiftKey&&n.activeItem&&n.activeItemIndex!==l&&n.activeItem._selectViaInteraction()}else t.preventDefault(),n.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(er(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(n=>n.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(n=>this._selectOptionByValue(n)),this._sortValues();else{const n=this._selectOptionByValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){const n=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,t)}catch{return!1}});return n&&this._selectionModel.select(n),n}_assignValue(t){return!!(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t,!0)}_getOverlayWidth(t){return"auto"===this.panelWidth?(t instanceof nk?t.elementRef:t||this._elementRef).nativeElement.getBoundingClientRect().width:null===this.panelWidth?"":this.panelWidth}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new dH(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Yr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ui(t)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Yr(...this.options.map(n=>n._stateChanges)).pipe(Ui(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,n){const r=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(r!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),n&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),n&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),r!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((n,r)=>this.sortComparator?this.sortComparator(n,r,t):t.indexOf(n)-t.indexOf(r)),this.stateChanges.next()}}_propagateChanges(t){let n;n=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:t,this._value=n,this.valueChange.emit(n),this._onChange(n),this.selectionChange.emit(this._getChangeEvent(n)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let t=-1;for(let n=0;n0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();return this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();let n=(t?t+" ":"")+this._valueId;return this.ariaLabelledby&&(n+=" "+this.ariaLabelledby),n}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ou),mt(Mn),mt(ei),mt(_H),mt(ri),mt(Ba,8),mt(sm,8),mt(cd,8),mt(UC,8),mt(ld,10),hl("tabindex"),mt(QW),mt(pH),mt(oEt,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-select"]],contentQueries:function(n,r,s){if(1&n&&(An(s,cEt,5),An(s,nu,5),An(s,WR,5)),2&n){let o;Be(o=Ve())&&(r.customTrigger=o.first),Be(o=Ve())&&(r.options=o),Be(o=Ve())&&(r.optionGroups=o)}},viewQuery:function(n,r){if(1&n&&(Mi(KSt,5),Mi(ZSt,5),Mi(t7,5)),2&n){let s;Be(s=Ve())&&(r.trigger=s.first),Be(s=Ve())&&(r.panel=s.first),Be(s=Ve())&&(r._overlayDir=s.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(n,r){1&n&&Vt("keydown",function(o){return r._handleKeydown(o)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),2&n&&(Ti("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),bi("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.multiple))},inputs:{userAriaDescribedBy:[Wt.None,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)],hideSingleSelectionIndicator:[Wt.HasDecoratorInputTransform,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Je],placeholder:"placeholder",required:[Wt.HasDecoratorInputTransform,"required","required",Je],multiple:[Wt.HasDecoratorInputTransform,"multiple","multiple",Je],disableOptionCentering:[Wt.HasDecoratorInputTransform,"disableOptionCentering","disableOptionCentering",Je],compareWith:"compareWith",value:"value",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[Wt.HasDecoratorInputTransform,"typeaheadDebounceInterval","typeaheadDebounceInterval",jr],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[fi([{provide:VC,useExisting:e},{provide:HR,useExisting:e}]),on,tr,Vi],ngContentSelectors:qSt,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(n,r){if(1&n){const s=ve();Kn(JSt),tt(0,"div",2,0),Vt("click",function(){return Ut(s),zt(r.open())}),tt(3,"div",3),Gt(4,tEt,2,1,"span",4)(5,nEt,3,1),et(),tt(6,"div",5)(7,"div",6),ul(),tt(8,"svg",7),we(9,"path",8),et()()()(),Gt(10,rEt,3,9,"ng-template",9),Vt("backdropClick",function(){return Ut(s),zt(r.close())})("attach",function(){return Ut(s),zt(r._onAttached())})("detach",function(){return Ut(s),zt(r.close())})}if(2&n){const s=qi(1);lt(3),Ti("id",r._valueId),lt(),xn(4,r.empty?4:5),lt(6),yt("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",r.panelOpen)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)}},dependencies:[nk,t7,bc],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform)}'],encapsulation:2,data:{animation:[sEt.transformPanel]},changeDetection:0})}return e})(),KW=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[lEt],imports:[qc,qf,eC,Ki,lu,zC,eC,Ki]})}return e})();const uEt=["tooltip"],JW=new ee("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition({scrollThrottle:20})}}),fEt={provide:JW,deps:[xs],useFactory:function hEt(e){return()=>e.scrollStrategies.reposition({scrollThrottle:20})}},pEt=new ee("mat-tooltip-default-options",{providedIn:"root",factory:function mEt(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),qW="tooltip-panel",tX=Cc({passive:!0});let xu=(()=>{class e{get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=la(t),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(t){this._disabled=la(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=Ch(t)}get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=Ch(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(t,n,r,s,o,l,w,C,M,P,O,L){this._overlay=t,this._elementRef=n,this._scrollDispatcher=r,this._viewContainerRef=s,this._ngZone=o,this._platform=l,this._ariaDescriber=w,this._focusMonitor=C,this._dir=P,this._defaultOptions=O,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=bEt,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Pe,this._scrollStrategy=M,this._document=L,O&&(this._showDelay=O.showDelay,this._hideDelay=O.hideDelay,O.position&&(this.position=O.position),O.positionAtOrigin&&(this.positionAtOrigin=O.positionAtOrigin),O.touchGestures&&(this.touchGestures=O.touchGestures)),P.change.pipe(Ui(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=8}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ui(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([n,r])=>{t.removeEventListener(n,r,tX)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay,n){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(n);this._detach(),this._portal=this._portal||new Zg(this._tooltipComponent,this._viewContainerRef);const s=this._tooltipInstance=r.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(Ui(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(t)}hide(t=this.hideDelay){const n=this._tooltipInstance;n&&(n.isVisible()?n.hide(t):(n._cancelPendingAnimations(),this._detach()))}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){const s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&s._origin instanceof ri)return this._overlayRef;this._detach()}const n=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&t||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(n);return r.positionChanges.pipe(Ui(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${qW}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ui(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ui(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ui(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!io(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(t){const n=t.getConfig().positionStrategy,r=this._getOrigin(),s=this._getOverlayPosition();n.withPositions([this._addOffset({...r.main,...s.main}),this._addOffset({...r.fallback,...s.fallback})])}_addOffset(t){const r=!this._dir||"ltr"==this._dir.value;return"top"===t.originY?t.offsetY=-8:"bottom"===t.originY?t.offsetY=8:"start"===t.originX?t.offsetX=r?-8:8:"end"===t.originX&&(t.offsetX=r?8:-8),t}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n||"below"==n?r={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&t||"right"==n&&!t?r={originX:"start",originY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(r={originX:"end",originY:"center"});const{x:s,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:s,originY:o}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n?r={overlayX:"center",overlayY:"bottom"}:"below"==n?r={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&t||"right"==n&&!t?r={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(r={overlayX:"start",overlayY:"center"});const{x:s,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:s,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(er(1),Ui(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,n){return"above"===this.position||"below"===this.position?"top"===n?n="bottom":"bottom"===n&&(n="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:n}}_updateCurrentPositionClass(t){const{overlayY:n,originX:r,originY:s}=t;let o;if(o="center"===n?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===n&&"top"===s?"above":"below",o!==this._currentPosition){const l=this._overlayRef;if(l){const w=`${this._cssClassPrefix}-${qW}-`;l.removePanelClass(w+this._currentPosition),l.addPanelClass(w+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",t=>{let n;this._setupPointerExitEventsIfNeeded(),void 0!==t.x&&void 0!==t.y&&(n=t),this.show(void 0,n)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",t=>{const n=t.targetTouches?.[0],r=n?{x:n.clientX,y:n.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),this._defaultOptions.touchLongPressShowDelay??500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",n=>{const r=n.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",n=>this._wheelListener(n)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const n=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",n],["touchcancel",n])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([n,r])=>{this._elementRef.nativeElement.addEventListener(n,r,tX)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){const n=this._document.elementFromPoint(t.clientX,t.clientY),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&this.hide()}}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const n=this._elementRef.nativeElement,r=n.style;("on"===t||"INPUT"!==n.nodeName&&"TEXTAREA"!==n.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===t||!n.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(xs),mt(ri),mt(Ry),mt(Ir),mt(ei),mt(ir),mt(oH),mt(Ul),mt(JW),mt(Ba),mt(pEt,8),mt(Ni))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-mdc-tooltip-disabled",r.disabled)},inputs:{position:[Wt.None,"matTooltipPosition","position"],positionAtOrigin:[Wt.None,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[Wt.None,"matTooltipDisabled","disabled"],showDelay:[Wt.None,"matTooltipShowDelay","showDelay"],hideDelay:[Wt.None,"matTooltipHideDelay","hideDelay"],touchGestures:[Wt.None,"matTooltipTouchGestures","touchGestures"],message:[Wt.None,"matTooltip","message"],tooltipClass:[Wt.None,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0})}return e})(),bEt=(()=>{class e{constructor(t,n,r){this._changeDetectorRef=t,this._elementRef=n,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Pe,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled="NoopAnimations"===r}show(t){null!=this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},t)}hide(t){null!=this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},t)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>24&&t.width>=200}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation)}_cancelPendingAnimations(){null!=this._showTimeoutId&&clearTimeout(this._showTimeoutId),null!=this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(t){t?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(t){const n=this._tooltip.nativeElement,r=this._showAnimation,s=this._hideAnimation;if(n.classList.remove(t?s:r),n.classList.add(t?r:s),this._isVisible=t,t&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const o=getComputedStyle(n);("0s"===o.getPropertyValue("animation-duration")||"none"===o.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}t&&this._onShow(),this._animationsDisabled&&(n.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn),mt(ri),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tooltip-component"]],viewQuery:function(n,r){if(1&n&&Mi(uEt,7),2&n){let s;Be(s=Ve())&&(r._tooltip=s.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(n,r){1&n&&Vt("mouseleave",function(o){return r._handleMouseLeave(o)}),2&n&&Ds("zoom",r.isVisible()?1:null)},standalone:!0,features:[Vi],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1,0),Vt("animationend",function(l){return Ut(s),zt(r._handleAnimationEnd(l))}),tt(2,"div",2),ut(3),et()()}2&n&&(bi("mdc-tooltip--multiline",r._isMultiline),yt("ngClass",r.tooltipClass),lt(3),Ze(r.message))},dependencies:[bc],styles:['.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip--showing-transition .mdc-tooltip__surface-animation{transition:opacity 150ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-tooltip--hide-transition .mdc-tooltip__surface-animation{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - 2*8px);margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - 2*8px);align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mat-mdc-tooltip .mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color)}.mat-mdc-tooltip .mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape)}.mat-mdc-tooltip .mdc-tooltip__caret-surface-top,.mat-mdc-tooltip .mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape)}.mat-mdc-tooltip .mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color)}.mat-mdc-tooltip .mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font);line-height:var(--mdc-plain-tooltip-supporting-text-line-height);font-size:var(--mdc-plain-tooltip-supporting-text-size);font-weight:var(--mdc-plain-tooltip-supporting-text-weight);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0})}return e})(),eX=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[fEt],imports:[yH,qc,qf,Ki,Ki,lu]})}return e})();const wEt=["switch"],_Et=["*"];function TEt(e,i){1&e&&(tt(0,"div",10),ul(),tt(1,"svg",12),we(2,"path",13),et(),tt(3,"svg",14),we(4,"path",15),et()())}const CEt=new ee("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1})}),SEt={provide:ua,useExisting:Sn(()=>Gk),multi:!0};class iX{constructor(i,t){this.source=i,this.checked=t}}let EEt=0,Gk=(()=>{class e{_createChangeEvent(t){return new iX(this,t)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(t){this._checked=t,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l){this._elementRef=t,this._focusMonitor=n,this._changeDetectorRef=r,this.defaults=o,this._onChange=w=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new De,this.toggleChange=new De,this.tabIndex=parseInt(s)||0,this.color=o.color||"accent",this._noopAnimations="NoopAnimations"===l,this.id=this._uniqueId="mat-mdc-slide-toggle-"+ ++EEt,this.hideIcon=o.hideIcon??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?(this._focused=!0,this._changeDetectorRef.markForCheck()):t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(t){t.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}validate(t){return this.required&&!0!==t.value?{required:!0}:null}registerOnValidatorChange(t){this._validatorOnChange=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new iX(this,this.checked)))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Ul),mt(Mn),hl("tabindex"),mt(CEt),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(n,r){if(1&n&&Mi(wEt,5),2&n){let s;Be(s=Ve())&&(r._switchElement=s.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(n,r){2&n&&(Kc("id",r.id),Ti("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-slide-toggle-focused",r._focused)("mat-mdc-slide-toggle-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],required:[Wt.HasDecoratorInputTransform,"required","required",Je],color:"color",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)],checked:[Wt.HasDecoratorInputTransform,"checked","checked",Je],hideIcon:[Wt.HasDecoratorInputTransform,"hideIcon","hideIcon",Je]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[fi([SEt,{provide:Ys,useExisting:e,multi:!0}]),on,tr,Vi],ngContentSelectors:_Et,decls:13,vars:24,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"div",1)(1,"button",2,0),Vt("click",function(){return Ut(s),zt(r._handleClick())}),we(3,"div",3),tt(4,"div",4)(5,"div",5)(6,"div",6),we(7,"div",7),et(),tt(8,"div",8),we(9,"div",9),et(),Gt(10,TEt,5,0,"div",10),et()()(),tt(11,"label",11),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),xi(12),et()()}if(2&n){const s=qi(2);yt("labelPosition",r.labelPosition),lt(),bi("mdc-switch--selected",r.checked)("mdc-switch--unselected",!r.checked)("mdc-switch--checked",r.checked)("mdc-switch--disabled",r.disabled),yt("tabIndex",r.disabled?-1:r.tabIndex)("disabled",r.disabled),Ti("id",r.buttonId)("name",r.name)("aria-label",r.ariaLabel)("aria-labelledby",r._getAriaLabelledBy())("aria-describedby",r.ariaDescribedby)("aria-required",r.required||null)("aria-checked",r.checked),lt(8),yt("matRippleTrigger",s)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),lt(),xn(10,r.hideIcon?-1:10),lt(),yt("for",r.buttonId),Ti("id",r._labelId)}},dependencies:[iu,YR],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}.mdc-switch{width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation)}.mdc-switch .mdc-switch__focus-ring-wrapper,.mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height)}.mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape)}.mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size);width:var(--mdc-switch-state-layer-size)}.mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mdc-switch__handle{transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--selected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--unselected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch__track::after,.mdc-switch__track::before{border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color)}.mdc-switch--selected .mdc-switch__track::after,.mdc-switch--selected .mdc-switch__track::before{border-width:var(--mat-switch-selected-track-outline-width)}.mdc-switch--disabled .mdc-switch__track::after,.mdc-switch--disabled .mdc-switch__track::before{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}'],encapsulation:2,changeDetection:0})}return e})(),MEt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Gk,Ki,Ki]})}return e})();function IEt(e,i){if(1&e){const t=ve();tt(0,"button",14),Vt("click",function(){Ut(t);const r=Ct().index;return zt(Ct().removeReaction(r))}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function REt(e,i){if(1&e){const t=ve();tt(0,"mat-option",15),Vt("click",function(){const r=Ut(t).$implicit,s=Ct().$implicit;return zt(Ct().reactionSeveritySelected(s,r))}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function kEt(e,i){if(1&e){const t=ve();tt(0,"div",4)(1,"div",5),Gt(2,IEt,3,0,"button",6),et(),tt(3,"div",7)(4,"div",8)(5,"app-autocomplete-binding",9),Vt("selectionChange",function(r){const s=Ut(t).$implicit;return zt(Ct().reactionManifestationSelected(s,r))}),et()(),tt(6,"button",10)(7,"mat-icon"),ut(8,"info"),et()(),tt(9,"mat-menu",null,0)(11,"span",11),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(12,"p"),ut(13,"Terminology binding:"),et(),tt(14,"pre"),ut(15),et()()()(),tt(16,"mat-form-field",12)(17,"mat-label"),ut(18,"Reaction Severity"),et(),tt(19,"mat-select"),Gt(20,REt,2,2,"mat-option",13),et()(),tt(21,"div",7)(22,"div",8)(23,"app-autocomplete-binding",9),Vt("selectionChange",function(r){const s=Ut(t).$implicit;return zt(Ct().reactionRouteSelected(s,r))}),et()(),tt(24,"button",10)(25,"mat-icon"),ut(26,"info"),et()(),tt(27,"mat-menu",null,1)(29,"span",11),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(30,"p"),ut(31,"Terminology binding:"),et(),tt(32,"pre"),ut(33),et()()()()()}if(2&e){const t=i.index,n=qi(10),r=qi(28),s=Ct();lt(2),yt("ngIf",t>0),lt(3),yt("binding",s.reactionManifestationBinding),lt(),yt("matMenuTriggerFor",n),lt(5),yt("disableRipple",!0),lt(4),Ze(s.reactionManifestationBinding.ecl),lt(5),yt("ngForOf",s.severityOptions),lt(3),yt("binding",s.routeBinding),lt(),yt("matMenuTriggerFor",r),lt(5),yt("disableRipple",!0),lt(4),Ze(s.routeBinding.ecl)}}let PEt=(()=>{class e{constructor(){this.reactions=[],this.newManifestation=new De,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.reaction={},this.onChangeCallback=()=>{},this.onTouchedCallback=()=>{}}writeValue(t){void 0!==t&&(this.reactions=t)}setDisabledState(t){}addNewReaction(){this.reactions.push(this.reaction),this.reaction={},this.onChangeCallback(this.reactions)}removeReaction(t){this.reactions.splice(t,1),this.onChangeCallback(this.reactions)}reactionManifestationSelected(t,n){t.manifestation=n,this.newManifestation.emit(n),this.onChangeCallback(this.reactions)}reactionSeveritySelected(t,n){t.severity=n,this.onChangeCallback(this.reactions)}reactionRouteSelected(t,n){t.route=n,this.onChangeCallback(this.reactions)}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies-allergy-list-reaction"]],inputs:{reactions:"reactions"},outputs:{newManifestation:"newManifestation"},features:[fi([{provide:ua,useExisting:Sn(()=>e),multi:!0}])],decls:5,vars:1,consts:[["reactionPopoverMenu","matMenu"],["routePopoverMenu","matMenu"],["class","reaction",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Add reaction",3,"click"],[1,"reaction"],[1,"button-container"],["mat-icon-button","","color","primary","class","remove","matTooltip","Remove reaction",3,"click",4,"ngIf"],[1,"row-centered"],[1,"small-form-field"],[3,"selectionChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"form-field"],[3,"value","click",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Remove reaction",1,"remove",3,"click"],[3,"click","value"]],template:function(n,r){1&n&&(Gt(0,kEt,34,10,"div",2),tt(1,"div")(2,"button",3),Vt("click",function(){return r.addNewReaction()}),tt(3,"mat-icon"),ut(4,"add"),et()()()),2&n&&yt("ngForOf",r.reactions)},dependencies:[gs,Ms,Oo,da,bl,Gl,cu,Xl,wl,nu,lv,xu,av],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px;margin-bottom:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%}"]})}return e})();const FEt=()=>({});function OEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function LEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function NEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function BEt(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",11),Vt("selectionChange",function(r){return Ut(t),zt(Ct().substanceSelected(r,!0))}),et()}if(2&e){const t=Ct();yt("binding",t.substanceBinding)("term",t.selectedSubstanceTerm)}}function VEt(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",11),Vt("selectionChange",function(r){return Ut(t),zt(Ct().substanceSelected(r))}),et()}if(2&e){const t=Ct();yt("binding",t.refinedSubstanceBinding)("term",t.selectedSubstanceTerm)}}function UEt(e,i){if(1&e&&(tt(0,"pre"),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.substanceBinding.ecl)}}function zEt(e,i){if(1&e&&(tt(0,"pre"),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.refinedSubstanceBinding.ecl)}}function GEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function HEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}let WEt=(()=>{class e{constructor(t,n,r){this.terminologyService=t,this.clipboard=n,this._snackBar=r,this.newProblem=new De,this.clinicalStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"active",display:"Active"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"inactive",display:"Inactive"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"resolved",display:"Resolved"}],this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.verificationStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"unconfirmed",display:"Unconfirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"presumed",display:"Presumed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"confirmed",display:"Confirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"refuted",display:"Refuted"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"entered-in-error",display:"Entered in Error"}],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.intoleranceTypeOptions=[{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"609433001",display:"Hypersensitivity disposition (finding)",fhirCode:"allergy",fhirDisplay:"Allergy"},{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"782197009",display:"Intolerance to substance (finding)",fhirCode:"intolerance",fhirDisplay:"Intolerance"}],this.selectedIntoleranceType=null,this.intoleranceCategoryOptions=[{code:"food",display:"Food"},{code:"medication",display:"Medication"},{code:"environment",display:"Environment"},{code:"biologic",display:"Biologic"}],this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Va(this.selectedIntoleranceCategories),this.criticalityOptions=[{code:"low",display:"Low Risk"},{code:"high",display:"High Risk"},{code:"unable-to-assess",display:"Unable to Assess Risk"}],this.selectedCriticality=null,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.codeBinding={ecl:"<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",title:"Allergy/Intolerance by propensity"},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.substanceBinding={ecl:"<<105590001 | Substance (substance) | OR <<373873005 | Pharmaceutical / biologic product (product) |",title:"Allergy/Intolerance substance or product"},this.refinedSubstanceBinding={ecl:"<<105590001 | Substance (substance) |",title:"Allergy/Intolerance substance based on propensity"},this.selectedSubstanceTerm="",this.selectedSubstance=null,this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm="",this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.selectedRoute=null,this.selectedRouteTerm="",this.outputAllergyBase={resourceType:"AllergyIntolerance",id:"medication",text:{},clinicalStatus:{coding:[]},verificationStatus:{coding:[]},type:"",category:[],criticality:"high",code:{coding:[]},reaction:[{substance:[{coding:[]}],manifestation:[{coding:[]}],exposureRoute:{coding:[]},severity:""}],patient:{reference:"Patient/example"},recordedDate:"2010-03-01",participant:[{function:{coding:[{system:"http://terminology.hl7.org/CodeSystem/provenance-participant-type",code:"author",display:"Author"}]},actor:{reference:"Practitioner/example"}}]},this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.outputAllergyStr=""}ngOnInit(){this.updateAllergyStr()}onReactionsChange(t){this.updateAllergyStr()}clear(){this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.selectedIntoleranceType=null,this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Va(this.selectedIntoleranceCategories),this.selectedCriticality=null,this.selectedSeverity={},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.selectedSubstanceTerm="",this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm=" ",this.selectedRoute=null,this.selectedRouteTerm=" ",this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.updateAllergyStr(),setTimeout(()=>{this.selectedReactionManifestationTerm="",this.selectedRouteTerm=""},100)}updateAllergyStr(){this.outputAllergy.clinicalStatus.coding=[this.selectedClinicalStatus],this.outputAllergy.verificationStatus.coding=[this.selectedVerificationStatus],this.outputAllergy.type=this.selectedIntoleranceType?this.selectedIntoleranceType.fhirCode:"",this.outputAllergy.category=this.selectedIntoleranceCategories.length?this.selectedIntoleranceCategories.map(t=>t.display):[],this.outputAllergy.criticality=this.selectedCriticality?.code?[this.selectedCriticality.code]:{},this.outputAllergy.reaction=[],this.selectedReactions.forEach(t=>{t.manifestation.code&&(t.manifestation.system="http://snomed.info/sct"),t.route.code&&(t.route.system="http://snomed.info/sct"),this.outputAllergy.reaction.push({substance:[{coding:[this.selectedSubstance]}],manifestation:[{coding:t.manifestation?[t.manifestation]:[{}]}],exposureRoute:{coding:t.route?[t.route]:[{}]},severity:t.severity?t.severity.code:""})}),setTimeout(()=>{this.outputAllergyStr=JSON.stringify(this.outputAllergy,null,2)},100)}substanceSelected(t,n){var r=this;return de(function*(){n&&(r.selectedCodeTerm=""),r.selectedSubstance=t,r.selectedIntoleranceCategories=[],t=Object.assign({system:"http://snomed.info/sct"},t),r.recordPropensity||(r.outputAllergy.code.coding=[t]),r.outputAllergy.reaction[0].substance[0].coding=[t],(yield r.getSubstanceCategories(t))?.expansion?.contains?.forEach(o=>{"762766007"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[0]):"115668003"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[3]):"410942007"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[1]):"57795002"==o.code&&r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[2])}),r.selectedIntoleranceCategoriesControl.setValue(r.selectedIntoleranceCategories),r.updateAllergyStr()})()}propensityRecordChanged(){this.outputAllergy.code.coding=[],this.selectedCode&&this.codeSelected(this.selectedCode)}codeSelected(t){var n=this;return de(function*(){if(t=Object.assign({system:"http://snomed.info/sct"},t)){n.selectedCodeTerm=t.display,n.selectedCode=t,n.recordPropensity&&(n.outputAllergy.code.coding=[t]);let r=yield n.getTypes(t);if(r.expansion?.contains){const o=r.expansion?.contains[0];n.selectedIntoleranceType=n.intoleranceTypeOptions.find(l=>l.code===o.code)}let s=yield n.getAllergySubstance(t);if(s.expansion.contains||(s=yield n.getIntoleranceSubstance(t)),s.expansion?.contains){const o=s.expansion?.contains[0];n.refinedSubstanceBinding.ecl=`<<${o.code} | ${o.display} |`,n.substanceSelected(o),n.selectedSubstanceTerm=o.display}else n.refinedSubstanceBinding.ecl="<<105590001 | Substance (substance) |"}})()}getIntoleranceSubstance(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . 47429007 |Associated with (attribute)|`,"")).pipe(Di(s=>s)))})()}getAllergySubstance(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . 246075003 |Causative agent (attribute)|`,"")).pipe(Di(s=>s)))})()}getSubstanceCategories(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`> ${t.code} |${t.display}| AND (762766007 |Edible substance| OR 115668003 |Biological substance (substance)| OR 410942007 |Drug or medicament (substance)| OR 57795002 |Chemical element|)`,"")).pipe(Di(s=>s)))})()}getTypes(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`> ${t.code} |${t.display}| AND (609433001 |Hypersensitivity disposition| OR 782197009 |Intolerance to substance|)`,"")).pipe(Di(s=>s)))})()}saveFhirResource(){var t=new Blob([this.outputAllergyStr],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(t,"AllergyIntolerance.json")}copyToClipboard(t){this.clipboard.copy(t)}addToProblemsList(){if(this.selectedCode)this.newProblem.emit(this.selectedCode);else if(this.selectedSubstance&&this.selectedIntoleranceType){let t="";"609433001"===this.selectedIntoleranceType.code?t="Allergy to ":"782197009"===this.selectedIntoleranceType.code&&(t="Intolerance to "),t+=this.selectedSubstance.display,this.newProblem.emit({code:`${this.selectedIntoleranceType.code}:246075003=${this.selectedSubstance.code}`,display:t,substance:this.selectedSubstance})}else this._snackBar.openFromComponent(Ar,{duration:1e3,data:"Nothing to add to problem list",panelClass:["yellow-snackbar"]});this.clear()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(zk),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies-allergy-list"]],outputs:{newProblem:"newProblem"},decls:105,vars:30,consts:[["substancePopoverMenu","matMenu"],["codePopoverMenu","matMenu"],["id","main-card"],[1,"row"],[1,"column"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-flat-button","","color","accent","id","clear",3,"click"],[1,"row-centered"],[1,"smallest-form-field"],[3,"selectionChange","binding","term"],["mat-menu-item","",3,"click","disableRipple"],["matTooltip","Defines wether to use a propensity based model or a substance based model. Defines which one is recorded in the code element of the AllergyIntolerance resource.",3,"ngModelChange","click","ngModel"],[1,"form-field"],[3,"ngModelChange","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[1,"small-form-field"],[3,"binding","term","selectionChange",4,"ngIf"],[4,"ngIf"],[3,"formControl","multiple"],[3,"ngModelChange","newManifestation","ngModel"],["mat-flat-button","","color","accent",3,"click"],["href","https://hl7.org/FHIR/allergyintolerance.html","target","_blank"],["id","output"],["id","save"],["mat-icon-button","","matTooltip","Download FHIR Resource",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy FHIR Resource",3,"click"],["fontIcon","content_copy"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],[3,"click","value"]],template:function(n,r){if(1&n){const s=ve();tt(0,"mat-card",2)(1,"div",3)(2,"div",4)(3,"h4"),ut(4,"Allergy Intolerance Form "),tt(5,"button",5)(6,"mat-icon"),ut(7,"info"),et()(),tt(8,"mat-menu",null,0)(10,"span",6),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(11,"h4"),ut(12,"Allergy list"),et(),tt(13,"p"),ut(14,"Allergy or intolerance can be recorded in a specific section (e.g., \u201cDrug Allergy and Intolerance\u201d) of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),et(),tt(15,"p"),ut(16,"In terms of documenting sensitivity type in the allergy list there is the option to map to 609433001 |Hypersensitivity disposition which in SNOMED CT represents both immune-mediated and non-immune mediated hypersensitivity or to map to 609328004 |Allergic disposition (finding)|which is common clinical parlance for what many clinicians would mean by allergic or non-allergic hypersensitivity. In addition, as recommended in the FHIR documentation if one is unclear as to whether a condition represents hypersensitivity or intolerance, one can just omit the type element from the resource."),et(),tt(17,"p"),ut(18,"If SNOMED CT concepts are used to document the causative agent, it is preferable to use concepts from the Substance rather than Pharmaceutical/biologic product hierarchy since this will facilitate the downstream use of data, e.g., clinical decision support, data exchange."),et(),tt(19,"p"),ut(20,"Almost all allergy and intolerance finding concepts are modeled using substance concepts in SNOMED CT. The SNOMED CT substance hierarchy has grouper concepts that are based on structure (e.g., Macrolide) or disposition (e.g., substance with histamine receptor antagonist mechanism of action). Clinical decision support systems can utilize these grouper concepts to access information at the desired level of granularity. Clinicians can also record a class of substance instead of a specific drug or substance (e.g., angiotensin II receptor antagonist). Note that substance grouper concepts based on therapeutic role (e.g., anticonvulsant) is not recommended for use because they are currently under review and may be retired in future."),et(),tt(21,"p"),ut(22,"There are situations in which it is difficult to determine the specific substance as a true cause or most likely cause of a condition. This is the case for allergy/intolerance to a product containing multiple substances."),et(),tt(23,"p"),ut(24,"Records of allergy to multiple substances or to multi-ingredient products should be recorded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),et(),tt(25,"p"),ut(26,"For more information check the "),tt(27,"a",7),ut(28,"Implementation Guide"),et(),ut(29," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),tt(30,"button",8),Vt("click",function(){return Ut(s),zt(r.clear())}),ut(31,"Clear"),et(),tt(32,"div",9)(33,"div",10)(34,"app-autocomplete-binding",11),Vt("selectionChange",function(l){return Ut(s),zt(r.codeSelected(l))}),et()(),tt(35,"button",5)(36,"mat-icon"),ut(37,"info"),et()(),tt(38,"mat-menu",null,1)(40,"span",12),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(41,"p"),ut(42,"Terminology binding:"),et(),tt(43,"pre"),ut(44),et()()(),tt(45,"mat-slide-toggle",13),wa("ngModelChange",function(l){return Ut(s),Na(r.recordPropensity,l)||(r.recordPropensity=l),zt(l)}),Vt("click",function(){return Ut(s),zt(r.propensityRecordChanged())}),ut(46," Propensity based model "),et()(),tt(47,"mat-form-field",14)(48,"mat-label"),ut(49,"Allergy Intolerance Type"),et(),tt(50,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedIntoleranceType,l)||(r.selectedIntoleranceType=l),zt(l)}),Gt(51,OEt,2,2,"mat-option",16),et()(),tt(52,"div",9)(53,"mat-form-field",4)(54,"mat-label"),ut(55,"Clinical Status"),et(),tt(56,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedClinicalStatus,l)||(r.selectedClinicalStatus=l),zt(l)}),Gt(57,LEt,2,2,"mat-option",16),et()(),tt(58,"mat-form-field",4)(59,"mat-label"),ut(60,"Verification Status"),et(),tt(61,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedVerificationStatus,l)||(r.selectedVerificationStatus=l),zt(l)}),Gt(62,NEt,2,2,"mat-option",16),et()()(),tt(63,"div",9)(64,"div",17),Gt(65,BEt,1,2,"app-autocomplete-binding",18)(66,VEt,1,2,"app-autocomplete-binding",18),et(),tt(67,"button",5)(68,"mat-icon"),ut(69,"info"),et()(),tt(70,"mat-menu",null,0)(72,"span",12),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(73,"p"),ut(74,"Terminology binding:"),et(),Gt(75,UEt,2,1,"pre",19)(76,zEt,2,1,"pre",19),et()()(),tt(77,"div",9)(78,"mat-form-field",4)(79,"mat-label"),ut(80,"Substance Category"),et(),tt(81,"mat-select",20),Gt(82,GEt,2,2,"mat-option",16),et()(),tt(83,"mat-form-field",4)(84,"mat-label"),ut(85,"Allergy Criticality"),et(),tt(86,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedCriticality,l)||(r.selectedCriticality=l),zt(l)}),Gt(87,HEt,2,2,"mat-option",16),et()()(),tt(88,"app-allergies-allergy-list-reaction",21),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedReactions,l)||(r.selectedReactions=l),zt(l)}),Vt("ngModelChange",function(l){return Ut(s),zt(r.onReactionsChange(l))})("newManifestation",function(l){return Ut(s),zt(r.newProblem.emit(l))}),et(),tt(89,"button",22),Vt("click",function(){return Ut(s),zt(r.addToProblemsList())}),ut(90,"Save"),et()(),tt(91,"div",4)(92,"h4"),ut(93,"AllergyIntolerance HL7 FHIR Resource ("),tt(94,"a",23),ut(95,"link"),et(),ut(96,")"),et(),tt(97,"div",24)(98,"div",25)(99,"button",26),Vt("click",function(){return Ut(s),zt(r.saveFhirResource())}),we(100,"mat-icon",27),et(),tt(101,"button",28),Vt("click",function(){return Ut(s),zt(r.copyToClipboard(r.outputAllergyStr))}),we(102,"mat-icon",29),et()(),tt(103,"textarea",30),ut(104," "),et()()()()()}if(2&n){const s=qi(9),o=qi(39);lt(5),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(24),yt("binding",r.codeBinding)("term",r.selectedCodeTerm),lt(),yt("matMenuTriggerFor",o),lt(5),yt("disableRipple",!0),lt(4),Ze(r.codeBinding.ecl),lt(),ba("ngModel",r.recordPropensity),lt(5),ba("ngModel",r.selectedIntoleranceType),lt(),yt("ngForOf",r.intoleranceTypeOptions),lt(5),ba("ngModel",r.selectedClinicalStatus),lt(),yt("ngForOf",r.clinicalStatusOptions),lt(4),ba("ngModel",r.selectedVerificationStatus),lt(),yt("ngForOf",r.verificationStatusOptions),lt(3),yt("ngIf",!r.recordPropensity),lt(),yt("ngIf",r.recordPropensity),lt(),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(3),yt("ngIf",!r.recordPropensity),lt(),yt("ngIf",r.recordPropensity),lt(5),yt("formControl",r.selectedIntoleranceCategoriesControl)("multiple",!0),lt(),yt("ngForOf",r.intoleranceCategoryOptions),lt(4),ba("ngModel",r.selectedCriticality),lt(),yt("ngForOf",r.criticalityOptions),lt(),ba("ngModel",r.selectedReactions),lt(15),yt("options",Ko(29,FEt))("lang","json")("innerHTML",r.outputAllergyStr,Pf)}},dependencies:[gs,Ms,GC,Sa,Oo,da,bl,Gl,cu,Xl,wl,nu,No,Uy,vC,lv,Wl,xu,Gk,av,PEt],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{position:relative;flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}#clear[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return e})(),XEt=(()=>{class e{constructor(t){this._snackBar=t}addProblem(t){var n=this;return de(function*(){n.allergiesProblemListComponent.addProblem(t),n._snackBar.openFromComponent(Ar,{duration:1e3,data:"Problem list updated",panelClass:["green-snackbar"]})})()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies"]],viewQuery:function(n,r){if(1&n&&Mi(zW,5),2&n){let s;Be(s=Ve())&&(r.allergiesProblemListComponent=s.first)}},decls:31,vars:2,consts:[["substancePopoverMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Allergy List Approach (AllergyIntolerance FHIR resource)"],[3,"newProblem"],["label","Problem List Approach (Condition FHIR resource)"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1)(1,"h3"),ut(2,"Allergy, Hypersensitivity and Intolerance "),tt(3,"button",2)(4,"mat-icon"),ut(5,"info"),et()(),tt(6,"mat-menu",null,0)(8,"span",3),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(9,"h4"),ut(10,"Allergy, Hypersensitivity and Intolerance Implementation Demo"),et(),tt(11,"p"),ut(12,"This is a demonstration of different implementation approaches for recording Allergies, Hypersensitivity and Intolerance."),et(),tt(13,"p")(14,"b"),ut(15,"Allergy list:"),et(),ut(16," allergy or intolerance can be recorded in a specific section of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),et(),tt(17,"p")(18,"b"),ut(19,"Problem list:"),et(),ut(20," Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),et(),tt(21,"p"),ut(22,"For more information check the "),tt(23,"a",4),ut(24,"Implementation Guide"),et(),ut(25," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),tt(26,"mat-tab-group",5)(27,"mat-tab",6)(28,"app-allergies-allergy-list",7),Vt("newProblem",function(l){return Ut(s),zt(r.addProblem(l))}),et()(),tt(29,"mat-tab",8),we(30,"app-allergies-problem-list"),et()()()}if(2&n){const s=qi(7);lt(3),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0)}},dependencies:[Oo,da,bl,Gl,cu,zy,ov,zW,WEt],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}#guideLink[_ngcontent-%COMP%]{font-size:smaller}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return e})();function Hk(e,i,t){for(let n in i)if(i.hasOwnProperty(n)){const r=i[n];r?e.setProperty(n,r,t?.has(n)?"important":""):e.removeProperty(n)}return e}function cv(e,i){const t=i?"":"none";Hk(e.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function nX(e,i,t){Hk(e.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},t)}function HC(e,i){return i&&"none"!=i?e+" "+i:e}function rX(e){const i=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*i}function Wk(e,i){return e.getPropertyValue(i).split(",").map(n=>n.trim())}function Xk(e){const i=e.getBoundingClientRect();return{top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:i.width,height:i.height,x:i.x,y:i.y}}function jk(e,i,t){const{top:n,bottom:r,left:s,right:o}=e;return t>=n&&t<=r&&i>=s&&i<=o}function Gy(e,i,t){e.top+=i,e.bottom=e.top+e.height,e.left+=t,e.right=e.left+e.width}function sX(e,i,t,n){const{top:r,right:s,bottom:o,left:l,width:w,height:C}=e,M=w*i,P=C*i;return n>r-P&&nl-M&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:Xk(t)})})}handleScroll(i){const t=yl(i),n=this.positions.get(t);if(!n)return null;const r=n.scrollPosition;let s,o;if(t===this._document){const C=this.getViewportScrollPosition();s=C.top,o=C.left}else s=t.scrollTop,o=t.scrollLeft;const l=r.top-s,w=r.left-o;return this.positions.forEach((C,M)=>{C.clientRect&&t!==M&&t.contains(M)&&Gy(C.clientRect,l,w)}),r.top=s,r.left=o,{top:l,left:w}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function oX(e){const i=e.cloneNode(!0),t=i.querySelectorAll("[id]"),n=e.nodeName.toLowerCase();i.removeAttribute("id");for(let r=0;rcv(t,i)))}constructor(i,t,n,r,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=s,this._dragDropRegistry=o,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new Pe,this._pointerMoveSubscription=Ie.EMPTY,this._pointerUpSubscription=Ie.EMPTY,this._scrollSubscription=Ie.EMPTY,this._resizeSubscription=Ie.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new Pe,this.started=new Pe,this.released=new Pe,this.ended=new Pe,this.entered=new Pe,this.exited=new Pe,this.dropped=new Pe,this.moved=this._moveEvents,this._pointerDown=l=>{if(this.beforeStarted.next(),this._handles.length){const w=this._getTargetHandle(l);w&&!this._disabledHandles.has(w)&&!this.disabled&&this._initializeDragSequence(w,l)}else this.disabled||this._initializeDragSequence(this._rootElement,l)},this._pointerMove=l=>{const w=this._getPointerPositionOnPage(l);if(!this._hasStartedDragging){if(Math.abs(w.x-this._pickupPositionOnPage.x)+Math.abs(w.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const L=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),U=this._dropContainer;if(!L)return void this._endDragSequence(l);(!U||!U.isDragging()&&!U.isReceiving())&&(l.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(l)))}return}l.preventDefault();const C=this._getConstrainedPointerPosition(w);if(this._hasMoved=!0,this._lastKnownPointerPosition=w,this._updatePointerDirectionDelta(C),this._dropContainer)this._updateActiveDropContainer(C,w);else{const M=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,P=this._activeTransform;P.x=C.x-M.x+this._passiveTransform.x,P.y=C.y-M.y+this._passiveTransform.y,this._applyRootElementTransform(P.x,P.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:C,event:l,distance:this._getDragDistance(C),delta:this._pointerDirectionDelta})})},this._pointerUp=l=>{this._endDragSequence(l)},this._nativeDragStart=l=>{if(this._handles.length){const w=this._getTargetHandle(l);w&&!this._disabledHandles.has(w)&&!this.disabled&&l.preventDefault()}else this.disabled||l.preventDefault()},this.withRootElement(i).withParent(t.parentDragRef||null),this._parentPositions=new aX(n),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(n=>vs(n)),this._handles.forEach(n=>cv(n,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){const t=vs(i);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,WC),t.addEventListener("touchstart",this._pointerDown,uX),t.addEventListener("dragstart",this._nativeDragStart,WC)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?vs(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),cv(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),cv(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){const i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){const i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){Hy(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const n=this._rootElement,r=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment(""),l=this._getShadowRoot();r.insertBefore(o,n),this._initialTransform=n.style.transform||"",this._preview=this._createPreviewElement(),nX(n,!1,Yk),this._document.body.appendChild(r.replaceChild(s,n)),this._getPreviewInsertionPoint(r,l).appendChild(this._preview),this.started.next({source:this,event:i}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(i,t){this._parentDragRef&&t.stopPropagation();const n=this.isDragging(),r=Hy(t),s=!r&&0!==t.button,o=this._rootElement,l=yl(t),w=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),C=r?ZT(t):KT(t);if(l&&l.draggable&&"mousedown"===t.type&&t.preventDefault(),n||s||w||C)return;if(this._handles.length){const O=o.style;this._rootElementTapHighlight=O.webkitTapHighlightColor||"",O.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(O=>this._updateOnScroll(O)),this._boundaryElement&&(this._boundaryRect=Xk(this._boundaryElement));const M=this._previewTemplate;this._pickupPositionInElement=M&&M.template&&!M.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,t);const P=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:P.x,y:P.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(i){nX(this._rootElement,!0,Yk),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(i),s=this._getDragDistance(r),o=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:s,dropPoint:r,event:i}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:r,event:i}),t.drop(this,n,this._initialIndex,this._initialContainer,o,s,r,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:t},{x:n,y:r}){let s=this._initialContainer._getSiblingContainerFromPosition(this,i,t);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,t)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,i,t,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,i,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,t):this._applyPreviewTransform(i-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const i=this._previewTemplate,t=this.previewClass,n=i?i.template:null;let r;if(n&&i){const s=i.matchSize?this._initialDomRect:null,o=i.viewContainer.createEmbeddedView(n,i.context);o.detectChanges(),r=fX(o,this._document),this._previewRef=o,i.matchSize?mX(r,s):r.style.transform=XC(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=oX(this._rootElement),mX(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return Hk(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},Yk),cv(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(s=>r.classList.add(s)):r.classList.add(t)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const i=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);const t=function YEt(e){const i=getComputedStyle(e),t=Wk(i,"transition-property"),n=t.find(l=>"transform"===l||"all"===l);if(!n)return 0;const r=t.indexOf(n),s=Wk(i,"transition-duration"),o=Wk(i,"transition-delay");return rX(s[r])+rX(o[r])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{const r=o=>{(!o||yl(o)===this._preview&&"transform"===o.propertyName)&&(this._preview?.removeEventListener("transitionend",r),n(),clearTimeout(s))},s=setTimeout(r,1.5*t);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const i=this._placeholderTemplate,t=i?i.template:null;let n;return t?(this._placeholderRef=i.viewContainer.createEmbeddedView(t,i.context),this._placeholderRef.detectChanges(),n=fX(this._placeholderRef,this._document)):n=oX(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(i,t,n){const r=t===this._rootElement?null:t,s=r?r.getBoundingClientRect():i,o=Hy(n)?n.targetTouches[0]:n,l=this._getViewportScrollPosition();return{x:s.left-i.left+(o.pageX-s.left-l.left),y:s.top-i.top+(o.pageY-s.top-l.top)}}_getPointerPositionOnPage(i){const t=this._getViewportScrollPosition(),n=Hy(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,r=n.pageX-t.left,s=n.pageY-t.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const l=this._ownerSVGElement.createSVGPoint();return l.x=r,l.y=s,l.matrixTransform(o.inverse())}}return{x:r,y:s}}_getConstrainedPointerPosition(i){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:n,y:r}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if("x"===this.lockAxis||"x"===t?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===t)&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:s,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,l=this._boundaryRect,{width:w,height:C}=this._getPreviewRect(),M=l.top+o,P=l.bottom-(C-o);n=hX(n,l.left+s,l.right-(w-s)),r=hX(r,M,P)}return{x:n,y:r}}_updatePointerDirectionDelta(i){const{x:t,y:n}=i,r=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-s.x),l=Math.abs(n-s.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=t>s.x?1:-1,s.x=t),l>this._config.pointerDirectionChangeThreshold&&(r.y=n>s.y?1:-1,s.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,cv(this._rootElement,i))}_removeRootElementListeners(i){i.removeEventListener("mousedown",this._pointerDown,WC),i.removeEventListener("touchstart",this._pointerDown,uX),i.removeEventListener("dragstart",this._nativeDragStart,WC)}_applyRootElementTransform(i,t){const n=XC(i,t),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=HC(n,this._initialTransform)}_applyPreviewTransform(i,t){const n=this._previewTemplate?.template?void 0:this._initialTransform,r=XC(i,t);this._preview.style.transform=HC(r,n)}_getDragDistance(i){const t=this._pickupPositionOnPage;return t?{x:i.x-t.x,y:i.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:t}=this._passiveTransform;if(0===i&&0===t||this.isDragging()||!this._boundaryElement)return;const n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===n.width&&0===n.height)return;const s=r.left-n.left,o=n.right-r.right,l=r.top-n.top,w=n.bottom-r.bottom;r.width>n.width?(s>0&&(i+=s),o>0&&(i-=o)):i=0,r.height>n.height?(l>0&&(t+=l),w>0&&(t-=w)):t=0,(i!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:i})}_getDragStartDelay(i){const t=this.dragStartDelay;return"number"==typeof t?t:Hy(i)?t.touch:t?t.mouse:0}_updateOnScroll(i){const t=this._parentPositions.handleScroll(i);if(t){const n=yl(i);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&Gy(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=IR(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,t){const n=this._previewContainer||"global";if("parent"===n)return i;if("global"===n){const r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return vs(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(i){return this._handles.find(t=>i.target&&(i.target===t||t.contains(i.target)))}}function XC(e,i){return`translate3d(${Math.round(e)}px, ${Math.round(i)}px, 0)`}function hX(e,i,t){return Math.max(i,Math.min(t,e))}function Hy(e){return"t"===e.type[0]}function fX(e,i){const t=e.rootNodes;if(1===t.length&&t[0].nodeType===i.ELEMENT_NODE)return t[0];const n=i.createElement("div");return t.forEach(r=>n.appendChild(r)),n}function mX(e,i){e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.transform=XC(i.left,i.top)}function $k(e,i,t){const n=Wy(i,e.length-1),r=Wy(t,e.length-1);if(n===r)return;const s=e[n],o=r0)return null;const l="horizontal"===this.orientation,w=s.findIndex(W=>W.drag===i),C=s[o],P=C.clientRect,O=w>o?1:-1,L=this._getItemOffsetPx(s[w].clientRect,P,O),U=this._getSiblingOffsetPx(w,s,O),X=s.slice();return $k(s,w,o),s.forEach((W,Z)=>{if(X[Z]===W)return;const rt=W.drag===i,st=rt?L:U,vt=rt?i.getPlaceholderElement():W.drag.getRootElement();W.offset+=st,l?(vt.style.transform=HC(`translate3d(${Math.round(W.offset)}px, 0, 0)`,W.initialTransform),Gy(W.clientRect,0,st)):(vt.style.transform=HC(`translate3d(0, ${Math.round(W.offset)}px, 0)`,W.initialTransform),Gy(W.clientRect,st,0))}),this._previousSwap.overlaps=jk(P,t,n),this._previousSwap.drag=C.drag,this._previousSwap.delta=l?r.x:r.y,{previousIndex:w,currentIndex:o}}enter(i,t,n,r){const s=null==r||r<0?this._getItemIndexFromPointerPosition(i,t,n):r,o=this._activeDraggables,l=o.indexOf(i),w=i.getPlaceholderElement();let C=o[s];if(C===i&&(C=o[s+1]),!C&&(null==s||-1===s||s-1&&o.splice(l,1),C&&!this._dragDropRegistry.isDragging(C)){const M=C.getRootElement();M.parentElement.insertBefore(w,M),o.splice(s,0,i)}else vs(this._element).appendChild(w),o.push(i);w.style.transform="",this._cacheItemPositions()}withItems(i){this._activeDraggables=i.slice(),this._cacheItemPositions()}withSortPredicate(i){this._sortPredicate=i}reset(){this._activeDraggables.forEach(i=>{const t=i.getRootElement();if(t){const n=this._itemPositions.find(r=>r.drag===i)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===i)}updateOnScroll(i,t){this._itemPositions.forEach(({clientRect:n})=>{Gy(n,i,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}_cacheItemPositions(){const i="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:Xk(n)}}).sort((t,n)=>i?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(i,t,n){const r="horizontal"===this.orientation;let s=r?t.left-i.left:t.top-i.top;return-1===n&&(s+=r?t.width-i.width:t.height-i.height),s}_getSiblingOffsetPx(i,t,n){const r="horizontal"===this.orientation,s=t[i].clientRect,o=t[i+-1*n];let l=s[r?"width":"height"]*n;if(o){const w=r?"left":"top",C=r?"right":"bottom";-1===n?l-=o.clientRect[w]-s[C]:l+=s[w]-o.clientRect[C]}return l}_shouldEnterAsFirstChild(i,t){if(!this._activeDraggables.length)return!1;const n=this._itemPositions,r="horizontal"===this.orientation;if(n[0].drag!==this._activeDraggables[0]){const o=n[n.length-1].clientRect;return r?i>=o.right:t>=o.bottom}{const o=n[0].clientRect;return r?i<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(i,t,n,r){const s="horizontal"===this.orientation,o=this._itemPositions.findIndex(({drag:l,clientRect:w})=>l!==i&&((!r||l!==this._previousSwap.drag||!this._previousSwap.overlaps||(s?r.x:r.y)!==this._previousSwap.delta)&&(s?t>=Math.floor(w.left)&&t=Math.floor(w.top)&&n!0,this.sortPredicate=()=>!0,this.beforeStarted=new Pe,this.entered=new Pe,this.exited=new Pe,this.dropped=new Pe,this.sorted=new Pe,this.receivingStarted=new Pe,this.receivingStopped=new Pe,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=Ie.EMPTY,this._verticalScrollDirection=jl.NONE,this._horizontalScrollDirection=Bo.NONE,this._stopScrollTimers=new Pe,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function jEt(e=0,i=Ty){return e<0&&(e=0),Iy(e,e,i)}(0,zH).pipe(Ui(this._stopScrollTimers)).subscribe(()=>{const o=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===jl.UP?o.scrollBy(0,-l):this._verticalScrollDirection===jl.DOWN&&o.scrollBy(0,l),this._horizontalScrollDirection===Bo.LEFT?o.scrollBy(-l,0):this._horizontalScrollDirection===Bo.RIGHT&&o.scrollBy(l,0)})},this.element=vs(i),this._document=n,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new aX(n),this._sortStrategy=new ZEt(this.element,t),this._sortStrategy.withSortPredicate((o,l)=>this.sortPredicate(o,l,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,t,n,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(i)),this._sortStrategy.enter(i,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,t,n,r,s,o,l,w={}){this._reset(),this.dropped.next({item:i,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:s,distance:o,dropPoint:l,event:w})}withItems(i){const t=this._draggables;return this._draggables=i,i.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>-1===i.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._sortStrategy.direction=i,this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){return this._sortStrategy.orientation=i,this}withScrollableParents(i){const t=vs(this.element);return this._scrollableElements=-1===i.indexOf(t)?[t,...i]:i.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,t,n,r){if(this.sortingDisabled||!this._domRect||!sX(this._domRect,.05,t,n))return;const s=this._sortStrategy.sort(i,t,n,r);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,t){if(this.autoScrollDisabled)return;let n,r=jl.NONE,s=Bo.NONE;if(this._parentPositions.positions.forEach((o,l)=>{l===this._document||!o.clientRect||n||sX(o.clientRect,.05,i,t)&&([r,s]=function qEt(e,i,t,n,r){const s=vX(i,r),o=xX(i,n);let l=jl.NONE,w=Bo.NONE;if(s){const C=e.scrollTop;s===jl.UP?C>0&&(l=jl.UP):e.scrollHeight-C>e.clientHeight&&(l=jl.DOWN)}if(o){const C=e.scrollLeft;"rtl"===t?o===Bo.RIGHT?C<0&&(w=Bo.RIGHT):e.scrollWidth+C>e.clientWidth&&(w=Bo.LEFT):o===Bo.LEFT?C>0&&(w=Bo.LEFT):e.scrollWidth-C>e.clientWidth&&(w=Bo.RIGHT)}return[l,w]}(l,o.clientRect,this._sortStrategy.direction,i,t),(r||s)&&(n=l))}),!r&&!s){const{width:o,height:l}=this._viewportRuler.getViewportSize(),w={width:o,height:l,top:0,right:o,bottom:l,left:0};r=vX(w,t),s=xX(w,i),n=window}n&&(r!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=s,this._scrollNode=n,(r||s)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const i=vs(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const i=vs(this.element);this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(i).clientRect}_reset(){this._isDragging=!1;const i=vs(this.element).style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(i,t){return null!=this._domRect&&jk(this._domRect,i,t)}_getSiblingContainerFromPosition(i,t,n){return this._siblings.find(r=>r._canReceive(i,t,n))}_canReceive(i,t,n){if(!this._domRect||!jk(this._domRect,t,n)||!this.enterPredicate(i,this))return!1;const r=this._getShadowRoot().elementFromPoint(t,n);if(!r)return!1;const s=vs(this.element);return r===s||s.contains(r)}_startReceiving(i,t){const n=this._activeSiblings;!n.has(i)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:t}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(i);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const i=IR(vs(this.element));this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const i=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,i))}}function vX(e,i){const{top:t,bottom:n,height:r}=e,s=.05*r;return i>=t-s&&i<=t+s?jl.UP:i>=n-s&&i<=n+s?jl.DOWN:jl.NONE}function xX(e,i){const{left:t,right:n,width:r}=e,s=.05*r;return i>=t-s&&i<=t+s?Bo.LEFT:i>=n-s&&i<=n+s?Bo.RIGHT:Bo.NONE}const jC=Cc({passive:!1,capture:!0});let tAt=(()=>{class e{constructor(t,n){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new Pe,this.pointerUp=new Pe,this.scroll=new Pe,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=n}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,jC)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,jC)}startDragging(t,n){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const r=n.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:jC}),r||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:jC}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,o)=>{this._document.addEventListener(o,s.handler,s.options)})})}}stopDragging(t){const n=this._activeDragInstances.indexOf(t);n>-1&&(this._activeDragInstances.splice(n,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const n=[this.scroll];return t&&t!==this._document&&n.push(new ur(r=>this._ngZone.runOutsideAngular(()=>{const o=l=>{this._activeDragInstances.length&&r.next(l)};return t.addEventListener("scroll",o,!0),()=>{t.removeEventListener("scroll",o,!0)}}))),Yr(...n)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,n)=>{this._document.removeEventListener(n,t.handler,t.options)}),this._globalListeners.clear()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ei),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const eAt={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let Qk=(()=>{class e{constructor(t,n,r,s){this._document=t,this._ngZone=n,this._viewportRuler=r,this._dragDropRegistry=s}createDrag(t,n=eAt){return new KEt(t,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new JEt(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ei),Jt(ou),Jt(tAt))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Xy=new ee("CDK_DRAG_PARENT"),yX=new ee("CdkDragHandle");let bX=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._stateChanges.next(this)}constructor(t,n){this.element=t,this._parentDrag=n,this._stateChanges=new Pe,this._disabled=!1,n?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Xy,12))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[Wt.HasDecoratorInputTransform,"cdkDragHandleDisabled","disabled",Je]},standalone:!0,features:[fi([{provide:yX,useExisting:e}]),on]})}return e})();const wX=new ee("CDK_DRAG_CONFIG"),_X=new ee("CdkDropList");let Kk=(()=>{class e{static#t=this._dragInstances=[];get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}constructor(t,n,r,s,o,l,w,C,M,P,O){this.element=t,this.dropContainer=n,this._ngZone=s,this._viewContainerRef=o,this._dir=w,this._changeDetectorRef=M,this._selfHandle=P,this._parentDrag=O,this._destroyed=new Pe,this._handles=new Wr([]),this.started=new De,this.released=new De,this.ended=new De,this.entered=new De,this.exited=new De,this.dropped=new De,this.moved=new ur(L=>{const U=this._dragRef.moved.pipe(Di(X=>({source:this,pointerPosition:X.pointerPosition,event:X.event,delta:X.delta,distance:X.distance}))).subscribe(L);return()=>{U.unsubscribe()}}),this._dragRef=C.createDrag(t,{dragStartThreshold:l&&null!=l.dragStartThreshold?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&null!=l.pointerDirectionChangeThreshold?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),l&&this._assignDefaults(l),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(er(1),Ui(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(t){const n=t.rootElementSelector,r=t.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const t=e._dragInstances.indexOf(this);t>-1&&e._dragInstances.splice(t,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){const n=this._handles.getValue();n.push(t),this._handles.next(n)}_removeHandle(t){const n=this._handles.getValue(),r=n.indexOf(t);r>-1&&(n.splice(r,1),this._handles.next(n))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){const t=this.element.nativeElement;let n=t;this.rootElementSelector&&(n=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):vs(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const n=this._dir,r=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof r&&r?r:Ch(r),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),n&&t.withDirection(n.value)}}),t.beforeStarted.pipe(er(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let n=this.element.nativeElement.parentElement;for(;n;){if(n.classList.contains("cdk-drag")){t.withParent(e._dragInstances.find(r=>r.element.nativeElement===n)?._dragRef||null);break}n=n.parentElement}})}_handleEvents(t){t.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),t.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(t){const{lockAxis:n,dragStartDelay:r,constrainPosition:s,previewClass:o,boundaryElement:l,draggingDisabled:w,rootElementSelector:C,previewContainer:M}=t;this.disabled=w??!1,this.dragStartDelay=r||0,n&&(this.lockAxis=n),s&&(this.constrainPosition=s),o&&(this.previewClass=o),l&&(this.boundaryElement=l),C&&(this.rootElementSelector=C),M&&(this.previewContainer=M)}_setupHandlesListener(){this._handles.pipe(hs(t=>{const n=t.map(r=>r.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),Rs(t=>Yr(...t.map(n=>n._stateChanges.pipe(Ta(n))))),Ui(this._destroyed)).subscribe(t=>{const n=this._dragRef,r=t.element.nativeElement;t.disabled?n.disableHandle(r):n.enableHandle(r)})}static#e=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(_X,12),mt(Ni),mt(ei),mt(Ir),mt(wX,8),mt(Ba,8),mt(Qk),mt(Mn),mt(yX,10),mt(Xy,12))};static#i=this.\u0275dir=ce({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){2&n&&bi("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[Wt.None,"cdkDragData","data"],lockAxis:[Wt.None,"cdkDragLockAxis","lockAxis"],rootElementSelector:[Wt.None,"cdkDragRootElement","rootElementSelector"],boundaryElement:[Wt.None,"cdkDragBoundary","boundaryElement"],dragStartDelay:[Wt.None,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[Wt.None,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[Wt.HasDecoratorInputTransform,"cdkDragDisabled","disabled",Je],constrainPosition:[Wt.None,"cdkDragConstrainPosition","constrainPosition"],previewClass:[Wt.None,"cdkDragPreviewClass","previewClass"],previewContainer:[Wt.None,"cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[fi([{provide:Xy,useExisting:e}]),on,tr]})}return e})();const Zk=new ee("CdkDropListGroup");let rAt=0,Jk=(()=>{class e{static#t=this._dropLists=[];get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}constructor(t,n,r,s,o,l,w){this.element=t,this._changeDetectorRef=r,this._scrollDispatcher=s,this._dir=o,this._group=l,this._destroyed=new Pe,this.connectedTo=[],this.id="cdk-drop-list-"+rAt++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new De,this.entered=new De,this.exited=new De,this.sorted=new De,this._unsortedItems=new Set,this._dropListRef=n.createDropList(t),this._dropListRef.data=this,w&&this._assignDefaults(w),this._dropListRef.enterPredicate=(C,M)=>this.enterPredicate(C.data,M.data),this._dropListRef.sortPredicate=(C,M,P)=>this.sortPredicate(C,M.data,P.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),l&&l._items.add(this)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,n)=>t._dragRef.getVisibleElement().compareDocumentPosition(n._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(Ta(this._dir.value),Ui(this._destroyed)).subscribe(n=>t.withDirection(n)),t.beforeStarted.subscribe(()=>{const n=Cy(this.connectedTo).map(r=>"string"==typeof r?e._dropLists.find(o=>o.id===r):r);if(this._group&&this._group._items.forEach(r=>{-1===n.indexOf(r)&&n.push(r)}),!this._scrollableParentsResolved){const r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=Ch(this.autoScrollStep,2),t.connectedTo(n.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:this,item:n.item.data,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:this,item:n.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(n=>{this.sorted.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:n.item.data})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,item:n.item.data,isPointerOverContainer:n.isPointerOverContainer,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),Yr(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){const{lockAxis:n,draggingDisabled:r,sortingDisabled:s,listAutoScrollDisabled:o,listOrientation:l}=t;this.disabled=r??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=o??!1,this.orientation=l||"vertical",n&&(this.lockAxis=n)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}static#e=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Qk),mt(Mn),mt(Ry),mt(Ba,8),mt(Zk,12),mt(wX,8))};static#i=this.\u0275dir=ce({type:e,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(n,r){2&n&&(Ti("id",r.id),bi("cdk-drop-list-disabled",r.disabled)("cdk-drop-list-dragging",r._dropListRef.isDragging())("cdk-drop-list-receiving",r._dropListRef.isReceiving()))},inputs:{connectedTo:[Wt.None,"cdkDropListConnectedTo","connectedTo"],data:[Wt.None,"cdkDropListData","data"],orientation:[Wt.None,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[Wt.None,"cdkDropListLockAxis","lockAxis"],disabled:[Wt.HasDecoratorInputTransform,"cdkDropListDisabled","disabled",Je],sortingDisabled:[Wt.HasDecoratorInputTransform,"cdkDropListSortingDisabled","sortingDisabled",Je],enterPredicate:[Wt.None,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[Wt.None,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[Wt.HasDecoratorInputTransform,"cdkDropListAutoScrollDisabled","autoScrollDisabled",Je],autoScrollStep:[Wt.None,"cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[fi([{provide:Zk,useValue:void 0},{provide:_X,useExisting:e}]),on]})}return e})(),lAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[Qk],imports:[lu]})}return e})();function cAt(e,i){}class YC{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let TX=(()=>{class e extends sC{constructor(t,n,r,s,o,l,w,C){super(),this._elementRef=t,this._focusTrapFactory=n,this._config=s,this._interactivityChecker=o,this._ngZone=l,this._overlayRef=w,this._focusMonitor=C,this._platform=me(ir),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=me(Mn),this.attachDomPortal=M=>{this._portalOutlet.hasAttached();const P=this._portalOutlet.attachDomPortal(M);return this._contentAttached(),P},this._document=r,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){const n=this._ariaLabelledByQueue.indexOf(t);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const n=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),n}attachTemplatePortal(t){this._portalOutlet.hasAttached();const n=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(n)}_focusByCssSelector(t,n){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,n)}_trapFocus(){const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElementWhenReady().then(n=>{n||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const t=this._config.restoreFocus;let n=null;if("string"==typeof t?n=this._document.querySelector(t):"boolean"==typeof t?n=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(n=t),this._config.restoreFocus&&n&&"function"==typeof n.focus){const r=GT(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,n=GT();return t===n||t.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=GT()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(UR),mt(Ni,8),mt(YC),mt(QT),mt(ei),mt(dC),mt(Ul))};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(1&n&&Mi(au,7),2&n){let s;Be(s=Ve())&&(r._portalOutlet=s.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){2&n&&Ti("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},standalone:!0,features:[hi,Vi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){1&n&&Gt(0,cAt,0,0,"ng-template",0)},dependencies:[au],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}return e})();class qk{constructor(i,t){this.overlayRef=i,this.config=t,this.closed=new Pe,this.disableClose=t.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{27===n.keyCode&&!this.disableClose&&!io(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=i.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(i,t){if(this.containerInstance){const n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(i),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",t=""){return this.overlayRef.updateSize({width:i,height:t}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}}const CX=new ee("DialogScrollStrategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.block()}}),dAt=new ee("DialogData"),uAt=new ee("DefaultDialogConfig");let fAt=0,SX=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,n,r,s,o,l){this._overlay=t,this._injector=n,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Pe,this._afterOpenedAtThisLevel=new Pe,this._ariaHiddenElements=new Map,this.afterAllClosed=Dg(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ta(void 0))),this._scrollStrategy=l}open(t,n){(n={...this._defaultOptions||new YC,...n}).id=n.id||"cdk-dialog-"+fAt++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),l=new qk(o,n),w=this._attachContainer(o,l,n);return l.containerInstance=w,this._attachDialogContent(t,l,w,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){tP(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){tP(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),tP(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const n=new qg({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(n.backdropClass=t.backdropClass),n}_attachContainer(t,n,r){const s=r.injector||r.viewContainerRef?.injector,o=[{provide:YC,useValue:r},{provide:qk,useValue:n},{provide:dC,useValue:t}];let l;r.container?"function"==typeof r.container?l=r.container:(l=r.container.type,o.push(...r.container.providers(r))):l=TX;const w=new Zg(l,r.viewContainerRef,is.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return t.attach(w).instance}_attachDialogContent(t,n,r,s){if(t instanceof fr){const o=this._createInjector(s,n,r,void 0);let l={$implicit:s.data,dialogRef:n};s.templateContext&&(l={...l,..."function"==typeof s.templateContext?s.templateContext():s.templateContext}),r.attachTemplatePortal(new su(t,null,l,o))}else{const o=this._createInjector(s,n,r,this._injector),l=r.attachComponentPortal(new Zg(t,s.viewContainerRef,o,s.componentFactoryResolver));n.componentRef=l,n.componentInstance=l.instance}}_createInjector(t,n,r,s){const o=t.injector||t.viewContainerRef?.injector,l=[{provide:dAt,useValue:t.data},{provide:qk,useValue:n}];return t.providers&&("function"==typeof t.providers?l.push(...t.providers(n,t,r)):l.push(...t.providers)),t.direction&&(!o||!o.get(Ba,null,{optional:!0}))&&l.push({provide:Ba,useValue:{value:t.direction,change:vi()}}),is.create({parent:o||s,providers:l})}_removeOpenDialog(t,n){const r=this.openDialogs.indexOf(t);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const n=t.parentElement.children;for(let r=n.length-1;r>-1;r--){const s=n[r];s!==t&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xs),Jt(is),Jt(uAt,8),Jt(e,12),Jt(cC),Jt(CX))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function tP(e,i){let t=e.length;for(;t--;)i(e[t])}let mAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[SX],imports:[qf,Jg,yH,Jg]})}return e})();function pAt(e,i){}class eP{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const iP="mdc-dialog--open",EX="mdc-dialog--opening",AX="mdc-dialog--closing";let DX=(()=>{class e extends TX{constructor(t,n,r,s,o,l,w,C,M){super(t,n,r,s,o,l,w,M),this._animationMode=C,this._animationStateChanged=new De,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?IX(this._config.enterAnimationDuration)??150:0,this._exitAnimationDuration=this._animationsEnabled?IX(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(MX,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(EX,iP)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(iP),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(iP),this._animationsEnabled?(this._hostElement.style.setProperty(MX,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(AX)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(EX,AX)}_waitForAnimationToComplete(t,n){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}attachComponentPortal(t){const n=super.attachComponentPortal(t);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(UR),mt(Ni,8),mt(eP),mt(QT),mt(ei),mt(dC),mt(Nr,8),mt(Ul))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,r){2&n&&(Kc("id",r._config.id),Ti("aria-modal",r._config.ariaModal)("role",r._config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),bi("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},standalone:!0,features:[hi,Vi],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"div",1),Gt(2,pAt,0,0,"ng-template",2),et()())},dependencies:[au],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto;outline:0;transform:scale(0.8)}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--closing .mdc-dialog__surface{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{opacity:1}.mdc-dialog--open .mdc-dialog__surface{transform:none}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__container .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{width:100%;height:100%}.mat-mdc-dialog-component-host{display:contents}.mat-mdc-dialog-container{--mdc-dialog-container-elevation: var(--mdc-dialog-container-elevation-shadow);outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, 4px)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87))}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6))}.mat-mdc-dialog-container .mdc-dialog__container{transition:opacity linear var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container .mdc-dialog__surface{transition:transform var(--mat-dialog-transition-duration, 0ms) 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container,.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__surface{transition:none}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-title{padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2})}return e})();const MX="--mat-dialog-transition-duration";function IX(e){return null==e?null:"number"==typeof e?e:e.endsWith("ms")?Ch(e.substring(0,e.length-2)):e.endsWith("s")?1e3*Ch(e.substring(0,e.length-1)):"0"===e?0:null}var $C=function(e){return e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED",e}($C||{});class Oh{constructor(i,t,n){this._ref=i,this._containerInstance=n,this._afterOpened=new Pe,this._beforeClosed=new Pe,this._state=$C.OPEN,this.disableClose=t.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(In(r=>"opened"===r.state),er(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(In(r=>"closed"===r.state),er(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Yr(this.backdropClick(),this.keydownEvents().pipe(In(r=>27===r.keyCode&&!this.disableClose&&!io(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),RX(this,"keydown"===r.type?"keyboard":"mouse"))})}close(i){this._result=i,this._containerInstance._animationStateChanged.pipe(In(t=>"closing"===t.state),er(1)).subscribe(t=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=$C.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(i){let t=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?t.left(i.left):t.right(i.right):t.centerHorizontally(),i&&(i.top||i.bottom)?i.top?t.top(i.top):t.bottom(i.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",t=""){return this._ref.updateSize(i,t),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=$C.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function RX(e,i,t){return e._closeInteractionType=i,e.close(t)}const QC=new ee("MatMdcDialogData"),xAt=new ee("mat-mdc-dialog-default-options"),kX=new ee("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.block()}});let bAt=0,lm=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,n,r,s,o,l,w,C){this._overlay=t,this._defaultOptions=s,this._scrollStrategy=o,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Pe,this._afterOpenedAtThisLevel=new Pe,this.dialogConfigClass=eP,this.afterAllClosed=Dg(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ta(void 0))),this._dialog=n.get(SX),this._dialogRefConstructor=Oh,this._dialogContainerType=DX,this._dialogDataToken=QC}open(t,n){let r;(n={...this._defaultOptions||new eP,...n}).id=n.id||"mat-mdc-dialog-"+bAt++,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(t,{...n,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:YC,useValue:n}]},templateContext:()=>({dialogRef:r}),providers:(o,l,w)=>(r=new this._dialogRefConstructor(o,n,w),r.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:w},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentRef=s.componentRef,r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let n=t.length;for(;n--;)t[n].close()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xs),Jt(is),Jt(Xf,8),Jt(xAt,8),Jt(kX),Jt(e,12),Jt(cC),Jt(Nr,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),wAt=0,dv=(()=>{class e{constructor(t,n,r){this.dialogRef=t,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=FX(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const n=t._matDialogClose||t._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(t){RX(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh,8),mt(ri),mt(lm))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,r){1&n&&Vt("click",function(o){return r._onButtonClick(o)}),2&n&&Ti("aria-label",r.ariaLabel||null)("type",r.type)},inputs:{ariaLabel:[Wt.None,"aria-label","ariaLabel"],type:"type",dialogResult:[Wt.None,"mat-dialog-close","dialogResult"],_matDialogClose:[Wt.None,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[tr]})}return e})(),PX=(()=>{class e{constructor(t,n,r){this._dialogRef=t,this._elementRef=n,this._dialog=r}ngOnInit(){this._dialogRef||(this._dialogRef=FX(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh,8),mt(ri),mt(lm))};static#e=this.\u0275dir=ce({type:e,standalone:!0})}return e})(),nP=(()=>{class e extends PX{constructor(){super(...arguments),this.id="mat-mdc-dialog-title-"+wAt++}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(n,r){2&n&&Kc("id",r.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[hi]})}return e})(),jy=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0})}return e})(),Yy=(()=>{class e extends PX{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(n,r){2&n&&bi("mat-mdc-dialog-actions-align-start","start"===r.align)("mat-mdc-dialog-actions-align-center","center"===r.align)("mat-mdc-dialog-actions-align-end","end"===r.align)},inputs:{align:"align"},standalone:!0,features:[hi]})}return e})();function FX(e,i){let t=e.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?i.find(n=>n.id===t.id):null}let _At=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[lm],imports:[mAt,qf,Jg,Ki,Ki]})}return e})(),TAt=(()=>{class e{constructor(t,n){this.dialogRef=t,this.data=n,this.localEcl="",this.localEcl=n.ecl}onNoClick(){this.dialogRef.close()}eclChanged(t){this.data.ecl=t?.detail[0]}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh),mt(QC))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-ecl-builder-dialog"]],decls:7,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"full-height"],["apiurl","https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct","branch","MAIN/2023-01-31","v-on:eclOutput","eclChange",3,"eclOutput","eclstring"],["mat-dialog-actions","",1,"actions"],["mat-flat-button","","color","accent","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(n,r){1&n&&(tt(0,"h1",0),ut(1,"ECL Builder"),et(),tt(2,"div",1)(3,"snomed-ecl-builder",2),Vt("eclOutput",function(o){return r.eclChanged(o)}),et()(),tt(4,"div",3)(5,"button",4),ut(6,"Ok"),et()()),2&n&&(lt(3),hh("eclstring",r.localEcl),lt(2),yt("mat-dialog-close",r.data))},dependencies:[Sa,dv,nP,Yy,jy],styles:[".full-height[_ngcontent-%COMP%]{height:78%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]})}return e})();const LX=new ee("CdkAccordion");let CAt=0,SAt=(()=>{class e{get expanded(){return this._expanded}set expanded(t){this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}constructor(t,n,r){this.accordion=t,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Ie.EMPTY,this.closed=new De,this.opened=new De,this.destroyed=new De,this.expandedChange=new De,this.id="cdk-accordion-child-"+CAt++,this._expanded=!1,this.disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(LX,12),mt(Mn),mt(wR))};static#e=this.\u0275dir=ce({type:e,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[Wt.HasDecoratorInputTransform,"expanded","expanded",Je],disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],standalone:!0,features:[fi([{provide:LX,useValue:void 0}]),on]})}return e})(),EAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const AAt=["body"],DAt=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],MAt=["mat-expansion-panel-header","*","mat-action-row"];function IAt(e,i){}const RAt=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],kAt=["mat-panel-title","mat-panel-description","*"];function PAt(e,i){1&e&&(tt(0,"span",1),ul(),tt(1,"svg",2),we(2,"path",3),et()()),2&e&&yt("@indicatorRotate",Ct()._getExpandedState())}const NX=new ee("MAT_ACCORDION"),BX="225ms cubic-bezier(0.4,0.0,0.2,1)",VX={indicatorRotate:mr("indicatorRotate",[Nn("collapsed, void",si({transform:"rotate(0deg)"})),Nn("expanded",si({transform:"rotate(180deg)"})),ln("expanded <=> collapsed, void => collapsed",an(BX))]),bodyExpansion:mr("bodyExpansion",[Nn("collapsed, void",si({height:"0px",visibility:"hidden"})),Nn("expanded",si({height:"*",visibility:""})),ln("expanded <=> collapsed, void => collapsed",an(BX))])},UX=new ee("MAT_EXPANSION_PANEL");let FAt=(()=>{class e{constructor(t,n){this._template=t,this._expansionPanel=n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(UX,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["ng-template","matExpansionPanelContent",""]],standalone:!0})}return e})(),OAt=0;const zX=new ee("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let GX=(()=>{class e extends SAt{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=t}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,n,r,s,o,l,w){super(t,n,r),this._viewContainerRef=s,this._animationMode=l,this._hideToggle=!1,this.afterExpand=new De,this.afterCollapse=new De,this._inputChanges=new Pe,this._headerId="mat-expansion-panel-header-"+OAt++,this.accordion=t,this._document=o,this._animationsDisabled="NoopAnimations"===l,w&&(this.hideToggle=w.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Ta(null),In(()=>this.expanded&&!this._portal),er(1)).subscribe(()=>{this._portal=new su(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,n=this._body.nativeElement;return t===n||n.contains(t)}return!1}_animationStarted(t){!HX(t)&&!this._animationsDisabled&&this._body&&this._body?.nativeElement.setAttribute("inert","")}_animationDone(t){HX(t)||("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit(),!this._animationsDisabled&&this._body&&this._body.nativeElement.removeAttribute("inert"))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(NX,12),mt(Mn),mt(wR),mt(Ir),mt(Ni),mt(Nr,8),mt(zX,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-expansion-panel"]],contentQueries:function(n,r,s){if(1&n&&An(s,FAt,5),2&n){let o;Be(o=Ve())&&(r._lazyContent=o.first)}},viewQuery:function(n,r){if(1&n&&Mi(AAt,5),2&n){let s;Be(s=Ve())&&(r._body=s.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(n,r){2&n&&bi("mat-expanded",r.expanded)("_mat-animation-noopable",r._animationsDisabled)("mat-expansion-panel-spacing",r._hasSpacing())},inputs:{hideToggle:[Wt.HasDecoratorInputTransform,"hideToggle","hideToggle",Je],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],standalone:!0,features:[fi([{provide:NX,useValue:void 0},{provide:UX,useExisting:e}]),on,hi,tr,Vi],ngContentSelectors:MAt,decls:7,vars:4,consts:[["body",""],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(n,r){if(1&n){const s=ve();Kn(DAt),xi(0),tt(1,"div",1,0),Vt("@bodyExpansion.start",function(l){return Ut(s),zt(r._animationStarted(l))})("@bodyExpansion.done",function(l){return Ut(s),zt(r._animationDone(l))}),tt(3,"div",2),xi(4,1),Gt(5,IAt,0,0,"ng-template",3),et(),xi(6,2),et()}2&n&&(lt(),yt("@bodyExpansion",r._getExpandedState())("id",r.id),Ti("aria-labelledby",r._headerId),lt(4),yt("cdkPortalOutlet",r._portal))},dependencies:[au],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative;background:var(--mat-expansion-container-background-color);color:var(--mat-expansion-container-text-color);border-radius:var(--mat-expansion-container-shape)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape);border-top-left-radius:var(--mat-expansion-container-shape)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape);border-bottom-left-radius:var(--mat-expansion-container-shape)}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;font-family:var(--mat-expansion-container-text-font);font-size:var(--mat-expansion-container-text-size);font-weight:var(--mat-expansion-container-text-weight);line-height:var(--mat-expansion-container-text-line-height);letter-spacing:var(--mat-expansion-container-text-tracking)}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color)}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[VX.bodyExpansion]},changeDetection:0})}return e})();function HX(e){return"void"===e.fromState}let LAt=(()=>{class e{constructor(t,n,r,s,o,l,w){this.panel=t,this._element=n,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=l,this._parentChangeSubscription=Ie.EMPTY,this.tabIndex=0;const C=t.accordion?t.accordion._stateChanges.pipe(In(M=>!(!M.hideToggle&&!M.togglePosition))):Zo;this.tabIndex=parseInt(w||"")||0,this._parentChangeSubscription=Yr(t.opened,t.closed,C,t._inputChanges.pipe(In(M=>!!(M.hideToggle||M.disabled||M.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(In(()=>t._containsFocus())).subscribe(()=>r.focusVia(n,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:io(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,n){t?this._focusMonitor.focusVia(this._element,t,n):this._element.nativeElement.focus(n)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(GX,1),mt(ri),mt(Ul),mt(Mn),mt(zX,8),mt(Nr,8),hl("tabindex"))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(n,r){1&n&&Vt("click",function(){return r._toggle()})("keydown",function(o){return r._keydown(o)}),2&n&&(Ti("id",r.panel._headerId)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r._getPanelId())("aria-expanded",r._isExpanded())("aria-disabled",r.panel.disabled),Ds("height",r._getHeaderHeight()),bi("mat-expanded",r._isExpanded())("mat-expansion-toggle-indicator-after","after"===r._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===r._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===r._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)]},standalone:!0,features:[on,Vi],ngContentSelectors:kAt,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(n,r){1&n&&(Kn(RAt),tt(0,"span",0),xi(1),xi(2,1),xi(3,2),et(),Gt(4,PAt,3,1,"span",1)),2&n&&(bi("mat-content-hide-toggle",!r._showToggle()),lt(4),xn(4,r._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-expansion-header-collapsed-state-height);font-family:var(--mat-expansion-header-text-font);font-size:var(--mat-expansion-header-text-size);font-weight:var(--mat-expansion-header-text-weight);line-height:var(--mat-expansion-header-text-line-height);letter-spacing:var(--mat-expansion-header-text-tracking)}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color)}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color)}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color)}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color)}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color);display:inline-block;display:var(--mat-expansion-legacy-header-indicator-display, inline-block)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color);display:none;display:var(--mat-expansion-header-indicator-display, none)}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[VX.indicatorRotate]},changeDetection:0})}return e})(),NAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"],standalone:!0})}return e})(),BAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"],standalone:!0})}return e})(),VAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,EAt,Jg]})}return e})();function UAt(e,i){if(1&e){const t=ve();tt(0,"mat-option",2),Vt("click",function(){return Ut(t),zt(Ct().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t.display," ")}}let WX=(()=>{class e{constructor(t){this.terminologyService=t,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>this.options=t.expansion.contains)}optionClicked(){this.selectionChange.emit(this.selectedOptions)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-dropdown-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:7,vars:5,consts:[[3,"ngModelChange","multiple","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[3,"click","value"]],template:function(n,r){1&n&&(tt(0,"mat-form-field")(1,"mat-label"),ut(2),et(),tt(3,"mat-select",0),wa("ngModelChange",function(o){return Na(r.selectedOptions,o)||(r.selectedOptions=o),o}),Gt(4,UAt,2,2,"mat-option",1),et(),tt(5,"mat-hint"),ut(6),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),yt("multiple","Select (Multiple)"==r.binding.type),ba("ngModel",r.selectedOptions),lt(),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,Xl,wl,om,nu,No,lv,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();const zAt=["input"],GAt=["formField"],HAt=["*"];let XX=0;class jX{constructor(i,t){this.source=i,this.value=t}}const WAt={provide:ua,useExisting:Sn(()=>rP),multi:!0},YX=new ee("MatRadioGroup"),XAt=new ee("mat-radio-default-options",{providedIn:"root",factory:function jAt(){return{color:"accent"}}});let rP=(()=>{class e{get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=t,this._markRadiosForCheck()}constructor(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+XX++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new De}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(t=>t===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(n=>{n.checked=this.value===n.value,n.checked&&(this._selected=n)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new jX(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn))};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-radio-group"]],contentQueries:function(n,r,s){if(1&n&&An(s,KC,5),2&n){let o;Be(o=Ve())&&(r._radios=o)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],required:[Wt.HasDecoratorInputTransform,"required","required",Je]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[fi([WAt,{provide:YX,useExisting:e}]),on]})}return e})(),KC=(()=>{class e{get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(t){this._color=t}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l,w,C){this._elementRef=n,this._changeDetector=r,this._focusMonitor=s,this._radioDispatcher=o,this._providerOverride=w,this._uniqueId="mat-radio-"+ ++XX,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new De,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=t,this._noopAnimations="NoopAnimations"===l,C&&(this.tabIndex=jr(C,0))}focus(t,n){n?this._focusMonitor.focusVia(this._inputElement,n,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,n)=>{t!==this.id&&n===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new jX(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(t){t.stopPropagation()}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){const n=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),n&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_updateTabIndex(){const t=this.radioGroup;let n;if(n=t&&t.selected&&!this.disabled?t.selected===this?this.tabIndex:-1:this.tabIndex,n!==this._previousTabIndex){const r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",n+""),this._previousTabIndex=n)}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(YX,8),mt(ri),mt(Mn),mt(Ul),mt(wR),mt(Nr,8),mt(XAt,8),hl("tabindex"))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-radio-button"]],viewQuery:function(n,r){if(1&n&&(Mi(zAt,5),Mi(GAt,7,ri)),2&n){let s;Be(s=Ve())&&(r._inputElement=s.first),Be(s=Ve())&&(r._rippleTrigger=s.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(n,r){1&n&&Vt("focus",function(){return r._inputElement.nativeElement.focus()}),2&n&&(Ti("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),bi("mat-primary","primary"===r.color)("mat-accent","accent"===r.color)("mat-warn","warn"===r.color)("mat-mdc-radio-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)],checked:[Wt.HasDecoratorInputTransform,"checked","checked",Je],value:"value",labelPosition:"labelPosition",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],required:[Wt.HasDecoratorInputTransform,"required","required",Je],color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[on,Vi],ngContentSelectors:HAt,decls:13,vars:16,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"div",2,0)(2,"div",3)(3,"div",4),Vt("click",function(l){return Ut(s),zt(r._onTouchTargetClick(l))}),et(),tt(4,"input",5,1),Vt("change",function(l){return Ut(s),zt(r._onInputInteraction(l))}),et(),tt(6,"div",6),we(7,"div",7)(8,"div",8),et(),tt(9,"div",9),we(10,"div",10),et()(),tt(11,"label",11),xi(12),et()()}2&n&&(yt("labelPosition",r.labelPosition),lt(2),bi("mdc-radio--disabled",r.disabled),lt(2),yt("id",r.inputId)("checked",r.checked)("disabled",r.disabled)("required",r.required),Ti("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby),lt(5),yt("matRippleTrigger",r._rippleTrigger.nativeElement)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),lt(2),yt("for",r.inputId))},dependencies:[iu,YR],styles:['.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio[hidden]{display:none}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{padding:calc((var(--mdc-radio-state-layer-size) - 20px) / 2)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{top:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);right:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);left:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:0;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}return e})(),YAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,qc,Qg,KC,Ki]})}return e})();function $At(e,i){if(1&e){const t=ve();tt(0,"mat-radio-button",3),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().optionSelected(r))}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t.code),lt(),Ye(" ",t.display," ")}}let $X=(()=>{class e{constructor(t){this.terminologyService=t,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>this.options=t.expansion.contains)}optionSelected(t){this.selectionChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-radios-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:3,consts:[["aria-label","Select an option",1,"radio-group"],["class","radio-button",3,"value","click",4,"ngFor","ngForOf"],["id","hint"],[1,"radio-button",3,"click","value"]],template:function(n,r){1&n&&(tt(0,"div"),ut(1),et(),tt(2,"mat-radio-group",0),Gt(3,$At,2,2,"mat-radio-button",1),et(),tt(4,"div",2),ut(5),et()),2&n&&(lt(),Ze(r.binding.title),lt(2),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,rP,KC],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:0}"]})}return e})(),QX=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new De,this.text=""}ngOnInit(){}onTextChange(t){this.text=t,this.textChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-textbox-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","placeholder","Enter text...",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(tt(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),tt(3,"textarea",1),wa("ngModelChange",function(o){return Na(r.text,o)||(r.text=o),o}),Vt("ngModelChange",function(o){return r.onTextChange(o)}),et(),tt(4,"mat-hint"),ut(5),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),ba("ngModel",r.text),lt(2),Ze(r.binding.note))},dependencies:[Xl,wl,om,Fh,Hl,No,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();const QAt=["input"],KAt=["label"],ZAt=["*"],JAt=new ee("mat-checkbox-default-options",{providedIn:"root",factory:KX});function KX(){return{color:"accent",clickAction:"check-indeterminate"}}var no=function(e){return e[e.Init=0]="Init",e[e.Checked=1]="Checked",e[e.Unchecked=2]="Unchecked",e[e.Indeterminate=3]="Indeterminate",e}(no||{});const qAt={provide:ua,useExisting:Sn(()=>ZC),multi:!0};class tDt{}let eDt=0;const ZX=KX();let ZC=(()=>{class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){const n=new tDt;return n.source=this,n.checked=t,n}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l){this._elementRef=t,this._changeDetectorRef=n,this._ngZone=r,this._animationMode=o,this._options=l,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new De,this.indeterminateChange=new De,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=no.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||ZX,this.color=this._options.color||ZX.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId="mat-mdc-checkbox-"+ ++eDt}ngOnChanges(t){t.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){t!==this.disabled&&(this._disabled=t,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const n=t!=this._indeterminate;this._indeterminate=t,n&&(this._transitionCheckState(this._indeterminate?no.Indeterminate:this.checked?no.Checked:no.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}validate(t){return this.required&&!0!==t.value?{required:!0}:null}registerOnValidatorChange(t){this._validatorChangeFn=t}_transitionCheckState(t){let n=this._currentCheckState,r=this._getAnimationTargetElement();if(n!==t&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(n,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);const s=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(s)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const t=this._options?.clickAction;this.disabled||"noop"===t?!this.disabled&&"noop"===t&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==t&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?no.Checked:no.Unchecked),this._emitChangeEvent())}_onInteractionEvent(t){t.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(t,n){if("NoopAnimations"===this._animationMode)return"";switch(t){case no.Init:if(n===no.Checked)return this._animationClasses.uncheckedToChecked;if(n==no.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case no.Unchecked:return n===no.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case no.Checked:return n===no.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case no.Indeterminate:return n===no.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(t){const n=this._inputElement;n&&(n.nativeElement.indeterminate=t)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(t){t.target&&this._labelElement.nativeElement.contains(t.target)&&t.stopPropagation()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(Mn),mt(ei),hl("tabindex"),mt(Nr,8),mt(JAt,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-checkbox"]],viewQuery:function(n,r){if(1&n&&(Mi(QAt,5),Mi(KAt,5),Mi(iu,5)),2&n){let s;Be(s=Ve())&&(r._inputElement=s.first),Be(s=Ve())&&(r._labelElement=s.first),Be(s=Ve())&&(r.ripple=s.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(n,r){2&n&&(Kc("id",r.id),Ti("tabindex",null)("aria-label",null)("aria-labelledby",null),Ll(r.color?"mat-"+r.color:"mat-accent"),bi("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked))},inputs:{ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],id:"id",required:[Wt.HasDecoratorInputTransform,"required","required",Je],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?void 0:jr(t)],color:"color",checked:[Wt.HasDecoratorInputTransform,"checked","checked",Je],disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],indeterminate:[Wt.HasDecoratorInputTransform,"indeterminate","indeterminate",Je]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[fi([qAt,{provide:Ys,useExisting:e,multi:!0}]),on,tr,Vi],ngContentSelectors:ZAt,decls:15,vars:19,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"div",3),Vt("click",function(l){return Ut(s),zt(r._preventBubblingFromLabel(l))}),tt(1,"div",4,0)(3,"div",5),Vt("click",function(){return Ut(s),zt(r._onTouchTargetClick())}),et(),tt(4,"input",6,1),Vt("blur",function(){return Ut(s),zt(r._onBlur())})("click",function(){return Ut(s),zt(r._onInputClick())})("change",function(l){return Ut(s),zt(r._onInteractionEvent(l))}),et(),we(6,"div",7),tt(7,"div",8),ul(),tt(8,"svg",9),we(9,"path",10),et(),Q0(),we(10,"div",11),et(),we(11,"div",12),et(),tt(12,"label",13,2),xi(14),et()()}if(2&n){const s=qi(2);yt("labelPosition",r.labelPosition),lt(4),bi("mdc-checkbox--selected",r.checked),yt("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled)("id",r.inputId)("required",r.required)("tabIndex",r.disabled?-1:r.tabIndex),Ti("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("name",r.name)("value",r.value),lt(7),yt("matRippleTrigger",s)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),lt(),yt("for",r.inputId)}},dependencies:[iu,YR],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}}.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:focus:not(:checked):not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return e})(),rDt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[ZC,Ki,Ki]})}return e})();function sDt(e,i){if(1&e){const t=ve();tt(0,"mat-checkbox",3),Vt("click",function(){return Ut(t),zt(Ct().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;hh("formControlName",t.display),lt(),Ye(" ",t.display," ")}}let JX=(()=>{class e{constructor(t,n){this.terminologyService=t,this._formBuilder=n,this.selectionChange=new De,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.options=[{display:this.binding.title}],this.options?.forEach(t=>{this.checkboxes.addControl(t.display,this._formBuilder.control(!1))})}optionClicked(){let t=[];t.push({title:this.binding.title,code:this.binding.ecl,value:this.checkboxes.value[this.binding.title]?this.present:this.absent}),this.selectionChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(NC))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-checkbox-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:4,vars:3,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","before",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","before",1,"check",3,"click","formControlName"]],template:function(n,r){1&n&&(tt(0,"form",0),Gt(1,sDt,2,2,"mat-checkbox",1),tt(2,"span",2),ut(3),et()()),2&n&&(yt("formGroup",r.checkboxes),lt(),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,rv,No,nm,cd,sv,ZC],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}return e})(),qX=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(t){this.value=t,this.textChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-integer-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter integer value...","pattern","^-?[0-9]\\d*$","title","Only integer values are allowed",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(tt(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),tt(3,"input",1),wa("ngModelChange",function(o){return Na(r.value,o)||(r.value=o),o}),Vt("ngModelChange",function(o){return r.onValueChange(o)}),et(),tt(4,"mat-hint"),ut(5),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),ba("ngModel",r.value),lt(2),Ze(r.binding.note))},dependencies:[Xl,wl,om,Fh,Hl,PC,No,LC,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})(),tj=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(t){this.value=t,this.textChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-decimal-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter decimal value...","pattern","^-?[0-9]*\\.?[0-9]+$","title","Only decimal values are allowed","step","any",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(tt(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),tt(3,"input",1),wa("ngModelChange",function(o){return Na(r.value,o)||(r.value=o),o}),Vt("ngModelChange",function(o){return r.onValueChange(o)}),et(),tt(4,"mat-hint"),ut(5),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),ba("ngModel",r.value),lt(2),Ze(r.binding.note))},dependencies:[Xl,wl,om,Fh,Hl,PC,No,LC,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();function aDt(e,i){if(1&e){const t=ve();tt(0,"mat-checkbox",3),Vt("click",function(){return Ut(t),zt(Ct().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;hh("formControlName",t.display),lt(),Ye(" ",t.display," ")}}let ej=(()=>{class e{constructor(t,n){this.terminologyService=t,this._formBuilder=n,this.selectionChange=new De,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>{this.options=t.expansion.contains,this.options?.forEach(n=>{this.checkboxes.addControl(n.display,this._formBuilder.control(!1))})})}optionClicked(){let t=[];this.options?.forEach(n=>{t.push({code:n,value:this.checkboxes.value[n.display]?this.present:this.absent})}),this.selectionChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(NC))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-checkbox-multiple-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:4,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","after",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","after",1,"check",3,"click","formControlName"]],template:function(n,r){1&n&&(tt(0,"div"),ut(1),et(),tt(2,"form",0),Gt(3,aDt,2,2,"mat-checkbox",1),tt(4,"span",2),ut(5),et()()),2&n&&(lt(),Ze(r.binding.title),lt(),yt("formGroup",r.checkboxes),lt(),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,rv,No,nm,cd,sv,ZC],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}return e})();const oDt=["newPanel"],lDt=()=>({standalone:!0}),sP=()=>({});function cDt(e,i){1&e&&(tt(0,"mat-panel-description"),ut(1," Click to add new binding "),et())}function dDt(e,i){if(1&e){const t=ve();tt(0,"button",46),Vt("click",function(){let r;return Ut(t),zt(null==(r=Ct().newBindingForm.get("title"))?null:r.reset())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function uDt(e,i){1&e&&(tt(0,"span"),ut(1,"Restrict to Observables"),et())}function hDt(e,i){1&e&&(tt(0,"span"),ut(1,"Open to Observables + Findings + Procedures + Situations"),et())}function fDt(e,i){if(1&e&&(tt(0,"mat-option",47),ut(1),et()),2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t," ")}}function mDt(e,i){if(1&e){const t=ve();tt(0,"button",46),Vt("click",function(){let r;return Ut(t),zt(null==(r=Ct(2).newBindingForm.get("ecl"))?null:r.reset())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function pDt(e,i){if(1&e){const t=ve();tt(0,"mat-form-field",14)(1,"mat-label"),ut(2,"Answer options: ECL Expression"),et(),we(3,"input",48),tt(4,"a",49),Vt("click",function(){let r;Ut(t);const s=Ct();return zt(s.openEclBuilder(null==(r=s.newBindingForm.get("ecl"))?null:r.value,"ecl"))}),ut(5,"ECL Builder"),et(),Gt(6,mDt,3,0,"button",16),tt(7,"mat-error"),ut(8),et()()}if(2&e){let t;const n=Ct();lt(6),yt("ngIf",null==(t=n.newBindingForm.get("ecl"))?null:t.value),lt(2),Ze(n.getErrorMessage("ecl"))}}function gDt(e,i){1&e&&(tt(0,"span"),ut(1,"Restrict to Observables"),et())}function vDt(e,i){1&e&&(tt(0,"span"),ut(1,"Open to Observables + Findings + Procedures"),et())}function xDt(e,i){if(1&e){const t=ve();tt(0,"mat-form-field",14),we(1,"app-autocomplete-binding",50),tt(2,"a",19),Vt("click",function(){return Ut(t),zt(Ct().toggleCheckboxBinding())}),Gt(3,gDt,2,0,"span",10)(4,vDt,2,0,"span",10),et(),tt(5,"mat-error"),ut(6),et()()}if(2&e){const t=Ct();lt(),yt("binding",t.checkboxBinding),lt(2),yt("ngIf",t.checkboxBinding.ecl===t.codeBindingAll.ecl),lt(),yt("ngIf",t.checkboxBinding.ecl!=t.codeBindingAll.ecl),lt(2),Ze(t.getErrorMessage("ecl"))}}function yDt(e,i){if(1&e){const t=ve();tt(0,"button",46),Vt("click",function(){let r;return Ut(t),zt(null==(r=Ct(2).newBindingForm.get("note"))?null:r.reset())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function bDt(e,i){if(1&e&&(tt(0,"mat-form-field",51)(1,"mat-label"),ut(2,"Note"),et(),we(3,"input",52),Gt(4,yDt,3,0,"button",16),tt(5,"mat-error"),ut(6),et()()),2&e){let t;const n=Ct();lt(4),yt("ngIf",null==(t=n.newBindingForm.get("note"))?null:t.value),lt(2),Ze(n.getErrorMessage("note"))}}function wDt(e,i){if(1&e){const t=ve();tt(0,"button",27),Vt("click",function(){return Ut(t),zt(Ct().addBinding())}),ut(1,"Add binding"),et()}}function _Dt(e,i){if(1&e){const t=ve();tt(0,"button",27),Vt("click",function(){Ut(t);const r=Ct();return r.addBinding(),zt(r.clearOutput())}),ut(1,"Update binding"),et()}}function TDt(e,i){if(1&e){const t=ve();tt(0,"button",35),Vt("click",function(){Ut(t);const r=Ct();return zt(r.showRightContainer=!r.showRightContainer)}),ut(1),et()}if(2&e){const t=Ct();lt(),Ye(" ",t.showRightContainer?"Close data panel":"Open data panel"," ")}}function CDt(e,i){1&e&&(tt(0,"button",53),ut(1," Download form "),et()),2&e&&(Ct(),yt("matMenuTriggerFor",qi(69)))}function SDt(e,i){if(1&e){const t=ve();tt(0,"div",54)(1,"p",55),ut(2),et(),tt(3,"button",56),Vt("click",function(){return Ut(t),zt(Ct().titleEditMode=!0)}),tt(4,"mat-icon"),ut(5,"edit"),et()()()}if(2&e){const t=Ct();lt(2),Ze(t.formTitle)}}function EDt(e,i){if(1&e){const t=ve();tt(0,"div",54)(1,"form",57)(2,"mat-form-field")(3,"mat-label"),ut(4,"Title"),et(),tt(5,"input",58),wa("ngModelChange",function(r){Ut(t);const s=Ct();return Na(s.formTitle,r)||(s.formTitle=r),zt(r)}),Vt("ngModelChange",function(){return Ut(t),zt(Ct().refreshFhirQuestionnaire())}),et(),tt(6,"button",46),Vt("click",function(){return Ut(t),zt(Ct().formTitle="")}),tt(7,"mat-icon"),ut(8,"close"),et()()()(),tt(9,"button",56),Vt("click",function(){return Ut(t),zt(Ct().titleEditMode=!1)}),tt(10,"mat-icon"),ut(11,"save"),et()()()}if(2&e){const t=Ct();lt(5),ba("ngModel",t.formTitle),yt("ngModelOptions",Ko(2,lDt))}}function ADt(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function DDt(e,i){if(1&e){const t=ve();tt(0,"app-dropdown-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function MDt(e,i){if(1&e){const t=ve();tt(0,"app-radios-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function IDt(e,i){if(1&e&&(tt(0,"span",68),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ze(t.title)}}function RDt(e,i){if(1&e){const t=ve();tt(0,"app-textbox-binding",69),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function kDt(e,i){if(1&e){const t=ve();tt(0,"app-integer-binding",69),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function PDt(e,i){if(1&e){const t=ve();tt(0,"app-decimal-binding",69),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function FDt(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function ODt(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-multiple-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function LDt(e,i){if(1&e&&(tt(0,"button",70)(1,"mat-icon"),ut(2,"info"),et()()),2&e){const t=Ct().$implicit;yt("matMenuTriggerFor",qi(15))("disabled",!t.code&&!t.ecl)}}function NDt(e,i){if(1&e){const t=ve();tt(0,"span",6),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Question terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Zc("",null==t.code?null:t.code.code," |",null==t.code?null:t.code.display,"|")}}function BDt(e,i){if(1&e){const t=ve();tt(0,"span",6),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Answer terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Ze(t.ecl)}}function VDt(e,i){if(1&e){const t=ve();tt(0,"div",59)(1,"div",60)(2,"mat-icon",61),ut(3,"drag_indicator"),et(),Gt(4,ADt,1,1,"app-autocomplete-binding",62)(5,DDt,1,1,"app-dropdown-binding",62)(6,MDt,1,1,"app-radios-binding",62)(7,IDt,2,1,"span",63)(8,RDt,1,1,"app-textbox-binding",64)(9,kDt,1,1,"app-integer-binding",64)(10,PDt,1,1,"app-decimal-binding",64)(11,FDt,1,1,"app-checkbox-binding",62)(12,ODt,1,1,"app-checkbox-multiple-binding",62)(13,LDt,3,2,"button",65),tt(14,"mat-menu",null,0),Gt(16,NDt,5,3,"span",66)(17,BDt,5,2,"span",66),et(),tt(18,"button",56),Vt("click",function(){const r=Ut(t).index;return zt(Ct().bindings.splice(r,1))}),tt(19,"mat-icon"),ut(20,"delete"),et()(),tt(21,"button",56),Vt("click",function(){const r=Ut(t).index;return zt(Ct().edit(r))}),tt(22,"mat-icon"),ut(23,"edit"),et()()()()}if(2&e){const t=i.$implicit;lt(4),yt("ngIf","Autocomplete"==t.type),lt(),yt("ngIf","Select (Single)"==t.type||"Select (Multiple)"==t.type),lt(),yt("ngIf","Options"==t.type),lt(),yt("ngIf","Section header"==t.type),lt(),yt("ngIf","Text box"==t.type),lt(),yt("ngIf","Integer"==t.type),lt(),yt("ngIf","Decimal"==t.type),lt(),yt("ngIf","Checkbox"==t.type),lt(),yt("ngIf","Checkbox multiple"==t.type),lt(),yt("ngIf","Section header"!=t.type),lt(3),yt("ngIf",t.code),lt(),yt("ngIf",t.ecl)}}function UDt(e,i){if(1&e){const t=ve();tt(0,"div",74)(1,"button",75),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.saveOutput(r.outputStr))}),we(2,"mat-icon",76),et(),tt(3,"button",77),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.copyOutputToClipboard(r.outputStr))}),we(4,"mat-icon",78),et()()}}function zDt(e,i){if(1&e&&(tt(0,"div",71),Gt(1,UDt,5,0,"div",72),tt(2,"textarea",73),ut(3," "),et()()),2&e){const t=Ct();lt(),yt("ngIf",t.showRightContainer),lt(),yt("options",Ko(4,sP))("lang","json")("innerHTML",t.responseStr,Pf)}}function GDt(e,i){if(1&e){const t=ve();tt(0,"div",74)(1,"button",75),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.saveBundleOutput(r.responseBundleStr))}),we(2,"mat-icon",76),et(),tt(3,"button",77),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.copyOutputToClipboard(r.responseBundleStr))}),we(4,"mat-icon",78),et()()}}function HDt(e,i){if(1&e&&(tt(0,"div",71),Gt(1,GDt,5,0,"div",72),tt(2,"textarea",73),ut(3," "),et()()),2&e){const t=Ct();lt(),yt("ngIf",t.showRightContainer),lt(),yt("options",Ko(4,sP))("lang","json")("innerHTML",t.responseBundleStr,Pf)}}function WDt(e,i){if(1&e){const t=ve();tt(0,"div",74)(1,"button",75),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.saveOutput(r.fhirQuestionnaireStr))}),we(2,"mat-icon",76),et(),tt(3,"button",77),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.copyOutputToClipboard(r.fhirQuestionnaireStr))}),we(4,"mat-icon",78),et()()}}function XDt(e,i){if(1&e&&(tt(0,"div",71),Gt(1,WDt,5,0,"div",72),tt(2,"textarea",73),ut(3," "),et()()),2&e){const t=Ct();lt(),yt("ngIf",t.showRightContainer),lt(),yt("options",Ko(4,sP))("lang","json")("innerHTML",t.fhirQuestionnaireStr,Pf)}}let jDt=(()=>{class e{constructor(t,n,r){this.terminologyService=t,this.clipboard=n,this.dialog=r,this.formTitle="My new form",this.titleEditMode=!1,this.bindings=[],this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}",this.fhirQuestionnaire={},this.fhirQuestionnaireStr="{}",this.observableBinding={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingObservables={title:"Question code (Observables)",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingAll={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)| OR << 404684003 |Clinical finding (finding)| OR << 71388002 |Procedure (procedure)| OR << 243796009 |Situation with explicit context (situation)|",value:""},this.codeBinding=this.codeBindingAll,this.checkboxBinding=JSON.parse(JSON.stringify(this.codeBindingAll)),this.example1={title:"Appendicitis data entry form (example)",bindings:[{title:"Diagnosis (type of appendicitis)",type:"Autocomplete",ecl:"<< 74400008 |Appendicitis|",value:"",note:"An autocomplete field to select between all descendants of appendicitis."},{title:"Clinical note",type:"Text box",ecl:"74400008 |Appendicitis|",value:"",note:"A text box for entering free text clinical information."},{title:"Appendicitis type",type:"Select (Single)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A single selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicitis type (M)",type:"Select (Multiple)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A multiple selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicectomy type",type:"Options",ecl:"<< 174036004 |Emergency appendectomy (procedure)|",value:"",note:"A radio buttons selector for the type of appendicectomy procedure."}]},this.newBindingForm=new nv({title:new Va("",[vu.required,vu.maxLength(50)]),code:new Va("",[]),type:new Va("",[vu.required]),ecl:new Va("",[]),value:new Va("",[]),note:new Va("",[vu.maxLength(500)])}),this.indexInEdit=-1,this.panelOpenState=!1,this.maxSelectCount=50,this.maxOptionsCount=10,this.controlTypes=["Autocomplete","Select (Single)","Select (Multiple)","Options","Section header","Text box","Integer","Decimal","Checkbox","Checkbox multiple"].sort((s,o)=>s.localeCompare(o)),this.showRightContainer=!1}ngOnInit(){this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}get stateName(){return this.showRightContainer?"open":"closed"}addBinding(){var t=this;return de(function*(){if(t.newBindingForm.markAllAsTouched(),t.newBindingForm.invalid)return;const{title:n,code:r,type:s,ecl:o,value:l,note:w}=t.newBindingForm.controls;let C={title:n.value,code:r.value,type:s.value,ecl:o.value,value:l.value,note:w.value},M=!1;o.value?typeof C.type?.indexOf("Select")<"u"&&C.type?.indexOf("Select")>-1?(yield t.getEclPreview(o.value)).expansion.contains.length>t.maxSelectCount&&(M=!0,o.setErrors({selectTooManyResults:!0})):(typeof C.type?.indexOf("Options")<"u"&&C.type?.indexOf("Options")>-1||typeof C.type?.indexOf("Checkbox multiple")<"u"&&C.type?.indexOf("Checkbox multiple")>-1)&&(yield t.getEclPreview(o.value)).expansion.contains.length>t.maxOptionsCount&&(M=!0,o.setErrors({optionsTooManyResults:!0})):"Section header"!=C.type&&"Text box"!=C.type&&"Integer"!=C.type&&"Decimal"!=C.type&&(M=!0,o.setErrors({required:!0})),!M&&(t.indexInEdit>-1?t.bindings[t.indexInEdit]=C:t.bindings.push(C),t.newBindingForm.reset(),t.newPanel.close(),t.indexInEdit=-1,setTimeout(()=>{t.refreshFhirQuestionnaire(),t.refreshResponse()},100))})()}refreshFhirQuestionnaire(){this.fhirQuestionnaire={resourceType:"Questionnaire",title:this.formTitle,status:"draft",item:[]},this.bindings.forEach((t,n)=>{const r=this.createItemForBinding(t,n);r&&this.fhirQuestionnaire.item.push(r)}),this.fhirQuestionnaireStr=JSON.stringify(this.fhirQuestionnaire,null,2)}createItemForBinding(t,n){const r=this.initializeBaseItem(t,n);return["Select (Single)","Select (Multiple)","Options","Autocomplete"].includes(t.type)&&(r.extension=this.getExtensionForSelectableTypes(),r.answerValueSet=this.getAnswerValueSet(t)),"Autocomplete"===t.type&&r.extension.push(this.getAutocompleteExtension()),"Select (Multiple)"===t.type&&(r.repeats=!0),r}initializeBaseItem(t,n){const r={linkId:n+1,text:t.title,type:this.getQuestionnaireItemType(t.type)};return t.code&&(r.code=[{system:"http://snomed.info/sct",code:t.code.code,display:t.code.display}]),r}getQuestionnaireItemType(t){switch(t){case"Section header":return"display";case"Select (Single)":case"Select (Multiple)":case"Options":case"Checkbox multiple":case"Autocomplete":return"choice";case"Text box":return"text";case"Integer":return"integer";case"Decimal":return"decimal";default:return console.warn(`Unhandled binding type: ${t}`),null}}getExtensionForSelectableTypes(){return[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-preferredTerminologyServer",valueUrl:"https://snowstorm.ihtsdotools.org/fhir"}]}getAutocompleteExtension(){return{url:"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",valueCodeableConcept:{coding:[{system:"http://hl7.org/fhir/questionnaire-item-control",code:"autocomplete",display:"Auto-complete"}]}}}getAnswerValueSet(t){return`http://snomed.info/sct/900000000000207008?fhir_vs=ecl%2F${encodeURIComponent(t.ecl)}`}getEclPreview(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(t,"")).pipe(Di(s=>s)))})()}edit(t){this.indexInEdit=t;const n=this.bindings[t];this.newBindingForm.setValue({title:n.title,code:n.code?n.code:"",type:n.type,ecl:n.ecl,value:n.value,note:n.note}),this.newPanel.open()}onDrop(t){$k(this.bindings,t.previousIndex,t.currentIndex)}getErrors(t){const n=this.newBindingForm.get(t);return n?n.errors:null}getErrorMessage(t){const n=this.getErrors(t);if(n){if(n.required)return"This field is required";if(n.maxlength)return`This field must be less than ${n.maxlength.requiredLength} characters`;if(n.selectTooManyResults)return`Too many results (Max = ${this.maxSelectCount})`;if(n.optionsTooManyResults)return`Too many results (Max = ${this.maxOptionsCount})`}return null}refreshResponse(){this.response={};for(let t of this.bindings)this.response[t.title]={},t.code&&(this.response[t.title].code=t.code);for(let[t,n]of Object.entries(this.output))this.output[t].code&&(this.response[t].code=this.output[t].code),this.output[t].value&&(this.response[t].value=this.output[t].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[t,n]of Object.entries(this.response)){let r=n;const s=r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0,o=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let l={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};l.code=s||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},o&&(l.valueCodeableConcept=o),r.value&&"string"==typeof r.value&&(l.valueString=r.value),(l.valueCodeableConcept||l.valueString)&&this.responseBundle.entry.push(l)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}optionSelected(t,n,r){this.output[t]={code:n,value:r},n||delete this.output[t].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}loadExample1(){this.formTitle=this.example1.title,this.bindings=this.example1.bindings,this.refreshFhirQuestionnaire(),this.clearOutput(),this.refreshResponse()}cancelEdit(){this.newBindingForm.reset(),this.newPanel.close(),this.indexInEdit=-1}clear(){this.bindings=[],this.clearOutput(),this.newBindingForm.reset(),this.formTitle="My new form",this.showRightContainer=!1}clearOutput(){this.output={},this.outputStr="{}";const t=JSON.parse(JSON.stringify(this.bindings));this.bindings=[],this.bindings=t}saveForm(){var t=new Blob([JSON.stringify({title:this.formTitle,bindings:this.bindings},null,2)],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(t,`${this.formTitle}.json`)}saveOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(n,`${this.formTitle}-data.json`)}saveBundleOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(n,`${this.formTitle}-fhir-bundle.json`)}copyOutputToClipboard(t){this.clipboard.copy(t)}uploadFile(t){if(1!==t.target.files.length)console.error("No file selected");else{const n=new FileReader;n.onloadend=r=>{if(n.result){const s=JSON.parse(n.result?.toString());Array.isArray(s)?(this.bindings=s,this.formTitle="My new form"):(this.bindings=[],this.bindings=s.bindings,this.formTitle=s.title),this.clearOutput(),this.refreshResponse(),this.refreshFhirQuestionnaire()}},n.readAsText(t.target.files[0])}}openEclBuilder(t,n){this.dialog.open(TAt,{data:{ecl:t},width:"80%",height:"80%"}).afterClosed().subscribe(s=>{if(s){const o=this.newBindingForm.get(n);o&&o.setValue(s.ecl)}})}toggleCodeBinding(){this.codeBinding=this.codeBinding===this.codeBindingAll?this.codeBindingObservables:this.codeBindingAll}toggleCheckboxBinding(){this.checkboxBinding=this.checkboxBinding.ecl===this.codeBindingAll.ecl?JSON.parse(JSON.stringify(this.codeBindingObservables)):JSON.parse(JSON.stringify(this.codeBindingAll)),this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(zk),mt(lm))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-bindings-sandbox"]],viewQuery:function(n,r){if(1&n&&Mi(oDt,5),2&n){let s;Be(s=Ve())&&(r.newPanel=s.first)}},decls:94,vars:27,consts:[["substancePopoverMenu","matMenu"],["newPanel",""],["fileInput",""],["demosMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"flex","flex-row","mb-8"],[1,"w-2/3"],[1,"editPanel","w-full","pt-4","pb-4",3,"opened","closed"],[4,"ngIf"],[1,"row",3,"formGroup"],[1,"form-row"],[1,"form-column"],[1,"input-field"],["matInput","","type","text","formControlName","title","placeholder","Enter title..."],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"input-field","autocomplete-field"],["formControlName","code",1,"grow",3,"binding"],["href","javascript:void(0)",1,"bottom-right-link",3,"click"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["class","input-field",4,"ngIf"],["class","input-field full-width",4,"ngIf"],[1,"row"],[1,"grow"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"w-1/3"],[1,"flex","flex-row","gap-4","justify-end","flex-wrap"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["hidden","","type","file","id","file",3,"change"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor",4,"ngIf"],[1,"wide-menu"],["mat-menu-item","",3,"click"],["mat-flat-button","","color","accent",3,"click"],["class","compact-row-container",4,"ngIf"],[1,"row-container"],[1,"row-container-item"],["cdkDropList","",3,"cdkDropListDropped"],["class","output-panel","cdkDrag","",4,"ngFor","ngForOf"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Data collected from form"],["class","output",4,"ngIf"],["label","Data collected (FHIR Bundle)"],["label","FHIR Questionnaire"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"value"],["matInput","","type","text","formControlName","ecl","placeholder","Enter ECL..."],["href","javascript:void(0)",1,"top-right-link",3,"click"],["formControlName","ecl",1,"grow",3,"binding"],[1,"input-field","full-width"],["matInput","","type","text","formControlName","note","placeholder","Enter a description..."],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"compact-row-container"],[1,"title"],["mat-icon-button","","color","primary",1,"tool",3,"click"],[1,"row","form-title"],["matInput","","type","text","placeholder","Enter title...",3,"ngModelChange","ngModel","ngModelOptions"],["cdkDrag","",1,"output-panel"],[1,"row","control"],["cdkDragHandle","",1,"tool","drag-handle"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",4)(1,"h3"),ut(2,"Terminology Bindings Sandbox "),tt(3,"button",5)(4,"mat-icon"),ut(5,"info"),et()(),tt(6,"mat-menu",null,0)(8,"span",6),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(9,"h4"),ut(10,"Terminology Bindings Sandbox"),et(),tt(11,"p"),ut(12,"This is a sandbox for creating terminology bindings, designed to support education activities."),et()()()(),tt(13,"div",7)(14,"div",8)(15,"mat-expansion-panel",9,1),Vt("opened",function(){return Ut(s),zt(r.panelOpenState=!0)})("closed",function(){return Ut(s),zt(r.panelOpenState=!1)}),tt(17,"mat-expansion-panel-header")(18,"mat-panel-title")(19,"h4"),ut(20,"New binding:"),et()(),Gt(21,cDt,2,0,"mat-panel-description",10),et(),tt(22,"div")(23,"form",11)(24,"div",12)(25,"div",13)(26,"h5"),ut(27,"Question"),et(),tt(28,"mat-form-field",14)(29,"mat-label"),ut(30,"Question text"),et(),we(31,"input",15),Gt(32,dDt,3,0,"button",16),tt(33,"mat-error"),ut(34),et()(),tt(35,"mat-form-field",17),we(36,"app-autocomplete-binding",18),tt(37,"a",19),Vt("click",function(){return Ut(s),zt(r.toggleCodeBinding())}),Gt(38,uDt,2,0,"span",10)(39,hDt,2,0,"span",10),et(),tt(40,"mat-error"),ut(41),et()()(),tt(42,"div",13)(43,"h5"),ut(44,"Answer"),et(),tt(45,"mat-form-field",14)(46,"mat-label"),ut(47,"Answer Type"),et(),tt(48,"mat-select",20),Gt(49,fDt,2,2,"mat-option",21),et(),tt(50,"mat-error"),ut(51),et()(),Gt(52,pDt,9,2,"mat-form-field",22)(53,xDt,7,4,"mat-form-field",22),et()(),Gt(54,bDt,7,2,"mat-form-field",23),et(),we(55,"br"),tt(56,"div",24),we(57,"span",25),Gt(58,wDt,2,0,"button",26)(59,_Dt,2,0,"button",26),tt(60,"button",27),Vt("click",function(){return Ut(s),zt(r.cancelEdit())}),ut(61,"Cancel"),et()()()()(),tt(62,"div",28)(63,"div",29),Gt(64,TDt,2,1,"button",30),tt(65,"input",31,2),Vt("change",function(l){return Ut(s),zt(r.uploadFile(l))}),et(),Gt(67,CDt,2,1,"button",32),tt(68,"mat-menu",33,3)(70,"button",34),Vt("click",function(){return Ut(s),zt(r.saveForm())}),ut(71,"Download"),et(),tt(72,"button",34),Vt("click",function(){return Ut(s),zt(r.saveOutput(r.fhirQuestionnaireStr))}),ut(73,"Download as FHIR Questionnaire"),et()(),tt(74,"button",35),Vt("click",function(){return Ut(s),zt(qi(66).click())}),ut(75,"Upload form"),et(),tt(76,"button",35),Vt("click",function(){return Ut(s),zt(r.loadExample1())}),ut(77,"Example"),et(),tt(78,"button",35),Vt("click",function(){return Ut(s),zt(r.clear())}),ut(79,"Clear"),et()()()(),Gt(80,SDt,6,1,"div",36)(81,EDt,12,3,"div",36),tt(82,"div",37)(83,"div",38)(84,"div",39),Vt("cdkDropListDropped",function(l){return Ut(s),zt(r.onDrop(l))}),Gt(85,VDt,24,12,"div",40),et()(),tt(86,"div",38)(87,"mat-tab-group",41)(88,"mat-tab",42),Gt(89,zDt,4,5,"div",43),et(),tt(90,"mat-tab",44),Gt(91,HDt,4,5,"div",43),et(),tt(92,"mat-tab",45),Gt(93,XDt,4,5,"div",43),et()()()()()}if(2&n){let s;const o=qi(7);lt(3),yt("matMenuTriggerFor",o),lt(5),yt("disableRipple",!0),lt(13),yt("ngIf",!r.panelOpenState),lt(2),yt("formGroup",r.newBindingForm),lt(9),yt("ngIf",null==(s=r.newBindingForm.get("title"))?null:s.value),lt(2),Ze(r.getErrorMessage("title")),lt(2),yt("binding",r.codeBinding),lt(2),yt("ngIf",r.codeBinding===r.codeBindingAll),lt(),yt("ngIf",r.codeBinding!=r.codeBindingAll),lt(2),Ze(r.getErrorMessage("code")),lt(8),yt("ngForOf",r.controlTypes),lt(2),Ze(r.getErrorMessage("type")),lt(),yt("ngIf","Section header"!=r.newBindingForm.controls.type.value&&"Text box"!=r.newBindingForm.controls.type.value&&"Checkbox"!=r.newBindingForm.controls.type.value&&"Integer"!=r.newBindingForm.controls.type.value&&"Decimal"!=r.newBindingForm.controls.type.value),lt(),yt("ngIf","Checkbox"==r.newBindingForm.controls.type.value),lt(),yt("ngIf","Section header"!=r.newBindingForm.controls.type.value),lt(4),yt("ngIf",-1==r.indexInEdit),lt(),yt("ngIf",r.indexInEdit>-1),lt(5),yt("ngIf",r.bindings.length),lt(3),yt("ngIf",r.bindings.length),lt(13),yt("ngIf",!r.titleEditMode),lt(),yt("ngIf",r.titleEditMode),lt(2),yt("@growShrink",r.stateName),lt(2),yt("ngForOf",r.bindings),lt(),yt("@openClose",r.stateName),lt(3),yt("ngIf",r.bindings.length>0),lt(2),yt("ngIf",r.bindings.length>0),lt(2),yt("ngIf",r.bindings.length>0)}},dependencies:[gs,Ms,GC,Jk,Kk,bX,Sa,Oo,da,bl,Gl,cu,Xl,wl,EW,DW,nu,Fh,rv,Hl,No,nm,cd,sv,zy,ov,lv,Wl,sm,xu,GX,LAt,BAt,NAt,av,WX,$X,QX,JX,qX,tj,ej],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"],data:{animation:[mr("openClose",[Nn("open",si({opacity:1,width:"50%"})),Nn("closed",si({opacity:0,width:"0"})),ln("open <=> closed",[an("0.5s")])]),mr("growShrink",[Nn("open",si({width:"50%"})),Nn("closed",si({width:"100%"})),ln("open <=> closed",[an("0.5s")])])]}})}return e})(),YDt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-prescription-main"]],decls:2,vars:0,template:function(n,r){1&n&&(tt(0,"p"),ut(1,"prescription-main works!, no?"),et())}})}return e})();const $Dt=["mat-sort-header",""],QDt=["*"];function KDt(e,i){if(1&e){const t=ve();tt(0,"div",2),Vt("@arrowPosition.start",function(){return Ut(t),zt(Ct()._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){return Ut(t),zt(Ct()._disableViewStateAnimation=!1)}),we(1,"div",3),tt(2,"div",4),we(3,"div",5)(4,"div",6)(5,"div",7),et()()}if(2&e){const t=Ct();yt("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),lt(2),yt("@indicator",t._getArrowDirectionState()),lt(),yt("@leftPointer",t._getArrowDirectionState()),lt(),yt("@rightPointer",t._getArrowDirectionState())}}const ij=new ee("MAT_SORT_DEFAULT_OPTIONS");let Lh=(()=>{class e{get direction(){return this._direction}set direction(t){this._direction=t}constructor(t){this._defaultOptions=t,this._initializedStream=new py(1),this.sortables=new Map,this._stateChanges=new Pe,this.start="asc",this._direction="",this.disabled=!1,this.sortChange=new De,this.initialized=this._initializedStream}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let r=function ZDt(e,i){let t=["asc","desc"];return"desc"==e&&t.reverse(),i||t.push(""),t}(t.start||this.start,t?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),s=r.indexOf(this.direction)+1;return s>=r.length&&(s=0),r[s]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ij,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[Wt.None,"matSortActive","active"],start:[Wt.None,"matSortStart","start"],direction:[Wt.None,"matSortDirection","direction"],disableClear:[Wt.HasDecoratorInputTransform,"matSortDisableClear","disableClear",Je],disabled:[Wt.HasDecoratorInputTransform,"matSortDisabled","disabled",Je]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],standalone:!0,features:[on,tr]})}return e})();const Nh=x1t.ENTERING+" "+v1t.STANDARD_CURVE,uv={indicator:mr("indicator",[Nn("active-asc, asc",si({transform:"translateY(0px)"})),Nn("active-desc, desc",si({transform:"translateY(10px)"})),ln("active-asc <=> active-desc",an(Nh))]),leftPointer:mr("leftPointer",[Nn("active-asc, asc",si({transform:"rotate(-45deg)"})),Nn("active-desc, desc",si({transform:"rotate(45deg)"})),ln("active-asc <=> active-desc",an(Nh))]),rightPointer:mr("rightPointer",[Nn("active-asc, asc",si({transform:"rotate(45deg)"})),Nn("active-desc, desc",si({transform:"rotate(-45deg)"})),ln("active-asc <=> active-desc",an(Nh))]),arrowOpacity:mr("arrowOpacity",[Nn("desc-to-active, asc-to-active, active",si({opacity:1})),Nn("desc-to-hint, asc-to-hint, hint",si({opacity:.54})),Nn("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",si({opacity:0})),ln("* => asc, * => desc, * => active, * => hint, * => void",an("0ms")),ln("* <=> *",an(Nh))]),arrowPosition:mr("arrowPosition",[ln("* => desc-to-hint, * => desc-to-active",an(Nh,Kg([si({transform:"translateY(-25%)"}),si({transform:"translateY(0)"})]))),ln("* => hint-to-desc, * => active-to-desc",an(Nh,Kg([si({transform:"translateY(0)"}),si({transform:"translateY(25%)"})]))),ln("* => asc-to-hint, * => asc-to-active",an(Nh,Kg([si({transform:"translateY(25%)"}),si({transform:"translateY(0)"})]))),ln("* => hint-to-asc, * => active-to-asc",an(Nh,Kg([si({transform:"translateY(0)"}),si({transform:"translateY(-25%)"})]))),Nn("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",si({transform:"translateY(0)"})),Nn("hint-to-desc, active-to-desc, desc",si({transform:"translateY(-25%)"})),Nn("hint-to-asc, active-to-asc, asc",si({transform:"translateY(25%)"}))]),allowChildren:mr("allowChildren",[ln("* <=> *",[rC("@*",nC(),{optional:!0})])])};let JC=(()=>{class e{constructor(){this.changes=new Pe}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const qDt={provide:JC,deps:[[new Nd,new Tf,JC]],useFactory:function JDt(e){return e||new JC}};let aP=(()=>{class e{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(t){this._updateSortActionDescription(t)}constructor(t,n,r,s,o,l,w,C){this._intl=t,this._changeDetectorRef=n,this._sort=r,this._columnDef=s,this._focusMonitor=o,this._elementRef=l,this._ariaDescriber=w,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this.disabled=!1,this._sortActionDescription="Sort",C?.arrowPosition&&(this.arrowPosition=C?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{const n=!!t;n!==this._showIndicatorHint&&(this._setIndicatorHintVisible(n),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t||{},this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(t){!this._isDisabled()&&(32===t.keyCode||13===t.keyCode)&&(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?`${t}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(t){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,t)),this._sortActionDescription=t}_handleStateChanges(){this._rerenderSubscription=Yr(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(JC),mt(Mn),mt(Lh,8),mt("MAT_SORT_HEADER_COLUMN_DEF",8),mt(Ul),mt(ri),mt(oH,8),mt(ij,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(n,r){1&n&&Vt("click",function(){return r._handleClick()})("keydown",function(o){return r._handleKeydown(o)})("mouseenter",function(){return r._setIndicatorHintVisible(!0)})("mouseleave",function(){return r._setIndicatorHintVisible(!1)}),2&n&&(Ti("aria-sort",r._getAriaSortAttribute()),bi("mat-sort-header-disabled",r._isDisabled()))},inputs:{id:[Wt.None,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],sortActionDescription:"sortActionDescription",disableClear:[Wt.HasDecoratorInputTransform,"disableClear","disableClear",Je]},exportAs:["matSortHeader"],standalone:!0,features:[on,Vi],attrs:$Dt,ngContentSelectors:QDt,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(n,r){1&n&&(Kn(),tt(0,"div",0)(1,"div",1),xi(2),et(),Gt(3,KDt,6,6,"div",2),et()),2&n&&(bi("mat-sort-header-sorted",r._isSorted())("mat-sort-header-position-before","before"===r.arrowPosition),Ti("tabindex",r._isDisabled()?null:0)("role",r._isDisabled()?null:"button"),lt(3),xn(3,r._renderArrow()?3:-1))},styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;color:var(--mat-sort-arrow-color);opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[uv.indicator,uv.leftPointer,uv.rightPointer,uv.arrowOpacity,uv.arrowPosition,uv.allowChildren]},changeDetection:0})}return e})(),t2t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[qDt],imports:[Ki]})}return e})(),e2t=(()=>{class e{saveItem(t,n){localStorage.setItem(t,n)}getItem(t){return localStorage.getItem(t)}removeItem(t){localStorage.removeItem(t)}isLocalStorageSupported(){try{const t="__test__";return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch{return!1}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hv=(()=>{class e{constructor(t,n){this.http=t,this.storageService=n,this.baseUrlSubject=new Wr("https://hapi.fhir.org/baseR4"),this.baseUrl$=this.baseUrlSubject.asObservable(),this.userTagSubject=new Wr(""),this.userTag$=this.userTagSubject.asObservable(),this.initialize()}initialize(){if(this.storageService.isLocalStorageSupported()){const t=this.storageService.getItem("baseUrl");t&&this.baseUrlSubject.next(t);const n=this.storageService.getItem("userTag");n&&this.userTagSubject.next(n)}}setBaseUrl(t){this.baseUrlSubject.next(t),this.storageService.saveItem("baseUrl",t)}getBaseUrl(){return this.baseUrlSubject.getValue()}setUserTag(t){this.userTagSubject.next(t),this.storageService.saveItem("userTag",t)}getUserTag(){return this.userTagSubject.getValue()}postQuestionnaire(t){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire`,t)}getQuestionnairesByTag(t,n){return n||(n=100),this.http.get(`${this.baseUrlSubject.value}/Questionnaire?_tag=${t}&_count=${n}`)}tagQuestionnaire(t,n){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire/${t}/$meta-add`,{resourceType:"Parameters",parameter:[{name:"meta",valueMeta:{tag:[{system:"http://snomed.org/tags",code:n}]}}]})}deleteQuestionnaire(t){return this.http.delete(`${this.baseUrlSubject.value}/Questionnaire/${t}`)}updateOrCreateQuestionnaire(t,n){return t.id?this.http.put(`${this.baseUrlSubject.value}/Questionnaire?_id=${t.id}&_tag=${n}`,t).pipe(oa(s=>404===s.status?this.postQuestionnaire(t):Mg(s))):this.postQuestionnaire(t)}getQuestionnaireHistory(t){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${t}/_history`)}getSpecificQuestionnaireVersion(t,n){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${t}/_history/${n}`)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(sd),Jt(e2t))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function i2t(e,i){if(1&e&&(tt(0,"mat-option",15),ut(1),et()),2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t.title," ")}}function n2t(e,i){1&e&&we(0,"mat-spinner",16)}function r2t(e,i){if(1&e){const t=ve();tt(0,"div",17)(1,"span",18),ut(2,"\u2261"),et(),ut(3),tt(4,"button",19),Vt("click",function(){const r=Ut(t).index;return zt(Ct().deleteQuestionnaire(r))}),tt(5,"mat-icon"),ut(6,"delete"),et()()()}if(2&e){const t=i.$implicit;lt(3),Ye(" ",t.title," ")}}let nj=(()=>{class e{constructor(t,n,r,s){this.fb=t,this.fhirService=n,this.data=r,this.dialogRef=s,this.allQuestionnaires=[],this.availableQuestionnaires=[],this.addedQuestionnaires=[],this.userTag="",this.loading=!1}ngOnInit(){this.questionnaireForm=this.fb.group({selectedQuestionnaire:[{value:"",disabled:!0}],assignedName:[{value:"",disabled:!0}]}),this.data&&(this.addedQuestionnaires=this.data.questionnaires,this.questionnaireForm.get("assignedName")?.setValue(this.data.title)),this.questionnaireForm.get("selectedQuestionnaire"),this.userTag=this.fhirService.getUserTag(),this.loadAvailableQuestionnaires()}updateAvailableQuestionnaires(){this.availableQuestionnaires=this.addedQuestionnaires?this.allQuestionnaires.filter(t=>!this.addedQuestionnaires.some(n=>n.id===t.id)):this.allQuestionnaires,this.availableQuestionnaires=this.availableQuestionnaires.filter(t=>!t.extension||!t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode))}loadAvailableQuestionnaires(){this.loading=!0,this.fhirService.getQuestionnairesByTag(this.userTag).subscribe(t=>{this.allQuestionnaires=t.entry.map(n=>n.resource),this.allQuestionnaires.sort((n,r)=>n.title.localeCompare(r.title)),this.updateAvailableQuestionnaires(),this.loading=!1,this.questionnaireForm?.get("selectedQuestionnaire")?.enable(),this.questionnaireForm?.get("assignedName")?.enable()})}addQuestionnaire(){const t=this.questionnaireForm.value;t.selectedQuestionnaire&&(this.addedQuestionnaires.push({...t.selectedQuestionnaire,assignedName:t.assignedName}),this.questionnaireForm.get("selectedQuestionnaire")?.reset(),this.updateAvailableQuestionnaires())}drop(t){$k(this.addedQuestionnaires,t.previousIndex,t.currentIndex)}deleteQuestionnaire(t){t>-1&&(this.addedQuestionnaires.splice(t,1),this.updateAvailableQuestionnaires())}isSaveDisabled(){return!this.questionnaireForm.get("assignedName")?.value||!this.addedQuestionnaires.length}closeModal(){this.dialogRef.close({title:this.questionnaireForm.get("assignedName")?.value,questionnaires:this.addedQuestionnaires})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(NC),mt(hv),mt(QC),mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-create-root-module"]],decls:26,vars:6,consts:[[1,"form-layout",3,"formGroup"],[1,"form-row"],[1,"full-width"],["matInput","","formControlName","assignedName"],[1,"half-width"],["formControlName","selectedQuestionnaire"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"add-button",3,"click","disabled"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"questionnaire-list"],[1,"list",3,"cdkDropListDropped"],["cdkDrag","","class","cdk-drag",4,"ngFor","ngForOf"],[1,"button-container"],["mat-flat-button","","color","primary","mat-dialog-close",""],["mat-flat-button","","color","accent",3,"click","disabled"],[3,"value"],["diameter","35",1,"loading-spinner"],["cdkDrag","",1,"cdk-drag"],[1,"drag-handle"],["mat-icon-button","","aria-label","Delete questionnaire",3,"click"]],template:function(n,r){1&n&&(tt(0,"mat-dialog-content")(1,"h2"),ut(2,"Create a modular Questionnaire"),et(),tt(3,"form",0)(4,"div",1)(5,"mat-form-field",2)(6,"mat-label"),ut(7,"Assign Name"),et(),we(8,"input",3),et()(),tt(9,"div",1)(10,"mat-form-field",4)(11,"mat-label"),ut(12,"Select Child Questionnaire"),et(),tt(13,"mat-select",5),Gt(14,i2t,2,2,"mat-option",6),et()(),tt(15,"button",7),Vt("click",function(){return r.addQuestionnaire()}),ut(16,"Add questionnaire"),et(),Gt(17,n2t,1,0,"mat-spinner",8),et()(),tt(18,"div",9)(19,"cdk-drop-list",10),Vt("cdkDropListDropped",function(o){return r.drop(o)}),Gt(20,r2t,7,1,"div",11),et()()(),tt(21,"mat-dialog-actions",12)(22,"button",13),ut(23,"Cancel"),et(),tt(24,"button",14),Vt("click",function(){return r.closeModal()}),ut(25,"Save"),et()()),2&n&&(lt(3),yt("formGroup",r.questionnaireForm),lt(11),yt("ngForOf",r.availableQuestionnaires),lt(),yt("disabled",r.loading),lt(2),yt("ngIf",r.loading),lt(3),yt("ngForOf",r.addedQuestionnaires),lt(4),yt("disabled",r.isSaveDisabled()||r.loading))},dependencies:[gs,Ms,Jk,Kk,Sa,Oo,da,Xl,wl,nu,Eh,Fh,rv,Hl,No,nm,cd,sv,lv,dv,Yy,jy],styles:[".questionnaire-list[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow:auto;border:1px solid #ccc;border-radius:4px;background-color:#f9f9f9;padding:10px}.list[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:4px;background-color:#fff;margin-bottom:10px;padding:10px;display:flex;align-items:center;justify-content:left;box-shadow:0 2px 4px #0000001a}.drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:15px;font-size:20px;color:#666}.cdk-drag-preview[_ngcontent-%COMP%]{background-color:#e0e0e0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.form-layout[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.form-layout[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.form-layout[_ngcontent-%COMP%] .half-width[_ngcontent-%COMP%]{width:50%;margin-right:15px}"]})}return e})();function s2t(e,i){if(1&e&&(tt(0,"mat-option",16),ut(1),et()),2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t," ")}}function a2t(e,i){if(1&e){const t=ve();tt(0,"mat-form-field",13)(1,"mat-select",15),Vt("selectionChange",function(r){return Ut(t),zt(Ct(2)._changePageSize(r.value))}),O_(2,s2t,2,2,"mat-option",16,F_),et()()}if(2&e){const t=Ct(2);yt("appearance",t._formFieldAppearance)("color",t.color),lt(),yt("value",t.pageSize)("disabled",t.disabled)("aria-labelledby",t._pageSizeLabelId)("panelClass",t.selectConfig.panelClass||"")("disableOptionCentering",t.selectConfig.disableOptionCentering),lt(),L_(t._displayedPageSizeOptions)}}function o2t(e,i){if(1&e&&(tt(0,"div",14),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.pageSize)}}function l2t(e,i){if(1&e&&(tt(0,"div",2)(1,"div",12),ut(2),et(),Gt(3,a2t,4,7,"mat-form-field",13)(4,o2t,2,1,"div",14),et()),2&e){const t=Ct();lt(),Ti("id",t._pageSizeLabelId),lt(),Ye(" ",t._intl.itemsPerPageLabel," "),lt(),xn(3,t._displayedPageSizeOptions.length>1?3:-1),lt(),xn(4,t._displayedPageSizeOptions.length<=1?4:-1)}}function c2t(e,i){if(1&e){const t=ve();tt(0,"button",17),Vt("click",function(){return Ut(t),zt(Ct().firstPage())}),ul(),tt(1,"svg",7),we(2,"path",18),et()()}if(2&e){const t=Ct();yt("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),Ti("aria-label",t._intl.firstPageLabel)}}function d2t(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){return Ut(t),zt(Ct().lastPage())}),ul(),tt(1,"svg",7),we(2,"path",20),et()()}if(2&e){const t=Ct();yt("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),Ti("aria-label",t._intl.lastPageLabel)}}let qC=(()=>{class e{constructor(){this.changes=new Pe,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,n,r)=>{if(0==r||0==n)return`0 of ${r}`;const s=t*n;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+n,r):s+n} of ${r}`}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const h2t={provide:qC,deps:[[new Nd,new Tf,qC]],useFactory:function u2t(e){return e||new qC}},m2t=new ee("MAT_PAGINATOR_DEFAULT_OPTIONS");let p2t=0,oP=(()=>{class e{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(t||0,0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=t||0,this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(t||0,0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(n=>jr(n,0)),this._updateDisplayedPageSizeOptions()}constructor(t,n,r){if(this._intl=t,this._changeDetectorRef=n,this._pageSizeLabelId="mat-paginator-page-size-label-"+p2t++,this._isInitialized=!1,this._initializedStream=new py(1),this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this.hidePageSize=!1,this.showFirstLastButtons=!1,this.selectConfig={},this.disabled=!1,this.page=new De,this.initialized=this._initializedStream,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){const{pageSize:s,pageSizeOptions:o,hidePageSize:l,showFirstLastButtons:w}=r;null!=s&&(this._pageSize=s),null!=o&&(this._pageSizeOptions=o),null!=l&&(this.hidePageSize=l),null!=w&&(this.showFirstLastButtons=w)}this._formFieldAppearance=r?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndext-n),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(qC),mt(Mn),mt(m2t,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[Wt.HasDecoratorInputTransform,"pageIndex","pageIndex",jr],length:[Wt.HasDecoratorInputTransform,"length","length",jr],pageSize:[Wt.HasDecoratorInputTransform,"pageSize","pageSize",jr],pageSizeOptions:"pageSizeOptions",hidePageSize:[Wt.HasDecoratorInputTransform,"hidePageSize","hidePageSize",Je],showFirstLastButtons:[Wt.HasDecoratorInputTransform,"showFirstLastButtons","showFirstLastButtons",Je],selectConfig:"selectConfig",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},outputs:{page:"page"},exportAs:["matPaginator"],standalone:!0,features:[on,Vi],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"div",1),Gt(2,l2t,5,4,"div",2),tt(3,"div",3)(4,"div",4),ut(5),et(),Gt(6,c2t,3,5,"button",5),tt(7,"button",6),Vt("click",function(){return r.previousPage()}),ul(),tt(8,"svg",7),we(9,"path",8),et()(),Q0(),tt(10,"button",9),Vt("click",function(){return r.nextPage()}),ul(),tt(11,"svg",7),we(12,"path",10),et()(),Gt(13,d2t,3,5,"button",11),et()()()),2&n&&(lt(2),xn(2,r.hidePageSize?-1:2),lt(3),Ye(" ",r._intl.getRangeLabel(r.pageIndex,r.pageSize,r.length)," "),lt(),xn(6,r.showFirstLastButtons?6:-1),lt(),yt("matTooltip",r._intl.previousPageLabel)("matTooltipDisabled",r._previousButtonsDisabled())("matTooltipPosition","above")("disabled",r._previousButtonsDisabled()),Ti("aria-label",r._intl.previousPageLabel),lt(3),yt("matTooltip",r._intl.nextPageLabel)("matTooltipDisabled",r._nextButtonsDisabled())("matTooltipPosition","above")("disabled",r._nextButtonsDisabled()),Ti("aria-label",r._intl.nextPageLabel),lt(3),xn(13,r.showFirstLastButtons?13:-1))},dependencies:[Xl,lv,nu,Oo,xu],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color);background-color:var(--mat-paginator-container-background-color);font-family:var(--mat-paginator-container-text-font);line-height:var(--mat-paginator-container-text-line-height);font-size:var(--mat-paginator-container-text-size);font-weight:var(--mat-paginator-container-text-weight);letter-spacing:var(--mat-paginator-container-text-tracking);--mat-form-field-container-height:var(--mat-paginator-form-field-container-height);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size)}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),g2t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[h2t],imports:[QR,KW,eX,oP]})}return e})(),rj=(()=>{class e{constructor(t,n){this.http=t,this.fhirService=n}generateRootQuestionnaire(t,n){var r=this;return de(function*(){try{let o=yield Ca(r.http.get("assets/questionnaires/root-questionnaire-template.json"));o.title=t;let l=0,w=r.fhirService.getBaseUrl();return r.fhirService.getUserTag(),n.forEach(M=>{l++,M.url=w+"/Questionnaire/"+M.id,o.item.push({linkId:l.toString(),text:M.title,type:"group",required:!1,item:[{extension:[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire",valueCanonical:M.url}],linkId:l.toString()+".1",text:"Unable to resolve sub-questionnaire",type:"display"}]})}),o}catch(s){throw console.error("Error generating root questionnaire:",s),s}})()}getRootQuestionnaireData(t){var n=this;return de(function*(){if(!t||!Array.isArray(t.item))throw new Error("Invalid root questionnaire");const r=t.title,s=t.item.filter(l=>"group"===l.type&&l.item&&Array.isArray(l.item)).flatMap(l=>l.item).map(function(){var l=de(function*(w){const C=w.extension?.find(M=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===M.url);return C?n.getQuestionnaireFromUrl(C.valueCanonical):null});return function(w){return l.apply(this,arguments)}}());return{title:r,questionnaires:(yield Promise.all(s)).filter(l=>null!==l)}})()}checkForAssembleRoot(t){return!!(t&&t.extension&&Array.isArray(t.extension))&&t.extension.some(n=>"assemble-root"===n.valueCode)}assembleQuestionnaire(t){var n=this;return de(function*(){if(t=JSON.parse(JSON.stringify(t)),!n.checkForAssembleRoot(t))return null;for(let r of t.item)if("group"==r.type){r.extension=[];for(let s of r.item)if(s.extension&&Array.isArray(s.extension))for(let o of s.extension)if("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===o.url){let l=yield n.getQuestionnaireFromUrl(o.valueCanonical);l&&(r.item=l.item),r.extension||(r.extension=[]),r.extension.push({url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",valueCanonical:o.valueCanonical})}}return t.extension=t.extension.filter(r=>"assemble-root"!==r.valueCode),t})()}disassembleQuestionnaire(t){var n=this;return de(function*(){if(!t||!t.item||!Array.isArray(t.item))throw new Error("Invalid root questionnaire");const r=t.title,s=[];for(const o of t.item)if("group"===o.type&&o.extension&&Array.isArray(o.extension)){const l=o.extension.find(w=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom"===w.url);if(l){const w=l.valueCanonical,C=yield n.getQuestionnaireFromUrl(w);C&&s.push(C)}}return{title:r,questionnaires:s}})()}getQuestionnaireFromUrl(t){var n=this;return de(function*(){try{return yield Ca(n.http.get(t))}catch(r){return console.error("Error fetching questionnaire:",r),null}})()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(sd),Jt(hv))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const v2t=()=>[5,10,20],x2t=e=>["status-pill",e],y2t=()=>["status-pill","active"],b2t=()=>["status-pill","draft"];function w2t(e,i){1&e&&(tt(0,"th",19),ut(1," Title "),et())}function _2t(e,i){if(1&e&&(tt(0,"td",20),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.title," ")}}function T2t(e,i){1&e&&(tt(0,"th",19),ut(1," Status "),et())}function C2t(e,i){if(1&e&&(tt(0,"td",20)(1,"span",21),ut(2),sa(3,"uppercase"),et()()),2&e){const t=i.$implicit;lt(),yt("ngClass",vc(4,x2t,t.status)),lt(),Ze(xc(3,2,t.status))}}function S2t(e,i){1&e&&(tt(0,"th",22),ut(1," Version "),et())}function E2t(e,i){if(1&e&&(tt(0,"td",20),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.meta.versionId," ")}}function A2t(e,i){1&e&&(tt(0,"th",19),ut(1," Last updated "),et())}function D2t(e,i){if(1&e&&(tt(0,"td",20),ut(1),sa(2,"date"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",Xd(2,1,t.meta.lastUpdated,"MMMM d, y, h:mm:ss a")," ")}}function M2t(e,i){1&e&&(tt(0,"th",19),ut(1," Type "),et())}function I2t(e,i){1&e&&(tt(0,"span",21),ut(1,"QUESTIONNAIRE"),et()),2&e&&yt("ngClass",Ko(1,y2t))}function R2t(e,i){1&e&&(tt(0,"span",21),ut(1,"MODULAR ROOT"),et()),2&e&&yt("ngClass",Ko(1,b2t))}function k2t(e,i){if(1&e&&(tt(0,"td",20),Gt(1,I2t,2,2,"span",23)(2,R2t,2,2,"span",23),et()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.isRootQuestionnaire(t))}}function P2t(e,i){1&e&&(tt(0,"th",22),ut(1," Actions "),et())}function F2t(e,i){if(1&e){const t=ve();tt(0,"button",34),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().validate(r))}),tt(1,"mat-icon"),ut(2,"done"),et()()}if(2&e){const t=Ct().$implicit;yt("disabled",Ct().isRootQuestionnaire(t))}}function O2t(e,i){if(1&e){const t=ve();tt(0,"button",35),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().assemble(r))}),tt(1,"mat-icon"),ut(2,"build"),et()()}}function L2t(e,i){if(1&e){const t=ve();tt(0,"button",36),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().preview(r))}),tt(1,"mat-icon"),ut(2,"visibility"),et()()}}function N2t(e,i){if(1&e){const t=ve();tt(0,"button",37),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().openInNewTab(r))}),tt(1,"mat-icon"),ut(2,"open_in_new"),et()()}}function B2t(e,i){if(1&e){const t=ve();tt(0,"button",38),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().editQuestionnaire(r))}),tt(1,"mat-icon"),ut(2,"edit"),et()()}}function V2t(e,i){if(1&e){const t=ve();tt(0,"button",39),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().openModularQuestionnaireModal(r))}),tt(1,"mat-icon"),ut(2,"edit"),et()()}}function U2t(e,i){if(1&e){const t=ve();tt(0,"td",20),Gt(1,F2t,3,1,"button",24)(2,O2t,3,0,"button",25)(3,L2t,3,0,"button",26)(4,N2t,3,0,"button",27),tt(5,"button",28),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().saveQuestionnaire(r))}),tt(6,"mat-icon"),ut(7,"cloud_download"),et()(),Gt(8,B2t,3,0,"button",29)(9,V2t,3,0,"button",30),tt(10,"button",31),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().viewHistory(r))}),tt(11,"mat-icon"),ut(12,"history"),et()(),tt(13,"span",32)(14,"button",33),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().deleteQuestionnaire(r))}),tt(15,"mat-icon"),ut(16,"delete"),et()()()()}if(2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",n.config.validate),lt(),yt("ngIf",n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.config.preview&&!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.config.preview),lt(4),yt("ngIf",!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.isRootQuestionnaire(t)),lt(),yt("disabled",1==t.meta.versionId),lt(3),hh("matTooltip",n.getDeleteTooltip(t)),lt(),yt("disabled",n.getReferencingQuestionnaires(t).length>0)}}function z2t(e,i){1&e&&we(0,"tr",40)}function G2t(e,i){1&e&&we(0,"tr",41)}function H2t(e,i){1&e&&(tt(0,"p",42)(1,"i"),ut(2," No questionnaires found. Upload your questionnaires to start. "),et()())}function W2t(e,i){1&e&&we(0,"mat-spinner",43)}function X2t(e,i){if(1&e){const t=ve();tt(0,"button",44),Vt("click",function(){return Ut(t),zt(Ct().downloadAllQuestionnaires())}),ut(1," Download bundle "),et()}}let sj=(()=>{class e{constructor(t,n,r,s){this.fhirService=t,this.questionnaireService=n,this.dialog=r,this._snackBar=s,this.questionnaireSelected=new De,this.validateQuestionnaire=new De,this.previewQuestionnaire=new De,this.viewQuestionaireHistory=new De,this.config={},this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new em,this.questionnaires=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.notFound=!1,this.baseUrlChanged=new Pe,this.userTagChanged=new Pe,this.fbUrl="https://formbuilder.nlm.nih.gov",this.blankQuestionnaire={resourceType:"Questionnaire",title:"New Form",status:"draft",item:[{type:"string",linkId:"4009522077787",text:"Item 0"}]}}ngOnInit(){}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"type":return this.isRootQuestionnaire(t)?"Modular root":"Questionnaire";case"version":return t.meta&&t.meta.versionId?t.meta.versionId:"";case"lastUpdated":return t.meta&&t.meta.lastUpdated?new Date(t.meta.lastUpdated):"";default:return t[n]}},this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires(),Zd([this.fhirService.baseUrl$.pipe(tu(1e3),eu()),this.fhirService.userTag$.pipe(tu(1e3),eu())]).subscribe(([t,n])=>{(this.selectedFhirServer!==t||this.selectedUserTag!==n)&&(this.selectedFhirServer=t,this.selectedUserTag=n,this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires())})}ngOnChanges(t){}loadQuestionnaires(){this.loading=!0,this.notFound=!1,this.questionnaires=[],this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(t=>{t.entry?(this.questionnaires=t.entry.map(n=>n.resource),this.dataSource.data=this.questionnaires,this.dataSource.sort=this.sort,this.loading=!1,this.sort.active="title",this.sort.direction="asc",this.sort.sortChange.emit()):(this.questionnaires=[],this.dataSource.data=this.questionnaires,this.loading=!1,this.notFound=!0)})}updateQuestionnairesList(t){const n=this.questionnaires.findIndex(r=>r.id===t.id);-1!==n?(this.questionnaires[n]=t,this.dataSource.data=this.questionnaires):(this.questionnaires.push(t),this.dataSource.data=this.questionnaires)}addQuestionnaire(t){this.updateQuestionnairesList(t)}deleteQuestionnaire(t){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Deleting Questionnaire...",panelClass:["green-snackbar"]}),this.fhirService.deleteQuestionnaire(t.id).subscribe(()=>{this.questionnaires=this.questionnaires.filter(n=>n.id!==t.id),this.dataSource.data=this.questionnaires,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire deleted successfully",panelClass:["green-snackbar"]})})}selectQuestionnaire(t){this.questionnaireSelected.emit(t)}validate(t){this.validateQuestionnaire.emit(t)}viewHistory(t){this.viewQuestionaireHistory.emit(t)}preview(t){this.previewQuestionnaire.emit(t)}openInNewTab(t){window.open(this.selectedFhirServer+"/Questionnaire/"+t.id,"_blank")}saveQuestionnaire(t){var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});dd(n,`${t.title}-v${t.meta.versionId}.json`)}isRootQuestionnaire(t){return!(!t.extension||!Array.isArray(t.extension))&&t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode)}assemble(t){this._snackBar.openFromComponent(Ar,{duration:2e3,data:"Assembling Questionnaire...",panelClass:["green-snackbar"]}),this.questionnaireService.assembleQuestionnaire(t).then(n=>{n.title=t.title+" (assembled)",this.previewQuestionnaire.emit(n),this._snackBar.openFromComponent(Ar,{duration:2e3,data:"Questionnaire ready",panelClass:["green-snackbar"]})}).catch(n=>{console.error("Error assembling questionnaire:",n)})}createQuestionnaire(){let t=this.blankQuestionnaire;t.meta||(t.meta={}),t.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.editQuestionnaire(t)}editQuestionnaire(t){const n=window.open(this.fbUrl+"/window-open?referrer="+encodeURIComponent(window.location.href));window.addEventListener("message",function s(o){if(o.origin===r.fbUrl){const w=o.data.questionnaire;switch(o.data.type){case"initialized":n?.postMessage({type:"initialQuestionnaire",questionnaire:t},r.fbUrl);break;case"updateQuestionnaire":break;case"closed":r.fhirService.updateOrCreateQuestionnaire(w,r.selectedUserTag).pipe(Vl()).subscribe(C=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(C)},C=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})})}}},!0);let r=this}openModularQuestionnaireModal(t){var n=this;return de(function*(){let r=yield n.questionnaireService.getRootQuestionnaireData(t);n.dialog.open(nj,{data:r,width:"75%"}).afterClosed().subscribe(o=>{o&&n.handleDialogResult(o,t)})})()}handleDialogResult(t,n){var r=this;return de(function*(){r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Updating questionnaire...",panelClass:["green-snackbar"]});try{let s=yield r.questionnaireService.generateRootQuestionnaire(t.title,t.questionnaires);s&&(n.title=t.title,n.item=s.item,r.addQuestionnaire(n),r.fhirService.updateOrCreateQuestionnaire(n,r.selectedUserTag).pipe(Vl()).subscribe(o=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(o)},o=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})}))}catch(s){console.error("Error handling dialog result:",s)}})()}downloadAllQuestionnaires(){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Downloading Questionnaires...",panelClass:["green-snackbar"]}),this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(t=>{var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});dd(n,"questionnaires-bundle.json"),this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaires downloaded successfully",panelClass:["green-snackbar"]})})}getReferencingQuestionnaires(t){let r=`${this.fhirService.getBaseUrl()}/Questionnaire/${t.id}`;return this.dataSource.data.filter(o=>o.item&&Array.isArray(o.item)&&o.item.some(l=>l.item&&Array.isArray(l.item)&&l.item.some(w=>w.extension&&Array.isArray(w.extension)&&w.extension.some(C=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===C.url&&C.valueCanonical===r))))}getDeleteTooltip(t){const n=this.getReferencingQuestionnaires(t);return 0===n.length?"Delete Questionnaire":`Cannot delete: Referenced by ${n.map(s=>`"${s.title}"`).join(", ")}`}static#t=this.\u0275fac=function(n){return new(n||e)(mt(hv),mt(rj),mt(lm),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-list-questionnaires"]],viewQuery:function(n,r){if(1&n&&(Mi(oP,5),Mi(Lh,5)),2&n){let s;Be(s=Ve())&&(r.paginator=s.first),Be(s=Ve())&&(r.sort=s.first)}},inputs:{config:"config"},outputs:{questionnaireSelected:"questionnaireSelected",validateQuestionnaire:"validateQuestionnaire",previewQuestionnaire:"previewQuestionnaire",viewQuestionaireHistory:"viewQuestionaireHistory"},features:[tr],decls:28,vars:9,consts:[["id","table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",1,"mat-elevation-z8",3,"pageSizeOptions","pageSize"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["id","outer-container"],[1,"download-button-container"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],["mat-header-cell",""],[3,"ngClass",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Validate Questionnaire",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Assemble Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Preview Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Open resource in new tab",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Modular Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","View Questionnaire History",1,"action-button",3,"click","disabled"],[3,"matTooltip"],["mat-icon-button","","color","accent",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Validate Questionnaire",1,"action-button",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Assemble Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Modular Questionnaire",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"table",1),Wi(2,2),Gt(3,w2t,2,0,"th",3)(4,_2t,2,1,"td",4),Xi(),Wi(5,5),Gt(6,T2t,2,0,"th",3)(7,C2t,4,6,"td",4),Xi(),Wi(8,6),Gt(9,S2t,2,0,"th",7)(10,E2t,2,1,"td",4),Xi(),Wi(11,8),Gt(12,A2t,2,0,"th",3)(13,D2t,3,4,"td",4),Xi(),Wi(14,9),Gt(15,M2t,2,0,"th",3)(16,k2t,3,2,"td",4),Xi(),Wi(17,10),Gt(18,P2t,2,0,"th",7)(19,U2t,17,9,"td",4),Xi(),Gt(20,z2t,1,0,"tr",11)(21,G2t,1,0,"tr",12),et(),we(22,"mat-paginator",13),Gt(23,H2t,3,0,"p",14)(24,W2t,1,0,"mat-spinner",15),et(),tt(25,"div",16)(26,"div",17),Gt(27,X2t,2,0,"button",18),et()()),2&n&&(lt(),yt("dataSource",r.dataSource),lt(19),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(),yt("pageSizeOptions",Ko(8,v2t))("pageSize",10),lt(),yt("ngIf",r.notFound&&!r.questionnaires.length),lt(),yt("ngIf",r.loading),lt(3),yt("ngIf",!r.loading&&r.questionnaires.length>0))},dependencies:[bc,Ms,Sa,Oo,da,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,Lh,aP,oP,_I,gh],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}#table-container[_ngcontent-%COMP%]{padding-bottom:2rem}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:2rem}"]})}return e})(),j2t=(()=>{class e{constructor(t){this.dialogRef=t,this.listConfig={select:!0}}selectAndDownload(t){this.dialogRef.close(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-load-questionnaire-modal"]],decls:7,vars:1,consts:[[3,"questionnaireSelected","config"],["align","end"],["mat-flat-button","","color","accent","mat-dialog-close",""]],template:function(n,r){1&n&&(tt(0,"mat-dialog-content")(1,"h2"),ut(2,"Available Questionnaires"),et(),tt(3,"app-list-questionnaires",0),Vt("questionnaireSelected",function(o){return r.selectAndDownload(o)}),et()(),tt(4,"mat-dialog-actions",1)(5,"button",2),ut(6,"Close"),et()()),2&n&&(lt(3),yt("config",r.listConfig))},dependencies:[Sa,dv,Yy,jy,sj]})}return e})();const Y2t=["settingsForm"];function $2t(e,i){1&e&&(tt(0,"mat-error"),ut(1,"Base URL is required"),et())}function Q2t(e,i){1&e&&(tt(0,"mat-error"),ut(1,"User Tag is required and must be at least 3 characters"),et())}let lP=(()=>{class e{constructor(t,n){this.fhirService=t,this.dialogRef=n,this.baseUrl="",this.userTag=""}ngAfterViewInit(){this.triggerValidation()}triggerValidation(){Object.keys(this.settingsForm.controls).forEach(t=>{const n=this.settingsForm.control.get(t);n?.markAsTouched({onlySelf:!0}),n?.markAsDirty({onlySelf:!0})})}ngOnInit(){this.baseUrl=this.fhirService.getBaseUrl(),this.userTag=this.fhirService.getUserTag()}updateSettings(){this.settingsForm.valid&&(this.fhirService.setBaseUrl(this.baseUrl),this.fhirService.setUserTag(this.userTag),this.dialogRef.close("save"))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(hv),mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-fhir-server-settings-modal"]],viewQuery:function(n,r){if(1&n&&Mi(Y2t,5),2&n){let s;Be(s=Ve())&&(r.settingsForm=s.first)}},decls:29,vars:5,consts:[["settingsForm","ngForm"],["baseUrlField","ngModel"],["userTagField","ngModel"],[1,"form-container"],[1,"warning"],[3,"ngSubmit"],["matInput","","name","baseUrl","required","",3,"ngModelChange","ngModel"],[4,"ngIf"],["matInput","","name","userTag","required","","minlength","3",3,"ngModelChange","ngModel"],[1,"button-container"],["mat-flat-button","","color","accent","type","submit",3,"disabled"],["mat-flat-button","","color","primary","mat-dialog-close",""]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",3)(1,"h2"),ut(2,"FHIR Server Connection"),et(),tt(3,"p"),ut(4,"Manager mode allows you to store questionnares in a FHIR Server. Enter the FHIR server URL and your "),tt(5,"b"),ut(6,"User Tag"),et(),ut(7,", this value will be used to identify your questionnaires."),et(),tt(8,"p",4),ut(9,"Warning: using the default public FHIR server will not ensure the persistence of your information, always save your questionnaires to your computer as a backup."),et(),tt(10,"form",5,0),Vt("ngSubmit",function(){return Ut(s),zt(r.updateSettings())}),tt(12,"mat-form-field")(13,"mat-label"),ut(14,"Base URL of the FHIR Server"),et(),tt(15,"input",6,1),wa("ngModelChange",function(l){return Ut(s),Na(r.baseUrl,l)||(r.baseUrl=l),zt(l)}),et(),Gt(17,$2t,2,0,"mat-error",7),et(),tt(18,"mat-form-field")(19,"mat-label"),ut(20,"User Tag"),et(),tt(21,"input",8,2),wa("ngModelChange",function(l){return Ut(s),Na(r.userTag,l)||(r.userTag=l),zt(l)}),et(),Gt(23,Q2t,2,0,"mat-error",7),et(),tt(24,"div",9)(25,"button",10),ut(26,"Open FHIR Repository"),et(),tt(27,"button",11),ut(28,"Close"),et()()()()}if(2&n){const s=qi(11),o=qi(16),l=qi(22);lt(15),ba("ngModel",r.baseUrl),lt(2),yt("ngIf",o.invalid&&o.touched),lt(4),ba("ngModel",r.userTag),lt(2),yt("ngIf",l.invalid&&l.touched),lt(2),yt("disabled",!s.valid)}},dependencies:[Ms,Sa,Xl,wl,EW,Fh,rv,Hl,No,nm,FC,Nk,Wl,sm,dv],styles:[".form-container[_ngcontent-%COMP%]{margin:auto;padding:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.warning[_ngcontent-%COMP%]{color:#ff9500;font-weight:lighter;font-style:italic}"]})}return e})(),cP=(()=>{class e{constructor(t,n){this.data=t,this.dialogRef=n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(QC),mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-confirmation-dialog"]],decls:10,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"button-container"],["mat-button","",3,"mat-dialog-close"]],template:function(n,r){1&n&&(tt(0,"h1",0),ut(1),et(),tt(2,"div",1)(3,"p"),ut(4),et()(),tt(5,"div",2)(6,"button",3),ut(7,"Yes"),et(),tt(8,"button",3),ut(9,"No"),et()()),2&n&&(lt(),Ze(r.data.title),lt(3),Ze(r.data.message),lt(2),yt("mat-dialog-close",!0),lt(2),yt("mat-dialog-close",!1))},dependencies:[Sa,dv,nP,Yy,jy],encapsulation:2})}return e})();const K2t=new ee("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");let dP=(()=>{class e{constructor(t,n,r,s,o){this._elementRef=t,this._ngZone=n,this._changeDetectorRef=r,this._animationMode=s,this._isNoopAnimation=!1,this._defaultColor="primary",this._value=0,this._bufferValue=0,this.animationEnd=new De,this._mode="determinate",this._transitionendHandler=l=>{0===this.animationEnd.observers.length||!l.target||!l.target.classList.contains("mdc-linear-progress__primary-bar")||("determinate"===this.mode||"buffer"===this.mode)&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation="NoopAnimations"===s,o&&(o.color&&(this.color=this._defaultColor=o.color),this.mode=o.mode||this.mode)}get color(){return this._color||this._defaultColor}set color(t){this._color=t}get value(){return this._value}set value(t){this._value=aj(t||0),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(t){this._bufferValue=aj(t||0),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(t){this._mode=t,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${"buffer"===this.mode?this.bufferValue:100}%`}_isIndeterminate(){return"indeterminate"===this.mode||"query"===this.mode}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ei),mt(Mn),mt(Nr,8),mt(K2t,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(n,r){2&n&&(Ti("aria-valuenow",r._isIndeterminate()?null:r.value)("mode",r.mode),Ll("mat-"+r.color),bi("_mat-animation-noopable",r._isNoopAnimation)("mdc-linear-progress--animation-ready",!r._isNoopAnimation)("mdc-linear-progress--indeterminate",r._isIndeterminate()))},inputs:{color:"color",value:[Wt.HasDecoratorInputTransform,"value","value",jr],bufferValue:[Wt.HasDecoratorInputTransform,"bufferValue","bufferValue",jr],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],standalone:!0,features:[on,Vi],decls:7,vars:4,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(n,r){1&n&&(tt(0,"div",0),we(1,"div",1)(2,"div",2),et(),tt(3,"div",3),we(4,"span",4),et(),tt(5,"div",5),we(6,"span",4),et()),2&n&&(lt(),Ds("flex-basis",r._getBufferBarFlexBasis()),lt(2),Ds("transform",r._getPrimaryBarTransform()))},styles:["@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half))}100%{transform:translateX(var(--mdc-linear-progress-primary-full))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-primary-full-neg))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full-neg))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height) * -2.5))}}.mdc-linear-progress__bar-inner{border-color:var(--mdc-linear-progress-active-indicator-color)}.mdc-linear-progress__buffer-dots{background-color:var(--mdc-linear-progress-track-color)}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-color:rgba(0,0,0,0);background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E\")}}.mdc-linear-progress__buffer-bar{background-color:var(--mdc-linear-progress-track-color)}.mdc-linear-progress{height:max(var(--mdc-linear-progress-track-height), var(--mdc-linear-progress-active-indicator-height))}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress{height:4px}}.mdc-linear-progress__bar{height:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__bar-inner{border-top-width:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__buffer{height:var(--mdc-linear-progress-track-height)}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-size:10px var(--mdc-linear-progress-track-height)}}.mdc-linear-progress__buffer{border-radius:var(--mdc-linear-progress-track-shape)}.mat-mdc-progress-bar{display:block;text-align:start;--mdc-linear-progress-primary-half: 83.67142%;--mdc-linear-progress-primary-full: 200.611057%;--mdc-linear-progress-secondary-quarter: 37.651913%;--mdc-linear-progress-secondary-half: 84.386165%;--mdc-linear-progress-secondary-full: 160.277782%;--mdc-linear-progress-primary-half-neg: -83.67142%;--mdc-linear-progress-primary-full-neg: -200.611057%;--mdc-linear-progress-secondary-quarter-neg: -37.651913%;--mdc-linear-progress-secondary-half-neg: -84.386165%;--mdc-linear-progress-secondary-full-neg: -160.277782%}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}"],encapsulation:2,changeDetection:0})}return e})();function aj(e,i=0,t=100){return Math.max(i,Math.min(t,e))}let J2t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki]})}return e})();const q2t=["questionnairesList"];function tMt(e,i){if(1&e&&(tt(0,"div",19),we(1,"mat-progress-bar",20),tt(2,"div",21),ut(3),et()()),2&e){const t=Ct();lt(),yt("value",t.validatingProgress),lt(2),Ye("",t.validatingProgress,"%")}}function eMt(e,i){if(1&e){const t=ve();tt(0,"button",22),Vt("click",function(){return Ut(t),zt(Ct().saveQuestionnaire())}),ut(1," Save changes "),et()}if(2&e){const t=Ct();yt("disabled",t.validating||!t.questionnaire)}}function iMt(e,i){1&e&&(tt(0,"span"),ut(1,"Run validation"),et())}function nMt(e,i){1&e&&we(0,"mat-spinner",26)}function rMt(e,i){if(1&e){const t=ve();tt(0,"button",23),Vt("click",function(){return Ut(t),zt(Ct().validate())}),Gt(1,iMt,2,0,"span",24)(2,nMt,1,0,"mat-spinner",25),et()}if(2&e){const t=Ct();lt(),yt("ngIf",!t.validating),lt(),yt("ngIf",t.validating)}}function sMt(e,i){if(1&e&&(tt(0,"span",32),ut(1),et()),2&e){const t=Ct(2);lt(),Ye("Error: ",t.loadResults.error,"")}}function aMt(e,i){if(1&e&&(tt(0,"span",33),ut(1),et()),2&e){const t=Ct(2);lt(),Ye("Inactive: ",t.loadResults.inactive,"")}}function oMt(e,i){if(1&e&&(tt(0,"span",34),ut(1),et()),2&e){const t=Ct(2);lt(),Ye("Active: ",t.loadResults.active,"")}}function lMt(e,i){if(1&e&&(tt(0,"p",27)(1,"b"),ut(2,"Questionnaire:"),et(),ut(3),tt(4,"i"),ut(5),et(),ut(6,") - "),tt(7,"span",28),ut(8),et(),ut(9),sa(10,"date"),Gt(11,sMt,2,1,"span",29)(12,aMt,2,1,"span",30)(13,oMt,2,1,"span",31),et()),2&e){const t=Ct();lt(3),Ye(" ",t.questionnaire.title," ("),lt(2),Ze(t.questionnaire.url),lt(3),Ye("",t.dataSource.data.length," bindings"),lt(),Zc(" - - Version: ",t.questionnaire.meta.versionId," (",Xd(10,8,t.questionnaire.meta.lastUpdated,"fullDate"),") "),lt(2),yt("ngIf",t.loadResults.total>0),lt(),yt("ngIf",t.loadResults.total>0),lt(),yt("ngIf",t.loadResults.total>0)}}function cMt(e,i){1&e&&(tt(0,"th",35),ut(1," # "),et())}function dMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.order," ")}}function uMt(e,i){1&e&&(tt(0,"th",35),ut(1," FHIRPath "),et())}function hMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.path," ")}}function fMt(e,i){1&e&&(tt(0,"th",35),ut(1," Path "),et())}function mMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.readablePath," ")}}function pMt(e,i){1&e&&(tt(0,"th",35),ut(1,"Code "),et())}function gMt(e,i){if(1&e&&(tt(0,"td",36)(1,"a",37),ut(2),et()()),2&e){const t=i.$implicit;lt(),H_("href","http://snomed.info/id/",t.code,"",lx),lt(),Ze(t.code)}}function vMt(e,i){1&e&&(tt(0,"th",35),ut(1," Display "),et())}function xMt(e,i){if(1&e&&(tt(0,"p",41),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ye("Concept FSN: ",t.serverDisplay,"")}}function yMt(e,i){1&e&&(tt(0,"p",42),ut(1,"Concept is inactive"),et())}function bMt(e,i){if(1&e){const t=ve();tt(0,"p",43),ut(1),tt(2,"button",44),Vt("click",function(){const r=Ut(t).$implicit,s=Ct().$implicit;return zt(Ct().replaceInactiveConcept(s,r.replacement))}),tt(3,"mat-icon"),ut(4,"arrow_forward"),et()()()}if(2&e){const t=i.$implicit,n=Ct(2);lt(),Ux(" Replacement: ",t.equivalence," to ",t.replacement.code," |",t.replacement.display,"| "),lt(),yt("disabled",n.validating)}}function wMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),Gt(2,xMt,2,1,"p",38)(3,yMt,2,0,"p",39)(4,bMt,5,4,"p",40),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.display," "),lt(),yt("ngIf",t.serverDisplay),lt(),yt("ngIf","Inactive"==t.status),lt(),yt("ngForOf",t.replacements)}}function _Mt(e,i){1&e&&(tt(0,"th",35),ut(1," System "),et())}function TMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.system," ")}}function CMt(e,i){1&e&&(tt(0,"th",35),ut(1," Status "),et())}function SMt(e,i){1&e&&(tt(0,"span"),we(1,"mat-progress-bar",45),et())}function EMt(e,i){if(1&e&&(tt(0,"span")(1,"span",46),ut(2),et()()),2&e){const t=Ct().$implicit;lt(),yt("ngClass",t.status),lt(),Ze(t.status)}}function AMt(e,i){if(1&e&&(tt(0,"td",36),Gt(1,SMt,2,0,"span",24)(2,EMt,3,2,"span",24),et()),2&e){const t=i.$implicit;lt(),yt("ngIf","Validating"==t.status),lt(),yt("ngIf","Validating"!=t.status)}}function DMt(e,i){1&e&&we(0,"tr",47)}function MMt(e,i){1&e&&we(0,"tr",48)}function IMt(e,i){1&e&&we(0,"mat-spinner",49)}let RMt=(()=>{class e{constructor(t,n){this.terminologyService=t,this._snackBar=n,this.questionnaireUpdated=new De,this.validatingQuestionnaire=new De,this.loading=!1,this.validating=!1,this.displayedColumns=["order","readablePath","code","display","system","status"],this.dataSource=new em,this.validatingProgress=0,this.orderCounter=0,this.loadResults={total:0,active:0,inactive:0,error:0},this.requiresSave=!1}ngOnChanges(t){t.questionnaire&&(this.questionnaire?this.loadQuestionnaire(this.questionnaire):this.clearQuestionnaire())}clearQuestionnaire(){this.questionnaire=null,this.dataSource.data=[],this.orderCounter=0,this.validatingProgress=0,this.loadResults={total:0,active:0,inactive:0,error:0}}loadQuestionnaire(t){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=t;let n=this.extractObjects(t);this.dataSource.data=n,this.dataSource.sort=this.sort},700)}validate(){var t=this;this.loadResults={total:0,active:0,inactive:0,error:0},this.dataSource.data.forEach(s=>{s.status="Not checked"}),this.validating=!0,this.validatingQuestionnaire.emit(!0);let n=this.dataSource.data.length,r=0;this.asyncForEach(this.dataSource.data,function(){var s=de(function*(o){t.loadResults.total++,o.status="Validating",r++,t.validatingProgress=Math.round(r/n*100);try{const l=yield t.terminologyService.lookupConcept(o.code,o.system).pipe(Vl()).toPromise();let w=[],C="";for(const M of l.parameter){if("designation"===M.name){let P="",O="";for(const L of M.part)"value"===L.name&&(P=L.valueString),"use"===L.name&&(O=L.valueCoding?.code);w.push(P),"900000000000003001"===O&&(C=P)}"inactive"===M.name&&(M.valueBoolean?(o.status="Inactive",t.loadResults.inactive++):(o.status="Active",t.loadResults.active++))}if((!o.display||!w.includes(o.display))&&(o.serverDisplay=C),"Inactive"==o.status){const M=yield t.getHistoricalAssociationsTarget("900000000000527005",o.code),P=yield t.getHistoricalAssociationsTarget("900000000000530003",o.code),O=yield t.getHistoricalAssociationsTarget("900000000000523009",o.code),L=yield t.getHistoricalAssociationsTarget("900000000000526001",o.code),U=M.concat(P,O,L);o.replacements=U}}catch{o.status="Error",t.loadResults.error++}});return function(o){return s.apply(this,arguments)}}()).then(()=>{this.validating=!1,this.validatingQuestionnaire.emit(!1)})}getHistoricalAssociationsTarget(t,n){var r=this;return de(function*(){let s=[];const o=r.terminologyService.translate(t,n);let l=yield Ca(o.pipe(Di(w=>w)));if(l.parameter)for(const w of l.parameter)if("match"===w.name){let C={replacement:{},equivalence:""};for(const M of w.part)"concept"===M.name&&M.valueCoding&&(C.replacement={code:M.valueCoding.code,display:M.valueCoding.display,system:M.valueCoding.system}),"equivalence"===M.name&&M.valueCode&&(C.equivalence=M.valueCode);s.push(C)}return s})()}removeSemanticTag(t){return t.replace(/\s*\([^)]+\)\s*$/,"").trim().toLowerCase()}asyncForEach(t,n){return de(function*(){for(let r=0;r ${t.text}`:t.text),t.system&&t.system.startsWith("http://snomed.info/sct")&&t.code&&t.display){this.orderCounter++;const o={order:this.orderCounter,system:t.system,code:t.code,display:t.display,path:n,readablePath:r,status:"Not checked"};s.some(l=>l.system===o.system&&l.code===o.code&&l.display===o.display)||s.push(o)}if(Array.isArray(t))for(let o in t)s=s.concat(this.extractObjects(t[o],`${n}[${o}]`,r));else for(let o in t)t.hasOwnProperty(o)&&(s=s.concat(this.extractObjects(t[o],n?`${n}.${o}`:o,r)));if(t.answerValueSet&&t.answerValueSet.startsWith("http")){const l=new URL(t.answerValueSet).searchParams.get("fhir_vs");if(l){const w=decodeURIComponent(l),C=/(\d{5,})(?:\s*\|\s*([^|]*)\s*\|)?/g;let M;for(;null!==(M=C.exec(w));)this.orderCounter++,s.push({order:this.orderCounter,code:M[1],display:M[2]?M[2].trim():void 0,system:"http://snomed.info/sct",path:n+".answerValueSet",readablePath:r+" -> answerValueSet [ECL]",status:"Not checked"})}}return s}replaceInactiveConcept(t,n){this.searchAndReplace(this.questionnaire,t,n,!1)&&(this.requiresSave=!0,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Inactive reference replaced successfully. Save the questionnaire to persist the changes.",panelClass:["green-snackbar"]}))}saveQuestionnaire(){this.questionnaireUpdated.emit(this.questionnaire)}searchAndReplace(t,n,r,s){if("object"!=typeof t||null===t)return s;if(t.system==n.system&&t.code==n.code&&t.display==n.display&&(t.system=r.system,t.code=r.code,t.display=r.display,s=!0),t.answerValueSet){const o=new URL(t.answerValueSet),l=o.searchParams.get("fhir_vs");if(l){const w=decodeURIComponent(l),C=new RegExp(`(\\s|^)${n.code}(\\s|$|\\|)`,"g");if(C.test(w)){const M=w.replace(C,`$1${r.code}$2`);s=!0;const P=new RegExp(`\\|\\s*${n.display}\\s*\\|`,"g");if(P.test(M)){const O=M.replace(P,`| ${r.display} |`);o.searchParams.set("fhir_vs",encodeURIComponent(O)),t.answerValueSet=o.toString()}o.searchParams.set("fhir_vs",encodeURIComponent(M)),t.answerValueSet=o.toString()}}}if(Array.isArray(t))for(let o in t)s=this.searchAndReplace(t[o],n,r,s);else for(let o in t)t.hasOwnProperty(o)&&(s=this.searchAndReplace(t[o],n,r,s));if(s&&this.dataSource.data)for(let o in this.dataSource.data)this.dataSource.data[o].system==n.system&&this.dataSource.data[o].code==n.code&&this.dataSource.data[o].display==n.display&&(this.dataSource.data[o].system=r.system,this.dataSource.data[o].code=r.code,this.dataSource.data[o].display=r.display,this.dataSource.data[o].status="Active",this.dataSource.data[o].replacements=[]);return s}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-validate-questionnaire"]],viewQuery:function(n,r){if(1&n&&(Mi(Lh,5),Mi(ov,5),Mi(q2t,5)),2&n){let s;Be(s=Ve())&&(r.sort=s.first),Be(s=Ve())&&(r.tabGroup=s.first),Be(s=Ve())&&(r.questionnairesList=s.first)}},inputs:{questionnaire:"questionnaire"},outputs:{questionnaireUpdated:"questionnaireUpdated",validatingQuestionnaire:"validatingQuestionnaire"},features:[tr],decls:31,vars:8,consts:[[1,"button-container","bottom-spacer"],["class","progress-container",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["class","header","id","tab-header",4,"ngIf"],[1,"table-container","mt-4"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","order"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","path"],["matColumnDef","readablePath"],["matColumnDef","code"],["matColumnDef","display"],["matColumnDef","system"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"progress-container"],["mode","determinate",3,"value"],[1,"progress-label"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"click"],[4,"ngIf"],["diameter","20",4,"ngIf"],["diameter","20"],["id","tab-header",1,"header"],[1,"bindingsCount"],["class","mini-pill Error",4,"ngIf"],["class","mini-pill Inactive",4,"ngIf"],["class","mini-pill Active",4,"ngIf"],[1,"mini-pill","Error"],[1,"mini-pill","Inactive"],[1,"mini-pill","Active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["target","_blank",1,"code-link",3,"href"],["class","server-name",4,"ngIf"],["class","concept-is-inactive",4,"ngIf"],["class","replacement",4,"ngFor","ngForOf"],[1,"server-name"],[1,"concept-is-inactive"],[1,"replacement"],["mat-icon-button","","color","primary","matTooltip","Replace using this concept",3,"click","disabled"],["mode","indeterminate"],[1,"pill",3,"ngClass"],["mat-header-row",""],["mat-row",""],["diameter","35",1,"loading-spinner"]],template:function(n,r){1&n&&(tt(0,"div",0),Gt(1,tMt,4,2,"div",1)(2,eMt,2,1,"button",2)(3,rMt,3,2,"button",3),et(),Gt(4,lMt,14,11,"p",4),tt(5,"div",5)(6,"table",6),Wi(7,7),Gt(8,cMt,2,0,"th",8)(9,dMt,2,1,"td",9),Xi(),Wi(10,10),Gt(11,uMt,2,0,"th",8)(12,hMt,2,1,"td",9),Xi(),Wi(13,11),Gt(14,fMt,2,0,"th",8)(15,mMt,2,1,"td",9),Xi(),Wi(16,12),Gt(17,pMt,2,0,"th",8)(18,gMt,3,3,"td",9),Xi(),Wi(19,13),Gt(20,vMt,2,0,"th",8)(21,wMt,5,4,"td",9),Xi(),Wi(22,14),Gt(23,_Mt,2,0,"th",8)(24,TMt,2,1,"td",9),Xi(),Wi(25,15),Gt(26,CMt,2,0,"th",8)(27,AMt,3,2,"td",9),Xi(),Gt(28,DMt,1,0,"tr",16)(29,MMt,1,0,"tr",17),et(),Gt(30,IMt,1,0,"mat-spinner",18),et()),2&n&&(lt(),yt("ngIf",r.validating),lt(),yt("ngIf",r.requiresSave),lt(),yt("ngIf",!r.validating&&r.questionnaire),lt(),yt("ngIf",r.questionnaire),lt(2),yt("dataSource",r.dataSource),lt(22),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(),yt("ngIf",r.loading))},dependencies:[bc,gs,Ms,Sa,Oo,da,dP,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,Lh,aP,gh],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem;padding-bottom:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}"]})}return e})();const kMt=e=>["status-pill",e],PMt=()=>["status-pill","active"],FMt=()=>["status-pill","draft"];function OMt(e,i){1&e&&(tt(0,"th",15),ut(1," Title "),et())}function LMt(e,i){if(1&e&&(tt(0,"td",16),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.title," ")}}function NMt(e,i){1&e&&(tt(0,"th",15),ut(1," Status "),et())}function BMt(e,i){if(1&e&&(tt(0,"td",16)(1,"span",17),ut(2),sa(3,"uppercase"),et()()),2&e){const t=i.$implicit;lt(),yt("ngClass",vc(4,kMt,t.status)),lt(),Ze(xc(3,2,t.status))}}function VMt(e,i){1&e&&(tt(0,"th",15),ut(1," Version "),et())}function UMt(e,i){if(1&e&&(tt(0,"td",16),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.meta.versionId," ")}}function zMt(e,i){1&e&&(tt(0,"th",15),ut(1," Date "),et())}function GMt(e,i){if(1&e&&(tt(0,"td",16)(1,"i"),ut(2),sa(3,"date"),et()()),2&e){const t=i.$implicit;lt(2),Ze(Xd(3,1,t.meta.lastUpdated,"MMMM d, y, h:mm:ss a"))}}function HMt(e,i){1&e&&(tt(0,"th",15),ut(1," Type "),et())}function WMt(e,i){1&e&&(tt(0,"span",17),ut(1,"QUESTIONNAIRE"),et()),2&e&&yt("ngClass",Ko(1,PMt))}function XMt(e,i){1&e&&(tt(0,"span",17),ut(1,"MODULAR ROOT"),et()),2&e&&yt("ngClass",Ko(1,FMt))}function jMt(e,i){if(1&e&&(tt(0,"td",16),Gt(1,WMt,2,2,"span",18)(2,XMt,2,2,"span",18),et()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.isRootQuestionnaire(t))}}function YMt(e,i){1&e&&(tt(0,"th",19),ut(1," Actions "),et())}function $Mt(e,i){if(1&e){const t=ve();tt(0,"button",24),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().restore(r))}),tt(1,"mat-icon"),ut(2,"restore_page"),et()()}}function QMt(e,i){if(1&e){const t=ve();tt(0,"td",16)(1,"button",20),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().preview(r))}),tt(2,"mat-icon"),ut(3,"visibility"),et()(),tt(4,"button",21),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().openInNewTab(r))}),tt(5,"mat-icon"),ut(6,"open_in_new"),et()(),tt(7,"button",22),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().saveQuestionnaire(r))}),tt(8,"mat-icon"),ut(9,"cloud_download"),et()(),Gt(10,$Mt,3,0,"button",23),et()}if(2&e){const t=i.$implicit,n=Ct();lt(10),yt("ngIf",(null==t||null==t.meta?null:t.meta.versionId)!=(null==n.versions[0]||null==n.versions[0].meta?null:n.versions[0].meta.versionId))}}function KMt(e,i){1&e&&we(0,"tr",25)}function ZMt(e,i){1&e&&we(0,"tr",26)}function JMt(e,i){1&e&&(tt(0,"p",27)(1,"i"),ut(2," No questionnaire selected. "),et()())}function qMt(e,i){1&e&&we(0,"mat-spinner",28)}let tIt=(()=>{class e{constructor(t){this.fhirService=t,this.previewQuestionnaire=new De,this.restoreQuestionnaireVersion=new De,this.versions=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new em}ngOnChanges(t){t.questionnaire&&t.questionnaire.currentValue&&t.questionnaire.currentValue.id&&this.loadVersions()}ngOnInit(){Zd([this.fhirService.baseUrl$.pipe(tu(1e3),eu()),this.fhirService.userTag$.pipe(tu(1e3),eu())]).subscribe(([t,n])=>{(this.selectedFhirServer!==t||this.selectedUserTag!==n)&&(this.selectedFhirServer=t,this.selectedUserTag=n,this.selectedUserTag&&this.selectedFhirServer&&this.loadVersions())})}loadVersions(t){this.versions=[],this.dataSource.data=this.versions,t&&(this.questionnaire=t),this.questionnaire&&(this.loading=!0,this.fhirService.getQuestionnaireHistory(this.questionnaire.id).subscribe(n=>{this.versions=n.entry.map(r=>r.resource),this.dataSource.data=this.versions,this.loading=!1},n=>{this.loading=!1}))}preview(t){this.previewQuestionnaire.emit(t),this.loadVersions()}openInNewTab(t){window.open(this.selectedFhirServer+"/Questionnaire/"+t.id+"/_history/"+t.meta.versionId,"_blank")}saveQuestionnaire(t){var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});dd(n,`${t.title}-v${t.meta.versionId}.json`)}restore(t){this.restoreQuestionnaireVersion.emit(t)}isRootQuestionnaire(t){return!(!t.extension||!Array.isArray(t.extension))&&t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(hv))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-questionnaire-history"]],inputs:{questionnaire:"questionnaire"},outputs:{previewQuestionnaire:"previewQuestionnaire",restoreQuestionnaireVersion:"restoreQuestionnaireVersion"},features:[tr],decls:24,vars:5,consts:[[1,"table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Restore Version",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Restore Version",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"table",1),Wi(2,2),Gt(3,OMt,2,0,"th",3)(4,LMt,2,1,"td",4),Xi(),Wi(5,5),Gt(6,NMt,2,0,"th",3)(7,BMt,4,6,"td",4),Xi(),Wi(8,6),Gt(9,VMt,2,0,"th",3)(10,UMt,2,1,"td",4),Xi(),Wi(11,7),Gt(12,zMt,2,0,"th",3)(13,GMt,4,4,"td",4),Xi(),Wi(14,8),Gt(15,HMt,2,0,"th",3)(16,jMt,3,2,"td",4),Xi(),Wi(17,9),Gt(18,YMt,2,0,"th",10)(19,QMt,11,1,"td",4),Xi(),Gt(20,KMt,1,0,"tr",11)(21,ZMt,1,0,"tr",12),et(),Gt(22,JMt,3,0,"p",13)(23,qMt,1,0,"mat-spinner",14),et()),2&n&&(lt(),yt("dataSource",r.dataSource),lt(19),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(),yt("ngIf",!r.questionnaire),lt(),yt("ngIf",r.loading))},dependencies:[bc,Ms,Oo,da,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,Lh,aP,_I,gh],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px}.table-container[_ngcontent-%COMP%]{margin:2rem;padding-bottom:2rem}"]})}return e})();const eIt=["questionnairesList"],iIt=["fileInput"],nIt=["questionnaireHistory"];function rIt(e,i){1&e&&(tt(0,"span"),ut(1," / Validator"),et())}function sIt(e,i){1&e&&(tt(0,"span"),ut(1," / Questionnaires repository"),et())}function aIt(e,i){if(1&e){const t=ve();tt(0,"span",19)(1,"a",20),Vt("click",function(){return Ut(t),zt(Ct(3).mode="Manager")}),tt(2,"mat-icon"),ut(3,"play_arrow"),et(),tt(4,"span"),ut(5,"Reconnect to last FHIR Server"),et()()()}}function oIt(e,i){if(1&e&&(tt(0,"span",19)(1,"span",21),ut(2),tt(3,"i"),ut(4),et(),ut(5,'" )'),et()()),2&e){const t=Ct(3);lt(2),Ye(" ( ",t.selectedFhirServer,' as "'),lt(2),Ze(t.selectedUserTag)}}function lIt(e,i){if(1&e){const t=ve();tt(0,"div",14)(1,"h3",15),ut(2,"Work with the Questionnaire Manager"),et(),tt(3,"p",15),ut(4,"Connect to a FHIR server to store and version your questionnaire resources. Use the integrated questionnaire manager, editor and validator."),et(),tt(5,"div",16)(6,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="repository",zt(r.advanceFromStep1())}),ut(7,"Connect to a FHIR Server and Open Repository Manager"),et(),Gt(8,aIt,6,0,"span",18)(9,oIt,6,2,"span",18),et()()}if(2&e){const t=Ct(2);lt(8),yt("ngIf",t.selectedFhirServer&&t.selectedUserTag),lt(),yt("ngIf",t.selectedFhirServer&&t.selectedUserTag)}}function cIt(e,i){if(1&e){const t=ve();tt(0,"div",22)(1,"h3",15),ut(2,"Work with a single questionnaire"),et(),tt(3,"p",15),ut(4,"Create, preview or validate a questionnaire you upload from your computer."),et(),tt(5,"div",23)(6,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="edit",zt(r.advanceFromStep1())}),ut(7,"Open NLM Form Builder"),et(),tt(8,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="example",zt(r.advanceFromStep1())}),ut(9,"Load an example questionnaire"),et(),tt(10,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="validate",zt(r.advanceFromStep1())}),ut(11,"Upload and validate a questionnaire"),et()()()}}function dIt(e,i){if(1&e&&(tt(0,"div",10)(1,"div",11),Gt(2,lIt,10,2,"div",12)(3,cIt,12,0,"div",13),et()()),2&e){const t=Ct();lt(2),yt("ngIf","step1"==t.mode),lt(),yt("ngIf","utility"==t.mode)}}function uIt(e,i){if(1&e&&(tt(0,"span"),ut(1," Connected to "),tt(2,"a",37),ut(3),et(),ut(4,' as "'),tt(5,"i"),ut(6),et(),ut(7,'" '),et()),2&e){const t=Ct(2);lt(2),yt("href",t.selectedFhirServer,lx),lt(),Ze(t.selectedFhirServer),lt(3),Ze(t.selectedUserTag)}}function hIt(e,i){if(1&e){const t=ve();tt(0,"button",26),Vt("click",function(){return Ut(t),zt(Ct(2).createQuestionnaire())}),ut(1," Create Questionnaire "),et()}2&e&&yt("disabled",Ct(2).validating)}function fIt(e,i){if(1&e){const t=ve();tt(0,"button",26),Vt("click",function(){return Ut(t),zt(Ct(2).openModularQuestionnaireModal())}),ut(1," Create Modular Questionnaire "),et()}2&e&&yt("disabled",Ct(2).validating)}function mIt(e,i){if(1&e){const t=ve();tt(0,"mat-tab",38)(1,"div",31)(2,"app-list-questionnaires",39,3),Vt("validateQuestionnaire",function(r){return Ut(t),zt(Ct(2).switchToValidateTab(r))})("previewQuestionnaire",function(r){return Ut(t),zt(Ct(2).switchToPreviewTab(r))})("viewQuestionaireHistory",function(r){return Ut(t),zt(Ct(2).switchToHistoryTab(r))}),et()()()}if(2&e){const t=Ct(2);lt(2),yt("config",t.listConfig)}}function pIt(e,i){if(1&e&&(tt(0,"h4"),ut(1),sa(2,"date"),et()),2&e){const t=Ct(2);lt(),Ux("",t.questionnaire.title," - Version: ",t.questionnaire.meta.versionId," (",Xd(2,3,t.questionnaire.meta.lastUpdated,"fullDate"),")")}}function gIt(e,i){if(1&e){const t=ve();tt(0,"div")(1,"div",24),Gt(2,uIt,8,3,"span",8),tt(3,"input",25,0),Vt("change",function(r){return Ut(t),zt(Ct().onFileSelected(r))}),et(),tt(5,"button",26),Vt("click",function(){return Ut(t),zt(qi(4).click())}),ut(6," Upload "),et(),tt(7,"button",26),Vt("click",function(){return Ut(t),zt(Ct().saveQuestionnaireToDisk())}),ut(8,"Download"),et(),Gt(9,hIt,2,1,"button",27)(10,fIt,2,1,"button",27),et(),tt(11,"mat-tab-group",28),Vt("selectedIndexChange",function(r){return Ut(t),zt(Ct().onTabChange(r))}),Gt(12,mIt,4,1,"mat-tab",29),tt(13,"mat-tab",30)(14,"div",31),Gt(15,pIt,3,6,"h4",8),we(16,"div",32),et()(),tt(17,"mat-tab",33)(18,"app-validate-questionnaire",34,1),Vt("questionnaireUpdated",function(r){return Ut(t),zt(Ct().saveQuestionnaire(r))})("validatingQuestionnaire",function(r){return Ut(t),zt(Ct().validating=r)}),et()(),tt(20,"mat-tab",35)(21,"app-questionnaire-history",36,2),Vt("previewQuestionnaire",function(r){return Ut(t),zt(Ct().switchToPreviewTab(r))})("restoreQuestionnaireVersion",function(r){return Ut(t),zt(Ct().saveQuestionnaire(r))}),et()()()()}if(2&e){const t=Ct();lt(2),yt("ngIf","Manager"==t.mode),lt(3),yt("disabled",t.validating),lt(2),yt("disabled",t.validating||!t.questionnaire),lt(2),yt("ngIf","Manager"==t.mode),lt(),yt("ngIf","Manager"==t.mode),lt(2),yt("ngIf","Manager"===t.mode),lt(3),yt("ngIf",t.questionnaire),lt(),bi("hidden",!t.questionnaire),lt(2),yt("questionnaire",t.questionnaire),lt(3),yt("questionnaire",t.questionnaire)}}let vIt=(()=>{class e{constructor(t,n,r,s,o,l,w){this.http=t,this.terminologyService=n,this.fhirService=r,this.questionnaireService=s,this.activatedRoute=o,this.dialog=l,this._snackBar=w,this.loading=!1,this.validating=!1,this.orderCounter=0,this.savingQuestionnaire=!1,this.selectedFhirServer="",this.selectedUserTag="",this.showFhirSetupModal=!1,this.listConfig={validate:!0,preview:!0},this.mode="step1"}ngOnInit(){this.fhirService.baseUrl$.subscribe(t=>{this.selectedFhirServer=t}),this.fhirService.userTag$.subscribe(t=>{this.selectedUserTag=t}),this.activatedRoute.queryParams.subscribe(t=>{this.mode="true"===t.utility?"utility":"step1"}),this.loadScript()}loadScript(){const t=document.createElement("script");t.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/webcomponent/lhc-forms.js",t.onload=()=>{const n=document.createElement("script");n.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/fhir/R4/lformsFHIR.min.js",n.onload=()=>{},document.head.appendChild(n)},document.head.appendChild(t)}toggleMode(){"Validator"===this.mode?this.dialog.open(lP,{width:"60%",disableClose:!0}).afterClosed().subscribe(n=>{"save"===n&&(this.mode="Manager",setTimeout(()=>{this.tabGroup.selectedIndex=0},500))}):this.mode="Validator"}previewForm(){"Preview"==this.getCurrentTabName()&&(this.questionnaire?LForms.Util.addFormToPage(this.questionnaire,"myFormContainer"):LForms.Util.addFormToPage({},"myFormContainer"))}getFormData(){this.questionnaire&&LForms.Util.getFormData("myFormContainer",!0,!0,!0)}displayHistory(t){t&&this.questionnaireHistory.loadVersions(t)}loadExampleQuestionnaire(){Ca(this.http.get("assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json")).then(t=>{this.loadQuestionnaire(t),"Manager"===this.mode&&(this.tabGroup.selectedIndex=1)})}clearQuestionnaire(){this.questionnaire=null,this.orderCounter=0,this.previewForm()}createQuestionnaire(){this.questionnairesList.createQuestionnaire()}loadQuestionnaire(t){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=t,this.previewForm()},700)}saveQuestionnaireToDisk(){var t=new Blob([JSON.stringify(this.questionnaire,null,2)],{type:"text/plain;charset=utf-8"});dd(t,`${this.questionnaire.title}.json`)}onFileSelected(t){const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const o=JSON.parse(s.target?.result);"Questionnaire"===o.resourceType?(this.loadQuestionnaire(o),setTimeout(()=>{"Manager"===this.mode?this.postCurrentQuestionnaire():this.tabGroup.selectedIndex=1},1e3)):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"The file is not a FHIR Questionnaire Resource",panelClass:["red-snackbar"]})}catch(o){console.error(o),this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Invalid JSON file",panelClass:["red-snackbar"]})}},r.readAsText(n),t.target.value=""}}postCurrentQuestionnaire(){this.postQuestionnaire(this.questionnaire)}postQuestionnaire(t){if(-1!==this.questionnairesList.questionnaires.findIndex(r=>r.title===t.title&&r.id!==t.id))this.dialog.open(cP,{width:"400px",data:{title:"Confirm Action",message:"A questionnaire with the same title and different ID already exists. Do you want to proceed?"}}).afterClosed().subscribe(s=>{s?this.saveQuestionnaire(t):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})});else{-1!==this.questionnairesList.questionnaires.findIndex(o=>o.title===t.title&&o.id===t.id&&o.meta?.versionId>=t.meta?.versionId)?this.dialog.open(cP,{width:"400px",data:{title:"Confirm Action",message:"A newer version or identical of this questionnaire already exists. Do you want to proceed?"}}).afterClosed().subscribe(l=>{l?this.saveQuestionnaire(t):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})}):this.saveQuestionnaire(t)}}saveQuestionnaire(t){t?(this.savingQuestionnaire=!0,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Saving Questionnaire...",panelClass:["green-snackbar"]}),t.meta||(t.meta={}),t.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.fhirService.updateOrCreateQuestionnaire(t,this.selectedUserTag).pipe(Vl()).subscribe(n=>{setTimeout(()=>{this.tabGroup.selectedIndex=0,setTimeout(()=>{this.savingQuestionnaire=!1,this.questionnairesList.addQuestionnaire(n)},300)},300),this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire saved successfully",panelClass:["green-snackbar"]})},n=>{this.savingQuestionnaire=!1,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]}),this.dialog.open(cP,{width:"400px",data:{title:"Save error",message:"This could be an ID conflict. Post again as a new questionnaire?"}}).afterClosed().subscribe(s=>{s?(delete t.id,this.saveQuestionnaire(t)):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire not saved",panelClass:["red-snackbar"]})})})):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"No questionnaire to save",panelClass:["red-snackbar"]})}listQuestionnaires(){this.fhirService.getQuestionnairesByTag(this.selectedUserTag).pipe(Vl()).subscribe(t=>{},t=>{console.error(t)})}openLoadQuestionnairesDialog(){this.dialog.open(j2t,{width:"70%"}).afterClosed().subscribe(n=>{this.loadQuestionnaire(n)})}setFhirServer(){this.fhirService.setBaseUrl(this.selectedFhirServer),this.fhirService.setUserTag(this.selectedUserTag)}setupFhirServer(){this.dialog.open(lP,{width:"60%"})}switchToValidateTab(t){this.loadQuestionnaire(t),this.tabGroup.selectedIndex=2}switchToPreviewTab(t){this.loadQuestionnaire(t),this.tabGroup.selectedIndex=1}switchToHistoryTab(t){this.displayHistory(t),this.tabGroup.selectedIndex=3}advanceFromStep1(){"edit"==this.step1Response?window.open("https://lhcformbuilder.nlm.nih.gov/","_blank"):"validate"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.uploadInput.nativeElement.click()},200)):"repository"==this.step1Response?this.dialog.open(lP,{width:"60%"}).afterClosed().subscribe(n=>{n&&(this.mode="Manager")}):"example"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.loadExampleQuestionnaire()},300)):"reconnect"==this.step1Response&&(this.mode="Manager"),this.step1Response=""}getCurrentTabName(){const t=this.tabGroup.selectedIndex;return null!=t?this.tabGroup._tabs.toArray()[t].textLabel:""}onTabChange(t){"Preview"===this.tabGroup._tabs.toArray()[t].textLabel&&setTimeout(()=>{this.previewForm()},300)}openModularQuestionnaireModal(){this.dialog.open(nj,{width:"75%"}).afterClosed().subscribe(n=>{n&&this.questionnaireService.generateRootQuestionnaire(n.title,n.questionnaires).then(r=>{this.postQuestionnaire(r)}).catch(r=>{console.error("Error:",r)})})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd),mt(ca),mt(hv),mt(rj),mt(Tc),mt(lm),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-questionnaires-main"]],viewQuery:function(n,r){if(1&n&&(Mi(Lh,5),Mi(ov,5),Mi(eIt,5),Mi(iIt,5),Mi(nIt,5)),2&n){let s;Be(s=Ve())&&(r.sort=s.first),Be(s=Ve())&&(r.tabGroup=s.first),Be(s=Ve())&&(r.questionnairesList=s.first),Be(s=Ve())&&(r.uploadInput=s.first),Be(s=Ve())&&(r.questionnaireHistory=s.first)}},decls:11,vars:4,consts:[["fileInput",""],["validateQuestionnaire",""],["questionnaireHistory",""],["questionnairesList",""],[1,"header-container"],[1,"header"],[1,"breadcrumb"],["href","javascript:void(0)",3,"click"],[4,"ngIf"],["id","step1",4,"ngIf"],["id","step1"],[1,"flex","justify-between","pr-4"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px]",4,"ngIf"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px] justify-center",4,"ngIf"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]"],[1,"text-center"],[1,"flex","justify-center","flex-col","gap-1","mt-10"],["mat-flat-button","","color","accent",1,"mx-auto","w-auto","flex-none",3,"click"],["class","mx-auto w-auto flex-none",4,"ngIf"],[1,"mx-auto","w-auto","flex-none"],["href","javascript:void(0)","id","reconnect-link",3,"click"],[1,"muted"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]","justify-center"],[1,"flex","justify-center","flex-col","gap-5","mt-10"],[1,"button-container","bottom-spacer"],["type","file","hidden","",3,"change"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange"],["label","My Questionnaires",4,"ngIf"],["label","Preview"],[1,"tab-container"],["id","myFormContainer"],["label","Validate SNOMED Bindings"],[3,"questionnaireUpdated","validatingQuestionnaire","questionnaire"],["label","History"],[3,"previewQuestionnaire","restoreQuestionnaireVersion","questionnaire"],["target","_blank",3,"href"],["label","My Questionnaires"],[3,"validateQuestionnaire","previewQuestionnaire","viewQuestionaireHistory","config"]],template:function(n,r){1&n&&(tt(0,"div",4)(1,"h2",5),ut(2," SNOMED CT Terminology Bindings Validator - FHIR Questionnaire Manager "),et(),tt(3,"div",6)(4,"span")(5,"a",7),Vt("click",function(){return r.mode="step1"}),ut(6,"Home"),et(),Gt(7,rIt,2,0,"span",8)(8,sIt,2,0,"span",8),et()()(),Gt(9,dIt,4,2,"div",9)(10,gIt,23,11,"div",8)),2&n&&(lt(7),yt("ngIf","Validator"==r.mode),lt(),yt("ngIf","Manager"==r.mode),lt(),yt("ngIf","step1"==r.mode||"utility"==r.mode),lt(),yt("ngIf","Manager"==r.mode||"Validator"==r.mode))},dependencies:[Ms,Sa,da,zy,ov,sj,RMt,tIt,gh],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding-top:1rem;padding-left:2rem;padding-right:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}#step1[_ngcontent-%COMP%]{margin-top:2rem;margin-left:2rem;font-size:large}#step1[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{margin-left:2rem;display:flex;flex-direction:column;align-items:flex-start}.step-button-container[_ngcontent-%COMP%]{margin-left:30rem;margin-top:2rem}.breadcrumb[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:2rem}.header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hidden[_ngcontent-%COMP%]{visibility:hidden}.muted[_ngcontent-%COMP%]{color:#8f9397}#reconnect[_ngcontent-%COMP%]{margin-left:5rem}#reconnect-link[_ngcontent-%COMP%]{display:flex;vertical-align:middle;flex-direction:row}"]})}return e})();const xIt=e=>({"bg-pink":e});function yIt(e,i){if(1&e&&(tt(0,"p",18),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.studentSubsetDefinition)}}function bIt(e,i){1&e&&we(0,"mat-spinner",19)}function wIt(e,i){if(1&e&&(tt(0,"p",23),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.definitionVsMembersValidationResult)}}function _It(e,i){if(1&e&&(tt(0,"p",23),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.keyConceptValidationResult)}}function TIt(e,i){if(1&e&&(tt(0,"div",20)(1,"h3",21),ut(2,"Validation Results"),et(),Gt(3,wIt,2,1,"p",22)(4,_It,2,1,"p",22),tt(5,"p",23),ut(6),et(),tt(7,"p",23),ut(8),et()()),2&e){const t=Ct();lt(3),yt("ngIf",t.selectedAssignment.referenceDefinition),lt(),yt("ngIf",t.selectedAssignment.referenceDefinition),lt(2),Ze(t.membersNotInRefrenceListResult),lt(2),Ze(t.refrenceListVsStudentListResult)}}function CIt(e,i){1&e&&(tt(0,"th",33),ut(1,"ID"),et())}function SIt(e,i){if(1&e&&(tt(0,"td",34),ut(1),et()),2&e){const t=i.$implicit;lt(),Ze(t.referencedComponentId)}}function EIt(e,i){1&e&&(tt(0,"th",33),ut(1,"Name"),et())}function AIt(e,i){if(1&e&&(tt(0,"td",34),ut(1),et()),2&e){const t=i.$implicit;lt(),Ze(t.name)}}function DIt(e,i){1&e&&(tt(0,"th",33),ut(1,"Result"),et())}function MIt(e,i){1&e&&(tt(0,"span"),ut(1,"OK"),et())}function IIt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).$implicit;lt(),Ye(" ",t.customMessage.note," ")}}function RIt(e,i){1&e&&(tt(0,"span"),ut(1," Error "),et())}function kIt(e,i){if(1&e&&(tt(0,"span"),Gt(1,MIt,2,0,"span",16)(2,IIt,2,1,"span",16)(3,RIt,2,0,"span",16),et()),2&e){const t=Ct().$implicit;lt(),yt("ngIf",null==t||null==t.inReferenceList?null:t.inReferenceList.value),lt(),yt("ngIf",!(null!=t&&null!=t.inReferenceList&&t.inReferenceList.value)&&(null==t||null==t.customMessage?null:t.customMessage.value)),lt(),yt("ngIf",!(null!=t&&null!=t.inReferenceList&&t.inReferenceList.value||null!=t&&null!=t.customMessage&&t.customMessage.value))}}function PIt(e,i){if(1&e&&(tt(0,"td",34),Gt(1,kIt,4,3,"span",16),et()),2&e){const t=Ct(2);lt(),yt("ngIf",t.membersValidationResult)}}function FIt(e,i){1&e&&we(0,"tr",35)}function OIt(e,i){if(1&e&&we(0,"tr",36),2&e){const t=i.$implicit,n=Ct(2);yt("ngClass",vc(1,xIt,!(null!=t.inReferenceList&&t.inReferenceList.value)&&n.membersValidationResult))}}function LIt(e,i){if(1&e&&(tt(0,"div",24)(1,"table",25),Wi(2,26),Gt(3,CIt,2,0,"th",27)(4,SIt,2,1,"td",28),Xi(),Wi(5,29),Gt(6,EIt,2,0,"th",27)(7,AIt,2,1,"td",28),Xi(),Wi(8,30),Gt(9,DIt,2,0,"th",27)(10,PIt,2,1,"td",28),Xi(),Gt(11,FIt,1,0,"tr",31)(12,OIt,1,3,"tr",32),et()()),2&e){const t=Ct();lt(),yt("dataSource",t.studentSubsetMembersDataSource),lt(10),yt("matHeaderRowDef",t.studentSubsetMembersDisplayedColumns),lt(),yt("matRowDefColumns",t.studentSubsetMembersDisplayedColumns)}}function NIt(e,i){if(1&e){const t=ve();tt(0,"button",40),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setAssignment(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function BIt(e,i){if(1&e&&(tt(0,"div")(1,"h3"),ut(2,"Assignment"),et(),tt(3,"button",37),ut(4),et(),tt(5,"mat-menu",38,2),Gt(7,NIt,2,1,"button",39),et()()),2&e){const t=qi(6),n=Ct();lt(3),yt("matMenuTriggerFor",t),lt(),Ye("Selected assignment: ",null==n.selectedAssignment?null:n.selectedAssignment.name,""),lt(3),yt("ngForOf",n.assignments)}}function VIt(e,i){if(1&e&&(tt(0,"h3"),ut(1),et()),2&e){const t=Ct();lt(),Ye(" Assignment: ",null==t.selectedAssignment?null:t.selectedAssignment.name," ")}}function UIt(e,i){1&e&&(tt(0,"ol")(1,"li"),ut(2,"1- Upload definition file"),et(),tt(3,"li"),ut(4,"2- Upload members file"),et(),tt(5,"li"),ut(6,"3- Click validate"),et()())}function zIt(e,i){1&e&&(tt(0,"ol")(1,"li"),ut(2,"1- Upload members file"),et(),tt(3,"li"),ut(4,"2- Click validate"),et()())}function GIt(e,i){if(1&e){const t=ve();tt(0,"div")(1,"div")(2,"h3"),ut(3,"Reference Data"),et(),tt(4,"mat-form-field",41)(5,"mat-label"),ut(6,"Textarea"),et(),tt(7,"textarea",42),wa("ngModelChange",function(r){Ut(t);const s=Ct();return Na(s.assignmentsString,r)||(s.assignmentsString=r),zt(r)}),et()(),tt(8,"button",11),Vt("click",function(){return Ut(t),zt(Ct().updateAssignments())}),ut(9,"Update Assignments"),et()()()}if(2&e){const t=Ct();lt(7),ba("ngModel",t.assignmentsString)}}let HIt=(()=>{class e{constructor(t,n,r,s){this.http=t,this.terminologyService=n,this._snackBar=r,this.activatedRoute=s,this.studentSubsetMembersDisplayedColumns=["referencedComponentId","name","result"],this.studentSubsetMembersDataSource=new em,this.studentSubsetmembers=[],this.studentSubsetDefinition="",this.keyConceptValidationResult="",this.definitionVsMembersValidationResult="",this.membersNotInRefrenceListResult="",this.membersValidationResult=!1,this.refrenceListVsStudentListResult="",this.embeddedMode=!1,this.loading=!1,this.ok="\u2705",this.error="\u{1f7e5}",this.assignments=[{name:"Assignment X",referenceData:[{referencedComponentId:"403197009",name:"Sun-induced wrinkles"},{referencedComponentId:"279002006",name:"Lichenification of skin"},{referencedComponentId:"274672009",name:"Changes in skin texture"},{referencedComponentId:"271767006",name:"Peeling of skin"},{referencedComponentId:"271761007",name:"Scaly skin"},{referencedComponentId:"247434009",name:"Wrinkled skin"}],referenceDefinition:"< 185823004 |Finding of skin texture (finding)|",keyConceptsInECL:[{code:"185823004",display:"Finding of skin texture (finding)"}],customMessages:[{conceptId:"85345005",note:"wrong hierarchy",principle:"wrong hierarchy"},{conceptId:"403197009",note:"wrong hierarchy",principle:"wrong hierarchy"}]}],this.assignmentsString=JSON.stringify(this.assignments),this.selectedAssignment=this.assignments[0],this.referenceDataDisplayedColumns=["referencedComponentId","name"],this.referenceDataDataSource=new em(this.selectedAssignment.referenceData)}ngOnInit(){var t=this;return de(function*(){const n=yield Ca(t.http.get("assets/definitions/assignments.json"));t.assignments=n,t.assignmentsString=JSON.stringify(t.assignments),t.setAssignment(t.assignments[0]),t.activatedRoute.queryParams.subscribe(r=>{r.assignment&&t.setAssignment(t.assignments.find(s=>s.name===r.assignment)),t.embeddedMode="true"===r.embedded})})()}setAssignment(t){t&&(this.selectedAssignment=t,this.referenceDataDataSource=new em(this.selectedAssignment.referenceData))}checkStudentECLvsStudentList(){var t=this;return de(function*(){if(!t.studentSubsetDefinition){let r=yield t.terminologyService.expandValueSet(t.studentSubsetDefinition,"").toPromise(),o=0;t.studentSubsetmembers.forEach(l=>{r.expansion.contains.find(C=>C.code===l.referencedComponentId)?l.inStudentECL={value:!0,message:""}:(l.inStudentECL={value:!1,message:""},o++)})}return 0})()}checkStudentECLvsKeyConcept(){if(this.studentSubsetDefinition){console.log("Student ECL not defined");let t=this.studentSubsetDefinition,r=!0;return this.selectedAssignment.keyConceptsInECL.forEach(s=>{t.includes(s.code)||(r=!1)}),r}return!0}checkStudentListVsReferenceList(){let n=this.selectedAssignment.referenceData;this.studentSubsetmembers.forEach(s=>{s.inReferenceList=n.find(l=>l.referencedComponentId===s.referencedComponentId)?{value:!0,message:""}:{value:!1,message:""}})}checkReferenceListVsStudentList(){let t=this.studentSubsetmembers,r=0;return this.selectedAssignment.referenceData.forEach(s=>{t.find(l=>l.referencedComponentId===s.referencedComponentId)?s.inStudentList={value:!0,message:""}:(s.inStudentList={value:!1,message:""},r++)}),r}checkStudentListVsCustomMessages(){let n=this.selectedAssignment.customMessages;this.studentSubsetmembers.forEach(r=>{const s=n.find(o=>o.conceptId===r.referencedComponentId);r.customMessage=s?{value:!0,principle:s.principle,note:s.note}:{value:!1,principle:"",note:""}})}updateAssignments(){this.assignments=JSON.parse(this.assignmentsString),this.setAssignment(this.assignments[0])}validateAssignment(){var t=this;return de(function*(){t.loading=!0,t.keyConceptValidationResult="",t.definitionVsMembersValidationResult="",t.membersValidationResult=!1,t.loading=!0,t.studentSubsetDefinition&&(t.definitionVsMembersValidationResult=(yield t.checkStudentECLvsStudentList())>0?t.error+" The uploaded definition and members files are not in alignment":t.ok+" The uploaded definition and members files are in alignment",t.keyConceptValidationResult=t.checkStudentECLvsKeyConcept()?t.ok+" The definition of your subset includes the key subhierarchy":t.error+" The definition of your subset does not include the key subhierarchy"),t.checkStudentListVsReferenceList();let n=t.studentSubsetmembers.filter(s=>!s.inReferenceList.value).length;t.membersNotInRefrenceListResult=n>0?t.error+" There are "+n+" members in your subset that are not recommended to be included":t.ok+" All members match the recommended list of concepts for the subset",t.checkStudentListVsCustomMessages();let r=t.checkReferenceListVsStudentList();t.refrenceListVsStudentListResult=r>0?t.error+" "+r+" "+(r>1?"concepts are":"concept is")+" missing in the uploaded member list that would be recommended to be included in this subset":t.ok+" All recommended concepts are included in this subset",t.loading=!1,t.membersValidationResult=!0})()}onSubsetmembersFileSelected(t){this.studentSubsetmembers=[],this.studentSubsetMembersDataSource=new em,this.studentSubsetMembersDataSource.sort=this.sort,this.loading=!0;const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const l=r.result.split("\n"),w=l[0].split("\t");if(w.length<2)throw new Error("Invalid file format");const C=w.indexOf("referencedComponentId"),M=w.indexOf("name");if(C<0||M<0)throw new Error("Invalid file format");const P=[];for(let O=1;OO.name.localeCompare(L.name)),this.studentSubsetmembers=P,this.studentSubsetMembersDataSource.data=P,this.loading=!1}catch(o){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+o.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=s=>{this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+s,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(n)}else this.loading=!1}onDefinitionFileSelected(t){this.studentSubsetDefinition="",this.loading=!0;const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const w=r.result.replace(/\r/g,"").split("\n"),C=w[0].split("\t");if(C.length<2)throw new Error("Invalid file format");const M=C.indexOf("referencedComponentId"),P=C.indexOf("definition");if(M<0||P<0)throw new Error("Invalid file format");this.studentSubsetDefinition=w[1].split("\t")[P],this.loading=!1}catch(o){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+o.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=s=>{this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+s,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(n)}else this.loading=!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd),mt(ca),mt(Sh),mt(Tc))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-subset-validator"]],viewQuery:function(n,r){if(1&n&&Mi(Lh,5),2&n){let s;Be(s=Ve())&&(r.sort=s.first)}},decls:31,vars:12,consts:[["fileInput",""],["fileInputDefinition",""],["demosMenu","matMenu"],[1,"layout-container"],[1,"left-column"],[1,"upload-controls"],[1,"mb-4"],["class","terminal-style",4,"ngIf"],["type","file",2,"display","none",3,"change"],[1,"buttons-panel"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click"],["class","spinner","diameter","30",4,"ngIf"],["class","blue-rounded-div",4,"ngIf"],["class","table-container",4,"ngIf"],[1,"right-column"],[4,"ngIf"],[1,"instructions"],[1,"terminal-style"],["diameter","30",1,"spinner"],[1,"blue-rounded-div"],[1,"text-white","mb-1"],["class","validation-result",4,"ngIf"],[1,"validation-result"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","referencedComponentId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","result"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"ngClass"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["appearance","fill"],["matInput","",3,"ngModelChange","ngModel"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3"),ut(4,"Subset Members Validator"),et(),tt(5,"p",6),ut(6),et(),Gt(7,yIt,2,1,"p",7),tt(8,"input",8,0),Vt("change",function(l){return Ut(s),zt(r.onSubsetmembersFileSelected(l))}),et(),tt(10,"input",8,1),Vt("change",function(l){return Ut(s),zt(r.onDefinitionFileSelected(l))}),et(),tt(12,"div",9)(13,"button",10),Vt("click",function(){return Ut(s),zt(qi(11).click())}),ut(14," Upload Definition File "),et(),tt(15,"button",11),Vt("click",function(){return Ut(s),zt(qi(9).click())}),ut(16,"Upload Members File"),et(),tt(17,"button",10),Vt("click",function(){return Ut(s),zt(r.validateAssignment())}),ut(18,"Validate"),et(),Gt(19,bIt,1,0,"mat-spinner",12),et(),Gt(20,TIt,9,4,"div",13),et(),Gt(21,LIt,13,3,"div",14),et(),tt(22,"div",15),Gt(23,BIt,8,3,"div",16)(24,VIt,2,1,"h3",16),tt(25,"h3"),ut(26,"Instructions"),et(),tt(27,"div",17),Gt(28,UIt,7,0,"ol",16)(29,zIt,5,0,"ol",16),et(),Gt(30,GIt,10,1,"div",16),et()()}2&n&&(lt(6),Ye("Validating against ",r.terminologyService.getFhirUrlParam(),""),lt(),yt("ngIf",r.studentSubsetDefinition),lt(6),yt("disabled",!r.selectedAssignment.referenceDefinition),lt(4),yt("disabled",!r.studentSubsetMembersDataSource.data.length),lt(2),yt("ngIf",r.loading),lt(),yt("ngIf",!r.loading&&r.membersNotInRefrenceListResult),lt(),yt("ngIf",!r.loading&&r.studentSubsetMembersDataSource.data.length),lt(2),yt("ngIf",!r.embeddedMode),lt(),yt("ngIf",r.embeddedMode),lt(4),yt("ngIf",r.selectedAssignment.referenceDefinition),lt(),yt("ngIf",!r.selectedAssignment.referenceDefinition),lt(),yt("ngIf",!r.embeddedMode))},dependencies:[bc,gs,Ms,Sa,bl,Gl,cu,Xl,wl,Eh,Fh,Hl,No,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,Wl],styles:["[_nghost-%COMP%]{display:block;height:calc(100% - 65px)}.layout-container[_ngcontent-%COMP%]{display:flex;height:100%}.left-column[_ngcontent-%COMP%]{flex:0 0 68%;display:flex;flex-direction:column;height:100%}.right-column[_ngcontent-%COMP%]{flex:0 0 28%}.buttons-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-top:2rem}.upload-controls[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.table-container[_ngcontent-%COMP%]{overflow-y:auto}.upload-controls[_ngcontent-%COMP%]{margin-left:20px}table[_ngcontent-%COMP%]{width:100%}.validation-result[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.blue-rounded-div[_ngcontent-%COMP%]{border-radius:10px;background-color:#4d7fb4;padding:.5rem 3rem 1rem;width:80%;color:#f5f5f5;margin-top:20px}.terminal-style[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem;background-color:#000;color:#fff;padding:10px;border-radius:10px;margin-top:20px;width:80%}h4[_ngcontent-%COMP%]{margin-top:10px}.instructions[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px;font-weight:lighter;font-size:larger}h3[_ngcontent-%COMP%]{margin-top:10px}.bg-pink[_ngcontent-%COMP%]{background-color:pink}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background-color:#aba9a9!important}"]})}return e})();const oj=function(e){const i=[];let t=0;for(let n=0;n>6|192,i[t++]=63&r|128):55296==(64512&r)&&n+1>18|240,i[t++]=r>>12&63|128,i[t++]=r>>6&63|128,i[t++]=63&r|128):(i[t++]=r>>12|224,i[t++]=r>>6&63|128,i[t++]=63&r|128)}return i},lj={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,i){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=i?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let r=0;r>6,L=63&C;w||(L=64,o||(O=64)),n.push(t[s>>2],t[(3&s)<<4|l>>4],t[O],t[L])}return n.join("")},encodeString(e,i){return this.HAS_NATIVE_SUPPORT&&!i?btoa(e):this.encodeByteArray(oj(e),i)},decodeString(e,i){return this.HAS_NATIVE_SUPPORT&&!i?atob(e):function(e){const i=[];let t=0,n=0;for(;t191&&r<224){const s=e[t++];i[n++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){const w=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536;i[n++]=String.fromCharCode(55296+(w>>10)),i[n++]=String.fromCharCode(56320+(1023&w))}else{const s=e[t++],o=e[t++];i[n++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&o)}}return i.join("")}(this.decodeStringToByteArray(e,i))},decodeStringToByteArray(e,i){this.init_();const t=i?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let r=0;r>4),64!==C&&(n.push(l<<4&240|C>>2),64!==P&&n.push(C<<6&192|P))}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class $It extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const tS=function(e){return function(e){const i=oj(e);return lj.encodeByteArray(i,!0)}(e).replace(/\./g,"")},eS=()=>{try{return function ZIt(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const i=e&&function(e){try{return lj.decodeString(e,!0)}catch(i){console.error("base64Decode failed: ",i)}return null}(e[1]);return i&&JSON.parse(i)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},dj=()=>{var e;return null===(e=eS())||void 0===e?void 0:e.config};class uj{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((i,t)=>{this.resolve=i,this.reject=t})}wrapCallback(i){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof i&&(this.promise.catch(()=>{}),1===i.length?i(t):i(t,n))}}}class fv extends Error{constructor(i,t,n){super(t),this.code=i,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,fv.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,mj.prototype.create)}}class mj{constructor(i,t,n){this.service=i,this.serviceName=t,this.errors=n}create(i,...t){const n=t[0]||{},r=`${this.service}/${i}`,s=this.errors[i],o=s?function lRt(e,i){return e.replace(cRt,(t,n)=>{const r=i[n];return null!=r?String(r):`<${n}?>`})}(s,n):"Error";return new fv(r,`${this.serviceName}: ${o} (${r}).`,n)}}const cRt=/\{\$([^}]+)}/g;function $y(e,i){if(e===i)return!0;const t=Object.keys(e),n=Object.keys(i);for(const r of t){if(!n.includes(r))return!1;const s=e[r],o=i[r];if(gj(s)&&gj(o)){if(!$y(s,o))return!1}else if(s!==o)return!1}for(const r of n)if(!t.includes(r))return!1;return!0}function gj(e){return null!==e&&"object"==typeof e}function Ec(e){return e&&e._delegate?e._delegate:e}class Qy{constructor(i,t,n){this.name=i,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(i){return this.instantiationMode=i,this}setMultipleInstances(i){return this.multipleInstances=i,this}setServiceProps(i){return this.serviceProps=i,this}setInstanceCreatedCallback(i){return this.onInstanceCreated=i,this}}const cm="[DEFAULT]";class vRt{constructor(i,t){this.name=i,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(i){const t=this.normalizeInstanceIdentifier(i);if(!this.instancesDeferred.has(t)){const n=new uj;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(i){var t;const n=this.normalizeInstanceIdentifier(i?.identifier),r=null!==(t=i?.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(s){if(r)return null;throw s}}getComponent(){return this.component}setComponent(i){if(i.name!==this.name)throw Error(`Mismatching Component ${i.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=i,this.shouldAutoInitialize()){if(function yRt(e){return"EAGER"===e.instantiationMode}(i))try{this.getOrInitializeService({instanceIdentifier:cm})}catch{}for(const[t,n]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(t);try{const s=this.getOrInitializeService({instanceIdentifier:r});n.resolve(s)}catch{}}}}clearInstance(i=cm){this.instancesDeferred.delete(i),this.instancesOptions.delete(i),this.instances.delete(i)}delete(){var i=this;return de(function*(){const t=Array.from(i.instances.values());yield Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(i=cm){return this.instances.has(i)}getOptions(i=cm){return this.instancesOptions.get(i)||{}}initialize(i={}){const{options:t={}}=i,n=this.normalizeInstanceIdentifier(i.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[s,o]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(s)&&o.resolve(r);return r}onInit(i,t){var n;const r=this.normalizeInstanceIdentifier(t),s=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;s.add(i),this.onInitCallbacks.set(r,s);const o=this.instances.get(r);return o&&i(o,r),()=>{s.delete(i)}}invokeOnInitCallbacks(i,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(i,t)}catch{}}getOrInitializeService({instanceIdentifier:i,options:t={}}){let n=this.instances.get(i);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(e=i,e===cm?void 0:e),options:t}),this.instances.set(i,n),this.instancesOptions.set(i,t),this.invokeOnInitCallbacks(n,i),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,i,n)}catch{}var e;return n||null}normalizeInstanceIdentifier(i=cm){return this.component?this.component.multipleInstances?i:cm:i}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class bRt{constructor(i){this.name=i,this.providers=new Map}addComponent(i){const t=this.getProvider(i.name);if(t.isComponentSet())throw new Error(`Component ${i.name} has already been registered with ${this.name}`);t.setComponent(i)}addOrOverwriteComponent(i){this.getProvider(i.name).isComponentSet()&&this.providers.delete(i.name),this.addComponent(i)}getProvider(i){if(this.providers.has(i))return this.providers.get(i);const t=new vRt(i,this);return this.providers.set(i,t),t}getProviders(){return Array.from(this.providers.values())}}const pP=[];var jn=function(e){return e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT",e}(jn||{});const vj={debug:jn.DEBUG,verbose:jn.VERBOSE,info:jn.INFO,warn:jn.WARN,error:jn.ERROR,silent:jn.SILENT},wRt=jn.INFO,_Rt={[jn.DEBUG]:"log",[jn.VERBOSE]:"log",[jn.INFO]:"info",[jn.WARN]:"warn",[jn.ERROR]:"error"},TRt=(e,i,...t)=>{if(ii.some(t=>e instanceof t);let yj,bj;const wj=new WeakMap,gP=new WeakMap,_j=new WeakMap,vP=new WeakMap,xP=new WeakMap;let yP={get(e,i,t){if(e instanceof IDBTransaction){if("done"===i)return gP.get(e);if("objectStoreNames"===i)return e.objectStoreNames||_j.get(e);if("store"===i)return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Vh(e[i])},set:(e,i,t)=>(e[i]=t,!0),has:(e,i)=>e instanceof IDBTransaction&&("done"===i||"store"===i)||i in e};function RRt(e){return"function"==typeof e?function IRt(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function ERt(){return bj||(bj=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(e)?function(...i){return e.apply(bP(this),i),Vh(wj.get(this))}:function(...i){return Vh(e.apply(bP(this),i))}:function(i,...t){const n=e.call(bP(this),i,...t);return _j.set(n,i.sort?i.sort():[i]),Vh(n)}}(e):(e instanceof IDBTransaction&&function DRt(e){if(gP.has(e))return;const i=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)});gP.set(e,i)}(e),CRt(e,function SRt(){return yj||(yj=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(e,yP):e)}function Vh(e){if(e instanceof IDBRequest)return function ARt(e){const i=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t(Vh(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",o)});return i.then(t=>{t instanceof IDBCursor&&wj.set(t,e)}).catch(()=>{}),xP.set(i,e),i}(e);if(vP.has(e))return vP.get(e);const i=RRt(e);return i!==e&&(vP.set(e,i),xP.set(i,e)),i}const bP=e=>xP.get(e),PRt=["get","getKey","getAll","getAllKeys","count"],FRt=["put","add","delete","clear"],wP=new Map;function Tj(e,i){if(!(e instanceof IDBDatabase)||i in e||"string"!=typeof i)return;if(wP.get(i))return wP.get(i);const t=i.replace(/FromIndex$/,""),n=i!==t,r=FRt.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!PRt.includes(t))return;const s=function(){var o=de(function*(l,...w){const C=this.transaction(l,r?"readwrite":"readonly");let M=C.store;return n&&(M=M.index(w.shift())),(yield Promise.all([M[t](...w),r&&C.done]))[0]});return function(w){return o.apply(this,arguments)}}();return wP.set(i,s),s}!function MRt(e){yP=e(yP)}(e=>({...e,get:(i,t,n)=>Tj(i,t)||e.get(i,t,n),has:(i,t)=>!!Tj(i,t)||e.has(i,t)}));class ORt{constructor(i){this.container=i}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(function LRt(e){const i=e.getComponent();return"VERSION"===i?.type}(t)){const n=t.getImmediate();return`${n.library}/${n.version}`}return null}).filter(t=>t).join(" ")}}const nS="@firebase/app",dm=new xj("@firebase/app"),rS="[DEFAULT]",ckt={[nS]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","@firebase/vertexai-preview":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},um=new Map,Ky=new Map,Zy=new Map;function Cj(e,i){try{e.container.addComponent(i)}catch(t){dm.debug(`Component ${i.name} failed to register with FirebaseApp ${e.name}`,t)}}function sS(e){const i=e.name;if(Zy.has(i))return dm.debug(`There were multiple attempts to register component ${i}.`),!1;Zy.set(i,e);for(const t of um.values())Cj(t,e);for(const t of Ky.values())Cj(t,e);return!0}const Yl=new mj("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class Ej{constructor(i,t,n){this._isDeleted=!1,this._options=Object.assign({},i),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Qy("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(i){this.checkDestroyed(),this._automaticDataCollectionEnabled=i}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(i){this._isDeleted=i}checkDestroyed(){if(this.isDeleted)throw Yl.create("app-deleted",{appName:this._name})}}function Aj(e,i={}){let t=e;"object"!=typeof i&&(i={name:i});const n=Object.assign({name:rS,automaticDataCollectionEnabled:!1},i),r=n.name;if("string"!=typeof r||!r)throw Yl.create("bad-app-name",{appName:String(r)});if(t||(t=dj()),!t)throw Yl.create("no-options");const s=um.get(r);if(s){if($y(t,s.options)&&$y(n,s.config))return s;throw Yl.create("duplicate-app",{appName:r})}const o=new bRt(r);for(const w of Zy.values())o.addComponent(w);const l=new Ej(t,n,o);return um.set(r,l),l}function hm(e,i,t){var n;let r=null!==(n=ckt[e])&&void 0!==n?n:e;t&&(r+=`-${t}`);const s=r.match(/\s|\//),o=i.match(/\s|\//);if(s||o){const l=[`Unable to register library "${r}" with version "${i}":`];return s&&l.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${i}" contains illegal characters (whitespace or "/")`),void dm.warn(l.join(" "))}sS(new Qy(`${r}-version`,()=>({library:r,version:i}),"VERSION"))}const gkt="firebase-heartbeat-database",vkt=1,Jy="firebase-heartbeat-store";let CP=null;function Dj(){return CP||(CP=function kRt(e,i,{blocked:t,upgrade:n,blocking:r,terminated:s}={}){const o=indexedDB.open(e,i),l=Vh(o);return n&&o.addEventListener("upgradeneeded",w=>{n(Vh(o.result),w.oldVersion,w.newVersion,Vh(o.transaction),w)}),t&&o.addEventListener("blocked",w=>t(w.oldVersion,w.newVersion,w)),l.then(w=>{s&&w.addEventListener("close",()=>s()),r&&w.addEventListener("versionchange",C=>r(C.oldVersion,C.newVersion,C))}).catch(()=>{}),l}(gkt,vkt,{upgrade:(e,i)=>{if(0===i)try{e.createObjectStore(Jy)}catch(t){console.warn(t)}}}).catch(e=>{throw Yl.create("idb-open",{originalErrorMessage:e.message})})),CP}function SP(){return(SP=de(function*(e){try{const t=(yield Dj()).transaction(Jy),n=yield t.objectStore(Jy).get(Ij(e));return yield t.done,n}catch(i){if(i instanceof fv)dm.warn(i.message);else{const t=Yl.create("idb-get",{originalErrorMessage:i?.message});dm.warn(t.message)}}})).apply(this,arguments)}function Mj(e,i){return EP.apply(this,arguments)}function EP(){return(EP=de(function*(e,i){try{const n=(yield Dj()).transaction(Jy,"readwrite");yield n.objectStore(Jy).put(i,Ij(e)),yield n.done}catch(t){if(t instanceof fv)dm.warn(t.message);else{const n=Yl.create("idb-set",{originalErrorMessage:t?.message});dm.warn(n.message)}}})).apply(this,arguments)}function Ij(e){return`${e.name}!${e.options.appId}`}class wkt{constructor(i){this.container=i,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Tkt(t),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){var i=this;return de(function*(){var t,n;const s=i.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=Rj();if((null!=(null===(t=i._heartbeatsCache)||void 0===t?void 0:t.heartbeats)||(i._heartbeatsCache=yield i._heartbeatsCachePromise,null!=(null===(n=i._heartbeatsCache)||void 0===n?void 0:n.heartbeats)))&&i._heartbeatsCache.lastSentHeartbeatDate!==o&&!i._heartbeatsCache.heartbeats.some(l=>l.date===o))return i._heartbeatsCache.heartbeats.push({date:o,agent:s}),i._heartbeatsCache.heartbeats=i._heartbeatsCache.heartbeats.filter(l=>{const w=new Date(l.date).valueOf();return Date.now()-w<=2592e6}),i._storage.overwrite(i._heartbeatsCache)})()}getHeartbeatsHeader(){var i=this;return de(function*(){var t;if(null===i._heartbeatsCache&&(yield i._heartbeatsCachePromise),null==(null===(t=i._heartbeatsCache)||void 0===t?void 0:t.heartbeats)||0===i._heartbeatsCache.heartbeats.length)return"";const n=Rj(),{heartbeatsToSend:r,unsentEntries:s}=function _kt(e,i=1024){const t=[];let n=e.slice();for(const r of e){const s=t.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),kj(t)>i){s.dates.pop();break}}else if(t.push({agent:r.agent,dates:[r.date]}),kj(t)>i){t.pop();break}n=n.slice(1)}return{heartbeatsToSend:t,unsentEntries:n}}(i._heartbeatsCache.heartbeats),o=tS(JSON.stringify({version:2,heartbeats:r}));return i._heartbeatsCache.lastSentHeartbeatDate=n,s.length>0?(i._heartbeatsCache.heartbeats=s,yield i._storage.overwrite(i._heartbeatsCache)):(i._heartbeatsCache.heartbeats=[],i._storage.overwrite(i._heartbeatsCache)),o})()}}function Rj(){return(new Date).toISOString().substring(0,10)}class Tkt{constructor(i){this.app=i,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return de(function*(){return!!function fj(){try{return"object"==typeof indexedDB}catch{return!1}}()&&function aRt(){return new Promise((e,i)=>{try{let t=!0;const n="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(n);r.onsuccess=()=>{r.result.close(),t||self.indexedDB.deleteDatabase(n),e(!0)},r.onupgradeneeded=()=>{t=!1},r.onerror=()=>{var s;i((null===(s=r.error)||void 0===s?void 0:s.message)||"")}}catch(t){i(t)}})}().then(()=>!0).catch(()=>!1)})()}read(){var i=this;return de(function*(){if(yield i._canUseIndexedDBPromise){const n=yield function xkt(e){return SP.apply(this,arguments)}(i.app);return n?.heartbeats?n:{heartbeats:[]}}return{heartbeats:[]}})()}overwrite(i){var t=this;return de(function*(){var n;if(yield t._canUseIndexedDBPromise){const s=yield t.read();return Mj(t.app,{lastSentHeartbeatDate:null!==(n=i.lastSentHeartbeatDate)&&void 0!==n?n:s.lastSentHeartbeatDate,heartbeats:i.heartbeats})}})()}add(i){var t=this;return de(function*(){var n;if(yield t._canUseIndexedDBPromise){const s=yield t.read();return Mj(t.app,{lastSentHeartbeatDate:null!==(n=i.lastSentHeartbeatDate)&&void 0!==n?n:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...i.heartbeats]})}})()}}function kj(e){return tS(JSON.stringify({version:2,heartbeats:e})).length}!function Ckt(e){sS(new Qy("platform-logger",i=>new ORt(i),"PRIVATE")),sS(new Qy("heartbeat",i=>new wkt(i),"PRIVATE")),hm(nS,"0.10.6",e),hm(nS,"0.10.6","esm2017"),hm("fire-js","")}("");var fm,Oj,Pj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fj={};(function(){var e;function n(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}function r(ft,dt,pt){pt||(pt=0);var bt=Array(16);if("string"==typeof dt)for(var Tt=0;16>Tt;++Tt)bt[Tt]=dt.charCodeAt(pt++)|dt.charCodeAt(pt++)<<8|dt.charCodeAt(pt++)<<16|dt.charCodeAt(pt++)<<24;else for(Tt=0;16>Tt;++Tt)bt[Tt]=dt[pt++]|dt[pt++]<<8|dt[pt++]<<16|dt[pt++]<<24;var Et=ft.g[3],Dt=(dt=ft.g[0])+(Et^(pt=ft.g[1])&((Tt=ft.g[2])^Et))+bt[0]+3614090360&4294967295;Dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=pt+(Dt<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[1]+3905402710&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[2]+606105819&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[3]+3250441966&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Et^pt&(Tt^Et))+bt[4]+4118548399&4294967295)<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[5]+1200080426&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[6]+2821735955&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[7]+4249261313&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Et^pt&(Tt^Et))+bt[8]+1770035416&4294967295)<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[9]+2336552879&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[10]+4294925233&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[11]+2304563134&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Et^pt&(Tt^Et))+bt[12]+1804603682&4294967295)<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[13]+4254626195&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[14]+2792965006&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[15]+1236535329&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[1]+4129170786&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[6]+3225465664&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[11]+643717713&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[0]+3921069994&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[5]+3593408605&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[10]+38016083&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[15]+3634488961&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[4]+3889429448&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[9]+568446438&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[14]+3275163606&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[3]+4107603335&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[8]+1163531501&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[13]+2850285829&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[2]+4243563512&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[7]+1735328473&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[12]+2368359562&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(pt^Tt^Et)+bt[5]+4294588738&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[8]+2272392833&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[11]+1839030562&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[14]+4259657740&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(pt^Tt^Et)+bt[1]+2763975236&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[4]+1272893353&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[7]+4139469664&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[10]+3200236656&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(pt^Tt^Et)+bt[13]+681279174&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[0]+3936430074&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[3]+3572445317&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[6]+76029189&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(pt^Tt^Et)+bt[9]+3654602809&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[12]+3873151461&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[15]+530742520&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[2]+3299628645&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(Tt^(pt|~Et))+bt[0]+4096336452&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[7]+1126891415&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Tt+(dt^(Et|~pt))+bt[14]+2878612391&4294967295)<<15&4294967295|Dt>>>17))+((Dt=pt+(Et^(Tt|~dt))+bt[5]+4237533241&4294967295)<<21&4294967295|Dt>>>11))+((Dt=dt+(Tt^(pt|~Et))+bt[12]+1700485571&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[3]+2399980690&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Tt+(dt^(Et|~pt))+bt[10]+4293915773&4294967295)<<15&4294967295|Dt>>>17))+((Dt=pt+(Et^(Tt|~dt))+bt[1]+2240044497&4294967295)<<21&4294967295|Dt>>>11))+((Dt=dt+(Tt^(pt|~Et))+bt[8]+1873313359&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[15]+4264355552&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Tt+(dt^(Et|~pt))+bt[6]+2734768916&4294967295)<<15&4294967295|Dt>>>17))+((Dt=pt+(Et^(Tt|~dt))+bt[13]+1309151649&4294967295)<<21&4294967295|Dt>>>11))+((Et=(dt=pt+((Dt=dt+(Tt^(pt|~Et))+bt[4]+4149444226&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[11]+3174756917&4294967295)<<10&4294967295|Dt>>>22))^((Tt=Et+((Dt=Tt+(dt^(Et|~pt))+bt[2]+718787259&4294967295)<<15&4294967295|Dt>>>17))|~dt))+bt[9]+3951481745&4294967295,ft.g[0]=ft.g[0]+dt&4294967295,ft.g[1]=ft.g[1]+(Tt+(Dt<<21&4294967295|Dt>>>11))&4294967295,ft.g[2]=ft.g[2]+Tt&4294967295,ft.g[3]=ft.g[3]+Et&4294967295}function o(ft,dt){this.h=dt;for(var pt=[],bt=!0,Tt=ft.length-1;0<=Tt;Tt--){var Et=0|ft[Tt];bt&&Et==dt||(pt[Tt]=Et,bt=!1)}this.g=pt}(function i(ft,dt){function pt(){}pt.prototype=dt.prototype,ft.D=dt.prototype,ft.prototype=new pt,ft.prototype.constructor=ft,ft.C=function(bt,Tt,Et){for(var Dt=Array(arguments.length-2),Le=2;Lethis.h?this.blockSize:2*this.blockSize)-this.h);ft[0]=128;for(var dt=1;dtdt;++dt)for(var bt=0;32>bt;bt+=8)ft[pt++]=this.g[dt]>>>bt&255;return ft};var l={};function w(ft){return-128<=ft&&128>ft?function s(ft,dt){var pt=l;return Object.prototype.hasOwnProperty.call(pt,ft)?pt[ft]:pt[ft]=dt(ft)}(ft,function(dt){return new o([0|dt],0>dt?-1:0)}):new o([0|ft],0>ft?-1:0)}function C(ft){if(isNaN(ft)||!isFinite(ft))return P;if(0>ft)return W(C(-ft));for(var dt=[],pt=1,bt=0;ft>=pt;bt++)dt[bt]=ft/pt|0,pt*=4294967296;return new o(dt,0)}var P=w(0),O=w(1),L=w(16777216);function U(ft){if(0!=ft.h)return!1;for(var dt=0;dt>>16,ft[dt]&=65535,dt++}function st(ft,dt){this.g=ft,this.h=dt}function vt(ft,dt){if(U(dt))throw Error("division by zero");if(U(ft))return new st(P,P);if(X(ft))return dt=vt(W(ft),dt),new st(W(dt.g),W(dt.h));if(X(dt))return dt=vt(ft,W(dt)),new st(W(dt.g),dt.h);if(30=bt.l(ft);)pt=_t(pt),bt=_t(bt);var Tt=Mt(pt,1),Et=Mt(bt,1);for(bt=Mt(bt,2),pt=Mt(pt,2);!U(bt);){var Dt=Et.add(bt);0>=Dt.l(ft)&&(Tt=Tt.add(pt),Et=Dt),bt=Mt(bt,1),pt=Mt(pt,1)}return dt=Z(ft,Tt.j(dt)),new st(Tt,dt)}for(Tt=P;0<=ft.l(dt);){for(pt=Math.max(1,Math.floor(ft.m()/dt.m())),bt=48>=(bt=Math.ceil(Math.log(pt)/Math.LN2))?1:Math.pow(2,bt-48),Dt=(Et=C(pt)).j(dt);X(Dt)||0>>31;return new o(pt,ft.h)}function Mt(ft,dt){var pt=dt>>5;dt%=32;for(var bt=ft.g.length-pt,Tt=[],Et=0;Et>>dt|ft.i(Et+pt+1)<<32-dt:ft.i(Et+pt);return new o(Tt,ft.h)}(e=o.prototype).m=function(){if(X(this))return-W(this).m();for(var ft=0,dt=1,pt=0;pt(ft=ft||10)||36>>0).toString(ft);if(U(pt=Tt))return Et+bt;for(;6>Et.length;)Et="0"+Et;bt=Et+bt}},e.i=function(ft){return 0>ft?0:ft>>16)+(this.i(Tt)>>>16)+(ft.i(Tt)>>>16);bt=Dt>>>16,pt[Tt]=(Dt&=65535)<<16|(Et&=65535)}return new o(pt,-2147483648&pt[pt.length-1]?-1:0)},e.j=function(ft){if(U(this)||U(ft))return P;if(X(this))return X(ft)?W(this).j(W(ft)):W(W(this).j(ft));if(X(ft))return W(this.j(W(ft)));if(0>this.l(L)&&0>ft.l(L))return C(this.m()*ft.m());for(var dt=this.g.length+ft.g.length,pt=[],bt=0;bt<2*dt;bt++)pt[bt]=0;for(bt=0;bt>>16,Dt=65535&this.i(bt),Le=ft.i(Tt)>>>16,ge=65535&ft.i(Tt);pt[2*bt+2*Tt]+=Dt*ge,rt(pt,2*bt+2*Tt),pt[2*bt+2*Tt+1]+=Et*ge,rt(pt,2*bt+2*Tt+1),pt[2*bt+2*Tt+1]+=Dt*Le,rt(pt,2*bt+2*Tt+1),pt[2*bt+2*Tt+2]+=Et*Le,rt(pt,2*bt+2*Tt+2)}for(bt=0;bt(dt=dt||10)||36Et?(Et=C(Math.pow(dt,Et)),bt=bt.j(Et).add(C(Dt))):bt=(bt=bt.j(pt)).add(C(Dt))}return bt},fm=Fj.Integer=o}).apply(typeof Pj<"u"?Pj:typeof self<"u"?self:typeof window<"u"?window:{});var Lj,Nj,qy,Bj,oS,AP,Vj,Uj,zj,aS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yu={};(function(){var e,i="function"==typeof Object.defineProperties?Object.defineProperty:function(z,ct,xt){return z==Array.prototype||z==Object.prototype||(z[ct]=xt.value),z},n=function t(z){z=["object"==typeof globalThis&&globalThis,z,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof aS&&aS];for(var ct=0;ct{throw z},0)}function Dt(){var z=Ne;let ct=null;return z.g&&(ct=z.g,z.g=z.g.next,z.g||(z.h=null),ct.next=null),ct}var ge=new class Z{constructor(ct,xt){this.i=ct,this.j=xt,this.h=0,this.g=null}get(){let ct;return 0new fe,z=>z.reset());class fe{constructor(){this.next=this.g=this.h=null}set(ct,xt){this.h=ct,this.g=xt,this.next=null}reset(){this.next=this.g=this.h=null}}let Qt,_e=!1,Ne=new class Le{constructor(){this.h=this.g=null}add(ct,xt){const It=ge.get();It.set(ct,xt),this.h?this.h.next=It:this.g=It,this.h=It}},Se=()=>{const z=l.Promise.resolve(void 0);Qt=()=>{z.then(Ei)}};var Ei=()=>{for(var z;z=Dt();){try{z.h.call(z.g)}catch(xt){Et(xt)}var ct=ge;ct.j(z),100>ct.h&&(ct.h++,z.next=ct.g,ct.g=z)}_e=!1};function Kt(){this.s=this.s,this.C=this.C}function ke(z,ct){this.type=z,this.g=this.target=ct,this.defaultPrevented=!1}Kt.prototype.s=!1,Kt.prototype.ma=function(){this.s||(this.s=!0,this.N())},Kt.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},ke.prototype.h=function(){this.defaultPrevented=!0};var Ce=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var z=!1,ct=Object.defineProperty({},"passive",{get:function(){z=!0}});try{const xt=()=>{};l.addEventListener("test",xt,ct),l.removeEventListener("test",xt,ct)}catch{}return z}();function oi(z,ct){if(ke.call(this,z?z.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,z){var xt=this.type=z.type,It=z.changedTouches&&z.changedTouches.length?z.changedTouches[0]:null;if(this.target=z.target||z.srcElement,this.g=ct,ct=z.relatedTarget){if(_t){t:{try{vt(ct.nodeName);var Zt=!0;break t}catch{}Zt=!1}Zt||(ct=null)}}else"mouseover"==xt?ct=z.fromElement:"mouseout"==xt&&(ct=z.toElement);this.relatedTarget=ct,It?(this.clientX=void 0!==It.clientX?It.clientX:It.pageX,this.clientY=void 0!==It.clientY?It.clientY:It.pageY,this.screenX=It.screenX||0,this.screenY=It.screenY||0):(this.clientX=void 0!==z.clientX?z.clientX:z.pageX,this.clientY=void 0!==z.clientY?z.clientY:z.pageY,this.screenX=z.screenX||0,this.screenY=z.screenY||0),this.button=z.button,this.key=z.key||"",this.ctrlKey=z.ctrlKey,this.altKey=z.altKey,this.shiftKey=z.shiftKey,this.metaKey=z.metaKey,this.pointerId=z.pointerId||0,this.pointerType="string"==typeof z.pointerType?z.pointerType:ui[z.pointerType]||"",this.state=z.state,this.i=z,z.defaultPrevented&&oi.aa.h.call(this)}}U(oi,ke);var ui={2:"touch",3:"pen",4:"mouse"};oi.prototype.h=function(){oi.aa.h.call(this);var z=this.i;z.preventDefault?z.preventDefault():z.returnValue=!1};var ii="closure_listenable_"+(1e6*Math.random()|0),Ft=0;function jt(z,ct,xt,It,Zt){this.listener=z,this.proxy=null,this.src=ct,this.type=xt,this.capture=!!It,this.ha=Zt,this.key=++Ft,this.da=this.fa=!1}function Xt(z){z.da=!0,z.listener=null,z.proxy=null,z.src=null,z.ha=null}function Ht(z){this.src=z,this.g={},this.h=0}function Te(z,ct){var xt=ct.type;if(xt in z.g){var pe,It=z.g[xt],Zt=Array.prototype.indexOf.call(It,ct,void 0);(pe=0<=Zt)&&Array.prototype.splice.call(It,Zt,1),pe&&(Xt(ct),0==z.g[xt].length&&(delete z.g[xt],z.h--))}}function Pt(z,ct,xt,It){for(var Zt=0;Zt>>0);function Co(z){return"function"==typeof z?z:(z[qe]||(z[qe]=function(ct){return z.handleEvent(ct)}),z[qe])}function qn(){Kt.call(this),this.i=new Ht(this),this.M=this,this.F=null}function Hn(z,ct){var xt,It=z.F;if(It)for(xt=[];It;It=It.F)xt.push(It);if(z=z.M,It=ct.type||ct,"string"==typeof ct)ct=new ke(ct,z);else if(ct instanceof ke)ct.target=ct.target||z;else{var Zt=ct;bt(ct=new ke(It,z),Zt)}if(Zt=!0,xt)for(var pe=xt.length-1;0<=pe;pe--){var li=ct.g=xt[pe];Zt=Js(li,It,!0,ct)&&Zt}if(Zt=Js(li=ct.g=z,It,!0,ct)&&Zt,Zt=Js(li,It,!1,ct)&&Zt,xt)for(pe=0;pe{z.g=null,z.i&&(z.i=!1,Ji(z))},z.l);const ct=z.h;z.h=null,z.m.apply(null,ct)}U(qn,Kt),qn.prototype[ii]=!0,qn.prototype.removeEventListener=function(z,ct,xt,It){nr(this,z,ct,xt,It)},qn.prototype.N=function(){if(qn.aa.N.call(this),this.i){var ct,z=this.i;for(ct in z.g){for(var xt=z.g[ct],It=0;ItIt.length)){var Zt=It[1];if(Array.isArray(Zt)&&!(1>Zt.length)){var pe=Zt[0];if("noop"!=pe&&"stop"!=pe&&"close"!=pe)for(var li=1;lict.length?ze:(ct=ct.slice(It,It+xt),z.C=It+xt,ct))}function Yi(z){z.S=Date.now()+z.I,Cr(z,z.I)}function Cr(z,ct){if(null!=z.B)throw Error("WatchDog timer not null");z.B=wp(O(z.ba,z),ct)}function Pa(z){z.B&&(l.clearTimeout(z.B),z.B=null)}function Hr(z){0==z.j.G||z.J||Dnt(z.j,z)}function zs(z){Pa(z);var ct=z.M;ct&&"function"==typeof ct.ma&&ct.ma(),z.M=null,vp(z.U),z.g&&(ct=z.g,z.g=null,ct.abort(),ct.ma())}function Qu(z,ct){try{var xt=z.j;if(0!=xt.G&&(xt.g==z||I4(xt.h,z)))if(!z.K&&I4(xt.h,z)&&3==xt.G){try{var It=xt.Da.g.parse(ct)}catch{It=null}if(Array.isArray(It)&&3==It.length){var Zt=It;if(0==Zt[0]){t:if(!xt.u){if(xt.g){if(!(xt.g.F+3e3Zt[2]&&xt.F&&0==xt.v&&!xt.C&&(xt.C=wp(O(xt.Za,xt),6e3));if(1>=oc(xt.h)&&xt.ca){try{xt.ca()}catch{}xt.ca=void 0}}else Sp(xt,11)}else if((z.K||xt.g==z)&&WA(xt),!rt(ct))for(Zt=xt.Da.g.parse(ct),ct=0;ctAo)&&(3!=Ao||this.g&&(this.h.h||this.g.oa()||wnt(this.g)))){this.J||4!=Ao||7==ct||bp(),Pa(this);var xt=this.g.Z();this.X=xt;e:if(ti(this)){var It=wnt(this.g);z="";var Zt=It.length,pe=4==Zu(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){zs(this),Hr(this);var li="";break e}this.h.i=new l.TextDecoder}for(ct=0;ct=z.j}function oc(z){return z.h?1:z.g?z.g.size:0}function I4(z,ct){return z.h?z.h==ct:!!z.g&&z.g.has(ct)}function R4(z,ct){z.g?z.g.add(ct):z.h=ct}function ant(z,ct){z.h&&z.h==ct?z.h=null:z.g&&z.g.has(ct)&&z.g.delete(ct)}function ont(z){if(null!=z.h)return z.i.concat(z.h.D);if(null!=z.g&&0!==z.g.size){let ct=z.i;for(const xt of z.g.values())ct=ct.concat(xt.D);return ct}return X(z.i)}function lnt(z,ct){if(z.forEach&&"function"==typeof z.forEach)z.forEach(ct,void 0);else if(w(z)||"string"==typeof z)Array.prototype.forEach.call(z,ct,void 0);else for(var xt=function RJt(z){if(z.na&&"function"==typeof z.na)return z.na();if(!z.V||"function"!=typeof z.V){if(typeof Map<"u"&&z instanceof Map)return Array.from(z.keys());if(!(typeof Set<"u"&&z instanceof Set)){if(w(z)||"string"==typeof z){var ct=[];z=z.length;for(var xt=0;xtct)throw Error("Bad port number "+ct);z.s=ct}else z.s=null}function dnt(z,ct,xt){ct instanceof rw?(z.i=ct,function BJt(z,ct){ct&&!z.j&&(wf(z),z.i=null,z.g.forEach(function(xt,It){var Zt=It.toLowerCase();It!=Zt&&(hnt(this,It),mnt(this,Zt,xt))},z)),z.j=ct}(z.i,z.h)):(xt||(ct=nw(ct,LJt)),z.i=new rw(ct,z.h))}function qr(z,ct,xt){z.i.set(ct,xt)}function VA(z){return qr(z,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),z}function iw(z,ct){return z?ct?decodeURI(z.replace(/%25/g,"%2525")):decodeURIComponent(z):""}function nw(z,ct,xt){return"string"==typeof z?(z=encodeURI(z).replace(ct,PJt),xt&&(z=z.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),z):null}function PJt(z){return"%"+((z=z.charCodeAt(0))>>4&15).toString(16)+(15&z).toString(16)}Cp.prototype.toString=function(){var z=[],ct=this.j;ct&&z.push(nw(ct,unt,!0),":");var xt=this.g;return(xt||"file"==ct)&&(z.push("//"),(ct=this.o)&&z.push(nw(ct,unt,!0),"@"),z.push(encodeURIComponent(String(xt)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(xt=this.s)&&z.push(":",String(xt))),(xt=this.l)&&(this.g&&"/"!=xt.charAt(0)&&z.push("/"),z.push(nw(xt,"/"==xt.charAt(0)?OJt:FJt,!0))),(xt=this.i.toString())&&z.push("?",xt),(xt=this.m)&&z.push("#",nw(xt,NJt)),z.join("")};var unt=/[#\/\?@]/g,FJt=/[#\?:]/g,OJt=/[#\?]/g,LJt=/[#\?@]/g,NJt=/#/g;function rw(z,ct){this.h=this.g=null,this.i=z||null,this.j=!!ct}function wf(z){z.g||(z.g=new Map,z.h=0,z.i&&function kJt(z,ct){if(z){z=z.split("&");for(var xt=0;xt{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,aw(this)),this.readyState=0},e.Sa=function(z){if(this.g&&(this.l=z,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=z.headers,this.readyState=2,ow(this)),this.g&&(this.readyState=3,ow(this),this.g)))if("arraybuffer"===this.responseType)z.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in z){if(this.j=z.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;pnt(this)}else z.text().then(this.Ra.bind(this),this.ga.bind(this))},e.Pa=function(z){if(this.g){if(this.o&&z.value)this.response.push(z.value);else if(!this.o){var ct=z.value?z.value:new Uint8Array(0);(ct=this.v.decode(ct,{stream:!z.done}))&&(this.response=this.responseText+=ct)}z.done?aw(this):ow(this),3==this.readyState&&pnt(this)}},e.Ra=function(z){this.g&&(this.response=this.responseText=z,aw(this))},e.Qa=function(z){this.g&&(this.response=z,aw(this))},e.ga=function(){this.g&&aw(this)},e.setRequestHeader=function(z,ct){this.u.append(z,ct)},e.getResponseHeader=function(z){return this.h&&this.h.get(z.toLowerCase())||""},e.getAllResponseHeaders=function(){if(!this.h)return"";const z=[],ct=this.h.entries();for(var xt=ct.next();!xt.done;)z.push((xt=xt.value)[0]+": "+xt[1]),xt=ct.next();return z.join("\r\n")},Object.defineProperty(UA.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(z){this.m=z?"include":"same-origin"}}),U(_s,qn);var HJt=/^https?$/i,WJt=["POST","PUT"];function vnt(z,ct){z.h=!1,z.g&&(z.j=!0,z.g.abort(),z.j=!1),z.l=ct,z.m=5,xnt(z),zA(z)}function xnt(z){z.A||(z.A=!0,Hn(z,"complete"),Hn(z,"error"))}function ynt(z){if(z.h&&typeof o<"u"&&(!z.v[1]||4!=Zu(z)||2!=z.Z()))if(z.u&&4==Zu(z))So(z.Ea,0,z);else if(Hn(z,"readystatechange"),4==Zu(z)){z.h=!1;try{const li=z.Z();t:switch(li){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var ct=!0;break t;default:ct=!1}var xt;if(!(xt=ct)){var It;if(It=0===li){var Zt=String(z.D).match(cnt)[1]||null;!Zt&&l.self&&l.self.location&&(Zt=l.self.location.protocol.slice(0,-1)),It=!HJt.test(Zt?Zt.toLowerCase():"")}xt=It}if(xt)Hn(z,"complete"),Hn(z,"success");else{z.m=6;try{var pe=2{}:null;z.g=null,z.v=null,ct||Hn(z,"ready");try{xt.onreadystatechange=It}catch{}}}function bnt(z){z.I&&(l.clearTimeout(z.I),z.I=null)}function Zu(z){return z.g?z.g.readyState:0}function wnt(z){try{if(!z.g)return null;if("response"in z.g)return z.g.response;switch(z.H){case"":case"text":return z.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in z.g)return z.g.mozResponseArrayBuffer}return null}catch{return null}}function lw(z,ct,xt){return xt&&xt.internalChannelParams&&xt.internalChannelParams[z]||ct}function _nt(z){this.Aa=0,this.i=[],this.j=new _p,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=lw("failFast",!1,z),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=lw("baseRetryDelayMs",5e3,z),this.cb=lw("retryDelaySeedMs",1e4,z),this.Wa=lw("forwardChannelMaxRetries",2,z),this.wa=lw("forwardChannelRequestTimeoutMs",2e4,z),this.pa=z&&z.xmlHttpFactory||void 0,this.Xa=z&&z.Tb||void 0,this.Ca=z&&z.useFetchStreams||!1,this.L=void 0,this.J=z&&z.supportsCrossDomainXhr||!1,this.K="",this.h=new Rd(z&&z.concurrentRequestLimit),this.Da=new zJt,this.P=z&&z.fastHandshake||!1,this.O=z&&z.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=z&&z.Rb||!1,z&&z.xa&&this.j.xa(),z&&z.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&z&&z.detectBufferingProxy||!1,this.ja=void 0,z&&z.longPollingTimeout&&0rr)pe=Math.max(0,Zt[Ya].g-100),Pr=!1;else try{GJt(Eo,li,"req"+rr+"_")}catch{It&&It(Eo)}}if(Pr){It=li.join("&");break t}}}return z=z.i.splice(0,xt),ct.D=z,It}function Ent(z){if(!z.g&&!z.u){z.Y=1;var ct=z.Fa;Qt||Se(),_e||(Qt(),_e=!0),Ne.add(ct,z),z.v=0}}function F4(z){return!(z.g||z.u||3<=z.v||(z.Y++,z.u=wp(O(z.Fa,z),Mnt(z,z.v)),z.v++,0))}function O4(z){null!=z.A&&(l.clearTimeout(z.A),z.A=null)}function Ant(z){z.g=new ie(z,z.j,"rpc",z.Y),null===z.m&&(z.g.H=z.o),z.g.O=0;var ct=Ku(z.qa);qr(ct,"RID","rpc"),qr(ct,"SID",z.K),qr(ct,"AID",z.T),qr(ct,"CI",z.F?"0":"1"),!z.F&&z.ja&&qr(ct,"TO",z.ja),qr(ct,"TYPE","xmlhttp"),cw(z,ct),z.m&&z.o&&k4(ct,z.m,z.o),z.L&&(z.g.I=z.L);var xt=z.g;z=z.ia,xt.L=1,xt.v=VA(Ku(ct)),xt.m=null,xt.P=!0,yi(xt,z)}function WA(z){null!=z.C&&(l.clearTimeout(z.C),z.C=null)}function Dnt(z,ct){var xt=null;if(z.g==ct){WA(z),O4(z),z.g=null;var It=2}else{if(!I4(z.h,ct))return;xt=ct.D,ant(z.h,ct),It=1}if(0!=z.G)if(ct.o)if(1==It){xt=ct.m?ct.m.length:0,ct=Date.now()-ct.F;var Zt=z.B;Hn(It=D0(),new M0(It,xt)),HA(z)}else Ent(z);else if(3==(Zt=ct.s)||0==Zt&&0=z.h.j-(z.s?1:0)||(z.s?(z.i=ct.D.concat(z.i),0):1==z.G||2==z.G||z.B>=(z.Va?0:z.Wa)||(z.s=wp(O(z.Ga,z,ct),Mnt(z,z.B)),z.B++,0)))}(z,ct)||2==It&&F4(z)))switch(xt&&0{It.abort(),_f(0,0,!1,ct)},1e4);fetch(z,{signal:It.signal}).then(pe=>{clearTimeout(Zt),_f(0,0,!!pe.ok,ct)}).catch(()=>{clearTimeout(Zt),_f(0,0,!1,ct)})}(It.toString(),xt)}else ja(2);z.G=0,z.l&&z.l.sa(ct),Int(z),Tnt(z)}function Int(z){if(z.G=0,z.ka=[],z.l){const ct=ont(z.h);(0!=ct.length||0!=z.i.length)&&(W(z.ka,ct),W(z.ka,z.i),z.h.i.length=0,X(z.i),z.i.length=0),z.l.ra()}}function Rnt(z,ct,xt){var It=xt instanceof Cp?Ku(xt):new Cp(xt);if(""!=It.g)ct&&(It.g=ct+"."+It.g),BA(It,It.s);else{var Zt=l.location;It=Zt.protocol,ct=ct?ct+"."+Zt.hostname:Zt.hostname,Zt=+Zt.port;var pe=new Cp(null);It&&NA(pe,It),ct&&(pe.g=ct),Zt&&BA(pe,Zt),xt&&(pe.l=xt),It=pe}return ct=z.ya,(xt=z.D)&&ct&&qr(It,xt,ct),qr(It,"VER",z.la),cw(z,It),It}function knt(z,ct,xt){if(ct&&!z.J)throw Error("Can't create secondary domain capable XhrIo object.");return(ct=new _s(z.Ca&&!z.pa?new sw({eb:xt}):z.pa)).Ha(z.J),ct}function Pnt(){}function XA(){}function Pl(z,ct){qn.call(this),this.g=new _nt(ct),this.l=z,this.h=ct&&ct.messageUrlParams||null,z=ct&&ct.messageHeaders||null,ct&&ct.clientProtocolHeaderRequired&&(z?z["X-Client-Protocol"]="webchannel":z={"X-Client-Protocol":"webchannel"}),this.g.o=z,z=ct&&ct.initMessageHeaders||null,ct&&ct.messageContentType&&(z?z["X-WebChannel-Content-Type"]=ct.messageContentType:z={"X-WebChannel-Content-Type":ct.messageContentType}),ct&&ct.va&&(z?z["X-WebChannel-Client-Profile"]=ct.va:z={"X-WebChannel-Client-Profile":ct.va}),this.g.S=z,(z=ct&&ct.Sb)&&!rt(z)&&(this.g.m=z),this.v=ct&&ct.supportsCrossDomainXhr||!1,this.u=ct&&ct.sendRawJson||!1,(ct=ct&&ct.httpSessionIdParam)&&!rt(ct)&&(this.g.D=ct,null!==(z=this.h)&&ct in z&&ct in(z=this.h)&&delete z[ct]),this.j=new k0(this)}function Fnt(z){bf.call(this),z.__headers__&&(this.headers=z.__headers__,this.statusCode=z.__status__,delete z.__headers__,delete z.__status__);var ct=z.__sm__;if(ct){t:{for(const xt in ct){z=xt;break t}z=void 0}(this.i=z)&&(z=this.i,ct=null!==ct&&z in ct?ct[z]:void 0),this.data=ct}else this.data=z}function Ont(){ew.call(this),this.status=1}function k0(z){this.g=z}(e=_s.prototype).Ha=function(z){this.J=z},e.ea=function(z,ct,xt,It){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+z);ct=ct?ct.toUpperCase():"GET",this.D=z,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():se.g(),this.v=function tw(z){return z.h||(z.h=z.i())}(this.o?this.o:se),this.g.onreadystatechange=O(this.Ea,this);try{this.B=!0,this.g.open(ct,String(z),!0),this.B=!1}catch(pe){return void vnt(this,pe)}if(z=xt||"",xt=new Map(this.headers),It)if(Object.getPrototypeOf(It)===Object.prototype)for(var Zt in It)xt.set(Zt,It[Zt]);else{if("function"!=typeof It.keys||"function"!=typeof It.get)throw Error("Unknown input type for opt_headers: "+String(It));for(const pe of It.keys())xt.set(pe,It.get(pe))}It=Array.from(xt.keys()).find(pe=>"content-type"==pe.toLowerCase()),Zt=l.FormData&&z instanceof l.FormData,!(0<=Array.prototype.indexOf.call(WJt,ct,void 0))||It||Zt||xt.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[pe,li]of xt)this.g.setRequestHeader(pe,li);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{bnt(this),this.u=!0,this.g.send(z),this.u=!1}catch(pe){vnt(this,pe)}},e.abort=function(z){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=z||7,Hn(this,"complete"),Hn(this,"abort"),zA(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),zA(this,!0)),_s.aa.N.call(this)},e.Ea=function(){this.s||(this.B||this.u||this.j?ynt(this):this.bb())},e.bb=function(){ynt(this)},e.isActive=function(){return!!this.g},e.Z=function(){try{return 2=this.R)){var z=2*this.R;this.j.info("BP detection timer enabled: "+z),this.A=wp(O(this.ab,this),z)}},e.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,ja(10),GA(this),Ant(this))},e.Za=function(){null!=this.C&&(this.C=null,GA(this),F4(this),ja(19))},e.fb=function(z){z?(this.j.info("Successfully pinged google.com"),ja(2)):(this.j.info("Failed to ping google.com"),ja(1))},e.isActive=function(){return!!this.l&&this.l.isActive(this)},(e=Pnt.prototype).ua=function(){},e.ta=function(){},e.sa=function(){},e.ra=function(){},e.isActive=function(){return!0},e.Na=function(){},XA.prototype.g=function(z,ct){return new Pl(z,ct)},U(Pl,qn),Pl.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},Pl.prototype.close=function(){P4(this.g)},Pl.prototype.o=function(z){var ct=this.g;if("string"==typeof z){var xt={};xt.__data__=z,z=xt}else this.u&&((xt={}).__data__=ac(z),z=xt);ct.i.push(new Tp(ct.Ya++,z)),3==ct.G&&HA(ct)},Pl.prototype.N=function(){this.g.l=null,delete this.j,P4(this.g),delete this.g,Pl.aa.N.call(this)},U(Fnt,bf),U(Ont,ew),U(k0,Pnt),k0.prototype.ua=function(){Hn(this.g,"a")},k0.prototype.ta=function(z){Hn(this.g,new Fnt(z))},k0.prototype.sa=function(z){Hn(this.g,new Ont)},k0.prototype.ra=function(){Hn(this.g,"b")},XA.prototype.createWebChannel=XA.prototype.g,Pl.prototype.send=Pl.prototype.o,Pl.prototype.open=Pl.prototype.m,Pl.prototype.close=Pl.prototype.close,zj=yu.createWebChannelTransport=function(){return new XA},Uj=yu.getStatEventTarget=function(){return D0()},Vj=yu.Event=$u,AP=yu.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Lt.NO_ERROR=0,Lt.TIMEOUT=8,Lt.HTTP_ERROR=6,oS=yu.ErrorCode=Lt,Nt.COMPLETE="complete",Bj=yu.EventType=Nt,PA.EventType=yp,yp.OPEN="a",yp.CLOSE="b",yp.ERROR="c",yp.MESSAGE="d",qn.prototype.listen=qn.prototype.K,qy=yu.WebChannel=PA,Nj=yu.FetchXmlHttpFactory=sw,_s.prototype.listenOnce=_s.prototype.L,_s.prototype.getLastError=_s.prototype.Ka,_s.prototype.getLastErrorCode=_s.prototype.Ba,_s.prototype.getStatus=_s.prototype.Z,_s.prototype.getResponseJson=_s.prototype.Oa,_s.prototype.getResponseText=_s.prototype.oa,_s.prototype.send=_s.prototype.ea,_s.prototype.setWithCredentials=_s.prototype.Ha,Lj=yu.XhrIo=_s}).apply(typeof aS<"u"?aS:typeof self<"u"?self:typeof window<"u"?window:{});const Gj="@firebase/firestore";class Ea{constructor(i){this.uid=i}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(i){return i.uid===this.uid}}Ea.UNAUTHENTICATED=new Ea(null),Ea.GOOGLE_CREDENTIALS=new Ea("google-credentials-uid"),Ea.FIRST_PARTY=new Ea("first-party-uid"),Ea.MOCK_USER=new Ea("mock-user");let mv="10.12.3";const Uh=new xj("@firebase/firestore");function pv(){return Uh.logLevel}function Fe(e,...i){if(Uh.logLevel<=jn.DEBUG){const t=i.map(DP);Uh.debug(`Firestore (${mv}): ${e}`,...t)}}function ks(e,...i){if(Uh.logLevel<=jn.ERROR){const t=i.map(DP);Uh.error(`Firestore (${mv}): ${e}`,...t)}}function _l(e,...i){if(Uh.logLevel<=jn.WARN){const t=i.map(DP);Uh.warn(`Firestore (${mv}): ${e}`,...t)}}function DP(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return e}}function gi(e="Unexpected state"){const i=`FIRESTORE (${mv}) INTERNAL ASSERTION FAILED: `+e;throw ks(i),new Error(i)}function Ai(e,i){e||gi()}function ai(e,i){return e}const he={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Oe extends fv{constructor(i,t){super(i,t),this.code=i,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class ha{constructor(){this.promise=new Promise((i,t)=>{this.resolve=i,this.reject=t})}}class Hj{constructor(i,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${i}`)}}class Skt{getToken(){return Promise.resolve(null)}invalidateToken(){}start(i,t){i.enqueueRetryable(()=>t(Ea.UNAUTHENTICATED))}shutdown(){}}class Ekt{constructor(i){this.token=i,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(i,t){this.changeListener=t,i.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class Akt{constructor(i){this.t=i,this.currentUser=Ea.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(i,t){var n=this;let r=this.i;const s=C=>this.i!==r?(r=this.i,t(C)):Promise.resolve();let o=new ha;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new ha,i.enqueueRetryable(()=>s(this.currentUser))};const l=()=>{const C=o;i.enqueueRetryable(de(function*(){yield C.promise,yield s(n.currentUser)}))},w=C=>{Fe("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=C,this.auth.addAuthTokenListener(this.o),l()};this.t.onInit(C=>w(C)),setTimeout(()=>{if(!this.auth){const C=this.t.getImmediate({optional:!0});C?w(C):(Fe("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new ha)}},0),l()}getToken(){const i=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(n=>this.i!==i?(Fe("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):n?(Ai("string"==typeof n.accessToken),new Hj(n.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const i=this.auth&&this.auth.getUid();return Ai(null===i||"string"==typeof i),new Ea(i)}}class Dkt{constructor(i,t,n){this.l=i,this.h=t,this.P=n,this.type="FirstParty",this.user=Ea.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const i=this.T();return i&&this.I.set("Authorization",i),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class Mkt{constructor(i,t,n){this.l=i,this.h=t,this.P=n}getToken(){return Promise.resolve(new Dkt(this.l,this.h,this.P))}start(i,t){i.enqueueRetryable(()=>t(Ea.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Wj{constructor(i){this.value=i,this.type="AppCheck",this.headers=new Map,i&&i.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Ikt{constructor(i){this.A=i,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(i,t){const n=s=>{null!=s.error&&Fe("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,Fe("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?t(s.token):Promise.resolve()};this.o=s=>{i.enqueueRetryable(()=>n(s))};const r=s=>{Fe("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>r(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?r(s):Fe("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const i=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(i).then(t=>t?(Ai("string"==typeof t.token),this.R=t.token,new Wj(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function Rkt(e){const i=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(e);if(i&&"function"==typeof i.getRandomValues)i.getRandomValues(t);else for(let n=0;ni?1:0}function gv(e,i,t){return e.length===i.length&&e.every((n,r)=>t(n,i[r]))}class ns{constructor(i,t){if(this.seconds=i,this.nanoseconds=t,t<0)throw new Oe(he.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new Oe(he.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(i<-62135596800)throw new Oe(he.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i);if(i>=253402300800)throw new Oe(he.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i)}static now(){return ns.fromMillis(Date.now())}static fromDate(i){return ns.fromMillis(i.getTime())}static fromMillis(i){const t=Math.floor(i/1e3),n=Math.floor(1e6*(i-1e3*t));return new ns(t,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(i){return this.seconds===i.seconds?tn(this.nanoseconds,i.nanoseconds):tn(this.seconds,i.seconds)}isEqual(i){return i.seconds===this.seconds&&i.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class Ii{constructor(i){this.timestamp=i}static fromTimestamp(i){return new Ii(i)}static min(){return new Ii(new ns(0,0))}static max(){return new Ii(new ns(253402300799,999999999))}compareTo(i){return this.timestamp._compareTo(i.timestamp)}isEqual(i){return this.timestamp.isEqual(i.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class tb{constructor(i,t,n){void 0===t?t=0:t>i.length&&gi(),void 0===n?n=i.length-t:n>i.length-t&&gi(),this.segments=i,this.offset=t,this.len=n}get length(){return this.len}isEqual(i){return 0===tb.comparator(this,i)}child(i){const t=this.segments.slice(this.offset,this.limit());return i instanceof tb?i.forEach(n=>{t.push(n)}):t.push(i),this.construct(t)}limit(){return this.offset+this.length}popFirst(i){return this.construct(this.segments,this.offset+(i=void 0===i?1:i),this.length-i)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(i){return this.segments[this.offset+i]}isEmpty(){return 0===this.length}isPrefixOf(i){if(i.lengtho)return 1}return i.lengtht.length?1:0}}class Bn extends tb{construct(i,t,n){return new Bn(i,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...i){const t=[];for(const n of i){if(n.indexOf("//")>=0)throw new Oe(he.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(r=>r.length>0))}return new Bn(t)}static emptyPath(){return new Bn([])}}const kkt=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class rs extends tb{construct(i,t,n){return new rs(i,t,n)}static isValidIdentifier(i){return kkt.test(i)}canonicalString(){return this.toArray().map(i=>(i=i.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),rs.isValidIdentifier(i)||(i="`"+i+"`"),i)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new rs(["__name__"])}static fromServerFormat(i){const t=[];let n="",r=0;const s=()=>{if(0===n.length)throw new Oe(he.INVALID_ARGUMENT,`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let o=!1;for(;r=2&&this.path.get(this.path.length-2)===i}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(i){return null!==i&&0===Bn.comparator(this.path,i.path)}toString(){return this.path.toString()}static comparator(i,t){return Bn.comparator(i.path,t.path)}static isDocumentKey(i){return i.length%2==0}static fromSegments(i){return new di(new Bn(i.slice()))}}class Tl{constructor(i,t,n){this.readTime=i,this.documentKey=t,this.largestBatchId=n}static min(){return new Tl(Ii.min(),di.empty(),-1)}static max(){return new Tl(Ii.max(),di.empty(),-1)}}function IP(e,i){let t=e.readTime.compareTo(i.readTime);return 0!==t?t:(t=di.comparator(e.documentKey,i.documentKey),0!==t?t:tn(e.largestBatchId,i.largestBatchId))}const Qj="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Kj{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(i){this.onCommittedListeners.push(i)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(i=>i())}}function zh(e){return RP.apply(this,arguments)}function RP(){return(RP=de(function*(e){if(e.code!==he.FAILED_PRECONDITION||e.message!==Qj)throw e;Fe("LocalStore","Unexpectedly lost primary lease")})).apply(this,arguments)}class te{constructor(i){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,i(t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)},t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)})}catch(i){return this.next(void 0,i)}next(i,t){return this.callbackAttached&&gi(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(i,this.result):new te((n,r)=>{this.nextCallback=s=>{this.wrapSuccess(i,s).next(n,r)},this.catchCallback=s=>{this.wrapFailure(t,s).next(n,r)}})}toPromise(){return new Promise((i,t)=>{this.next(i,t)})}wrapUserFunction(i){try{const t=i();return t instanceof te?t:te.resolve(t)}catch(t){return te.reject(t)}}wrapSuccess(i,t){return i?this.wrapUserFunction(()=>i(t)):te.resolve(t)}wrapFailure(i,t){return i?this.wrapUserFunction(()=>i(t)):te.reject(t)}static resolve(i){return new te((t,n)=>{t(i)})}static reject(i){return new te((t,n)=>{n(i)})}static waitFor(i){return new te((t,n)=>{let r=0,s=0,o=!1;i.forEach(l=>{++r,l.next(()=>{++s,o&&s===r&&t()},w=>n(w))}),o=!0,s===r&&t()})}static or(i){let t=te.resolve(!1);for(const n of i)t=t.next(r=>r?te.resolve(r):n());return t}static forEach(i,t){const n=[];return i.forEach((r,s)=>{n.push(t.call(this,r,s))}),this.waitFor(n)}static mapArray(i,t){return new te((n,r)=>{const s=i.length,o=new Array(s);let l=0;for(let w=0;w{o[C]=M,++l,l===s&&n(o)},M=>r(M))}})}static doWhile(i,t){return new te((n,r)=>{const s=()=>{!0===i()?t().next(()=>{s()},r):n()};s()})}}function Gh(e){return"IndexedDbTransactionError"===e.name}let Cl=(()=>{class e{constructor(t,n){this.previousValue=t,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.se&&this.se(t),t}}return e.oe=-1,e})();function ib(e){return null==e}function nb(e){return 0===e&&1/e==-1/0}function oY(e){let i=0;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&i++;return i}function Hh(e,i){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&i(t,e[t])}function cY(e){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i))return!1;return!0}class zr{constructor(i,t){this.comparator=i,this.root=t||Ua.EMPTY}insert(i,t){return new zr(this.comparator,this.root.insert(i,t,this.comparator).copy(null,null,Ua.BLACK,null,null))}remove(i){return new zr(this.comparator,this.root.remove(i,this.comparator).copy(null,null,Ua.BLACK,null,null))}get(i){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(i,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(i){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(i,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(i){return this.root.inorderTraversal(i)}forEach(i){this.inorderTraversal((t,n)=>(i(t,n),!1))}toString(){const i=[];return this.inorderTraversal((t,n)=>(i.push(`${t}:${n}`),!1)),`{${i.join(", ")}}`}reverseTraversal(i){return this.root.reverseTraversal(i)}getIterator(){return new dS(this.root,null,this.comparator,!1)}getIteratorFrom(i){return new dS(this.root,i,this.comparator,!1)}getReverseIterator(){return new dS(this.root,null,this.comparator,!0)}getReverseIteratorFrom(i){return new dS(this.root,i,this.comparator,!0)}}class dS{constructor(i,t,n,r){this.isReverse=r,this.nodeStack=[];let s=1;for(;!i.isEmpty();)if(s=t?n(i.key,t):1,t&&r&&(s*=-1),s<0)i=this.isReverse?i.left:i.right;else{if(0===s){this.nodeStack.push(i);break}this.nodeStack.push(i),i=this.isReverse?i.right:i.left}}getNext(){let i=this.nodeStack.pop();const t={key:i.key,value:i.value};if(this.isReverse)for(i=i.left;!i.isEmpty();)this.nodeStack.push(i),i=i.right;else for(i=i.right;!i.isEmpty();)this.nodeStack.push(i),i=i.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const i=this.nodeStack[this.nodeStack.length-1];return{key:i.key,value:i.value}}}class Ua{constructor(i,t,n,r,s){this.key=i,this.value=t,this.color=n??Ua.RED,this.left=r??Ua.EMPTY,this.right=s??Ua.EMPTY,this.size=this.left.size+1+this.right.size}copy(i,t,n,r,s){return new Ua(i??this.key,t??this.value,n??this.color,r??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(i){return this.left.inorderTraversal(i)||i(this.key,this.value)||this.right.inorderTraversal(i)}reverseTraversal(i){return this.right.reverseTraversal(i)||i(this.key,this.value)||this.left.reverseTraversal(i)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(i,t,n){let r=this;const s=n(i,r.key);return r=s<0?r.copy(null,null,null,r.left.insert(i,t,n),null):0===s?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(i,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return Ua.EMPTY;let i=this;return i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.removeMin(),null),i.fixUp()}remove(i,t){let n,r=this;if(t(i,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(i,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(i,r.key)){if(r.right.isEmpty())return Ua.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(i,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let i=this;return i.right.isRed()&&!i.left.isRed()&&(i=i.rotateLeft()),i.left.isRed()&&i.left.left.isRed()&&(i=i.rotateRight()),i.left.isRed()&&i.right.isRed()&&(i=i.colorFlip()),i}moveRedLeft(){let i=this.colorFlip();return i.right.left.isRed()&&(i=i.copy(null,null,null,null,i.right.rotateRight()),i=i.rotateLeft(),i=i.colorFlip()),i}moveRedRight(){let i=this.colorFlip();return i.left.left.isRed()&&(i=i.rotateRight(),i=i.colorFlip()),i}rotateLeft(){const i=this.copy(null,null,Ua.RED,null,this.right.left);return this.right.copy(null,null,this.color,i,null)}rotateRight(){const i=this.copy(null,null,Ua.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,i)}colorFlip(){const i=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,i,t)}checkMaxDepth(){const i=this.check();return Math.pow(2,i)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw gi();const i=this.left.check();if(i!==this.right.check())throw gi();return i+(this.isRed()?0:1)}}Ua.EMPTY=null,Ua.RED=!0,Ua.BLACK=!1,Ua.EMPTY=new class{constructor(){this.size=0}get key(){throw gi()}get value(){throw gi()}get color(){throw gi()}get left(){throw gi()}get right(){throw gi()}copy(i,t,n,r,s){return this}insert(i,t,n){return new Ua(i,t)}remove(i,t){return this}isEmpty(){return!0}inorderTraversal(i){return!1}reverseTraversal(i){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class Dr{constructor(i){this.comparator=i,this.data=new zr(this.comparator)}has(i){return null!==this.data.get(i)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(i){return this.data.indexOf(i)}forEach(i){this.data.inorderTraversal((t,n)=>(i(t),!1))}forEachInRange(i,t){const n=this.data.getIteratorFrom(i[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,i[1])>=0)return;t(r.key)}}forEachWhile(i,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!i(n.getNext().key))return}firstAfterOrEqual(i){const t=this.data.getIteratorFrom(i);return t.hasNext()?t.getNext().key:null}getIterator(){return new dY(this.data.getIterator())}getIteratorFrom(i){return new dY(this.data.getIteratorFrom(i))}add(i){return this.copy(this.data.remove(i).insert(i,!0))}delete(i){return this.has(i)?this.copy(this.data.remove(i)):this}isEmpty(){return this.data.isEmpty()}unionWith(i){let t=this;return t.size{t=t.add(n)}),t}isEqual(i){if(!(i instanceof Dr)||this.size!==i.size)return!1;const t=this.data.getIterator(),n=i.data.getIterator();for(;t.hasNext();){const r=t.getNext().key,s=n.getNext().key;if(0!==this.comparator(r,s))return!1}return!0}toArray(){const i=[];return this.forEach(t=>{i.push(t)}),i}toString(){const i=[];return this.forEach(t=>i.push(t)),"SortedSet("+i.toString()+")"}copy(i){const t=new Dr(this.comparator);return t.data=i,t}}class dY{constructor(i){this.iter=i}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class qo{constructor(i){this.fields=i,i.sort(rs.comparator)}static empty(){return new qo([])}unionWith(i){let t=new Dr(rs.comparator);for(const n of this.fields)t=t.add(n);for(const n of i)t=t.add(n);return new qo(t.toArray())}covers(i){for(const t of this.fields)if(t.isPrefixOf(i))return!0;return!1}isEqual(i){return gv(this.fields,i.fields,(t,n)=>t.isEqual(n))}}class uY extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class fa{constructor(i){this.binaryString=i}static fromBase64String(i){const t=function(r){try{return atob(r)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new uY("Invalid base64 string: "+s):s}}(i);return new fa(t)}static fromUint8Array(i){const t=function(r){let s="";for(let o=0;oifd(t,i))}function jh(e,i){if(e===i)return 0;const t=Xh(e),n=Xh(i);if(t!==n)return tn(t,n);switch(t){case 0:case 9007199254740991:return 0;case 1:return tn(e.booleanValue,i.booleanValue);case 2:return function(s,o){const l=ys(s.integerValue||s.doubleValue),w=ys(o.integerValue||o.doubleValue);return lw?1:l===w?0:isNaN(l)?isNaN(w)?0:-1:1}(e,i);case 3:return hY(e.timestampValue,i.timestampValue);case 4:return hY(rb(e),rb(i));case 5:return tn(e.stringValue,i.stringValue);case 6:return function(s,o){const l=wu(s),w=wu(o);return l.compareTo(w)}(e.bytesValue,i.bytesValue);case 7:return function(s,o){const l=s.split("/"),w=o.split("/");for(let C=0;Ci.mapValue.fields[t]=ob(n)),i}if(e.arrayValue){const i={arrayValue:{values:[]}};for(let t=0;t<(e.arrayValue.values||[]).length;++t)i.arrayValue.values[t]=ob(e.arrayValue.values[t]);return i}return Object.assign({},e)}function pY(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class za{constructor(i){this.value=i}static empty(){return new za({mapValue:{}})}field(i){if(i.isEmpty())return this.value;{let t=this.value;for(let n=0;n{if(!t.isImmediateParentOf(l)){const w=this.getFieldsMap(t);this.applyChanges(w,n,r),n={},r=[],t=l.popLast()}o?n[l.lastSegment()]=ob(o):r.push(l.lastSegment())});const s=this.getFieldsMap(t);this.applyChanges(s,n,r)}delete(i){const t=this.field(i.popLast());pS(t)&&t.mapValue.fields&&delete t.mapValue.fields[i.lastSegment()]}isEqual(i){return fd(this.value,i.value)}getFieldsMap(i){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;ni[r]=s);for(const r of n)delete i[r]}clone(){return new za(ob(this.value))}}function xY(e){const i=[];return Hh(e.fields,(t,n)=>{const r=new rs([t]);if(pS(n)){const s=xY(n.mapValue).fields;if(0===s.length)i.push(r);else for(const o of s)i.push(r.child(o))}else i.push(r)}),new qo(i)}class $r{constructor(i,t,n,r,s,o,l){this.key=i,this.documentType=t,this.version=n,this.readTime=r,this.createTime=s,this.data=o,this.documentState=l}static newInvalidDocument(i){return new $r(i,0,Ii.min(),Ii.min(),Ii.min(),za.empty(),0)}static newFoundDocument(i,t,n,r){return new $r(i,1,t,Ii.min(),n,r,0)}static newNoDocument(i,t){return new $r(i,2,t,Ii.min(),Ii.min(),za.empty(),0)}static newUnknownDocument(i,t){return new $r(i,3,t,Ii.min(),Ii.min(),za.empty(),2)}convertToFoundDocument(i,t){return!this.createTime.isEqual(Ii.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=i),this.version=i,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(i){return this.version=i,this.documentType=2,this.data=za.empty(),this.documentState=0,this}convertToUnknownDocument(i){return this.version=i,this.documentType=3,this.data=za.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ii.min(),this}setReadTime(i){return this.readTime=i,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(i){return i instanceof $r&&this.key.isEqual(i.key)&&this.version.isEqual(i.version)&&this.documentType===i.documentType&&this.documentState===i.documentState&&this.data.isEqual(i.data)}mutableCopy(){return new $r(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class Yh{constructor(i,t){this.position=i,this.inclusive=t}}function yY(e,i,t){let n=0;for(let r=0;r":return i>0;case">=":return i>=0;default:return gi()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class wr extends wY{constructor(i,t){super(),this.filters=i,this.op=t,this.ae=null}static create(i,t){return new wr(i,t)}matches(i){return wv(this)?void 0===this.filters.find(t=>!t.matches(i)):void 0!==this.filters.find(t=>t.matches(i))}getFlattenedFilters(){return null!==this.ae||(this.ae=this.filters.reduce((i,t)=>i.concat(t.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function wv(e){return"and"===e.op}function NP(e){return function _Y(e){for(const i of e.filters)if(i instanceof wr)return!1;return!0}(e)&&wv(e)}function BP(e){if(e instanceof Vn)return e.field.canonicalString()+e.op.toString()+bv(e.value);if(NP(e))return e.filters.map(i=>BP(i)).join(",");{const i=e.filters.map(t=>BP(t)).join(",");return`${e.op}(${i})`}}function TY(e,i){return e instanceof Vn?(n=e,(r=i)instanceof Vn&&n.op===r.op&&n.field.isEqual(r.field)&&fd(n.value,r.value)):e instanceof wr?function(n,r){return r instanceof wr&&n.op===r.op&&n.filters.length===r.filters.length&&n.filters.reduce((s,o,l)=>s&&TY(o,r.filters[l]),!0)}(e,i):void gi();var n,r}function SY(e){return e instanceof Vn?`${(t=e).field.canonicalString()} ${t.op} ${bv(t.value)}`:e instanceof wr?function(t){return t.op.toString()+" {"+t.getFilters().map(SY).join(" ,")+"}"}(e):"Filter";var t}class lPt extends Vn{constructor(i,t,n){super(i,t,n),this.key=di.fromName(n.referenceValue)}matches(i){const t=di.comparator(i.key,this.key);return this.matchesComparison(t)}}class cPt extends Vn{constructor(i,t){super(i,"in",t),this.keys=EY(0,t)}matches(i){return this.keys.some(t=>t.isEqual(i.key))}}class dPt extends Vn{constructor(i,t){super(i,"not-in",t),this.keys=EY(0,t)}matches(i){return!this.keys.some(t=>t.isEqual(i.key))}}function EY(e,i){var t;return((null===(t=i.arrayValue)||void 0===t?void 0:t.values)||[]).map(n=>di.fromName(n.referenceValue))}class uPt extends Vn{constructor(i,t){super(i,"array-contains",t)}matches(i){const t=i.data.field(this.field);return ab(t)&&sb(t.arrayValue,this.value)}}class AY extends Vn{constructor(i,t){super(i,"in",t)}matches(i){const t=i.data.field(this.field);return null!==t&&sb(this.value.arrayValue,t)}}class hPt extends Vn{constructor(i,t){super(i,"not-in",t)}matches(i){if(sb(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=i.data.field(this.field);return null!==t&&!sb(this.value.arrayValue,t)}}class fPt extends Vn{constructor(i,t){super(i,"array-contains-any",t)}matches(i){const t=i.data.field(this.field);return!(!ab(t)||!t.arrayValue.values)&&t.arrayValue.values.some(n=>sb(this.value.arrayValue,n))}}class mPt{constructor(i,t=null,n=[],r=[],s=null,o=null,l=null){this.path=i,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=s,this.startAt=o,this.endAt=l,this.ue=null}}function VP(e,i=null,t=[],n=[],r=null,s=null,o=null){return new mPt(e,i,t,n,r,s,o)}function ym(e){const i=ai(e);if(null===i.ue){let t=i.path.canonicalString();null!==i.collectionGroup&&(t+="|cg:"+i.collectionGroup),t+="|f:",t+=i.filters.map(n=>BP(n)).join(","),t+="|ob:",t+=i.orderBy.map(n=>{return(s=n).field.canonicalString()+s.dir;var s}).join(","),ib(i.limit)||(t+="|l:",t+=i.limit),i.startAt&&(t+="|lb:",t+=i.startAt.inclusive?"b:":"a:",t+=i.startAt.position.map(n=>bv(n)).join(",")),i.endAt&&(t+="|ub:",t+=i.endAt.inclusive?"a:":"b:",t+=i.endAt.position.map(n=>bv(n)).join(",")),i.ue=t}return i.ue}function cb(e,i){if(e.limit!==i.limit||e.orderBy.length!==i.orderBy.length)return!1;for(let t=0;t0?i.explicitOrderBy[i.explicitOrderBy.length-1].dir:"asc";(function(o){let l=new Dr(rs.comparator);return o.filters.forEach(w=>{w.getFlattenedFilters().forEach(C=>{C.isInequality()&&(l=l.add(C.field))})}),l})(i).forEach(s=>{t.has(s.canonicalString())||s.isKeyField()||i.ce.push(new lb(s,n))}),t.has(rs.keyField().canonicalString())||i.ce.push(new lb(rs.keyField(),n))}return i.ce}function so(e){const i=ai(e);return i.le||(i.le=function PY(e,i){if("F"===e.limitType)return VP(e.path,e.collectionGroup,i,e.filters,e.limit,e.startAt,e.endAt);{i=i.map(r=>new lb(r.field,"desc"===r.dir?"asc":"desc"));const t=e.endAt?new Yh(e.endAt.position,e.endAt.inclusive):null,n=e.startAt?new Yh(e.startAt.position,e.startAt.inclusive):null;return VP(e.path,e.collectionGroup,i,e.filters,e.limit,t,n)}}(i,Tv(e))),i.le}function zP(e,i){const t=e.filters.concat([i]);return new _u(e.path,e.collectionGroup,e.explicitOrderBy.slice(),t,e.limit,e.limitType,e.startAt,e.endAt)}function xS(e,i,t){return new _u(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),i,t,e.startAt,e.endAt)}function db(e,i){return cb(so(e),so(i))&&e.limitType===i.limitType}function FY(e){return`${ym(so(e))}|lt:${e.limitType}`}function Cv(e){return`Query(target=${function(t){let n=t.path.canonicalString();return null!==t.collectionGroup&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(r=>SY(r)).join(", ")}]`),ib(t.limit)||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(r=>{return`${(o=r).field.canonicalString()} (${o.dir})`;var o}).join(", ")}]`),t.startAt&&(n+=", startAt: ",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map(r=>bv(r)).join(",")),t.endAt&&(n+=", endAt: ",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map(r=>bv(r)).join(",")),`Target(${n})`}(so(e))}; limitType=${e.limitType})`}function ub(e,i){return i.isFoundDocument()&&function(n,r){const s=r.key.path;return null!==n.collectionGroup?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(s):di.isDocumentKey(n.path)?n.path.isEqual(s):n.path.isImmediateParentOf(s)}(e,i)&&function(n,r){for(const s of Tv(n))if(!s.field.isKeyField()&&null===r.data.field(s.field))return!1;return!0}(e,i)&&function(n,r){for(const s of n.filters)if(!s.matches(r))return!1;return!0}(e,i)&&(r=i,!((n=e).startAt&&!function(o,l,w){const C=yY(o,l,w);return o.inclusive?C<=0:C<0}(n.startAt,Tv(n),r)||n.endAt&&!function(o,l,w){const C=yY(o,l,w);return o.inclusive?C>=0:C>0}(n.endAt,Tv(n),r)));var n,r}function LY(e){return(i,t)=>{let n=!1;for(const r of Tv(e)){const s=pPt(r,i,t);if(0!==s)return s;n=n||r.field.isKeyField()}return 0}}function pPt(e,i,t){const n=e.field.isKeyField()?di.comparator(i.key,t.key):function(s,o,l){const w=o.data.field(s),C=l.data.field(s);return null!==w&&null!==C?jh(w,C):gi()}(e.field,i,t);switch(e.dir){case"asc":return n;case"desc":return-1*n;default:return gi()}}class Tu{constructor(i,t){this.mapKeyFn=i,this.equalsFn=t,this.inner={},this.innerSize=0}get(i){const t=this.mapKeyFn(i),n=this.inner[t];if(void 0!==n)for(const[r,s]of n)if(this.equalsFn(r,i))return s}has(i){return void 0!==this.get(i)}set(i,t){const n=this.mapKeyFn(i),r=this.inner[n];if(void 0===r)return this.inner[n]=[[i,t]],void this.innerSize++;for(let s=0;s{for(const[r,s]of n)i(r,s)})}isEmpty(){return cY(this.inner)}size(){return this.innerSize}}const gPt=new zr(di.comparator);function tl(){return gPt}const NY=new zr(di.comparator);function hb(...e){let i=NY;for(const t of e)i=i.insert(t.key,t);return i}function BY(e){let i=NY;return e.forEach((t,n)=>i=i.insert(t,n.overlayedDocument)),i}function md(){return fb()}function VY(){return fb()}function fb(){return new Tu(e=>e.toString(),(e,i)=>e.isEqual(i))}const vPt=new zr(di.comparator),xPt=new Dr(di.comparator);function fn(...e){let i=xPt;for(const t of e)i=i.add(t);return i}const yPt=new Dr(tn);function UY(e,i){if(e.useProto3Json){if(isNaN(i))return{doubleValue:"NaN"};if(i===1/0)return{doubleValue:"Infinity"};if(i===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:nb(i)?"-0":i}}function zY(e){return{integerValue:""+e}}function GY(e,i){return function qj(e){return"number"==typeof e&&Number.isInteger(e)&&!nb(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}(i)?zY(i):UY(e,i)}class yS{constructor(){this._=void 0}}function bPt(e,i,t){return e instanceof Sv?function(r,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return s&&uS(s)&&(s=hS(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(t,i):e instanceof bm?WY(e,i):e instanceof wm?XY(e,i):function(r,s){const o=HY(r,s),l=jY(o)+jY(r.Pe);return OP(o)&&OP(r.Pe)?zY(l):UY(r.serializer,l)}(e,i)}function wPt(e,i,t){return e instanceof bm?WY(e,i):e instanceof wm?XY(e,i):t}function HY(e,i){return e instanceof Ev?OP(n=i)||(s=n)&&"doubleValue"in s?i:{integerValue:0}:null;var n,s}class Sv extends yS{}class bm extends yS{constructor(i){super(),this.elements=i}}function WY(e,i){const t=YY(i);for(const n of e.elements)t.some(r=>fd(r,n))||t.push(n);return{arrayValue:{values:t}}}class wm extends yS{constructor(i){super(),this.elements=i}}function XY(e,i){let t=YY(i);for(const n of e.elements)t=t.filter(r=>!fd(r,n));return{arrayValue:{values:t}}}class Ev extends yS{constructor(i,t){super(),this.serializer=i,this.Pe=t}}function jY(e){return ys(e.integerValue||e.doubleValue)}function YY(e){return ab(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class TPt{constructor(i,t){this.version=i,this.transformResults=t}}class ss{constructor(i,t){this.updateTime=i,this.exists=t}static none(){return new ss}static exists(i){return new ss(void 0,i)}static updateTime(i){return new ss(i)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(i){return this.exists===i.exists&&(this.updateTime?!!i.updateTime&&this.updateTime.isEqual(i.updateTime):!i.updateTime)}}function bS(e,i){return void 0!==e.updateTime?i.isFoundDocument()&&i.version.isEqual(e.updateTime):void 0===e.exists||e.exists===i.isFoundDocument()}class wS{}function $Y(e,i){if(!e.hasLocalMutations||i&&0===i.fields.length)return null;if(null===i)return e.isNoDocument()?new Dv(e.key,ss.none()):new Av(e.key,e.data,ss.none());{const t=e.data,n=za.empty();let r=new Dr(rs.comparator);for(let s of i.fields)if(!r.has(s)){let o=t.field(s);null===o&&s.length>1&&(s=s.popLast(),o=t.field(s)),null===o?n.delete(s):n.set(s,o),r=r.add(s)}return new Cu(e.key,n,new qo(r.toArray()),ss.none())}}function CPt(e,i,t){e instanceof Av?function(r,s,o){const l=r.value.clone(),w=ZY(r.fieldTransforms,s,o.transformResults);l.setAll(w),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(e,i,t):e instanceof Cu?function(r,s,o){if(!bS(r.precondition,s))return void s.convertToUnknownDocument(o.version);const l=ZY(r.fieldTransforms,s,o.transformResults),w=s.data;w.setAll(KY(r)),w.setAll(l),s.convertToFoundDocument(o.version,w).setHasCommittedMutations()}(e,i,t):i.convertToNoDocument(t.version).setHasCommittedMutations()}function pb(e,i,t,n){return e instanceof Av?function(s,o,l,w){if(!bS(s.precondition,o))return l;const C=s.value.clone(),M=JY(s.fieldTransforms,w,o);return C.setAll(M),o.convertToFoundDocument(o.version,C).setHasLocalMutations(),null}(e,i,t,n):e instanceof Cu?function(s,o,l,w){if(!bS(s.precondition,o))return l;const C=JY(s.fieldTransforms,w,o),M=o.data;return M.setAll(KY(s)),M.setAll(C),o.convertToFoundDocument(o.version,M).setHasLocalMutations(),null===l?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(P=>P.field))}(e,i,t,n):(l=t,bS(e.precondition,o=i)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):l);var o,l}function SPt(e,i){let t=null;for(const n of e.fieldTransforms){const r=i.data.field(n.field),s=HY(n.transform,r||null);null!=s&&(null===t&&(t=za.empty()),t.set(n.field,s))}return t||null}function QY(e,i){return e.type===i.type&&!!e.key.isEqual(i.key)&&!!e.precondition.isEqual(i.precondition)&&(r=i.fieldTransforms,!!(void 0===(n=e.fieldTransforms)&&void 0===r||n&&r&&gv(n,r,(s,o)=>function _Pt(e,i){return e.field.isEqual(i.field)&&(r=i.transform,(n=e.transform)instanceof bm&&r instanceof bm||n instanceof wm&&r instanceof wm?gv(n.elements,r.elements,fd):n instanceof Ev&&r instanceof Ev?fd(n.Pe,r.Pe):n instanceof Sv&&r instanceof Sv);var n,r}(s,o))))&&(0===e.type?e.value.isEqual(i.value):1!==e.type||e.data.isEqual(i.data)&&e.fieldMask.isEqual(i.fieldMask));var n,r}class Av extends wS{constructor(i,t,n,r=[]){super(),this.key=i,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Cu extends wS{constructor(i,t,n,r,s=[]){super(),this.key=i,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function KY(e){const i=new Map;return e.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const n=e.data.field(t);i.set(t,n)}}),i}function ZY(e,i,t){const n=new Map;Ai(e.length===t.length);for(let r=0;r{const s=i.get(r.key),o=s.overlayedDocument;let l=this.applyToLocalView(o,s.mutatedFields);l=t.has(r.key)?null:l;const w=$Y(o,l);null!==w&&n.set(r.key,w),o.isValidDocument()||o.convertToNoDocument(Ii.min())}),n}keys(){return this.mutations.reduce((i,t)=>i.add(t.key),fn())}isEqual(i){return this.batchId===i.batchId&&gv(this.mutations,i.mutations,(t,n)=>QY(t,n))&&gv(this.baseMutations,i.baseMutations,(t,n)=>QY(t,n))}}class XP{constructor(i,t,n,r){this.batch=i,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(i,t,n){Ai(i.mutations.length===n.length);let r=function(){return vPt}();const s=i.mutations;for(let o=0;o=8)throw new gb(`Invalid padding: ${t}`);if(n<0)throw new gb(`Invalid hash count: ${n}`);if(i.length>0&&0===this.hashCount)throw new gb(`Invalid hash count: ${n}`);if(0===i.length&&0!==t)throw new gb(`Invalid padding when bitmap length is 0: ${t}`);this.Ie=8*i.length-t,this.Te=fm.fromNumber(this.Ie)}Ee(i,t,n){let r=i.add(t.multiply(fm.fromNumber(n)));return 1===r.compare(APt)&&(r=new fm([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Te).toNumber()}de(i){return!!(this.bitmap[Math.floor(i/8)]&1<o.insert(l)),o}insert(i){if(0===this.Ie)return;const t=n$(i),[n,r]=r$(t);for(let s=0;s0&&(this.we=!0,this.pe=i)}Ce(){let i=fn(),t=fn(),n=fn();return this.ge.forEach((r,s)=>{switch(s){case 0:i=i.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:gi()}}),new xb(this.pe,this.ye,i,t,n)}ve(){this.we=!1,this.ge=c$()}Fe(i,t){this.we=!0,this.ge=this.ge.insert(i,t)}Me(i){this.we=!0,this.ge=this.ge.remove(i)}xe(){this.fe+=1}Oe(){this.fe-=1,Ai(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class DPt{constructor(i){this.Le=i,this.Be=new Map,this.ke=tl(),this.qe=l$(),this.Qe=new zr(tn)}Ke(i){for(const t of i.Re)i.Ve&&i.Ve.isFoundDocument()?this.$e(t,i.Ve):this.Ue(t,i.key,i.Ve);for(const t of i.removedTargetIds)this.Ue(t,i.key,i.Ve)}We(i){this.forEachTarget(i,t=>{const n=this.Ge(t);switch(i.state){case 0:this.ze(t)&&n.De(i.resumeToken);break;case 1:n.Oe(),n.Se||n.ve(),n.De(i.resumeToken);break;case 2:n.Oe(),n.Se||this.removeTarget(t);break;case 3:this.ze(t)&&(n.Ne(),n.De(i.resumeToken));break;case 4:this.ze(t)&&(this.je(t),n.De(i.resumeToken));break;default:gi()}})}forEachTarget(i,t){i.targetIds.length>0?i.targetIds.forEach(t):this.Be.forEach((n,r)=>{this.ze(r)&&t(r)})}He(i){const t=i.targetId,n=i.me.count,r=this.Je(t);if(r){const s=r.target;if(gS(s))if(0===n){const o=new di(s.path);this.Ue(t,o,$r.newNoDocument(o,Ii.min()))}else Ai(1===n);else{const o=this.Ye(t);if(o!==n){const l=this.Ze(i),w=l?this.Xe(l,i,o):1;0!==w&&(this.je(t),this.Qe=this.Qe.insert(t,2===w?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Ze(i){const t=i.me.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:n="",padding:r=0},hashCount:s=0}=t;let o,l;try{o=wu(n).toUint8Array()}catch(w){if(w instanceof uY)return _l("Decoding the base64 bloom filter in existence filter failed ("+w.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw w}try{l=new YP(o,r,s)}catch(w){return _l(w instanceof gb?"BloomFilter error: ":"Applying bloom filter failed: ",w),null}return 0===l.Ie?null:l}Xe(i,t,n){return t.me.count===n-this.nt(i,t.targetId)?0:2}nt(i,t){const n=this.Le.getRemoteKeysForTarget(t);let r=0;return n.forEach(s=>{const o=this.Le.tt(),l=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;i.mightContain(l)||(this.Ue(t,s,null),r++)}),r}rt(i){const t=new Map;this.Be.forEach((s,o)=>{const l=this.Je(o);if(l){if(s.current&&gS(l.target)){const w=new di(l.target.path);null!==this.ke.get(w)||this.it(o,w)||this.Ue(o,w,$r.newNoDocument(w,i))}s.be&&(t.set(o,s.Ce()),s.ve())}});let n=fn();this.qe.forEach((s,o)=>{let l=!0;o.forEachWhile(w=>{const C=this.Je(w);return!C||"TargetPurposeLimboResolution"===C.purpose||(l=!1,!1)}),l&&(n=n.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(i));const r=new vb(i,t,this.Qe,this.ke,n);return this.ke=tl(),this.qe=l$(),this.Qe=new zr(tn),r}$e(i,t){if(!this.ze(i))return;const n=this.it(i,t.key)?2:0;this.Ge(i).Fe(t.key,n),this.ke=this.ke.insert(t.key,t),this.qe=this.qe.insert(t.key,this.st(t.key).add(i))}Ue(i,t,n){if(!this.ze(i))return;const r=this.Ge(i);this.it(i,t)?r.Fe(t,1):r.Me(t),this.qe=this.qe.insert(t,this.st(t).delete(i)),n&&(this.ke=this.ke.insert(t,n))}removeTarget(i){this.Be.delete(i)}Ye(i){const t=this.Ge(i).Ce();return this.Le.getRemoteKeysForTarget(i).size+t.addedDocuments.size-t.removedDocuments.size}xe(i){this.Ge(i).xe()}Ge(i){let t=this.Be.get(i);return t||(t=new o$,this.Be.set(i,t)),t}st(i){let t=this.qe.get(i);return t||(t=new Dr(tn),this.qe=this.qe.insert(i,t)),t}ze(i){const t=null!==this.Je(i);return t||Fe("WatchChangeAggregator","Detected inactive target",i),t}Je(i){const t=this.Be.get(i);return t&&t.Se?null:this.Le.ot(i)}je(i){this.Be.set(i,new o$),this.Le.getRemoteKeysForTarget(i).forEach(t=>{this.Ue(i,t,null)})}it(i,t){return this.Le.getRemoteKeysForTarget(i).has(t)}}function l$(){return new zr(di.comparator)}function c$(){return new zr(di.comparator)}const MPt={asc:"ASCENDING",desc:"DESCENDING"},IPt={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},RPt={and:"AND",or:"OR"};class kPt{constructor(i,t){this.databaseId=i,this.useProto3Json=t}}function $P(e,i){return e.useProto3Json||ib(i)?i:{value:i}}function Mv(e,i){return e.useProto3Json?`${new Date(1e3*i.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+i.nanoseconds).slice(-9)}Z`:{seconds:""+i.seconds,nanos:i.nanoseconds}}function d$(e,i){return e.useProto3Json?i.toBase64():i.toUint8Array()}function PPt(e,i){return Mv(e,i.toTimestamp())}function Ps(e){return Ai(!!e),Ii.fromTimestamp(function(t){const n=bu(t);return new ns(n.seconds,n.nanos)}(e))}function QP(e,i){return KP(e,i).canonicalString()}function KP(e,i){const t=(r=e,new Bn(["projects",r.projectId,"databases",r.database])).child("documents");var r;return void 0===i?t:t.child(i)}function u$(e){const i=Bn.fromString(e);return Ai(_$(i)),i}function yb(e,i){return QP(e.databaseId,i.path)}function pd(e,i){const t=u$(i);if(t.get(1)!==e.databaseId.projectId)throw new Oe(he.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+e.databaseId.projectId);if(t.get(3)!==e.databaseId.database)throw new Oe(he.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+e.databaseId.database);return new di(m$(t))}function h$(e,i){return QP(e.databaseId,i)}function ZP(e){return new Bn(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function m$(e){return Ai(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function p$(e,i,t){return{name:yb(e,i),fields:t.value.mapValue.fields}}function v$(e,i){return{documents:[h$(e,i.path)]}}function CS(e,i){const t={structuredQuery:{}},n=i.path;let r;null!==i.collectionGroup?(r=n,t.structuredQuery.from=[{collectionId:i.collectionGroup,allDescendants:!0}]):(r=n.popLast(),t.structuredQuery.from=[{collectionId:n.lastSegment()}]),t.parent=h$(e,r);const s=function(C){if(0!==C.length)return w$(wr.create(C,"and"))}(i.filters);s&&(t.structuredQuery.where=s);const o=function(C){if(0!==C.length)return C.map(M=>{return{field:$h((O=M).field),direction:BPt(O.dir)};var O})}(i.orderBy);o&&(t.structuredQuery.orderBy=o);const l=$P(e,i.limit);return null!==l&&(t.structuredQuery.limit=l),i.startAt&&(t.structuredQuery.startAt={before:(C=i.startAt).inclusive,values:C.position}),i.endAt&&(t.structuredQuery.endAt=function(C){return{before:!C.inclusive,values:C.position}}(i.endAt)),{_t:t,parent:r};var C}function y$(e){let i=function f$(e){const i=u$(e);return 4===i.length?Bn.emptyPath():m$(i)}(e.parent);const t=e.structuredQuery,n=t.from?t.from.length:0;let r=null;if(n>0){Ai(1===n);const M=t.from[0];M.allDescendants?r=M.collectionId:i=i.child(M.collectionId)}let s=[];t.where&&(s=function(P){const O=b$(P);return O instanceof wr&&NP(O)?O.getFilters():[O]}(t.where));let o=[];t.orderBy&&(o=t.orderBy.map(O=>{return new lb(Iv((U=O).field),function(W){switch(W){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(U.direction));var U}));let l=null;t.limit&&(l=function(P){let O;return O="object"==typeof P?P.value:P,ib(O)?null:O}(t.limit));let w=null;var P;t.startAt&&(w=new Yh((P=t.startAt).values||[],!!P.before));let C=null;return t.endAt&&(C=function(P){return new Yh(P.values||[],!P.before)}(t.endAt)),function IY(e,i,t,n,r,s,o,l){return new _u(e,i,t,n,r,s,o,l)}(i,r,o,s,l,"F",w,C)}function b$(e){return void 0!==e.unaryFilter?function(t){switch(t.unaryFilter.op){case"IS_NAN":const n=Iv(t.unaryFilter.field);return Vn.create(n,"==",{doubleValue:NaN});case"IS_NULL":const r=Iv(t.unaryFilter.field);return Vn.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=Iv(t.unaryFilter.field);return Vn.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Iv(t.unaryFilter.field);return Vn.create(o,"!=",{nullValue:"NULL_VALUE"});default:return gi()}}(e):void 0!==e.fieldFilter?Vn.create(Iv((t=e).fieldFilter.field),function(r){switch(r){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return gi()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==e.compositeFilter?function(t){return wr.create(t.compositeFilter.filters.map(n=>b$(n)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return gi()}}(t.compositeFilter.op))}(e):gi();var t}function BPt(e){return MPt[e]}function VPt(e){return IPt[e]}function UPt(e){return RPt[e]}function $h(e){return{fieldPath:e.canonicalString()}}function Iv(e){return rs.fromServerFormat(e.fieldPath)}function w$(e){return e instanceof Vn?function(t){if("=="===t.op){if(mY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NAN"}};if(fY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(mY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NOT_NAN"}};if(fY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:$h(t.field),op:VPt(t.op),value:t.value}}}(e):e instanceof wr?function(t){const n=t.getFilters().map(r=>w$(r));return 1===n.length?n[0]:{compositeFilter:{op:UPt(t.op),filters:n}}}(e):gi()}function zPt(e){const i=[];return e.fields.forEach(t=>i.push(t.canonicalString())),{fieldPaths:i}}function _$(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class Su{constructor(i,t,n,r,s=Ii.min(),o=Ii.min(),l=fa.EMPTY_BYTE_STRING,w=null){this.target=i,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=l,this.expectedCount=w}withSequenceNumber(i){return new Su(this.target,this.targetId,this.purpose,i,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(i,t){return new Su(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,i,null)}withExpectedCount(i){return new Su(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,i)}withLastLimboFreeSnapshotVersion(i){return new Su(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,i,this.resumeToken,this.expectedCount)}}class T${constructor(i){this.ct=i}}function qP(e){const i=y$({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?xS(i,i.limit,"L"):i}class Sm{constructor(){}Pt(i,t){this.It(i,t),t.Tt()}It(i,t){if("nullValue"in i)this.Et(t,5);else if("booleanValue"in i)this.Et(t,10),t.dt(i.booleanValue?1:0);else if("integerValue"in i)this.Et(t,15),t.dt(ys(i.integerValue));else if("doubleValue"in i){const n=ys(i.doubleValue);isNaN(n)?this.Et(t,13):(this.Et(t,15),nb(n)?t.dt(0):t.dt(n))}else if("timestampValue"in i){let n=i.timestampValue;this.Et(t,20),"string"==typeof n&&(n=bu(n)),t.At(`${n.seconds||""}`),t.dt(n.nanos||0)}else if("stringValue"in i)this.Rt(i.stringValue,t),this.Vt(t);else if("bytesValue"in i)this.Et(t,30),t.ft(wu(i.bytesValue)),this.Vt(t);else if("referenceValue"in i)this.gt(i.referenceValue,t);else if("geoPointValue"in i){const n=i.geoPointValue;this.Et(t,45),t.dt(n.latitude||0),t.dt(n.longitude||0)}else"mapValue"in i?pY(i)?this.Et(t,Number.MAX_SAFE_INTEGER):(this.yt(i.mapValue,t),this.Vt(t)):"arrayValue"in i?(this.wt(i.arrayValue,t),this.Vt(t)):gi()}Rt(i,t){this.Et(t,25),this.St(i,t)}St(i,t){t.At(i)}yt(i,t){const n=i.fields||{};this.Et(t,55);for(const r of Object.keys(n))this.Rt(r,t),this.It(n[r],t)}wt(i,t){const n=i.values||[];this.Et(t,50);for(const r of n)this.It(r,t)}gt(i,t){this.Et(t,37),di.fromName(i).path.forEach(n=>{this.Et(t,60),this.St(n,t)})}Et(i,t){i.dt(t)}Vt(i){i.dt(2)}}Sm.bt=new Sm;class QPt{constructor(){this._n=new sF}addToCollectionParentIndex(i,t){return this._n.add(t),te.resolve()}getCollectionParents(i,t){return te.resolve(this._n.getEntries(t))}addFieldIndex(i,t){return te.resolve()}deleteFieldIndex(i,t){return te.resolve()}deleteAllFieldIndexes(i){return te.resolve()}createTargetIndexes(i,t){return te.resolve()}getDocumentsMatchingTarget(i,t){return te.resolve(null)}getIndexType(i,t){return te.resolve(0)}getFieldIndexes(i,t){return te.resolve([])}getNextCollectionGroupToUpdate(i){return te.resolve(null)}getMinOffset(i,t){return te.resolve(Tl.min())}getMinOffsetFromCollectionGroup(i,t){return te.resolve(Tl.min())}updateCollectionGroup(i,t,n){return te.resolve()}updateIndexEntries(i,t){return te.resolve()}}class sF{constructor(){this.index={}}add(i){const t=i.lastSegment(),n=i.popLast(),r=this.index[t]||new Dr(Bn.comparator),s=!r.has(n);return this.index[t]=r.add(n),s}has(i){const t=i.lastSegment(),n=i.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(i){return(this.index[i]||new Dr(Bn.comparator)).toArray()}}new Uint8Array(0);class ao{constructor(i,t,n){this.cacheSizeCollectionThreshold=i,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(i){return new ao(i,ao.DEFAULT_COLLECTION_PERCENTILE,ao.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}ao.DEFAULT_COLLECTION_PERCENTILE=10,ao.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ao.DEFAULT=new ao(41943040,ao.DEFAULT_COLLECTION_PERCENTILE,ao.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ao.DISABLED=new ao(-1,0,0);class Am{constructor(i){this.On=i}next(){return this.On+=2,this.On}static Nn(){return new Am(0)}static Ln(){return new Am(-1)}}class j${constructor(){this.changes=new Tu(i=>i.toString(),(i,t)=>i.isEqual(t)),this.changesApplied=!1}addEntry(i){this.assertNotApplied(),this.changes.set(i.key,i)}removeEntry(i,t){this.assertNotApplied(),this.changes.set(i,$r.newInvalidDocument(i).setReadTime(t))}getEntry(i,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?te.resolve(n):this.getFromCache(i,t)}getEntries(i,t){return this.getAllFromCache(i,t)}apply(i){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(i)}assertNotApplied(){}}class nFt{constructor(i,t){this.overlayedDocument=i,this.mutatedFields=t}}class Z${constructor(i,t,n,r){this.remoteDocumentCache=i,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(i,t){let n=null;return this.documentOverlayCache.getOverlay(i,t).next(r=>(n=r,this.remoteDocumentCache.getEntry(i,t))).next(r=>(null!==n&&pb(n.mutation,r,qo.empty(),ns.now()),r))}getDocuments(i,t){return this.remoteDocumentCache.getEntries(i,t).next(n=>this.getLocalViewOfDocuments(i,n,fn()).next(()=>n))}getLocalViewOfDocuments(i,t,n=fn()){const r=md();return this.populateOverlays(i,r,t).next(()=>this.computeViews(i,t,r,n).next(s=>{let o=hb();return s.forEach((l,w)=>{o=o.insert(l,w.overlayedDocument)}),o}))}getOverlayedDocuments(i,t){const n=md();return this.populateOverlays(i,n,t).next(()=>this.computeViews(i,t,n,fn()))}populateOverlays(i,t,n){const r=[];return n.forEach(s=>{t.has(s)||r.push(s)}),this.documentOverlayCache.getOverlays(i,r).next(s=>{s.forEach((o,l)=>{t.set(o,l)})})}computeViews(i,t,n,r){let s=tl();const o=fb(),l=fb();return t.forEach((w,C)=>{const M=n.get(C.key);r.has(C.key)&&(void 0===M||M.mutation instanceof Cu)?s=s.insert(C.key,C):void 0!==M?(o.set(C.key,M.mutation.getFieldMask()),pb(M.mutation,C,M.mutation.getFieldMask(),ns.now())):o.set(C.key,qo.empty())}),this.recalculateAndSaveOverlays(i,s).next(w=>(w.forEach((C,M)=>o.set(C,M)),t.forEach((C,M)=>{var P;return l.set(C,new nFt(M,null!==(P=o.get(C))&&void 0!==P?P:null))}),l))}recalculateAndSaveOverlays(i,t){const n=fb();let r=new zr((o,l)=>o-l),s=fn();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(i,t).next(o=>{for(const l of o)l.keys().forEach(w=>{const C=t.get(w);if(null===C)return;let M=n.get(w)||qo.empty();M=l.applyToLocalView(C,M),n.set(w,M);const P=(r.get(l.batchId)||fn()).add(w);r=r.insert(l.batchId,P)})}).next(()=>{const o=[],l=r.getReverseIterator();for(;l.hasNext();){const w=l.getNext(),C=w.key,M=w.value,P=VY();M.forEach(O=>{if(!s.has(O)){const L=$Y(t.get(O),n.get(O));null!==L&&P.set(O,L),s=s.add(O)}}),o.push(this.documentOverlayCache.saveOverlays(i,C,P))}return te.waitFor(o)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(i,t){return this.remoteDocumentCache.getEntries(i,t).next(n=>this.recalculateAndSaveOverlays(i,n))}getDocumentsMatchingQuery(i,t,n,r){return di.isDocumentKey((o=t).path)&&null===o.collectionGroup&&0===o.filters.length?this.getDocumentsMatchingDocumentQuery(i,t.path):UP(t)?this.getDocumentsMatchingCollectionGroupQuery(i,t,n,r):this.getDocumentsMatchingCollectionQuery(i,t,n,r);var o}getNextDocuments(i,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(i,t,n,r).next(s=>{const o=r-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(i,t,n.largestBatchId,r-s.size):te.resolve(md());let l=-1,w=s;return o.next(C=>te.forEach(C,(M,P)=>(l{w=w.insert(M,O)}))).next(()=>this.populateOverlays(i,C,s)).next(()=>this.computeViews(i,w,C,fn())).next(M=>({batchId:l,changes:BY(M)})))})}getDocumentsMatchingDocumentQuery(i,t){return this.getDocument(i,new di(t)).next(n=>{let r=hb();return n.isFoundDocument()&&(r=r.insert(n.key,n)),r})}getDocumentsMatchingCollectionGroupQuery(i,t,n,r){const s=t.collectionGroup;let o=hb();return this.indexManager.getCollectionParents(i,s).next(l=>te.forEach(l,w=>{const C=(P=t,O=w.child(s),new _u(O,null,P.explicitOrderBy.slice(),P.filters.slice(),P.limit,P.limitType,P.startAt,P.endAt));var P,O;return this.getDocumentsMatchingCollectionQuery(i,C,n,r).next(M=>{M.forEach((P,O)=>{o=o.insert(P,O)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(i,t,n,r){let s;return this.documentOverlayCache.getOverlaysForCollection(i,t.path,n.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(i,t,n,s,r))).next(o=>{s.forEach((w,C)=>{const M=C.getKey();null===o.get(M)&&(o=o.insert(M,$r.newInvalidDocument(M)))});let l=hb();return o.forEach((w,C)=>{const M=s.get(w);void 0!==M&&pb(M.mutation,C,qo.empty(),ns.now()),ub(t,C)&&(l=l.insert(w,C))}),l})}}class rFt{constructor(i){this.serializer=i,this.cr=new Map,this.lr=new Map}getBundleMetadata(i,t){return te.resolve(this.cr.get(t))}saveBundleMetadata(i,t){return this.cr.set(t.id,{id:(r=t).id,version:r.version,createTime:Ps(r.createTime)}),te.resolve();var r}getNamedQuery(i,t){return te.resolve(this.lr.get(t))}saveNamedQuery(i,t){return this.lr.set(t.name,{name:(r=t).name,query:qP(r.bundledQuery),readTime:Ps(r.readTime)}),te.resolve();var r}}class sFt{constructor(){this.overlays=new zr(di.comparator),this.hr=new Map}getOverlay(i,t){return te.resolve(this.overlays.get(t))}getOverlays(i,t){const n=md();return te.forEach(t,r=>this.getOverlay(i,r).next(s=>{null!==s&&n.set(r,s)})).next(()=>n)}saveOverlays(i,t,n){return n.forEach((r,s)=>{this.ht(i,t,s)}),te.resolve()}removeOverlaysForBatchId(i,t,n){const r=this.hr.get(n);return void 0!==r&&(r.forEach(s=>this.overlays=this.overlays.remove(s)),this.hr.delete(n)),te.resolve()}getOverlaysForCollection(i,t,n){const r=md(),s=t.length+1,o=new di(t.child("")),l=this.overlays.getIteratorFrom(o);for(;l.hasNext();){const w=l.getNext().value,C=w.getKey();if(!t.isPrefixOf(C.path))break;C.path.length===s&&w.largestBatchId>n&&r.set(w.getKey(),w)}return te.resolve(r)}getOverlaysForCollectionGroup(i,t,n,r){let s=new zr((C,M)=>C-M);const o=this.overlays.getIterator();for(;o.hasNext();){const C=o.getNext().value;if(C.getKey().getCollectionGroup()===t&&C.largestBatchId>n){let M=s.get(C.largestBatchId);null===M&&(M=md(),s=s.insert(C.largestBatchId,M)),M.set(C.getKey(),C)}}const l=md(),w=s.getIterator();for(;w.hasNext()&&(w.getNext().value.forEach((C,M)=>l.set(C,M)),!(l.size()>=r)););return te.resolve(l)}ht(i,t,n){const r=this.overlays.get(n.key);if(null!==r){const o=this.hr.get(r.largestBatchId).delete(n.key);this.hr.set(r.largestBatchId,o)}this.overlays=this.overlays.insert(n.key,new jP(t,n));let s=this.hr.get(t);void 0===s&&(s=fn(),this.hr.set(t,s)),this.hr.set(t,s.add(n.key))}}class aF{constructor(){this.Pr=new Dr(Da.Ir),this.Tr=new Dr(Da.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(i,t){const n=new Da(i,t);this.Pr=this.Pr.add(n),this.Tr=this.Tr.add(n)}dr(i,t){i.forEach(n=>this.addReference(n,t))}removeReference(i,t){this.Ar(new Da(i,t))}Rr(i,t){i.forEach(n=>this.removeReference(n,t))}Vr(i){const t=new di(new Bn([])),n=new Da(t,i),r=new Da(t,i+1),s=[];return this.Tr.forEachInRange([n,r],o=>{this.Ar(o),s.push(o.key)}),s}mr(){this.Pr.forEach(i=>this.Ar(i))}Ar(i){this.Pr=this.Pr.delete(i),this.Tr=this.Tr.delete(i)}gr(i){const t=new di(new Bn([])),n=new Da(t,i),r=new Da(t,i+1);let s=fn();return this.Tr.forEachInRange([n,r],o=>{s=s.add(o.key)}),s}containsKey(i){const t=new Da(i,0),n=this.Pr.firstAfterOrEqual(t);return null!==n&&i.isEqual(n.key)}}class Da{constructor(i,t){this.key=i,this.pr=t}static Ir(i,t){return di.comparator(i.key,t.key)||tn(i.pr,t.pr)}static Er(i,t){return tn(i.pr,t.pr)||di.comparator(i.key,t.key)}}class aFt{constructor(i,t){this.indexManager=i,this.referenceDelegate=t,this.mutationQueue=[],this.yr=1,this.wr=new Dr(Da.Ir)}checkEmpty(i){return te.resolve(0===this.mutationQueue.length)}addMutationBatch(i,t,n,r){const s=this.yr;this.yr++;const o=new WP(s,t,n,r);this.mutationQueue.push(o);for(const l of r)this.wr=this.wr.add(new Da(l.key,s)),this.indexManager.addToCollectionParentIndex(i,l.key.path.popLast());return te.resolve(o)}lookupMutationBatch(i,t){return te.resolve(this.Sr(t))}getNextMutationBatchAfterBatchId(i,t){const r=this.br(t+1),s=r<0?0:r;return te.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return te.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(i){return te.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(i,t){const n=new Da(t,0),r=new Da(t,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([n,r],o=>{const l=this.Sr(o.pr);s.push(l)}),te.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(i,t){let n=new Dr(tn);return t.forEach(r=>{const s=new Da(r,0),o=new Da(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],l=>{n=n.add(l.pr)})}),te.resolve(this.Dr(n))}getAllMutationBatchesAffectingQuery(i,t){const n=t.path,r=n.length+1;let s=n;di.isDocumentKey(s)||(s=s.child(""));const o=new Da(new di(s),0);let l=new Dr(tn);return this.wr.forEachWhile(w=>{const C=w.key.path;return!!n.isPrefixOf(C)&&(C.length===r&&(l=l.add(w.pr)),!0)},o),te.resolve(this.Dr(l))}Dr(i){const t=[];return i.forEach(n=>{const r=this.Sr(n);null!==r&&t.push(r)}),t}removeMutationBatch(i,t){Ai(0===this.Cr(t.batchId,"removed")),this.mutationQueue.shift();let n=this.wr;return te.forEach(t.mutations,r=>{const s=new Da(r.key,t.batchId);return n=n.delete(s),this.referenceDelegate.markPotentiallyOrphaned(i,r.key)}).next(()=>{this.wr=n})}Mn(i){}containsKey(i,t){const n=new Da(t,0),r=this.wr.firstAfterOrEqual(n);return te.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(i){return te.resolve()}Cr(i,t){return this.br(i)}br(i){return 0===this.mutationQueue.length?0:i-this.mutationQueue[0].batchId}Sr(i){const t=this.br(i);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class oFt{constructor(i){this.vr=i,this.docs=new zr(di.comparator),this.size=0}setIndexManager(i){this.indexManager=i}addEntry(i,t){const n=t.key,r=this.docs.get(n),s=r?r.size:0,o=this.vr(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(i,n.path.popLast())}removeEntry(i){const t=this.docs.get(i);t&&(this.docs=this.docs.remove(i),this.size-=t.size)}getEntry(i,t){const n=this.docs.get(t);return te.resolve(n?n.document.mutableCopy():$r.newInvalidDocument(t))}getEntries(i,t){let n=tl();return t.forEach(r=>{const s=this.docs.get(r);n=n.insert(r,s?s.document.mutableCopy():$r.newInvalidDocument(r))}),te.resolve(n)}getDocumentsMatchingQuery(i,t,n,r){let s=tl();const o=t.path,l=new di(o.child("")),w=this.docs.getIteratorFrom(l);for(;w.hasNext();){const{key:C,value:{document:M}}=w.getNext();if(!o.isPrefixOf(C.path))break;C.path.length>o.length+1||IP(new Tl((e=M).readTime,e.key,-1),n)<=0||(r.has(M.key)||ub(t,M))&&(s=s.insert(M.key,M.mutableCopy()))}var e;return te.resolve(s)}getAllFromCollectionGroup(i,t,n,r){gi()}Fr(i,t){return te.forEach(this.docs,n=>t(n))}newChangeBuffer(i){return new lFt(this)}getSize(i){return te.resolve(this.size)}}class lFt extends j${constructor(i){super(),this.ar=i}applyChanges(i){const t=[];return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.ar.addEntry(i,r)):this.ar.removeEntry(n)}),te.waitFor(t)}getFromCache(i,t){return this.ar.getEntry(i,t)}getAllFromCache(i,t){return this.ar.getEntries(i,t)}}class cFt{constructor(i){this.persistence=i,this.Mr=new Tu(t=>ym(t),cb),this.lastRemoteSnapshotVersion=Ii.min(),this.highestTargetId=0,this.Or=0,this.Nr=new aF,this.targetCount=0,this.Lr=Am.Nn()}forEachTarget(i,t){return this.Mr.forEach((n,r)=>t(r)),te.resolve()}getLastRemoteSnapshotVersion(i){return te.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(i){return te.resolve(this.Or)}allocateTargetId(i){return this.highestTargetId=this.Lr.next(),te.resolve(this.highestTargetId)}setTargetsMetadata(i,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Or&&(this.Or=t),te.resolve()}qn(i){this.Mr.set(i.target,i);const t=i.targetId;t>this.highestTargetId&&(this.Lr=new Am(t),this.highestTargetId=t),i.sequenceNumber>this.Or&&(this.Or=i.sequenceNumber)}addTargetData(i,t){return this.qn(t),this.targetCount+=1,te.resolve()}updateTargetData(i,t){return this.qn(t),te.resolve()}removeTargetData(i,t){return this.Mr.delete(t.target),this.Nr.Vr(t.targetId),this.targetCount-=1,te.resolve()}removeTargets(i,t,n){let r=0;const s=[];return this.Mr.forEach((o,l)=>{l.sequenceNumber<=t&&null===n.get(l.targetId)&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(i,l.targetId)),r++)}),te.waitFor(s).next(()=>r)}getTargetCount(i){return te.resolve(this.targetCount)}getTargetData(i,t){const n=this.Mr.get(t)||null;return te.resolve(n)}addMatchingKeys(i,t,n){return this.Nr.dr(t,n),te.resolve()}removeMatchingKeys(i,t,n){this.Nr.Rr(t,n);const r=this.persistence.referenceDelegate,s=[];return r&&t.forEach(o=>{s.push(r.markPotentiallyOrphaned(i,o))}),te.waitFor(s)}removeMatchingKeysForTargetId(i,t){return this.Nr.Vr(t),te.resolve()}getMatchingKeysForTargetId(i,t){const n=this.Nr.gr(t);return te.resolve(n)}containsKey(i,t){return te.resolve(this.Nr.containsKey(t))}}class oF{constructor(i,t){this.Br={},this.overlays={},this.kr=new Cl(0),this.qr=!1,this.qr=!0,this.referenceDelegate=i(this),this.Qr=new cFt(this),this.indexManager=new QPt,this.remoteDocumentCache=new oFt(n=>this.referenceDelegate.Kr(n)),this.serializer=new T$(t),this.$r=new rFt(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(i){return this.indexManager}getDocumentOverlayCache(i){let t=this.overlays[i.toKey()];return t||(t=new sFt,this.overlays[i.toKey()]=t),t}getMutationQueue(i,t){let n=this.Br[i.toKey()];return n||(n=new aFt(t,this.referenceDelegate),this.Br[i.toKey()]=n),n}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(i,t,n){Fe("MemoryPersistence","Starting transaction:",i);const r=new dFt(this.kr.next());return this.referenceDelegate.Ur(),n(r).next(s=>this.referenceDelegate.Wr(r).next(()=>s)).toPromise().then(s=>(r.raiseOnCommittedEvent(),s))}Gr(i,t){return te.or(Object.values(this.Br).map(n=>()=>n.containsKey(i,t)))}}class dFt extends Kj{constructor(i){super(),this.currentSequenceNumber=i}}class kS{constructor(i){this.persistence=i,this.zr=new aF,this.jr=null}static Hr(i){return new kS(i)}get Jr(){if(this.jr)return this.jr;throw gi()}addReference(i,t,n){return this.zr.addReference(n,t),this.Jr.delete(n.toString()),te.resolve()}removeReference(i,t,n){return this.zr.removeReference(n,t),this.Jr.add(n.toString()),te.resolve()}markPotentiallyOrphaned(i,t){return this.Jr.add(t.toString()),te.resolve()}removeTarget(i,t){this.zr.Vr(t.targetId).forEach(r=>this.Jr.add(r.toString()));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(i,t.targetId).next(r=>{r.forEach(s=>this.Jr.add(s.toString()))}).next(()=>n.removeTargetData(i,t))}Ur(){this.jr=new Set}Wr(i){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return te.forEach(this.Jr,n=>{const r=di.fromPath(n);return this.Yr(i,r).next(s=>{s||t.removeEntry(r,Ii.min())})}).next(()=>(this.jr=null,t.apply(i)))}updateLimboDocument(i,t){return this.Yr(i,t).next(n=>{n?this.Jr.delete(t.toString()):this.Jr.add(t.toString())})}Kr(i){return 0}Yr(i,t){return te.or([()=>te.resolve(this.zr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(i,t),()=>this.persistence.Gr(i,t)])}}class uF{constructor(i,t,n,r){this.targetId=i,this.fromCache=t,this.qi=n,this.Qi=r}static Ki(i,t){let n=fn(),r=fn();for(const s of t.docChanges)switch(s.type){case 0:n=n.add(s.doc.key);break;case 1:r=r.add(s.doc.key)}return new uF(i,t.fromCache,n,r)}}class hFt{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(i){this._documentReadCount+=i}}class q${constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function hj(){return!function rRt(){var e;const i=null===(e=eS())||void 0===e?void 0:e.forceEnvironment;if("node"===i)return!0;if("browser"===i)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}()?8:function Zj(e){const i=e.match(/Android ([\d.]+)/i),t=i?i[1].split(".").slice(0,2).join("."):"-1";return Number(t)}(function Bh(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}())>0?6:4}initialize(i,t){this.zi=i,this.indexManager=t,this.$i=!0}getDocumentsMatchingQuery(i,t,n,r){const s={result:null};return this.ji(i,t).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.Hi(i,t,r,n).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new hFt;return this.Ji(i,t,o).next(l=>{if(s.result=l,this.Ui)return this.Yi(i,t,o,l.size)})}).next(()=>s.result)}Yi(i,t,n,r){return n.documentReadCountthis.Gi*r?(pv()<=jn.DEBUG&&Fe("QueryEngine","The SDK decides to create cache indexes for query:",Cv(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(i,so(t))):te.resolve())}ji(i,t){if(RY(t))return te.resolve(null);let n=so(t);return this.indexManager.getIndexType(i,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(t=xS(t,null,"F"),n=so(t)),this.indexManager.getDocumentsMatchingTarget(i,n).next(s=>{const o=fn(...s);return this.zi.getDocuments(i,o).next(l=>this.indexManager.getMinOffset(i,n).next(w=>{const C=this.Zi(t,l);return this.Xi(t,C,o,w.readTime)?this.ji(i,xS(t,null,"F")):this.es(i,C,t,w)}))})))}Hi(i,t,n,r){return RY(t)||r.isEqual(Ii.min())?te.resolve(null):this.zi.getDocuments(i,n).next(s=>{const o=this.Zi(t,s);return this.Xi(t,o,n,r)?te.resolve(null):(pv()<=jn.DEBUG&&Fe("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Cv(t)),this.es(i,o,t,function Yj(e,i){const t=e.toTimestamp().seconds,n=e.toTimestamp().nanoseconds+1,r=Ii.fromTimestamp(1e9===n?new ns(t+1,0):new ns(t,n));return new Tl(r,di.empty(),i)}(r,-1)).next(l=>l))})}Zi(i,t){let n=new Dr(LY(i));return t.forEach((r,s)=>{ub(i,s)&&(n=n.add(s))}),n}Xi(i,t,n,r){if(null===i.limit)return!1;if(n.size!==t.size)return!0;const s="F"===i.limitType?t.last():t.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(r)>0)}Ji(i,t,n){return pv()<=jn.DEBUG&&Fe("QueryEngine","Using full collection scan to execute query:",Cv(t)),this.zi.getDocumentsMatchingQuery(i,t,Tl.min(),n)}es(i,t,n,r){return this.zi.getDocumentsMatchingQuery(i,n,r).next(s=>(t.forEach(o=>{s=s.insert(o.key,o)}),s))}}class fFt{constructor(i,t,n,r){this.persistence=i,this.ts=t,this.serializer=r,this.ns=new zr(tn),this.rs=new Tu(s=>ym(s),cb),this.ss=new Map,this.os=i.getRemoteDocumentCache(),this.Qr=i.getTargetCache(),this.$r=i.getBundleCache(),this._s(n)}_s(i){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(i),this.indexManager=this.persistence.getIndexManager(i),this.mutationQueue=this.persistence.getMutationQueue(i,this.indexManager),this.localDocuments=new Z$(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(i){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>i.collect(t,this.ns))}}function eQ(e,i){return hF.apply(this,arguments)}function hF(){return(hF=de(function*(e,i){const t=ai(e);return yield t.persistence.runTransaction("Handle user change","readonly",n=>{let r;return t.mutationQueue.getAllMutationBatches(n).next(s=>(r=s,t._s(i),t.mutationQueue.getAllMutationBatches(n))).next(s=>{const o=[],l=[];let w=fn();for(const C of r){o.push(C.batchId);for(const M of C.mutations)w=w.add(M.key)}for(const C of s){l.push(C.batchId);for(const M of C.mutations)w=w.add(M.key)}return t.localDocuments.getDocuments(n,w).next(C=>({us:C,removedBatchIds:o,addedBatchIds:l}))})})})).apply(this,arguments)}function iQ(e){const i=ai(e);return i.persistence.runTransaction("Get last remote snapshot version","readonly",t=>i.Qr.getLastRemoteSnapshotVersion(t))}function gFt(e,i){const t=ai(e);return t.persistence.runTransaction("Get next mutation batch","readonly",n=>(void 0===i&&(i=-1),t.mutationQueue.getNextMutationBatchAfterBatchId(n,i)))}function Lv(e,i,t){return fF.apply(this,arguments)}function fF(){return(fF=de(function*(e,i,t){const n=ai(e),r=n.ns.get(i),s=t?"readwrite":"readwrite-primary";try{t||(yield n.persistence.runTransaction("Release target",s,o=>n.persistence.referenceDelegate.removeTarget(o,r)))}catch(o){if(!Gh(o))throw o;Fe("LocalStore",`Failed to update sequence numbers for target ${i}: ${o}`)}n.ns=n.ns.remove(i),n.rs.delete(r.target)})).apply(this,arguments)}function OS(e,i,t){const n=ai(e);let r=Ii.min(),s=fn();return n.persistence.runTransaction("Execute query","readwrite",o=>function(w,C,M){const P=ai(w),O=P.rs.get(M);return void 0!==O?te.resolve(P.ns.get(O)):P.Qr.getTargetData(C,M)}(n,o,so(i)).next(l=>{if(l)return r=l.lastLimboFreeSnapshotVersion,n.Qr.getMatchingKeysForTargetId(o,l.targetId).next(w=>{s=w})}).next(()=>n.ts.getDocumentsMatchingQuery(o,i,t?r:Ii.min(),t?s:fn())).next(l=>(function aQ(e,i,t){let n=e.ss.get(i)||Ii.min();t.forEach((r,s)=>{s.readTime.compareTo(n)>0&&(n=s.readTime)}),e.ss.set(i,n)}(n,function OY(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}(i),l),{documents:l,hs:s})))}class xF{constructor(){this.activeTargetIds=function GP(){return yPt}()}As(i){this.activeTargetIds=this.activeTargetIds.add(i)}Rs(i){this.activeTargetIds=this.activeTargetIds.delete(i)}ds(){const i={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(i)}}class cQ{constructor(){this.no=new xF,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(i){}updateMutationState(i,t,n){}addLocalQueryTarget(i){return this.no.As(i),this.ro[i]||"not-current"}updateQueryState(i,t,n){this.ro[i]=t}removeLocalQueryTarget(i){this.no.Rs(i)}isLocalQueryTarget(i){return this.no.activeTargetIds.has(i)}clearQueryState(i){delete this.ro[i]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(i){return this.no.activeTargetIds.has(i)}start(){return this.no=new xF,Promise.resolve()}handleUserChange(i,t,n){}setOnlineState(i){}shutdown(){}writeSequenceNumber(i){}notifyBundleLoaded(i){}}class yFt{io(i){}shutdown(){}}class dQ{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(i){this.uo.push(i)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Fe("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const i of this.uo)i(0)}ao(){Fe("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const i of this.uo)i(1)}static D(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let BS=null;function bF(){return null===BS?BS=268435456+Math.round(2147483648*Math.random()):BS++,"0x"+BS.toString(16)}const bFt={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class wFt{constructor(i){this.lo=i.lo,this.ho=i.ho}Po(i){this.Io=i}To(i){this.Eo=i}Ao(i){this.Ro=i}onMessage(i){this.Vo=i}close(){this.ho()}send(i){this.lo(i)}mo(){this.Io()}fo(){this.Eo()}po(i){this.Ro(i)}yo(i){this.Vo(i)}}const oo="WebChannelConnection";class _Ft extends class{constructor(t){this.databaseInfo=t,this.databaseId=t.databaseId;const n=t.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.wo=n+"://"+t.host,this.So=`projects/${r}/databases/${s}`,this.bo="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${s}`}get Do(){return!1}Co(t,n,r,s,o){const l=bF(),w=this.vo(t,n.toUriEncodedString());Fe("RestConnection",`Sending RPC '${t}' ${l}:`,w,r);const C={"google-cloud-resource-prefix":this.So,"x-goog-request-params":this.bo};return this.Fo(C,s,o),this.Mo(t,w,C,r).then(M=>(Fe("RestConnection",`Received RPC '${t}' ${l}: `,M),M),M=>{throw _l("RestConnection",`RPC '${t}' ${l} failed with error: `,M,"url: ",w,"request:",r),M})}xo(t,n,r,s,o,l){return this.Co(t,n,r,s,o)}Fo(t,n,r){t["X-Goog-Api-Client"]="gl-js/ fire/"+mv,t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((s,o)=>t[o]=s),r&&r.headers.forEach((s,o)=>t[o]=s)}vo(t,n){return`${this.wo}/v1/${n}:${bFt[t]}`}terminate(){}}{constructor(i){super(i),this.forceLongPolling=i.forceLongPolling,this.autoDetectLongPolling=i.autoDetectLongPolling,this.useFetchStreams=i.useFetchStreams,this.longPollingOptions=i.longPollingOptions}Mo(i,t,n,r){const s=bF();return new Promise((o,l)=>{const w=new Lj;w.setWithCredentials(!0),w.listenOnce(Bj.COMPLETE,()=>{try{switch(w.getLastErrorCode()){case oS.NO_ERROR:const M=w.getResponseJson();Fe(oo,`XHR for RPC '${i}' ${s} received:`,JSON.stringify(M)),o(M);break;case oS.TIMEOUT:Fe(oo,`RPC '${i}' ${s} timed out`),l(new Oe(he.DEADLINE_EXCEEDED,"Request time out"));break;case oS.HTTP_ERROR:const P=w.getStatus();if(Fe(oo,`RPC '${i}' ${s} failed with status:`,P,"response text:",w.getResponseText()),P>0){let O=w.getResponseJson();Array.isArray(O)&&(O=O[0]);const L=O?.error;if(L&&L.status&&L.message){const U=function(W){const Z=W.toLowerCase().replace(/_/g,"-");return Object.values(he).indexOf(Z)>=0?Z:he.UNKNOWN}(L.status);l(new Oe(U,L.message))}else l(new Oe(he.UNKNOWN,"Server responded with status "+w.getStatus()))}else l(new Oe(he.UNAVAILABLE,"Connection failed."));break;default:gi()}}finally{Fe(oo,`RPC '${i}' ${s} completed.`)}});const C=JSON.stringify(r);Fe(oo,`RPC '${i}' ${s} sending request:`,r),w.send(t,"POST",C,n,15)})}Oo(i,t,n){const r=bF(),s=[this.wo,"/","google.firestore.v1.Firestore","/",i,"/channel"],o=zj(),l=Uj(),w={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},C=this.longPollingOptions.timeoutSeconds;void 0!==C&&(w.longPollingTimeout=Math.round(1e3*C)),this.useFetchStreams&&(w.xmlHttpFactory=new Nj({})),this.Fo(w.initMessageHeaders,t,n),w.encodeInitMessageHeaders=!0;const M=s.join("");Fe(oo,`Creating RPC '${i}' stream ${r}: ${M}`,w);const P=o.createWebChannel(M,w);let O=!1,L=!1;const U=new wFt({lo:W=>{L?Fe(oo,`Not sending because RPC '${i}' stream ${r} is closed:`,W):(O||(Fe(oo,`Opening RPC '${i}' stream ${r} transport.`),P.open(),O=!0),Fe(oo,`RPC '${i}' stream ${r} sending:`,W),P.send(W))},ho:()=>P.close()}),X=(W,Z,rt)=>{W.listen(Z,st=>{try{rt(st)}catch(vt){setTimeout(()=>{throw vt},0)}})};return X(P,qy.EventType.OPEN,()=>{L||(Fe(oo,`RPC '${i}' stream ${r} transport opened.`),U.mo())}),X(P,qy.EventType.CLOSE,()=>{L||(L=!0,Fe(oo,`RPC '${i}' stream ${r} transport closed`),U.po())}),X(P,qy.EventType.ERROR,W=>{L||(L=!0,_l(oo,`RPC '${i}' stream ${r} transport errored:`,W),U.po(new Oe(he.UNAVAILABLE,"The operation could not be completed")))}),X(P,qy.EventType.MESSAGE,W=>{var Z;if(!L){const rt=W.data[0];Ai(!!rt);const vt=rt.error||(null===(Z=rt[0])||void 0===Z?void 0:Z.error);if(vt){Fe(oo,`RPC '${i}' stream ${r} received error:`,vt);const _t=vt.status;let Mt=function(pt){const bt=$s[pt];if(void 0!==bt)return e$(bt)}(_t),ft=vt.message;void 0===Mt&&(Mt=he.INTERNAL,ft="Unknown error status: "+_t+" with message "+vt.message),L=!0,U.po(new Oe(Mt,ft)),P.close()}else Fe(oo,`RPC '${i}' stream ${r} received:`,rt),U.yo(rt)}}),X(l,Vj.STAT_EVENT,W=>{W.stat===AP.PROXY?Fe(oo,`RPC '${i}' stream ${r} detected buffering proxy`):W.stat===AP.NOPROXY&&Fe(oo,`RPC '${i}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{U.fo()},0),U}}function VS(){return typeof document<"u"?document:null}function Db(e){return new kPt(e,!0)}class wF{constructor(i,t,n=1e3,r=1.5,s=6e4){this.oi=i,this.timerId=t,this.No=n,this.Lo=r,this.Bo=s,this.ko=0,this.qo=null,this.Qo=Date.now(),this.reset()}reset(){this.ko=0}Ko(){this.ko=this.Bo}$o(i){this.cancel();const t=Math.floor(this.ko+this.Uo()),n=Math.max(0,Date.now()-this.Qo),r=Math.max(0,t-n);r>0&&Fe("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.ko} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.qo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Qo=Date.now(),i())),this.ko*=this.Lo,this.kothis.Bo&&(this.ko=this.Bo)}Wo(){null!==this.qo&&(this.qo.skipDelay(),this.qo=null)}cancel(){null!==this.qo&&(this.qo.cancel(),this.qo=null)}Uo(){return(Math.random()-.5)*this.ko}}class hQ{constructor(i,t,n,r,s,o,l,w){this.oi=i,this.Go=n,this.zo=r,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=l,this.listener=w,this.state=0,this.jo=0,this.Ho=null,this.Jo=null,this.stream=null,this.Yo=new wF(i,t)}Zo(){return 1===this.state||5===this.state||this.Xo()}Xo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.e_()}stop(){var i=this;return de(function*(){i.Zo()&&(yield i.close(0))})()}t_(){this.state=0,this.Yo.reset()}n_(){this.Xo()&&null===this.Ho&&(this.Ho=this.oi.enqueueAfterDelay(this.Go,6e4,()=>this.r_()))}i_(i){this.s_(),this.stream.send(i)}r_(){var i=this;return de(function*(){if(i.Xo())return i.close(0)})()}s_(){this.Ho&&(this.Ho.cancel(),this.Ho=null)}o_(){this.Jo&&(this.Jo.cancel(),this.Jo=null)}close(i,t){var n=this;return de(function*(){n.s_(),n.o_(),n.Yo.cancel(),n.jo++,4!==i?n.Yo.reset():t&&t.code===he.RESOURCE_EXHAUSTED?(ks(t.toString()),ks("Using maximum backoff delay to prevent overloading the backend."),n.Yo.Ko()):t&&t.code===he.UNAUTHENTICATED&&3!==n.state&&(n.authCredentialsProvider.invalidateToken(),n.appCheckCredentialsProvider.invalidateToken()),null!==n.stream&&(n.__(),n.stream.close(),n.stream=null),n.state=i,yield n.listener.Ao(t)})()}__(){}auth(){this.state=1;const i=this.a_(this.jo),t=this.jo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([n,r])=>{this.jo===t&&this.u_(n,r)},n=>{i(()=>{const r=new Oe(he.UNKNOWN,"Fetching auth token failed: "+n.message);return this.c_(r)})})}u_(i,t){const n=this.a_(this.jo);this.stream=this.l_(i,t),this.stream.Po(()=>{n(()=>this.listener.Po())}),this.stream.To(()=>{n(()=>(this.state=2,this.Jo=this.oi.enqueueAfterDelay(this.zo,1e4,()=>(this.Xo()&&(this.state=3),Promise.resolve())),this.listener.To()))}),this.stream.Ao(r=>{n(()=>this.c_(r))}),this.stream.onMessage(r=>{n(()=>this.onMessage(r))})}e_(){var i=this;this.state=5,this.Yo.$o(de(function*(){i.state=0,i.start()}))}c_(i){return Fe("PersistentStream",`close with error: ${i}`),this.stream=null,this.close(4,i)}a_(i){return t=>{this.oi.enqueueAndForget(()=>this.jo===i?t():(Fe("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class TFt extends hQ{constructor(i,t,n,r,s,o){super(i,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,o),this.serializer=s}l_(i,t){return this.connection.Oo("Listen",i,t)}onMessage(i){this.Yo.reset();const t=function OPt(e,i){let t;if("targetChange"in i){const n="NO_CHANGE"===(C=i.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===C?1:"REMOVE"===C?2:"CURRENT"===C?3:"RESET"===C?4:gi(),r=i.targetChange.targetIds||[],s=function(C,M){return C.useProto3Json?(Ai(void 0===M||"string"==typeof M),fa.fromBase64String(M||"")):(Ai(void 0===M||M instanceof Buffer||M instanceof Uint8Array),fa.fromUint8Array(M||new Uint8Array))}(e,i.targetChange.resumeToken),o=i.targetChange.cause,l=o&&function(C){const M=void 0===C.code?he.UNKNOWN:e$(C.code);return new Oe(M,C.message||"")}(o);t=new a$(n,r,s,l||null)}else if("documentChange"in i){const n=i.documentChange,r=pd(e,n.document.name),s=Ps(n.document.updateTime),o=n.document.createTime?Ps(n.document.createTime):Ii.min(),l=new za({mapValue:{fields:n.document.fields}}),w=$r.newFoundDocument(r,s,o,l);t=new TS(n.targetIds||[],n.removedTargetIds||[],w.key,w)}else if("documentDelete"in i){const n=i.documentDelete,r=pd(e,n.document),s=n.readTime?Ps(n.readTime):Ii.min(),o=$r.newNoDocument(r,s);t=new TS([],n.removedTargetIds||[],o.key,o)}else if("documentRemove"in i){const n=i.documentRemove,r=pd(e,n.document);t=new TS([],n.removedTargetIds||[],r,null)}else{if(!("filter"in i))return gi();{const n=i.filter,{count:r=0,unchangedNames:s}=n,o=new EPt(r,s);t=new s$(n.targetId,o)}}var C;return t}(this.serializer,i),n=function(s){if(!("targetChange"in s))return Ii.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Ii.min():o.readTime?Ps(o.readTime):Ii.min()}(i);return this.listener.h_(t,n)}P_(i){const t={};t.database=ZP(this.serializer),t.addTarget=function(s,o){let l;const w=o.target;if(l=gS(w)?{documents:v$(s,w)}:{query:CS(s,w)._t},l.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){l.resumeToken=d$(s,o.resumeToken);const C=$P(s,o.expectedCount);null!==C&&(l.expectedCount=C)}else if(o.snapshotVersion.compareTo(Ii.min())>0){l.readTime=Mv(s,o.snapshotVersion.toTimestamp());const C=$P(s,o.expectedCount);null!==C&&(l.expectedCount=C)}return l}(this.serializer,i);const n=function NPt(e,i){const t=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return gi()}}(i.purpose);return null==t?null:{"goog-listen-tags":t}}(0,i);n&&(t.labels=n),this.i_(t)}I_(i){const t={};t.database=ZP(this.serializer),t.removeTarget=i,this.i_(t)}}class CFt extends hQ{constructor(i,t,n,r,s,o){super(i,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,o),this.serializer=s,this.T_=!1}get E_(){return this.T_}start(){this.T_=!1,this.lastStreamToken=void 0,super.start()}__(){this.T_&&this.d_([])}l_(i,t){return this.connection.Oo("Write",i,t)}onMessage(i){if(Ai(!!i.streamToken),this.lastStreamToken=i.streamToken,this.T_){this.Yo.reset();const t=function LPt(e,i){return e&&e.length>0?(Ai(void 0!==i),e.map(t=>function(r,s){let o=Ps(r.updateTime?r.updateTime:s);return o.isEqual(Ii.min())&&(o=Ps(s)),new TPt(o,r.transformResults||[])}(t,i))):[]}(i.writeResults,i.commitTime),n=Ps(i.commitTime);return this.listener.A_(n,t)}return Ai(!i.writeResults||0===i.writeResults.length),this.T_=!0,this.listener.R_()}V_(){const i={};i.database=ZP(this.serializer),this.i_(i)}d_(i){const t={streamToken:this.lastStreamToken,writes:i.map(n=>function bb(e,i){let t;if(i instanceof Av)t={update:p$(e,i.key,i.value)};else if(i instanceof Dv)t={delete:yb(e,i.key)};else if(i instanceof Cu)t={update:p$(e,i.key,i.data),updateMask:zPt(i.fieldMask)};else{if(!(i instanceof HP))return gi();t={verify:yb(e,i.key)}}return i.fieldTransforms.length>0&&(t.updateTransforms=i.fieldTransforms.map(n=>function(s,o){const l=o.transform;if(l instanceof Sv)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(l instanceof bm)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:l.elements}};if(l instanceof wm)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:l.elements}};if(l instanceof Ev)return{fieldPath:o.field.canonicalString(),increment:l.Pe};throw gi()}(0,n))),i.precondition.isNone||(t.currentDocument=void 0!==(s=i.precondition).updateTime?{updateTime:PPt(e,s.updateTime)}:void 0!==s.exists?{exists:s.exists}:gi()),t;var s}(this.serializer,n))};this.i_(t)}}class SFt extends class{}{constructor(i,t,n,r){super(),this.authCredentials=i,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.m_=!1}f_(){if(this.m_)throw new Oe(he.FAILED_PRECONDITION,"The client has already been terminated.")}Co(i,t,n,r){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Co(i,KP(t,n),r,s,o)).catch(s=>{throw"FirebaseError"===s.name?(s.code===he.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Oe(he.UNKNOWN,s.toString())})}xo(i,t,n,r,s){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,l])=>this.connection.xo(i,KP(t,n),r,o,l,s)).catch(o=>{throw"FirebaseError"===o.name?(o.code===he.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Oe(he.UNKNOWN,o.toString())})}terminate(){this.m_=!0,this.connection.terminate()}}class EFt{constructor(i,t){this.asyncQueue=i,this.onlineStateHandler=t,this.state="Unknown",this.g_=0,this.p_=null,this.y_=!0}w_(){0===this.g_&&(this.S_("Unknown"),this.p_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.p_=null,this.b_("Backend didn't respond within 10 seconds."),this.S_("Offline"),Promise.resolve())))}D_(i){"Online"===this.state?this.S_("Unknown"):(this.g_++,this.g_>=1&&(this.C_(),this.b_(`Connection failed 1 times. Most recent error: ${i.toString()}`),this.S_("Offline")))}set(i){this.C_(),this.g_=0,"Online"===i&&(this.y_=!1),this.S_(i)}S_(i){i!==this.state&&(this.state=i,this.onlineStateHandler(i))}b_(i){const t=`Could not reach Cloud Firestore backend. ${i}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.y_?(ks(t),this.y_=!1):Fe("OnlineStateTracker",t)}C_(){null!==this.p_&&(this.p_.cancel(),this.p_=null)}}class AFt{constructor(i,t,n,r,s){var o=this;this.localStore=i,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.v_=[],this.F_=new Map,this.M_=new Set,this.x_=[],this.O_=s,this.O_.io(l=>{n.enqueueAndForget(de(function*(){var w;Jh(o)&&(Fe("RemoteStore","Restarting streams for network reachability change."),yield(w=de(function*(M){const P=ai(M);P.M_.add(4),yield Nv(P),P.N_.set("Unknown"),P.M_.delete(4),yield Mb(P)}),function C(M){return w.apply(this,arguments)})(o))}))}),this.N_=new EFt(n,r)}}function Mb(e){return _F.apply(this,arguments)}function _F(){return(_F=de(function*(e){if(Jh(e))for(const i of e.x_)yield i(!0)})).apply(this,arguments)}function Nv(e){return TF.apply(this,arguments)}function TF(){return(TF=de(function*(e){for(const i of e.x_)yield i(!1)})).apply(this,arguments)}function US(e,i){const t=ai(e);t.F_.has(i.targetId)||(t.F_.set(i.targetId,i),EF(t)?SF(t):Uv(t).Xo()&&CF(t,i))}function Bv(e,i){const t=ai(e),n=Uv(t);t.F_.delete(i),n.Xo()&&fQ(t,i),0===t.F_.size&&(n.Xo()?n.n_():Jh(t)&&t.N_.set("Unknown"))}function CF(e,i){if(e.L_.xe(i.targetId),i.resumeToken.approximateByteSize()>0||i.snapshotVersion.compareTo(Ii.min())>0){const t=e.remoteSyncer.getRemoteKeysForTarget(i.targetId).size;i=i.withExpectedCount(t)}Uv(e).P_(i)}function fQ(e,i){e.L_.xe(i),Uv(e).I_(i)}function SF(e){e.L_=new DPt({getRemoteKeysForTarget:i=>e.remoteSyncer.getRemoteKeysForTarget(i),ot:i=>e.F_.get(i)||null,tt:()=>e.datastore.serializer.databaseId}),Uv(e).start(),e.N_.w_()}function EF(e){return Jh(e)&&!Uv(e).Zo()&&e.F_.size>0}function Jh(e){return 0===ai(e).M_.size}function mQ(e){e.L_=void 0}function DFt(e){return AF.apply(this,arguments)}function AF(){return(AF=de(function*(e){e.N_.set("Online")})).apply(this,arguments)}function MFt(e){return DF.apply(this,arguments)}function DF(){return(DF=de(function*(e){e.F_.forEach((i,t)=>{CF(e,i)})})).apply(this,arguments)}function IFt(e,i){return MF.apply(this,arguments)}function MF(){return(MF=de(function*(e,i){mQ(e),EF(e)?(e.N_.D_(i),SF(e)):e.N_.set("Unknown")})).apply(this,arguments)}function RFt(e,i,t){return IF.apply(this,arguments)}function IF(){return IF=de(function*(e,i,t){if(e.N_.set("Online"),i instanceof a$&&2===i.state&&i.cause)try{yield(n=de(function*(s,o){const l=o.cause;for(const w of o.targetIds)s.F_.has(w)&&(yield s.remoteSyncer.rejectListen(w,l),s.F_.delete(w),s.L_.removeTarget(w))}),function r(s,o){return n.apply(this,arguments)})(e,i)}catch(n){Fe("RemoteStore","Failed to remove targets %s: %s ",i.targetIds.join(","),n),yield zS(e,n)}else if(i instanceof TS?e.L_.Ke(i):i instanceof s$?e.L_.He(i):e.L_.We(i),!t.isEqual(Ii.min()))try{const n=yield iQ(e.localStore);t.compareTo(n)>=0&&(yield function(s,o){const l=s.L_.rt(o);return l.targetChanges.forEach((w,C)=>{if(w.resumeToken.approximateByteSize()>0){const M=s.F_.get(C);M&&s.F_.set(C,M.withResumeToken(w.resumeToken,o))}}),l.targetMismatches.forEach((w,C)=>{const M=s.F_.get(w);if(!M)return;s.F_.set(w,M.withResumeToken(fa.EMPTY_BYTE_STRING,M.snapshotVersion)),fQ(s,w);const P=new Su(M.target,w,C,M.sequenceNumber);CF(s,P)}),s.remoteSyncer.applyRemoteEvent(l)}(e,t))}catch(n){Fe("RemoteStore","Failed to raise snapshot:",n),yield zS(e,n)}var n}),IF.apply(this,arguments)}function zS(e,i,t){return RF.apply(this,arguments)}function RF(){return(RF=de(function*(e,i,t){if(!Gh(i))throw i;e.M_.add(1),yield Nv(e),e.N_.set("Offline"),t||(t=()=>iQ(e.localStore)),e.asyncQueue.enqueueRetryable(de(function*(){Fe("RemoteStore","Retrying IndexedDB access"),yield t(),e.M_.delete(1),yield Mb(e)}))})).apply(this,arguments)}function pQ(e,i){return i().catch(t=>zS(e,t,i))}function Vv(e){return kF.apply(this,arguments)}function kF(){return(kF=de(function*(e){const i=ai(e),t=qh(i);let n=i.v_.length>0?i.v_[i.v_.length-1].batchId:-1;for(;kFt(i);)try{const r=yield gFt(i.localStore,n);if(null===r){0===i.v_.length&&t.n_();break}n=r.batchId,PFt(i,r)}catch(r){yield zS(i,r)}gQ(i)&&vQ(i)})).apply(this,arguments)}function kFt(e){return Jh(e)&&e.v_.length<10}function PFt(e,i){e.v_.push(i);const t=qh(e);t.Xo()&&t.E_&&t.d_(i.mutations)}function gQ(e){return Jh(e)&&!qh(e).Zo()&&e.v_.length>0}function vQ(e){qh(e).start()}function FFt(e){return PF.apply(this,arguments)}function PF(){return(PF=de(function*(e){qh(e).V_()})).apply(this,arguments)}function OFt(e){return FF.apply(this,arguments)}function FF(){return(FF=de(function*(e){const i=qh(e);for(const t of e.v_)i.d_(t.mutations)})).apply(this,arguments)}function LFt(e,i,t){return OF.apply(this,arguments)}function OF(){return(OF=de(function*(e,i,t){const n=e.v_.shift(),r=XP.from(n,i,t);yield pQ(e,()=>e.remoteSyncer.applySuccessfulWrite(r)),yield Vv(e)})).apply(this,arguments)}function NFt(e,i){return LF.apply(this,arguments)}function LF(){return LF=de(function*(e,i){var t;i&&qh(e).E_&&(yield(t=de(function*(r,s){if(function t$(e){switch(e){default:return gi();case he.CANCELLED:case he.UNKNOWN:case he.DEADLINE_EXCEEDED:case he.RESOURCE_EXHAUSTED:case he.INTERNAL:case he.UNAVAILABLE:case he.UNAUTHENTICATED:return!1;case he.INVALID_ARGUMENT:case he.NOT_FOUND:case he.ALREADY_EXISTS:case he.PERMISSION_DENIED:case he.FAILED_PRECONDITION:case he.ABORTED:case he.OUT_OF_RANGE:case he.UNIMPLEMENTED:case he.DATA_LOSS:return!0}}(l=s.code)&&l!==he.ABORTED){const o=r.v_.shift();qh(r).t_(),yield pQ(r,()=>r.remoteSyncer.rejectFailedWrite(o.batchId,s)),yield Vv(r)}var l}),function n(r,s){return t.apply(this,arguments)})(e,i)),gQ(e)&&vQ(e)}),LF.apply(this,arguments)}function xQ(e,i){return NF.apply(this,arguments)}function NF(){return(NF=de(function*(e,i){const t=ai(e);t.asyncQueue.verifyOperationInProgress(),Fe("RemoteStore","RemoteStore received new credentials");const n=Jh(t);t.M_.add(3),yield Nv(t),n&&t.N_.set("Unknown"),yield t.remoteSyncer.handleCredentialChange(i),t.M_.delete(3),yield Mb(t)})).apply(this,arguments)}function BF(e,i){return VF.apply(this,arguments)}function VF(){return(VF=de(function*(e,i){const t=ai(e);i?(t.M_.delete(2),yield Mb(t)):i||(t.M_.add(2),yield Nv(t),t.N_.set("Unknown"))})).apply(this,arguments)}function Uv(e){return e.B_||(e.B_=function(t,n,r){const s=ai(t);return s.f_(),new TFt(n,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(e.datastore,e.asyncQueue,{Po:DFt.bind(null,e),To:MFt.bind(null,e),Ao:IFt.bind(null,e),h_:RFt.bind(null,e)}),e.x_.push(function(){var i=de(function*(t){t?(e.B_.t_(),EF(e)?SF(e):e.N_.set("Unknown")):(yield e.B_.stop(),mQ(e))});return function(t){return i.apply(this,arguments)}}())),e.B_}function qh(e){return e.k_||(e.k_=function(t,n,r){const s=ai(t);return s.f_(),new CFt(n,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(e.datastore,e.asyncQueue,{Po:()=>Promise.resolve(),To:FFt.bind(null,e),Ao:NFt.bind(null,e),R_:OFt.bind(null,e),A_:LFt.bind(null,e)}),e.x_.push(function(){var i=de(function*(t){t?(e.k_.t_(),yield Vv(e)):(yield e.k_.stop(),e.v_.length>0&&(Fe("RemoteStore",`Stopping write stream with ${e.v_.length} pending writes`),e.v_=[]))});return function(t){return i.apply(this,arguments)}}())),e.k_}class UF{constructor(i,t,n,r,s){this.asyncQueue=i,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=s,this.deferred=new ha,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(i,t,n,r,s){const o=Date.now()+n,l=new UF(i,t,o,r,s);return l.start(n),l}start(i){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),i)}skipDelay(){return this.handleDelayElapsed()}cancel(i){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Oe(he.CANCELLED,"Operation cancelled"+(i?": "+i:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(i=>this.deferred.resolve(i))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function zv(e,i){if(ks("AsyncQueue",`${i}: ${e}`),Gh(e))return new Oe(he.UNAVAILABLE,`${i}: ${e}`);throw e}class Gv{constructor(i){this.comparator=i?(t,n)=>i(t,n)||di.comparator(t.key,n.key):(t,n)=>di.comparator(t.key,n.key),this.keyedMap=hb(),this.sortedSet=new zr(this.comparator)}static emptySet(i){return new Gv(i.comparator)}has(i){return null!=this.keyedMap.get(i)}get(i){return this.keyedMap.get(i)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(i){const t=this.keyedMap.get(i);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(i){this.sortedSet.inorderTraversal((t,n)=>(i(t),!1))}add(i){const t=this.delete(i.key);return t.copy(t.keyedMap.insert(i.key,i),t.sortedSet.insert(i,null))}delete(i){const t=this.get(i);return t?this.copy(this.keyedMap.remove(i),this.sortedSet.remove(t)):this}isEqual(i){if(!(i instanceof Gv)||this.size!==i.size)return!1;const t=this.sortedSet.getIterator(),n=i.sortedSet.getIterator();for(;t.hasNext();){const r=t.getNext().key,s=n.getNext().key;if(!r.isEqual(s))return!1}return!0}toString(){const i=[];return this.forEach(t=>{i.push(t.toString())}),0===i.length?"DocumentSet ()":"DocumentSet (\n "+i.join(" \n")+"\n)"}copy(i,t){const n=new Gv;return n.comparator=this.comparator,n.keyedMap=i,n.sortedSet=t,n}}class yQ{constructor(){this.q_=new zr(di.comparator)}track(i){const t=i.doc.key,n=this.q_.get(t);n?0!==i.type&&3===n.type?this.q_=this.q_.insert(t,i):3===i.type&&1!==n.type?this.q_=this.q_.insert(t,{type:n.type,doc:i.doc}):2===i.type&&2===n.type?this.q_=this.q_.insert(t,{type:2,doc:i.doc}):2===i.type&&0===n.type?this.q_=this.q_.insert(t,{type:0,doc:i.doc}):1===i.type&&0===n.type?this.q_=this.q_.remove(t):1===i.type&&2===n.type?this.q_=this.q_.insert(t,{type:1,doc:n.doc}):0===i.type&&1===n.type?this.q_=this.q_.insert(t,{type:2,doc:i.doc}):gi():this.q_=this.q_.insert(t,i)}Q_(){const i=[];return this.q_.inorderTraversal((t,n)=>{i.push(n)}),i}}class Hv{constructor(i,t,n,r,s,o,l,w,C){this.query=i,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=l,this.excludesMetadataChanges=w,this.hasCachedResults=C}static fromInitialDocuments(i,t,n,r,s){const o=[];return t.forEach(l=>{o.push({type:0,doc:l})}),new Hv(i,t,Gv.emptySet(t),o,n,r,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(i){if(!(this.fromCache===i.fromCache&&this.hasCachedResults===i.hasCachedResults&&this.syncStateChanged===i.syncStateChanged&&this.mutatedKeys.isEqual(i.mutatedKeys)&&db(this.query,i.query)&&this.docs.isEqual(i.docs)&&this.oldDocs.isEqual(i.oldDocs)))return!1;const t=this.docChanges,n=i.docChanges;if(t.length!==n.length)return!1;for(let r=0;ri.G_())}}class VFt{constructor(){this.queries=new Tu(i=>FY(i),db),this.onlineState="Unknown",this.z_=new Set}}function GF(){return(GF=de(function*(e,i){const t=ai(e);let n=3;const r=i.query;let s=t.queries.get(r);s?!s.W_()&&i.G_()&&(n=2):(s=new BFt,n=i.G_()?0:1);try{switch(n){case 0:s.K_=yield t.onListen(r,!0);break;case 1:s.K_=yield t.onListen(r,!1);break;case 2:yield t.onFirstRemoteStoreListen(r)}}catch(o){const l=zv(o,`Initialization of query '${Cv(i.query)}' failed`);return void i.onError(l)}t.queries.set(r,s),s.U_.push(i),i.j_(t.onlineState),s.K_&&i.H_(s.K_)&&XF(t)})).apply(this,arguments)}function WF(){return(WF=de(function*(e,i){const t=ai(e),n=i.query;let r=3;const s=t.queries.get(n);if(s){const o=s.U_.indexOf(i);o>=0&&(s.U_.splice(o,1),0===s.U_.length?r=i.G_()?0:1:!s.W_()&&i.G_()&&(r=2))}switch(r){case 0:return t.queries.delete(n),t.onUnlisten(n,!0);case 1:return t.queries.delete(n),t.onUnlisten(n,!1);case 2:return t.onLastRemoteStoreUnlisten(n);default:return}})).apply(this,arguments)}function UFt(e,i){const t=ai(e);let n=!1;for(const r of i){const o=t.queries.get(r.query);if(o){for(const l of o.U_)l.H_(r)&&(n=!0);o.K_=r}}n&&XF(t)}function zFt(e,i,t){const n=ai(e),r=n.queries.get(i);if(r)for(const s of r.U_)s.onError(t);n.queries.delete(i)}function XF(e){e.z_.forEach(i=>{i.next()})}var jF,bQ;(bQ=jF||(jF={})).J_="default",bQ.Cache="cache";class YF{constructor(i,t,n){this.query=i,this.Y_=t,this.Z_=!1,this.X_=null,this.onlineState="Unknown",this.options=n||{}}H_(i){if(!this.options.includeMetadataChanges){const n=[];for(const r of i.docChanges)3!==r.type&&n.push(r);i=new Hv(i.query,i.docs,i.oldDocs,n,i.mutatedKeys,i.fromCache,i.syncStateChanged,!0,i.hasCachedResults)}let t=!1;return this.Z_?this.ea(i)&&(this.Y_.next(i),t=!0):this.ta(i,this.onlineState)&&(this.na(i),t=!0),this.X_=i,t}onError(i){this.Y_.error(i)}j_(i){this.onlineState=i;let t=!1;return this.X_&&!this.Z_&&this.ta(this.X_,i)&&(this.na(this.X_),t=!0),t}ta(i,t){return!i.fromCache||!this.G_()||(!this.options.ra||!("Offline"!==t))&&(!i.docs.isEmpty()||i.hasCachedResults||"Offline"===t)}ea(i){return i.docChanges.length>0||!!(i.syncStateChanged||this.X_&&this.X_.hasPendingWrites!==i.hasPendingWrites)&&!0===this.options.includeMetadataChanges}na(i){i=Hv.fromInitialDocuments(i.query,i.docs,i.mutatedKeys,i.fromCache,i.hasCachedResults),this.Z_=!0,this.Y_.next(i)}G_(){return this.options.source!==jF.Cache}}class TQ{constructor(i){this.key=i}}class CQ{constructor(i){this.key=i}}class SQ{constructor(i,t){this.query=i,this.la=t,this.ha=null,this.hasCachedResults=!1,this.current=!1,this.Pa=fn(),this.mutatedKeys=fn(),this.Ia=LY(i),this.Ta=new Gv(this.Ia)}get Ea(){return this.la}da(i,t){const n=t?t.Aa:new yQ,r=t?t.Ta:this.Ta;let s=t?t.mutatedKeys:this.mutatedKeys,o=r,l=!1;const w="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,C="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(i.inorderTraversal((M,P)=>{const O=r.get(M),L=ub(this.query,P)?P:null,U=!!O&&this.mutatedKeys.has(O.key),X=!!L&&(L.hasLocalMutations||this.mutatedKeys.has(L.key)&&L.hasCommittedMutations);let W=!1;O&&L?O.data.isEqual(L.data)?U!==X&&(n.track({type:3,doc:L}),W=!0):this.Ra(O,L)||(n.track({type:2,doc:L}),W=!0,(w&&this.Ia(L,w)>0||C&&this.Ia(L,C)<0)&&(l=!0)):!O&&L?(n.track({type:0,doc:L}),W=!0):O&&!L&&(n.track({type:1,doc:O}),W=!0,(w||C)&&(l=!0)),W&&(L?(o=o.add(L),s=X?s.add(M):s.delete(M)):(o=o.delete(M),s=s.delete(M)))}),null!==this.query.limit)for(;o.size>this.query.limit;){const M="F"===this.query.limitType?o.last():o.first();o=o.delete(M.key),s=s.delete(M.key),n.track({type:1,doc:M})}return{Ta:o,Aa:n,Xi:l,mutatedKeys:s}}Ra(i,t){return i.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(i,t,n,r){const s=this.Ta;this.Ta=i.Ta,this.mutatedKeys=i.mutatedKeys;const o=i.Aa.Q_();o.sort((M,P)=>function(L,U){const X=W=>{switch(W){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return gi()}};return X(L)-X(U)}(M.type,P.type)||this.Ia(M.doc,P.doc)),this.Va(n),r=null!=r&&r;const l=t&&!r?this.ma():[],w=0===this.Pa.size&&this.current&&!r?1:0,C=w!==this.ha;return this.ha=w,0!==o.length||C?{snapshot:new Hv(this.query,i.Ta,s,o,i.mutatedKeys,0===w,C,!1,!!n&&n.resumeToken.approximateByteSize()>0),fa:l}:{fa:l}}j_(i){return this.current&&"Offline"===i?(this.current=!1,this.applyChanges({Ta:this.Ta,Aa:new yQ,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{fa:[]}}ga(i){return!this.la.has(i)&&!!this.Ta.has(i)&&!this.Ta.get(i).hasLocalMutations}Va(i){i&&(i.addedDocuments.forEach(t=>this.la=this.la.add(t)),i.modifiedDocuments.forEach(t=>{}),i.removedDocuments.forEach(t=>this.la=this.la.delete(t)),this.current=i.current)}ma(){if(!this.current)return[];const i=this.Pa;this.Pa=fn(),this.Ta.forEach(n=>{this.ga(n.key)&&(this.Pa=this.Pa.add(n.key))});const t=[];return i.forEach(n=>{this.Pa.has(n)||t.push(new CQ(n))}),this.Pa.forEach(n=>{i.has(n)||t.push(new TQ(n))}),t}pa(i){this.la=i.hs,this.Pa=fn();const t=this.da(i.documents);return this.applyChanges(t,!0)}ya(){return Hv.fromInitialDocuments(this.query,this.Ta,this.mutatedKeys,0===this.ha,this.hasCachedResults)}}class WFt{constructor(i,t,n){this.query=i,this.targetId=t,this.view=n}}class XFt{constructor(i){this.key=i,this.wa=!1}}class jFt{constructor(i,t,n,r,s,o){this.localStore=i,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Sa={},this.ba=new Tu(l=>FY(l),db),this.Da=new Map,this.Ca=new Set,this.va=new zr(di.comparator),this.Fa=new Map,this.Ma=new aF,this.xa={},this.Oa=new Map,this.Na=Am.Ln(),this.onlineState="Unknown",this.La=void 0}get isPrimaryClient(){return!0===this.La}}function YFt(e,i){return $F.apply(this,arguments)}function $F(){return($F=de(function*(e,i,t=!0){const n=GS(e);let r;const s=n.ba.get(i);return s?(n.sharedClientState.addLocalQueryTarget(s.targetId),r=s.view.ya()):r=yield EQ(n,i,t,!0),r})).apply(this,arguments)}function $Ft(e,i){return QF.apply(this,arguments)}function QF(){return(QF=de(function*(e,i){const t=GS(e);yield EQ(t,i,!0,!1)})).apply(this,arguments)}function EQ(e,i,t,n){return KF.apply(this,arguments)}function KF(){return(KF=de(function*(e,i,t,n){const r=yield function Ov(e,i){const t=ai(e);return t.persistence.runTransaction("Allocate target","readwrite",n=>{let r;return t.Qr.getTargetData(n,i).next(s=>s?(r=s,te.resolve(r)):t.Qr.allocateTargetId(n).next(o=>(r=new Su(i,o,"TargetPurposeListen",n.currentSequenceNumber),t.Qr.addTargetData(n,r).next(()=>r))))}).then(n=>{const r=t.ns.get(n.targetId);return(null===r||n.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(t.ns=t.ns.insert(n.targetId,n),t.rs.set(i,n.targetId)),n})}(e.localStore,so(i)),s=r.targetId,o=t?e.sharedClientState.addLocalQueryTarget(s):"not-current";let l;return n&&(l=yield function ZF(e,i,t,n,r){return JF.apply(this,arguments)}(e,i,s,"current"===o,r.resumeToken)),e.isPrimaryClient&&t&&US(e.remoteStore,r),l})).apply(this,arguments)}function JF(){return JF=de(function*(e,i,t,n,r){e.Ba=(P,O,L)=>{return(U=de(function*(W,Z,rt,st){let vt=Z.view.da(rt);vt.Xi&&(vt=yield OS(W.localStore,Z.query,!1).then(({documents:dt})=>Z.view.da(dt,vt)));const _t=st&&st.targetChanges.get(Z.targetId),Mt=st&&null!=st.targetMismatches.get(Z.targetId),ft=Z.view.applyChanges(vt,W.isPrimaryClient,_t,Mt);return cO(W,Z.targetId,ft.fa),ft.snapshot}),function X(W,Z,rt,st){return U.apply(this,arguments)})(e,P,O,L);var U};const s=yield OS(e.localStore,i,!0),o=new SQ(i,s.hs),l=o.da(s.documents),w=xb.createSynthesizedTargetChangeForCurrentChange(t,n&&"Offline"!==e.onlineState,r),C=o.applyChanges(l,e.isPrimaryClient,w);cO(e,t,C.fa);const M=new WFt(i,t,o);return e.ba.set(i,M),e.Da.has(t)?e.Da.get(t).push(i):e.Da.set(t,[i]),C.snapshot}),JF.apply(this,arguments)}function QFt(e,i,t){return qF.apply(this,arguments)}function qF(){return(qF=de(function*(e,i,t){const n=ai(e),r=n.ba.get(i),s=n.Da.get(r.targetId);if(s.length>1)return n.Da.set(r.targetId,s.filter(o=>!db(o,i))),void n.ba.delete(i);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||(yield Lv(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),t&&Bv(n.remoteStore,r.targetId),Wv(n,r.targetId)}).catch(zh))):(Wv(n,r.targetId),yield Lv(n.localStore,r.targetId,!0))})).apply(this,arguments)}function KFt(e,i){return tO.apply(this,arguments)}function tO(){return(tO=de(function*(e,i){const t=ai(e),n=t.ba.get(i),r=t.Da.get(n.targetId);t.isPrimaryClient&&1===r.length&&(t.sharedClientState.removeLocalQueryTarget(n.targetId),Bv(t.remoteStore,n.targetId))})).apply(this,arguments)}function eO(){return(eO=de(function*(e,i,t){const n=function bO(e){const i=ai(e);return i.remoteStore.remoteSyncer.applySuccessfulWrite=qFt.bind(null,i),i.remoteStore.remoteSyncer.rejectFailedWrite=tOt.bind(null,i),i}(e);try{const r=yield function(o,l){const w=ai(o),C=ns.now(),M=l.reduce((L,U)=>L.add(U.key),fn());let P,O;return w.persistence.runTransaction("Locally write mutations","readwrite",L=>{let U=tl(),X=fn();return w.os.getEntries(L,M).next(W=>{U=W,U.forEach((Z,rt)=>{rt.isValidDocument()||(X=X.add(Z))})}).next(()=>w.localDocuments.getOverlayedDocuments(L,U)).next(W=>{P=W;const Z=[];for(const rt of l){const st=SPt(rt,P.get(rt.key).overlayedDocument);null!=st&&Z.push(new Cu(rt.key,st,xY(st.value.mapValue),ss.exists(!0)))}return w.mutationQueue.addMutationBatch(L,C,Z,l)}).next(W=>{O=W;const Z=W.applyToLocalDocumentSet(P,X);return w.documentOverlayCache.saveOverlays(L,W.batchId,Z)})}).then(()=>({batchId:O.batchId,changes:BY(P)}))}(n.localStore,i);n.sharedClientState.addPendingMutation(r.batchId),function(o,l,w){let C=o.xa[o.currentUser.toKey()];C||(C=new zr(tn)),C=C.insert(l,w),o.xa[o.currentUser.toKey()]=C}(n,r.batchId,t),yield Eu(n,r.changes),yield Vv(n.remoteStore)}catch(r){const s=zv(r,"Failed to persist write");t.reject(s)}})).apply(this,arguments)}function AQ(e,i){return iO.apply(this,arguments)}function iO(){return(iO=de(function*(e,i){const t=ai(e);try{const n=yield function pFt(e,i){const t=ai(e),n=i.snapshotVersion;let r=t.ns;return t.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=t.os.newChangeBuffer({trackRemovals:!0});r=t.ns;const l=[];i.targetChanges.forEach((M,P)=>{const O=r.get(P);if(!O)return;l.push(t.Qr.removeMatchingKeys(s,M.removedDocuments,P).next(()=>t.Qr.addMatchingKeys(s,M.addedDocuments,P)));let L=O.withSequenceNumber(s.currentSequenceNumber);var X,W,Z;null!==i.targetMismatches.get(P)?L=L.withResumeToken(fa.EMPTY_BYTE_STRING,Ii.min()).withLastLimboFreeSnapshotVersion(Ii.min()):M.resumeToken.approximateByteSize()>0&&(L=L.withResumeToken(M.resumeToken,n)),r=r.insert(P,L),W=L,Z=M,(0===(X=O).resumeToken.approximateByteSize()||W.snapshotVersion.toMicroseconds()-X.snapshotVersion.toMicroseconds()>=3e8||Z.addedDocuments.size+Z.modifiedDocuments.size+Z.removedDocuments.size>0)&&l.push(t.Qr.updateTargetData(s,L))});let w=tl(),C=fn();if(i.documentUpdates.forEach(M=>{i.resolvedLimboDocuments.has(M)&&l.push(t.persistence.referenceDelegate.updateLimboDocument(s,M))}),l.push(function nQ(e,i,t){let n=fn(),r=fn();return t.forEach(s=>n=n.add(s)),i.getEntries(e,n).next(s=>{let o=tl();return t.forEach((l,w)=>{const C=s.get(l);w.isFoundDocument()!==C.isFoundDocument()&&(r=r.add(l)),w.isNoDocument()&&w.version.isEqual(Ii.min())?(i.removeEntry(l,w.readTime),o=o.insert(l,w)):!C.isValidDocument()||w.version.compareTo(C.version)>0||0===w.version.compareTo(C.version)&&C.hasPendingWrites?(i.addEntry(w),o=o.insert(l,w)):Fe("LocalStore","Ignoring outdated watch update for ",l,". Current version:",C.version," Watch version:",w.version)}),{cs:o,ls:r}})}(s,o,i.documentUpdates).next(M=>{w=M.cs,C=M.ls})),!n.isEqual(Ii.min())){const M=t.Qr.getLastRemoteSnapshotVersion(s).next(P=>t.Qr.setTargetsMetadata(s,s.currentSequenceNumber,n));l.push(M)}return te.waitFor(l).next(()=>o.apply(s)).next(()=>t.localDocuments.getLocalViewOfDocuments(s,w,C)).next(()=>w)}).then(s=>(t.ns=r,s))}(t.localStore,i);i.targetChanges.forEach((r,s)=>{const o=t.Fa.get(s);o&&(Ai(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?o.wa=!0:r.modifiedDocuments.size>0?Ai(o.wa):r.removedDocuments.size>0&&(Ai(o.wa),o.wa=!1))}),yield Eu(t,n,i)}catch(n){yield zh(n)}})).apply(this,arguments)}function DQ(e,i,t){const n=ai(e);if(n.isPrimaryClient&&0===t||!n.isPrimaryClient&&1===t){const r=[];n.ba.forEach((s,o)=>{const l=o.view.j_(i);l.snapshot&&r.push(l.snapshot)}),function(o,l){const w=ai(o);w.onlineState=l;let C=!1;w.queries.forEach((M,P)=>{for(const O of P.U_)O.j_(l)&&(C=!0)}),C&&XF(w)}(n.eventManager,i),r.length&&n.Sa.h_(r),n.onlineState=i,n.isPrimaryClient&&n.sharedClientState.setOnlineState(i)}}function JFt(e,i,t){return nO.apply(this,arguments)}function nO(){return(nO=de(function*(e,i,t){const n=ai(e);n.sharedClientState.updateQueryState(i,"rejected",t);const r=n.Fa.get(i),s=r&&r.key;if(s){let o=new zr(di.comparator);o=o.insert(s,$r.newNoDocument(s,Ii.min()));const l=fn().add(s),w=new vb(Ii.min(),new Map,new zr(tn),o,l);yield AQ(n,w),n.va=n.va.remove(s),n.Fa.delete(i),dO(n)}else yield Lv(n.localStore,i,!1).then(()=>Wv(n,i,t)).catch(zh)})).apply(this,arguments)}function qFt(e,i){return rO.apply(this,arguments)}function rO(){return(rO=de(function*(e,i){const t=ai(e),n=i.batch.batchId;try{const r=yield function mFt(e,i){const t=ai(e);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",n=>{const r=i.batch.keys(),s=t.os.newChangeBuffer({trackRemovals:!0});return function(l,w,C,M){const P=C.batch,O=P.keys();let L=te.resolve();return O.forEach(U=>{L=L.next(()=>M.getEntry(w,U)).next(X=>{const W=C.docVersions.get(U);Ai(null!==W),X.version.compareTo(W)<0&&(P.applyToRemoteDocument(X,C),X.isValidDocument()&&(X.setReadTime(C.commitVersion),M.addEntry(X)))})}),L.next(()=>l.mutationQueue.removeMutationBatch(w,P))}(t,n,i,s).next(()=>s.apply(n)).next(()=>t.mutationQueue.performConsistencyCheck(n)).next(()=>t.documentOverlayCache.removeOverlaysForBatchId(n,r,i.batch.batchId)).next(()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(n,function(l){let w=fn();for(let C=0;C0&&(w=w.add(l.batch.mutations[C].key));return w}(i))).next(()=>t.localDocuments.getDocuments(n,r))})}(t.localStore,i);lO(t,n,null),oO(t,n),t.sharedClientState.updateMutationState(n,"acknowledged"),yield Eu(t,r)}catch(r){yield zh(r)}})).apply(this,arguments)}function tOt(e,i,t){return sO.apply(this,arguments)}function sO(){return(sO=de(function*(e,i,t){const n=ai(e);try{const r=yield function(o,l){const w=ai(o);return w.persistence.runTransaction("Reject batch","readwrite-primary",C=>{let M;return w.mutationQueue.lookupMutationBatch(C,l).next(P=>(Ai(null!==P),M=P.keys(),w.mutationQueue.removeMutationBatch(C,P))).next(()=>w.mutationQueue.performConsistencyCheck(C)).next(()=>w.documentOverlayCache.removeOverlaysForBatchId(C,M,l)).next(()=>w.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(C,M)).next(()=>w.localDocuments.getDocuments(C,M))})}(n.localStore,i);lO(n,i,t),oO(n,i),n.sharedClientState.updateMutationState(i,"rejected",t),yield Eu(n,r)}catch(r){yield zh(r)}})).apply(this,arguments)}function oO(e,i){(e.Oa.get(i)||[]).forEach(t=>{t.resolve()}),e.Oa.delete(i)}function lO(e,i,t){const n=ai(e);let r=n.xa[n.currentUser.toKey()];if(r){const s=r.get(i);s&&(t?s.reject(t):s.resolve(),r=r.remove(i)),n.xa[n.currentUser.toKey()]=r}}function Wv(e,i,t=null){e.sharedClientState.removeLocalQueryTarget(i);for(const n of e.Da.get(i))e.ba.delete(n),t&&e.Sa.ka(n,t);e.Da.delete(i),e.isPrimaryClient&&e.Ma.Vr(i).forEach(n=>{e.Ma.containsKey(n)||MQ(e,n)})}function MQ(e,i){e.Ca.delete(i.path.canonicalString());const t=e.va.get(i);null!==t&&(Bv(e.remoteStore,t),e.va=e.va.remove(i),e.Fa.delete(t),dO(e))}function cO(e,i,t){for(const n of t)n instanceof TQ?(e.Ma.addReference(n.key,i),iOt(e,n)):n instanceof CQ?(Fe("SyncEngine","Document no longer in limbo: "+n.key),e.Ma.removeReference(n.key,i),e.Ma.containsKey(n.key)||MQ(e,n.key)):gi()}function iOt(e,i){const t=i.key,n=t.path.canonicalString();e.va.get(t)||e.Ca.has(n)||(Fe("SyncEngine","New document in limbo: "+t),e.Ca.add(n),dO(e))}function dO(e){for(;e.Ca.size>0&&e.va.size{o.push(n.Ba(w,i,t).then(C=>{var M;if((C||t)&&n.isPrimaryClient){const P=C?!C.fromCache:null===(M=t?.targetChanges.get(w.targetId))||void 0===M?void 0:M.current;n.sharedClientState.updateQueryState(w.targetId,P?"current":"not-current")}if(C){r.push(C);const P=uF.Ki(w.targetId,C);s.push(P)}}))}),yield Promise.all(o),n.Sa.h_(r),yield(l=de(function*(C,M){const P=ai(C);try{yield P.persistence.runTransaction("notifyLocalViewChanges","readwrite",O=>te.forEach(M,L=>te.forEach(L.qi,U=>P.persistence.referenceDelegate.addReference(O,L.targetId,U)).next(()=>te.forEach(L.Qi,U=>P.persistence.referenceDelegate.removeReference(O,L.targetId,U)))))}catch(O){if(!Gh(O))throw O;Fe("LocalStore","Failed to update sequence numbers: "+O)}for(const O of M){const L=O.targetId;if(!O.fromCache){const U=P.ns.get(L),W=U.withLastLimboFreeSnapshotVersion(U.snapshotVersion);P.ns=P.ns.insert(L,W)}}}),function w(C,M){return l.apply(this,arguments)})(n.localStore,s))}),uO.apply(this,arguments)}function nOt(e,i){return hO.apply(this,arguments)}function hO(){return(hO=de(function*(e,i){const t=ai(e);if(!t.currentUser.isEqual(i)){Fe("SyncEngine","User change. New user:",i.toKey());const n=yield eQ(t.localStore,i);t.currentUser=i,(s=t).Oa.forEach(l=>{l.forEach(w=>{w.reject(new Oe(he.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),s.Oa.clear(),t.sharedClientState.handleUserChange(i,n.removedBatchIds,n.addedBatchIds),yield Eu(t,n.us)}var s})).apply(this,arguments)}function rOt(e,i){const t=ai(e),n=t.Fa.get(i);if(n&&n.wa)return fn().add(n.key);{let r=fn();const s=t.Da.get(i);if(!s)return r;for(const o of s){const l=t.ba.get(o);r=r.unionWith(l.view.Ea)}return r}}function GS(e){const i=ai(e);return i.remoteStore.remoteSyncer.applyRemoteEvent=AQ.bind(null,i),i.remoteStore.remoteSyncer.getRemoteKeysForTarget=rOt.bind(null,i),i.remoteStore.remoteSyncer.rejectListen=JFt.bind(null,i),i.Sa.h_=UFt.bind(null,i.eventManager),i.Sa.ka=zFt.bind(null,i.eventManager),i}class Xv{constructor(){this.synchronizeTabs=!1}initialize(i){var t=this;return de(function*(){t.serializer=Db(i.databaseInfo.databaseId),t.sharedClientState=t.createSharedClientState(i),t.persistence=t.createPersistence(i),yield t.persistence.start(),t.localStore=t.createLocalStore(i),t.gcScheduler=t.createGarbageCollectionScheduler(i,t.localStore),t.indexBackfillerScheduler=t.createIndexBackfillerScheduler(i,t.localStore)})()}createGarbageCollectionScheduler(i,t){return null}createIndexBackfillerScheduler(i,t){return null}createLocalStore(i){return function tQ(e,i,t,n){return new fFt(e,i,t,n)}(this.persistence,new q$,i.initialUser,this.serializer)}createPersistence(i){return new oF(kS.Hr,this.serializer)}createSharedClientState(i){return new cQ}terminate(){var i=this;return de(function*(){var t,n;null===(t=i.gcScheduler)||void 0===t||t.stop(),null===(n=i.indexBackfillerScheduler)||void 0===n||n.stop(),i.sharedClientState.shutdown(),yield i.persistence.shutdown()})()}}class jv{initialize(i,t){var n=this;return de(function*(){n.localStore||(n.localStore=i.localStore,n.sharedClientState=i.sharedClientState,n.datastore=n.createDatastore(t),n.remoteStore=n.createRemoteStore(t),n.eventManager=n.createEventManager(t),n.syncEngine=n.createSyncEngine(t,!i.synchronizeTabs),n.sharedClientState.onlineStateHandler=r=>DQ(n.syncEngine,r,1),n.remoteStore.remoteSyncer.handleCredentialChange=nOt.bind(null,n.syncEngine),yield BF(n.remoteStore,n.syncEngine.isPrimaryClient))})()}createEventManager(i){return new VFt}createDatastore(i){const t=Db(i.databaseInfo.databaseId),n=new _Ft(i.databaseInfo);return new SFt(i.authCredentials,i.appCheckCredentials,n,t)}createRemoteStore(i){return n=this.localStore,r=this.datastore,s=i.asyncQueue,o=t=>DQ(this.syncEngine,t,0),l=dQ.D()?new dQ:new yFt,new AFt(n,r,s,o,l);var n,r,s,o,l}createSyncEngine(i,t){return function(r,s,o,l,w,C,M){const P=new jFt(r,s,o,l,w,C);return M&&(P.La=!0),P}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,i.initialUser,i.maxConcurrentLimboResolutions,t)}terminate(){var i=this;return de(function*(){var t,n;yield(n=de(function*(s){const o=ai(s);Fe("RemoteStore","RemoteStore shutting down."),o.M_.add(5),yield Nv(o),o.O_.shutdown(),o.N_.set("Unknown")}),function r(s){return n.apply(this,arguments)})(i.remoteStore),null===(t=i.datastore)||void 0===t||t.terminate()})()}}class HS{constructor(i){this.observer=i,this.muted=!1}next(i){this.observer.next&&this.Ka(this.observer.next,i)}error(i){this.observer.error?this.Ka(this.observer.error,i):ks("Uncaught Error in snapshot listener:",i.toString())}$a(){this.muted=!0}Ka(i,t){this.muted||setTimeout(()=>{this.muted||i(t)},0)}}class vOt{constructor(i,t,n,r){var s=this;this.authCredentials=i,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=Ea.UNAUTHENTICATED,this.clientId=Xj.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,function(){var o=de(function*(l){Fe("FirestoreClient","Received user=",l.uid),yield s.authCredentialListener(l),s.user=l});return function(l){return o.apply(this,arguments)}}()),this.appCheckCredentials.start(n,o=>(Fe("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(i){this.authCredentialListener=i}setAppCheckTokenChangeListener(i){this.appCheckCredentialListener=i}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Oe(he.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var i=this;this.asyncQueue.enterRestrictedMode();const t=new ha;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(de(function*(){try{i._onlineComponents&&(yield i._onlineComponents.terminate()),i._offlineComponents&&(yield i._offlineComponents.terminate()),i.authCredentials.shutdown(),i.appCheckCredentials.shutdown(),t.resolve()}catch(n){const r=zv(n,"Failed to shutdown persistence");t.reject(r)}})),t.promise}}function WS(e,i){return _O.apply(this,arguments)}function _O(){return _O=de(function*(e,i){e.asyncQueue.verifyOperationInProgress(),Fe("FirestoreClient","Initializing OfflineComponentProvider");const t=e.configuration;yield i.initialize(t);let n=t.initialUser;e.setCredentialChangeListener(function(){var r=de(function*(s){n.isEqual(s)||(yield eQ(i.localStore,s),n=s)});return function(s){return r.apply(this,arguments)}}()),i.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=i}),_O.apply(this,arguments)}function TO(e,i){return CO.apply(this,arguments)}function CO(){return(CO=de(function*(e,i){e.asyncQueue.verifyOperationInProgress();const t=yield function SO(e){return EO.apply(this,arguments)}(e);Fe("FirestoreClient","Initializing OnlineComponentProvider"),yield i.initialize(t,e.configuration),e.setCredentialChangeListener(n=>xQ(i.remoteStore,n)),e.setAppCheckTokenChangeListener((n,r)=>xQ(i.remoteStore,r)),e._onlineComponents=i})).apply(this,arguments)}function EO(){return(EO=de(function*(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){Fe("FirestoreClient","Using user provided OfflineComponentProvider");try{yield WS(e,e._uninitializedComponentsProvider._offline)}catch(i){const t=i;if(!function FQ(e){return"FirebaseError"===e.name?e.code===he.FAILED_PRECONDITION||e.code===he.UNIMPLEMENTED:!(typeof DOMException<"u"&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(t))throw t;_l("Error using user provided cache. Falling back to memory cache: "+t),yield WS(e,new Xv)}}else Fe("FirestoreClient","Using default OfflineComponentProvider"),yield WS(e,new Xv);return e._offlineComponents})).apply(this,arguments)}function XS(e){return AO.apply(this,arguments)}function AO(){return(AO=de(function*(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(Fe("FirestoreClient","Using user provided OnlineComponentProvider"),yield TO(e,e._uninitializedComponentsProvider._online)):(Fe("FirestoreClient","Using default OnlineComponentProvider"),yield TO(e,new jv))),e._onlineComponents})).apply(this,arguments)}function MO(){return(MO=de(function*(e){const i=yield XS(e),t=i.eventManager;return t.onListen=YFt.bind(null,i.syncEngine),t.onUnlisten=QFt.bind(null,i.syncEngine),t.onFirstRemoteStoreListen=$Ft.bind(null,i.syncEngine),t.onLastRemoteStoreUnlisten=KFt.bind(null,i.syncEngine),t})).apply(this,arguments)}function VQ(e,i,t={}){const n=new ha;return e.asyncQueue.enqueueAndForget(de(function*(){return function(s,o,l,w,C){const M=new HS({next:O=>{o.enqueueAndForget(()=>function HF(e,i){return WF.apply(this,arguments)}(s,P)),O.fromCache&&"server"===w.source?C.reject(new Oe(he.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):C.resolve(O)},error:O=>C.reject(O)}),P=new YF(l,M,{includeMetadataChanges:!0,ra:!0});return function zF(e,i){return GF.apply(this,arguments)}(s,P)}(yield function $v(e){return MO.apply(this,arguments)}(e),e.asyncQueue,i,t,n)})),n.promise}function UQ(e){const i={};return void 0!==e.timeoutSeconds&&(i.timeoutSeconds=e.timeoutSeconds),i}const zQ=new Map;function IO(e,i,t){if(!t)throw new Oe(he.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${i}.`)}function GQ(e){if(!di.isDocumentKey(e))throw new Oe(he.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function HQ(e){if(di.isDocumentKey(e))throw new Oe(he.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function jS(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const i=(n=e).constructor?n.constructor.name:null;return i?`a custom ${i} object`:"an object"}}var n;return"function"==typeof e?"a function":gi()}function Rn(e,i){if("_delegate"in e&&(e=e._delegate),!(e instanceof i)){if(i.name===e.constructor.name)throw new Oe(he.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=jS(e);throw new Oe(he.INVALID_ARGUMENT,`Expected type '${i.name}', but it was: ${t}`)}}return e}class XQ{constructor(i){var t,n;if(void 0===i.host){if(void 0!==i.ssl)throw new Oe(he.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=i.host,this.ssl=null===(t=i.ssl)||void 0===t||t;if(this.credentials=i.credentials,this.ignoreUndefinedProperties=!!i.ignoreUndefinedProperties,this.localCache=i.localCache,void 0===i.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==i.cacheSizeBytes&&i.cacheSizeBytes<1048576)throw new Oe(he.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=i.cacheSizeBytes}(function MOt(e,i,t,n){if(!0===i&&!0===n)throw new Oe(he.INVALID_ARGUMENT,`${e} and ${t} cannot be used together.`)})("experimentalForceLongPolling",i.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",i.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!i.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!(this.experimentalForceLongPolling||void 0!==i.experimentalAutoDetectLongPolling&&!i.experimentalAutoDetectLongPolling),this.experimentalLongPollingOptions=UQ(null!==(n=i.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(s){if(void 0!==s.timeoutSeconds){if(isNaN(s.timeoutSeconds))throw new Oe(he.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new Oe(he.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new Oe(he.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!i.useFetchStreams}isEqual(i){return this.host===i.host&&this.ssl===i.ssl&&this.credentials===i.credentials&&this.cacheSizeBytes===i.cacheSizeBytes&&this.experimentalForceLongPolling===i.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===i.experimentalAutoDetectLongPolling&&this.experimentalLongPollingOptions.timeoutSeconds===i.experimentalLongPollingOptions.timeoutSeconds&&this.ignoreUndefinedProperties===i.ignoreUndefinedProperties&&this.useFetchStreams===i.useFetchStreams}}class Ib{constructor(i,t,n,r){this._authCredentials=i,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new XQ({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Oe(he.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(i){if(this._settingsFrozen)throw new Oe(he.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new XQ(i),void 0!==i.credentials&&(this._authCredentials=function(n){if(!n)return new Skt;switch(n.type){case"firstParty":return new Mkt(n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new Oe(he.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(i.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const n=zQ.get(t);n&&(Fe("ComponentProvider","Removing Datastore"),zQ.delete(t),n.terminate())}(this),Promise.resolve()}}class Ga{constructor(i,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=i}withConverter(i){return new Ga(this.firestore,i,this._query)}}class Fs{constructor(i,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=i}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new gd(this.firestore,this.converter,this._key.path.popLast())}withConverter(i){return new Fs(this.firestore,i,this._key)}}class gd extends Ga{constructor(i,t,n){super(i,t,_v(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const i=this._path.popLast();return i.isEmpty()?null:new Fs(this.firestore,null,new di(i))}withConverter(i){return new gd(this.firestore,i,this._path)}}function jQ(e,i,...t){if(e=Ec(e),IO("collection","path",i),e instanceof Ib){const n=Bn.fromString(i,...t);return HQ(n),new gd(e,null,n)}{if(!(e instanceof Fs||e instanceof gd))throw new Oe(he.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(Bn.fromString(i,...t));return HQ(n),new gd(e.firestore,null,n)}}class kOt{constructor(){this.iu=Promise.resolve(),this.su=[],this.ou=!1,this._u=[],this.au=null,this.uu=!1,this.cu=!1,this.lu=[],this.Yo=new wF(this,"async_queue_retry"),this.hu=()=>{const t=VS();t&&Fe("AsyncQueue","Visibility state changed to "+t.visibilityState),this.Yo.Wo()};const i=VS();i&&"function"==typeof i.addEventListener&&i.addEventListener("visibilitychange",this.hu)}get isShuttingDown(){return this.ou}enqueueAndForget(i){this.enqueue(i)}enqueueAndForgetEvenWhileRestricted(i){this.Pu(),this.Iu(i)}enterRestrictedMode(i){if(!this.ou){this.ou=!0,this.cu=i||!1;const t=VS();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.hu)}}enqueue(i){if(this.Pu(),this.ou)return new Promise(()=>{});const t=new ha;return this.Iu(()=>this.ou&&this.cu?Promise.resolve():(i().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(i){this.enqueueAndForget(()=>(this.su.push(i),this.Tu()))}Tu(){var i=this;return de(function*(){if(0!==i.su.length){try{yield i.su[0](),i.su.shift(),i.Yo.reset()}catch(t){if(!Gh(t))throw t;Fe("AsyncQueue","Operation failed with retryable error: "+t)}i.su.length>0&&i.Yo.$o(()=>i.Tu())}})()}Iu(i){const t=this.iu.then(()=>(this.uu=!0,i().catch(n=>{throw this.au=n,this.uu=!1,ks("INTERNAL UNHANDLED ERROR: ",function(o){let l=o.message||"";return o.stack&&(l=o.stack.includes(o.message)?o.stack:o.message+"\n"+o.stack),l}(n)),n}).then(n=>(this.uu=!1,n))));return this.iu=t,t}enqueueAfterDelay(i,t,n){this.Pu(),this.lu.indexOf(i)>-1&&(t=0);const r=UF.createAndSchedule(this,i,t,n,s=>this.Eu(s));return this._u.push(r),r}Pu(){this.au&&gi()}verifyOperationInProgress(){}du(){var i=this;return de(function*(){let t;do{t=i.iu,yield t}while(t!==i.iu)})()}Au(i){for(const t of this._u)if(t.timerId===i)return!0;return!1}Ru(i){return this.du().then(()=>{this._u.sort((t,n)=>t.targetTimeMs-n.targetTimeMs);for(const t of this._u)if(t.skipDelay(),"all"!==i&&t.timerId===i)break;return this.du()})}Vu(i){this.lu.push(i)}Eu(i){const t=this._u.indexOf(i);this._u.splice(t,1)}}class Mr extends Ib{constructor(i,t,n,r){super(i,t,n,r),this.type="firestore",this._queue=new kOt,this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||$Q(this),this._firestoreClient.terminate()}}function FOt(e,i){const t="object"==typeof e?e:function mkt(e=rS){const i=um.get(e);if(!i&&e===rS&&dj())return Aj();if(!i)throw Yl.create("no-app",{appName:e});return i}(),n="string"==typeof e?e:i||"(default)",r=function Sj(e,i){const t=e.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),e.container.getProvider(i)}(t,"firestore").getImmediate({identifier:n});if(!r._initialized){const s=(e=>{const i=(e=>{var i,t;return null===(t=null===(i=eS())||void 0===i?void 0:i.emulatorHosts)||void 0===t?void 0:t[e]})(e);if(!i)return;const t=i.lastIndexOf(":");if(t<=0||t+1===i.length)throw new Error(`Invalid host ${i} with no separate hostname and port!`);const n=parseInt(i.substring(t+1),10);return"["===i[0]?[i.substring(1,t-1),n]:[i.substring(0,t),n]})("firestore");s&&function IOt(e,i,t,n={}){var r;const s=(e=Rn(e,Ib))._getSettings(),o=`${i}:${t}`;if("firestore.googleapis.com"!==s.host&&s.host!==o&&_l("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),n.mockUserToken){let l,w;if("string"==typeof n.mockUserToken)l=n.mockUserToken,w=Ea.MOCK_USER;else{l=function nRt(e,i){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=i||"demo-project",r=e.iat||0,s=e.sub||e.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},e);return[tS(JSON.stringify({alg:"none",type:"JWT"})),tS(JSON.stringify(o)),""].join(".")}(n.mockUserToken,null===(r=e._app)||void 0===r?void 0:r.options.projectId);const C=n.mockUserToken.sub||n.mockUserToken.user_id;if(!C)throw new Oe(he.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");w=new Ea(C)}e._authCredentials=new Ekt(new Hj(l,w))}}(r,...s)}return r}function fs(e){return e._firestoreClient||$Q(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function $Q(e){var i,t,n;const r=e._freezeSettings(),s=(w=(null===(i=e._app)||void 0===i?void 0:i.options.appId)||"",new rPt(e._databaseId,w,e._persistenceKey,(M=r).host,M.ssl,M.experimentalForceLongPolling,M.experimentalAutoDetectLongPolling,UQ(M.experimentalLongPollingOptions),M.useFetchStreams));var w,M;e._firestoreClient=new vOt(e._authCredentials,e._appCheckCredentials,e._queue,s),null!==(t=r.localCache)&&void 0!==t&&t._offlineComponentProvider&&null!==(n=r.localCache)&&void 0!==n&&n._onlineComponentProvider&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}class Mm{constructor(i){this._byteString=i}static fromBase64String(i){try{return new Mm(fa.fromBase64String(i))}catch(t){throw new Oe(he.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(i){return new Mm(fa.fromUint8Array(i))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(i){return this._byteString.isEqual(i._byteString)}}class Im{constructor(...i){for(let t=0;t90)throw new Oe(he.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+i);if(!isFinite(t)||t<-180||t>180)throw new Oe(he.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=i,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(i){return this._lat===i._lat&&this._long===i._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(i){return tn(this._lat,i._lat)||tn(this._long,i._long)}}const LOt=/^__.*__$/;class NOt{constructor(i,t,n){this.data=i,this.fieldMask=t,this.fieldTransforms=n}toMutation(i,t){return null!==this.fieldMask?new Cu(i,this.data,this.fieldMask,t,this.fieldTransforms):new Av(i,this.data,t,this.fieldTransforms)}}function JQ(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw gi()}}class YS{constructor(i,t,n,r,s,o){this.settings=i,this.databaseId=t,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===s&&this.mu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get fu(){return this.settings.fu}gu(i){return new YS(Object.assign(Object.assign({},this.settings),i),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}pu(i){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(i),r=this.gu({path:n,yu:!1});return r.wu(i),r}Su(i){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(i),r=this.gu({path:n,yu:!1});return r.mu(),r}bu(i){return this.gu({path:void 0,yu:!0})}Du(i){return KS(i,this.settings.methodName,this.settings.Cu||!1,this.path,this.settings.vu)}contains(i){return void 0!==this.fieldMask.find(t=>i.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>i.isPrefixOf(t.field))}mu(){if(this.path)for(let i=0;iw.covers(P.field))}else w=null,C=o.fieldTransforms;return new NOt(new za(l),w,C)}function km(e,i){if(iK(e=Ec(e)))return VO("Unsupported field value:",i,e),eK(e,i);if(e instanceof Qv)return function(n,r){if(!JQ(r.fu))throw r.Du(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r.Du(`${n._methodName}() is not currently supported inside arrays`);const s=n._toFieldTransform(r);s&&r.fieldTransforms.push(s)}(e,i),null;if(void 0===e&&i.ignoreUndefinedProperties)return null;if(i.path&&i.fieldMask.push(i.path),e instanceof Array){if(i.settings.yu&&4!==i.fu)throw i.Du("Nested arrays are not supported");return function(n,r){const s=[];let o=0;for(const l of n){let w=km(l,r.bu(o));null==w&&(w={nullValue:"NULL_VALUE"}),s.push(w),o++}return{arrayValue:{values:s}}}(e,i)}return function(n,r){if(null===(n=Ec(n)))return{nullValue:"NULL_VALUE"};if("number"==typeof n)return GY(r.serializer,n);if("boolean"==typeof n)return{booleanValue:n};if("string"==typeof n)return{stringValue:n};if(n instanceof Date){const s=ns.fromDate(n);return{timestampValue:Mv(r.serializer,s)}}if(n instanceof ns){const s=new ns(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:Mv(r.serializer,s)}}if(n instanceof kO)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof Mm)return{bytesValue:d$(r.serializer,n._byteString)};if(n instanceof Fs){const s=r.databaseId,o=n.firestore._databaseId;if(!o.isEqual(s))throw r.Du(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:QP(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r.Du(`Unsupported field value: ${jS(n)}`)}(e,i)}function eK(e,i){const t={};return cY(e)?i.path&&i.path.length>0&&i.fieldMask.push(i.path):Hh(e,(n,r)=>{const s=km(r,i.pu(n));null!=s&&(t[n]=s)}),{mapValue:{fields:t}}}function iK(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof ns||e instanceof kO||e instanceof Mm||e instanceof Fs||e instanceof Qv)}function VO(e,i,t){if(!iK(t)||"object"!=typeof(r=t)||null===r||Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r)){const n=jS(t);throw i.Du("an object"===n?e+" a custom object":e+" "+n)}var r}function Pb(e,i,t){if((i=Ec(i))instanceof Im)return i._internalPath;if("string"==typeof i)return QS(e,i);throw KS("Field path arguments must be of type string or ",e,!1,void 0,t)}const VOt=new RegExp("[~\\*/\\[\\]]");function QS(e,i,t){if(i.search(VOt)>=0)throw KS(`Invalid field path (${i}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,t);try{return new Im(...i.split("."))._internalPath}catch{throw KS(`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,t)}}function KS(e,i,t,n,r){const s=n&&!n.isEmpty(),o=void 0!==r;let l=`Function ${i}() called with invalid data`;t&&(l+=" (via `toFirestore()`)"),l+=". ";let w="";return(s||o)&&(w+=" (found",s&&(w+=` in field ${n}`),o&&(w+=` in document ${r}`),w+=")"),new Oe(he.INVALID_ARGUMENT,l+e+w)}function nK(e,i){return e.some(t=>t.isEqual(i))}class Fb{constructor(i,t,n,r,s){this._firestore=i,this._userDataWriter=t,this._key=n,this._document=r,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new Fs(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const i=new UOt(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(i)}return this._userDataWriter.convertValue(this._document.data.value)}}get(i){if(this._document){const t=this._document.data.field(ZS("DocumentSnapshot.get",i));if(null!==t)return this._userDataWriter.convertValue(t)}}}class UOt extends Fb{data(){return super.data()}}function ZS(e,i){return"string"==typeof i?QS(e,i):i instanceof Im?i._internalPath:i._delegate._internalPath}class UO{}class Ob extends UO{}class Lb extends Ob{constructor(i,t,n){super(),this._field=i,this._op=t,this._value=n,this.type="where"}static _create(i,t,n){return new Lb(i,t,n)}_apply(i){const t=this._parse(i);return lK(i._query,t),new Ga(i.firestore,i.converter,zP(i._query,t))}_parse(i){const t=Rm(i.firestore);return function(s,o,l,w,C,M,P){let O;if(C.isKeyField()){if("array-contains"===M||"array-contains-any"===M)throw new Oe(he.INVALID_ARGUMENT,`Invalid Query. You can't perform '${M}' queries on documentId().`);if("in"===M||"not-in"===M){oK(P,M);const L=[];for(const U of P)L.push(aK(w,s,U));O={arrayValue:{values:L}}}else O=aK(w,s,P)}else"in"!==M&&"not-in"!==M&&"array-contains-any"!==M||oK(P,M),O=function tK(e,i,t,n=!1){return km(t,e.Fu(n?4:3,i))}(l,"where",P,"in"===M||"not-in"===M);return Vn.create(C,M,O)}(i._query,0,t,i.firestore._databaseId,this._field,this._op,this._value)}}class Kv extends UO{constructor(i,t){super(),this.type=i,this._queryConstraints=t}static _create(i,t){return new Kv(i,t)}_parse(i){const t=this._queryConstraints.map(n=>n._parse(i)).filter(n=>n.getFilters().length>0);return 1===t.length?t[0]:wr.create(t,this._getOperator())}_apply(i){const t=this._parse(i);return 0===t.getFilters().length?i:(function(r,s){let o=r;const l=s.getFlattenedFilters();for(const w of l)lK(o,w),o=zP(o,w)}(i._query,t),new Ga(i.firestore,i.converter,zP(i._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class zO extends Ob{constructor(i,t){super(),this._field=i,this._direction=t,this.type="orderBy"}static _create(i,t){return new zO(i,t)}_apply(i){const t=function(r,s,o){if(null!==r.startAt)throw new Oe(he.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==r.endAt)throw new Oe(he.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new lb(s,o)}(i._query,this._field,this._direction);return new Ga(i.firestore,i.converter,function(r,s){const o=r.explicitOrderBy.concat([s]);return new _u(r.path,r.collectionGroup,o,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(i._query,t))}}class JS extends Ob{constructor(i,t,n){super(),this.type=i,this._limit=t,this._limitType=n}static _create(i,t,n){return new JS(i,t,n)}_apply(i){return new Ga(i.firestore,i.converter,xS(i._query,this._limit,this._limitType))}}function aK(e,i,t){if("string"==typeof(t=Ec(t))){if(""===t)throw new Oe(he.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!UP(i)&&-1!==t.indexOf("/"))throw new Oe(he.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${t}' contains a '/' character.`);const n=i.path.child(Bn.fromString(t));if(!di.isDocumentKey(n))throw new Oe(he.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${n}' is not because it has an odd number of segments (${n.length}).`);return xm(e,new di(n))}if(t instanceof Fs)return xm(e,t._key);throw new Oe(he.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${jS(t)}.`)}function oK(e,i){if(!Array.isArray(e)||0===e.length)throw new Oe(he.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${i.toString()}' filters.`)}function lK(e,i){const t=function(r,s){for(const o of r)for(const l of o.getFlattenedFilters())if(s.indexOf(l.op)>=0)return l.op;return null}(e.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(i.op));if(null!==t)throw new Oe(he.INVALID_ARGUMENT,t===i.op?`Invalid query. You cannot use more than one '${i.op.toString()}' filter.`:`Invalid query. You cannot use '${i.op.toString()}' filters with '${t.toString()}' filters.`)}class dK{convertValue(i,t="none"){switch(Xh(i)){case 0:return null;case 1:return i.booleanValue;case 2:return ys(i.integerValue||i.doubleValue);case 3:return this.convertTimestamp(i.timestampValue);case 4:return this.convertServerTimestamp(i,t);case 5:return i.stringValue;case 6:return this.convertBytes(wu(i.bytesValue));case 7:return this.convertReference(i.referenceValue);case 8:return this.convertGeoPoint(i.geoPointValue);case 9:return this.convertArray(i.arrayValue,t);case 10:return this.convertObject(i.mapValue,t);default:throw gi()}}convertObject(i,t){return this.convertObjectMap(i.fields,t)}convertObjectMap(i,t="none"){const n={};return Hh(i,(r,s)=>{n[r]=this.convertValue(s,t)}),n}convertGeoPoint(i){return new kO(ys(i.latitude),ys(i.longitude))}convertArray(i,t){return(i.values||[]).map(n=>this.convertValue(n,t))}convertServerTimestamp(i,t){switch(t){case"previous":const n=hS(i);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(rb(i));default:return null}}convertTimestamp(i){const t=bu(i);return new ns(t.seconds,t.nanos)}convertDocumentKey(i,t){const n=Bn.fromString(i);Ai(_$(n));const r=new vm(n.get(1),n.get(3)),s=new di(n.popFirst(5));return r.isEqual(t)||ks(`Document ${s} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),s}}class Pm{constructor(i,t){this.hasPendingWrites=i,this.fromCache=t}isEqual(i){return this.hasPendingWrites===i.hasPendingWrites&&this.fromCache===i.fromCache}}class Zv extends Fb{constructor(i,t,n,r,s,o){super(i,t,n,r,o),this._firestore=i,this._firestoreImpl=i,this.metadata=s}exists(){return super.exists()}data(i={}){if(this._document){if(this._converter){const t=new iE(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,i)}return this._userDataWriter.convertValue(this._document.data.value,i.serverTimestamps)}}get(i,t={}){if(this._document){const n=this._document.data.field(ZS("DocumentSnapshot.get",i));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class iE extends Zv{data(i={}){return super.data(i)}}class Jv{constructor(i,t,n,r){this._firestore=i,this._userDataWriter=t,this._snapshot=r,this.metadata=new Pm(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const i=[];return this.forEach(t=>i.push(t)),i}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(i,t){this._snapshot.docs.forEach(n=>{i.call(t,new iE(this._firestore,this._userDataWriter,n.key,n,new Pm(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(i={}){const t=!!i.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new Oe(he.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(r,s){if(r._snapshot.oldDocs.isEmpty()){let o=0;return r._snapshot.docChanges.map(l=>({type:"added",doc:new iE(r._firestore,r._userDataWriter,l.doc.key,l.doc,new Pm(r._snapshot.mutatedKeys.has(l.doc.key),r._snapshot.fromCache),r.query.converter),oldIndex:-1,newIndex:o++}))}{let o=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(l=>s||3!==l.type).map(l=>{const w=new iE(r._firestore,r._userDataWriter,l.doc.key,l.doc,new Pm(r._snapshot.mutatedKeys.has(l.doc.key),r._snapshot.fromCache),r.query.converter);let C=-1,M=-1;return 0!==l.type&&(C=o.indexOf(l.doc.key),o=o.delete(l.doc.key)),1!==l.type&&(o=o.add(l.doc),M=o.indexOf(l.doc.key)),{type:jOt(l.type),doc:w,oldIndex:C,newIndex:M}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function jOt(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return gi()}}class tf extends dK{constructor(i){super(),this.firestore=i}convertBytes(i){return new Mm(i)}convertReference(i){const t=this.convertDocumentKey(i,this.firestore._databaseId);return new Fs(this.firestore,null,t)}}function $Ot(e,i){const t=Rn(e.firestore,Mr),n=function ROt(e,i,...t){if(e=Ec(e),1===arguments.length&&(i=Xj.newId()),IO("doc","path",i),e instanceof Ib){const n=Bn.fromString(i,...t);return GQ(n),new Fs(e,null,new di(n))}{if(!(e instanceof Fs||e instanceof gd))throw new Oe(he.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(Bn.fromString(i,...t));return GQ(n),new Fs(e.firestore,e instanceof gd?e.converter:null,new di(n))}}(e),r=function eE(e,i,t){let n;return n=e?t&&(t.merge||t.mergeFields)?e.toFirestore(i,t):e.toFirestore(i):i,n}(e.converter,i);return function Nb(e,i){return function(n,r){const s=new ha;return n.asyncQueue.enqueueAndForget(de(function*(){return function ZFt(e,i,t){return eO.apply(this,arguments)}(yield function DO(e){return XS(e).then(i=>i.syncEngine)}(n),r,s)})),s.promise}(fs(e),i)}(t,[$S(Rm(e.firestore),"addDoc",n._key,r,null!==e.converter,{}).toMutation(n._key,ss.exists(!1))]).then(()=>n)}!function(i,t=!0){mv="10.12.3",sS(new Qy("firestore",(n,{instanceIdentifier:r,options:s})=>{const o=n.getProvider("app").getImmediate(),l=new Mr(new Akt(n.getProvider("auth-internal")),new Ikt(n.getProvider("app-check-internal")),function(C,M){if(!Object.prototype.hasOwnProperty.apply(C.options,["projectId"]))throw new Oe(he.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new vm(C.options.projectId,M)}(o,r),o);return s=Object.assign({useFetchStreams:t},s),l._setSettings(s),l},"PUBLIC").setMultipleInstances(!0)),hm(Gj,"4.6.4",i),hm(Gj,"4.6.4","esm2017")}();let mK=(()=>{class e{constructor(t){this.terminologyService=t,this.goals=[{name:"Bronze",score:100},{name:"Silver",score:200},{name:"Gold",score:300},{name:"Platinum",score:400},{name:"Diamond",score:500}],this.difficultyLevels=[{name:"Easy",rules:{maxHitPoints:5,hitpointsAwardedForGuessingfullTerm:1,freeHints:2,pointsPerGuessedLetter:1,goals:this.goals,difficultyBonus:0,endless:!1,maxRoundTime:60}},{name:"Medium",rules:{maxHitPoints:4,hitpointsAwardedForGuessingfullTerm:1,freeHints:1,pointsPerGuessedLetter:2,goals:this.goals,difficultyBonus:50,endless:!1,maxRoundTime:50}},{name:"Hard",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!1,maxRoundTime:40}},{name:"Endless",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!0,maxRoundTime:30}}],this.rules=this.difficultyLevels[0].rules,this.fsn="",this.scg="",this.focusConcepts=[],this.attributePairs=[],this.usedHints=new Set,this.randomLimit=4e3,this.guessResult=new De,this.termResult=new De,this.game=new Wr(this.initialize())}loadMenu(){this.clearRoundTimer(),this.game.next({...this.game.value,state:"menu"})}getDifficultyLevels(){return this.difficultyLevels}newRound(t){var n=this;return de(function*(){n.clearRoundTimer(),n.game.next({...n.game.value,state:"choosingTerm",score:t?0:n.game.value.score,hitPoints:t?n.rules.maxHitPoints:n.game.value.hitPoints,round:t?1:n.game.value.round+1,remainingTime:n.rules.maxRoundTime});const r=Math.floor(Math.random()*n.randomLimit)+1,s=yield Ca(n.terminologyService.expandValueSet("^ 816080008 |International Patient Summary| {{ C definitionStatus = defined }}","",r,1));n.randomLimit=s.expansion.total-1;const o=yield Ca(n.terminologyService.lookupConcept(s.expansion.contains[0].code));let l=n.extractFSN(o);n.fsn=l||"";let w=n.extractScg(o);n.scg=w||"";let C=n.extractFocusConcepts(w||"");n.focusConcepts=C||[];let M=n.extractAttributePairs(w||"");n.attributePairs=M||[],l?n.initializeRound(l,t):n.initializeRound("No term found"),n.usedHints.clear()})()}extractFSN(t){let n=this.extractTerm(t,"900000000000003001",this.terminologyService.getLang());return n||(n=this.extractTerm(t,"900000000000013009",this.terminologyService.getLang())),n||(n=this.extractTerm(t,"900000000000003001","en")),n}extractTerm(t,n,r){let s="";return t.parameter.forEach(o=>{if("designation"===o.name){let l=o.part.some(C=>"use"===C.name&&C.valueCoding.code===n),w=o.part.some(C=>"language"===C.name&&C.valueCode===r);l&&w&&(s=o.part.find(C=>"value"===C.name)?.valueString)}}),s}extractScg(t){let n;return t.parameter.forEach(r=>{"property"===r.name&&r.part.some(s=>"code"===s.name&&"normalForm"===s.valueString)&&(n=r.part.find(s=>"valueString"===s.name)?.valueString)}),n}extractFocusConcepts(t){const[n]=t.split(":").map(l=>l.trim()),s=n.match(/\d+\|.*?\|/g);return s?s.map(l=>this.transformSnomedConcept(l.trim())||{code:"",display:""}).filter(l=>""!==l.code):[]}extractAttributePairs(t){const n=t.split(":").slice(1).join(":").trim(),r=/(\d+\|.*?\|)\s*=\s*(\d+\|.*?\|)/g;let s;const o=[];for(;null!==(s=r.exec(n));){const l=this.transformSnomedConcept(s[1].trim()),w=this.transformSnomedConcept(s[2].trim());l&&w&&o.push({type:l,target:w})}return o}transformSnomedConcept(t){const r=t.match(/^(\d+)\|(.+?)\|$/);return r?{code:r[1],display:r[2]}:null}initialize(){return{term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"menu",score:0,round:0,rules:this.rules,difficultyLevel:"",startTimestamp:0,endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:0,remainingTime:0}}startGame(t){this.clearRoundTimer(),this.rules=this.difficultyLevels.find(n=>n.name.toLowerCase()===t.toLowerCase())?.rules,this.game.next({term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"playing",score:0,round:0,rules:this.rules,difficultyLevel:t,startTimestamp:Date.now(),endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:this.rules.maxRoundTime,remainingTime:this.rules.maxRoundTime}),this.newRound(!0)}initializeRound(t,n){const r=t.match(/\(([^)]+)\)$/),s=r?r[0]:"",o=s?t.lastIndexOf(s):t.length,l=t.split("").map((w,C)=>C>=o?w:/[a-zA-Z0-9\xe1-\xfa\xf1]/.test(w)?"_":w);this.game.next({...this.game.value,term:t,displayTerm:l,hitPoints:n?this.rules.maxHitPoints:this.game.value.hitPoints,hints:[],state:"playing",score:n?0:this.game.value.score,remainingTime:this.rules.maxRoundTime}),this.startRoundTimer();for(let w=0;w{wthis.goals[this.goals.length-1].score&&!1===this.rules.endless){n.state="won",n.endTimestamp=Date.now(),n.difficultyBonus=this.rules.difficultyBonus,n.livesBonus=10*n.hitPoints;const w=Math.round((n.endTimestamp-n.startTimestamp)/1e3);n.timeBonus=Math.max(0,180-w),n.score+=n.difficultyBonus+n.livesBonus+n.timeBonus}else n.hitPoints=n.hitPoints+this.rules.hitpointsAwardedForGuessingfullTerm,n.hitPoints>this.rules.maxHitPoints&&(n.hitPoints=this.rules.maxHitPoints),setTimeout(()=>{this.newRound()},1500)}else this.guessResult.emit({letter:t,result:!1}),n.hitPoints-=1,n.hitPoints<=0&&(n.hitPoints=0,n.state="gameOver",n.endTimestamp=Date.now(),n.difficultyBonus=this.rules.difficultyBonus,n.score+=n.difficultyBonus,this.clearRoundTimer());this.game.next(n)}revealHint(t){let n={...this.game.value},r="";if(0===this.focusConcepts.length&&0===this.attributePairs.length)return n.hints.push("No more hints available."),void this.game.next(n);let s=this.focusConcepts.length>0,o=this.attributePairs.length>0;if(s&&o&&(s=Math.random()<.5),s){let l=Math.floor(Math.random()*this.focusConcepts.length);r=`One of the parents of this concept is: ${this.focusConcepts[l].display}`,this.focusConcepts.splice(l,1)}else if(o){let l=Math.floor(Math.random()*this.attributePairs.length),w=this.attributePairs[l];r=`This concept has a ${w.type.display} of ${w.target.display}`,this.attributePairs.splice(l,1)}this.usedHints.add(r),n.hints.push(r),t||(n.hitPoints-=1),n.hintsAvailable=this.focusConcepts.length>0||this.attributePairs.length>0,this.game.next(n),n.hitPoints<=0&&(n.hitPoints=0,n.state="gameOver",n.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(n))}getGameState(){return this.game.asObservable()}startRoundTimer(){this.roundTimer=setInterval(()=>{const t=this.game.value,n=t.remainingTime-1,r={...t,remainingTime:n};n<=0?(r.remainingTime=0,r.state="gameOver",r.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(r)):this.game.next(r)},1e3)}clearRoundTimer(){this.roundTimer&&(clearInterval(this.roundTimer),this.roundTimer=null)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ca))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),oLt=(()=>{class e{constructor(){this.loadingProgress=new Wr(0)}preloadImages(t){const n=t.map((r,s)=>this.preloadImage(r,t.length,s));return Promise.all(n).then(()=>{this.loadingProgress.next(100)})}preloadImage(t,n,r){return new Promise((s,o)=>{const l=new Image;l.src=t,l.onload=()=>{this.loadingProgress.next((r+1)/n*100),s()},l.onerror=o})}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pK=(()=>{class e{constructor(){this.db=FOt(),this.scoreLimit=20}addScore(t,n){var r=this;return de(function*(){try{yield $Ot(jQ(r.db,t),n)}catch(s){console.error("Error adding document: ",s)}})()}getScores(t){var n=this;return de(function*(){const s=function zOt(e,i,...t){let n=[];i instanceof UO&&n.push(i),n=n.concat(t),function(s){const o=s.filter(w=>w instanceof Kv).length,l=s.filter(w=>w instanceof Lb).length;if(o>1||o>0&&l>0)throw new Oe(he.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n);for(const r of n)e=r._apply(e);return e}(jQ(n.db,t),function GOt(e,i="asc"){const t=i,n=ZS("orderBy",e);return zO._create(n,t)}("score","desc"),function HOt(e){return function WQ(e,i){if(i<=0)throw new Oe(he.INVALID_ARGUMENT,`Function ${e}() requires a positive number, but it was: ${i}.`)}("limit",e),JS._create("limit",e,"F")}(n.scoreLimit));return(yield function YOt(e){e=Rn(e,Ga);const i=Rn(e.firestore,Mr),t=fs(i),n=new tf(i);return function rK(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Oe(he.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query),VQ(t,e._query).then(r=>new Jv(i,n,e,r))}(s)).docs.map(l=>({id:l.id,...l.data()}))})()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function lLt(e,i){if(1&e){const t=ve();tt(0,"button",4),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).guessLetter(r))}),ut(1),et()}if(2&e){const t=i.$implicit,n=Ct(2);bi("guessed-correct","correct"===n.guessedLetters[t])("guessed-wrong","wrong"===n.guessedLetters[t]),yt("disabled",n.isLetterGuessed(t)),lt(),Ye(" ",t," ")}}function cLt(e,i){if(1&e&&(tt(0,"div",2),Gt(1,lLt,2,6,"button",3),et()),2&e){const t=i.$implicit;lt(),yt("ngForOf",t)}}let dLt=(()=>{class e{constructor(){this.keyboardLayout=[["1","2","3","4","5","6","7","8","9","0"],["Q","W","E","R","T","Y","U","I","O","P"],["A","S","D","F","G","H","J","K","L"],["Z","X","C","V","B","N","M"]],this.guessedLetters={},this.letterGuessed=new De}addGuessedLetter(t,n){this.guessedLetters[t]=n?"correct":"wrong"}guessLetter(t){this.letterGuessed.emit(t)}isLetterGuessed(t){return t in this.guessedLetters}markLetterAsGuessed(t,n){this.guessedLetters[t]=n}reset(){this.guessedLetters={}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-keyboard"]],outputs:{letterGuessed:"letterGuessed"},decls:2,vars:1,consts:[[1,"keyboard-container"],["class","keyboard-row",4,"ngFor","ngForOf"],[1,"keyboard-row"],["mat-button","",3,"guessed-correct","guessed-wrong","disabled","click",4,"ngFor","ngForOf"],["mat-button","",3,"click","disabled"]],template:function(n,r){1&n&&(tt(0,"div",0),Gt(1,cLt,2,1,"div",1),et()),2&n&&(lt(),yt("ngForOf",r.keyboardLayout))},dependencies:[gs,Sa],styles:[".keyboard-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.keyboard-row[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:5px;flex-wrap:wrap}button[_ngcontent-%COMP%]{margin:2px;padding:8px 6px;border-radius:8px;border:1px solid #000;transition:background-color .3s ease;min-width:40px;flex:1}button.guessed-correct[_ngcontent-%COMP%]{background-color:green;color:#fff}button.guessed-wrong[_ngcontent-%COMP%]{background-color:red;color:#fff}@media (max-width: 768px){.keyboard-row[_ngcontent-%COMP%]{margin:1px 0}.keyboard-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:1px;padding:8px;min-width:0;width:9%;flex:1 1 auto;font-size:14px}}"]})}return e})(),uLt=(()=>{class e{constructor(){this.tooltipDismissedKey="iosSafariTooltipDismissed"}isIosSafari(){return/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&/Safari/i.test(window.navigator.userAgent)&&!/CriOS/i.test(window.navigator.userAgent)&&!/FxiOS/i.test(window.navigator.userAgent)}tooltipDismissed(){return"true"===localStorage.getItem(this.tooltipDismissedKey)}dismissTooltip(){localStorage.setItem(this.tooltipDismissedKey,"true")}isRunningStandalone(){return"standalone"in window.navigator&&window.navigator.standalone}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hLt(e,i){if(1&e){const t=ve();tt(0,"div",1)(1,"div",2),ut(2," Install this webapp on your iPhone: tap "),tt(3,"mat-icon"),ut(4,"ios_share"),et(),ut(5," and then 'Add to Home Screen' "),et(),tt(6,"button",3),Vt("click",function(){return Ut(t),zt(Ct().dismiss())}),tt(7,"mat-icon"),ut(8,"close"),et()()()}}let fLt=(()=>{class e{constructor(t){this.platformDetectionService=t,this.isIosSafari=!1,this.tooltipDismissed=!1}ngOnInit(){this.isIosSafari=this.platformDetectionService.isIosSafari(),this.tooltipDismissed=this.platformDetectionService.tooltipDismissed()||this.platformDetectionService.isRunningStandalone()}dismiss(){this.tooltipDismissed=!0,this.platformDetectionService.dismissTooltip()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(uLt))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-add-to-home"]],decls:1,vars:1,consts:[["class","custom-tooltip",4,"ngIf"],[1,"custom-tooltip"],[1,"tooltip-text"],[1,"tooltip-dismiss-button",3,"click"]],template:function(n,r){1&n&&Gt(0,hLt,9,0,"div",0),2&n&&yt("ngIf",r.isIosSafari&&!r.tooltipDismissed)},dependencies:[Ms,da],styles:['.custom-tooltip[_ngcontent-%COMP%]{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:#fff;border-radius:8px;padding:16px;box-shadow:0 4px 8px #0003;display:flex;flex-direction:row;align-items:center;max-width:320px;box-sizing:border-box;z-index:1000}.custom-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-20px;left:50%;transform:translate(-50%);width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid white}.tooltip-icon[_ngcontent-%COMP%]{background:#007bff;color:#fff;border-radius:50%;padding:10px;margin-right:16px}.tooltip-text[_ngcontent-%COMP%]{color:#333;font-size:16px}.tooltip-dismiss-button[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer}.tooltip-dismiss-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#666;vertical-align:bottom}']})}return e})(),gK=(()=>{class e{transform(t,...n){if(!t)return t;const r=Math.floor(t/1e3%60),s=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24),l=0===o&&s<10?s.toString():s<10?"0"+s:s;let M="";return o>0&&(M+=`${o<10?"0"+o:o}h `),(s>0||o>0)&&(M+=`${l}m `),M+=`${0===o&&0===s&&r<10?r.toString():r<10?"0"+r:r}s`,M}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"elapsedTime",type:e,pure:!0})}return e})();const mLt=["keyboard"],vK=()=>[],pLt=(e,i)=>[e,i],WO=e=>[e],xK=e=>[e,"shadow-local"],gLt=e=>[e,"trophy-large","shadow-local"];function vLt(e,i){if(1&e&&(tt(0,"div",8)(1,"div",9)(2,"div",10),ut(3," Loading... "),et(),we(4,"mat-progress-bar",11),et()()),2&e){const t=Ct(2);lt(4),yt("value",t.loadingAssetsProgress)}}function xLt(e,i){1&e&&(tt(0,"span")(1,"mat-icon"),ut(2,"favorite"),et()())}function yLt(e,i){1&e&&(tt(0,"span")(1,"mat-icon"),ut(2,"favorite_border"),et()())}function bLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=i.$implicit;lt(),Ze(t)}}function wLt(e,i){if(1&e&&(tt(0,"span",33),Gt(1,bLt,2,1,"span",18),et()),2&e){const t=i.$implicit;lt(),yt("ngForOf",t.split(""))}}function _Lt(e,i){if(1&e&&(tt(0,"div",31),Gt(1,wLt,2,1,"span",32),et()),2&e){const t=Ct(2).ngIf;lt(),yt("ngForOf",t.displayTerm.join("").split(" "))}}function TLt(e,i){1&e&&(tt(0,"div",34)(1,"div",35),ut(2," Choosing a random SNOMED CT concept using the FHIR API "),et(),we(3,"mat-progress-bar",36),et())}function CLt(e,i){if(1&e){const t=ve();tt(0,"div",37),Vt("click",function(){return Ut(t),zt(Ct(3).revealHint())}),ut(1," Reveal Hint "),et()}}function SLt(e,i){if(1&e){const t=ve();tt(0,"div",37),Vt("click",function(){return Ut(t),zt(Ct(3).loadMenu())}),ut(1," Abandon game "),et()}}function ELt(e,i){1&e&&we(0,"li",41),2&e&&yt("innerHTML",i.$implicit,Pf)}function ALt(e,i){if(1&e&&(tt(0,"div",38)(1,"div",39)(2,"h2"),ut(3,"Hints:"),et(),tt(4,"ul"),Gt(5,ELt,1,1,"li",40),et()()()),2&e){const t=Ct(2).ngIf;lt(5),yt("ngForOf",t.hints)}}function DLt(e,i){if(1&e&&(tt(0,"mat-icon",47),ut(1,"grade"),et()),2&e){const t=Ct().$implicit;Ds("left",Ct(3).calculateGoalPosition(t.score-5),"%"),yt("ngClass",vc(3,WO,t.name.toLowerCase()))}}function MLt(e,i){if(1&e&&(tt(0,"mat-icon",48),ut(1,"grade"),et()),2&e){const t=Ct().$implicit;Ds("left",Ct(3).calculateGoalPosition(t.score-1),"%"),yt("ngClass",vc(3,WO,t.name.toLowerCase()))}}function ILt(e,i){if(1&e&&(tt(0,"div",49),ut(1),et()),2&e){const t=Ct().$implicit;Ds("left",Ct(3).calculateGoalPosition(t.score),"%"),yt("ngClass",vc(4,WO,t.name.toLowerCase())),lt(),Ye("",t.name," trophy!")}}function RLt(e,i){if(1&e&&(Wi(0),we(1,"div",42),Gt(2,DLt,2,5,"mat-icon",43),tt(3,"mat-icon",44),ut(4,"emoji_events"),et(),Gt(5,MLt,2,5,"mat-icon",45)(6,ILt,2,6,"div",46),Xi()),2&e){const t=i.$implicit,n=Ct(2).ngIf,r=Ct();lt(),Ll(t.name.toLowerCase()),Ds("left",r.calculateGoalPosition(t.score),"%"),lt(),yt("ngIf",n.score>=t.score),lt(),Ds("left",r.calculateGoalPosition(t.score-3),"%"),yt("ngClass",UM(10,pLt,t.name.toLowerCase(),n.score>=t.score?"trophy-large":"")),lt(2),yt("ngIf",n.score>=t.score),lt(),yt("ngIf",n.score>=t.score)}}function kLt(e,i){if(1&e){const t=ve();tt(0,"div")(1,"div",12)(2,"div",13),we(3,"img",14),tt(4,"div",15),ut(5),et()()(),tt(6,"div",16)(7,"span",17),ut(8),et(),Gt(9,xLt,3,0,"span",18)(10,yLt,3,0,"span",18),tt(11,"span",17),ut(12),et()(),Gt(13,_Lt,2,1,"div",19)(14,TLt,4,0,"div",20),tt(15,"p",21),ut(16,"Click the keys to guess the letters of the term!"),et(),tt(17,"div")(18,"app-keyboard",22,0),Vt("letterGuessed",function(r){return Ut(t),zt(Ct(2).guessLetter(r))}),et()(),tt(20,"div",23),Gt(21,CLt,2,0,"div",24)(22,SLt,2,0,"div",25),et(),Gt(23,ALt,6,1,"div",26),tt(24,"div",27),ut(25," * Hints are generated from the definition of the SNOMED CT concept, retrieved from the FHIR API as an SCG grammar expression "),et(),tt(26,"div",28)(27,"h3"),ut(28,"Score Progression"),et(),tt(29,"div",29),we(30,"mat-progress-bar",30),Gt(31,RLt,7,13,"ng-container",18),et()()()}if(2&e){const t=Ct().ngIf,n=Ct();lt(3),yt("@popIn",void 0),lt(2),Zc(" ",t.difficultyLevel," - ",n.getLanguageName(n.selectedLanguage)," "),lt(3),Zc(" Round: ",t.round," \xa0\xa0\xa0\xa0 Score: ",t.score," \xa0\xa0\xa0\xa0 Life: "),lt(),yt("ngForOf",Ko(16,vK).constructor(t.hitPoints)),lt(),yt("ngForOf",Ko(17,vK).constructor(t.rules.maxHitPoints-t.hitPoints)),lt(2),Ye(" \xa0\xa0\xa0\xa0 Time to guess: ",t.remainingTime,""),lt(),yt("ngIf","playing"==t.state),lt(),yt("ngIf","choosingTerm"===t.state),lt(3),yt("@shake",n.shakeState),lt(4),yt("ngIf","playing"==t.state&&t.hintsAvailable&&t.hitPoints>1),lt(),yt("ngIf","playing"==t.state),lt(),yt("ngIf",t.hints.length>0&&"playing"==t.state),lt(7),yt("value",n.calculateProgress(t.score)),lt(),yt("ngForOf",n.goals)}}function PLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",52),tt(3,"p",53)(4,"b"),ut(5,"Welcome to SnoGuess!"),et()(),tt(6,"p",53),ut(7," A fun way to learn about SNOMED CT concepts and their definitions. "),et(),tt(8,"div",54),Vt("click",function(){return Ut(t),zt(Ct(2).chooseDifficultyLevel())}),ut(9," New game "),et(),tt(10,"div",54),Vt("click",function(){return Ut(t),zt(Ct(2).showInstructionsPanel())}),ut(11," Instructions "),et(),tt(12,"div",55),Vt("click",function(){return Ut(t),zt(Ct(2).openScoreboard())}),ut(13," High Scores "),et(),tt(14,"p",56),ut(15," Playing with terms in the IPS Reference Set in "),tt(16,"b"),ut(17),et(),ut(18,", change language: "),et(),tt(19,"div",57)(20,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("da"))}),ut(21,"DA"),et(),tt(22,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("de"))}),ut(23,"DE"),et(),tt(24,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("en"))}),ut(25,"EN"),et(),tt(26,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("es"))}),ut(27,"ES"),et(),tt(28,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("et"))}),ut(29,"ET"),et(),tt(30,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("fi"))}),ut(31,"FI"),et(),tt(32,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("fr"))}),ut(33,"FR"),et(),tt(34,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("nl"))}),ut(35,"NL"),et(),tt(36,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("no"))}),ut(37,"NO"),et(),tt(38,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("sv"))}),ut(39,"SV"),et()()()}if(2&e){const t=Ct(2);lt(2),yt("@popIn",void 0),lt(6),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(5),Ze(t.getLanguageName(t.selectedLanguage))}}function FLt(e,i){1&e&&(tt(0,"span"),ut(1,", Endless"),et())}function OLt(e,i){if(1&e){const t=ve();tt(0,"div",62)(1,"div",63),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(3).startGame(r.name))}),ut(2),et(),tt(3,"p",64),ut(4),tt(5,"mat-icon",65),ut(6,"favorite"),et(),ut(7),tt(8,"mat-icon",66),ut(9,"contact_support"),et(),ut(10),tt(11,"mat-icon",67),ut(12,"timer"),et(),Gt(13,FLt,2,0,"span",5),et()()}if(2&e){const t=i.$implicit;lt(),yt("@scrollUp",void 0),lt(),Ye(" ",t.name," "),lt(),yt("@fadeInDelayed",void 0),lt(),Ye(" Life: ",t.rules.maxHitPoints," "),lt(3),Ye(", Free hints: ",t.rules.freeHints," "),lt(3),Zc(", Points per letter: ",t.rules.pointsPerGuessedLetter,", Time to guess: ",t.rules.maxRoundTime," "),lt(3),yt("ngIf",t.rules.endless)}}function LLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",59),tt(3,"p",53)(4,"b"),ut(5,"Choose the game difficulty"),et()(),Gt(6,OLt,14,8,"div",60),tt(7,"div",61),Vt("click",function(){return Ut(t),zt(Ct(2).backToMenu())}),ut(8," Back "),et()()}if(2&e){const t=Ct(2);lt(2),yt("@popIn",void 0),lt(4),yt("ngForOf",t.difficultyLevels),lt(),yt("@scrollUp",void 0)}}function NLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",68),tt(3,"ul",69)(4,"li",70)(5,"mat-icon"),ut(6,"check"),et(),ut(7,"Click the keys on the screen to guess the letters of the term "),tt(8,"mat-icon",71),ut(9,"keyboard"),et()(),tt(10,"li",70)(11,"mat-icon"),ut(12,"check"),et(),ut(13,"You have three to five lives, depending on your difficulty level "),tt(14,"span",72)(15,"mat-icon"),ut(16,"favorite"),et(),tt(17,"mat-icon"),ut(18,"favorite"),et(),tt(19,"mat-icon"),ut(20,"favorite"),et()()(),tt(21,"li",70)(22,"mat-icon"),ut(23,"check"),et(),ut(24,"There is also a maxmimum time to guess each term "),tt(25,"mat-icon",73),ut(26,"timer"),et()(),tt(27,"li",70)(28,"mat-icon"),ut(29,"check"),et(),ut(30,"You will loose one life with each wrong guess "),tt(31,"mat-icon",72),ut(32,"favorite_border"),et()(),tt(33,"li",70)(34,"mat-icon"),ut(35,"check"),et(),ut(36,"The game ends when you run out of lives or time"),tt(37,"mat-icon",72),ut(38,"close"),et()(),tt(39,"li",70)(40,"mat-icon"),ut(41,"check"),et(),ut(42,"You earn points for each correct guess "),tt(43,"mat-icon",71),ut(44,"plus_one"),et()(),tt(45,"li",70)(46,"mat-icon"),ut(47,"check"),et(),ut(48,"In Easy mode you get 2 hints for free, and in Medium mode you get one \u{1f4a1} "),et(),tt(49,"li",70)(50,"mat-icon"),ut(51,"check"),et(),ut(52,"You can reveal more hints, but each hint it will cost one life "),tt(53,"mat-icon",72),ut(54,"favorite_border"),et()(),tt(55,"li",70)(56,"mat-icon"),ut(57,"check"),et(),ut(58,"If you guess the whole term you can recover one life"),tt(59,"mat-icon",72),ut(60,"favorite"),et()(),tt(61,"li",70)(62,"mat-icon"),ut(63,"check"),et(),ut(64,"Keep guessing terms to increase your score and earn trophies "),tt(65,"mat-icon",74),ut(66,"emoji_events"),et()(),tt(67,"li",70)(68,"mat-icon"),ut(69,"check"),et(),ut(70,"Endless mode will not finish when you reach the Diamond Trophy "),tt(71,"mat-icon",75),ut(72,"emoji_events"),et()()(),tt(73,"div",76),Vt("click",function(){return Ut(t),zt(Ct(2).hideInstructionsPanel())}),ut(74," Back "),et()()}2&e&&(lt(2),yt("@popIn",void 0),lt(71),yt("@scrollUp",void 0))}function BLt(e,i){1&e&&(tt(0,"div",77),we(1,"img",78),et()),2&e&&(lt(),yt("@popIn",void 0))}function VLt(e,i){if(1&e&&(tt(0,"div"),ut(1),et()),2&e){const t=Ct(2).ngIf,n=Ct();lt(),Ye(" Trophy: ",n.getMaxTrophyObtained(t.score)," ")}}function ULt(e,i){if(1&e&&(tt(0,"div")(1,"mat-icon",88),ut(2,"grade"),et(),ut(3," \xa0\xa0 "),tt(4,"mat-icon",88),ut(5,"emoji_events"),et(),ut(6," \xa0 "),tt(7,"mat-icon",88),ut(8,"grade"),et()()),2&e){const t=Ct(2).ngIf,n=Ct();lt(),yt("ngClass",vc(3,xK,n.getMaxTrophyObtained(t.score).toLocaleLowerCase())),lt(3),yt("ngClass",vc(5,gLt,n.getMaxTrophyObtained(t.score).toLocaleLowerCase())),lt(3),yt("ngClass",vc(7,xK,n.getMaxTrophyObtained(t.score).toLocaleLowerCase()))}}function zLt(e,i){1&e&&(tt(0,"p",89),ut(1,"Checking high scores..."),et())}function GLt(e,i){if(1&e){const t=ve();tt(0,"div",90)(1,"p",91),ut(2," This is a High Score! Save a message to the public leaderboard! "),et(),tt(3,"input",92),wa("ngModelChange",function(r){Ut(t);const s=Ct(3);return Na(s.messageForLeaderboard,r)||(s.messageForLeaderboard=r),zt(r)}),et(),tt(4,"div",93),Vt("click",function(){Ut(t);const r=Ct(2).ngIf;return zt(Ct().saveScore(r))}),ut(5," Save "),et(),tt(6,"p",94),ut(7,"No personal information is recorded"),et()()}if(2&e){const t=Ct(3);lt(3),ba("ngModel",t.messageForLeaderboard)}}function HLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",79),tt(3,"div",80)(4,"div"),ut(5," The term was: "),et(),tt(6,"div",81),ut(7),et(),tt(8,"div",82),ut(9),et(),tt(10,"div",83),ut(11),sa(12,"elapsedTime"),et(),Gt(13,VLt,2,1,"div",5),et(),Gt(14,ULt,9,9,"div",5)(15,zLt,2,0,"p",84)(16,GLt,8,1,"div",85),tt(17,"div",86),Vt("click",function(){Ut(t);const r=Ct(2);return r.loadMenu(),zt(r.chooseDifficultyLevel())}),ut(18," New game "),et(),tt(19,"div",86),Vt("click",function(){return Ut(t),zt(Ct(2).openScoreboard())}),ut(20," High Scores "),et(),tt(21,"div",87),Vt("click",function(){return Ut(t),zt(Ct(2).loadMenu())}),ut(22," Main menu "),et()()}if(2&e){const t=Ct().ngIf,n=Ct();lt(2),yt("@popIn",void 0),lt(5),Ye(" ",t.term,""),lt(2),Zc("",t.round," ",1==t.round?"round":"rounds",""),lt(2),Ux(" Final Score: ",t.score," points - Difficulty: ",t.difficultyLevel," - Total time: ",xc(12,14,t.endTimestamp-t.startTimestamp)," "),lt(2),yt("ngIf",n.getMaxTrophyObtained(t.score)),lt(),yt("ngIf",n.getMaxTrophyObtained(t.score)),lt(),yt("ngIf",n.highScoresLoading),lt(),yt("ngIf",n.highScore),lt(),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0)}}function WLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).ngIf;lt(),Ye("\u2192 Bonus: ",t.livesBonus,"")}}function XLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).ngIf;lt(),Ye("\u2192 Bonus: ",t.difficultyBonus,"")}}function jLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).ngIf;lt(),Ye("\u2192 Bonus: ",t.timeBonus,"")}}function YLt(e,i){if(1&e){const t=ve();tt(0,"div",90)(1,"p",91),ut(2," This is a High Score! Save a message to the public leaderboard! "),et(),tt(3,"input",100),wa("ngModelChange",function(r){Ut(t);const s=Ct(3);return Na(s.messageForLeaderboard,r)||(s.messageForLeaderboard=r),zt(r)}),et(),tt(4,"div",101),Vt("click",function(){Ut(t);const r=Ct(2).ngIf;return zt(Ct().saveScore(r))}),ut(5," Save "),et(),tt(6,"p",94),ut(7,"No personal information is recorded"),et()()}if(2&e){const t=Ct(3);lt(3),ba("ngModel",t.messageForLeaderboard)}}function $Lt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",95),tt(3,"div",96)(4,"mat-icon",97),ut(5,"grade"),et(),tt(6,"mat-icon",97),ut(7,"emoji_events"),et(),tt(8,"mat-icon",97),ut(9,"grade"),et()(),tt(10,"div",98),ut(11),Gt(12,WLt,2,1,"span",5),et(),tt(13,"div",98),ut(14),Gt(15,XLt,2,1,"span",5),et(),tt(16,"div",98),ut(17),sa(18,"elapsedTime"),Gt(19,jLt,2,1,"span",5),et(),tt(20,"div",99),ut(21),et(),Gt(22,YLt,8,1,"div",85),tt(23,"div",86),Vt("click",function(){Ut(t);const r=Ct(2);return r.loadMenu(),zt(r.chooseDifficultyLevel())}),ut(24," New game "),et(),tt(25,"div",86),Vt("click",function(){return Ut(t),zt(Ct(2).openScoreboard())}),ut(26," High Scores "),et(),tt(27,"div",87),Vt("click",function(){return Ut(t),zt(Ct(2).loadMenu())}),ut(28," Main menu "),et()()}if(2&e){const t=Ct().ngIf,n=Ct();lt(2),yt("@popIn",void 0),lt(9),Ye("Lives left: ",t.hitPoints," "),lt(),yt("ngIf",t.livesBonus>0),lt(2),Ye("Difficulty: ",t.difficultyLevel," "),lt(),yt("ngIf",t.difficultyBonus>0),lt(2),Ye("Time: ",xc(18,12,t.endTimestamp-t.startTimestamp)," "),lt(2),yt("ngIf",t.timeBonus>0),lt(2),Ye("Final score: ",t.score,""),lt(),yt("ngIf",n.highScore),lt(),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0)}}function QLt(e,i){if(1&e&&(tt(0,"div",3),Gt(1,vLt,5,1,"div",4)(2,kLt,32,18,"div",5)(3,PLt,40,5,"div",6)(4,LLt,9,3,"div",6)(5,NLt,75,2,"div",6)(6,BLt,2,1,"div",7)(7,HLt,23,16,"div",6)(8,$Lt,29,14,"div",6),et()),2&e){const t=i.ngIf,n=Ct();lt(),yt("ngIf",n.loadingAssets),lt(),yt("ngIf",("playing"==t.state||"choosingTerm"==t.state)&&!n.loadingAssets),lt(),yt("ngIf","menu"===t.state&&!n.chooseDifficulty&&!n.showInstructions&&!n.loadingAssets),lt(),yt("ngIf","menu"===t.state&&n.chooseDifficulty&&!n.showInstructions&&!n.loadingAssets),lt(),yt("ngIf",n.showInstructions),lt(),yt("ngIf",n.termGuessed),lt(),yt("ngIf","gameOver"===t.state),lt(),yt("ngIf","won"==t.state)}}let KLt=(()=>{class e{constructor(t,n,r,s,o){this.snoguessMainService=t,this.preloadService=n,this.terminologyService=r,this.firebaseService=s,this.router=o,this.shakeState="normal",this.termGuessed="",this.goals=[],this.loadingAssetsProgress=0,this.loadingAssets=!0,this.highScoresLoading=!1,this.showInstructions=!1,this.chooseDifficulty=!1,this.currentYear=new Date,this.difficultyLevels=[],this.elapsedTime=0,this.gameInProgress=!1,this.messageForLeaderboard="",this.highScore=!1}ngOnInit(){this.game=this.snoguessMainService.getGameState(),this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.game.subscribe(n=>{"playing"===n.state&&(this.goals=n.rules.goals),("gameOver"===n.state||"won"===n.state)&&(this.stopTimer(),this.highScoresLoading=!0,this.firebaseService.getScores(n.difficultyLevel).then(r=>{this.highScoresLoading=!1,(!r||r.length<20||n.score>r[r.length-1].score)&&(this.highScore=!0)}))}),this.snoguessMainService.guessResult.subscribe(n=>{!1===n.result?(this.keyboard?.addGuessedLetter(n.letter,!1),this.shakeState="shake",setTimeout(()=>this.shakeState="normal",200)):this.keyboard?.addGuessedLetter(n.letter,!0)}),this.snoguessMainService.termResult.subscribe(n=>{n&&(this.keyboard?.reset(),this.termGuessed=n,setTimeout(()=>{this.termGuessed=""},2e3))}),this.preloadService.preloadImages(["assets/img/SI_CT_w_tagline.png","assets/img/snoguess-logo.png","assets/img/congratulations.png","assets/img/correct.png","assets/img/game-over.png","assets/img/instructions.png","assets/img/difficulty.png","assets/img/scoreboard.png"]).then(()=>{setTimeout(()=>{this.loadingAssets=!1,this.loadMenu()},500)}),this.preloadService.loadingProgress.subscribe(n=>{this.loadingAssetsProgress=n}),this.terminologyService.fhirUrlParam$.subscribe(n=>{n&&this.terminologyService.getCodeSystem(n).subscribe(r=>{this.selectedEdition=r?.entry[0]?.resource?.title})}),this.terminologyService.lang$.subscribe(n=>{this.selectedLanguage=n})}loadMenu(){this.snoguessMainService.loadMenu()}backToMenu(){this.chooseDifficulty=!1}showInstructionsPanel(){this.showInstructions=!0}hideInstructionsPanel(){this.showInstructions=!1}chooseDifficultyLevel(){this.chooseDifficulty=!0}startGame(t){this.chooseDifficulty=!1,this.keyboard&&this.keyboard.reset(),this.stopTimer(),this.snoguessMainService.startGame(t),this.startTimer(),this.highScore=!1}guessLetter(t){var n=this;return de(function*(){"playing"===(yield function WIt(e,i){const t="object"==typeof i;return new Promise((n,r)=>{const s=new Ho({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{t?n(i.defaultValue):r(new Eg)}});e.subscribe(s)})}(n.game))?.state&&n.snoguessMainService.guessLetter(t)})()}revealHint(){this.snoguessMainService.revealHint()}calculateProgress(t){return Math.min(t/this.goals[this.goals.length-1].score*100,100)}calculateGoalPosition(t){return t/this.goals[this.goals.length-1].score*100}findCurrentGoal(t){if(!t||t{t>=r.score&&(n=r.name)}),n}startTimer(){this.elapsedTime=0,this.gameInProgress=!0;const t=Iy(0,1e3).pipe(Di(n=>this.elapsedTime=n),WH(()=>this.gameInProgress));this.gameTimerSubscription=t.subscribe()}stopTimer(){this.gameInProgress=!1,this.gameTimerSubscription&&this.gameTimerSubscription.unsubscribe()}openScoreboard(t){t||(t=this.difficultyLevels[0].name),this.router.navigate(["/snoguess/scoreboard"],{queryParams:{level:t}})}saveScore(t){let n={score:t.score,numberOfRounds:t.round,difficulty:t.difficultyLevel,elapsed:t.endTimestamp-t.startTimestamp,date:ns.now(),message:this.messageForLeaderboard};this.firebaseService.addScore(t.difficultyLevel,n).then(()=>{this.messageForLeaderboard="",this.openScoreboard(t.difficultyLevel)}).catch(r=>{this.messageForLeaderboard="",console.error("Error saving score: ",r),this.loadMenu()})}getLanguageName(t){return{en:"English",es:"Spanish",fr:"French",de:"German",da:"Danish",nl:"Dutch",et:"Estonian",fi:"Finnish",no:"Norwegian",sv:"Swedish"}[t]||t}setLanguage(t){this.terminologyService.setLang(t),this.terminologyService.setFhirUrlParam({en:{lang:"en",fhirUrl:"http://snomed.info/sct/900000000000207008"},es:{lang:"es",fhirUrl:"http://snomed.info/sct/449081005"},fr:{lang:"fr",fhirUrl:"http://snomed.info/sct/11000241103"},de:{lang:"de",fhirUrl:"http://snomed.info/sct/11000274103"},da:{lang:"da",fhirUrl:"http://snomed.info/sct/554471000005108"},nl:{lang:"nl",fhirUrl:"http://snomed.info/sct/11000146104"},et:{lang:"et",fhirUrl:"http://snomed.info/sct/11000181102"},fi:{lang:"fi",fhirUrl:"http://snomed.info/sct/11000229106"},no:{lang:"no",fhirUrl:"http://snomed.info/sct/51000202101"},sv:{lang:"sv",fhirUrl:"http://snomed.info/sct/45991000052106"}}[t].fhirUrl)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(mK),mt(oLt),mt(ca),mt(pK),mt(Fo))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-snoguess-main"]],viewQuery:function(n,r){if(1&n&&Mi(mLt,5),2&n){let s;Be(s=Ve())&&(r.keyboard=s.first)}},decls:6,vars:7,consts:[["keyboard",""],["class","snoguess-game",4,"ngIf"],[1,"text-center","mt-8","mb-4"],[1,"snoguess-game"],["class","assets-loading-container",4,"ngIf"],[4,"ngIf"],["class","flex flex-col items-center gap-4",4,"ngIf"],["class","overlay overlay-transparent",4,"ngIf"],[1,"assets-loading-container"],[1,"mt-48","mb-48"],[1,"progress-bar-message","text-center"],["mode","determinate",1,"game-progress-bar",3,"value"],[1,"flex","justify-center","mt-8","mb-8"],[1,"relative","w-1/4"],["src","assets/img/snoguess-logo.png","alt","Game Logo"],[1,"diff-label","absolute","-bottom-3","right-5","italic","text-gray-500"],[1,"hit-points"],[1,"score"],[4,"ngFor","ngForOf"],["class","term-display flex flex-row flex-wrap justify-center gap-8",4,"ngIf"],["class","loading-container",4,"ngIf"],[1,"guess-message"],[3,"letterGuessed"],[1,"game-buttons","mt-4"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","hints-container",4,"ngIf"],[1,"note"],[1,"score-progression-panel"],[1,"progress-bar-container"],["mode","determinate",3,"value"],[1,"term-display","flex","flex-row","flex-wrap","justify-center","gap-8"],["class","whitespace-nowrap",4,"ngFor","ngForOf"],[1,"whitespace-nowrap"],[1,"loading-container"],[1,"progress-bar-message"],["mode","indeterminate"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pt-1","pb-1","pl-6","pr-6","w-fit","text-center","cursor-pointer","font-bold","text-white",3,"click"],[1,"hints-container"],[1,"hints-callout","text-center"],["class","hint-item",3,"innerHTML",4,"ngFor","ngForOf"],[1,"hint-item",3,"innerHTML"],[1,"goal-indicator"],["class","star-icon left-star",3,"ngClass","left",4,"ngIf"],[1,"trophy-icon",3,"ngClass"],["class","star-icon right-star",3,"ngClass","left",4,"ngIf"],["class","goal-name",3,"left","ngClass",4,"ngIf"],[1,"star-icon","left-star",3,"ngClass"],[1,"star-icon","right-star",3,"ngClass"],[1,"goal-name",3,"ngClass"],[1,"flex","flex-col","items-center","gap-4"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/snoguess-logo.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,"text-center","font-light","text-lg"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","text-3xl",3,"click"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-12","text-3xl",3,"click"],[1,"text-center","font-light","italic","text-lg"],[1,"text-center","font-light","italic","text-sm"],["mat-button","",3,"click"],["src","assets/img/difficulty.png","alt","Game Logo",1,"w-1/4","mt-8"],["class","level-container w-full flex flex-col justify-center items-center",4,"ngFor","ngForOf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","mb-8","text-3xl",3,"click"],[1,"level-container","w-full","flex","flex-col","justify-center","items-center"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","text-3xl",3,"click"],[1,"level-details","text-center","mt-3","flex","flex-row","items-center"],[1,"text-red-500","text-sm"],[1,"text-yellow-500","text-sm"],[1,"text-green-500","text-sm"],["src","assets/img/instructions.png","alt","Game Logo",1,"w-1/4","mt-8","mb-12"],[1,"text-left","instructions-text"],[1,"flex","flex-row","items-center","gap-2"],[1,"text-blue-900"],[1,"text-red-500"],[1,"text-green-500"],[1,"text-yellow-500"],[1,"text-blue-500"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"overlay","overlay-transparent"],["src","assets/img/correct.png","alt","Correct",1,"w-1/5","mt-8"],["src","assets/img/game-over.png","alt","Game Logo",1,"w-1/4","mt-8"],[1,"text-xl","text-pretty","text-center"],[1,"font-bold"],[1,"mt-12"],[1,"mt-4"],["class","text-center italic text-gray-500",4,"ngIf"],["class","flex flex-col items-center gap-4 w-full",4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","text-2xl",3,"click"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],[3,"ngClass"],[1,"text-center","italic","text-gray-500"],[1,"flex","flex-col","items-center","gap-4","w-full"],[1,"font-bold","text-lg","md:text-xl","text-blue-900"],["type","text","placeholder","Type your message here",1,"w-full","md:w-1/2","text-base","md:text-2xl","text-center","bg-blue-50","border-solid","border-2",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4","md:text-2xl",3,"click"],[1,"text-sm","text-gray-400"],["src","assets/img/congratulations.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,""],[1,"large-icon","diamond","shadow-local"],[1,"text-lg"],[1,"reveal","won"],["type","text","placeholder","Your message here",1,"w-full","md:w-1/2","text-base","md:text-lg",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4",3,"click"]],template:function(n,r){1&n&&(Gt(0,QLt,9,8,"div",1),sa(1,"async"),tt(2,"div",2),ut(3),sa(4,"date"),et(),we(5,"app-add-to-home")),2&n&&(yt("ngIf",xc(1,2,r.game)),lt(3),Ye(" Copyright \xa9 ",Xd(4,4,r.currentYear,"yyyy")," SNOMED International\n"))},dependencies:[bc,gs,Ms,Sa,da,dP,Hl,No,Wl,dLt,fLt,wI,gh,gK],styles:[".snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a;min-height:85vh!important}.term-display[_ngcontent-%COMP%]{font-size:24px;letter-spacing:4px;word-break:break-all;margin-bottom:20px;text-align:center;font-family:monospace}.term-display[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0}.hit-points[_ngcontent-%COMP%]{font-weight:700;color:#d9534f;text-align:center;margin-bottom:2rem}mat-form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}button[_ngcontent-%COMP%]{margin-right:8px}.guess-field[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1000}.overlay-dark[_ngcontent-%COMP%]{background-color:#00000080}.overlay-transparent[_ngcontent-%COMP%]{background-color:#0000}.message[_ngcontent-%COMP%]{font-size:4rem;text-align:center;margin-bottom:20px;font-weight:bolder}.reveal[_ngcontent-%COMP%]{font-size:2rem;text-align:center;margin-bottom:20px;font-weight:bolder}.won[_ngcontent-%COMP%]{color:#4caf50;text-shadow:black 2px 2px 2px}.lost[_ngcontent-%COMP%]{color:#f44336;text-shadow:rgb(0,0,0) 2px 2px 2px}.overlay[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1.5rem;padding:10px 20px}.loading-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;margin-bottom:1rem}.progress-bar-message[_ngcontent-%COMP%]{color:#000;font-size:larger;margin-bottom:10px;font-style:italic;font-weight:lighter}.score[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.score-progression-panel[_ngcontent-%COMP%]{margin-top:2rem}.progress-bar-container[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:5rem;position:relative;background-color:#e0e0e0;border-radius:5px}.goal-indicator[_ngcontent-%COMP%]{position:absolute;bottom:0;width:2px;height:10px;background-color:#000}.goal-indicator.bronze[_ngcontent-%COMP%]{background-color:#cd7f32}.goal-indicator.silver[_ngcontent-%COMP%]{background-color:silver}.goal-indicator.gold[_ngcontent-%COMP%]{background-color:gold}.goal-indicator.platinum[_ngcontent-%COMP%]{background-color:#e5e4e2}.goal-indicator.diamond[_ngcontent-%COMP%]{background-color:#3b49c4}.trophy-icon[_ngcontent-%COMP%]{position:absolute;bottom:-35px;font-size:24px;width:24px;transition:transform .3s ease}.trophy-large[_ngcontent-%COMP%]{transform:scale(2.5) translate(-2px,3px)}.bronze[_ngcontent-%COMP%]{color:#cd7f32}.silver[_ngcontent-%COMP%]{color:silver}.gold[_ngcontent-%COMP%]{color:gold}.platinum[_ngcontent-%COMP%]{color:#e5e4e2}.diamond[_ngcontent-%COMP%]{color:#3b49c4}.shadow-local[_ngcontent-%COMP%]{text-shadow:black 2px 2px 2px}.star-icon[_ngcontent-%COMP%]{position:absolute;bottom:-40px;font-size:30px;width:30px;transition:transform .3s ease}.left-star[_ngcontent-%COMP%]{transform:translate(-50px)}.right-star[_ngcontent-%COMP%]{transform:translate(30px)}.goal-name[_ngcontent-%COMP%]{position:absolute;bottom:-75px;width:100px;margin-left:-50px;text-align:center;font-size:12px;font-weight:700;color:#000}.large-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem}.note[_ngcontent-%COMP%]{font-size:.8rem;font-weight:lighter;margin-top:1rem;text-align:center}.hints-container[_ngcontent-%COMP%]{margin-top:1rem}.hints-callout[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:.5rem}.hint-item[_ngcontent-%COMP%]{color:#555;font-size:1em;list-style-type:none;position:relative;padding:5px 0 5px 30px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}li[_ngcontent-%COMP%]{margin-bottom:10px;color:#666;font-size:1.2rem}.guess-message[_ngcontent-%COMP%]{text-align:center;margin-top:1rem;font-size:1.2rem}.assests-loading-container[_ngcontent-%COMP%]{text-align:center;font-size:20px;color:#fff}.game-progress-bar[_ngcontent-%COMP%]{border-radius:22px;overflow:hidden;background-color:#e0e0e0;box-shadow:0 4px 8px #0003}.game-progress-bar[_ngcontent-%COMP%] .mat-progress-bar-fill[_ngcontent-%COMP%]:after{background-color:#4caf50;border-radius:22px}.game-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.level-details[_ngcontent-%COMP%]{visibility:hidden}.level-container[_ngcontent-%COMP%]:hover .level-details[_ngcontent-%COMP%]{visibility:visible}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[mr("shake",[ln("normal => shake",an(200,Kg([si({transform:"translateX(0)"}),si({transform:"translateX(-10px)"}),si({transform:"translateX(10px)"}),si({transform:"translateX(0)"})])))]),mr("popIn",[ln(":enter",[si({transform:"scale(0.8)",opacity:0}),an("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",si({transform:"scale(1.3)",opacity:1})),an("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",si({transform:"scale(1)",opacity:1}))])]),mr("scrollUp",[ln(":enter",[si({transform:"translateY(100%)",opacity:0}),an("0.5s ease-out",si({transform:"translateY(0)",opacity:1}))])]),mr("fadeInDelayed",[ln(":enter",[si({opacity:0}),an("1s 0.5s ease-out",si({opacity:1}))])])]}})}return e})();const ZLt=()=>({});function JLt(e,i){if(1&e){const t=ve();tt(0,"li")(1,"a",11),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().findingWithExplicitContextSelected(r))}),ut(2),et()()}if(2&e){const t=i.$implicit;lt(2),Ze(t.display)}}function qLt(e,i){1&e&&(tt(0,"th",20),ut(1," Type "),et())}function tNt(e,i){if(1&e&&(tt(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.type.display," ")}}function eNt(e,i){1&e&&(tt(0,"th",20),ut(1," Target "),et())}function iNt(e,i){if(1&e&&(tt(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.target.code," ")}}function nNt(e,i){1&e&&(tt(0,"th",20),ut(1," Target "),et())}function rNt(e,i){if(1&e&&(tt(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.target.display," ")}}function sNt(e,i){1&e&&we(0,"tr",22)}function aNt(e,i){1&e&&we(0,"tr",23)}function oNt(e,i){if(1&e&&(tt(0,"div",4)(1,"h3"),ut(2),et(),tt(3,"table",12),Wi(4,13),Gt(5,qLt,2,0,"th",14)(6,tNt,2,1,"td",15),Xi(),Wi(7,16),Gt(8,eNt,2,0,"th",14)(9,iNt,2,1,"td",15),Xi(),Wi(10,17),Gt(11,nNt,2,0,"th",14)(12,rNt,2,1,"td",15),Xi(),Gt(13,sNt,1,0,"tr",18)(14,aNt,1,0,"tr",19),et()()),2&e){const t=Ct();lt(2),Ye("Relevant attributes (",t.selectedSituation.display,")"),lt(),yt("dataSource",t.dataSource),lt(10),yt("matHeaderRowDef",t.displayedColumns),lt(),yt("matRowDefColumns",t.displayedColumns)}}function lNt(e,i){if(1&e&&(tt(0,"div",4)(1,"h3"),ut(2,"Resource Type"),et(),tt(3,"a",24)(4,"span"),ut(5),et(),tt(6,"mat-icon"),ut(7,"open_in_new"),et()()()),2&e){const t=Ct();lt(3),yt("href","https://hl7.org/fhir/R4/"+t.resourceType+".html",lx),lt(2),Ye("FHIR R4 ",t.resourceType,"")}}function cNt(e,i){if(1&e){const t=ve();tt(0,"div",25)(1,"button",26),Vt("click",function(){Ut(t);const r=Ct();return zt(r.saveOutput(r.fhirRepresentationString))}),we(2,"mat-icon",27),et(),tt(3,"button",28),Vt("click",function(){Ut(t);const r=Ct();return zt(r.copyOutputToClipboard(r.fhirRepresentationString))}),we(4,"mat-icon",29),et()()}}let dNt=(()=>{class e{constructor(t,n){this.terminologyService=t,this.clipboard=n,this.fhirRepresentationString="{}",this.situationsBinding={title:"Finding with explicit context",type:"Autocomplete",ecl:"<< 413350009 |Finding with explicit context (situation)|",value:"",note:"Select a finding with explicit context"},this.SituationConstants={KnownPresent:{code:"410515003",display:"Known present",selfAndDescendants:[]},KnownAbsent:{code:"410516002",display:"Known absent",selfAndDescendants:[]},SubjectOfRecord:{code:"410604004",display:"Subject of record",selfAndDescendants:[]},PersonInTheFamily:{code:"303071001",display:"Person in the family",selfAndDescendants:[]},InThePast:{code:"410513005",display:"In the past",selfAndDescendants:[]},CurrentOrSpecifiedTime:{code:"410512000",display:"Current or specified time",selfAndDescendants:[]},KnownPossible:{code:"410590009",display:"Known possible",selfAndDescendants:[]}},this.examples=[{code:"160377001",display:"Family history of asthma"},{code:"12147341000119108",display:"History of burn"},{code:"428942009",display:"History of fall"},{code:"300890009",display:"Swelling absent"},{code:"162057007",display:"Nausea present"},{code:"401204006",display:"Suspected autism"}],this.displayedColumns=["type","targetCode","targetDisplay"],this.dataSource=[]}ngOnInit(){this.loadOrUpdateConstants()}loadOrUpdateConstants(){var t=this;return de(function*(){let n=localStorage.getItem("SituationConstants");n?(t.SituationConstants=JSON.parse(n),console.log("Loaded constants from cache.")):(yield t.updateConstantDescendants(),localStorage.setItem("SituationConstants",JSON.stringify(t.SituationConstants)),console.log("Updated constants and cached them."))})()}updateConstantDescendants(){var t=this;return de(function*(){for(const n in t.SituationConstants)if(Object.prototype.hasOwnProperty.call(t.SituationConstants,n)){const r=t.SituationConstants[n];let s=yield Ca(t.terminologyService.expandValueSet("<< "+r.code,"",0,1e3));r.selfAndDescendants=s.expansion.contains.map(o=>o.code)}})()}convertSituationToFhir(t){var n=this;return de(function*(){n.selectedSituation=t,n.fhirRepresentation=null,n.fhirRepresentationString="Loading...",n.dataSource=[],n.resourceType=void 0;let l,w,C,M,r=yield Ca(n.terminologyService.lookupConcept(t.code)),s=n.terminologyService.getNormalForm(r);if(n.terminologyService.parseNormmalForm(s).groups.forEach(P=>{const O=P.find(W=>"408732007"===W.type.code);O&&(n.dataSource=[...n.dataSource,O],w=O.target);const L=P.find(W=>"408729009"===W.type.code);L&&(n.dataSource=[...n.dataSource,L],l=L.target);const U=P.find(W=>"408731000"===W.type.code);U&&(n.dataSource=[...n.dataSource,U],C=U.target);const X=P.find(W=>"246090004"===W.type.code);X&&(n.dataSource=[...n.dataSource,X],M=X.target)}),M){const P=n.SituationConstants.KnownPresent.selfAndDescendants.includes(l?.code),O=n.SituationConstants.SubjectOfRecord.selfAndDescendants.includes(w?.code),L=n.SituationConstants.InThePast.selfAndDescendants.includes(C?.code),U=n.SituationConstants.KnownAbsent.selfAndDescendants.includes(l?.code),X=n.SituationConstants.KnownPossible.selfAndDescendants.includes(l?.code),W=n.SituationConstants.CurrentOrSpecifiedTime.selfAndDescendants.includes(C?.code),Z=n.SituationConstants.PersonInTheFamily.selfAndDescendants.includes(w?.code);P&&O&&L?n.updateFhirRepresentation(n.createFhirCondition(M,"inactive")):P&&O&&W?n.updateFhirRepresentation(n.createFhirCondition(M,"active")):X&&O&&W?n.updateFhirRepresentation(n.createFhirCondition(M,"unconfirmed")):P&&Z?n.updateFhirRepresentation(n.createFamilyMemberHistoryForFinding(M,w)):U&&O&&W?n.updateFhirRepresentation(n.createFhirObservationForAbsentFinding(M)):n.fhirRepresentationString="No FHIR representation for this situation"}else n.fhirRepresentationString="No FHIR representation for this situation"})()}updateFhirRepresentation(t){this.fhirRepresentation=t,this.fhirRepresentationString=JSON.stringify(t,null,2)}findingWithExplicitContextSelected(t){t&&t.code&&this.convertSituationToFhir(t)}createFhirCondition(t,n){return this.resourceType="Condition",{resourceType:"Condition",subject:{reference:"Patient/1234"},clinicalStatus:{coding:[{system:"http://terminology.hl7.org/CodeSystem/condition-clinical",code:n}]},code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]}}}createFhirObservationForAbsentFinding(t){return this.resourceType="Observation",{resourceType:"Observation",subject:{reference:"Patient/1234"},status:"registered",code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]},valueCodeableConcept:{coding:[{system:"http://snomed.info/sct",code:"410516002",display:"Known absent"}]}}}createFamilyMemberHistoryForFinding(t,n){return this.resourceType="FamilyMemberHistory",{resourceType:"FamilyMemberHistory",status:"completed",patient:{reference:"Patient/1234"},relationship:{coding:[{system:"http://snomed.info/sct",code:n.code,display:n.display}]},condition:[{code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]}}]}}saveOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(n,`${this.selectedSituation.display}-fhir.json`)}copyOutputToClipboard(t){this.clipboard.copy(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(zk))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-situation-map"]],decls:17,vars:9,consts:[[1,"p-8"],[1,"flex","flex-wrap","gap-4"],[1,"w-1/3"],[1,"w-auto",3,"selectionChange","binding"],[1,"mt-8"],[4,"ngFor","ngForOf"],["class","mt-8",4,"ngIf"],[1,"flex-grow"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["href","javascript:void(0);",3,"click"],["mat-table","",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","targetCode"],["matColumnDef","targetDisplay"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["target","_blank",1,"flex","flex-row","items-center","gap-2",3,"href"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"h2"),ut(2,"Consistent Context Representation for Situations with Explicit Context"),et(),tt(3,"div",1)(4,"div",2)(5,"app-autocomplete-binding",3),Vt("selectionChange",function(o){return r.findingWithExplicitContextSelected(o)}),et(),tt(6,"h3",4),ut(7,"Examples"),et(),tt(8,"ul"),Gt(9,JLt,3,1,"li",5),et(),Gt(10,oNt,15,4,"div",6)(11,lNt,8,2,"div",6),et(),tt(12,"div",7)(13,"div",8),Gt(14,cNt,5,0,"div",9),tt(15,"textarea",10),ut(16," "),et()()()()()),2&n&&(lt(5),yt("binding",r.situationsBinding),lt(4),yt("ngForOf",r.examples),lt(),yt("ngIf",null==r.selectedSituation?null:r.selectedSituation.display),lt(),yt("ngIf",r.resourceType),lt(3),yt("ngIf",r.fhirRepresentationString.length>15),lt(),yt("options",Ko(8,ZLt))("lang","json")("innerHTML",r.fhirRepresentationString,Pf))},dependencies:[gs,Ms,GC,Oo,da,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,av],styles:[".output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem;min-height:45rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}"]})}return e})(),uNt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-context-main"]],decls:1,vars:0,template:function(n,r){1&n&&we(0,"app-situation-map")},dependencies:[dNt]})}return e})();var hNt=ps(867),fNt=ps.n(hNt);let mNt=(()=>{class e{constructor(){this.filter=new(fNt())}transform(t){return t&&this.filter.clean(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"safeText",type:e,pure:!0})}return e})();function pNt(e,i){if(1&e){const t=ve();tt(0,"a",13),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().setLevel(r.name))}),ut(1),et()}if(2&e){const t=Ct().$implicit;lt(),Ye(" ",t.name," ")}}function gNt(e,i){if(1&e&&(tt(0,"span",14),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ze(t.name)}}function vNt(e,i){if(1&e&&(tt(0,"span"),Gt(1,pNt,2,1,"a",7)(2,gNt,2,1,"span",8),et()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",n.selectedLevel!=t.name),lt(),yt("ngIf",n.selectedLevel==t.name)}}function xNt(e,i){if(1&e){const t=ve();tt(0,"a",13),Vt("click",function(){return Ut(t),zt(Ct().setLevel("scoreboard"))}),ut(1," Legacy "),et()}}function yNt(e,i){1&e&&(tt(0,"span",14),ut(1,"Legacy"),et())}function bNt(e,i){1&e&&we(0,"mat-spinner",15)}function wNt(e,i){1&e&&(tt(0,"th",28),ut(1," Position "),et())}function _Nt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.index;lt(),Ye(" ",t+1," ")}}function TNt(e,i){1&e&&(tt(0,"th",28),ut(1," Message "),et())}function CNt(e,i){if(1&e&&(tt(0,"span"),ut(1),sa(2,"safeText"),et()),2&e){const t=Ct().$implicit;lt(),Ze(xc(2,1,t.message))}}function SNt(e,i){1&e&&(tt(0,"span",31)(1,"i"),ut(2,"No information available (qualifier value)"),et()())}function ENt(e,i){if(1&e&&(tt(0,"td",29),Gt(1,CNt,3,3,"span",11)(2,SNt,3,0,"span",30),et()),2&e){const t=i.$implicit;lt(),yt("ngIf",t.message),lt(),yt("ngIf",!t.message)}}function ANt(e,i){1&e&&(tt(0,"th",28),ut(1," Score "),et())}function DNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.score," ")}}function MNt(e,i){1&e&&(tt(0,"th",28),ut(1," Rounds "),et())}function INt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.numberOfRounds," ")}}function RNt(e,i){1&e&&(tt(0,"th",28),ut(1," Difficulty "),et())}function kNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.difficulty," ")}}function PNt(e,i){1&e&&(tt(0,"th",28),ut(1," Time Played "),et())}function FNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),sa(2,"elapsedTime"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",xc(2,1,t.elapsed)," ")}}function ONt(e,i){1&e&&(tt(0,"th",28),ut(1," Date "),et())}function LNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),sa(2,"date"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",Xd(2,1,t.date,"short")," ")}}function NNt(e,i){1&e&&we(0,"tr",32)}function BNt(e,i){1&e&&we(0,"tr",33)}function VNt(e,i){if(1&e&&(tt(0,"div")(1,"table",16),Wi(2,17),Gt(3,wNt,2,0,"th",18)(4,_Nt,2,1,"td",19),Xi(),Wi(5,20),Gt(6,TNt,2,0,"th",18)(7,ENt,3,2,"td",19),Xi(),Wi(8,21),Gt(9,ANt,2,0,"th",18)(10,DNt,2,1,"td",19),Xi(),Wi(11,22),Gt(12,MNt,2,0,"th",18)(13,INt,2,1,"td",19),Xi(),Wi(14,23),Gt(15,RNt,2,0,"th",18)(16,kNt,2,1,"td",19),Xi(),Wi(17,24),Gt(18,PNt,2,0,"th",18)(19,FNt,3,3,"td",19),Xi(),Wi(20,25),Gt(21,ONt,2,0,"th",18)(22,LNt,3,4,"td",19),Xi(),Gt(23,NNt,1,0,"tr",26)(24,BNt,1,0,"tr",27),et()()),2&e){const t=Ct();lt(),yt("dataSource",t.dataSource),lt(22),yt("matHeaderRowDef",t.displayedColumns),lt(),yt("matRowDefColumns",t.displayedColumns)}}let UNt=(()=>{class e{constructor(t,n,r,s){this.firebaseService=t,this.router=n,this.snoguessMainService=r,this.route=s,this.displayedColumns=["position","message","difficulty","score","numberOfRounds","secondsPlayed","date"],this.dataSource=[],this.loadingScores=!1,this.difficultyLevels=[],this.selectedLevel=""}ngOnInit(){this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.route.queryParams.subscribe(t=>{const n=t.level;this.selectedLevel=n&&this.difficultyLevels.some(s=>s.name===n)?n:this.difficultyLevels[0].name,this.loadScores(this.selectedLevel),t.refresh&&this.startAutoRefresh()})}ngOnDestroy(){this.stopAutoRefresh()}startAutoRefresh(){this.stopAutoRefresh(),this.intervalId=setInterval(()=>{this.loadScores(this.selectedLevel)},6e4)}stopAutoRefresh(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}setLevel(t){this.selectedLevel=t,this.loadScores(t)}loadScores(t){this.loadingScores=!0,this.firebaseService.getScores(t).then(n=>{this.dataSource=n.map(r=>({...r,date:r.date?r.date.toDate():new Date})),this.loadingScores=!1})}backToGame(){this.router.navigate(["/snoguess"])}static#t=this.\u0275fac=function(n){return new(n||e)(mt(pK),mt(Fo),mt(mK),mt(Tc))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-scoreboard"]],decls:19,vars:8,consts:[[1,"flex","flex-col","items-center","gap-4","pt-6","snoguess-game"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/scoreboard.png","alt","High Scores",1,"w-1/4","mt-8"],[1,"mb-2","flex","flex-row","items-center","gap-1"],[1,"diamond"],[1,"mb-3","flex","flex-row","items-center","gap-3"],[4,"ngFor","ngForOf"],["href","javascript:void(0)","class","text-blue-500 underline",3,"click",4,"ngIf"],["class","selected-level",4,"ngIf"],[1,"flex","flex-row","items-center","gap-3"],["diameter","50",4,"ngIf"],[4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],["href","javascript:void(0)",1,"text-blue-500","underline",3,"click"],[1,"selected-level"],["diameter","50"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","position"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","message"],["matColumnDef","score"],["matColumnDef","numberOfRounds"],["matColumnDef","difficulty"],["matColumnDef","secondsPlayed"],["matColumnDef","date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","text-gray-400",4,"ngIf"],[1,"text-gray-400"],["mat-header-row",""],["mat-row",""]],template:function(n,r){1&n&&(tt(0,"div",0),we(1,"img",1)(2,"img",2),tt(3,"div",3)(4,"span"),ut(5,"Messages posted by players!\xa0"),et(),tt(6,"mat-icon",4),ut(7,"emoji_events"),et()(),tt(8,"div",5),Gt(9,vNt,3,2,"span",6)(10,xNt,2,0,"a",7)(11,yNt,2,0,"span",8),et(),tt(12,"div",9)(13,"h3"),ut(14),et()(),Gt(15,bNt,1,0,"mat-spinner",10)(16,VNt,25,3,"div",11),tt(17,"div",12),Vt("click",function(){return r.backToGame()}),ut(18," Back to game "),et()()),2&n&&(lt(2),yt("@popIn",void 0),lt(7),yt("ngForOf",r.difficultyLevels),lt(),yt("ngIf","scoreboard"!=r.selectedLevel),lt(),yt("ngIf","scoreboard"==r.selectedLevel),lt(3),Ye("Top 20 ",r.selectedLevel," level scores"),lt(),yt("ngIf",r.loadingScores),lt(),yt("ngIf",!r.loadingScores),lt(),yt("@scrollUp",void 0))},dependencies:[gs,Ms,da,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,gh,gK,mNt],styles:[".diamond[_ngcontent-%COMP%]{color:#3b49c4}.snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}.selected-level[_ngcontent-%COMP%]{font-weight:700}"],data:{animation:[mr("shake",[ln("normal => shake",an(200,Kg([si({transform:"translateX(0)"}),si({transform:"translateX(-10px)"}),si({transform:"translateX(10px)"}),si({transform:"translateX(0)"})])))]),mr("popIn",[ln(":enter",[si({transform:"scale(0.8)",opacity:0}),an("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",si({transform:"scale(1.3)",opacity:1})),an("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",si({transform:"scale(1)",opacity:1}))])]),mr("scrollUp",[ln(":enter",[si({transform:"translateY(100%)",opacity:0}),an("0.5s ease-out",si({transform:"translateY(0)",opacity:1}))])]),mr("fadeInDelayed",[ln(":enter",[si({opacity:0}),an("1s 0.5s ease-out",si({opacity:1}))])])]}})}return e})();function qv(e){return e+.5|0}const Au=(e,i,t)=>Math.max(Math.min(e,t),i);function Bb(e){return Au(qv(2.55*e),0,255)}function nf(e){return Au(qv(255*e),0,255)}function Du(e){return Au(qv(e/2.55)/100,0,1)}function yK(e){return Au(qv(100*e),0,100)}const $l={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},XO=[..."0123456789ABCDEF"],zNt=e=>XO[15&e],GNt=e=>XO[(240&e)>>4]+XO[15&e],rE=e=>(240&e)>>4==(15&e);const YNt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function bK(e,i,t){const n=i*Math.min(t,1-t),r=(s,o=(s+e/30)%12)=>t-n*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function $Nt(e,i,t){const n=(r,s=(r+e/60)%6)=>t-t*i*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function QNt(e,i,t){const n=bK(e,1,.5);let r;for(i+t>1&&(r=1/(i+t),i*=r,t*=r),r=0;r<3;r++)n[r]*=1-i-t,n[r]+=i;return n}function jO(e){const t=e.r/255,n=e.g/255,r=e.b/255,s=Math.max(t,n,r),o=Math.min(t,n,r),l=(s+o)/2;let w,C,M;return s!==o&&(M=s-o,C=l>.5?M/(2-s-o):M/(s+o),w=function KNt(e,i,t,n,r){return e===r?(i-t)/n+(ie<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,t0=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function aE(e,i,t){if(e){let n=jO(e);n[i]=Math.max(0,Math.min(n[i]+n[i]*t,0===i?360:1)),n=$O(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function CK(e,i){return e&&Object.assign(i||{},e)}function SK(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=nf(e[3]))):(i=CK(e,{r:0,g:0,b:0,a:1})).a=nf(i.a),i}function l4t(e){return"r"===e.charAt(0)?function s4t(e){const i=r4t.exec(e);let n,r,s,t=255;if(i){if(i[7]!==n){const o=+i[7];t=i[8]?Bb(o):Au(255*o,0,255)}return n=+i[1],r=+i[3],s=+i[5],n=255&(i[2]?Bb(n):Au(n,0,255)),r=255&(i[4]?Bb(r):Au(r,0,255)),s=255&(i[6]?Bb(s):Au(s,0,255)),{r:n,g:r,b:s,a:t}}}(e):function qNt(e){const i=YNt.exec(e);let n,t=255;if(!i)return;i[5]!==n&&(t=i[6]?Bb(+i[5]):nf(+i[5]));const r=wK(+i[2]),s=+i[3]/100,o=+i[4]/100;return n="hwb"===i[1]?function ZNt(e,i,t){return YO(QNt,e,i,t)}(r,s,o):"hsv"===i[1]?function JNt(e,i,t){return YO($Nt,e,i,t)}(r,s,o):$O(r,s,o),{r:n[0],g:n[1],b:n[2],a:t}}(e)}class e0{constructor(i){if(i instanceof e0)return i;const t=typeof i;let n;"object"===t?n=SK(i):"string"===t&&(n=function WNt(e){var t,i=e.length;return"#"===e[0]&&(4===i||5===i?t={r:255&17*$l[e[1]],g:255&17*$l[e[2]],b:255&17*$l[e[3]],a:5===i?17*$l[e[4]]:255}:(7===i||9===i)&&(t={r:$l[e[1]]<<4|$l[e[2]],g:$l[e[3]]<<4|$l[e[4]],b:$l[e[5]]<<4|$l[e[6]],a:9===i?$l[e[7]]<<4|$l[e[8]]:255})),t}(i)||function n4t(e){sE||(sE=function i4t(){const e={},i=Object.keys(TK),t=Object.keys(_K);let n,r,s,o,l;for(n=0;n>16&255,s>>8&255,255&s]}return e}(),sE.transparent=[0,0,0,0]);const i=sE[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(i)||l4t(i)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var i=CK(this._rgb);return i&&(i.a=Du(i.a)),i}set rgb(i){this._rgb=SK(i)}rgbString(){return this._valid?function a4t(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Du(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}(this._rgb):void 0}hexString(){return this._valid?function jNt(e){var i=(e=>rE(e.r)&&rE(e.g)&&rE(e.b)&&rE(e.a))(e)?zNt:GNt;return e?"#"+i(e.r)+i(e.g)+i(e.b)+((e,i)=>e<255?i(e):"")(e.a,i):void 0}(this._rgb):void 0}hslString(){return this._valid?function e4t(e){if(!e)return;const i=jO(e),t=i[0],n=yK(i[1]),r=yK(i[2]);return e.a<255?`hsla(${t}, ${n}%, ${r}%, ${Du(e.a)})`:`hsl(${t}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(i,t){if(i){const n=this.rgb,r=i.rgb;let s;const o=t===s?.5:t,l=2*o-1,w=n.a-r.a,C=((l*w==-1?l:(l+w)/(1+l*w))+1)/2;s=1-C,n.r=255&C*n.r+s*r.r+.5,n.g=255&C*n.g+s*r.g+.5,n.b=255&C*n.b+s*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(i,t){return i&&(this._rgb=function o4t(e,i,t){const n=t0(Du(e.r)),r=t0(Du(e.g)),s=t0(Du(e.b));return{r:nf(QO(n+t*(t0(Du(i.r))-n))),g:nf(QO(r+t*(t0(Du(i.g))-r))),b:nf(QO(s+t*(t0(Du(i.b))-s))),a:e.a+t*(i.a-e.a)}}(this._rgb,i._rgb,t)),this}clone(){return new e0(this.rgb)}alpha(i){return this._rgb.a=nf(i),this}clearer(i){return this._rgb.a*=1-i,this}greyscale(){const i=this._rgb,t=qv(.3*i.r+.59*i.g+.11*i.b);return i.r=i.g=i.b=t,this}opaquer(i){return this._rgb.a*=1+i,this}negate(){const i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return aE(this._rgb,2,i),this}darken(i){return aE(this._rgb,2,-i),this}saturate(i){return aE(this._rgb,1,i),this}desaturate(i){return aE(this._rgb,1,-i),this}rotate(i){return function t4t(e,i){var t=jO(e);t[0]=wK(t[0]+i),t=$O(t),e.r=t[0],e.g=t[1],e.b=t[2]}(this._rgb,i),this}}function Mu(){}const c4t=(()=>{let e=0;return()=>e++})();function Zn(e){return null==e}function Qr(e){if(Array.isArray&&Array.isArray(e))return!0;const i=Object.prototype.toString.call(e);return"[object"===i.slice(0,7)&&"Array]"===i.slice(-6)}function Un(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function bs(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function Sl(e,i){return bs(e)?e:i}function mn(e,i){return typeof e>"u"?i:e}const EK=(e,i)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*i:+e;function Gr(e,i,t){if(e&&"function"==typeof e.call)return e.apply(t,i)}function _r(e,i,t,n){let r,s,o;if(Qr(e))if(s=e.length,n)for(r=s-1;r>=0;r--)i.call(t,e[r],r);else for(r=0;re,x:e=>e.x,y:e=>e.y};function rf(e,i){return(DK[i]||(DK[i]=function m4t(e){const i=function f4t(e){const i=e.split("."),t=[];let n="";for(const r of i)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}(e);return t=>{for(const n of i){if(""===n)break;t=t&&t[n]}return t}}(i)))(e)}function KO(e){return e.charAt(0).toUpperCase()+e.slice(1)}const zb=e=>typeof e<"u",sf=e=>"function"==typeof e,MK=(e,i)=>{if(e.size!==i.size)return!1;for(const t of e)if(!i.has(t))return!1;return!0},Kr=Math.PI,Zr=2*Kr,g4t=Zr+Kr,cE=Number.POSITIVE_INFINITY,v4t=Kr/180,Os=Kr/2,Fm=Kr/4,IK=2*Kr/3,af=Math.log10,vd=Math.sign;function Gb(e,i,t){return Math.abs(e-i)w&&C=Math.min(i,t)-n&&e<=Math.max(i,t)+n}function qO(e,i,t){t=t||(o=>e[o]1;)s=r+n>>1,t(s)?r=s:n=s;return{lo:r,hi:n}}const Ru=(e,i,t,n)=>qO(e,t,n?r=>{const s=e[r][i];return se[r][i]qO(e,t,n=>e[n][i]>=t),OK=["push","pop","shift","splice","unshift"];function LK(e,i){const t=e._chartjs;if(!t)return;const n=t.listeners,r=n.indexOf(i);-1!==r&&n.splice(r,1),!(n.length>0)&&(OK.forEach(s=>{delete e[s]}),delete e._chartjs)}function NK(e){const i=new Set(e);return i.size===e.length?e:Array.from(i)}const BK=typeof window>"u"?function(e){return e()}:window.requestAnimationFrame;function VK(e,i){let t=[],n=!1;return function(...r){t=r,n||(n=!0,BK.call(window,()=>{n=!1,e.apply(i,t)}))}}const tL=e=>"start"===e?"left":"end"===e?"right":"center",lo=(e,i,t)=>"start"===e?i:"end"===e?t:(i+t)/2;function UK(e,i,t){const n=i.length;let r=0,s=n;if(e._sorted){const{iScale:o,_parsed:l}=e,w=o.axis,{min:C,max:M,minDefined:P,maxDefined:O}=o.getUserBounds();P&&(r=Ma(Math.min(Ru(l,w,C).lo,t?n:Ru(i,w,o.getPixelForValue(C)).lo),0,n-1)),s=O?Ma(Math.max(Ru(l,o.axis,M,!0).hi+1,t?0:Ru(i,w,o.getPixelForValue(M),!0).hi+1),r,n)-r:n-r}return{start:r,count:s}}function zK(e){const{xScale:i,yScale:t,_scaleRanges:n}=e,r={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!n)return e._scaleRanges=r,!0;const s=n.xmin!==i.min||n.xmax!==i.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,r),s}const dE=e=>0===e||1===e,GK=(e,i,t)=>-Math.pow(2,10*(e-=1))*Math.sin((e-i)*Zr/t),HK=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*Zr/t)+1,Wb={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*Os),easeOutSine:e=>Math.sin(e*Os),easeInOutSine:e=>-.5*(Math.cos(Kr*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>dE(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>dE(e)?e:GK(e,.075,.3),easeOutElastic:e=>dE(e)?e:HK(e,.075,.3),easeInOutElastic:e=>dE(e)?e:e<.5?.5*GK(2*e,.1125,.45):.5+.5*HK(2*e-1,.1125,.45),easeInBack:e=>e*e*(2.70158*e-1.70158),easeOutBack:e=>(e-=1)*e*(2.70158*e+1.70158)+1,easeInOutBack(e){let i=1.70158;return(e/=.5)<1?e*e*((1+(i*=1.525))*e-i)*.5:.5*((e-=2)*e*((1+(i*=1.525))*e+i)+2)},easeInBounce:e=>1-Wb.easeOutBounce(1-e),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInOutBounce:e=>e<.5?.5*Wb.easeInBounce(2*e):.5*Wb.easeOutBounce(2*e-1)+.5};function eL(e){if(e&&"object"==typeof e){const i=e.toString();return"[object CanvasPattern]"===i||"[object CanvasGradient]"===i}return!1}function WK(e){return eL(e)?e:new e0(e)}function iL(e){return eL(e)?e:new e0(e).saturate(.5).darken(.1).hexString()}const A4t=["x","y","borderWidth","radius","tension"],D4t=["color","borderColor","backgroundColor"],XK=new Map;function Xb(e,i,t){return function R4t(e,i){i=i||{};const t=e+JSON.stringify(i);let n=XK.get(t);return n||(n=new Intl.NumberFormat(e,i),XK.set(t,n)),n}(i,t).format(e)}const jK={values:e=>Qr(e)?e:""+e,numeric(e,i,t){if(0===e)return"0";const n=this.chart.options.locale;let r,s=e;if(t.length>1){const C=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(C<1e-4||C>1e15)&&(r="scientific"),s=function k4t(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}(e,t)}const o=af(Math.abs(s)),l=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),w={notation:r,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(w,this.options.ticks.format),Xb(e,n,w)},logarithmic(e,i,t){if(0===e)return"0";const n=t[i].significand||e/Math.pow(10,Math.floor(af(e)));return[1,2,3,5,10,15].includes(n)||i>.8*t.length?jK.numeric.call(this,e,i,t):""}};var uE={formatters:jK};const Om=Object.create(null),nL=Object.create(null);function jb(e,i){if(!i)return e;const t=i.split(".");for(let n=0,r=t.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>iL(r.backgroundColor),this.hoverBorderColor=(n,r)=>iL(r.borderColor),this.hoverColor=(n,r)=>iL(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return rL(this,i,t)}get(i){return jb(this,i)}describe(i,t){return rL(nL,i,t)}override(i,t){return rL(Om,i,t)}route(i,t,n,r){const s=jb(this,i),o=jb(this,n),l="_"+t;Object.defineProperties(s,{[l]:{value:s[t],writable:!0},[t]:{enumerable:!0,get(){const w=this[l],C=o[r];return Un(w)?Object.assign({},C,w):mn(w,C)},set(w){this[l]=w}}})}apply(i){i.forEach(t=>t(this))}}var as=new F4t({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function M4t(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>"onProgress"!==i&&"onComplete"!==i&&"fn"!==i}),e.set("animations",{colors:{type:"color",properties:D4t},numbers:{type:"number",properties:A4t}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>0|i}}}})},function I4t(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function P4t(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:uE.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&"callback"!==i&&"parser"!==i,_indexable:i=>"borderDash"!==i&&"tickBorderDash"!==i&&"dash"!==i}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>"backdropPadding"!==i&&"callback"!==i,_indexable:i=>"backdropPadding"!==i})}]);function hE(e,i,t,n,r){let s=i[r];return s||(s=i[r]=e.measureText(r).width,t.push(r)),s>n&&(n=s),n}function L4t(e,i,t,n){let r=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==i&&(r=n.data={},s=n.garbageCollect=[],n.font=i),e.save(),e.font=i;let o=0;const l=t.length;let w,C,M,P,O;for(w=0;wt.length){for(w=0;w0&&e.stroke()}}function ku(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.xi.top-t&&e.y0&&""!==s.strokeColor;let w,C;for(e.save(),e.font=r.string,function V4t(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),Zn(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline)}(e,s),w=0;w+e||0;function aL(e,i){const t={},n=Un(i),r=n?Object.keys(i):i,s=Un(e)?n?o=>mn(e[o],e[i[o]]):o=>e[o]:()=>e;for(const o of r)t[o]=X4t(s(o));return t}function QK(e){return aL(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Bm(e){return aL(e,["topLeft","topRight","bottomLeft","bottomRight"])}function co(e){const i=QK(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function ma(e,i){let t=mn((e=e||{}).size,(i=i||as.font).size);"string"==typeof t&&(t=parseInt(t,10));let n=mn(e.style,i.style);n&&!(""+n).match(H4t)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const r={family:mn(e.family,i.family),lineHeight:W4t(mn(e.lineHeight,i.lineHeight),t),size:t,style:n,weight:mn(e.weight,i.weight),string:""};return r.string=function O4t(e){return!e||Zn(e.size)||Zn(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r}function $b(e,i,t,n){let s,o,l,r=!0;for(s=0,o=e.length;se[0])){const s=t||e;typeof n>"u"&&(n=tZ("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:n,_getTarget:r,override:l=>oL([l,...e],i,s,n)};return new Proxy(o,{deleteProperty:(l,w)=>(delete l[w],delete l._keys,delete e[0][w],!0),get:(l,w)=>ZK(l,w,()=>function t3t(e,i,t,n){let r;for(const s of i)if(r=tZ(Y4t(s,e),t),typeof r<"u")return lL(e,r)?cL(t,n,e,r):r}(w,i,e,l)),getOwnPropertyDescriptor:(l,w)=>Reflect.getOwnPropertyDescriptor(l._scopes[0],w),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(l,w)=>eZ(l).includes(w),ownKeys:l=>eZ(l),set(l,w,C){const M=l._storage||(l._storage=r());return l[w]=M[w]=C,delete l._keys,!0}})}function r0(e,i,t,n){const r={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:KK(e,n),setContext:s=>r0(e,s,t,n),override:s=>r0(e.override(s),i,t,n)};return new Proxy(r,{deleteProperty:(s,o)=>(delete s[o],delete e[o],!0),get:(s,o,l)=>ZK(s,o,()=>function $4t(e,i,t){const{_proxy:n,_context:r,_subProxy:s,_descriptors:o}=e;let l=n[i];return sf(l)&&o.isScriptable(i)&&(l=function Q4t(e,i,t,n){const{_proxy:r,_context:s,_subProxy:o,_stack:l}=t;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let w=i(s,o||n);return l.delete(e),lL(e,w)&&(w=cL(r._scopes,r,e,w)),w}(i,l,e,t)),Qr(l)&&l.length&&(l=function K4t(e,i,t,n){const{_proxy:r,_context:s,_subProxy:o,_descriptors:l}=t;if(typeof s.index<"u"&&n(e))return i[s.index%i.length];if(Un(i[0])){const w=i,C=r._scopes.filter(M=>M!==w);i=[];for(const M of w){const P=cL(C,r,e,M);i.push(r0(P,s,o&&o[e],l))}}return i}(i,l,e,o.isIndexable)),lL(i,l)&&(l=r0(l,r,s&&s[i],o)),l}(s,o,l)),getOwnPropertyDescriptor:(s,o)=>s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(s,o)=>Reflect.has(e,o),ownKeys:()=>Reflect.ownKeys(e),set:(s,o,l)=>(e[o]=l,delete s[o],!0)})}function KK(e,i={scriptable:!0,indexable:!0}){const{_scriptable:t=i.scriptable,_indexable:n=i.indexable,_allKeys:r=i.allKeys}=e;return{allKeys:r,scriptable:t,indexable:n,isScriptable:sf(t)?t:()=>t,isIndexable:sf(n)?n:()=>n}}const Y4t=(e,i)=>e?e+KO(i):i,lL=(e,i)=>Un(i)&&"adapters"!==e&&(null===Object.getPrototypeOf(i)||i.constructor===Object);function ZK(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||"constructor"===i)return e[i];const n=t();return e[i]=n,n}function JK(e,i,t){return sf(e)?e(i,t):e}const Z4t=(e,i)=>!0===e?i:"string"==typeof e?rf(i,e):void 0;function J4t(e,i,t,n,r){for(const s of i){const o=Z4t(t,s);if(o){e.add(o);const l=JK(o._fallback,t,r);if(typeof l<"u"&&l!==t&&l!==n)return l}else if(!1===o&&typeof n<"u"&&t!==n)return null}return!1}function cL(e,i,t,n){const r=i._rootScopes,s=JK(i._fallback,t,n),o=[...e,...r],l=new Set;l.add(n);let w=qK(l,o,t,s||t,n);return!(null===w||typeof s<"u"&&s!==t&&(w=qK(l,o,s,w,n),null===w))&&oL(Array.from(l),[""],r,s,()=>function q4t(e,i,t){const n=e._getTarget();i in n||(n[i]={});const r=n[i];return Qr(r)&&Un(t)?t:r||{}}(i,t,n))}function qK(e,i,t,n,r){for(;t;)t=J4t(e,i,t,n,r);return t}function tZ(e,i){for(const t of i){if(!t)continue;const n=t[e];if(typeof n<"u")return n}}function eZ(e){let i=e._keys;return i||(i=e._keys=function e3t(e){const i=new Set;for(const t of e)for(const n of Object.keys(t).filter(r=>!r.startsWith("_")))i.add(n);return Array.from(i)}(e._scopes)),i}function iZ(e,i,t,n){const{iScale:r}=e,{key:s="r"}=this._parsing,o=new Array(n);let l,w,C,M;for(l=0,w=n;li"x"===e?"y":"x";function n3t(e,i,t,n){const r=e.skip?i:e,s=i,o=t.skip?i:t,l=JO(s,r),w=JO(o,s);let C=l/(l+w),M=w/(l+w);C=isNaN(C)?0:C,M=isNaN(M)?0:M;const P=n*C,O=n*M;return{previous:{x:s.x-P*(o.x-r.x),y:s.y-P*(o.y-r.y)},next:{x:s.x+O*(o.x-r.x),y:s.y+O*(o.y-r.y)}}}function pE(e,i,t){return Math.max(Math.min(e,t),i)}function l3t(e,i,t,n,r){let s,o,l,w;if(i.spanGaps&&(e=e.filter(C=>!C.skip)),"monotone"===i.cubicInterpolationMode)!function a3t(e,i="x"){const t=nZ(i),n=e.length,r=Array(n).fill(0),s=Array(n);let o,l,w,C=s0(e,0);for(o=0;oe.ownerDocument.defaultView.getComputedStyle(e,null),d3t=["top","right","bottom","left"];function Vm(e,i,t){const n={};t=t?"-"+t:"";for(let r=0;r<4;r++){const s=d3t[r];n[s]=parseFloat(e[i+"-"+s+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const u3t=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function Um(e,i){if("native"in e)return e;const{canvas:t,currentDevicePixelRatio:n}=i,r=vE(t),s="border-box"===r.boxSizing,o=Vm(r,"padding"),l=Vm(r,"border","width"),{x:w,y:C,box:M}=function h3t(e,i){const t=e.touches,n=t&&t.length?t[0]:e,{offsetX:r,offsetY:s}=n;let l,w,o=!1;if(u3t(r,s,e.target))l=r,w=s;else{const C=i.getBoundingClientRect();l=n.clientX-C.left,w=n.clientY-C.top,o=!0}return{x:l,y:w,box:o}}(e,t),P=o.left+(M&&l.left),O=o.top+(M&&l.top);let{width:L,height:U}=i;return s&&(L-=o.width+l.width,U-=o.height+l.height),{x:Math.round((w-P)/L*t.width/n),y:Math.round((C-O)/U*t.height/n)}}const xE=e=>Math.round(10*e)/10;function rZ(e,i,t){const n=i||1,r=Math.floor(e.height*n),s=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==n||o.height!==r||o.width!==s)&&(e.currentDevicePixelRatio=n,o.height=r,o.width=s,e.ctx.setTransform(n,0,0,n,0,0),!0)}const p3t=function(){let e=!1;try{const i={get passive(){return e=!0,!1}};dL()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return e}();function sZ(e,i){const t=function c3t(e,i){return vE(e).getPropertyValue(i)}(e,i),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function zm(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function g3t(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:"middle"===n?t<.5?e.y:i.y:"after"===n?t<1?e.y:i.y:t>0?i.y:e.y}}function v3t(e,i,t,n){const r={x:e.cp2x,y:e.cp2y},s={x:i.cp1x,y:i.cp1y},o=zm(e,r,t),l=zm(r,s,t),w=zm(s,i,t),C=zm(o,l,t),M=zm(l,w,t);return zm(C,M,t)}function a0(e,i,t){return e?function(e,i){return{x:t=>e+e+i-t,setWidth(t){i=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,n)=>t-n,leftForLtr:(t,n)=>t-n}}(i,t):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,i)=>e+i,leftForLtr:(e,i)=>e}}function aZ(e,i){let t,n;("ltr"===i||"rtl"===i)&&(t=e.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=n)}function oZ(e,i){void 0!==i&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]))}function lZ(e){return"angle"===e?{between:Hb,compare:b4t,normalize:El}:{between:Iu,compare:(i,t)=>i-t,normalize:i=>i}}function cZ({start:e,end:i,count:t,loop:n,style:r}){return{start:e%t,end:i%t,loop:n&&(i-e+1)%t==0,style:r}}function dZ(e,i,t){if(!t)return[e];const{property:n,start:r,end:s}=t,o=i.length,{compare:l,between:w,normalize:C}=lZ(n),{start:M,end:P,loop:O,style:L}=function b3t(e,i,t){const{property:n,start:r,end:s}=t,{between:o,normalize:l}=lZ(n),w=i.length;let O,L,{start:C,end:M,loop:P}=e;if(P){for(C+=w,M+=w,O=0,L=w;Ol({chart:i,initial:t.initial,numSteps:o,currentStep:Math.min(n-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=BK.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;const s=n.items;let w,o=s.length-1,l=!1;for(;o>=0;--o)w=s[o],w._active?(w._total>n.duration&&(n.duration=w._total),w.tick(i),l=!0):(s[o]=s[s.length-1],s.pop());l&&(r.draw(),this._notify(r,n,i,"progress")),s.length||(n.running=!1,this._notify(r,n,i,"complete"),n.initial=!1),t+=s.length}),this._lastDate=i,0===t&&(this._running=!1)}_getAnims(i){const t=this._charts;let n=t.get(i);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,n)),n}listen(i,t,n){this._getAnims(i).listeners[t].push(n)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){const t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(i){if(!this._running)return!1;const t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){const t=this._charts.get(i);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}}var Pu=new E3t;const mZ="transparent",A3t={boolean:(e,i,t)=>t>.5?i:e,color(e,i,t){const n=WK(e||mZ),r=n.valid&&WK(i||mZ);return r&&r.valid?r.mix(n,t).hexString():i},number:(e,i,t)=>e+(i-e)*t};class D3t{constructor(i,t,n,r){const s=t[n];r=$b([i.to,r,s,i.from]);const o=$b([i.from,s,r]);this._active=!0,this._fn=i.fn||A3t[i.type||typeof o],this._easing=Wb[i.easing]||Wb.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(i,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,i.duration)),this._total+=s,this._loop=!!i.loop,this._to=$b([i.to,t,r,i.from]),this._from=$b([i.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){const t=i-this._start,n=this._duration,r=this._prop,s=this._from,o=this._loop,l=this._to;let w;if(this._active=s!==l&&(o||t1?2-w:w,w=this._easing(Math.min(1,Math.max(0,w))),this._target[r]=this._fn(s,l,w))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,n)=>{i.push({res:t,rej:n})})}_notify(i){const t=i?"res":"rej",n=this._promises||[];for(let r=0;r{const s=i[r];if(!Un(s))return;const o={};for(const l of t)o[l]=s[l];(Qr(s.properties)&&s.properties||[r]).forEach(l=>{(l===r||!n.has(l))&&n.set(l,o)})})}_animateOptions(i,t){const n=t.options,r=function I3t(e,i){if(!i)return;let t=e.options;if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}(i,n);if(!r)return[];const s=this._createAnimations(r,n);return n.$shared&&function M3t(e,i){const t=[],n=Object.keys(i);for(let r=0;r{i.options=n},()=>{}),s}_createAnimations(i,t){const n=this._properties,r=[],s=i.$animations||(i.$animations={}),o=Object.keys(t),l=Date.now();let w;for(w=o.length-1;w>=0;--w){const C=o[w];if("$"===C.charAt(0))continue;if("options"===C){r.push(...this._animateOptions(i,t));continue}const M=t[C];let P=s[C];const O=n.get(C);if(P){if(O&&P.active()){P.update(O,M,l);continue}P.cancel()}O&&O.duration?(s[C]=P=new D3t(O,i,C,M),r.push(P)):i[C]=M}return r}update(i,t){if(0===this._properties.size)return void Object.assign(i,t);const n=this._createAnimations(i,t);return n.length?(Pu.add(this._chart,n),!0):void 0}}function gZ(e,i){const t=e&&e.options||{},n=t.reverse,r=void 0===t.min?i:0,s=void 0===t.max?i:0;return{start:n?s:r,end:n?r:s}}function vZ(e,i){const t=[],n=e._getSortedDatasetMetas(i);let r,s;for(r=0,s=n.length;r0||!t&&s<0)return r.index}return null}function bZ(e,i){const{chart:t,_cachedMeta:n}=e,r=t._stacks||(t._stacks={}),{iScale:s,vScale:o,index:l}=n,w=s.axis,C=o.axis,M=function F3t(e,i,t){return`${e.id}.${i.id}.${t.stack||t.type}`}(s,o,n),P=i.length;let O;for(let L=0;Lt[n].axis===i).shift()}function Qb(e,i){const t=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){i=i||e._parsed;for(const r of i){const s=r._stacks;if(!s||void 0===s[n]||void 0===s[n][t])return;delete s[n][t],void 0!==s[n]._visualValues&&void 0!==s[n]._visualValues[t]&&delete s[n]._visualValues[t]}}}const mL=e=>"reset"===e||"none"===e,wZ=(e,i)=>i?e:Object.assign({},e);let cf=(()=>class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=hL(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Qb(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(O,L,U,X)=>"x"===O?L:"r"===O?X:U,o=n.xAxisID=mn(r.xAxisID,fL(t,"x")),l=n.yAxisID=mn(r.yAxisID,fL(t,"y")),w=n.rAxisID=mn(r.rAxisID,fL(t,"r")),C=n.indexAxis,M=n.iAxisID=s(C,o,l,w),P=n.vAxisID=s(C,l,o,w);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(w),n.iScale=this.getScaleForId(M),n.vScale=this.getScaleForId(P)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&LK(this._data,this),t._stacked&&Qb(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Un(n))this._data=function P3t(e,i){const{iScale:t,vScale:n}=i,r="x"===t.axis?"x":"y",s="x"===n.axis?"x":"y",o=Object.keys(e),l=new Array(o.length);let w,C,M;for(w=0,C=o.length;w{const n="_onData"+KO(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return e._chartjs.listeners.forEach(l=>{"function"==typeof l[n]&&l[n](...s)}),o}})}))}(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=hL(n.vScale,n),n.stack!==r.stack&&(s=!0,Qb(n),n.stack=r.stack),this._resyncElements(t),(s||o!==n._stacked)&&(bZ(this,n._parsed),n._stacked=hL(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:s}=this,{iScale:o,_stacked:l}=r,w=o.axis;let P,O,L,C=0===t&&n===s.length||r._sorted,M=t>0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=s,r._sorted=!0,L=s;else{L=Qr(s[t])?this.parseArrayData(r,s,t,n):Un(s[t])?this.parseObjectData(r,s,t,n):this.parsePrimitiveData(r,s,t,n);const U=()=>null===O[w]||M&&O[w]e&&!i.hidden&&i._stacked&&{keys:vZ(this.chart,!0),values:null})(n,r),M={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:P,max:O}=function O3t(e){const{min:i,max:t,minDefined:n,maxDefined:r}=e.getUserBounds();return{min:n?i:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}(w);let L,U;function X(){U=s[L];const W=U[w.axis];return!bs(U[t.axis])||P>W||O=0;--L)if(!X()){this.updateRangeFromParsed(M,t,U,C);break}return M}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let s,o,l;for(s=0,o=n.length;s=0&&tthis.getContext(r,s,n),O);return W.$shared&&(W.$shared=C,o[l]=Object.freeze(wZ(W,C))),W}_resolveAnimations(t,n,r){const s=this.chart,o=this._cachedDataOpts,l=`animation-${n}`,w=o[l];if(w)return w;let C;if(!1!==s.options.animation){const P=this.chart.config,O=P.datasetAnimationScopeKeys(this._type,n),L=P.getOptionScopes(this.getDataset(),O);C=P.createResolver(L,this.getContext(t,r,n))}const M=new pZ(s,C&&C.animations);return C&&C._cacheable&&(o[l]=Object.freeze(M)),M}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||mL(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),s=this._sharedOptions,o=this.getSharedOptions(r),l=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:l}}updateElement(t,n,r,s){mL(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!mL(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,s){t.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[w,C,M]of this._syncList)this[w](C,M);this._syncList=[];const s=r.length,o=n.length,l=Math.min(o,s);l&&this.parse(0,l),o>s?this._insertElements(s,o-s,t):o{for(M.length+=n,w=M.length-1;w>=l;w--)M[w]=M[w-n]};for(C(o),w=t;wr-s))}return e._cache.$bar}(i,e.type);let r,s,o,l,n=i._length;const w=()=>{32767===o||-32768===o||(zb(l)&&(n=Math.min(n,Math.abs(o-l)||n)),l=o)};for(r=0,s=t.length;rMath.abs(l)&&(w=l,C=o),i[t.axis]=C,i._custom={barStart:w,barEnd:C,start:r,end:s,min:o,max:l}}(e,i,t,n):i[t.axis]=t.parse(e,n),i}function TZ(e,i,t,n){const r=e.iScale,s=e.vScale,o=r.getLabels(),l=r===s,w=[];let C,M,P,O;for(C=t,M=t+n;Ce.x,t="left",n="right"):(i=e.baseclass e extends cf{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,s){return TZ(t,n,r,s)}parseArrayData(t,n,r,s){return TZ(t,n,r,s)}parseObjectData(t,n,r,s){const{iScale:o,vScale:l}=t,{xAxisKey:w="x",yAxisKey:C="y"}=this._parsing,M="x"===o.axis?w:C,P="x"===l.axis?w:C,O=[];let L,U,X,W;for(L=r,U=r+s;LP.controller.options.grouped),o=r.options.stacked,l=[],w=this._cachedMeta.controller.getParsed(n),C=w&&w[r.axis],M=P=>{const O=P._parsed.find(U=>U[r.axis]===C),L=O&&O[P.vScale.axis];if(Zn(L)||isNaN(L))return!0};for(const P of s)if((void 0===n||!M(P))&&((!1===o||-1===l.indexOf(P.stack)||void 0===o&&void 0===P.stack)&&l.push(P.stack),P.index===t))break;return l.length||l.push(void 0),l}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const s=this._getStacks(t,r),o=void 0!==n?s.indexOf(n):-1;return-1===o?s.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,s=[];let o,l;for(o=0,l=n.data.length;o=t?1:-1)}(W,n,w)*l,O===w&&(rt-=W/2);const st=n.getPixelForDecimal(0),vt=n.getPixelForDecimal(1),_t=Math.min(st,vt),Mt=Math.max(st,vt);rt=Math.max(Math.min(rt,Mt),_t),X=rt+W,r&&!P&&(C._stacks[n.axis]._visualValues[s]=n.getValueForPixel(X)-n.getValueForPixel(rt))}if(rt===n.getPixelForValue(w)){const st=vd(W)*n.getLineWidthForValue(w)/2;rt+=st,W-=st}return{size:W,base:rt,head:X,center:X+W/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,o=s.skipNull,l=mn(s.maxBarThickness,1/0);let w,C;if(n.grouped){const M=o?this._getStackCount(t):n.stackCount,P="flex"===s.barThickness?function H3t(e,i,t,n){const r=i.pixels,s=r[e];let o=e>0?r[e-1]:null,l=eclass e extends cf{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,s){const o=super.parsePrimitiveData(t,n,r,s);for(let l=0;l=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,l=this.getParsed(t),w=s.getLabelForValue(l.x),C=o.getLabelForValue(l.y),M=l._custom;return{label:r[t]||"",value:"("+w+", "+C+(M?", "+M:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w}=this._cachedMeta,{sharedOptions:C,includeOptions:M}=this._getSharedOptions(n,s),P=l.axis,O=w.axis;for(let L=n;Lclass e extends cf{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=t.legend.options;return n.labels.map((o,l)=>{const C=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:C.backgroundColor,strokeStyle:C.borderColor,fontColor:s,lineWidth:C.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=r;else{let l,w,o=C=>+r[C];if(Un(r[t])){const{key:C="value"}=this._parsing;o=M=>+rf(r[M],C)}for(l=t,w=t+n;l"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/i)(this.options.cutout,w),1),M=this._getRingWeight(this.index),{circumference:P,rotation:O}=this._getRotationExtents(),{ratioX:L,ratioY:U,offsetX:X,offsetY:W}=function J3t(e,i,t){let n=1,r=1,s=0,o=0;if(iHb(st,l,w,!0)?1:Math.max(vt,vt*t,_t,_t*t),U=(st,vt,_t)=>Hb(st,l,w,!0)?-1:Math.min(vt,vt*t,_t,_t*t),X=L(0,C,P),W=L(Os,M,O),Z=U(Kr,C,P),rt=U(Kr+Os,M,O);n=(X-Z)/2,r=(W-rt)/2,s=-(X+Z)/2,o=-(W+rt)/2}return{ratioX:n,ratioY:r,offsetX:s,offsetY:o}}(O,P,C),st=Math.max(Math.min((r.width-l)/L,(r.height-l)/U)/2,0),vt=EK(this.options.radius,st),Mt=(vt-Math.max(vt*C,0))/this._getVisibleDatasetWeightTotal();this.offsetX=X*vt,this.offsetY=W*vt,s.total=this.calculateTotal(),this.outerRadius=vt-Mt*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-Mt*M,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,s=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/Zr)}updateElements(t,n,r,s){const o="reset"===s,l=this.chart,w=l.chartArea,P=(w.left+w.right)/2,O=(w.top+w.bottom)/2,L=o&&l.options.animation.animateScale,U=L?0:this.innerRadius,X=L?0:this.outerRadius,{sharedOptions:W,includeOptions:Z}=this._getSharedOptions(n,s);let st,rt=this._getRotation();for(st=0;st0&&!isNaN(t)?Zr*(Math.abs(t)/n):0}getLabelAndValue(t){const r=this.chart,s=r.data.labels||[],o=Xb(this._cachedMeta._parsed[t],r.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let s,o,l,w,C;if(!t)for(s=0,o=r.data.datasets.length;sclass e extends cf{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:s=[],_dataset:o}=n,l=this.chart._animationsDisabled;let{start:w,count:C}=UK(n,s,l);this._drawStart=w,this._drawCount=C,zK(n)&&(w=0,C=s.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=s;const M=this.resolveDatasetElementOptions(t);this.options.showLine||(M.borderWidth=0),M.segment=this.options.segment,this.updateElement(r,void 0,{animated:!l,options:M},t),this.updateElements(s,w,C,t)}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w,_stacked:C,_dataset:M}=this._cachedMeta,{sharedOptions:P,includeOptions:O}=this._getSharedOptions(n,s),L=l.axis,U=w.axis,{spanGaps:X,segment:W}=this.options,Z=n0(X)?X:Number.POSITIVE_INFINITY,rt=this.chart._animationsDisabled||o||"none"===s,st=n+r,vt=t.length;let _t=n>0&&this.getParsed(n-1);for(let Mt=0;Mt=st){dt.skip=!0;continue}const pt=this.getParsed(Mt),bt=Zn(pt[U]),Tt=dt[L]=l.getPixelForValue(pt[L],Mt),Et=dt[U]=o||bt?w.getBasePixel():w.getPixelForValue(C?this.applyStack(w,pt,C):pt[U],Mt);dt.skip=isNaN(Tt)||isNaN(Et)||bt,dt.stop=Mt>0&&Math.abs(pt[L]-_t[L])>Z,W&&(dt.parsed=pt,dt.raw=M.data[Mt]),O&&(dt.options=P||this.resolveDataElementOptions(Mt,ft.active?"active":s)),rt||this.updateElement(ft,Mt,dt,s),_t=pt}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return r;const o=s[0].size(this.resolveDataElementOptions(0)),l=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(r,o,l)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}})(),EZ=(()=>class e extends cf{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=t.legend.options;return n.labels.map((o,l)=>{const C=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:C.backgroundColor,strokeStyle:C.borderColor,fontColor:s,lineWidth:C.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const r=this.chart,s=r.data.labels||[],o=Xb(this._cachedMeta._parsed[t].r,r.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,n,r,s){return iZ.bind(this)(t,n,r,s)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((r,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(s/2,0),w=(o-Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-w*this.index,this.innerRadius=this.outerRadius-w}updateElements(t,n,r,s){const o="reset"===s,l=this.chart,C=l.options.animation,M=this._cachedMeta.rScale,P=M.xCenter,O=M.yCenter,L=M.getIndexAngle(0)-.5*Kr;let X,U=L;const W=360/this.countVisibleElements();for(X=0;X{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Ac(this.resolveDataElementOptions(t,n).angle||r):0}})();var tBt=Object.freeze({__proto__:null,BarController:K3t,BubbleController:Z3t,DoughnutController:gL,LineController:q3t,PieController:(()=>class e extends gL{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}})(),PolarAreaController:EZ,RadarController:(()=>class e extends cf{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,s){return iZ.bind(this)(t,n,r,s)}update(t){const n=this._cachedMeta,r=n.dataset,s=n.data||[],o=n.iScale.getLabels();if(r.points=s,"resize"!==t){const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),this.updateElement(r,void 0,{_loop:!0,_fullLoop:o.length===s.length,options:l},t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,r,s){const o=this._cachedMeta.rScale,l="reset"===s;for(let w=n;wclass e extends cf{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,l=this.getParsed(t),w=s.getLabelForValue(l.x),C=o.getLabelForValue(l.y);return{label:r[t]||"",value:"("+w+", "+C+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=UK(n,r,s);if(this._drawStart=o,this._drawCount=l,zK(n)&&(o=0,l=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:w,_dataset:C}=n;w._chart=this.chart,w._datasetIndex=this.index,w._decimated=!!C._decimated,w.points=r;const M=this.resolveDatasetElementOptions(t);M.segment=this.options.segment,this.updateElement(w,void 0,{animated:!s,options:M},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,o,l,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w,_stacked:C,_dataset:M}=this._cachedMeta,P=this.resolveDataElementOptions(n,s),O=this.getSharedOptions(P),L=this.includeOptions(s,O),U=l.axis,X=w.axis,{spanGaps:W,segment:Z}=this.options,rt=n0(W)?W:Number.POSITIVE_INFINITY,st=this.chart._animationsDisabled||o||"none"===s;let vt=n>0&&this.getParsed(n-1);for(let _t=n;_t0&&Math.abs(ft[U]-vt[U])>rt,Z&&(dt.parsed=ft,dt.raw=M.data[_t]),L&&(dt.options=O||this.resolveDataElementOptions(_t,Mt.active?"active":s)),st||this.updateElement(Mt,_t,dt,s),vt=ft}this.updateSharedOptions(O,s,P)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let w=0;for(let C=n.length-1;C>=0;--C)w=Math.max(w,n[C].size(this.resolveDataElementOptions(C))/2);return w>0&&w}const r=t.dataset,s=r.options&&r.options.borderWidth||0;if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,l)/2}})()});function Gm(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class vL{static override(i){Object.assign(vL.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return Gm()}parse(){return Gm()}format(){return Gm()}add(){return Gm()}diff(){return Gm()}startOf(){return Gm()}endOf(){return Gm()}}var eBt__date=vL;function iBt(e,i,t,n){const{controller:r,data:s,_sorted:o}=e,l=r._cachedMeta.iScale;if(l&&i===l.axis&&"r"!==i&&o&&s.length){const w=l._reversePixels?_4t:Ru;if(!n)return w(s,i,t);if(r._sharedOptions){const C=s[0],M="function"==typeof C.getRange&&C.getRange(i);if(M){const P=w(s,i,t-M),O=w(s,i,t+M);return{lo:P.lo,hi:O.hi}}}}return{lo:0,hi:s.length-1}}function Kb(e,i,t,n,r){const s=e.getSortedVisibleDatasetMetas(),o=t[i];for(let l=0,w=s.length;l{w[o]&&w[o](i[t],r)&&(s.push({element:w,datasetIndex:C,index:M}),l=l||w.inRange(i.x,i.y,r))}),n&&!l?[]:s}var aBt={evaluateInteractionItems:Kb,modes:{index(e,i,t,n){const r=Um(i,e),s=t.axis||"x",o=t.includeInvisible||!1,l=t.intersect?xL(e,r,s,n,o):yL(e,r,s,!1,n,o),w=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(C=>{const M=l[0].index,P=C.data[M];P&&!P.skip&&w.push({element:P,datasetIndex:C.index,index:M})}),w):[]},dataset(e,i,t,n){const r=Um(i,e),s=t.axis||"xy",o=t.includeInvisible||!1;let l=t.intersect?xL(e,r,s,n,o):yL(e,r,s,!1,n,o);if(l.length>0){const w=l[0].datasetIndex,C=e.getDatasetMeta(w).data;l=[];for(let M=0;MxL(e,Um(i,e),t.axis||"xy",n,t.includeInvisible||!1),nearest:(e,i,t,n)=>yL(e,Um(i,e),t.axis||"xy",t.intersect,n,t.includeInvisible||!1),x:(e,i,t,n)=>AZ(e,Um(i,e),"x",t.intersect,n),y:(e,i,t,n)=>AZ(e,Um(i,e),"y",t.intersect,n)}};const DZ=["left","top","right","bottom"];function Zb(e,i){return e.filter(t=>t.pos===i)}function MZ(e,i){return e.filter(t=>-1===DZ.indexOf(t.pos)&&t.box.axis===i)}function Jb(e,i){return e.sort((t,n)=>{const r=i?n:t,s=i?t:n;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function IZ(e,i,t,n){return Math.max(e[t],i[t])+Math.max(e[n],i[n])}function RZ(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right)}function uBt(e,i,t,n){const{pos:r,box:s}=t,o=e.maxPadding;if(!Un(r)){t.size&&(e[r]-=t.size);const P=n[t.stack]||{size:0,count:1};P.size=Math.max(P.size,t.horizontal?s.height:s.width),t.size=P.size/P.count,e[r]+=t.size}s.getPadding&&RZ(o,s.getPadding());const l=Math.max(0,i.outerWidth-IZ(o,e,"left","right")),w=Math.max(0,i.outerHeight-IZ(o,e,"top","bottom")),C=l!==e.w,M=w!==e.h;return e.w=l,e.h=w,t.horizontal?{same:C,other:M}:{same:M,other:C}}function fBt(e,i){const t=i.maxPadding;return function n(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(i[o],t[o])}),s}(e?["left","right"]:["top","bottom"])}function qb(e,i,t,n){const r=[];let s,o,l,w,C,M;for(s=0,o=e.length,C=0;sC.box.fullSize),!0),n=Jb(Zb(i,"left"),!0),r=Jb(Zb(i,"right")),s=Jb(Zb(i,"top"),!0),o=Jb(Zb(i,"bottom")),l=MZ(i,"x"),w=MZ(i,"y");return{fullSize:t,leftAndTop:n.concat(s),rightAndBottom:r.concat(w).concat(o).concat(l),chartArea:Zb(i,"chartArea"),vertical:n.concat(r).concat(w),horizontal:s.concat(o).concat(l)}}(e.boxes),w=l.vertical,C=l.horizontal;_r(e.boxes,X=>{"function"==typeof X.beforeLayout&&X.beforeLayout()});const M=w.reduce((X,W)=>W.box.options&&!1===W.box.options.display?X:X+1,0)||1,P=Object.freeze({outerWidth:i,outerHeight:t,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/M,hBoxMaxHeight:o/2}),O=Object.assign({},r);RZ(O,co(n));const L=Object.assign({maxPadding:O,w:s,h:o,x:r.left,y:r.top},r),U=function cBt(e,i){const t=function lBt(e){const i={};for(const t of e){const{stack:n,pos:r,stackWeight:s}=t;if(!n||!DZ.includes(r))continue;const o=i[n]||(i[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return i}(e),{vBoxMaxWidth:n,hBoxMaxHeight:r}=i;let s,o,l;for(s=0,o=e.length;s{const W=X.box;Object.assign(W,e.chartArea),W.update(L.w,L.h,{left:0,top:0,right:0,bottom:0})})}};class PZ{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,n){}removeEventListener(i,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,n,r){return t=Math.max(0,t||i.width),n=n||i.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(i){return!0}updateConfig(i){}}class mBt extends PZ{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}}const bE="$chartjs",pBt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},FZ=e=>null===e||""===e,OZ=!!p3t&&{passive:!0};function xBt(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,OZ)}function wE(e,i){for(const t of e)if(t===i||t.contains(i))return!0}function bBt(e,i,t){const n=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||wE(l.addedNodes,n),o=o&&!wE(l.removedNodes,n);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function wBt(e,i,t){const n=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||wE(l.removedNodes,n),o=o&&!wE(l.addedNodes,n);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}const t1=new Map;let LZ=0;function NZ(){const e=window.devicePixelRatio;e!==LZ&&(LZ=e,t1.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function CBt(e,i,t){const n=e.canvas,r=n&&uL(n);if(!r)return;const s=VK((l,w)=>{const C=r.clientWidth;t(l,w),C{const w=l[0],C=w.contentRect.width,M=w.contentRect.height;0===C&&0===M||s(C,M)});return o.observe(r),function _Bt(e,i){t1.size||window.addEventListener("resize",NZ),t1.set(e,i)}(e,s),o}function bL(e,i,t){t&&t.disconnect(),"resize"===i&&function TBt(e){t1.delete(e),t1.size||window.removeEventListener("resize",NZ)}(e)}function SBt(e,i,t){const n=e.canvas,r=VK(s=>{null!==e.ctx&&t(function yBt(e,i){const t=pBt[e.type]||e.type,{x:n,y:r}=Um(e,i);return{type:t,chart:i,native:e,x:void 0!==n?n:null,y:void 0!==r?r:null}}(s,e))},e);return function vBt(e,i,t){e&&e.addEventListener(i,t,OZ)}(n,i,r),r}class EBt extends PZ{acquireContext(i,t){const n=i&&i.getContext&&i.getContext("2d");return n&&n.canvas===i?(function gBt(e,i){const t=e.style,n=e.getAttribute("height"),r=e.getAttribute("width");if(e[bE]={initial:{height:n,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",FZ(r)){const s=sZ(e,"width");void 0!==s&&(e.width=s)}if(FZ(n))if(""===e.style.height)e.height=e.width/(i||2);else{const s=sZ(e,"height");void 0!==s&&(e.height=s)}}(i,t),n):null}releaseContext(i){const t=i.canvas;if(!t[bE])return!1;const n=t[bE].initial;["height","width"].forEach(s=>{const o=n[s];Zn(o)?t.removeAttribute(s):t.setAttribute(s,o)});const r=n.style||{};return Object.keys(r).forEach(s=>{t.style[s]=r[s]}),t.width=t.width,delete t[bE],!0}addEventListener(i,t,n){this.removeEventListener(i,t),(i.$proxies||(i.$proxies={}))[t]=({attach:bBt,detach:wBt,resize:CBt}[t]||SBt)(i,t,n)}removeEventListener(i,t){const n=i.$proxies||(i.$proxies={}),r=n[t];r&&(({attach:bL,detach:bL,resize:bL}[t]||xBt)(i,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,n,r){return function m3t(e,i,t,n){const r=vE(e),s=Vm(r,"margin"),o=gE(r.maxWidth,e,"clientWidth")||cE,l=gE(r.maxHeight,e,"clientHeight")||cE,w=function f3t(e,i,t){let n,r;if(void 0===i||void 0===t){const s=e&&uL(e);if(s){const o=s.getBoundingClientRect(),l=vE(s),w=Vm(l,"border","width"),C=Vm(l,"padding");i=o.width-C.width-w.width,t=o.height-C.height-w.height,n=gE(l.maxWidth,s,"clientWidth"),r=gE(l.maxHeight,s,"clientHeight")}else i=e.clientWidth,t=e.clientHeight}return{width:i,height:t,maxWidth:n||cE,maxHeight:r||cE}}(e,i,t);let{width:C,height:M}=w;if("content-box"===r.boxSizing){const O=Vm(r,"border","width"),L=Vm(r,"padding");C-=L.width+O.width,M-=L.height+O.height}return C=Math.max(0,C-s.width),M=Math.max(0,n?C/n:M-s.height),C=xE(Math.min(C,o,w.maxWidth)),M=xE(Math.min(M,l,w.maxHeight)),C&&!M&&(M=xE(C/2)),(void 0!==i||void 0!==t)&&n&&w.height&&M>w.height&&(M=w.height,C=xE(Math.floor(M*n))),{width:C,height:M}}(i,t,n,r)}isAttached(i){const t=i&&uL(i);return!(!t||!t.isConnected)}}class Fu{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){const{x:t,y:n}=this.getProps(["x","y"],i);return{x:t,y:n}}hasValue(){return n0(this.x)&&n0(this.y)}getProps(i,t){const n=this.$animations;if(!t||!n)return this;const r={};return i.forEach(s=>{r[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),r}}function _E(e,i,t,n,r){const s=mn(n,0),o=Math.min(mn(r,e.length),e.length);let w,C,M,l=0;for(t=Math.ceil(t),r&&(w=r-n,t=w/Math.floor(w/t)),M=s;M<0;)l++,M=Math.round(s+l*t);for(C=Math.max(s,0);C"top"===i||"left"===i?e[i]+t:e[i]-t,VZ=(e,i)=>Math.min(i||e,e);function UZ(e,i){const t=[],n=e.length/i,r=e.length;let s=0;for(;so+l)))return w}function e1(e){return e.drawTicks?e.tickLength:0}function zZ(e,i){if(!e.display)return 0;const t=ma(e.font,i),n=co(e.padding);return(Qr(e.text)?e.text.length:1)*t.lineHeight+n.height}function VBt(e,i,t){let n=tL(e);return(t&&"right"!==i||!t&&"right"===i)&&(n=(e=>"left"===e?"right":"right"===e?"left":e)(n)),n}class Hm extends Fu{constructor(i){super(),this.id=i.id,this.type=i.type,this.options=void 0,this.ctx=i.ctx,this.chart=i.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(i){this.options=i.setContext(this.getContext()),this.axis=i.axis,this._userMin=this.parse(i.min),this._userMax=this.parse(i.max),this._suggestedMin=this.parse(i.suggestedMin),this._suggestedMax=this.parse(i.suggestedMax)}parse(i,t){return i}getUserBounds(){let{_userMin:i,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return i=Sl(i,Number.POSITIVE_INFINITY),t=Sl(t,Number.NEGATIVE_INFINITY),n=Sl(n,Number.POSITIVE_INFINITY),r=Sl(r,Number.NEGATIVE_INFINITY),{min:Sl(i,n),max:Sl(t,r),minDefined:bs(i),maxDefined:bs(t)}}getMinMax(i){let o,{min:t,max:n,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:t,max:n};const l=this.getMatchingVisibleMetas();for(let w=0,C=l.length;wn?n:t,n=r&&t>n?t:n,{min:Sl(t,Sl(n,t)),max:Sl(n,Sl(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Gr(this.options.beforeUpdate,[this])}update(i,t,n){const{beginAtZero:r,grace:s,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function j4t(e,i,t){const{min:n,max:r}=e,s=EK(i,(r-n)/2),o=(l,w)=>t&&0===l?0:l+w;return{min:o(n,-Math.abs(s)),max:o(r,s)}}(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const w=lr)return function kBt(e,i,t,n){let o,r=0,s=t[0];for(n=Math.ceil(n),o=0;or-s).pop(),i}(n);for(let o=0,l=s.length-1;or)return w}return Math.max(r,1)}(s,i,r);if(o>0){let P,O;const L=o>1?Math.round((w-l)/(o-1)):null;for(_E(i,C,M,Zn(L)?0:l-L,l),P=0,O=o-1;P=s||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const M=this._getLabelSizes(),P=M.widest.width,O=M.highest.height,L=Ma(this.chart.width-P,0,this.maxWidth);l=i.offset?this.maxWidth/n:L/(n-1),P+6>l&&(l=L/(n-(i.offset?.5:1)),w=this.maxHeight-e1(i.grid)-t.padding-zZ(i.title,this.chart.options.font),C=Math.sqrt(P*P+O*O),o=ZO(Math.min(Math.asin(Ma((M.highest.height+6)/l,-1,1)),Math.asin(Ma(w/C,-1,1))-Math.asin(Ma(O/C,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Gr(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Gr(this.options.beforeFit,[this])}fit(){const i={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:s}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const w=zZ(r,t.options.font);if(l?(i.width=this.maxWidth,i.height=e1(s)+w):(i.height=this.maxHeight,i.width=e1(s)+w),n.display&&this.ticks.length){const{first:C,last:M,widest:P,highest:O}=this._getLabelSizes(),L=2*n.padding,U=Ac(this.labelRotation),X=Math.cos(U),W=Math.sin(U);l?i.height=Math.min(this.maxHeight,i.height+(n.mirror?0:W*P.width+X*O.height)+L):i.width=Math.min(this.maxWidth,i.width+(n.mirror?0:X*P.width+W*O.height)+L),this._calculatePadding(C,M,W,X)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,n,r){const{ticks:{align:s,padding:o},position:l}=this.options,w=0!==this.labelRotation,C="top"!==l&&"x"===this.axis;if(this.isHorizontal()){const M=this.getPixelForTick(0)-this.left,P=this.right-this.getPixelForTick(this.ticks.length-1);let O=0,L=0;w?C?(O=r*i.width,L=n*t.height):(O=n*i.height,L=r*t.width):"start"===s?L=t.width:"end"===s?O=i.width:"inner"!==s&&(O=i.width/2,L=t.width/2),this.paddingLeft=Math.max((O-M+o)*this.width/(this.width-M),0),this.paddingRight=Math.max((L-P+o)*this.width/(this.width-P),0)}else{let M=t.height/2,P=i.height/2;"start"===s?(M=0,P=i.height):"end"===s&&(M=t.height,P=0),this.paddingTop=M+o,this.paddingBottom=P+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Gr(this.options.afterFit,[this])}isHorizontal(){const{axis:i,position:t}=this.options;return"top"===t||"bottom"===t||"x"===i}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(i),t=0,n=i.length;t{const n=t.gc,r=n.length/2;let s;if(r>i){for(s=0;s({width:o[pt]||0,height:l[pt]||0});return{first:dt(0),last:dt(t-1),widest:dt(Mt),highest:dt(ft),widths:o,heights:l}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){const t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);const t=this._startPixel+i*this._length;return function w4t(e){return Ma(e,-32768,32767)}(this._alignToPixels?Lm(this.chart,t,0):t)}getDecimalForPixel(i){const t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){const t=this.ticks||[];if(i>=0&&il*r?l/n:w/r:w*r0}_computeGridLineItems(i){const t=this.axis,n=this.chart,r=this.options,{grid:s,position:o,border:l}=r,w=s.offset,C=this.isHorizontal(),P=this.ticks.length+(w?1:0),O=e1(s),L=[],U=l.setContext(this.getContext()),X=U.display?U.width:0,W=X/2,Z=function(fe){return Lm(n,fe,X)};let rt,st,vt,_t,Mt,ft,dt,pt,bt,Tt,Et,Dt;if("top"===o)rt=Z(this.bottom),ft=this.bottom-O,pt=rt-W,Tt=Z(i.top)+W,Dt=i.bottom;else if("bottom"===o)rt=Z(this.top),Tt=i.top,Dt=Z(i.bottom)-W,ft=rt+W,pt=this.top+O;else if("left"===o)rt=Z(this.right),Mt=this.right-O,dt=rt-W,bt=Z(i.left)+W,Et=i.right;else if("right"===o)rt=Z(this.left),bt=i.left,Et=Z(i.right)-W,Mt=rt+W,dt=this.left+O;else if("x"===t){if("center"===o)rt=Z((i.top+i.bottom)/2+.5);else if(Un(o)){const fe=Object.keys(o)[0];rt=Z(this.chart.scales[fe].getPixelForValue(o[fe]))}Tt=i.top,Dt=i.bottom,ft=rt+W,pt=ft+O}else if("y"===t){if("center"===o)rt=Z((i.left+i.right)/2);else if(Un(o)){const fe=Object.keys(o)[0];rt=Z(this.chart.scales[fe].getPixelForValue(o[fe]))}Mt=rt-W,dt=Mt-O,bt=i.left,Et=i.right}const Le=mn(r.ticks.maxTicksLimit,P),ge=Math.max(1,Math.ceil(P/Le));for(st=0;st0&&(ui-=Ce/2)}Ei={left:ui,top:oi,width:Ce+Kt.width,height:ke+Kt.height,color:ge.backdropColor}}W.push({label:vt,font:pt,textOffset:Et,options:{rotation:X,color:Qt,strokeColor:_e,strokeWidth:Ne,textAlign:Se,textBaseline:Dt,translation:[_t,Mt],backdrop:Ei}})}return W}_getXAxisLabelAlignment(){const{position:i,ticks:t}=this.options;if(-Ac(this.labelRotation))return"top"===i?"left":"right";let r="center";return"start"===t.align?r="left":"end"===t.align?r="right":"inner"===t.align&&(r="inner"),r}_getYAxisLabelAlignment(i){const{position:t,ticks:{crossAlign:n,mirror:r,padding:s}}=this.options,l=i+s,w=this._getLabelSizes().widest.width;let C,M;return"left"===t?r?(M=this.right+s,"near"===n?C="left":"center"===n?(C="center",M+=w/2):(C="right",M+=w)):(M=this.right-l,"near"===n?C="right":"center"===n?(C="center",M-=w/2):(C="left",M=this.left)):"right"===t?r?(M=this.left+s,"near"===n?C="right":"center"===n?(C="center",M-=w/2):(C="left",M-=w)):(M=this.left+l,"near"===n?C="left":"center"===n?(C="center",M+=w/2):(C="right",M=this.right)):C="right",{textAlign:C,x:M}}_computeLabelArea(){if(this.options.ticks.mirror)return;const i=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:i.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:i.width}:void 0}drawBackground(){const{ctx:i,options:{backgroundColor:t},left:n,top:r,width:s,height:o}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(n,r,s,o),i.restore())}getLineWidthForValue(i){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const r=this.ticks.findIndex(s=>s.value===i);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(i){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i));let s,o;const l=(w,C,M)=>{!M.width||!M.color||(n.save(),n.lineWidth=M.width,n.strokeStyle=M.color,n.setLineDash(M.borderDash||[]),n.lineDashOffset=M.borderDashOffset,n.beginPath(),n.moveTo(w.x,w.y),n.lineTo(C.x,C.y),n.stroke(),n.restore())};if(t.display)for(s=0,o=r.length;s{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]:[{z:t,draw:s=>{this.draw(s)}}]}getMatchingVisibleMetas(i){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let s,o;for(s=0,o=t.length;s{const n=t.split("."),r=n.pop(),s=[e].concat(n).join("."),o=i[t].split("."),l=o.pop(),w=o.join(".");as.route(s,r,w,l)})}(i,e.defaultRoutes),e.descriptors&&as.describe(i,e.descriptors)}(i,o,n),this.override&&as.override(i.id,i.overrides)),o}get(i){return this.items[i]}unregister(i){const t=this.items,n=i.id,r=this.scope;n in t&&delete t[n],r&&n in as[r]&&(delete as[r][n],this.override&&delete Om[n])}}class WBt{constructor(){this.controllers=new TE(cf,"datasets",!0),this.elements=new TE(Fu,"elements"),this.plugins=new TE(Object,"plugins"),this.scales=new TE(Hm,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,n){[...t].forEach(r=>{const s=n||this._getRegistryForType(r);n||s.isForType(r)||s===this.plugins&&r.id?this._exec(i,s,r):_r(r,o=>{const l=n||this._getRegistryForType(o);this._exec(i,l,o)})})}_exec(i,t,n){const r=KO(i);Gr(n["before"+r],[],n),t[i](n),Gr(n["after"+r],[],n)}_getRegistryForType(i){for(let t=0;ts.filter(l=>!o.some(w=>l.plugin.id===w.plugin.id));this._notify(r(t,n),i,"stop"),this._notify(r(n,t),i,"start")}}function YBt(e,i){return i||!1!==e?!0===e?{}:e:null}function QBt(e,{plugin:i,local:t},n,r){const s=e.pluginScopeKeys(i),o=e.getOptionScopes(n,s);return t&&i.defaults&&o.push(i.defaults),e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wL(e,i){return((i.datasets||{})[e]||{}).indexAxis||i.indexAxis||(as.datasets[e]||{}).indexAxis||"x"}function GZ(e){if("x"===e||"y"===e||"r"===e)return e}function JBt(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function _L(e,...i){if(GZ(e))return e;for(const t of i){const n=t.axis||JBt(t.position)||e.length>1&&GZ(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function HZ(e,i,t){if(t[i+"AxisID"]===e)return{axis:i}}function WZ(e){const i=e.options||(e.options={});i.plugins=mn(i.plugins,{}),i.scales=function t5t(e,i){const t=Om[e.type]||{scales:{}},n=i.scales||{},r=wL(e.type,i),s=Object.create(null);return Object.keys(n).forEach(o=>{const l=n[o];if(!Un(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const w=_L(o,l,function qBt(e,i){if(i.data&&i.data.datasets){const t=i.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(t.length)return HZ(e,"x",t[0])||HZ(e,"y",t[0])}return{}}(o,e),as.scales[l.type]),C=function ZBt(e,i){return e===i?"_index_":"_value_"}(w,r),M=t.scales||{};s[o]=Ub(Object.create(null),[{axis:w},l,M[w],M[C]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,w=o.indexAxis||wL(l,i),M=(Om[l]||{}).scales||{};Object.keys(M).forEach(P=>{const O=function KBt(e,i){let t=e;return"_index_"===e?t=i:"_value_"===e&&(t="x"===i?"y":"x"),t}(P,w),L=o[O+"AxisID"]||O;s[L]=s[L]||Object.create(null),Ub(s[L],[{axis:O},n[L],M[P]])})}),Object.keys(s).forEach(o=>{const l=s[o];Ub(l,[as.scales[l.type],as.scale])}),s}(e,i)}function XZ(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const jZ=new Map,YZ=new Set;function CE(e,i){let t=jZ.get(e);return t||(t=i(),jZ.set(e,t),YZ.add(t)),t}const n1=(e,i,t)=>{const n=rf(i,t);void 0!==n&&e.add(n)};class i5t{constructor(i){this._config=function e5t(e){return(e=e||{}).data=XZ(e.data),WZ(e),e}(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=XZ(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){const i=this._config;this.clearCache(),WZ(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return CE(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,t){return CE(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,t){return CE(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]])}pluginScopeKeys(i){const t=i.id;return CE(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){const n=this._scopeCache;let r=n.get(i);return(!r||t)&&(r=new Map,n.set(i,r)),r}getOptionScopes(i,t,n){const{options:r,type:s}=this,o=this._cachedScopes(i,n),l=o.get(t);if(l)return l;const w=new Set;t.forEach(M=>{i&&(w.add(i),M.forEach(P=>n1(w,i,P))),M.forEach(P=>n1(w,r,P)),M.forEach(P=>n1(w,Om[s]||{},P)),M.forEach(P=>n1(w,as,P)),M.forEach(P=>n1(w,nL,P))});const C=Array.from(w);return 0===C.length&&C.push(Object.create(null)),YZ.has(t)&&o.set(t,C),C}chartOptionScopes(){const{options:i,type:t}=this;return[i,Om[t]||{},as.datasets[t]||{},{type:t},as,nL]}resolveNamedOptions(i,t,n,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:l}=$Z(this._resolverCache,i,r);let w=o;(function r5t(e,i){const{isScriptable:t,isIndexable:n}=KK(e);for(const r of i){const s=t(r),o=n(r),l=(o||s)&&e[r];if(s&&(sf(l)||n5t(l))||o&&Qr(l))return!0}return!1})(o,t)&&(s.$shared=!1,w=r0(o,n=sf(n)?n():n,this.createResolver(i,n,l)));for(const C of t)s[C]=w[C];return s}createResolver(i,t,n=[""],r){const{resolver:s}=$Z(this._resolverCache,i,n);return Un(t)?r0(s,t,void 0,r):s}}function $Z(e,i,t){let n=e.get(i);n||(n=new Map,e.set(i,n));const r=t.join();let s=n.get(r);return s||(s={resolver:oL(i,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},n.set(r,s)),s}const n5t=e=>Un(e)&&Object.getOwnPropertyNames(e).some(i=>sf(e[i])),a5t=["top","bottom","left","right","chartArea"];function QZ(e,i){return"top"===e||"bottom"===e||-1===a5t.indexOf(e)&&"x"===i}function KZ(e,i){return function(t,n){return t[e]===n[e]?t[i]-n[i]:t[e]-n[e]}}function ZZ(e){const i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),Gr(t&&t.onComplete,[e],i)}function o5t(e){const i=e.chart,t=i.options.animation;Gr(t&&t.onProgress,[e],i)}function JZ(e){return dL()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const SE={},qZ=e=>{const i=JZ(e);return Object.values(SE).filter(t=>t.canvas===i).pop()};function l5t(e,i,t){const n=Object.keys(e);for(const r of n){const s=+r;if(s>=i){const o=e[r];delete e[r],(t>0||s>i)&&(e[s+t]=o)}}}function EE(e,i,t){return e.options.clip?e[t]:i[t]}let TL=(()=>class e{static defaults=as;static instances=SE;static overrides=Om;static registry=xd;static version="4.4.7";static getChart=qZ;static register(...t){xd.add(...t),tJ()}static unregister(...t){xd.remove(...t),tJ()}constructor(t,n){const r=this.config=new i5t(n),s=JZ(t),o=qZ(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||function ABt(e){return!dL()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?mBt:EBt}(s)),this.platform.updateConfig(r);const w=this.platform.acquireContext(s,l.aspectRatio),C=w&&w.canvas,M=C&&C.height,P=C&&C.width;this.id=c4t(),this.ctx=w,this.canvas=C,this.width=P,this.height=M,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new XBt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function S4t(e,i){let t;return function(...n){return i?(clearTimeout(t),t=setTimeout(e,i,n)):e.apply(this,n),i}}(O=>this.update(O),l.resizeDelay||0),this._dataChanges=[],SE[this.id]=this,w&&C?(Pu.listen(this,"complete",ZZ),Pu.listen(this,"progress",o5t),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:o}=this;return Zn(t)?n&&o?o:s?r/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return xd}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rZ(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return YK(this.canvas,this.ctx),this}stop(){return Pu.stop(this),this}resize(t,n){Pu.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,l=this.platform.getMaximumSize(this.canvas,t,n,r.maintainAspectRatio&&this.aspectRatio),w=r.devicePixelRatio||this.platform.getDevicePixelRatio(),C=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,rZ(this,w,!0)&&(this.notifyPlugins("resize",{size:l}),Gr(r.onResize,[this,l],this),this.attached&&this._doResize(C)&&this.render())}ensureScalesHaveIDs(){_r(this.options.scales||{},(r,s)=>{r.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,s=Object.keys(r).reduce((l,w)=>(l[w]=!1,l),{});let o=[];n&&(o=o.concat(Object.keys(n).map(l=>{const w=n[l],C=_L(l,w),M="r"===C,P="x"===C;return{options:w,dposition:M?"chartArea":P?"bottom":"left",dtype:M?"radialLinear":P?"category":"linear"}}))),_r(o,l=>{const w=l.options,C=w.id,M=_L(C,w),P=mn(w.type,l.dtype);(void 0===w.position||QZ(w.position,M)!==QZ(l.dposition))&&(w.position=l.dposition),s[C]=!0;let O=null;C in r&&r[C].type===P?O=r[C]:(O=new(xd.getScale(P))({id:C,type:P,ctx:this.ctx,chart:this}),r[O.id]=O),O.init(w,t)}),_r(s,(l,w)=>{l||delete r[w]}),_r(r,l=>{uo.configure(this,l,l.options),uo.addBox(this,l)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((s,o)=>s.index-o.index),r>n){for(let s=n;sn.length&&delete this._stacks,t.forEach((r,s)=>{0===n.filter(o=>o===r._dataset).length&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let M=0,P=this.data.datasets.length;M{M.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(KZ("z","_idx"));const{_active:w,_lastEvent:C}=this;C?this._eventHandler(C,!0):w.length&&this._updateHoverStyles(w,w,!0),this.render()}_updateScales(){_r(this.scales,t=>{uo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!MK(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:o}of n)l5t(t,s,"_removeElements"===r?-o:o)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(l=>l[0]===o).map((l,w)=>w+","+l.splice(1).join(","))),s=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;uo.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],_r(this.boxes,s=>{r&&"chartArea"===s.position||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,s=!r.disabled,o=function d5t(e,i){const{xScale:t,yScale:n}=e;return t&&n?{left:EE(t,i,"left"),right:EE(t,i,"right"),top:EE(n,i,"top"),bottom:EE(n,i,"bottom")}:i}(t,this.chartArea),l={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",l)&&(s&&fE(n,{left:!1===r.left?0:o.left-r.left,right:!1===r.right?this.width:o.right+r.right,top:!1===r.top?0:o.top-r.top,bottom:!1===r.bottom?this.height:o.bottom+r.bottom}),t.controller.draw(),s&&mE(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(t){return ku(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const o=aBt.modes[n];return"function"==typeof o?o(this,t,r,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let s=r.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=lf(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return"boolean"==typeof r.hidden?!r.hidden:!n.hidden}setDatasetVisibility(t,n){this.getDatasetMeta(t).hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const s=r?"show":"hide",o=this.getDatasetMeta(t),l=o.controller._resolveAnimations(void 0,s);zb(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),l.update(o,{visible:r}),this.update(w=>w.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Pu.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,l),t[o]=l},s=(o,l,w)=>{o.offsetX=l,o.offsetY=w,this._eventHandler(o)};_r(this.options.events,o=>r(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(C,M)=>{n.addEventListener(this,C,M),t[C]=M},s=(C,M)=>{t[C]&&(n.removeEventListener(this,C,M),delete t[C])},o=(C,M)=>{this.canvas&&this.resize(C,M)};let l;const w=()=>{s("attach",w),this.attached=!0,this.resize(),r("resize",o),r("detach",l)};l=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),r("attach",w)},n.isAttached(this.canvas)?w():l()}unbindEvents(){_r(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},_r(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const s=r?"set":"remove";let o,l,w,C;for("dataset"===n&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),w=0,C=t.length;w{const w=this.getDatasetMeta(o);if(!w)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:w.data[l],index:l}});!oE(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return 1===this._plugins._cache.filter(n=>n.plugin.id===t).length}_updateHoverStyles(t,n,r){const s=this.options.hover,o=(C,M)=>C.filter(P=>!M.some(O=>P.datasetIndex===O.datasetIndex&&P.index===O.index)),l=o(n,t),w=r?t:o(t,n);l.length&&this.updateHoverStyle(l,s.mode,!1),w.length&&s.mode&&this.updateHoverStyle(w,s.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=l=>(l.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",r,s))return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:s=[],options:o}=this,w=this._getActiveElements(t,s,r,n),C=function p4t(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(t),M=function c5t(e,i,t,n){return t&&"mouseout"!==e.type?n?i:e:null}(t,this._lastEvent,r,C);r&&(this._lastEvent=null,Gr(o.onHover,[t,w,this],this),C&&Gr(o.onClick,[t,w,this],this));const P=!oE(w,s);return(P||n)&&(this._active=w,this._updateHoverStyles(w,s,n)),this._lastEvent=M,P}_getActiveElements(t,n,r,s){if("mouseout"===t.type)return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}})();function tJ(){return _r(TL.instances,e=>e._plugins.invalidate())}function o0(e,i,t,n){return{x:t+e*Math.cos(i),y:n+e*Math.sin(i)}}function AE(e,i,t,n,r,s){const{x:o,y:l,startAngle:w,pixelMargin:C,innerRadius:M}=i,P=Math.max(i.outerRadius+n+t-C,0),O=M>0?M+n+t+C:0;let L=0;const U=r-w;if(n){const Qt=((M>0?M-n:0)+(P>0?P-n:0))/2;L=(U-(0!==Qt?U*Qt/(Qt+n):U))/2}const W=(U-Math.max(.001,U*P-t/Kr)/P)/2,Z=w+W+L,rt=r-W-L,{outerStart:st,outerEnd:vt,innerStart:_t,innerEnd:Mt}=function f5t(e,i,t,n){const r=function h5t(e){return aL(e,["outerStart","outerEnd","innerStart","innerEnd"])}(e.options.borderRadius),s=(t-i)/2,o=Math.min(s,n*i/2),l=w=>{const C=(t-Math.min(s,w))*n/2;return Ma(w,0,Math.min(s,C))};return{outerStart:l(r.outerStart),outerEnd:l(r.outerEnd),innerStart:Ma(r.innerStart,0,o),innerEnd:Ma(r.innerEnd,0,o)}}(i,O,P,rt-Z),ft=P-st,dt=P-vt,pt=Z+st/ft,bt=rt-vt/dt,Tt=O+_t,Et=O+Mt,Dt=Z+_t/Tt,Le=rt-Mt/Et;if(e.beginPath(),s){const ge=(pt+bt)/2;if(e.arc(o,l,P,pt,ge),e.arc(o,l,P,ge,bt),vt>0){const Ne=o0(dt,bt,o,l);e.arc(Ne.x,Ne.y,vt,bt,rt+Os)}const fe=o0(Et,rt,o,l);if(e.lineTo(fe.x,fe.y),Mt>0){const Ne=o0(Et,Le,o,l);e.arc(Ne.x,Ne.y,Mt,rt+Os,Le+Math.PI)}const Qt=(rt-Mt/O+(Z+_t/O))/2;if(e.arc(o,l,O,rt-Mt/O,Qt,!0),e.arc(o,l,O,Qt,Z+_t/O,!0),_t>0){const Ne=o0(Tt,Dt,o,l);e.arc(Ne.x,Ne.y,_t,Dt+Math.PI,Z-Os)}const _e=o0(ft,Z,o,l);if(e.lineTo(_e.x,_e.y),st>0){const Ne=o0(ft,pt,o,l);e.arc(Ne.x,Ne.y,st,Z-Os,pt)}}else{e.moveTo(o,l);const ge=Math.cos(pt)*P+o,fe=Math.sin(pt)*P+l;e.lineTo(ge,fe);const Qt=Math.cos(bt)*P+o,_e=Math.sin(bt)*P+l;e.lineTo(Qt,_e)}e.closePath()}function eJ(e,i,t=i){e.lineCap=mn(t.borderCapStyle,i.borderCapStyle),e.setLineDash(mn(t.borderDash,i.borderDash)),e.lineDashOffset=mn(t.borderDashOffset,i.borderDashOffset),e.lineJoin=mn(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=mn(t.borderWidth,i.borderWidth),e.strokeStyle=mn(t.borderColor,i.borderColor)}function v5t(e,i,t){e.lineTo(t.x,t.y)}function iJ(e,i,t={}){const n=e.length,{start:r=0,end:s=n-1}=t,{start:o,end:l}=i,w=Math.max(r,o),C=Math.min(s,l);return{count:n,start:w,loop:i.loop,ilen:Cl&&s>l)?n+C-w:C-w}}function y5t(e,i,t,n){const{points:r,options:s}=i,{count:o,start:l,loop:w,ilen:C}=iJ(r,t,n),M=function x5t(e){return e.stepped?N4t:e.tension||"monotone"===e.cubicInterpolationMode?B4t:v5t}(s);let L,U,X,{move:P=!0,reverse:O}=n||{};for(L=0;L<=C;++L)U=r[(l+(O?C-L:L))%o],!U.skip&&(P?(e.moveTo(U.x,U.y),P=!1):M(e,X,U,O,s.stepped),X=U);return w&&(U=r[(l+(O?C:0))%o],M(e,X,U,O,s.stepped)),!!w}function b5t(e,i,t,n){const r=i.points,{count:s,start:o,ilen:l}=iJ(r,t,n),{move:w=!0,reverse:C}=n||{};let O,L,U,X,W,Z,M=0,P=0;const rt=vt=>(o+(C?l-vt:vt))%s,st=()=>{X!==W&&(e.lineTo(M,W),e.lineTo(M,X),e.lineTo(M,Z))};for(w&&(L=r[rt(0)],e.moveTo(L.x,L.y)),O=0;O<=l;++O){if(L=r[rt(O)],L.skip)continue;const vt=L.x,_t=L.y,Mt=0|vt;Mt===U?(_tW&&(W=_t),M=(P*M+vt)/++P):(st(),e.lineTo(vt,_t),U=Mt,P=0,X=W=_t),Z=_t}st()}function CL(e){const i=e.options;return e._decimated||e._loop||i.tension||"monotone"===i.cubicInterpolationMode||i.stepped||i.borderDash&&i.borderDash.length?y5t:b5t}const C5t="function"==typeof Path2D;let DE=(()=>class e extends Fu{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;!r.tension&&"monotone"!==r.cubicInterpolationMode||r.stepped||this._pointsUpdated||(l3t(this._points,r,t,r.spanGaps?this._loop:this._fullLoop,n),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function T3t(e,i){const t=e.points,n=e.options.spanGaps,r=t.length;if(!r)return[];const s=!!e._loop,{start:o,end:l}=function w3t(e,i,t,n){let r=0,s=i-1;if(t&&!n)for(;rr&&e[s%i].skip;)s--;return s%=i,{start:r,end:s}}(t,r,s,n);return function hZ(e,i,t,n){return n&&n.setContext&&t?function C3t(e,i,t,n){const r=e._chart.getContext(),s=fZ(e.options),{_datasetIndex:o,options:{spanGaps:l}}=e,w=t.length,C=[];let M=s,P=i[0].start,O=P;function L(U,X,W,Z){const rt=l?-1:1;if(U!==X){for(U+=w;t[U%w].skip;)U-=rt;for(;t[X%w].skip;)X+=rt;U%w!=X%w&&(C.push({start:U%w,end:X%w,loop:W,style:Z}),M=Z,P=X%w)}}for(const U of i){P=l?P:U.start;let W,X=t[P%w];for(O=P+1;O<=U.end;O++){const Z=t[O%w];W=fZ(n.setContext(lf(r,{type:"segment",p0:X,p1:Z,p0DataIndex:(O-1)%w,p1DataIndex:O%w,datasetIndex:o}))),S3t(W,M)&&L(P,O-1,U.loop,M),X=Z,M=W}Pclass e extends Fu{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const s=this.options,{x:o,y:l}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-l,2)"borderDash"!==i};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,i&&Object.assign(this,i)}inRange(i,t,n){const r=this.getProps(["x","y"],n),{angle:s,distance:o}=FK(r,{x:i,y:t}),{startAngle:l,endAngle:w,innerRadius:C,outerRadius:M,circumference:P}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),O=(this.options.spacing+this.options.borderWidth)/2,L=mn(P,w-l),U=Hb(s,l,w)&&l!==w,X=L>=Zr||U,W=Iu(o,C+O,M+O);return X&&W}getCenterPoint(i){const{x:t,y:n,startAngle:r,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:w,spacing:C}=this.options,M=(r+s)/2,P=(o+l+C+w)/2;return{x:t+Math.cos(M)*P,y:n+Math.sin(M)*P}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){const{options:t,circumference:n}=this,r=(t.offset||0)/4,s=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>Zr?Math.floor(n/Zr):0,0===n||this.innerRadius<0||this.outerRadius<0)return;i.save();const l=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(l)*r,Math.sin(l)*r);const C=r*(1-Math.sin(Math.min(Kr,n||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,function m5t(e,i,t,n,r){const{fullCircles:s,startAngle:o,circumference:l}=i;let w=i.endAngle;if(s){AE(e,i,t,n,w,r);for(let C=0;Cr?(C=r/w,e.arc(s,o,w,t+C,n-C,!0)):e.arc(s,o,r,t+Os,n-Os),e.closePath(),e.clip()}(e,i,U),s||(AE(e,i,t,n,U,r),e.stroke())}(i,this,C,s,o),i.restore()}},BarElement:class k5t extends Fu{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(i){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,i&&Object.assign(this,i)}draw(i){const{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:s,outer:o}=function M5t(e){const i=rJ(e),t=i.right-i.left,n=i.bottom-i.top,r=function A5t(e,i,t){const r=e.borderSkipped,s=QK(e.options.borderWidth);return{t:df(r.top,s.top,0,t),r:df(r.right,s.right,0,i),b:df(r.bottom,s.bottom,0,t),l:df(r.left,s.left,0,i)}}(e,t/2,n/2),s=function D5t(e,i,t){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,s=Bm(r),o=Math.min(i,t),l=e.borderSkipped,w=n||Un(r);return{topLeft:df(!w||l.top||l.left,s.topLeft,0,o),topRight:df(!w||l.top||l.right,s.topRight,0,o),bottomLeft:df(!w||l.bottom||l.left,s.bottomLeft,0,o),bottomRight:df(!w||l.bottom||l.right,s.bottomRight,0,o)}}(e,t/2,n/2);return{outer:{x:i.left,y:i.top,w:t,h:n,radius:s},inner:{x:i.left+r.l,y:i.top+r.t,w:t-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}(this),l=function I5t(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}(o.radius)?Yb:R5t;i.save(),(o.w!==s.w||o.h!==s.h)&&(i.beginPath(),l(i,EL(o,t,s)),i.clip(),l(i,EL(s,-t,o)),i.fillStyle=n,i.fill("evenodd")),i.beginPath(),l(i,EL(s,t)),i.fillStyle=r,i.fill(),i.restore()}inRange(i,t,n){return SL(this,i,t,n)}inXRange(i,t){return SL(this,i,null,t)}inYRange(i,t){return SL(this,null,i,t)}getCenterPoint(i){const{x:t,y:n,base:r,horizontal:s}=this.getProps(["x","y","base","horizontal"],i);return{x:s?(t+r)/2:t,y:s?n:(n+r)/2}}getRange(i){return"x"===i?this.width/2:this.height/2}},LineElement:DE,PointElement:E5t});const AL=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],sJ=AL.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function aJ(e){return AL[e%AL.length]}function oJ(e){return sJ[e%sJ.length]}function lJ(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}var U5t={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;const{data:{datasets:n},options:r}=e.config,{elements:s}=r,o=lJ(n)||function B5t(e){return e&&(e.borderColor||e.backgroundColor)}(r)||s&&lJ(s)||function V5t(){return"rgba(0,0,0,0.1)"!==as.borderColor||"rgba(0,0,0,0.1)"!==as.backgroundColor}();if(!t.forceOverride&&o)return;const l=function N5t(e){let i=0;return(t,n)=>{const r=e.getDatasetMeta(n).controller;r instanceof gL?i=function O5t(e,i){return e.backgroundColor=e.data.map(()=>aJ(i++)),i}(t,i):r instanceof EZ?i=function L5t(e,i){return e.backgroundColor=e.data.map(()=>oJ(i++)),i}(t,i):r&&(i=function F5t(e,i){return e.borderColor=aJ(i),e.backgroundColor=oJ(i),++i}(t,i))}}(e);n.forEach(l)}};function cJ(e){if(e._decimated){const i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function dJ(e){e.data.datasets.forEach(i=>{cJ(i)})}var W5t={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled)return void dJ(e);const n=e.width;e.data.datasets.forEach((r,s)=>{const{_data:o,indexAxis:l}=r,w=e.getDatasetMeta(s),C=o||r.data;if("y"===$b([l,e.options.indexAxis])||!w.controller.supportsDecimation)return;const M=e.scales[w.xAxisID];if("linear"!==M.type&&"time"!==M.type||e.options.parsing)return;let U,{start:P,count:O}=function H5t(e,i){const t=i.length;let r,n=0;const{iScale:s}=e,{min:o,max:l,minDefined:w,maxDefined:C}=s.getUserBounds();return w&&(n=Ma(Ru(i,s.axis,o).lo,0,t-1)),r=C?Ma(Ru(i,s.axis,l).hi+1,n,t)-n:t-n,{start:n,count:r}}(w,C);if(O<=(t.threshold||4*n))cJ(r);else{switch(Zn(o)&&(r._data=C,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(X){this._data=X}})),t.algorithm){case"lttb":U=function z5t(e,i,t,n,r){const s=r.samples||n;if(s>=t)return e.slice(i,i+t);const o=[],l=(t-2)/(s-2);let w=0;const C=i+t-1;let P,O,L,U,X,M=i;for(o[w++]=e[M],P=0;PL&&(L=U,O=e[rt],X=rt);o[w++]=O,M=X}return o[w++]=e[C],o}(C,P,O,n,t);break;case"min-max":U=function G5t(e,i,t,n){let o,l,w,C,M,P,O,L,U,X,r=0,s=0;const W=[],rt=e[i].x,vt=e[i+t-1].x-rt;for(o=i;oX&&(X=C,O=o),r=(s*r+l.x)/++s;else{const Mt=o-1;if(!Zn(P)&&!Zn(O)){const ft=Math.min(P,O),dt=Math.max(P,O);ft!==L&&ft!==Mt&&W.push({...e[ft],x:r}),dt!==L&&dt!==Mt&&W.push({...e[dt],x:r})}o>0&&Mt!==L&&W.push(e[Mt]),W.push(l),M=_t,s=0,U=X=C,P=O=L=o}}return W}(C,P,O,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=U}})},destroy(e){dJ(e)}};function DL(e,i,t,n){if(n)return;let r=i[e],s=t[e];return"angle"===e&&(r=El(r),s=El(s)),{property:e,start:r,end:s}}function ML(e,i,t){for(;i>e;i--){const n=t[i];if(!isNaN(n.x)&&!isNaN(n.y))break}return i}function uJ(e,i,t,n){return e&&i?n(e[t],i[t]):e?e[t]:i?i[t]:0}function hJ(e,i){let t=[],n=!1;return Qr(e)?(n=!0,t=e):t=function j5t(e,i){const{x:t=null,y:n=null}=e||{},r=i.points,s=[];return i.segments.forEach(({start:o,end:l})=>{l=ML(o,l,r);const w=r[o],C=r[l];null!==n?(s.push({x:w.x,y:n}),s.push({x:C.x,y:n})):null!==t&&(s.push({x:t,y:w.y}),s.push({x:t,y:C.y}))}),s}(e,i),t.length?new DE({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function fJ(e){return e&&!1!==e.fill}function Y5t(e,i,t){let r=e[i].fill;const s=[i];let o;if(!t)return r;for(;!1!==r&&-1===s.indexOf(r);){if(!bs(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;s.push(r),r=o.fill}return!1}function $5t(e,i,t){const n=function J5t(e){const i=e.options,t=i.fill;let n=mn(t&&t.target,t);return void 0===n&&(n=!!i.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(e);if(Un(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return bs(r)&&Math.floor(r)===r?function Q5t(e,i,t,n){return("-"===e||"+"===e)&&(t=i+t),!(t===i||t<0||t>=n)&&t}(n[0],i,r,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function eVt(e,i,t){const n=[];for(let r=0;r=0;--o){const l=r[o].$filler;l&&(l.line.updateControlPoints(s,l.axis),n&&l.fill&&IL(e.ctx,l,s))}},beforeDatasetsDraw(e,i,t){if("beforeDatasetsDraw"!==t.drawTime)return;const n=e.getSortedVisibleDatasetMetas();for(let r=n.length-1;r>=0;--r){const s=n[r].$filler;fJ(s)&&IL(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,i,t){const n=i.meta.$filler;!fJ(n)||"beforeDatasetDraw"!==t.drawTime||IL(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xJ=(e,i)=>{let{boxHeight:t=i,boxWidth:n=i}=e;return e.usePointStyle&&(t=Math.min(t,i),n=e.pointStyleWidth||Math.min(n,i)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(i,t)}};class yJ extends Fu{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t,n){this.maxWidth=i,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const i=this.options.labels||{};let t=Gr(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(n=>i.filter(n,this.chart.data))),i.sort&&(t=t.sort((n,r)=>i.sort(n,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:i,ctx:t}=this;if(!i.display)return void(this.width=this.height=0);const n=i.labels,r=ma(n.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:w}=xJ(n,s);let C,M;t.font=r.string,this.isHorizontal()?(C=this.maxWidth,M=this._fitRows(o,s,l,w)+10):(M=this.maxHeight,C=this._fitCols(o,r,l,w)+10),this.width=Math.min(C,i.maxWidth||this.maxWidth),this.height=Math.min(M,i.maxHeight||this.maxHeight)}_fitRows(i,t,n,r){const{ctx:s,maxWidth:o,options:{labels:{padding:l}}}=this,w=this.legendHitBoxes=[],C=this.lineWidths=[0],M=r+l;let P=i;s.textAlign="left",s.textBaseline="middle";let O=-1,L=-M;return this.legendItems.forEach((U,X)=>{const W=n+t/2+s.measureText(U.text).width;(0===X||C[C.length-1]+W+2*l>o)&&(P+=M,C[C.length-(X>0?0:1)]=0,L+=M,O++),w[X]={left:0,top:L,row:O,width:W,height:r},C[C.length-1]+=W+l}),P}_fitCols(i,t,n,r){const{ctx:s,maxHeight:o,options:{labels:{padding:l}}}=this,w=this.legendHitBoxes=[],C=this.columnSizes=[],M=o-i;let P=l,O=0,L=0,U=0,X=0;return this.legendItems.forEach((W,Z)=>{const{itemWidth:rt,itemHeight:st}=function hVt(e,i,t,n,r){const s=function fVt(e,i,t,n){let r=e.text;return r&&"string"!=typeof r&&(r=r.reduce((s,o)=>s.length>o.length?s:o)),i+t.size/2+n.measureText(r).width}(n,e,i,t),o=function mVt(e,i,t){let n=e;return"string"!=typeof i.text&&(n=bJ(i,t)),n}(r,n,i.lineHeight);return{itemWidth:s,itemHeight:o}}(n,t,s,W,r);Z>0&&L+st+2*l>M&&(P+=O+l,C.push({width:O,height:L}),U+=O+l,X++,O=L=0),w[Z]={left:U,top:L,col:X,width:rt,height:st},O=Math.max(O,rt),L+=st+l}),P+=O,C.push({width:O,height:L}),P}adjustHitBoxes(){if(!this.options.display)return;const i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:s}}=this,o=a0(s,this.left,this.width);if(this.isHorizontal()){let l=0,w=lo(n,this.left+r,this.right-this.lineWidths[l]);for(const C of t)l!==C.row&&(l=C.row,w=lo(n,this.left+r,this.right-this.lineWidths[l])),C.top+=this.top+i+r,C.left=o.leftForLtr(o.x(w),C.width),w+=C.width+r}else{let l=0,w=lo(n,this.top+i+r,this.bottom-this.columnSizes[l].height);for(const C of t)C.col!==l&&(l=C.col,w=lo(n,this.top+i+r,this.bottom-this.columnSizes[l].height)),C.top=w,C.left+=this.left+r,C.left=o.leftForLtr(o.x(C.left),C.width),w+=C.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const i=this.ctx;fE(i,this),this._draw(),mE(i)}}_draw(){const{options:i,columnSizes:t,lineWidths:n,ctx:r}=this,{align:s,labels:o}=i,l=as.color,w=a0(i.rtl,this.left,this.width),C=ma(o.font),{padding:M}=o,P=C.size,O=P/2;let L;this.drawTitle(),r.textAlign=w.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=C.string;const{boxWidth:U,boxHeight:X,itemHeight:W}=xJ(o,P),st=this.isHorizontal(),vt=this._computeTitleHeight();L=st?{x:lo(s,this.left+M,this.right-n[0]),y:this.top+M+vt,line:0}:{x:this.left+M,y:lo(s,this.top+vt+M,this.bottom-t[0].height),line:0},aZ(this.ctx,i.textDirection);const _t=W+M;this.legendItems.forEach((Mt,ft)=>{r.strokeStyle=Mt.fontColor,r.fillStyle=Mt.fontColor;const dt=r.measureText(Mt.text).width,pt=w.textAlign(Mt.textAlign||(Mt.textAlign=o.textAlign)),bt=U+O+dt;let Tt=L.x,Et=L.y;w.setWidth(this.width),st?ft>0&&Tt+bt+M>this.right&&(Et=L.y+=_t,L.line++,Tt=L.x=lo(s,this.left+M,this.right-n[L.line])):ft>0&&Et+_t>this.bottom&&(Tt=L.x=Tt+t[L.line].width+M,L.line++,Et=L.y=lo(s,this.top+vt+M,this.bottom-t[L.line].height)),function(Mt,ft,dt){if(isNaN(U)||U<=0||isNaN(X)||X<0)return;r.save();const pt=mn(dt.lineWidth,1);if(r.fillStyle=mn(dt.fillStyle,l),r.lineCap=mn(dt.lineCap,"butt"),r.lineDashOffset=mn(dt.lineDashOffset,0),r.lineJoin=mn(dt.lineJoin,"miter"),r.lineWidth=pt,r.strokeStyle=mn(dt.strokeStyle,l),r.setLineDash(mn(dt.lineDash,[])),o.usePointStyle){const bt={radius:X*Math.SQRT2/2,pointStyle:dt.pointStyle,rotation:dt.rotation,borderWidth:pt},Tt=w.xPlus(Mt,U/2);$K(r,bt,Tt,ft+O,o.pointStyleWidth&&U)}else{const bt=ft+Math.max((P-X)/2,0),Tt=w.leftForLtr(Mt,U),Et=Bm(dt.borderRadius);r.beginPath(),Object.values(Et).some(Dt=>0!==Dt)?Yb(r,{x:Tt,y:bt,w:U,h:X,radius:Et}):r.rect(Tt,bt,U,X),r.fill(),0!==pt&&r.stroke()}r.restore()}(w.x(Tt),Et,Mt),Tt=((e,i,t,n)=>e===(n?"left":"right")?t:"center"===e?(i+t)/2:i)(pt,Tt+U+O,st?Tt+bt:this.right,i.rtl),function(Mt,ft,dt){Nm(r,dt.text,Mt,ft+W/2,C,{strikethrough:dt.hidden,textAlign:w.textAlign(dt.textAlign)})}(w.x(Tt),Et,Mt),st?L.x+=bt+M:L.y+="string"!=typeof Mt.text?bJ(Mt,C.lineHeight)+M:_t}),oZ(this.ctx,i.textDirection)}drawTitle(){const i=this.options,t=i.title,n=ma(t.font),r=co(t.padding);if(!t.display)return;const s=a0(i.rtl,this.left,this.width),o=this.ctx,l=t.position,C=r.top+n.size/2;let M,P=this.left,O=this.width;if(this.isHorizontal())O=Math.max(...this.lineWidths),M=this.top+C,P=lo(i.align,P,this.right-O);else{const U=this.columnSizes.reduce((X,W)=>Math.max(X,W.height),0);M=C+lo(i.align,this.top,this.bottom-U-i.labels.padding-this._computeTitleHeight())}const L=lo(l,P,P+O);o.textAlign=s.textAlign(tL(l)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=n.string,Nm(o,t.text,L,M,n)}_computeTitleHeight(){const i=this.options.title,t=ma(i.font),n=co(i.padding);return i.display?t.lineHeight+n.height:0}_getLegendItemAt(i,t){let n,r,s;if(Iu(i,this.left,this.right)&&Iu(t,this.top,this.bottom))for(s=this.legendHitBoxes,n=0;nnull!==e&&null!==i&&e.datasetIndex===i.datasetIndex&&e.index===i.index)(r,n);r&&!s&&Gr(t.onLeave,[i,r,this],this),this._hoveredItem=n,n&&!s&&Gr(t.onHover,[i,n,this],this)}else n&&Gr(t.onClick,[i,n,this],this)}}function bJ(e,i){return i*(e.text?e.text.length:0)}var gVt={id:"legend",_element:yJ,start(e,i,t){const n=e.legend=new yJ({ctx:e.ctx,options:t,chart:e});uo.configure(e,n,t),uo.addBox(e,n)},stop(e){uo.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){const n=e.legend;uo.configure(e,n,t),n.options=t},afterUpdate(e){const i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){const n=i.datasetIndex,r=t.chart;r.isDatasetVisible(n)?(r.hide(n),i.hidden=!0):(r.show(n),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:r,color:s,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(w=>{const C=w.controller.getStyle(t?0:void 0),M=co(C.borderWidth);return{text:i[w.index].label,fillStyle:C.backgroundColor,fontColor:s,hidden:!w.visible,lineCap:C.borderCapStyle,lineDash:C.borderDash,lineDashOffset:C.borderDashOffset,lineJoin:C.borderJoinStyle,lineWidth:(M.width+M.height)/4,strokeStyle:C.borderColor,pointStyle:n||C.pointStyle,rotation:C.rotation,textAlign:r||C.textAlign,borderRadius:o&&(l||C.borderRadius),datasetIndex:w.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class RL extends Fu{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=i,this.height=this.bottom=t;const r=Qr(n.text)?n.text.length:1;this._padding=co(n.padding);const s=r*ma(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const i=this.options.position;return"top"===i||"bottom"===i}_drawArgs(i){const{top:t,left:n,bottom:r,right:s,options:o}=this,l=o.align;let C,M,P,w=0;return this.isHorizontal()?(M=lo(l,n,s),P=t+i,C=s-n):("left"===o.position?(M=n+i,P=lo(l,r,t),w=-.5*Kr):(M=s-i,P=lo(l,t,r),w=.5*Kr),C=r-t),{titleX:M,titleY:P,maxWidth:C,rotation:w}}draw(){const i=this.ctx,t=this.options;if(!t.display)return;const n=ma(t.font),s=n.lineHeight/2+this._padding.top,{titleX:o,titleY:l,maxWidth:w,rotation:C}=this._drawArgs(s);Nm(i,t.text,0,0,n,{color:t.color,maxWidth:w,rotation:C,textAlign:tL(t.align),textBaseline:"middle",translation:[o,l]})}}var xVt={id:"title",_element:RL,start(e,i,t){!function vVt(e,i){const t=new RL({ctx:e.ctx,options:i,chart:e});uo.configure(e,t,i),uo.addBox(e,t),e.titleBlock=t}(e,t)},stop(e){uo.removeBox(e,e.titleBlock),delete e.titleBlock},beforeUpdate(e,i,t){const n=e.titleBlock;uo.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ME=new WeakMap;var yVt={id:"subtitle",start(e,i,t){const n=new RL({ctx:e.ctx,options:t,chart:e});uo.configure(e,n,t),uo.addBox(e,n),ME.set(e,n)},stop(e){uo.removeBox(e,ME.get(e)),ME.delete(e)},beforeUpdate(e,i,t){const n=ME.get(e);uo.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const r1={average(e){if(!e.length)return!1;let i,t,n=new Set,r=0,s=0;for(i=0,t=e.length;il+w)/n.size,y:r/s}},nearest(e,i){if(!e.length)return!1;let s,o,l,t=i.x,n=i.y,r=Number.POSITIVE_INFINITY;for(s=0,o=e.length;s-1?e.split("\n"):e}function bVt(e,i){const{element:t,datasetIndex:n,index:r}=i,s=e.getDatasetMeta(n).controller,{label:o,value:l}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[n].data[r],formattedValue:l,dataset:s.getDataset(),dataIndex:r,datasetIndex:n,element:t}}function wJ(e,i){const t=e.chart.ctx,{body:n,footer:r,title:s}=e,{boxWidth:o,boxHeight:l}=i,w=ma(i.bodyFont),C=ma(i.titleFont),M=ma(i.footerFont),P=s.length,O=r.length,L=n.length,U=co(i.padding);let X=U.height,W=0,Z=n.reduce((vt,_t)=>vt+_t.before.length+_t.lines.length+_t.after.length,0);Z+=e.beforeBody.length+e.afterBody.length,P&&(X+=P*C.lineHeight+(P-1)*i.titleSpacing+i.titleMarginBottom),Z&&(X+=L*(i.displayColors?Math.max(l,w.lineHeight):w.lineHeight)+(Z-L)*w.lineHeight+(Z-1)*i.bodySpacing),O&&(X+=i.footerMarginTop+O*M.lineHeight+(O-1)*i.footerSpacing);let rt=0;const st=function(vt){W=Math.max(W,t.measureText(vt).width+rt)};return t.save(),t.font=C.string,_r(e.title,st),t.font=w.string,_r(e.beforeBody.concat(e.afterBody),st),rt=i.displayColors?o+2+i.boxPadding:0,_r(n,vt=>{_r(vt.before,st),_r(vt.lines,st),_r(vt.after,st)}),rt=0,t.font=M.string,_r(e.footer,st),t.restore(),W+=U.width,{width:W,height:X}}function TVt(e,i,t,n){const{x:r,width:s}=t,{width:o,chartArea:{left:l,right:w}}=e;let C="center";return"center"===n?C=r<=(l+w)/2?"left":"right":r<=s/2?C="left":r>=o-s/2&&(C="right"),function _Vt(e,i,t,n){const{x:r,width:s}=n,o=t.caretSize+t.caretPadding;if("left"===e&&r+s+o>i.width||"right"===e&&r-s-o<0)return!0}(C,e,i,t)&&(C="center"),C}function _J(e,i,t){const n=t.yAlign||i.yAlign||function wVt(e,i){const{y:t,height:n}=i;return te.height-n/2?"bottom":"center"}(e,t);return{xAlign:t.xAlign||i.xAlign||TVt(e,i,t,n),yAlign:n}}function TJ(e,i,t,n){const{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:l,yAlign:w}=t,C=r+s,{topLeft:M,topRight:P,bottomLeft:O,bottomRight:L}=Bm(o);let U=function CVt(e,i){let{x:t,width:n}=e;return"right"===i?t-=n:"center"===i&&(t-=n/2),t}(i,l);const X=function SVt(e,i,t){let{y:n,height:r}=e;return"top"===i?n+=t:n-="bottom"===i?r+t:r/2,n}(i,w,C);return"center"===w?"left"===l?U+=C:"right"===l&&(U-=C):"left"===l?U-=Math.max(M,O)+r:"right"===l&&(U+=Math.max(P,L)+r),{x:Ma(U,0,n.width-i.width),y:Ma(X,0,n.height-i.height)}}function IE(e,i,t){const n=co(t.padding);return"center"===i?e.x+e.width/2:"right"===i?e.x+e.width-n.right:e.x+n.left}function CJ(e){return yd([],Ou(e))}function SJ(e,i){const t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e}const EJ={beforeTitle:Mu,title(e){if(e.length>0){const i=e[0],t=i.chart.data.labels,n=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return i.dataset.label||"";if(i.label)return i.label;if(n>0&&i.dataIndex"u"?EJ[i].call(t,n):r}let AJ=(()=>class e extends Fu{static positioners=r1;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new pZ(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=function EVt(e,i,t){return lf(e,{tooltip:i,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=el(r,"beforeTitle",this,t),o=el(r,"title",this,t),l=el(r,"afterTitle",this,t);let w=[];return w=yd(w,Ou(s)),w=yd(w,Ou(o)),w=yd(w,Ou(l)),w}getBeforeBody(t,n){return CJ(el(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return _r(t,o=>{const l={before:[],lines:[],after:[]},w=SJ(r,o);yd(l.before,Ou(el(w,"beforeLabel",this,o))),yd(l.lines,el(w,"label",this,o)),yd(l.after,Ou(el(w,"afterLabel",this,o))),s.push(l)}),s}getAfterBody(t,n){return CJ(el(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=el(r,"beforeFooter",this,t),o=el(r,"footer",this,t),l=el(r,"afterFooter",this,t);let w=[];return w=yd(w,Ou(s)),w=yd(w,Ou(o)),w=yd(w,Ou(l)),w}_createItems(t){const n=this._active,r=this.chart.data,s=[],o=[],l=[];let C,M,w=[];for(C=0,M=n.length;Ct.filter(P,O,L,r))),t.itemSort&&(w=w.sort((P,O)=>t.itemSort(P,O,r))),_r(w,P=>{const O=SJ(t.callbacks,P);s.push(el(O,"labelColor",this,P)),o.push(el(O,"labelPointStyle",this,P)),l.push(el(O,"labelTextColor",this,P))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=w,w}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let o,l=[];if(s.length){const w=r1[r.position].call(this,s,this._eventPosition);l=this._createItems(r),this.title=this.getTitle(l,r),this.beforeBody=this.getBeforeBody(l,r),this.body=this.getBody(l,r),this.afterBody=this.getAfterBody(l,r),this.footer=this.getFooter(l,r);const C=this._size=wJ(this,r),M=Object.assign({},w,C),P=_J(this.chart,r,M),O=TJ(r,M,P,this.chart);this.xAlign=P.xAlign,this.yAlign=P.yAlign,o={opacity:1,x:O.x,y:O.y,width:C.width,height:C.height,caretX:w.x,caretY:w.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=l,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,s){const o=this.getCaretPosition(t,r,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:s,yAlign:o}=this,{caretSize:l,cornerRadius:w}=r,{topLeft:C,topRight:M,bottomLeft:P,bottomRight:O}=Bm(w),{x:L,y:U}=t,{width:X,height:W}=n;let Z,rt,st,vt,_t,Mt;return"center"===o?(_t=U+W/2,"left"===s?(Z=L,rt=Z-l,vt=_t+l,Mt=_t-l):(Z=L+X,rt=Z+l,vt=_t-l,Mt=_t+l),st=Z):(rt="left"===s?L+Math.max(C,P)+l:"right"===s?L+X-Math.max(M,O)-l:this.caretX,"top"===o?(vt=U,_t=vt-l,Z=rt-l,st=rt+l):(vt=U+W,_t=vt+l,Z=rt+l,st=rt-l),Mt=vt),{x1:Z,x2:rt,x3:st,y1:vt,y2:_t,y3:Mt}}drawTitle(t,n,r){const s=this.title,o=s.length;let l,w,C;if(o){const M=a0(r.rtl,this.x,this.width);for(t.x=IE(this,r.titleAlign,r),n.textAlign=M.textAlign(r.titleAlign),n.textBaseline="middle",l=ma(r.titleFont),w=r.titleSpacing,n.fillStyle=r.titleColor,n.font=l.string,C=0;C0!==st)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Yb(t,{x:W,y:X,w:M,h:C,radius:rt}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),Yb(t,{x:Z,y:X+1,w:M-2,h:C-2,radius:rt}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(W,X,M,C),t.strokeRect(W,X,M,C),t.fillStyle=l.backgroundColor,t.fillRect(Z,X+1,M-2,C-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:o,bodyAlign:l,displayColors:w,boxHeight:C,boxWidth:M,boxPadding:P}=r,O=ma(r.bodyFont);let L=O.lineHeight,U=0;const X=a0(r.rtl,this.x,this.width),W=function(pt){n.fillText(pt,X.x(t.x+U),t.y+L/2),t.y+=L+o},Z=X.textAlign(l);let rt,st,vt,_t,Mt,ft,dt;for(n.textAlign=l,n.textBaseline="middle",n.font=O.string,t.x=IE(this,Z,r),n.fillStyle=r.bodyColor,_r(this.beforeBody,W),U=w&&"right"!==Z?"center"===l?M/2+P:M+2+P:0,_t=0,ft=s.length;_t0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,s=r&&r.x,o=r&&r.y;if(s||o){const l=r1[t.position].call(this,this._active,this._eventPosition);if(!l)return;const w=this._size=wJ(this,t),C=Object.assign({},l,this._size),M=_J(n,t,C),P=TJ(t,C,M,n);(s._to!==P.x||o._to!==P.y)&&(this.xAlign=M.xAlign,this.yAlign=M.yAlign,this.width=w.width,this.height=w.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,P))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const l=co(n.padding);n.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,s,n),aZ(t,n.textDirection),o.y+=l.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),oZ(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,s=t.map(({datasetIndex:w,index:C})=>{const M=this.chart.getDatasetMeta(w);if(!M)throw new Error("Cannot find a dataset at index "+w);return{datasetIndex:w,element:M.data[C],index:C}}),o=!oE(r,s),l=this._positionChanged(s,n);(o||l)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],l=this._getActiveElements(t,o,n,r),w=this._positionChanged(l,t),C=n||!oE(l,o)||w;return C&&(this._active=l,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),C}_getActiveElements(t,n,r,s){const o=this.options;if("mouseout"===t.type)return[];if(!s)return n.filter(w=>this.chart.data.datasets[w.datasetIndex]&&void 0!==this.chart.getDatasetMeta(w.datasetIndex).controller.getParsed(w.index));const l=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&l.reverse(),l}_positionChanged(t,n){const{caretX:r,caretY:s,options:o}=this,l=r1[o.position].call(this,t,n);return!1!==l&&(r!==l.x||s!==l.y)}})();var DVt=Object.freeze({__proto__:null,Colors:U5t,Decimation:W5t,Filler:dVt,Legend:gVt,SubTitle:yVt,Title:xVt,Tooltip:{id:"tooltip",_element:AJ,positioners:r1,afterInit(e,i,t){t&&(e.tooltip=new AJ({chart:e,options:t}))},beforeUpdate(e,i,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,i,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const i=e.tooltip;if(i&&i._willRender()){const t={tooltip:i};if(!1===e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0}))return;i.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,i){e.tooltip&&e.tooltip.handleEvent(i.event,i.replay,i.inChartArea)&&(i.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,i)=>i.bodyFont.size,boxWidth:(e,i)=>i.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:EJ},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});function DJ(e){const i=this.getLabels();return e>=0&&eclass e extends Hm{static id="category";static defaults={ticks:{callback:DJ}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:o}of n)r[s]===o&&r.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Zn(t))return null;const r=this.getLabels();return((e,i)=>null===e?null:Ma(Math.round(e),0,i))(n=isFinite(n)&&r[n]===t?n:function IVt(e,i,t,n){const r=e.indexOf(i);return-1===r?((e,i,t,n)=>("string"==typeof i?(t=e.push(i)-1,n.unshift({index:t,label:i})):isNaN(i)&&(t=null),t))(e,i,t,n):r!==e.lastIndexOf(i)?t:r}(r,t,mn(n,t),this._addedLabels),r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,s=[];let o=this.getLabels();o=0===t&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let l=t;l<=n;l++)s.push({value:l});return s}getLabelForValue(t){return DJ.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}})();function MJ(e,i,{horizontal:t,minRotation:n}){const r=Ac(n),s=(t?Math.sin(r):Math.cos(r))||.001;return Math.min(i/s,.75*i*(""+e).length)}class RE extends Hm{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,t){return Zn(i)||("number"==typeof i||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){const{beginAtZero:i}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this;const o=w=>r=t?r:w,l=w=>s=n?s:w;if(i){const w=vd(r),C=vd(s);w<0&&C<0?l(0):w>0&&C>0&&o(0)}if(r===s){let w=0===s?1:Math.abs(.05*s);l(s+w),i||o(r-w)}this.min=r,this.max=s}getTickLimit(){const i=this.options.ticks;let r,{maxTicksLimit:t,stepSize:n}=i;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const i=this.options,t=i.ticks;let n=this.getTickLimit();n=Math.max(2,n);const o=function PVt(e,i){const t=[],{bounds:r,step:s,min:o,max:l,precision:w,count:C,maxTicks:M,maxDigits:P,includeBounds:O}=e,L=s||1,U=M-1,{min:X,max:W}=i,Z=!Zn(o),rt=!Zn(l),st=!Zn(C),vt=(W-X)/(P+1);let Mt,ft,dt,pt,_t=RK((W-X)/U/L)*L;if(_t<1e-14&&!Z&&!rt)return[{value:X},{value:W}];pt=Math.ceil(W/_t)-Math.floor(X/_t),pt>U&&(_t=RK(pt*_t/U/L)*L),Zn(w)||(Mt=Math.pow(10,w),_t=Math.ceil(_t*Mt)/Mt),"ticks"===r?(ft=Math.floor(X/_t)*_t,dt=Math.ceil(W/_t)*_t):(ft=X,dt=W),Z&&rt&&s&&function y4t(e,i){const t=Math.round(e);return t-i<=e&&t+i>=e}((l-o)/s,_t/1e3)?(pt=Math.round(Math.min((l-o)/_t,M)),_t=(l-o)/pt,ft=o,dt=l):st?(ft=Z?o:ft,dt=rt?l:dt,pt=C-1,_t=(dt-ft)/pt):(pt=(dt-ft)/_t,pt=Gb(pt,Math.round(pt),_t/1e3)?Math.round(pt):Math.ceil(pt));const bt=Math.max(PK(_t),PK(ft));Mt=Math.pow(10,Zn(w)?bt:w),ft=Math.round(ft*Mt)/Mt,dt=Math.round(dt*Mt)/Mt;let Tt=0;for(Z&&(O&&ft!==o?(t.push({value:o}),ftl)break;t.push({value:Et})}return rt&&O&&dt!==l?t.length&&Gb(t[t.length-1].value,l,MJ(l,vt,e))?t[t.length-1].value=l:t.push({value:l}):(!rt||dt===l)&&t.push({value:dt}),t}({maxTicks:n,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===i.bounds&&kK(o,this,"value"),i.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const i=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&i.length){const r=(n-t)/Math.max(i.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(i){return Xb(i,this.chart.options.locale,this.options.ticks.format)}}const s1=e=>Math.floor(af(e)),Wm=(e,i)=>Math.pow(10,s1(e)+i);function IJ(e){return e/Math.pow(10,s1(e))==1}function RJ(e,i,t){const n=Math.pow(10,t),r=Math.floor(e/n);return Math.ceil(i/n)-r}function kL(e){const i=e.ticks;if(i.display&&e.display){const t=co(i.backdropPadding);return mn(i.font&&i.font.size,as.font.size)+t.height}return 0}function BVt(e,i,t){return t=Qr(t)?t:[t],{w:L4t(e,i.string,t),h:t.length*i.lineHeight}}function kJ(e,i,t,n,r){return e===n||e===r?{start:i-t/2,end:i+t/2}:er?{start:i-t,end:i}:{start:i,end:i+t}}function UVt(e,i,t,n,r){const s=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t));let l=0,w=0;n.starti.r&&(l=(n.end-i.r)/s,e.r=Math.max(e.r,i.r+l)),r.starti.b&&(w=(r.end-i.b)/o,e.b=Math.max(e.b,i.b+w))}function zVt(e,i,t){const n=e.drawingArea,{extra:r,additionalAngle:s,padding:o,size:l}=t,w=e.getPointPosition(i,n+r+o,s),C=Math.round(ZO(El(w.angle+Os))),M=function jVt(e,i,t){return 90===t||270===t?e-=i/2:(t>270||t<90)&&(e-=i),e}(w.y,l.h,C),P=function WVt(e){return 0===e||180===e?"center":e<180?"left":"right"}(C),O=function XVt(e,i,t){return"right"===t?e-=i:"center"===t&&(e-=i/2),e}(w.x,l.w,P);return{visible:!0,x:w.x,y:M,textAlign:P,left:O,top:M,right:O+l.w,bottom:M+l.h}}function GVt(e,i){if(!i)return!0;const{left:t,top:n,right:r,bottom:s}=e;return!(ku({x:t,y:n},i)||ku({x:t,y:s},i)||ku({x:r,y:n},i)||ku({x:r,y:s},i))}function YVt(e,i,t){const{left:n,top:r,right:s,bottom:o}=t,{backdropColor:l}=i;if(!Zn(l)){const w=Bm(i.borderRadius),C=co(i.backdropPadding);e.fillStyle=l;const M=n-C.left,P=r-C.top,O=s-n+C.width,L=o-r+C.height;Object.values(w).some(U=>0!==U)?(e.beginPath(),Yb(e,{x:M,y:P,w:O,h:L,radius:w}),e.fill()):e.fillRect(M,P,O,L)}}function PJ(e,i,t,n){const{ctx:r}=e;if(t)r.arc(e.xCenter,e.yCenter,i,0,Zr);else{let s=e.getPointPosition(0,i);r.moveTo(s.x,s.y);for(let o=1;o=i?t[n]:t[r]]=!0}}else e[i]=!0}function BJ(e,i,t){const n=[],r={},s=i.length;let o,l;for(o=0;o=0&&(i[w].major=!0);return i}(e,n,r,t):n}let PL=(()=>class e extends Hm{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),s=this._adapter=new eBt__date(t.adapters.date);s.init(n),Ub(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return void 0===t?null:OJ(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:s,max:o,minDefined:l,maxDefined:w}=this.getUserBounds();function C(M){!l&&!isNaN(M.min)&&(s=Math.min(s,M.min)),!w&&!isNaN(M.max)&&(o=Math.max(o,M.max))}(!l||!w)&&(C(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&C(this.getMinMax(!1))),s=bs(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),o=bs(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,s="labels"===r.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,w=function T4t(e,i,t){let n=0,r=e.length;for(;nn&&e[r-1]>t;)r--;return n>0||r=il.indexOf(t);s--){const o=il[s];if(kE[o].common&&e._adapter.diff(r,n,o)>=i-1)return o}return il[t?il.indexOf(t):0]}(this,w.length,n.minUnit,this.min,this.max)),this._majorUnit=r.major.enabled&&"year"!==this._unit?function qVt(e){for(let i=il.indexOf(e)+1,t=il.length;i+t.value))}initOffsets(t=[]){let s,o,n=0,r=0;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),n=1===t.length?1-s:(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),r=1===t.length?o:(o-this.getDecimalForValue(t[t.length-2]))/2);const l=t.length<3?.5:.25;n=Ma(n,0,l),r=Ma(r,0,l),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,s=this.options,o=s.time,l=o.unit||LJ(o.minUnit,n,r,this._getLabelCapacity(n)),w=mn(s.ticks.stepSize,1),C="week"===l&&o.isoWeekday,M=n0(C)||!0===C,P={};let L,U,O=n;if(M&&(O=+t.startOf(O,"isoWeek",C)),O=+t.startOf(O,M?"day":l),t.diff(r,n,l)>1e5*w)throw new Error(n+" and "+r+" are too far apart with stepSize of "+w+" "+l);const X="data"===s.ticks.source&&this.getDataTimestamps();for(L=O,U=0;L+W)}getLabelForValue(t){const r=this.options.time;return this._adapter.format(t,r.tooltipFormat?r.tooltipFormat:r.displayFormats.datetime)}format(t,n){return this._adapter.format(t,n||this.options.time.displayFormats[this._unit])}_tickFormatFunction(t,n,r,s){const o=this.options,l=o.ticks.callback;if(l)return Gr(l,[t,n,r],this);const w=o.time.displayFormats,C=this._unit,M=this._majorUnit,O=M&&w[M],L=r[n];return this._adapter.format(t,s||(M&&O&&L&&L.major?O:C&&w[C]))}generateTickLabels(t){let n,r,s;for(n=0,r=t.length;n0?w:1}getDataTimestamps(){let n,r,t=this._cache.data||[];if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n=e[n].pos&&i<=e[r].pos&&({lo:n,hi:r}=Ru(e,"pos",i)),({pos:s,time:l}=e[n]),({pos:o,time:w}=e[r])):(i>=e[n].time&&i<=e[r].time&&({lo:n,hi:r}=Ru(e,"time",i)),({time:s,pos:l}=e[n]),({time:o,pos:w}=e[r]));const C=o-s;return C?l+(w-l)*(i-s)/C:l}const r8t=["radarCanvas"];function s8t(e,i){if(1&e&&(tt(0,"td"),ut(1),sa(2,"titlecase"),et()),2&e){const t=Ct(2).$implicit,n=Ct(2).$implicit,r=Ct();Ti("rowspan",r.getKpaRowSpan(r.maturityResponse,n,t)),lt(),Ye(" ",xc(2,2,t)," ")}}function a8t(e,i){if(1&e&&(tt(0,"td"),ut(1),sa(2,"number"),et()),2&e){const t=Ct(2).$implicit,n=Ct(2).$implicit,r=Ct();Ti("rowspan",r.getKpaRowSpan(r.maturityResponse,n,t)),lt(),Ye(" ",Xd(2,2,r.calculateAverage(r.getQuestions(r.maturityResponse,n,t)),"1.2-2")," ")}}function o8t(e,i){if(1&e&&(Wi(0),tt(1,"tr"),Gt(2,s8t,3,4,"td",5)(3,a8t,3,5,"td",5),et(),Xi()),2&e){const t=i.index,n=Ct(4);lt(2),yt("ngIf",n.isFirstRowInKpa(t)),lt(),yt("ngIf",n.isFirstRowInKpa(t))}}function l8t(e,i){if(1&e&&(Wi(0),Gt(1,o8t,4,2,"ng-container",3),sa(2,"keyvalue"),Xi()),2&e){const t=i.$implicit,n=Ct(2).$implicit,r=Ct();lt(),yt("ngForOf",xc(2,1,r.getQuestions(r.maturityResponse,n,t)))}}function c8t(e,i){if(1&e&&(Wi(0),Gt(1,l8t,3,3,"ng-container",3),Xi()),2&e){const t=Ct().$implicit,n=Ct();lt(),yt("ngForOf",n.getKpas(n.maturityResponse,t))}}function d8t(e,i){if(1&e&&(Wi(0),Gt(1,c8t,2,1,"ng-container",5),Xi()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",t==n.maturityResponse.selectedStakeholder)}}TL.register(tBt,P5t,DVt,Object.freeze({__proto__:null,CategoryScale:kVt,LinearScale:class FVt extends RE{static id="linear";static defaults={ticks:{callback:uE.formatters.numeric}};determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=bs(i)?i:0,this.max=bs(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const i=this.isHorizontal(),t=i?this.width:this.height,n=Ac(this.options.ticks.minRotation),r=(i?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,s.lineHeight/r))}getPixelForValue(i){return null===i?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}},LogarithmicScale:class NVt extends Hm{static id="logarithmic";static defaults={ticks:{callback:uE.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,t){const n=RE.prototype.parse.apply(this,[i,t]);if(0!==n)return bs(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=bs(i)?Math.max(0,i):null,this.max=bs(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!bs(this._userMin)&&(this.min=i===Wm(this.min,0)?Wm(this.min,-1):Wm(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:i,maxDefined:t}=this.getUserBounds();let n=this.min,r=this.max;const s=l=>n=i?n:l,o=l=>r=t?r:l;n===r&&(n<=0?(s(1),o(10)):(s(Wm(n,-1)),o(Wm(r,1)))),n<=0&&s(Wm(r,-1)),r<=0&&o(Wm(n,1)),this.min=n,this.max=r}buildTicks(){const i=this.options,n=function LVt(e,{min:i,max:t}){i=Sl(e.min,i);const n=[],r=s1(i);let s=function OVt(e,i){let n=s1(i-e);for(;RJ(e,i,n)>10;)n++;for(;RJ(e,i,n)<10;)n--;return Math.min(n,s1(e))}(i,t),o=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),w=r>s?Math.pow(10,r):0,C=Math.round((i-w)*o)/o,M=Math.floor((i-w)/l/10)*l*10;let P=Math.floor((C-M)/Math.pow(10,s)),O=Sl(e.min,Math.round((w+M+P*Math.pow(10,s))*o)/o);for(;O=10?P=P<15?15:20:P++,P>=20&&(s++,P=2,o=s>=0?1:o),O=Math.round((w+M+P*Math.pow(10,s))*o)/o;const L=Sl(e.max,O);return n.push({value:L,major:IJ(L),significand:P}),n}({min:this._userMin,max:this._userMax},this);return"ticks"===i.bounds&&kK(n,this,"value"),i.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(i){return void 0===i?"0":Xb(i,this.chart.options.locale,this.options.ticks.format)}configure(){const i=this.min;super.configure(),this._startValue=af(i),this._valueRange=af(this.max)-af(i)}getPixelForValue(i){return(void 0===i||0===i)&&(i=this.min),null===i||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(af(i)-this._startValue)/this._valueRange)}getValueForPixel(i){const t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange)}},RadialLinearScale:class ZVt extends RE{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:uE.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:i=>i,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const i=this._padding=co(kL(this.options)/2),t=this.width=this.maxWidth-i.width,n=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+n/2+i.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!1);this.min=bs(i)&&!isNaN(i)?i:0,this.max=bs(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/kL(this.options))}generateTickLabels(i){RE.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,n)=>{const r=Gr(this.options.pointLabels.callback,[t,n],this);return r||0===r?r:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){const i=this.options;i.display&&i.pointLabels.display?function VVt(e){const i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},i),n=[],r=[],s=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?Kr/s:0;for(let w=0;w=0&&i=0;r--){const s=e._pointLabelItems[r];if(!s.visible)continue;const o=n.setContext(e.getPointLabelContext(r));YVt(t,o,s);const l=ma(o.font),{x:w,y:C,textAlign:M}=s;Nm(t,e._pointLabels[r],w,C+l.lineHeight/2,l,{color:o.color,textAlign:M,textBaseline:"middle"})}}(this,o),r.display&&this.ticks.forEach((M,P)=>{if(0!==P||0===P&&this.min<0){w=this.getDistanceFromCenterForValue(M.value);const O=this.getContext(P),L=r.setContext(O),U=s.setContext(O);!function QVt(e,i,t,n,r){const s=e.ctx,o=i.circular,{color:l,lineWidth:w}=i;!o&&!n||!l||!w||t<0||(s.save(),s.strokeStyle=l,s.lineWidth=w,s.setLineDash(r.dash||[]),s.lineDashOffset=r.dashOffset,s.beginPath(),PJ(e,t,o,n),s.closePath(),s.stroke(),s.restore())}(this,L,w,o,U)}}),n.display){for(i.save(),l=o-1;l>=0;l--){const M=n.setContext(this.getPointLabelContext(l)),{color:P,lineWidth:O}=M;!O||!P||(i.lineWidth=O,i.strokeStyle=P,i.setLineDash(M.borderDash),i.lineDashOffset=M.borderDashOffset,w=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),C=this.getPointPosition(l,w),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(C.x,C.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){const i=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let s,o;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(r),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((l,w)=>{if(0===w&&this.min>=0&&!t.reverse)return;const C=n.setContext(this.getContext(w)),M=ma(C.font);if(s=this.getDistanceFromCenterForValue(this.ticks[w].value),C.showLabelBackdrop){i.font=M.string,o=i.measureText(l.label).width,i.fillStyle=C.backdropColor;const P=co(C.backdropPadding);i.fillRect(-o/2-P.left,-s-M.size/2-P.top,o+P.width,M.size+P.height)}Nm(i,l.label,0,-s,M,{color:C.color,strokeColor:C.textStrokeColor,strokeWidth:C.textStrokeWidth})}),i.restore()}drawTitle(){}},TimeScale:PL,TimeSeriesScale:class e8t extends PL{static id="timeseries";static defaults=PL.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=PE(t,this.min),this._tableRange=PE(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){const{min:t,max:n}=this,r=[],s=[];let o,l,w,C,M;for(o=0,l=i.length;o=t&&C<=n&&r.push(C);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(o=0,l=r.length;or-s)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return i=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,i=this._cache.all=i,i}getDecimalForValue(i){return(PE(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){const t=this._offsets,n=this.getDecimalForPixel(i)/t.factor-t.end;return PE(this._table,n*this._tableRange+this._minPos,!0)}}}));let u8t=(()=>{class e{ngAfterViewInit(){this.maturityResponse&&this.generateChart()}ngOnChanges(t){this.radarCanvas&&t.maturityResponse&&this.maturityResponse&&this.generateChart()}generateChart(){this.chart&&this.chart.destroy();const t={};Object.entries(this.maturityResponse).forEach(([s,o])=>{const[l,w,C]=s.split(".");l&&w&&C&&l===this.maturityResponse.selectedStakeholder&&(t[w]=t[w]||{sum:0,count:0},t[w].sum+=o||0,t[w].count+=1)});const n=Array.from(new Set(Object.keys(this.maturityResponse).filter(s=>s.startsWith(this.maturityResponse.selectedStakeholder)).map(s=>s.split(".")[1]))),r=[{label:this.maturityResponse.selectedStakeholder,data:n.map(s=>t[s]?t[s].sum/t[s].count:0),backgroundColor:"rgba(54, 162, 235, 0.3)",borderColor:"rgba(54, 162, 235, 1)",pointBackgroundColor:"rgba(54, 162, 235, 1)",pointBorderColor:"#fff"}];this.chart=new TL(this.radarCanvas.nativeElement,{type:"radar",data:{labels:n,datasets:r},options:{aspectRatio:2,responsive:!0,plugins:{legend:{position:"top"},title:{display:!0,text:"Maturity Results by Stakeholder and KPA"}},scales:{r:{pointLabels:{padding:5},suggestedMin:0,suggestedMax:5,ticks:{stepSize:1}}}}})}getStakeholders(t){return Array.from(new Set(Object.keys(t).map(n=>n.split(".")[0])))}getKpas(t,n){return Array.from(new Set(Object.keys(t).filter(r=>r.startsWith(n)).map(r=>r.split(".")[1])))}getQuestions(t,n,r){return Object.keys(t).filter(s=>s.startsWith(`${n}.${r}`)).reduce((s,o)=>(s[o.split(".").slice(2).join(".")]=t[o],s),{})}getStakeholderRowSpan(t,n){return this.getKpas(t,n).reduce((s,o)=>s+this.getKpaRowSpan(t,n,o),0)}getKpaRowSpan(t,n,r){return Object.keys(t).filter(s=>s.startsWith(`${n}.${r}`)).length}isFirstRowInStakeholder(t,n,r){const s=this.getKpas(this.maturityResponse,n).indexOf(r);return 0===t&&0===s}isFirstRowInKpa(t){return 0===t}calculateAverage(t){const n=Object.values(t).filter(s=>null!==s),r=n.reduce((s,o)=>s+o,0);return n.length>0?r/n.length:0}calculateOverallAverage(t){const n={};for(const o in t)if(t.hasOwnProperty(o)&&null!==t[o]&&"selectedStakeholder"!==o){const l=o.split(".")[1];n[l]||(n[l]=[]),n[l].push(t[o])}const r=Object.keys(n).map(o=>{const l=n[o];return l.reduce((w,C)=>w+C,0)/l.length});return r.reduce((o,l)=>o+l,0)/r.length}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-maturity-results"]],viewQuery:function(n,r){if(1&n&&Mi(r8t,5),2&n){let s;Be(s=Ve())&&(r.radarCanvas=s.first)}},inputs:{maturityResponse:"maturityResponse"},features:[tr],decls:14,vars:2,consts:[["radarCanvas",""],[1,"centered-box"],[1,"bordered-table"],[4,"ngFor","ngForOf"],[1,"chart-container"],[4,"ngIf"]],template:function(n,r){1&n&&(tt(0,"h3",1),ut(1),et(),tt(2,"table",2)(3,"thead")(4,"tr")(5,"th"),ut(6,"KPA"),et(),tt(7,"th"),ut(8,"Result"),et()()(),tt(9,"tbody"),Gt(10,d8t,2,1,"ng-container",3),et()(),tt(11,"div",4),we(12,"canvas",null,0),et()),2&n&&(lt(),Ye("Overall calculated maturity score: ",r.calculateOverallAverage(r.maturityResponse),""),lt(9),yt("ngForOf",r.getStakeholders(r.maturityResponse)))},dependencies:[gs,Ms,DU,SU,EU],styles:[".bordered-table[_ngcontent-%COMP%]{border:1px solid #000;border-collapse:collapse;width:100%}.bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:1px solid #000;padding:4px}.chart-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.centered-box[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:2px solid #000;padding:10px;margin:20px auto;width:-moz-fit-content;width:fit-content;box-shadow:0 0 10px #0000001a}"]})}return e})();function h8t(e,i){if(1&e&&(tt(0,"mat-radio-button",12),ut(1),et()),2&e){const t=i.$implicit;yt("value",t.id),lt(),Ye(" ",t.name," ")}}function f8t(e,i){1&e&&(tt(0,"div",13),ut(1," Please select a stakeholder. "),et())}function m8t(e,i){if(1&e){const t=ve();tt(0,"div",5)(1,"div",6)(2,"h2"),ut(3,"Select Stakeholder"),et(),tt(4,"mat-radio-group",7),Gt(5,h8t,2,2,"mat-radio-button",8),et(),Gt(6,f8t,2,0,"div",9),tt(7,"div",10)(8,"button",11),Vt("click",function(){return Ut(t),zt(Ct().onStakeholderSelected())}),ut(9," Start "),et()()()()}if(2&e){const t=Ct();lt(),yt("formGroup",t.responseForm)("@fadeInOut",void 0),lt(3),yt("formControl",t.currentControl),lt(),yt("ngForOf",t.maturityQuestions.stakeHolders),lt(),yt("ngIf",(null==t.responseForm.controls.selectedStakeholder?null:t.responseForm.controls.selectedStakeholder.invalid)&&(null==t.responseForm.controls.selectedStakeholder?null:t.responseForm.controls.selectedStakeholder.touched)),lt(2),yt("disabled",t.responseForm.controls.selectedStakeholder.invalid)}}function p8t(e,i){1&e&&(tt(0,"mat-icon",23),ut(1," help_outline "),et()),2&e&&yt("matTooltip",Ct().$implicit.example)}function g8t(e,i){if(1&e&&(tt(0,"mat-radio-button",12)(1,"div",21),ut(2),Gt(3,p8t,2,1,"mat-icon",22),et()()),2&e){const t=i.$implicit;yt("value",t.score),lt(2),Ye(" ",t.text," "),lt(),yt("ngIf",t.example)}}function v8t(e,i){1&e&&(tt(0,"div",13),ut(1," Please select an option for this question. "),et())}function x8t(e,i){if(1&e){const t=ve();tt(0,"button",11),Vt("click",function(){return Ut(t),zt(Ct(3).goToNextQuestion())}),ut(1," Next "),et()}2&e&&yt("disabled",Ct(3).currentControl.invalid)}function y8t(e,i){if(1&e){const t=ve();tt(0,"button",24),Vt("click",function(){return Ut(t),zt(Ct(3).submitStakeholderResponses())}),ut(1," Submit "),et()}2&e&&yt("disabled",Ct(3).currentControl.invalid)}function b8t(e,i){if(1&e){const t=ve();tt(0,"div",6)(1,"h2"),ut(2),et(),we(3,"mat-progress-bar",15),tt(4,"div",16),ut(5),et(),tt(6,"h3"),ut(7),et(),tt(8,"p",17),ut(9),et(),tt(10,"mat-radio-group",7),Gt(11,g8t,4,3,"mat-radio-button",8),et(),Gt(12,v8t,2,0,"div",9),tt(13,"div",10)(14,"button",11),Vt("click",function(){return Ut(t),zt(Ct(2).goToPreviousQuestion())}),ut(15," Back "),et(),Gt(16,x8t,2,1,"button",18)(17,y8t,2,1,"button",19),et(),tt(18,"div",10)(19,"button",20),Vt("click",function(){return Ut(t),zt(Ct(2).startOver())}),ut(20," Restart assessment "),et()()()}if(2&e){const t=Ct(2);yt("formGroup",t.responseForm)("@fadeInOut",void 0),lt(2),Ye("Stakeholder: ",t.allQuestions[t.currentQuestionIndex].stakeholderName,""),lt(),yt("value",(t.currentQuestionIndex+1)/(t.allQuestions.length+1)*100),lt(2),Zc("Question ",t.currentQuestionIndex+1," of ",t.allQuestions.length,""),lt(2),Ye("Key Process Area: ",t.allQuestions[t.currentQuestionIndex].kpaName,""),lt(2),Ze(t.allQuestions[t.currentQuestionIndex].question.question),lt(),yt("formControl",t.currentControl),lt(),yt("ngForOf",t.allQuestions[t.currentQuestionIndex].question.options),lt(),yt("ngIf",(null==t.currentControl?null:t.currentControl.invalid)&&(null==t.currentControl?null:t.currentControl.touched)),lt(2),yt("disabled",t.currentQuestionIndex<1),lt(2),yt("ngIf",t.currentQuestionIndex{class e{constructor(t,n,r){this.http=t,this.fb=n,this.dialog=r,this.maturityQuestions={},this.allQuestions=[],this.currentQuestionIndex=-1,this.selectedStakeholder=null,this.responseForm=this.fb.group({selectedStakeholder:new Va(null,vu.required)}),this.currentControl=this.responseForm.controls.selectedStakeholder}ngOnInit(){var t=this;return de(function*(){t.maturityQuestions=yield Ca(t.http.get("assets/maturity/maturityLevels.json")),t.initializeForm()})()}initializeForm(){this.responseForm=this.fb.group({selectedStakeholder:new Va(null,vu.required)}),this.currentControl=this.responseForm.controls.selectedStakeholder,this.maturityQuestions.stakeHolders.forEach(t=>{t.kpas.forEach(n=>{n.questions.forEach(r=>{const s=[t.id,n.id,r.id].join(".");this.responseForm.addControl(s,new Va(null,vu.required))})})})}onStakeholderSelected(){const t=this.responseForm.get("selectedStakeholder")?.value;this.selectedStakeholder=this.maturityQuestions.stakeHolders.find(n=>n.id===t),this.flattenQuestions(),this.currentQuestionIndex=0,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath]}flattenQuestions(){this.allQuestions=[],this.selectedStakeholder&&this.selectedStakeholder.kpas.forEach(t=>{t.questions.forEach(n=>{const r=[this.selectedStakeholder.id,t.id,n.id].join(".");this.allQuestions.push({stakeholderName:this.selectedStakeholder.name,kpaName:t.name,question:n,questionFullPath:r})})})}goToNextQuestion(){this.currentQuestionIndex0&&(this.currentQuestionIndex--,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath])}startOver(){this.currentQuestionIndex=-1,this.responseForm.reset(),this.currentControl=this.responseForm.controls.selectedStakeholder}uploadFile(t){if(1!==t.target.files.length)console.error("No file selected");else{const n=new FileReader;n.onloadend=r=>{if(n.result){const s=JSON.parse(n.result?.toString());console.log("Uploaded version:",s),this.maturityQuestions=s}},n.readAsText(t.target.files[0])}}submitStakeholderResponses(){this.currentQuestionIndex++}getStakeholderFormGroup(t){return this.responseForm.get(t)}getUnansweredCount(t){let n=0;const r=this.responseForm.get(t);return r&&Object.keys(r.controls).forEach(s=>{const o=r.get(s);o&&Object.keys(o.controls).forEach(l=>{const w=o.get(l);w&&w.invalid&&n++})}),n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd),mt(NC),mt(lm))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-maturity-main"]],decls:8,vars:3,consts:[["fileInput",""],[1,"flex","flex-row","gap-4","justify-end","flex-wrap","p-2"],["hidden","","type","file","id","file",3,"change"],["mat-flat-button","","color","accent",3,"click"],["class","question-flow-container",4,"ngIf"],[1,"question-flow-container"],[1,"question-container",3,"formGroup"],[1,"options-container",3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["class","error-message",4,"ngIf"],[1,"button-container"],["mat-flat-button","","color","primary",3,"click","disabled"],[3,"value"],[1,"error-message"],["class","question-container",3,"formGroup",4,"ngIf"],["mode","determinate",1,"progress-bar",3,"value"],[1,"progress-message"],[1,"question-text"],["mat-flat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"mat-radio-label-content"],["matTooltipPosition","right",3,"matTooltip",4,"ngIf"],["matTooltipPosition","right",3,"matTooltip"],["mat-flat-button","","color","accent",3,"click","disabled"],[1,"question-container"],[3,"maturityResponse"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1)(1,"input",2,0),Vt("change",function(l){return Ut(s),zt(r.uploadFile(l))}),et(),tt(3,"button",3),Vt("click",function(){return Ut(s),zt(qi(2).click())}),ut(4,"Load Maturity Spec"),et()(),Gt(5,m8t,10,6,"div",4)(6,w8t,2,1,"div",4)(7,_8t,12,3,"div",4)}2&n&&(lt(5),yt("ngIf",-1===r.currentQuestionIndex),lt(),yt("ngIf",r.currentQuestionIndex>=0&&r.currentQuestionIndex *",[an(300)])])]}})}return e})(),VJ=(()=>{class e{constructor(){this.demos=[{name:"Clinical User Interface Demo",subtitle:"Clinical demo",type:"external",url:"http://snomed.org/ui",description:"A simulation of clinical data entry on an EHR using SNOMED FHIR Terminology services"},{name:"Allergies",subtitle:"Clinical demo",type:"internal",url:"/allergies",description:"A SNOMED / FHIR implementation demo of recording Allergy / Intollerance details, from Allergies Clinical Reference Group"},{name:"Terminology Bindings Sandbox",subtitle:"Learning demo",type:"internal",url:"/sandbox",description:"A sandbox for learning and testing terminology bindings"},{name:"SNOMED Maps Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-icd-maps",description:"A SNOMED / ICD-10 maps demonstration, including complex map rules execution"},{name:"Post-coordination Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-postcoordination",description:"A SNOMED post-coordination demonstration, with new prototype Postcoordination Terminology server SNOWSTORM X"},{name:"IPS Terminology Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-ips/",description:"A demonstration of the International Patient Summary (IPS) terminology, including the IPS SNOMED CT refset"},{name:"SNOMED & FHIR Questionnaires Manager Application",subtitle:"Application",type:"internal",url:"/questionnaires",description:"An application to manage a FHIR Questionnaires repository, with SNOMED CT bindings"},{name:"SNOMED & FHIR Questionnaires Utilities",subtitle:"Utilities",type:"internal",url:"/questionnaires",queryParams:{utility:!0},description:"Utilities for working with FHIR Questionnaires, including SNOMED CT bindings"},{name:"Context Representation Transformations",subtitle:"Learning demo",type:"internal",url:"/context",description:"A demonstration of the transformation of context representations from SNOMED to FHIR Resources"},{name:"SNOMED and LLMs (AI Demo)",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/openai-demo/",description:"This demo uses OpenAI ChatGPT API to demonstrate the use of SNOMED CT with Language Model Models (LLMs). A developer key for the OpenAI API is required."},{name:"Snoguess (A SNOMED game)",subtitle:"Game",type:"internal",url:"/snoguess",description:"A SNOMED term guessing game, learn about SNOMED content while having fun and competing to achieve the highest score"},{name:"SNOMED Implementation Roadmap Generator",subtitle:"Tool",type:"external",url:"https://ihtsdo.github.io/roadmap-generator",description:"A tool designed to promote and support the creation of implementation roadmaps for the adoption of SNOMED CT in countries, regions or organizations."}]}getDemos(){return this.demos}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function C8t(e,i){if(1&e){const t=ve();tt(0,"div",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-subtitle"),ut(4),et(),tt(5,"mat-card-title"),ut(6),et()(),tt(7,"mat-card-content")(8,"p"),ut(9),et()(),tt(10,"mat-card-actions")(11,"button",10),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().navigate(r))}),ut(12,"OPEN"),et()()()()}if(2&e){const t=i.$implicit;lt(4),Ze(t.subtitle),lt(2),Ze(t.name),lt(3),Ze(t.description)}}let UJ=(()=>{class e{constructor(t,n,r){this.router=t,this.route=n,this.menuService=r,this.demos=[]}ngOnInit(){this.demos=this.menuService.getDemos()}navigate(t){if("internal"===t.type){let n=t.queryParams,r=this.route.snapshot.queryParams;n=n?{...r,...n}:r,this.router.navigate([t.url],{queryParams:n})}else this.openInNewTab(t.url)}openInNewTab(t){window.open(t,"_blank")}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Fo),mt(Tc),mt(VJ))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-home"]],decls:17,vars:1,consts:[[1,"main-panel"],[1,"intro"],["href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank"],["href","https://confluence.ihtsdotools.org/display/CP/Clinical+Engagement","target","_blank"],[1,"demos-panel"],["class","demo-card-wrapper",4,"ngFor","ngForOf"],[1,"center-image"],["src","assets/img/SI_CT_Logo_Delivered_By.png","alt","SNOMED Logo",1,"transparent-image"],[1,"demo-card-wrapper"],[1,"demo-card"],["mat-button","","color","accent",3,"click"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"h1"),ut(2,"SNOMED CT Implementation Demonstrators"),et(),tt(3,"p",1),ut(4,"Welcome to our collection of SNOMED CT Implementation Demonstrators! This curated selection of demos showcases the diverse ways SNOMED CT can be implemented across different use cases. Each demonstration is "),tt(5,"a",2),ut(6,"open source"),et(),ut(7,", free to explore, and easy to replicate, providing a hands-on learning experience for developers, implementers, and healthcare professionals."),et(),tt(8,"p",1),ut(9,"These implementation demos have been created through the collaboration and expertise of the "),tt(10,"a",3),ut(11,"global SNOMED CT community of clinical experts"),et(),ut(12,", reflecting best practices and innovative use cases. Whether you\u2019re just getting started with SNOMED CT or looking to deepen your understanding, you\u2019ll find valuable insights here. Explore, learn, and join us in advancing healthcare interoperability."),et(),tt(13,"div",4),Gt(14,C8t,13,3,"div",5),et(),tt(15,"div",6),we(16,"img",7),et()()),2&n&&(lt(14),yt("ngForOf",r.demos))},dependencies:[gs,Sa,vC,b7,x7,w7,y7,v7],styles:[".main-panel[_ngcontent-%COMP%]{padding:2rem;height:calc(100vh - 70px)}.intro[_ngcontent-%COMP%]{font-size:1.2rem;margin-bottom:1.5rem}.demos-panel[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;margin-top:3rem}.demo-card-wrapper[_ngcontent-%COMP%]{width:300px}.demo-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}mat-card-title[_ngcontent-%COMP%]{word-wrap:break-word;font-size:large;font-weight:700}mat-card-content[_ngcontent-%COMP%]{padding:1rem;margin-bottom:2rem}mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;padding-top:10px;margin-top:auto}.center-image[_ngcontent-%COMP%]{text-align:center;margin-top:4rem;margin-left:20%;margin-right:20%}.transparent-image[_ngcontent-%COMP%]{opacity:.5}"]})}return e})();function S8t(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function E8t(e,i){if(1&e){const t=ve();tt(0,"app-dropdown-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function A8t(e,i){if(1&e){const t=ve();tt(0,"app-radios-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function D8t(e,i){if(1&e&&(tt(0,"span",10),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ze(t.title)}}function M8t(e,i){if(1&e){const t=ve();tt(0,"app-textbox-binding",11),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function I8t(e,i){if(1&e){const t=ve();tt(0,"app-integer-binding",11),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function R8t(e,i){if(1&e){const t=ve();tt(0,"app-decimal-binding",11),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function k8t(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function P8t(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-multiple-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function F8t(e,i){if(1&e&&(tt(0,"button",12)(1,"mat-icon"),ut(2,"info"),et()()),2&e){const t=Ct().$implicit;yt("matMenuTriggerFor",qi(13))("disabled",!t.code&&!t.ecl)}}function O8t(e,i){if(1&e){const t=ve();tt(0,"span",13),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Question terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Zc("",null==t.code?null:t.code.code," |",null==t.code?null:t.code.display,"|")}}function L8t(e,i){if(1&e){const t=ve();tt(0,"span",13),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Answer terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Ze(t.ecl)}}function N8t(e,i){if(1&e&&(tt(0,"div",2)(1,"div",3),Gt(2,S8t,1,1,"app-autocomplete-binding",4)(3,E8t,1,1,"app-dropdown-binding",4)(4,A8t,1,1,"app-radios-binding",4)(5,D8t,2,1,"span",5)(6,M8t,1,1,"app-textbox-binding",6)(7,I8t,1,1,"app-integer-binding",6)(8,R8t,1,1,"app-decimal-binding",6)(9,k8t,1,1,"app-checkbox-binding",4)(10,P8t,1,1,"app-checkbox-multiple-binding",4)(11,F8t,3,2,"button",7),tt(12,"mat-menu",null,0),Gt(14,O8t,5,3,"span",8)(15,L8t,5,2,"span",8),et()()()),2&e){const t=i.$implicit;lt(2),yt("ngIf","Autocomplete"==t.type),lt(),yt("ngIf","Select (Single)"==t.type||"Select (Multiple)"==t.type),lt(),yt("ngIf","Options"==t.type),lt(),yt("ngIf","Section header"==t.type),lt(),yt("ngIf","Text box"==t.type),lt(),yt("ngIf","Integer"==t.type),lt(),yt("ngIf","Decimal"==t.type),lt(),yt("ngIf","Checkbox"==t.type),lt(),yt("ngIf","Checkbox multiple"==t.type),lt(),yt("ngIf","Section header"!=t.type),lt(3),yt("ngIf",t.code),lt(),yt("ngIf",t.ecl)}}let B8t=(()=>{class e{constructor(){this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}"}optionSelected(t,n,r){this.output[t]={code:n,value:r},n||delete this.output[t].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}refreshResponse(){this.response={};for(let t of this.spec.bindings)this.response[t.title]={},t.code&&(this.response[t.title].code=t.code);for(let[t,n]of Object.entries(this.output))this.output[t].code&&(this.response[t].code=this.output[t].code),this.output[t].value&&(this.response[t].value=this.output[t].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[t,n]of Object.entries(this.response)){let r=n;const s=r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0,o=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let l={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};l.code=s||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},o&&(l.valueCodeableConcept=o),r.value&&"string"==typeof r.value&&(l.valueString=r.value),(l.valueCodeableConcept||l.valueString)&&this.responseBundle.entry.push(l)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-bindings-viewer"]],inputs:{spec:"spec"},decls:3,vars:2,consts:[["substancePopoverMenu","matMenu"],["class","output-panel",4,"ngFor","ngForOf"],[1,"output-panel"],[1,"row","control"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],["mat-menu-item","",3,"click","disableRipple"]],template:function(n,r){1&n&&(tt(0,"h2"),ut(1),et(),Gt(2,N8t,16,12,"div",1)),2&n&&(lt(),Ze(r.spec.title),lt(),yt("ngForOf",r.spec.bindings))},dependencies:[gs,Ms,Oo,da,bl,Gl,cu,av,WX,$X,QX,JX,qX,tj,ej],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"]})}return e})();function V8t(e,i){if(1&e&&(tt(0,"mat-tab",7)(1,"div",8),we(2,"app-bindings-viewer",9),et()()),2&e){const t=i.$implicit;hh("label",t.spec.title),lt(2),yt("spec",t.spec)}}let U8t=(()=>{class e{constructor(t){this.http=t,this.emptySpec={},this.specs=[{specFile:"Example-spec.json",spec:this.emptySpec},{specFile:"Example-spec-2.json",spec:this.emptySpec}]}ngOnInit(){var t=this;this.specs.forEach(function(){var n=de(function*(r){const s=yield Ca(t.http.get("assets/specs/ncpt/"+r.specFile));console.log(s),r.spec=s});return function(r){return n.apply(this,arguments)}}())}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-ncpt"]],decls:20,vars:3,consts:[["substancePopoverMenu","matMenu"],[1,"outer-container"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/display/WIPnutsig/SNOMED+CT+Implementation+Guide+for+the+Nutrition+Care+Process+Terminology","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"container"],[3,"spec"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1)(1,"h3"),ut(2,"SNOMED CT - NCPT Implementation Demonstrator "),tt(3,"button",2)(4,"mat-icon"),ut(5,"info"),et()(),tt(6,"mat-menu",null,0)(8,"span",3),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(9,"h4"),ut(10,"SNOMED CT - NCPT Implementation Demonstrator"),et(),tt(11,"p"),ut(12,"This is a demonstration of the use of SNOMED CT for coding clinical information related to the Nutrition Care Process."),et(),tt(13,"p"),ut(14,"For more information check the "),tt(15,"a",4),ut(16," Implementation Guide"),et(),ut(17,"."),et()()()(),tt(18,"mat-tab-group",5),Gt(19,V8t,3,2,"mat-tab",6),et()()}if(2&n){const s=qi(7);lt(3),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(11),yt("ngForOf",r.specs)}},dependencies:[gs,Oo,da,bl,Gl,cu,zy,ov,B8t],styles:[".outer-container[_ngcontent-%COMP%]{margin:1rem;width:calc(100% - 2rem)}.container[_ngcontent-%COMP%]{margin:2rem;width:calc(100% - 4rem)}"]})}return e})();var z8t=ps(945),Ql=ps.n(z8t);const G8t=["gameContainer"];let H8t=(()=>{class e{constructor(t){this.terminologyService=t}ngOnInit(){const t=new W8t,n=new X8t(this.terminologyService),r={type:Ql().AUTO,width:800,height:600,parent:this.gameContainer.nativeElement,scene:[n,t],physics:{default:"arcade",arcade:{debug:!1}}};this.game=new(Ql().Game)(r)}ngOnDestroy(){this.game&&this.game.destroy(!0)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-phaser-game"]],viewQuery:function(n,r){if(1&n&&Mi(G8t,7),2&n){let s;Be(s=Ve())&&(r.gameContainer=s.first)}},decls:2,vars:0,consts:[["gameContainer",""]],template:function(n,r){1&n&&we(0,"div",null,0)}})}return e})();class W8t extends Ql().Scene{constructor(){super({key:"UIScene",active:!0}),this.gamePaused=!1,this.speedButtons=[],this.speedLevels=[1,2,4,16],this.activeSpeedIndex=0}preload(){this.load.image("pauseButton","assets/cdstd/Objects/Buttons/button_pause.png"),this.load.image("unpauseButton","assets/cdstd/Objects/Buttons/button_unpause.png")}create(){this.pauseButton=this.add.image(75,50,"pauseButton").setInteractive(),this.pauseButton.on("pointerdown",()=>{const i=this.scene.get("CdstdScene");this.gamePaused?i&&(i.scene.resume(),this.gamePaused=!1,this.pauseButton.setTexture("pauseButton")):i&&(i.scene.pause(),this.gamePaused=!0,this.pauseButton.setTexture("unpauseButton"))}),this.speedLevels.forEach((i,t)=>{const n=this.add.text(150+60*t,35,`${i}x`,{fontSize:"18px",color:t===this.activeSpeedIndex?"#ff0":"#fff",backgroundColor:"#000",padding:{x:10,y:5}}).setInteractive().on("pointerdown",()=>{this.setSpeed(t)});this.speedButtons.push(n)})}setSpeed(i){this.activeSpeedIndex=i,this.speedButtons.forEach((n,r)=>{n.setStyle({color:r===this.activeSpeedIndex?"#ff0":"#fff"})});const t=this.scene.get("CdstdScene");t&&(t.time.timeScale=this.speedLevels[this.activeSpeedIndex],t.setSpeedMultiplier(this.speedLevels[this.activeSpeedIndex]))}}class X8t extends Ql().Scene{constructor(i){super({key:"CdstdScene"}),this.terminologyService=i,this.maxPatients=10,this.spawnedPatients=0,this.patientsInQueue=0,this.outsideQueue=[],this.insideQueue=[],this.goodTriage=0,this.badTriage=0,this.diagnosisData=[],this.admitting=!1,this.lastTriageTime=0,this.speedMultiplier=1,this.admissionEcl="( << 386661006 |Fever| OR << 22253000 |Pain (finding)| )",this.internalTriageRules=[{ecl:"<< 386661006",doctorIndex:1},{ecl:"<< 22253000",doctorIndex:0}],this.attendingDoctors=[{x:130,y:207,title:"Cardiologist",ecl:"(<< 106063007 |Cardiovascular finding (finding)| OR << 29857009 |Chest pain (finding)|)"},{x:130,y:140,title:"Infectologist",ecl:"<< 386661006 |Fever (finding)|"}],this.characterAnimations=[{name:"patient",variants:[{id:1,animations:{idle:{start:0,end:5,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:10,repeat:-1},dead:{start:0,end:3,frameRate:4,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}},{id:2,animations:{idle:{start:0,end:5,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:10,repeat:-1},dead:{start:0,end:3,frameRate:4,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}},{id:3,animations:{idle:{start:0,end:4,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:9,repeat:-1},dead:{start:0,end:4,frameRate:5,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}}]},{name:"gatekeeper",variants:[{id:2,animations:{idle:{start:0,end:5,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:10,repeat:-1},dead:{start:0,end:4,frameRate:5,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}}]}],this.terminologyService.setSnowstormFhirBase("https://snowstorm-lite.nw.r.appspot.com/fhir")}setSpeedMultiplier(i){this.speedMultiplier=i}getSelectedSpeed(){return this.speedMultiplier}preload(){this.load.json("diagnosisData","assets/cdstd/Data/dx_1.json"),this.load.image("hospitalFloor","assets/cdstd/Backgrounds/hospital-floor-day.png");const i=["idle","walk","dead","hurt"];for(let t=1;t<=3;t++)i.forEach(n=>{this.load.spritesheet(`patient_${n}_${t}`,`assets/cdstd/Characters/City_men_${t}/${n.charAt(0).toUpperCase()+n.slice(1)}.png`,{frameWidth:128,frameHeight:128})});for(let t=2;t<=2;t++)i.forEach(n=>{this.load.spritesheet(`gatekeeper_${n}_${t}`,`assets/cdstd/Characters/Gangsters_${t}/${n.charAt(0).toUpperCase()+n.slice(1)}.png`,{frameWidth:128,frameHeight:128})})}create(){this.diagnosisData=this.cache.json.get("diagnosisData"),this.defineAnimations(),this.background=this.add.image(400,300,"hospitalFloor"),this.background.setScale(1),this.scoreText=this.add.text(750,10,`Patients: ${this.spawnedPatients}`,{fontSize:"20px",color:"#ffffff",fontStyle:"bold"}).setOrigin(1,0),this.input.enabled=!0,this.outsideQueue=[],this.goodTriage=0,this.spawnedPatients=0,this.patients=this.physics.add.group(),this.spawnPatient(),this.scheduleRandomPatientSpawn(),this.addDoctors()}update(){this.patients.getChildren().forEach(t=>{const n=t;if(!n.active)return;const r=n.x,s=n.previousX;rs&&(n.flipX=!1),n.previousX=r}),this.scoreText.setText(`Patients: ${this.spawnedPatients} Effectiveness: ${(this.spawnedPatients-this.badTriage)/this.spawnedPatients*100}%`),this.admitting&&this.testNextPatientForAdmission();const i=Date.now();this.insideQueue.length>0&&this.attendingDoctors.every(t=>!t.character.info.busy)&&i-this.lastTriageTime>=2e3&&(this.lastTriageTime=Date.now(),this.time.delayedCall(1e3,()=>{this.internalTriage()}))}defineAnimations(){this.characterAnimations.forEach(({name:i,variants:t})=>{t.forEach(({id:n,animations:r})=>{Object.entries(r).forEach(([s,{start:o,end:l,frameRate:w,repeat:C}])=>{const M=`${i}_${s}_${n}`;this.anims.exists(M)||this.anims.create({key:M,frames:this.anims.generateFrameNumbers(`${i}_${s}_${n}`,{start:o,end:l}),frameRate:w,repeat:C})})})})}scheduleRandomPatientSpawn(){if(this.spawnedPatients{this.spawnPatient(),this.scheduleRandomPatientSpawn()},callbackScope:this})}}addDoctors(){this.internalTriageDoctor=new FE(this,270,350,"gatekeeper",2),this.internalTriageDoctor.flipX=!1,this.internalTriageDoctor.idle(),this.attendingDoctors.forEach(i=>{const t=new FE(this,i.x,i.y,"gatekeeper",2);t.info.ecl=i.ecl,t.info.title=i.title,t.info.busy=!1,t.idle(),i.character=t})}spawnPatient(){const i=new FE(this,80,10,"patient",Ql().Math.Between(1,3));this.outsideQueue.push(i),i.queuePosition=this.outsideQueue.length,i.setScale(.5),this.walkTo(i,[{x:80,y:533,duration:500},{x:330+20*i.queuePosition,y:533,duration:500}],()=>{this.patientsInQueue++,this.time.delayedCall(100,()=>{i.flipX=!0}),this.patientsInQueue===this.maxPatients&&this.queueComplete()}),i.setActive(!0).setVisible(!0),this.patients.add(i),this.spawnedPatients++}queueComplete(){this.gatekeeper=new FE(this,315,190,"gatekeeper",2),this.gatekeeper.setScale(.5),this.walkTo(this.gatekeeper,[{x:315,y:350,duration:200},{x:240,y:350,duration:200},{x:240,y:533,duration:200},{x:310,y:533,duration:200}],()=>{this.gatekeeper.say("We will start soon",1e3),this.time.delayedCall(1e3,()=>{this.admitting=!0})})}patientDied(i){}testNextPatientForAdmission(){if(0===this.outsideQueue.length)return;const i=this.outsideQueue.shift();i&&(this.admitting=!1,this.gatekeeper.say("How do you feel?",1500),this.time.delayedCall(1500,()=>{let t="I have been feeling with:\n";t+=i.clinicalData.diagnosis.map(n=>n.display).join("\n"),i.say(t,1800),this.time.delayedCall(2e3,()=>{this.checkPatientDiagnosisVsEcl(i,this.admissionEcl).then(n=>{n.length>0?(this.gatekeeper.say("Go in...",1500),i.clinicalData.diagnosis.forEach(r=>{n.find(s=>s.code===r.code)&&(r.status="admitted")}),this.time.delayedCall(1500,()=>{this.enterHospital(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{this.admitting=!0})})):(this.gatekeeper.say("Go home...",1500),this.time.delayedCall(500,()=>{this.walkAway(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{this.admitting=!0})}))})})}))}enterHospital(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length,i.walk(),this.walkTo(i,[{x:240,y:i.y,duration:500},{x:240,y:350,duration:500},{x:280+20*i.queuePosition,y:350,duration:500}],()=>{this.time.delayedCall(100,()=>{i.flipX=!0})})}walkAway(i){i.flipX=!1,i.walk();let t=[];i.y<500&&(t.push({x:240,y:i.y,duration:500}),t.push({x:240,y:533,duration:500}));let n=Ql().Math.Between(0,1);t.push({x:800*n,y:533,duration:1e3}),this.walkTo(i,t,()=>{this.time.delayedCall(100,()=>{i.destroy()})})}advanceQueue(i){if(0===i.length)return;console.log(i);const t=i[0].x-40;i.forEach((n,r)=>{n.walk(),n.queuePosition=r+1,this.walkTo(n,[{x:t+20*n.queuePosition,y:n.y,duration:500}],()=>{})})}internalTriage(){var i=this;return de(function*(){if(0===i.insideQueue.length)return;const t=i.insideQueue.shift();if(t){for(let n of i.internalTriageRules){const r=i.attendingDoctors[n.doctorIndex].character;if(!r.info.busy&&(yield i.checkPatientDiagnosisVsEcl(t,n.ecl)).length>0){console.log(`${r.info.title} is available and will attend to the patient.`),i.internalTriageDoctor.say(`Go to the ${r?.info?.title}`,1e3),i.time.delayedCall(1e3,()=>{t.flipX=!0;const o=[{x:240,y:t.y,duration:200},{x:240,y:r.y,duration:300},{x:r.x+30,y:r.y,duration:300}];r.info.busy=!0,i.walkTo(t,o,()=>{t.idle(),i.attendPatient(t,r)})});break}}t.active||i.addToInsideQueue(t)}})()}addToInsideQueue(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length,this.walkTo(i,[{x:280+20*i.queuePosition,y:350,duration:500/this.speedMultiplier}],()=>{i.idle()}),console.log(`Patient re-added to insideQueue at position ${i.queuePosition}`)}attendPatient(i,t){t.info.busy=!0,this.time.delayedCall(1e3,()=>{this.checkPatientDiagnosisVsEcl(i,t.info.ecl).then(n=>{n.length>0?(i.clinicalData.diagnosis.forEach(r=>{n.find(s=>s.code===r.code)&&(r.status="treated")}),i.clinicalData.diagnosis.find(r=>"admitted"===r.status)?(t.say(`${t.info.title}\nGo to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),t.info.busy=!1})):(t.say(`${t.info.title}\nHave a nice day`,1e3),this.time.delayedCall(1e3,()=>{this.goodTriage++,this.walkAway(i),t.info.busy=!1}))):i.clinicalData.diagnosis.find(r=>"admitted"===r.status)?(t.say(`${t.info.title}\nI can't help with this, but go to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),t.info.busy=!1})):(t.say(`${t.info.title}\nI can't help you...`,1e3),this.time.delayedCall(1e3,()=>{this.badTriage++,this.walkAway(i),t.info.busy=!1}))})})}gameOver(){this.add.text(400,350,"Game Over",{fontSize:"48px",color:"#ff0000",fontStyle:"bold"}).setOrigin(.5),this.add.text(400,400,"Press R to Restart",{fontSize:"24px",color:"#ffffff"}).setOrigin(.5),this.physics.pause();const i=this.input?.keyboard?.addKey("R");i?i.once("down",()=>{this.time.removeAllEvents(),this.tweens.killAll(),this.scene.restart()}):console.error("Keyboard input is not available.")}walkTo(i,t,n){if(0===t.length)return void n();i.walk();const r=s=>{if(s>=t.length)return i.idle(),void n();const o=t[s];this.tweens.add({targets:i,x:o.x,y:o.y,duration:o.duration/this.speedMultiplier,ease:"Linear",onComplete:()=>{r(s+1)}})};r(0)}checkPatientDiagnosisVsEcl(i,t){return new Promise((n,r)=>{let s=0,o="";i?.clinicalData.diagnosis.forEach((l,w)=>{"treated"!==l.status&&(s++,o+=s>1?` OR ${l.code}`:` ${l.code}`)}),0!==s?this.terminologyService.expandValueSet(t=t+" AND ("+o+" )","").subscribe(l=>{n(l.expansion?.total>0?l.expansion.contains:[])},l=>{r(l)}):n([])})}}class FE extends Ql().Physics.Arcade.Sprite{constructor(i,t,n,r,s=1,o=[]){if(super(i,t,n,`${r}_idle_${s}`),this.inQueue=!1,this.queuePosition=0,this.queueStartTime=0,this.hitPoints=5,this.previousX=0,this.clinicalData={},this.info={},i.add.existing(this),i.physics.add.existing(this),this.setCollideWorldBounds(!0),this.sceneRef=i,this.spriteType=s,this.role=r,i.add.existing(this),this.setScale(.5),"patient"===r)if(this.walk(),this.clinicalData.age=Ql().Math.Between(18,100),this.clinicalData.diagnosis=[],o&&o.length>0)this.clinicalData.diagnosis=o;else{const l=Ql().Math.Between(1,5);for(let w=0;wi.destroy()}),this.once(Ql().Animations.Events.ANIMATION_COMPLETE,()=>{this.hitPoints>0?this.idle():this.dead()})}startWaiting(){"patient"===this.role&&(this.inQueue=!0,this.queueStartTime=this.scene.time.now)}say(i,t=2e3){this.calloutText&&this.calloutText.destroy(),this.calloutLine&&this.calloutLine.destroy(),this.calloutText=this.sceneRef.add.text(this.x,this.y-50,i,{fontSize:"16px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:2},align:"center"}).setOrigin(.5).setDepth(10),this.calloutLine=this.sceneRef.add.line(this.x+5,this.y+10,0,0,10,-35,0).setLineWidth(1.5).setDepth(9),this.sceneRef.tweens.add({targets:[this.calloutText,this.calloutLine],alpha:0,duration:500/this.sceneRef.getSelectedSpeed(),delay:t,onComplete:()=>{this.calloutText?.destroy(),this.calloutText=void 0,this.calloutLine?.destroy()}})}}const j8t=[{path:"",component:UJ},{path:"home",component:UJ},{path:"allergies",component:XEt},{path:"sandbox",component:jDt},{path:"prescription",component:YDt},{path:"questionnaires",component:vIt},{path:"implementation-course/subset-validator",component:HIt},{path:"snoguess",component:KLt},{path:"snoguess/scoreboard",component:UNt},{path:"context",component:uNt},{path:"maturity",component:T8t},{path:"ncpt",component:U8t},{path:"phaser",component:H8t},{path:"**",redirectTo:""}];let Y8t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[TG.forRoot(j8t,{useHash:!0}),TG]})}return e})();const $8t=[{title:"GROUP 1",description:"The first group of bindings in the coding demonstration",bindings:[{title:"Medicinal product + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, contain at least provided ingredientes (open world assuption), no information on form."},{title:"Gender",type:"dropdown",ecl:"< 365873007 |Gender finding (finding)|",value:"",note:"Patient gender."},{title:"Medicinal product form + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details."}]},{title:"GROUP 2",description:"The second group of bindings in the coding demonstration",bindings:[{title:"Medicinal product only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, containing only the provided ingredientes (close world assuption), with no information on form."},{title:"Medicinal product form only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 732943007 |Has basis of strength substance (attribute)| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details, containing only the provided ingredientes (close world assuption)."}]}];let Q8t=(()=>{class e{constructor(){}getCodingSpec(){return $8t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var pn,a1={version:"0.20.2"},pa=1200,Xm=1252,K8t=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],FL={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},OE=function(e){-1!=K8t.indexOf(e)&&(Xm=FL[0]=e)},Kl=function(e){pa=e,OE(e)};var o1=function(i){return String.fromCharCode(i)},OL=function(i){return String.fromCharCode(i)},Ls=null,ho="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function BE(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0,w=0,C=0;C>2,o=(3&t)<<4|(n=e.charCodeAt(C++))>>4,l=(15&n)<<2|(r=e.charCodeAt(C++))>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=ho.charAt(s)+ho.charAt(o)+ho.charAt(l)+ho.charAt(w);return i}function Al(e){var i="",s=0,o=0,l=0,w=0;"data:"==e.slice(0,5)&&(C=e.slice(0,1024).indexOf(";base64,"))>-1&&(e=e.slice(C+8)),e=e.replace(/[^\w\+\/\=]/g,"");for(var C=0;C>4),64!==(l=ho.indexOf(e.charAt(C++)))&&(i+=String.fromCharCode((15&o)<<4|l>>2)),64!==(w=ho.indexOf(e.charAt(C++)))&&(i+=String.fromCharCode((3&l)<<6|w));return i}var _n=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),bd=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(i,t){return t?new Buffer(i,t):new Buffer(i)}:Buffer.from.bind(Buffer)}return function(){}}(),l1=function(){if(typeof Buffer>"u")return!1;var e=bd([65,0]);return!!e&&1==e.toString("utf16le").length}();function uf(e){return _n?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function WJ(e){return _n?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Vo=function(i){return _n?bd(i,"binary"):i.split("").map(function(t){return 255&t.charCodeAt(0)})};function c1(e){if(typeof ArrayBuffer>"u")return Vo(e);for(var i=new ArrayBuffer(e.length),t=new Uint8Array(i),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return i}function wd(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var i=[],t=0;t=0;)i+=e.charAt(t--);return i}function Dc(e,i){var t=""+e;return t.length>=i?t:Xn("0",i-t.length)+t}function NL(e,i){var t=""+e;return t.length>=i?t:Xn(" ",i-t.length)+t}function VE(e,i){var t=""+e;return t.length>=i?t:t+Xn(" ",i-t.length)}var XJ=Math.pow(2,32);function d0(e,i){return e>XJ||e<-XJ?function r6t(e,i){var t=""+Math.round(e);return t.length>=i?t:Xn("0",i-t.length)+t}(e,i):function s6t(e,i){var t=""+e;return t.length>=i?t:Xn("0",i-t.length)+t}(Math.round(e),i)}function UE(e,i){return e.length>=7+(i=i||0)&&103==(32|e.charCodeAt(i))&&101==(32|e.charCodeAt(i+1))&&110==(32|e.charCodeAt(i+2))&&101==(32|e.charCodeAt(i+3))&&114==(32|e.charCodeAt(i+4))&&97==(32|e.charCodeAt(i+5))&&108==(32|e.charCodeAt(i+6))}var jJ=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],BL=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],ki={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "'},YJ={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},o6t={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function zE(e,i,t){for(var n=e<0?-1:1,r=e*n,s=0,o=1,l=0,w=1,C=0,M=0,P=Math.floor(r);Ci&&(C>i?(M=w,l=s):(M=C,l=o)),!t)return[0,n*l,M];var O=Math.floor(n*l/M);return[O,n*l-O*M,M]}function _d(e,i,t){if(e>2958465||e<0)return null;e=function l6t(e){var i=e.toPrecision(16);if(i.indexOf("e")>-1){var t=i.slice(0,i.indexOf("e"));return(t=t.indexOf(".")>-1?t.slice(0,"0."==t.slice(0,2)?17:16):t.slice(0,15)+Xn("0",t.length-15))+i.slice(i.indexOf("e"))}var n=i.indexOf(".")>-1?i.slice(0,"0."==i.slice(0,2)?17:16):i.slice(0,15)+Xn("0",i.length-15);return Number(n)}(e);var n=0|e,r=Math.floor(86400*(e-n)),s=0,o=[],l={D:n,T:r,u:86400*(e-n)-r,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),i&&i.date1904&&(n+=1462),l.u>.9999&&(l.u=0,86400==++r&&(l.T=r=0,++n,++l.D)),60===n)o=t?[1317,10,29]:[1900,2,29],s=3;else if(0===n)o=t?[1317,8,29]:[1900,1,0],s=6;else{n>60&&--n;var w=new Date(1900,0,1);w.setDate(w.getDate()+n-1),o=[w.getFullYear(),w.getMonth()+1,w.getDate()],s=w.getDay(),n<60&&(s=(s+6)%7),t&&(s=function h6t(e,i){i[0]-=581;var t=e.getDay();return e<60&&(t=(t+6)%7),t}(w,o))}return l.y=o[0],l.m=o[1],l.d=o[2],l.S=r%60,r=Math.floor(r/60),l.M=r%60,r=Math.floor(r/60),l.H=r,l.q=s,l}function VL(e){return-1==e.indexOf(".")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function jm(e,i){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):function u1(e){var t,i=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return t=i>=-4&&i<=-1?e.toPrecision(10+i):Math.abs(i)<=9?function d6t(e){var i=e<0?12:11,t=VL(e.toFixed(12));return t.length<=i||(t=e.toPrecision(10)).length<=i?t:e.toExponential(5)}(e):10===i?e.toFixed(10).substr(0,12):function u6t(e){var i=VL(e.toFixed(11));return i.length>(e<0?12:11)||"0"===i||"-0"===i?e.toPrecision(6):i}(e),VL(function c6t(e){return-1==e.indexOf("E")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(t.toUpperCase()))}(e);case"undefined":return"";case"object":if(null==e)return"";if(e instanceof Date)return nl(14,ms(e,i&&i.date1904),i)}throw new Error("unsupported value in General format: "+e)}function f6t(e,i,t,n){var w,r="",s=0,o=0,l=t.y,C=0;switch(e){case 98:l=t.y+543;case 121:switch(i.length){case 1:case 2:w=l%100,C=2;break;default:w=l%1e4,C=4}break;case 109:switch(i.length){case 1:case 2:w=t.m,C=i.length;break;case 3:return BL[t.m-1][1];case 5:return BL[t.m-1][0];default:return BL[t.m-1][2]}break;case 100:switch(i.length){case 1:case 2:w=t.d,C=i.length;break;case 3:return jJ[t.q][0];default:return jJ[t.q][1]}break;case 104:switch(i.length){case 1:case 2:w=1+(t.H+11)%12,C=i.length;break;default:throw"bad hour format: "+i}break;case 72:switch(i.length){case 1:case 2:w=t.H,C=i.length;break;default:throw"bad hour format: "+i}break;case 77:switch(i.length){case 1:case 2:w=t.M,C=i.length;break;default:throw"bad minute format: "+i}break;case 115:if("s"!=i&&"ss"!=i&&".0"!=i&&".00"!=i&&".000"!=i)throw"bad second format: "+i;return 0!==t.u||"s"!=i&&"ss"!=i?(o=n>=2?3===n?1e3:100:1===n?10:1,(s=Math.round(o*(t.S+t.u)))>=60*o&&(s=0),"s"===i?0===s?"0":""+s/o:(r=Dc(s,2+n),"ss"===i?r.substr(0,2):"."+r.substr(2,i.length-1))):Dc(t.S,i.length);case 90:switch(i){case"[h]":case"[hh]":w=24*t.D+t.H;break;case"[m]":case"[mm]":w=60*(24*t.D+t.H)+t.M;break;case"[s]":case"[ss]":w=60*(60*(24*t.D+t.H)+t.M)+(0==n?Math.round(t.S+t.u):t.S);break;default:throw"bad abstime format: "+i}C=3===i.length?1:2;break;case 101:w=l,C=1}return C>0?Dc(w,C):""}function Lu(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(n.length>0?",":"")+e.substr(t,3);return n}var $J=/%/g;function QJ(e,i){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==i)return"0.0E+0";if(i<0)return"-"+QJ(e,-i);var r=e.indexOf(".");-1===r&&(r=e.indexOf("E"));var s=Math.floor(Math.log(i)*Math.LOG10E)%r;if(s<0&&(s+=r),-1===(t=(i/Math.pow(10,s)).toPrecision(n+1+(r+s)%r)).indexOf("e")){var o=Math.floor(Math.log(i)*Math.LOG10E);for(-1===t.indexOf(".")?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s);"0."===t.substr(0,2);)t=(t=t.charAt(0)+t.substr(2,r)+"."+t.substr(2+r)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,w,C,M){return w+C+M.substr(0,(r+s)%r)+"."+M.substr(s)+"E"})}else t=i.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}var KJ=/# (\?+)( ?)\/( ?)(\d+)/,ZJ=/^#*0*\.([0#]+)/,JJ=/\)[^)]*[0#]/,qJ=/\(###\) ###\\?-####/;function Uo(e){for(var t,i="",n=0;n!=e.length;++n)switch(t=e.charCodeAt(n)){case 35:break;case 63:i+=" ";break;case 48:i+="0";break;default:i+=String.fromCharCode(t)}return i}function tq(e,i){var t=Math.pow(10,i);return""+Math.round(e*t)/t}function eq(e,i){var t=e-Math.floor(e),n=Math.pow(10,i);return i<(""+Math.round(t*n)).length?0:Math.round(t*n)}function Zl(e,i,t){if(40===e.charCodeAt(0)&&!i.match(JJ)){var n=i.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?Zl("n",n,t):"("+Zl("n",n,-t)+")"}if(44===i.charCodeAt(i.length-1))return function p6t(e,i,t){for(var n=i.length-1;44===i.charCodeAt(n-1);)--n;return Nu(e,i.substr(0,n),t/Math.pow(10,3*(i.length-n)))}(e,i,t);if(-1!==i.indexOf("%"))return function m6t(e,i,t){var n=i.replace($J,""),r=i.length-n.length;return Nu(e,n,t*Math.pow(10,2*r))+Xn("%",r)}(e,i,t);if(-1!==i.indexOf("E"))return QJ(i,t);if(36===i.charCodeAt(0))return"$"+Zl(e,i.substr(" "==i.charAt(1)?2:1),t);var r,s,o,l,w=Math.abs(t),C=t<0?"-":"";if(i.match(/^00+$/))return C+d0(w,i.length);if(i.match(/^[#?]+$/))return"0"===(r=d0(t,0))&&(r=""),r.length>i.length?r:Uo(i.substr(0,i.length-r.length))+r;if(s=i.match(KJ))return function g6t(e,i,t){var n=parseInt(e[4],10),r=Math.round(i*n),s=Math.floor(r/n),o=r-s*n,l=n;return t+(0===s?"":""+s)+" "+(0===o?Xn(" ",e[1].length+1+e[4].length):NL(o,e[1].length)+e[2]+"/"+e[3]+Dc(l,e[4].length))}(s,w,C);if(i.match(/^#+0+$/))return C+d0(w,i.length-i.indexOf("0"));if(s=i.match(ZJ))return r=tq(t,s[1].length).replace(/^([^\.]+)$/,"$1."+Uo(s[1])).replace(/\.$/,"."+Uo(s[1])).replace(/\.(\d*)$/,function(U,X){return"."+X+Xn("0",Uo(s[1]).length-X.length)}),-1!==i.indexOf("0.")?r:r.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),s=i.match(/^(0*)\.(#*)$/))return C+tq(w,s[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=i.match(/^#{1,3},##0(\.?)$/))return C+Lu(d0(w,0));if(s=i.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+Zl(e,i,-t):Lu(""+(Math.floor(t)+function x6t(e,i){return i<(""+Math.round((e-Math.floor(e))*Math.pow(10,i))).length?1:0}(t,s[1].length)))+"."+Dc(eq(t,s[1].length),s[1].length);if(s=i.match(/^#,#*,#0/))return Zl(e,i.replace(/^#,#*,/,""),t);if(s=i.match(/^([0#]+)(\\?-([0#]+))+$/))return r=c0(Zl(e,i.replace(/[\\-]/g,""),t)),o=0,c0(c0(i.replace(/\\/g,"")).replace(/[0#]/g,function(U){return o-2147483648?""+(e>=0?0|e:e-1|0):""+Math.floor(e)}(t)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(U){return"00,"+(U.length<3?Dc(0,3-U.length):"")+U})+"."+Dc(o,s[1].length);switch(i){case"###,##0.00":return Zl(e,"#,##0.00",t);case"###,###":case"##,###":case"#,###":var L=Lu(d0(w,0));return"0"!==L?C+L:"";case"###,###.00":return Zl(e,"###,##0.00",t).replace(/^0\./,".");case"#,###.00":return Zl(e,"#,##0.00",t).replace(/^0\./,".")}throw new Error("unsupported format |"+i+"|")}function iq(e,i){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==i)return"0.0E+0";if(i<0)return"-"+iq(e,-i);var r=e.indexOf(".");-1===r&&(r=e.indexOf("E"));var s=Math.floor(Math.log(i)*Math.LOG10E)%r;if(s<0&&(s+=r),!(t=(i/Math.pow(10,s)).toPrecision(n+1+(r+s)%r)).match(/[Ee]/)){var o=Math.floor(Math.log(i)*Math.LOG10E);-1===t.indexOf(".")?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s),t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,w,C,M){return w+C+M.substr(0,(r+s)%r)+"."+M.substr(s)+"E"})}else t=i.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}function Td(e,i,t){if(40===e.charCodeAt(0)&&!i.match(JJ)){var n=i.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?Td("n",n,t):"("+Td("n",n,-t)+")"}if(44===i.charCodeAt(i.length-1))return function b6t(e,i,t){for(var n=i.length-1;44===i.charCodeAt(n-1);)--n;return Nu(e,i.substr(0,n),t/Math.pow(10,3*(i.length-n)))}(e,i,t);if(-1!==i.indexOf("%"))return function w6t(e,i,t){var n=i.replace($J,""),r=i.length-n.length;return Nu(e,n,t*Math.pow(10,2*r))+Xn("%",r)}(e,i,t);if(-1!==i.indexOf("E"))return iq(i,t);if(36===i.charCodeAt(0))return"$"+Td(e,i.substr(" "==i.charAt(1)?2:1),t);var r,s,o,l,w=Math.abs(t),C=t<0?"-":"";if(i.match(/^00+$/))return C+Dc(w,i.length);if(i.match(/^[#?]+$/))return r=""+t,0===t&&(r=""),r.length>i.length?r:Uo(i.substr(0,i.length-r.length))+r;if(s=i.match(KJ))return function v6t(e,i,t){return t+(0===i?"":""+i)+Xn(" ",e[1].length+2+e[4].length)}(s,w,C);if(i.match(/^#+0+$/))return C+Dc(w,i.length-i.indexOf("0"));if(s=i.match(ZJ))return r=(r=(""+t).replace(/^([^\.]+)$/,"$1."+Uo(s[1])).replace(/\.$/,"."+Uo(s[1]))).replace(/\.(\d*)$/,function(U,X){return"."+X+Xn("0",Uo(s[1]).length-X.length)}),-1!==i.indexOf("0.")?r:r.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),s=i.match(/^(0*)\.(#*)$/))return C+(""+w).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=i.match(/^#{1,3},##0(\.?)$/))return C+Lu(""+w);if(s=i.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+Td(e,i,-t):Lu(""+t)+"."+Xn("0",s[1].length);if(s=i.match(/^#,#*,#0/))return Td(e,i.replace(/^#,#*,/,""),t);if(s=i.match(/^([0#]+)(\\?-([0#]+))+$/))return r=c0(Td(e,i.replace(/[\\-]/g,""),t)),o=0,c0(c0(i.replace(/\\/g,"")).replace(/[0#]/g,function(U){return o-1||"\\"==t&&"-"==e.charAt(i+1)&&"0#".indexOf(e.charAt(i+2))>-1););break;case"?":for(;e.charAt(++i)===t;);break;case"*":++i,(" "==e.charAt(i)||"*"==e.charAt(i))&&++i;break;case"(":case")":++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;i-1;);break;default:++i}return!1}var rq=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function sq(e,i){if(null==i)return!1;var t=parseFloat(i[2]);switch(i[1]){case"=":if(e==t)return!0;break;case">":if(e>t)return!0;break;case"<":if(e":if(e!=t)return!0;break;case">=":if(e>=t)return!0;break;case"<=":if(e<=t)return!0}return!1}function nl(e,i,t){null==t&&(t={});var n="";switch(typeof e){case"string":n="m/d/yy"==e&&t.dateNF?t.dateNF:e;break;case"number":null==(n=14==e&&t.dateNF?t.dateNF:(null!=t.table?t.table:ki)[e])&&(n=t.table&&t.table[YJ[e]]||ki[YJ[e]]),null==n&&(n=o6t[e]||"General")}if(UE(n,0))return jm(i,t);i instanceof Date&&(i=ms(i,t.date1904));var r=function C6t(e,i){var t=function _6t(e){for(var i=[],t=!1,n=0,r=0;n-1&&--n,t.length>4)throw new Error("cannot find right format for |"+t.join("|")+"|");if("number"!=typeof i)return[4,4===t.length||r>-1?t[t.length-1]:"@"];switch(t.length){case 1:t=r>-1?["General","General","General",t[0]]:[t[0],t[0],t[0],"@"];break;case 2:t=r>-1?[t[0],t[0],t[0],t[1]]:[t[0],t[1],t[0],"@"];break;case 3:t=r>-1?[t[0],t[1],t[0],t[2]]:[t[0],t[1],t[2],"@"]}var s=i>0?t[0]:i<0?t[1]:t[2];if(-1===t[0].indexOf("[")&&-1===t[1].indexOf("["))return[n,s];if(null!=t[0].match(/\[[=<>]/)||null!=t[1].match(/\[[=<>]/)){var o=t[0].match(rq),l=t[1].match(rq);return sq(i,o)?[n,t[0]]:sq(i,l)?[n,t[1]]:[n,t[null!=o&&null!=l?2:1]]}return[n,s]}(n,i);if(UE(r[1]))return jm(i,t);if(!0===i)i="TRUE";else if(!1===i)i="FALSE";else if(""===i||null==i)return"";return function T6t(e,i,t,n){for(var C,M,P,r=[],s="",o=0,l="",w="t",O="H";o=12?e.charAt(o+2):l),X.t="T",O="h",o+=3):"AM/PM"===e.substr(o,5).toUpperCase()?(null!=C&&(X.v=C.H>=12?"PM":"AM"),X.t="T",o+=5,O="h"):"\u4e0a\u5348/\u4e0b\u5348"===e.substr(o,5).toUpperCase()?(null!=C&&(X.v=C.H>=12?"\u4e0b\u5348":"\u4e0a\u5348"),X.t="T",o+=5,O="h"):(X.t="t",++o),null==C&&"T"===X.t)return"";r[r.length]=X,w=l;break;case"[":for(s=l;"]"!==e.charAt(o++)&&o-1&&(s=(s.match(/\$([^-\[\]]*)/)||[])[1]||"$",Dl(e)||(r[r.length]={t:"t",v:s}));break;case".":if(null!=C){for(s=l;++o-1;)s+=l;r[r.length]={t:"n",v:s};break;case"?":for(s=l;e.charAt(++o)===l;)s+=l;r[r.length]={t:l,v:s},w=l;break;case"*":++o,(" "==e.charAt(o)||"*"==e.charAt(o))&&++o;break;case"(":case")":r[r.length]={t:1===n?"t":l,v:l},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(s=l;o-1;)s+=e.charAt(o);r[r.length]={t:"D",v:s};break;case" ":r[r.length]={t:l,v:l},++o;break;case"$":r[r.length]={t:"t",v:"$"},++o;break;default:if(-1===",$-+/():!^&'~{}<>=\u20acacfijklopqrtuvwxzP".indexOf(l))throw new Error("unrecognized character "+l+" in "+e);r[r.length]={t:"t",v:l},++o}var rt,st,W=0,Z=0;for(o=r.length-1,w="t";o>=0;--o)switch(r[o].t){case"h":case"H":r[o].t=O,w="h",W<1&&(W=1);break;case"s":(rt=r[o].v.match(/\.0+$/))&&(Z=Math.max(Z,rt[0].length-1),W=4),W<3&&(W=3);case"d":case"y":case"e":w=r[o].t;break;case"M":w=r[o].t,W<2&&(W=2);break;case"m":"s"===w&&(r[o].t="M",W<2&&(W=2));break;case"X":break;case"Z":W<1&&r[o].v.match(/[Hh]/)&&(W=1),W<2&&r[o].v.match(/[Mm]/)&&(W=2),W<3&&r[o].v.match(/[Ss]/)&&(W=3)}switch(W){case 0:break;case 1:case 2:case 3:C.u>=.5&&(C.u=0,++C.S),C.S>=60&&(C.S=0,++C.M),C.M>=60&&(C.M=0,++C.H),C.H>=24&&(C.H=0,++C.D,(st=_d(C.D)).u=C.u,st.S=C.S,st.M=C.M,st.H=C.H,C=st);break;case 4:switch(Z){case 1:C.u=Math.round(10*C.u)/10;break;case 2:C.u=Math.round(100*C.u)/100;break;case 3:C.u=Math.round(1e3*C.u)/1e3}C.u>=1&&(C.u=0,++C.S),C.S>=60&&(C.S=0,++C.M),C.M>=60&&(C.M=0,++C.H),C.H>=24&&(C.H=0,++C.D,(st=_d(C.D)).u=C.u,st.S=C.S,st.M=C.M,st.H=C.H,C=st)}var _t,vt="";for(o=0;o0){40==vt.charCodeAt(0)?(ft=i<0&&45===vt.charCodeAt(0)?-i:i,dt=Nu("n",vt,ft)):(dt=Nu("n",vt,ft=i<0&&n>1?-i:i),ft<0&&r[0]&&"t"==r[0].t&&(dt=dt.substr(1),r[0].v="-"+r[0].v)),_t=dt.length-1;var pt=r.length;for(o=0;o-1){pt=o;break}var bt=r.length;if(pt===r.length&&-1===dt.indexOf("E")){for(o=r.length-1;o>=0;--o)null==r[o]||-1==="n?".indexOf(r[o].t)||(_t>=r[o].v.length-1?r[o].v=dt.substr(1+(_t-=r[o].v.length),r[o].v.length):_t<0?r[o].v="":(r[o].v=dt.substr(0,_t+1),_t=-1),r[o].t="t",bt=o);_t>=0&&bt=0;--o)if(null!=r[o]&&-1!=="n?".indexOf(r[o].t)){for(M=r[o].v.indexOf(".")>-1&&o===pt?r[o].v.indexOf(".")-1:r[o].v.length-1,Mt=r[o].v.substr(M+1);M>=0;--M)_t>=0&&("0"===r[o].v.charAt(M)||"#"===r[o].v.charAt(M))&&(Mt=dt.charAt(_t--)+Mt);r[o].v=Mt,r[o].t="t",bt=o}for(_t>=0&&bt-1&&o===pt?r[o].v.indexOf(".")+1:0,Mt=r[o].v.substr(0,M);M-1&&(r[o].v=Nu(r[o].t,r[o].v,ft=n>1&&i<0&&o>0&&"-"===r[o-1].v?-i:i),r[o].t="t");var Tt="";for(o=0;o!==r.length;++o)null!=r[o]&&(Tt+=r[o].v);return Tt}(r[1],i,t,r[0])}function UL(e,i){if("number"!=typeof i){i=+i||-1;for(var t=0;t<392;++t)if(null!=ki[t]){if(ki[t]==e){i=t;break}}else i<0&&(i=t);i<0&&(i=391)}return ki[i]=e,i}function h1(e){for(var i=0;392!=i;++i)void 0!==e[i]&&UL(e[i],i)}function u0(){ki=function a6t(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "',e}()}var GE=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,D6t={"d.m":"d\\.m"};function hf(e,i){return UL(D6t[e]||e,i)}var Bu,oq=function(){var e={version:"1.2.0"},t=function i(){for(var ft=0,dt=new Array(256),pt=0;256!=pt;++pt)dt[pt]=ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=pt)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1;return typeof Int32Array<"u"?new Int32Array(dt):dt}(),r=function n(ft){var dt=0,pt=0,bt=0,Tt=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(bt=0;256!=bt;++bt)Tt[bt]=ft[bt];for(bt=0;256!=bt;++bt)for(pt=ft[bt],dt=256+bt;dt<4096;dt+=256)pt=Tt[dt]=pt>>>8^ft[255&pt];var Et=[];for(bt=1;16!=bt;++bt)Et[bt-1]=typeof Int32Array<"u"&&"function"==typeof Tt.subarray?Tt.subarray(256*bt,256*bt+256):Tt.slice(256*bt,256*bt+256);return Et}(t),s=r[0],o=r[1],l=r[2],w=r[3],C=r[4],M=r[5],P=r[6],O=r[7],L=r[8],U=r[9],X=r[10],W=r[11],Z=r[12],rt=r[13],st=r[14];return e.table=t,e.bstr=function vt(ft,dt){for(var pt=~dt,bt=0,Tt=ft.length;bt>>8^t[255&(pt^ft.charCodeAt(bt++))];return~pt},e.buf=function _t(ft,dt){for(var pt=~dt,bt=ft.length-15,Tt=0;Tt>8&255]^Z[ft[Tt++]^pt>>16&255]^W[ft[Tt++]^pt>>>24]^X[ft[Tt++]]^U[ft[Tt++]]^L[ft[Tt++]]^O[ft[Tt++]]^P[ft[Tt++]]^M[ft[Tt++]]^C[ft[Tt++]]^w[ft[Tt++]]^l[ft[Tt++]]^o[ft[Tt++]]^s[ft[Tt++]]^t[ft[Tt++]];for(bt+=15;Tt>>8^t[255&(pt^ft[Tt++])];return~pt},e.str=function Mt(ft,dt){for(var pt=~dt,bt=0,Tt=ft.length,Et=0,Dt=0;bt>>8^t[255&(pt^Et)]:Et<2048?pt=(pt=pt>>>8^t[255&(pt^(192|Et>>6&31))])>>>8^t[255&(pt^(128|63&Et))]:Et>=55296&&Et<57344?(Et=64+(1023&Et),Dt=1023&ft.charCodeAt(bt++),pt=(pt=(pt=(pt=pt>>>8^t[255&(pt^(240|Et>>8&7))])>>>8^t[255&(pt^(128|Et>>2&63))])>>>8^t[255&(pt^(128|Dt>>6&15|(3&Et)<<4))])>>>8^t[255&(pt^(128|63&Dt))]):pt=(pt=(pt=pt>>>8^t[255&(pt^(224|Et>>12&15))])>>>8^t[255&(pt^(128|Et>>6&63))])>>>8^t[255&(pt^(128|63&Et))];return~pt},e}(),Oi=function(){var w,i={};function n(At){if("/"==At.charAt(At.length-1))return-1===At.slice(0,-1).indexOf("/")?At:n(At.slice(0,-1));var Ot=At.lastIndexOf("/");return-1===Ot?At:At.slice(0,Ot+1)}function r(At){if("/"==At.charAt(At.length-1))return r(At.slice(0,-1));var Ot=At.lastIndexOf("/");return-1===Ot?At:At.slice(Ot+1)}function s(At,Ot){"string"==typeof Ot&&(Ot=new Date(Ot));var Rt=Ot.getHours();Rt=(Rt=Rt<<6|Ot.getMinutes())<<5|Ot.getSeconds()>>>1,At.write_shift(2,Rt);var kt=Ot.getFullYear()-1980;kt=(kt=kt<<4|Ot.getMonth()+1)<<5|Ot.getDate(),At.write_shift(2,kt)}function l(At){va(At,0);for(var Ot={},Rt=0;At.l<=At.length-4;){var kt=At.read_shift(2),Lt=At.read_shift(2),Nt=At.l+Lt,se={};switch(kt){case 21589:1&(Rt=At.read_shift(1))&&(se.mtime=At.read_shift(4)),Lt>5&&(2&Rt&&(se.atime=At.read_shift(4)),4&Rt&&(se.ctime=At.read_shift(4))),se.mtime&&(se.mt=new Date(1e3*se.mtime));break;case 1:var xe=At.read_shift(4),ie=At.read_shift(4);se.usz=ie*Math.pow(2,32)+xe,xe=At.read_shift(4),ie=At.read_shift(4),se.csz=ie*Math.pow(2,32)+xe}At.l=Nt,Ot[kt]=se}return Ot}function C(){return w||(w=Bu)}function M(At,Ot){if(80==At[0]&&75==At[1])return tw(At,Ot);if(109==(32|At[0])&&105==(32|At[1]))return function bp(At,Ot){if("mime-version:"!=Ne(At.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var Rt=Ot&&Ot.root||"",kt=(_n&&Buffer.isBuffer(At)?At.toString("binary"):Ne(At)).split("\r\n"),Lt=0,Nt="";for(Lt=0;Lt0&&(Rt=(Rt=Rt.slice(0,Rt.length-1)).slice(0,Rt.lastIndexOf("/")+1),Nt.slice(0,Rt.length)!=Rt););var se=(kt[1]||"").match(/boundary="(.*?)"/);if(!se)throw new Error("MAD cannot find boundary");var xe="--"+(se[1]||""),oe={FileIndex:[],FullPaths:[]};ft(oe);var ze,He=0;for(Lt=0;Lt=Lt&&(He-=Lt),!se[He]){ie=[];var ti=[];for(ze=He;ze>=0;){ti[ze]=!0,se[ze]=!0,xe[xe.length]=ze,ie.push(At[ze]);var Ge=Rt[Math.floor(4*ze/kt)];if(kt<4+(yi=4*ze&ae))throw new Error("FAT boundary crossed: "+ze+" 4 "+kt);if(!At[Ge]||ti[ze=Zm(At[Ge],yi)])break}Nt[He]={nodes:xe,data:Mq([ie])}}return Nt}(Yi,se,ae,kt);se0&&xe!==Dt&&(Cr[xe].name="!MiniFAT"),Cr[ae[0]].name="!FAT",Cr.fat_addrs=ae,Cr.ssz=kt;var Hr=[],zs=[],Qu=[];(function st(At,Ot,Rt,kt,Lt,Nt,se,xe){for(var yi,ie=0,ae=kt.length?2:0,oe=Ot[At].data,ze=0,He=0;ze0&&ie!==Dt&&(Ot[ie].name="!StreamData")):Ge.size>=4096?(Ge.storage="fat",void 0===Ot[Ge.start]&&(Ot[Ge.start]=Z(Rt,Ge.start,Ot.fat_addrs,Ot.ssz)),Ot[Ge.start].name=Ge.name,Ge.content=Ot[Ge.start].data.slice(0,Ge.size)):(Ge.storage="minifat",Ge.size<0?Ge.size=0:ie!==Dt&&Ge.start!==Dt&&Ot[ie]&&(Ge.content=X(Ge,Ot[ie].data,(Ot[xe]||{}).data))),Ge.content&&va(Ge.content,0),Nt[yi]=Ge,se.push(Ge)}})(se,Cr,Yi,Hr,Lt,{},zs,xe),function U(At,Ot,Rt){for(var kt=0,Lt=0,Nt=0,se=0,xe=0,ie=Rt.length,ae=[],oe=[];kt0&&se>=0;)Nt.push(Ot.slice(se*Et,se*Et+Et)),Lt-=Et,se=Zm(Rt,4*se);return 0===Nt.length?re(0):Ns(Nt).slice(0,At.size)}function W(At,Ot,Rt,kt,Lt){var Nt=Dt;if(At===Dt){if(0!==Ot)throw new Error("DIFAT chain shorter than expected")}else if(-1!==At){var se=Rt[At],xe=(kt>>>2)-1;if(!se)return;for(var ie=0;ie=1&&W(Zm(se,kt-4),Ot-1,Rt,kt,Lt)}}function Z(At,Ot,Rt,kt,Lt){var Nt=[],se=[];Lt||(Lt=[]);var xe=kt-1,ie=0,ae=0;for(ie=Ot;ie>=0;){Lt[ie]=!0,Nt[Nt.length]=ie,se.push(At[ie]);var oe=Rt[Math.floor(4*ie/kt)];if(kt<4+(ae=4*ie&xe))throw new Error("FAT boundary crossed: "+ie+" 4 "+kt);if(!At[oe])break;ie=Zm(At[oe],ae)}return{nodes:Nt,data:Mq([se])}}function vt(At,Ot){return new Date(1e3*(Ra(At,Ot+4)/1e7*Math.pow(2,32)+Ra(At,Ot)/1e7-11644473600))}function ft(At,Ot){var Rt=Ot||{},kt=Rt.root||"Root Entry";if(At.FullPaths||(At.FullPaths=[]),At.FileIndex||(At.FileIndex=[]),At.FullPaths.length!==At.FileIndex.length)throw new Error("inconsistent CFB structure");0===At.FullPaths.length&&(At.FullPaths[0]=kt+"/",At.FileIndex[0]={name:kt,type:5}),Rt.CLSID&&(At.FileIndex[0].clsid=Rt.CLSID),function dt(At){var Ot="\x01Sh33tJ5";if(!Oi.find(At,"/"+Ot)){var Rt=re(4);Rt[0]=55,Rt[1]=Rt[3]=50,Rt[2]=54,At.FileIndex.push({name:Ot,type:2,content:Rt,size:4,L:69,R:69,C:69}),At.FullPaths.push(At.FullPaths[0]+Ot),pt(At)}}(At)}function pt(At,Ot){ft(At);for(var Rt=!1,kt=!1,Lt=At.FullPaths.length-1;Lt>=0;--Lt){var Nt=At.FileIndex[Lt];switch(Nt.type){case 0:kt?Rt=!0:(At.FileIndex.pop(),At.FullPaths.pop());break;case 1:case 2:case 5:kt=!0,isNaN(Nt.R*Nt.L*Nt.C)&&(Rt=!0),Nt.R>-1&&Nt.L>-1&&Nt.R==Nt.L&&(Rt=!0);break;default:Rt=!0}}if(Rt||Ot){var se=new Date(1987,1,19),xe=0,ie=Object.create?Object.create(null):{},ae=[];for(Lt=0;Lt1?1:-1,ze.size=0,ze.type=5;else if("/"==He.slice(-1)){for(xe=Lt+1;xe=ae.length?-1:xe,xe=Lt+1;xe=ae.length?-1:xe,ze.type=1}else n(At.FullPaths[Lt+1]||"")==n(He)&&(ze.R=Lt+1),ze.type=2}}}function bt(At,Ot){var Rt=Ot||{};if("mad"==Rt.fileType)return function LA(At,Ot){for(var Rt=Ot||{},kt=Rt.boundary||"SheetJS",Lt=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(kt="------="+kt).slice(2)+'"',"","",""],Nt=At.FullPaths[0],se=Nt,xe=At.FileIndex[0],ie=1;ie=32&&yi<128&&++ze;var Ge=ze>=4*He/5;Lt.push(kt),Lt.push("Content-Location: "+(Rt.root||"file:///C:/SheetJS/")+se),Lt.push("Content-Transfer-Encoding: "+(Ge?"quoted-printable":"base64")),Lt.push("Content-Type: "+ew(xe,se)),Lt.push(""),Lt.push(Ge?FA(oe):$u(oe))}return Lt.push(kt+"--\r\n"),Lt.join("\r\n")}(At,Rt);if("zip"===(pt(At),Rt.fileType))return function yp(At,Ot){var Rt=Ot||{},kt=[],Lt=[],Nt=re(1),se=Rt.compression?8:0,xe=0,ae=0,oe=0,ze=0,He=0,yi=At.FullPaths[0],ti=yi,Ge=At.FileIndex[0],Yi=[],Cr=0;for(ae=1;ae0&&(Pa<4096?ti+=Pa+63>>6:Ge+=Pa+511>>9)}}for(var Hr=yi.FullPaths.length+3>>2,Qu=ti+127>>7,Tp=(ti+7>>3)+Ge+Hr+Qu,Rd=Tp+127>>7,I0=Rd<=109?0:Math.ceil((Rd-109)/127);Tp+Rd+I0+127>>7>Rd;)I0=++Rd<=109?0:Math.ceil((Rd-109)/127);var oc=[1,I0,Rd,Qu,Hr,Ge,ti,0];return yi.FileIndex[0].size=ti<<6,oc[7]=(yi.FileIndex[0].start=oc[0]+oc[1]+oc[2]+oc[3]+oc[4]+oc[5])+(oc[6]+7>>3),oc}(At),Lt=re(kt[7]<<9),Nt=0,se=0;for(Nt=0;Nt<8;++Nt)Lt.write_shift(1,ge[Nt]);for(Nt=0;Nt<8;++Nt)Lt.write_shift(2,0);for(Lt.write_shift(2,62),Lt.write_shift(2,3),Lt.write_shift(2,65534),Lt.write_shift(2,9),Lt.write_shift(2,6),Nt=0;Nt<3;++Nt)Lt.write_shift(2,0);for(Lt.write_shift(4,0),Lt.write_shift(4,kt[2]),Lt.write_shift(4,kt[0]+kt[1]+kt[2]+kt[3]-1),Lt.write_shift(4,0),Lt.write_shift(4,4096),Lt.write_shift(4,kt[3]?kt[0]+kt[1]+kt[2]-1:Dt),Lt.write_shift(4,kt[3]),Lt.write_shift(-4,kt[1]?kt[0]-1:Dt),Lt.write_shift(4,kt[1]),Nt=0;Nt<109;++Nt)Lt.write_shift(-4,Nt>9));for(xe(kt[6]+7>>3);511&Lt.l;)Lt.write_shift(-4,Qt.ENDOFCHAIN);for(se=Nt=0,ie=0;ie=4096)&&(oe.start=se,xe(ae+63>>6));for(;511&Lt.l;)Lt.write_shift(-4,Qt.ENDOFCHAIN);for(Nt=0;Nt31&&(console.error("Name "+He+" will be truncated to "+He.slice(0,31)),He=He.slice(0,31)),ae=2*(He.length+1),Lt.write_shift(64,He,"utf16le"),Lt.write_shift(2,ae),Lt.write_shift(1,oe.type),Lt.write_shift(1,oe.color),Lt.write_shift(-4,oe.L),Lt.write_shift(-4,oe.R),Lt.write_shift(-4,oe.C),oe.clsid)Lt.write_shift(16,oe.clsid,"hex");else for(ie=0;ie<4;++ie)Lt.write_shift(4,0);Lt.write_shift(4,oe.state||0),Lt.write_shift(4,0),Lt.write_shift(4,0),Lt.write_shift(4,0),Lt.write_shift(4,0),Lt.write_shift(4,oe.start),Lt.write_shift(4,oe.size),Lt.write_shift(4,0)}else{for(ie=0;ie<17;++ie)Lt.write_shift(4,0);for(ie=0;ie<3;++ie)Lt.write_shift(4,-1);for(ie=0;ie<12;++ie)Lt.write_shift(4,0)}}for(Nt=1;Nt=4096)if(Lt.l=oe.start+1<<9,_n&&Buffer.isBuffer(oe.content))oe.content.copy(Lt,Lt.l,0,oe.size),Lt.l+=oe.size+511&-512;else{for(ie=0;ie0&&oe.size<4096)if(_n&&Buffer.isBuffer(oe.content))oe.content.copy(Lt,Lt.l,0,oe.size),Lt.l+=oe.size+63&-64;else{for(ie=0;ie>16|Ot>>8|Ot));function Te(At,Ot){var Rt=Xt[255&At];return Ot<=8?Rt>>>8-Ot:(Rt=Rt<<8|Xt[At>>8&255],Ot<=16?Rt>>>16-Ot:(Rt=Rt<<8|Xt[At>>16&255])>>>24-Ot)}function Pt(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=6?0:At[kt+1]<<8))>>>Rt&3}function Ci(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=5?0:At[kt+1]<<8))>>>Rt&7}function Ue(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=3?0:At[kt+1]<<8))>>>Rt&31}function Bi(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=1?0:At[kt+1]<<8))>>>Rt&127}function en(At,Ot,Rt){var kt=7&Ot,Lt=Ot>>>3,se=At[Lt]>>>kt;return Rt<8-kt||(se|=At[Lt+1]<<8-kt,Rt<16-kt)||(se|=At[Lt+2]<<16-kt,Rt<24-kt)||(se|=At[Lt+3]<<24-kt),se&(1<>>3;return kt<=5?At[Lt]|=(7&Rt)<>8-kt),Ot+3}function nr(At,Ot,Rt){return At[Ot>>>3]|=Rt=(1&Rt)<<(7&Ot),Ot+1}function Jn(At,Ot,Rt){var Lt=Ot>>>3;return At[Lt]|=255&(Rt<<=7&Ot),At[Lt+1]=Rt>>>=8,Ot+8}function ls(At,Ot,Rt){var Lt=Ot>>>3;return At[Lt]|=255&(Rt<<=7&Ot),At[Lt+1]=255&(Rt>>>=8),At[Lt+2]=Rt>>>8,Ot+16}function Xa(At,Ot){var Rt=At.length,kt=2*Rt>Ot?2*Rt:Ot+5,Lt=0;if(Rt>=Ot)return At;if(_n){var Nt=WJ(kt);if(At.copy)At.copy(Nt);else for(;Lt>kt-ze,se=(1<=0;--se)Ot[xe|se<0;)ie[ie.l++]=xe[ae++]}return ie.l}(ie,ae):function se(xe,ie){for(var ae=0,oe=0,ze=jt?new Uint16Array(32768):[];oe0;)ie[ie.l++]=xe[oe++];ae=8*ie.l}else{ae=mi(ie,ae,+(oe+He==xe.length)+2);for(var yi=0;He-- >0;){var ti=xe[oe],Ge=-1,Yi=0;if((Ge=ze[yi=32767&(yi<<5^ti)])&&((Ge|=-32768&oe)>oe&&(Ge-=32768),Ge2){(ti=Lt[Yi])<=22?ae=Jn(ie,ae,Xt[ti+1]>>1)-1:(Jn(ie,ae,3),Jn(ie,ae+=5,Xt[ti-23]>>5),ae+=3);var Cr=ti<8?0:ti-4>>2;Cr>0&&(ls(ie,ae,Yi-ui[ti]),ae+=Cr),ae=Jn(ie,ae,Xt[ti=Ot[oe-Ge]]>>3),ae-=3;var Pa=ti<4?0:ti-2>>1;Pa>0&&(ls(ie,ae,oe-Ge-ii[ti]),ae+=Pa);for(var Hr=0;Hr>>3;return(At[kt]|(Rt<=4?0:At[kt+1]<<8))>>>Rt&15}(At,Ot+=5)+4;Ot+=4;for(var Nt=0,se=jt?new Uint8Array(19):Qe(19),xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ie=1,ae=jt?new Uint8Array(8):Qe(8),oe=jt?new Uint8Array(8):Qe(8),ze=se.length,He=0;He>8-ti;for(var Ge=(1<<7-ti)-1;Ge>=0;--Ge)$n[yi|Ge<>>=3){case 16:for(Nt=3+Pt(At,Ot),Ot+=2,yi=Yi[Yi.length-1];Nt-- >0;)Yi.push(yi);break;case 17:for(Nt=3+Ci(At,Ot),Ot+=3;Nt-- >0;)Yi.push(0);break;case 18:for(Nt=11+Bi(At,Ot),Ot+=7;Nt-- >0;)Yi.push(0);break;default:Yi.push(yi),ie>>0,xe=0,ie=0;!(1&kt);)if(kt=Ci(At,Rt),Rt+=3,kt>>>1)for(kt>>1==1?(xe=9,ie=5):(Rt=ac(At,Rt),xe=kr,ie=vp);;){!Ot&&se>>1==1?Co[oe]:Ji[oe];if(Rt+=15&ze,(ze>>>=4)>>>8&255){if(256==ze)break;var He=(ze-=257)<8?0:ze-4>>2;He>5&&(He=0);var yi=Nt+ui[ze];He>0&&(yi+=en(At,Rt,He),Rt+=He),oe=en(At,Rt,ie),Rt+=15&(ze=kt>>>1==1?qn[oe]:ji[oe]);var ti=(ze>>>=4)<4?0:ze-2>>1,Ge=ii[ze];for(ti>0&&(Ge+=en(At,Rt,ti),Rt+=ti),!Ot&&se>>3]|At[1+(Rt>>>3)]<<8;if(Rt+=32,ae>0)for(!Ot&&se0;)Lt[Nt++]=At[Rt>>>3],Rt+=8}return Ot?[Lt,Rt+7>>>3]:[Lt.slice(0,Nt),Rt+7>>>3]}(At.slice(At.l||0),Ot);return At.l+=kt[1],kt[0]}function A0(At,Ot){if(!At)throw new Error(Ot);typeof console<"u"&&console.error(Ot)}function tw(At,Ot){var Rt=At;va(Rt,0);var Nt={FileIndex:[],FullPaths:[]};ft(Nt,{root:Ot.root});for(var se=Rt.length-4;(80!=Rt[se]||75!=Rt[se+1]||5!=Rt[se+2]||6!=Rt[se+3])&&se>=0;)--se;Rt.l=se+4,Rt.l+=4;var xe=Rt.read_shift(2);Rt.l+=6;var ie=Rt.read_shift(4);for(Rt.l=ie,se=0;se>>=5);Rt>>>=4,kt.setMilliseconds(0),kt.setFullYear(Rt+1980),kt.setMonth(Nt-1),kt.setDate(Lt);var se=31&Ot,xe=63&(Ot>>>=5);return kt.setHours(Ot>>>=6),kt.setMinutes(xe),kt.setSeconds(se<<1),kt}(At);if(8257&Nt)throw new Error("Unsupported ZIP encryption");At.read_shift(4);for(var ae=At.read_shift(4),oe=At.read_shift(4),ze=At.read_shift(2),He=At.read_shift(2),yi="",ti=0;ti"u")throw new Error("Unsupported");return new Uint8Array(e)}(e):e}function f1(e,i,t){if(typeof Bu<"u"&&Bu.writeFileSync)return t?Bu.writeFileSync(e,i,t):Bu.writeFileSync(e,i);if(typeof Deno<"u"){if(t&&"string"==typeof i)switch(t){case"utf8":i=new TextEncoder(t).encode(i);break;case"binary":i=c1(i);break;default:throw new Error("Unsupported encoding "+t)}return Deno.writeFileSync(e,i)}var n="utf8"==t?Cd(i):i;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var r=new Blob([lq(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(r,e);if(typeof saveAs<"u")return saveAs(r,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var s=URL.createObjectURL(r);if("object"==typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),chrome.downloads.download({url:s,filename:e,saveAs:!0});var o=document.createElement("a");if(null!=o.download)return o.download=e,o.href=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),s}else if(typeof URL<"u"&&!URL.createObjectURL&&"object"==typeof chrome){var l="data:application/octet-stream;base64,"+function e6t(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0,w=0,C=0;C>2,o=(3&t)<<4|(n=e[C++])>>4,l=(15&n)<<2|(r=e[C++])>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=ho.charAt(s)+ho.charAt(o)+ho.charAt(l)+ho.charAt(w);return i}(new Uint8Array(lq(n)));return chrome.downloads.download({url:l,filename:e,saveAs:!0})}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var w=File(e);return w.open("w"),w.encoding="binary",Array.isArray(i)&&(i=wd(i)),w.write(i),w.close(),i}catch(C){if(!C.message||-1==C.message.indexOf("onstruct"))throw C}throw new Error("cannot save file "+e)}function Jr(e){for(var i=Object.keys(e),t=[],n=0;n=60&&e<61)return e;var i=new Date;return i.setTime(24*(e>60?e:e+1)*60*60*1e3+dq),i}var O6t=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/,L6t=/^(\d+)-(\d+)-(\d+)$/,uq=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;function os(e,i){if(e instanceof Date)return e;var t=e.match(O6t);return t?new Date((i?P6t:k6t)+1e3*(60*(60*parseInt(t[1],10)+parseInt(t[2],10))+(t[3]?parseInt(t[3].slice(1),10):0))+(t[4]?parseInt((t[4]+"000").slice(1,4),10):0)):(t=e.match(L6t))?new Date(Date.UTC(+t[1],+t[2]-1,+t[3],0,0,0,0)):(t=e.match(uq))?new Date(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4],+t[5],t[6]&&parseInt(t[6].slice(1),10)||0,t[7]&&parseInt((t[7]+"0000").slice(1,4),10)||0)):new Date(e)}function Ym(e,i){if(_n&&Buffer.isBuffer(e)){if(i&&l1){if(255==e[0]&&254==e[1])return Cd(e.slice(2).toString("utf16le"));if(254==e[1]&&255==e[2])return Cd(function GJ(e){for(var i=[],t=0;t>1;++t)i[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return i.join("")}(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(i){if(255==e[0]&&254==e[1])return Cd(new TextDecoder("utf-16le").decode(e.slice(2)));if(254==e[0]&&255==e[1])return Cd(new TextDecoder("utf-16be").decode(e.slice(2)))}var t={"\u20ac":"\x80","\u201a":"\x82",\u0192:"\x83","\u201e":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87",\u02c6:"\x88","\u2030":"\x89",\u0160:"\x8a","\u2039":"\x8b",\u0152:"\x8c",\u017d:"\x8e","\u2018":"\x91","\u2019":"\x92","\u201c":"\x93","\u201d":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02dc":"\x98","\u2122":"\x99",\u0161:"\x9a","\u203a":"\x9b",\u0153:"\x9c",\u017e:"\x9e",\u0178:"\x9f"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178]/g,function(s){return t[s]||s})}catch{}var n=[],r=0;try{for(r=0;r3&&-1==H6t.indexOf(i))return s}else if(i.replace(/[ap]m?/,"").match(/[a-z]/))return s;return o<0||o>8099||e.match(/[^-0-9:,\/\\\ ]/)?s:r}function $m(e){return new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function XE(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}function cn(e,i,t){if(e.FullPaths){var n;if("string"==typeof t)return n=_n?bd(t):function n6t(e){for(var i=[],t=0,n=e.length+250,r=uf(e.length+255),s=0;s>6&31,r[t++]=128|63&o;else if(o>=55296&&o<57344){o=64+(1023&o);var l=1023&e.charCodeAt(++s);r[t++]=240|o>>8&7,r[t++]=128|o>>2&63,r[t++]=128|l>>6&15|(3&o)<<4,r[t++]=128|63&l}else r[t++]=224|o>>12&15,r[t++]=128|o>>6&63,r[t++]=128|63&o;t>n&&(i.push(r.slice(0,t)),t=0,r=uf(65535),n=65530)}return i.push(r.slice(0,t)),Ns(i)}(t),Oi.utils.cfb_add(e,i,n);Oi.utils.cfb_add(e,i,t)}else e.file(i,t)}function WL(){return Oi.utils.cfb_new()}var Bs='\r\n',XL=HE({""":'"',"'":"'",">":">","<":"<","&":"&"}),jL=/[&<>'"]/g,q6t=/[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;function gn(e){return(e+"").replace(jL,function(t){return XL[t]}).replace(q6t,function(t){return"_x"+("000"+t.charCodeAt(0).toString(16)).slice(-4)+"_"})}function bq(e){return gn(e).replace(/ /g,"_x0020_")}var wq=/[\u0000-\u001f]/g;function g1(e){return(e+"").replace(jL,function(t){return XL[t]}).replace(/\n/g,"
").replace(wq,function(t){return"&#x"+("000"+t.charCodeAt(0).toString(16)).slice(-4)+";"})}function YL(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0;t191&&n<224?(o=(31&n)<<6,o|=63&r,i+=String.fromCharCode(o)):(s=e.charCodeAt(t++),n<240?i+=String.fromCharCode((15&n)<<12|(63&r)<<6|63&s):(l=((7&n)<<18|(63&r)<<12|(63&s)<<6|63&(o=e.charCodeAt(t++)))-65536,i+=String.fromCharCode(55296+(l>>>10&1023)),i+=String.fromCharCode(56320+(1023&l)))));return i}function Tq(e){var t,n,l,i=uf(2*e.length),r=1,s=0,o=0;for(n=0;n>>10&1023),t=56320+(1023&t)),0!==o&&(i[s++]=255&o,i[s++]=o>>>8,o=0),i[s++]=t%256,i[s++]=t>>>8;return i.slice(0,s).toString("ucs2")}function Cq(e){return bd(e,"binary").toString("utf8")}var jE="foo bar baz\xe2\x98\x83\xf0\x9f\x8d\xa3",gr=_n&&(Cq(jE)==YL(jE)&&Cq||Tq(jE)==YL(jE)&&Tq)||YL,Cd=_n?function(e){return bd(e,"utf8").toString("binary")}:function(e){for(var i=[],t=0,n=0,r=0;t>6))),i.push(String.fromCharCode(128+(63&n)));break;case n>=55296&&n<57344:n-=55296,r=e.charCodeAt(t++)-56320+(n<<10),i.push(String.fromCharCode(240+(r>>18&7))),i.push(String.fromCharCode(144+(r>>12&63))),i.push(String.fromCharCode(128+(r>>6&63))),i.push(String.fromCharCode(128+(63&r)));break;default:i.push(String.fromCharCode(224+(n>>12))),i.push(String.fromCharCode(128+(n>>6&63))),i.push(String.fromCharCode(128+(63&n)))}return i.join("")},Aq=/(^\s|\s$|\n)/;function Wa(e,i){return"<"+e+(i.match(Aq)?' xml:space="preserve"':"")+">"+i+""}function v1(e){return Jr(e).map(function(i){return" "+i+'="'+e[i]+'"'}).join("")}function We(e,i,t){return"<"+e+(null!=t?v1(t):"")+(null!=i?(i.match(Aq)?' xml:space="preserve"':"")+">"+i+""}function $L(e,i){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(i)throw t}return""}var ga={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Km=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],Il={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"},Dq=function(e){for(var i=[],n=0;n0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(i){return Buffer.isBuffer(i)?i:bd(i)})):Dq(e)}:Dq,Iq=function(e,i,t){for(var n=[],r=i;r0?f0(e,i+4,i+4+t-1):""},QL=Fq,Oq=function(e,i){var t=Ra(e,i);return t>0?f0(e,i+4,i+4+t-1):""},KL=Oq,Lq=function(e,i){var t=2*Ra(e,i);return t>0?f0(e,i+4,i+4+t-1):""},ZL=Lq,Nq=function(i,t){var n=Ra(i,t);return n>0?$E(i,t+4,t+4+n):""},JL=Nq,Bq=function(e,i){var t=Ra(e,i);return t>0?f0(e,i+4,i+4+t):""},qL=Bq,Vq=function(e,i){return function s9t(e,i){for(var t=1-2*(e[i+7]>>>7),n=((127&e[i+7])<<4)+(e[i+6]>>>4&15),r=15&e[i+6],s=5;s>=0;--s)r=256*r+e[i+s];return 2047==n?0==r?t*(1/0):NaN:(0==n?n=-1022:(n-=1023,r+=Math.pow(2,52)),t*Math.pow(2,n-52)*r)}(e,i)},QE=Vq,tN=function(i){return Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array};_n&&(QL=function(i,t){if(!Buffer.isBuffer(i))return Fq(i,t);var n=i.readUInt32LE(t);return n>0?i.toString("utf8",t+4,t+4+n-1):""},KL=function(i,t){if(!Buffer.isBuffer(i))return Oq(i,t);var n=i.readUInt32LE(t);return n>0?i.toString("utf8",t+4,t+4+n-1):""},ZL=function(i,t){if(!Buffer.isBuffer(i)||!l1)return Lq(i,t);var n=2*i.readUInt32LE(t);return i.toString("utf16le",t+4,t+4+n-1)},JL=function(i,t){if(!Buffer.isBuffer(i)||!l1)return Nq(i,t);var n=i.readUInt32LE(t);return i.toString("utf16le",t+4,t+4+n)},qL=function(i,t){if(!Buffer.isBuffer(i))return Bq(i,t);var n=i.readUInt32LE(t);return i.toString("utf8",t+4,t+4+n)},QE=function(i,t){return Buffer.isBuffer(i)?i.readDoubleLE(t):Vq(i,t)},tN=function(i){return Buffer.isBuffer(i)||Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array}),typeof pn<"u"&&function Uq(){$E=function(e,i,t){return pn.utils.decode(1200,e.slice(i,t)).replace(fo,"")},f0=function(e,i,t){return pn.utils.decode(65001,e.slice(i,t))},QL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(Xm,e.slice(i+4,i+4+t-1)):""},KL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(pa,e.slice(i+4,i+4+t-1)):""},ZL=function(e,i){var t=2*Ra(e,i);return t>0?pn.utils.decode(1200,e.slice(i+4,i+4+t-1)):""},JL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(1200,e.slice(i+4,i+4+t)):""},qL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(65001,e.slice(i+4,i+4+t)):""}}();var m0=function(e,i){return e[i]},Uu=function(e,i){return 256*e[i+1]+e[i]},o9t=function(e,i){var t=256*e[i+1]+e[i];return t<32768?t:-1*(65535-t+1)},Ra=function(e,i){return e[i+3]*(1<<24)+(e[i+2]<<16)+(e[i+1]<<8)+e[i]},Zm=function(e,i){return e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]},l9t=function(e,i){return e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]};function x1(e,i){var n,r,o,l,w,C,t="",s=[];switch(i){case"dbcs":if(C=this.l,_n&&Buffer.isBuffer(this)&&l1)t=this.slice(this.l,this.l+2*e).toString("utf16le");else for(w=0;w0?Zm:l9t)(this,this.l),this.l+=4,n);case 8:case-8:if("f"===i)return r=8==e?QE(this,this.l):QE([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,r;e=8;case 16:t=kq(this,this.l,e)}}return this.l+=e,t}var c9t=function(e,i,t){e[t]=255&i,e[t+1]=i>>>8&255,e[t+2]=i>>>16&255,e[t+3]=i>>>24&255},d9t=function(e,i,t){e[t]=255&i,e[t+1]=i>>8&255,e[t+2]=i>>16&255,e[t+3]=i>>24&255},u9t=function(e,i,t){e[t]=255&i,e[t+1]=i>>>8&255};function h9t(e,i,t){var n=0,r=0;if("dbcs"===t){for(r=0;r!=i.length;++r)u9t(this,i.charCodeAt(r),this.l+2*r);n=2*i.length}else if("sbcs"===t||"cpstr"==t)if(typeof pn<"u"&&874==Xm){for(r=0;r!=i.length;++r){var s=pn.utils.encode(Xm,i.charAt(r));this[this.l+r]=s[0]}n=i.length}else if(typeof pn<"u"&&"cpstr"==t){if((s=pn.utils.encode(pa,i)).length==i.length)for(r=0;r>8}for(;this.l>>=8);break;case 3:n=3,this[this.l]=255&i,this[this.l+1]=255&(i>>>=8),this[this.l+2]=255&(i>>>=8);break;case 4:n=4,c9t(this,i,this.l);break;case 8:if(n=8,"f"===t){!function a9t(e,i,t){var n=(i<0||1/i==-1/0?1:0)<<7,r=0,s=0,o=n?-i:i;isFinite(o)?0==o?r=s=0:(r=Math.floor(Math.log(o)/Math.LN2),s=o*Math.pow(2,52-r),r<=-1023&&(!isFinite(s)||s>4|n}(this,i,this.l);break}case 16:break;case-4:n=4,d9t(this,i,this.l)}}return this.l+=n,this}function zq(e,i){var t=kq(this,this.l,e.length>>1);if(t!==e)throw new Error(i+"Expected "+e+" saw "+t);this.l+=e.length>>1}function va(e,i){e.l=i,e.read_shift=x1,e.chk=zq,e.write_shift=h9t}function mo(e,i){e.l+=i}function re(e){var i=uf(e);return va(i,0),i}function po(){var e=[],i=_n?256:2048,t=function(C){var M=re(C);return va(M,0),M},n=t(i),r=function(){n&&(n.l&&(n.length>n.l&&((n=n.slice(0,n.l)).l=n.length),n.length>0&&e.push(n)),n=null)},s=function(C){return n&&C=128?1:0)+1,n>=128&&++s,n>=16384&&++s,n>=2097152&&++s;var o=e.next(s);r<=127?o.write_shift(1,r):(o.write_shift(1,128+(127&r)),o.write_shift(1,r>>7));for(var l=0;4!=l;++l){if(!(n>=128)){o.write_shift(1,n);break}o.write_shift(1,128+(127&n)),n>>=7}n>0&&tN(t)&&e.push(t)}}function y1(e,i,t){var n=pr(e);if(i.s?(n.cRel&&(n.c+=i.s.c),n.rRel&&(n.r+=i.s.r)):(n.cRel&&(n.c+=i.c),n.rRel&&(n.r+=i.r)),!t||t.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function Gq(e,i,t){var n=pr(e);return n.s=y1(n.s,i.s,t),n.e=y1(n.e,i.s,t),n}function b1(e,i){if(e.cRel&&e.c<0)for(e=pr(e);e.c<0;)e.c+=i>8?16384:256;if(e.rRel&&e.r<0)for(e=pr(e);e.r<0;)e.r+=i>8?1048576:i>5?65536:16384;var t=Tn(e);return!e.cRel&&null!=e.cRel&&(t=function p9t(e){return e.replace(/^([A-Z])/,"$$$1")}(t)),!e.rRel&&null!=e.rRel&&(t=function f9t(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(t)),t}function eN(e,i){return 0!=e.s.r||e.s.rRel||e.e.r!=(i.biff>=12?1048575:i.biff>=8?65536:16384)||e.e.rRel?0!=e.s.c||e.s.cRel||e.e.c!=(i.biff>=12?16383:255)||e.e.cRel?b1(e.s,i.biff)+":"+b1(e.e,i.biff):(e.s.rRel?"":"$")+kn(e.s.r)+":"+(e.e.rRel?"":"$")+kn(e.e.r):(e.s.cRel?"":"$")+dn(e.s.c)+":"+(e.e.cRel?"":"$")+dn(e.e.c)}function iN(e){return parseInt(function m9t(e){return e.replace(/\$(\d+)$/,"$1")}(e),10)-1}function kn(e){return""+(e+1)}function nN(e){for(var i=function g9t(e){return e.replace(/^\$([A-Z])/,"$1")}(e),t=0,n=0;n!==i.length;++n)t=26*t+i.charCodeAt(n)-64;return t-1}function dn(e){if(e<0)throw new Error("invalid column "+e);var i="";for(++e;e;e=Math.floor((e-1)/26))i=String.fromCharCode((e-1)%26+65)+i;return i}function vr(e){for(var i=0,t=0,n=0;n=48&&r<=57?i=10*i+(r-48):r>=65&&r<=90&&(t=26*t+(r-64))}return{c:t-1,r:i-1}}function Tn(e){for(var i=e.c+1,t="";i;i=(i-1)/26|0)t=String.fromCharCode((i-1)%26+65)+t;return t+(e.r+1)}function xa(e){var i=e.indexOf(":");return-1==i?{s:vr(e),e:vr(e)}:{s:vr(e.slice(0,i)),e:vr(e.slice(i+1))}}function un(e,i){return typeof i>"u"||"number"==typeof i?un(e.s,e.e):("string"!=typeof e&&(e=Tn(e)),"string"!=typeof i&&(i=Tn(i)),e==i?e:e+":"+i)}function w1(e){var i=xa(e);return"$"+dn(i.s.c)+"$"+kn(i.s.r)+":$"+dn(i.e.c)+"$"+kn(i.e.r)}function _1(e,i){if(!(e||i&&i.biff<=5&&i.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e.replace(/'/g,"''")+"'":e}function Gn(e){var i={s:{c:0,r:0},e:{c:0,r:0}},t=0,n=0,r=0,s=e.length;for(t=0;n26);++n)t=26*t+r;for(i.s.c=--t,t=0;n9);++n)t=10*t+r;if(i.s.r=--t,n===s||10!=r)return i.e.c=i.s.c,i.e.r=i.s.r,i;for(++n,t=0;n!=s&&!((r=e.charCodeAt(n)-64)<1||r>26);++n)t=26*t+r;for(i.e.c=--t,t=0;n!=s&&!((r=e.charCodeAt(n)-48)<0||r>9);++n)t=10*t+r;return i.e.r=--t,i}function Sd(e,i,t){return null==e||null==e.t||"z"==e.t?"":void 0!==e.w?e.w:("d"==e.t&&!e.z&&t&&t.dateNF&&(e.z=t.dateNF),"e"==e.t?ec[e.v]||e.v:function Hq(e,i){var t="d"==e.t&&i instanceof Date;if(null!=e.z)try{return e.w=nl(e.z,t?ms(i):i)}catch{}try{return e.w=nl((e.XF||{}).numFmtId||(t?14:0),t?ms(i):i)}catch{return""+i}}(e,null==i?e.v:i))}function ff(e,i){var t=i&&i.sheet?i.sheet:"Sheet1",n={};return n[t]=e,{SheetNames:[t],Sheets:n}}function Wq(e,i,t){var n=t||{},r=e?null!=e["!data"]:n.dense;null!=Ls&&null==r&&(r=Ls);var s=e||{};r&&!s["!data"]&&(s["!data"]=[]);var o=0,l=0;if(s&&null!=n.origin)if("number"==typeof n.origin)o=n.origin;else{var w="string"==typeof n.origin?vr(n.origin):n.origin;o=w.r,l=w.c}var C={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(s["!ref"]){var M=Gn(s["!ref"]);C.s.c=M.s.c,C.s.r=M.s.r,C.e.c=Math.max(C.e.c,M.e.c),C.e.r=Math.max(C.e.r,M.e.r),-1==o&&(C.e.r=o=s["!ref"]?M.e.r+1:0)}else C.s.c=C.e.c=C.s.r=C.e.r=0;for(var P=[],O=!1,L=0;L!=i.length;++L)if(i[L]){if(!Array.isArray(i[L]))throw new Error("aoa_to_sheet expects an array of arrays");var U=o+L,X=""+(U+1);r&&(s["!data"][U]||(s["!data"][U]=[]),P=s["!data"][U]);for(var W=0;W!=i[L].length;++W)if(!(typeof i[L][W]>"u")){var Z={v:i[L][W]},rt=l+W;if(C.s.r>U&&(C.s.r=U),C.s.c>rt&&(C.s.c=rt),C.e.r0&&i.write_shift(0,e,"dbcs"),t?i.slice(0,i.l):i}function b9t(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function rN(e,i){var t=e.l,n=e.read_shift(1),r=go(e),s=[],o={t:r,h:r};if(1&n){for(var l=e.read_shift(4),w=0;w!=l;++w)s.push(b9t(e));o.r=s}else o.r=[{ich:0,ifnt:0}];return e.l=t+i,o}var T9t=rN;function tc(e){var i=e.read_shift(4),t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:i,iStyleRef:t}}function Jm(e,i){return null==i&&(i=re(8)),i.write_shift(-4,e.c),i.write_shift(3,e.iStyleRef||e.s),i.write_shift(1,0),i}function qm(e){var i=e.read_shift(2);return i+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:i}}function tp(e,i){return null==i&&(i=re(4)),i.write_shift(3,e.iStyleRef||e.s),i.write_shift(1,0),i}var S9t=go,Xq=ya;function KE(e){var i=e.read_shift(4);return 0===i||4294967295===i?"":e.read_shift(i,"dbcs")}function T1(e,i){var t=!1;return null==i&&(t=!0,i=re(127)),i.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&i.write_shift(0,e,"dbcs"),t?i.slice(0,i.l):i}var E9t=go,sN=KE,aN=T1;function ZE(e){var i=e.slice(e.l,e.l+4),t=1&i[0],n=2&i[0];e.l+=4;var r=0===n?QE([0,0,0,0,252&i[0],i[1],i[2],i[3]],0):Zm(i,0)>>2;return t?r/100:r}function jq(e,i){null==i&&(i=re(4));var t=0,n=0,r=100*e;if(e==(0|e)&&e>=-(1<<29)&&e<1<<29?n=1:r==(0|r)&&r>=-(1<<29)&&r<1<<29&&(n=1,t=1),!n)throw new Error("unsupported RkNumber "+e);i.write_shift(-4,((t?r:e)<<2)+(t+2))}function Yq(e){var i={s:{},e:{}};return i.s.r=e.read_shift(4),i.e.r=e.read_shift(4),i.s.c=e.read_shift(4),i.e.c=e.read_shift(4),i}var ep=Yq,g0=function A9t(e,i){return i||(i=re(16)),i.write_shift(4,e.s.r),i.write_shift(4,e.e.r),i.write_shift(4,e.s.c),i.write_shift(4,e.e.c),i};function vo(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function ip(e,i){return(i||re(8)).write_shift(8,e,"f")}function JE(e,i){if(i||(i=re(8)),!e||e.auto)return i.write_shift(4,0),i.write_shift(4,0),i;null!=e.index?(i.write_shift(1,2),i.write_shift(1,e.index)):null!=e.theme?(i.write_shift(1,6),i.write_shift(1,e.theme)):(i.write_shift(1,5),i.write_shift(1,0));var t=e.tint||0;if(t>0?t*=32767:t<0&&(t*=32768),i.write_shift(2,t),e.rgb&&null==e.theme){var n=e.rgb||"FFFFFF";"number"==typeof n&&(n=("000000"+n.toString(16)).slice(-6)),i.write_shift(1,parseInt(n.slice(0,2),16)),i.write_shift(1,parseInt(n.slice(2,4),16)),i.write_shift(1,parseInt(n.slice(4,6),16)),i.write_shift(1,255)}else i.write_shift(2,0),i.write_shift(1,0),i.write_shift(1,0);return i}var lN={1:{n:"CodePage",t:2},2:{n:"Category",t:80},3:{n:"PresentationFormat",t:80},4:{n:"ByteCount",t:3},5:{n:"LineCount",t:3},6:{n:"ParagraphCount",t:3},7:{n:"SlideCount",t:3},8:{n:"NoteCount",t:3},9:{n:"HiddenCount",t:3},10:{n:"MultimediaClipCount",t:3},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:80},15:{n:"Company",t:80},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:3},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:3,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:80},27:{n:"ContentStatus",t:80},28:{n:"Language",t:80},29:{n:"Version",t:80},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},cN={1:{n:"CodePage",t:2},2:{n:"Title",t:80},3:{n:"Subject",t:80},4:{n:"Author",t:80},5:{n:"Keywords",t:80},6:{n:"Comments",t:80},7:{n:"Template",t:80},8:{n:"LastAuthor",t:80},9:{n:"RevNumber",t:80},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:3},15:{n:"WordCount",t:3},16:{n:"CharCount",t:3},17:{n:"Thumbnail",t:71},18:{n:"Application",t:80},19:{n:"DocSecurity",t:3},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}};function V9t(e){return e.map(function(i){return[i>>16&255,i>>8&255,255&i]})}var np=pr(V9t([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),ec={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},C1={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},dN=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"],uN={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},iA={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function Jq(e,i,t){var s,n=function R6t(e){for(var i=[],t=Jr(e),n=0;n!==t.length;++n)null==i[e[t[n]]]&&(i[e[t[n]]]=[]),i[e[t[n]]].push(t[n]);return i}(uN),r=[];t||(r[r.length]=Bs,r[r.length]=We("Types",null,{xmlns:ga.CT,"xmlns:xsd":ga.xsd,"xmlns:xsi":ga.xsi}),r=r.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(C){return We("Default",null,{Extension:C[0],ContentType:C[1]})})));var o=function(C){e[C]&&e[C].length>0&&(r[r.length]=We("Override",null,{PartName:("/"==(s=e[C][0])[0]?"":"/")+s,ContentType:iA[C][i.bookType]||iA[C].xlsx}))},l=function(C){(e[C]||[]).forEach(function(M){r[r.length]=We("Override",null,{PartName:("/"==M[0]?"":"/")+M,ContentType:iA[C][i.bookType]||iA[C].xlsx})})},w=function(C){(e[C]||[]).forEach(function(M){r[r.length]=We("Override",null,{PartName:("/"==M[0]?"":"/")+M,ContentType:n[C][0]})})};return o("workbooks"),l("sheets"),l("charts"),w("themes"),["strs","styles"].forEach(o),["coreprops","extprops","custprops"].forEach(w),w("vba"),w("comments"),w("threadedcomments"),w("drawings"),l("metadata"),w("people"),!t&&r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var hn={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function S1(e){var i=e.lastIndexOf("/");return e.slice(0,i+1)+"_rels/"+e.slice(i+1)+".rels"}function v0(e){var i=[Bs,We("Relationships",null,{xmlns:ga.RELS})];return Jr(e["!id"]).forEach(function(t){i[i.length]=We("Relationship",null,e["!id"][t])}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function dr(e,i,t,n,r,s){if(r||(r={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),i<0)for(i=e["!idx"];e["!id"]["rId"+i];++i);if(e["!idx"]=i+1,r.Id="rId"+i,r.Type=n,r.Target=t,s?r.TargetMode=s:[hn.HLINK,hn.XPATH,hn.XMISS].indexOf(r.Type)>-1&&(r.TargetMode="External"),e["!id"][r.Id])throw new Error("Cannot rewrite rId "+i);return e["!id"][r.Id]=r,e[("/"+r.Target).replace("//","/")]=r,i}function qq(e,i,t){return[' \n',' \n'," \n"].join("")}function X9t(e,i){return[' \n',' \n'," \n"].join("")}function ttt(e,i){return'SheetJS '+a1.version+""}var Gu=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function fN(e,i,t,n,r){null!=r[e]||null==i||""===i||(r[e]=i,i=gn(i),n[n.length]=t?We(e,i,t):Wa(e,i))}function itt(e,i){var t=i||{},n=[Bs,We("cp:coreProperties",null,{"xmlns:cp":ga.CORE_PROPS,"xmlns:dc":ga.dc,"xmlns:dcterms":ga.dcterms,"xmlns:dcmitype":ga.dcmitype,"xmlns:xsi":ga.xsi})],r={};if(!e&&!t.Props)return n.join("");e&&(null!=e.CreatedDate&&fN("dcterms:created","string"==typeof e.CreatedDate?e.CreatedDate:$L(e.CreatedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,r),null!=e.ModifiedDate&&fN("dcterms:modified","string"==typeof e.ModifiedDate?e.ModifiedDate:$L(e.ModifiedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,r));for(var s=0;s!=Gu.length;++s){var o=Gu[s],l=t.Props&&null!=t.Props[o[1]]?t.Props[o[1]]:e?e[o[1]]:null;!0===l?l="1":!1===l?l="0":"number"==typeof l&&(l=String(l)),null!=l&&fN(o[0],l,null,n,r)}return n.length>2&&(n[n.length]="",n[1]=n[1].replace("/>",">")),n.join("")}var rp=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],ntt=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function stt(e){var i=[],t=We;return e||(e={}),e.Application="SheetJS",i[i.length]=Bs,i[i.length]=We("Properties",null,{xmlns:ga.EXT_PROPS,"xmlns:vt":ga.vt}),rp.forEach(function(n){if(void 0!==e[n[1]]){var r;switch(n[2]){case"string":r=gn(String(e[n[1]]));break;case"bool":r=e[n[1]]?"true":"false"}void 0!==r&&(i[i.length]=t(n[0],r))}}),i[i.length]=t("HeadingPairs",t("vt:vector",t("vt:variant","Worksheets")+t("vt:variant",t("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),i[i.length]=t("TitlesOfParts",t("vt:vector",e.SheetNames.map(function(n){return""+gn(n)+""}).join(""),{size:e.Worksheets,baseType:"lpstr"})),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function att(e){var i=[Bs,We("Properties",null,{xmlns:ga.CUST_PROPS,"xmlns:vt":ga.vt})];if(!e)return i.join("");var t=1;return Jr(e).forEach(function(r){++t,i[i.length]=We("property",function r9t(e,i){switch(typeof e){case"string":var t=We("vt:lpwstr",gn(e));return i&&(t=t.replace(/"/g,"_x0022_")),t;case"number":return We((0|e)==e?"vt:i4":"vt:r8",gn(String(e)));case"boolean":return We("vt:bool",e?"true":"false")}if(e instanceof Date)return We("vt:filetime",$L(e));throw new Error("Unable to serialize "+e)}(e[r],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:gn(r)})}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}var mN={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function htt(e,i){var t=re(4),n=re(4);switch(t.write_shift(4,80==e?31:e),e){case 3:n.write_shift(-4,i);break;case 5:(n=re(8)).write_shift(8,i,"f");break;case 11:n.write_shift(4,i?1:0);break;case 64:n=function q9t(e){var t=("string"==typeof e?new Date(Date.parse(e)):e).getTime()/1e3+11644473600,n=t%Math.pow(2,32),r=(t-n)/Math.pow(2,32);r*=1e7;var s=(n*=1e7)/Math.pow(2,32)|0;s>0&&(n%=Math.pow(2,32),r+=s);var o=re(8);return o.write_shift(4,n),o.write_shift(4,r),o}(i);break;case 31:case 80:for((n=re(4+2*(i.length+1)+(i.length%2?0:2))).write_shift(4,i.length+1),n.write_shift(0,i,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+i)}return Ns([t,n])}var mtt=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function aUt(e){switch(typeof e){case"boolean":return 11;case"number":return(0|e)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64}return-1}function ptt(e,i,t){var n=re(8),r=[],s=[],o=8,l=0,w=re(8),C=re(8);if(w.write_shift(4,2),w.write_shift(4,1200),C.write_shift(4,1),s.push(w),r.push(C),o+=8+w.length,!i){(C=re(8)).write_shift(4,0),r.unshift(C);var M=[re(4)];for(M[0].write_shift(4,e.length),l=0;l-1||ntt.indexOf(e[l][0])>-1)&&null!=e[l][1]){var O=e[l][1],L=0;if(i){var U=t[L=+i[e[l][0]]];if("version"==U.p&&"string"==typeof O){var X=O.split(".");O=(+X[0]<<16)+(+X[1]||0)}w=htt(U.t,O)}else{var W=aUt(O);-1==W&&(W=31,O=String(O)),w=htt(W,O)}s.push(w),(C=re(8)).write_shift(4,i?L:2+l),r.push(C),o+=8+w.length}var Z=8*(s.length+1);for(l=0;l=12?2:1),r="sbcs-cont",s=pa;t&&t.biff>=8&&(pa=1200),t&&8!=t.biff?12==t.biff&&(r="wstr"):e.read_shift(1)&&(r="dbcs-cont"),t.biff>=2&&t.biff<=5&&(r="cpstr");var l=n?e.read_shift(n,r):"";return pa=s,l}function dUt(e){var i=e.t||"",n=re(3);n.write_shift(2,i.length),n.write_shift(1,1);var r=re(2*i.length);return r.write_shift(2*i.length,i,"utf16le"),Ns([n,r])}function wtt(e,i,t){return t||(t=re(3+2*e.length)),t.write_shift(2,e.length),t.write_shift(1,1),t.write_shift(31,e,"utf16le"),t}function _tt(e,i){i||(i=re(6+2*e.length)),i.write_shift(4,1+e.length);for(var t=0;t-1?31:23;switch(n.charAt(0)){case"#":s=28;break;case".":s&=-3}i.write_shift(4,2),i.write_shift(4,s);var o=[8,6815827,6619237,4849780,83];for(t=0;t-1?n.slice(0,r):n;for(i.write_shift(4,2*(l.length+1)),t=0;t-1?n.slice(r+1):"",i)}else{for(o="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),t=0;t8?4:2;return[e.read_shift(n),e.read_shift(n,"i"),e.read_shift(n,"i")]}function sA(e){var i=e.read_shift(2),t=e.read_shift(2);return{s:{c:e.read_shift(2),r:i},e:{c:e.read_shift(2),r:t}}}function Ett(e,i){return i||(i=re(8)),i.write_shift(2,e.s.r),i.write_shift(2,e.e.r),i.write_shift(2,e.s.c),i.write_shift(2,e.e.c),i}function xN(e,i,t){var n=1536,r=16;switch(t.bookType){case"biff8":case"xla":break;case"biff5":n=1280,r=8;break;case"biff4":n=4,r=6;break;case"biff3":n=3,r=6;break;case"biff2":n=2,r=4;break;default:throw new Error("unsupported BIFF version")}var s=re(r);return s.write_shift(2,n),s.write_shift(2,i),r>4&&s.write_shift(2,29282),r>6&&s.write_shift(2,1997),r>8&&(s.write_shift(2,49161),s.write_shift(2,1),s.write_shift(2,1798),s.write_shift(2,0)),s}function RUt(e,i){var t=!i||i.biff>=8?2:1,n=re(8+t*e.name.length);n.write_shift(4,e.pos),n.write_shift(1,e.hs||0),n.write_shift(1,e.dt),n.write_shift(1,e.name.length),i.biff>=8&&n.write_shift(1,1),n.write_shift(t*e.name.length,e.name,i.biff<8?"sbcs":"utf16le");var r=n.slice(0,n.l);return r.l=n.l,r}function KUt(e,i,t,n){var r=t&&5==t.biff;n||(n=re(r?3+i.length:5+2*i.length)),n.write_shift(2,e),n.write_shift(r?1:2,i.length),r||n.write_shift(1,1),n.write_shift((r?1:2)*i.length,i,r?"sbcs":"utf16le");var s=n.length>n.l?n.slice(0,n.l):n;return null==s.l&&(s.l=s.length),s}function Rtt(e,i,t,n){var r=t&&5==t.biff;n||(n=re(r?16:20)),n.write_shift(2,0),e.style?(n.write_shift(2,e.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,e.numFmtId||0),n.write_shift(2,i<<4));var s=0;return e.numFmtId>0&&r&&(s|=1024),n.write_shift(4,s),n.write_shift(4,0),r||n.write_shift(4,0),n.write_shift(2,0),n}function ktt(e){var i=re(12);return i.l++,i.write_shift(1,e.numFmtId),i.l+=10,i}var lzt=ktt;function yN(e,i,t,n,r,s){var o=re(8);return op(e,i,n,o),btt(t,s,o),o}function bN(e,i,t,n){var r=re(6+(n||e.length));return r.write_shift(2,i),r.write_shift(2,t),r.write_shift(2,n||e.length),r.write_shift(e.length,e,"sbcs"),r}function Mzt(e){var i=re(24),t=vr(e[0]);i.write_shift(2,t.r),i.write_shift(2,t.r),i.write_shift(2,t.c),i.write_shift(2,t.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<16;++r)i.write_shift(1,parseInt(n[r],16));return Ns([i,gUt(e[1])])}function Rzt(e){var i=e[1].Tooltip,t=re(10+2*(i.length+1));t.write_shift(2,2048);var n=vr(e[0]);t.write_shift(2,n.r),t.write_shift(2,n.r),t.write_shift(2,n.c),t.write_shift(2,n.c);for(var r=0;r1048576&&(X=1e6),2!=P&&(W=M.read_shift(2));var Z=M.read_shift(2),rt=w.codepage||1252;2!=P&&(M.l+=16,M.read_shift(1),0!==M[M.l]&&(rt=e[M[M.l]]),M.l+=1,M.l+=2),U&&(M.l+=36);for(var st=[],vt={},_t=Math.min(M.length,2==P?521:W-10-(L?264:0)),Mt=U?32:11;M.l<_t&&13!=M[M.l];)switch(vt={},vt.name=(typeof pn<"u"?pn.utils.decode(rt,M.slice(M.l,M.l+Mt)):wd(M.slice(M.l,M.l+Mt))).replace(/[\u0000\r\n][\S\s]*$/g,""),M.l+=Mt,vt.type=String.fromCharCode(M.read_shift(1)),2!=P&&!U&&(vt.offset=M.read_shift(4)),vt.len=M.read_shift(1),2==P&&(vt.offset=M.read_shift(2)),vt.dec=M.read_shift(1),vt.name.length&&st.push(vt),2!=P&&(M.l+=U?13:14),vt.type){case"B":(!L||8!=vt.len)&&w.WTF&&console.log("Skipping "+vt.name+":"+vt.type);break;case"G":case"P":w.WTF&&console.log("Skipping "+vt.name+":"+vt.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+vt.type)}if(13!==M[M.l]&&(M.l=W-1),13!==M.read_shift(1))throw new Error("DBF Terminator not found "+M.l+" "+M[M.l]);M.l=W;var ft=0,dt=0;for(C[0]=[],dt=0;dt!=st.length;++dt)C[0][dt]=st[dt].name;for(;X-- >0;)if(42!==M[M.l])for(++M.l,C[++ft]=[],dt=0,dt=0;dt!=st.length;++dt){var pt=M.slice(M.l,M.l+st[dt].len);M.l+=st[dt].len,va(pt,0);var bt=typeof pn<"u"?pn.utils.decode(rt,pt):wd(pt);switch(st[dt].type){case"C":bt.trim().length&&(C[ft][dt]=bt.replace(/([^\s])\s+$/,"$1"));break;case"D":8===bt.length?(C[ft][dt]=new Date(Date.UTC(+bt.slice(0,4),+bt.slice(4,6)-1,+bt.slice(6,8),0,0,0,0)),w&&w.UTC||(C[ft][dt]=$m(C[ft][dt]))):C[ft][dt]=bt;break;case"F":C[ft][dt]=parseFloat(bt.trim());break;case"+":case"I":C[ft][dt]=U?2147483648^pt.read_shift(-4,"i"):pt.read_shift(4,"i");break;case"L":switch(bt.trim().toUpperCase()){case"Y":case"T":C[ft][dt]=!0;break;case"N":case"F":C[ft][dt]=!1;break;case"":case"\0":case"?":break;default:throw new Error("DBF Unrecognized L:|"+bt+"|")}break;case"M":if(!O)throw new Error("DBF Unexpected MEMO for type "+P.toString(16));C[ft][dt]="##MEMO##"+(U?parseInt(bt.trim(),10):pt.read_shift(4));break;case"N":(bt=bt.replace(/\u0000/g,"").trim())&&"."!=bt&&(C[ft][dt]=+bt||0);break;case"@":C[ft][dt]=new Date(pt.read_shift(-8,"f")-621356832e5);break;case"T":var Tt=pt.read_shift(4),Et=pt.read_shift(4);if(0==Tt&&0==Et)break;C[ft][dt]=new Date(864e5*(Tt-2440588)+Et),w&&w.UTC||(C[ft][dt]=$m(C[ft][dt]));break;case"Y":C[ft][dt]=pt.read_shift(4,"i")/1e4+pt.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":C[ft][dt]=-pt.read_shift(-8,"f");break;case"B":if(L&&8==st[dt].len){C[ft][dt]=pt.read_shift(8,"f");break}case"G":case"P":pt.l+=st[dt].len;break;case"0":if("_NullFlags"===st[dt].name)break;default:throw new Error("DBF Unsupported data type "+st[dt].type)}}else M.l+=Z;if(2!=P&&M.l=0&&Kl(+C.codepage),"string"==C.type)throw new Error("Cannot write DBF to JS string");var P=po(),O=JN(l,{header:1,raw:!0,cellDates:!0}),L=O[0],U=O.slice(1),X=l["!cols"]||[],W=0,Z=0,rt=0,st=1;for(W=0;W250&&(bt=250),"C"==(pt=((X[W]||{}).DBF||{}).type)&&X[W].DBF.len>bt&&(bt=X[W].DBF.len),"B"==dt&&"N"==pt&&(dt="N",ft[W]=X[W].DBF.dec,bt=X[W].DBF.len),Mt[W]="C"==dt||"N"==pt?bt:s[dt]||0,st+=Mt[W],_t[W]=dt}else _t[W]="?"}var Et=P.next(32);for(Et.write_shift(4,318902576),Et.write_shift(4,U.length),Et.write_shift(2,296+32*rt),Et.write_shift(2,st),W=0;W<4;++W)Et.write_shift(4,0);var Dt=+i[pa]||3;for(Et.write_shift(4,Dt<<8),e[Dt]!=+C.codepage&&(C.codepage&&console.error("DBF Unsupported codepage "+pa+", using 1252"),pa=1252),W=0,Z=0;WMt[Z]&&(_e=_e.slice(0,Mt[Z])),rt=0;rt":190,"?":191,"{":223},i=new RegExp("\x1bN("+Jr(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1").replace("{","\\{")+"|\\|)","gm");try{i=new RegExp("\x1bN("+Jr(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm")}catch{}var t=function(L,U){var X=e[U];return"number"==typeof X?OL(X):X},n=function(L,U,X){var W=U.charCodeAt(0)-32<<4|X.charCodeAt(0)-48;return 59==W?L:OL(W)};e["|"]=254;function o(L,U){var Et,X=L.split(/[\n\r]+/),W=-1,Z=-1,rt=0,st=0,vt=[],_t=[],Mt=null,ft={},dt=[],pt=[],bt=[],Tt=0,Dt={Workbook:{WBProps:{},Names:[]}};for(+U.codepage>=0&&Kl(+U.codepage);rt!==X.length;++rt){Tt=0;var Qt,Le=X[rt].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(i,t),ge=Le.replace(/;;/g,"\0").split(";").map(function(Ht){return Ht.replace(/\u0000/g,";")});if(Le.length>0)switch(ge[0]){case"ID":case"E":case"B":case"W":break;case"O":for(st=1;st=1&&_e<=4&&(Dt.Workbook.WBProps.date1904=!0)}break;case"P":"P"===ge[1].charAt(0)&&_t.push(Le.slice(3).replace(/;;/g,";"));break;case"NN":var Ne={Sheet:0};for(st=1;st-1&&vt[Ce][oi];if(!jt||!jt[1])throw new Error("SYLK shared formula cannot find base");ui=net(jt[1],{r:W-Ce,c:Z-oi})}ui&&(vt[W][Z]?vt[W][Z].f=ui:vt[W][Z]={t:"n",f:ui}),Ft&&(vt[W][Z]||(vt[W][Z]={t:"z"}),vt[W][Z].c=[{a:"SheetJSYLK",t:Ft}]);break;case"F":var Xt=0;for(st=1;st0?(dt[W].hpt=Tt,dt[W].hpx=b0(Tt)):0===Tt&&(dt[W].hidden=!0);break;default:if(U&&U.WTF)throw new Error("SYLK bad record "+Le)}Xt<1&&(Mt=null);break;default:if(U&&U.WTF)throw new Error("SYLK bad record "+Le)}}return dt.length>0&&(ft["!rows"]=dt),pt.length>0&&(ft["!cols"]=pt),pt.forEach(function(Ht){pf(Ht)}),U&&U.sheetRows&&(vt=vt.slice(0,U.sheetRows)),[vt,ft,Dt]}function w(L,U,X,W,Z,rt){var st="C;Y"+(X+1)+";X"+(W+1)+";K";switch(L.t){case"n":st+=L.v||0,L.f&&!L.F&&(st+=";E"+fA(L.f,{r:X,c:W}));break;case"b":st+=L.v?"TRUE":"FALSE";break;case"e":st+=L.w||ec[L.v]||L.v;break;case"d":st+=ms(os(L.v,rt),rt);break;case"s":st+='"'+(null==L.v?"":String(L.v)).replace(/"/g,"").replace(/;/g,";;")+'"'}return st}function C(L,U,X){return"C;Y"+(U+1)+";X"+(X+1)+";A"+function(L){return L.replace(/\n/g,"\x1b :").replace(/\r/g,"\x1b =")}(L.map(function(Z){return Z.t}).join(""))}return{to_workbook:function l(L,U){var X=function s(L,U){switch(U.type){case"base64":return o(Al(L),U);case"binary":return o(L,U);case"buffer":return o(_n&&Buffer.isBuffer(L)?L.toString("binary"):wd(L),U);case"array":return o(Ym(L),U)}throw new Error("Unrecognized type "+U.type)}(L,U),W=X[0],Z=X[1],rt=X[2],st=pr(U);st.date1904=(((rt||{}).Workbook||{}).WBProps||{}).date1904;var vt=p0(W,st);Jr(Z).forEach(function(Mt){vt[Mt]=Z[Mt]});var _t=ff(vt,U);return Jr(rt).forEach(function(Mt){_t[Mt]=rt[Mt]}),_t.bookType="sylk",_t},from_sheet:function O(L,U,X){U||(U={}),U._formats=["General"];var st,W=["ID;PSheetJS;N;E"],Z=[],rt=Gn(L["!ref"]||"A1"),vt=null!=L["!data"],_t="\r\n",Mt=(((X||{}).Workbook||{}).WBProps||{}).date1904;W.push("P;PGeneral");var dt=rt.s.r,pt=rt.s.c,bt=[];if(L["!ref"])for(dt=rt.s.r;dt<=rt.e.r;++dt)if(!vt||L["!data"][dt]){for(bt=[],pt=rt.s.c;pt<=rt.e.c;++pt)(st=vt?L["!data"][dt][pt]:L[dn(pt)+kn(dt)])&&st.c&&bt.push(C(st.c,dt,pt));bt.length&&Z.push(bt.join(_t))}if(L["!ref"])for(dt=rt.s.r;dt<=rt.e.r;++dt)if(!vt||L["!data"][dt]){for(bt=[],pt=rt.s.c;pt<=rt.e.c;++pt)if((st=vt?L["!data"][dt][pt]:L[dn(pt)+kn(dt)])&&(null!=st.v||st.f&&!st.F)){if("General"!=(st.z||("d"==st.t?ki[14]:"General"))){var Tt=U._formats.indexOf(st.z);-1==Tt&&(U._formats.push(st.z),Tt=U._formats.length-1,W.push("P;P"+st.z.replace(/;/g,";;"))),bt.push("F;P"+Tt+";Y"+(dt+1)+";X"+(pt+1))}bt.push(w(st,0,dt,pt,0,Mt))}Z.push(bt.join(_t))}return W.push("F;P0;DG0G8;M255"),L["!cols"]&&function M(L,U){U.forEach(function(X,W){var Z="F;W"+(W+1)+" "+(W+1)+" ";X.hidden?Z+="0":("number"==typeof X.width&&!X.wpx&&(X.wpx=I1(X.width)),"number"==typeof X.wpx&&!X.wch&&(X.wch=R1(X.wpx)),"number"==typeof X.wch&&(Z+=Math.round(X.wch)))," "!=Z.charAt(Z.length-1)&&L.push(Z)})}(W,L["!cols"]),L["!rows"]&&function P(L,U){U.forEach(function(X,W){var Z="F;";X.hidden?Z+="M0;":X.hpt?Z+="M"+20*X.hpt+";":X.hpx&&(Z+="M"+20*k1(X.hpx)+";"),Z.length>2&&L.push(Z+"R"+(W+1))})}(W,L["!rows"]),L["!ref"]&&W.push("B;Y"+(rt.e.r-rt.s.r+1)+";X"+(rt.e.c-rt.s.c+1)+";D"+[rt.s.c,rt.s.r,rt.e.c,rt.e.r].join(" ")),W.push("O;L;D;B"+(Mt?";V4":"")+";K47;G100 0.001"),delete U._formats,W.join(_t)+_t+Z.join(_t)+_t+"E"+_t}}}(),ztt=function(){function i(l,w){for(var C=l.split("\n"),M=-1,P=-1,O=0,L=[];O!==C.length;++O)if("BOT"!==C[O].trim()){if(!(M<0)){for(var U=C[O].trim().split(","),X=U[0],W=U[1],Z=C[++O]||"";1&(Z.match(/["]/g)||[]).length&&O=0||M.indexOf(",")>=0||M.indexOf(";")>=0?function s(M,P){var O=P||{},L="";null!=Ls&&null==O.dense&&(O.dense=Ls);var U={};O.dense&&(U["!data"]=[]);var X={s:{c:0,r:0},e:{c:0,r:0}};"sep="==M.slice(0,4)?13==M.charCodeAt(5)&&10==M.charCodeAt(6)?(L=M.charAt(4),M=M.slice(7)):13==M.charCodeAt(5)||10==M.charCodeAt(5)?(L=M.charAt(4),M=M.slice(6)):L=r(M.slice(0,1024)):L=O&&O.FS?O.FS:r(M.slice(0,1024));var W=0,Z=0,rt=0,st=0,vt=0,_t=L.charCodeAt(0),Mt=!1,ft=0,dt=M.charCodeAt(0),pt=null!=O.dateNF?function E6t(e){var i="number"==typeof e?ki[e]:e;return i=i.replace(GE,"(\\d+)"),GE.lastIndex=0,new RegExp("^"+i+"$")}(O.dateNF):null;function bt(){var Tt=M.slice(st,vt);"\r"==Tt.slice(-1)&&(Tt=Tt.slice(0,-1));var Et={};if('"'==Tt.charAt(0)&&'"'==Tt.charAt(Tt.length-1)&&(Tt=Tt.slice(1,-1).replace(/""/g,'"')),!1!==O.cellText&&(Et.w=Tt),0===Tt.length)Et.t="z";else if(O.raw)Et.t="s",Et.v=Tt;else if(0===Tt.trim().length)Et.t="s",Et.v=Tt;else if(61==Tt.charCodeAt(0))34==Tt.charCodeAt(1)&&34==Tt.charCodeAt(Tt.length-1)?(Et.t="s",Et.v=Tt.slice(2,-1).replace(/""/g,'"')):function m7t(e){return 1!=e.length}(Tt)?(Et.t="s",Et.f=Tt.slice(1),Et.v=Tt):(Et.t="s",Et.v=Tt);else if("TRUE"==Tt)Et.t="b",Et.v=!0;else if("FALSE"==Tt)Et.t="b",Et.v=!1;else if(isNaN(rt=Ml(Tt)))if(!isNaN((rt=m1(Tt)).getDate())||pt&&Tt.match(pt)){if(Et.z=O.dateNF||ki[14],pt&&Tt.match(pt)){var Dt=function A6t(e,i,t){var n=-1,r=-1,s=-1,o=-1,l=-1,w=-1;(i.match(GE)||[]).forEach(function(P,O){var L=parseInt(t[O+1],10);switch(P.toLowerCase().charAt(0)){case"y":n=L;break;case"d":s=L;break;case"h":o=L;break;case"s":w=L;break;case"m":o>=0?l=L:r=L}}),GE.lastIndex=0,w>=0&&-1==l&&r>=0&&(l=r,r=-1);var C=(""+(n>=0?n:(new Date).getFullYear())).slice(-4)+"-"+("00"+(r>=1?r:1)).slice(-2)+"-"+("00"+(s>=1?s:1)).slice(-2);7==C.length&&(C="0"+C),8==C.length&&(C="20"+C);var M=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(w>=0?w:0)).slice(-2);return-1==o&&-1==l&&-1==w?C:-1==n&&-1==r&&-1==s?M:C+"T"+M}(0,O.dateNF,Tt.match(pt)||[]);rt=os(Dt),O&&!1===O.UTC&&(rt=$m(rt))}else O&&!1===O.UTC?rt=$m(rt):!1!==O.cellText&&O.dateNF&&(Et.w=nl(Et.z,rt));O.cellDates?(Et.t="d",Et.v=rt):(Et.t="n",Et.v=ms(rt)),O.cellNF||delete Et.z}else Et.t="s",Et.v=Tt;else Et.t="n",Et.v=rt;if("z"==Et.t||(O.dense?(U["!data"][W]||(U["!data"][W]=[]),U["!data"][W][Z]=Et):U[Tn({c:Z,r:W})]=Et),dt=M.charCodeAt(st=vt+1),X.e.c0&&bt(),U["!ref"]=un(X),U}(M,P):p0(function i(M,P){var O=P||{},L=[];if(!M||0===M.length)return L;for(var U=M.split(/[\r\n]/),X=U.length-1;X>=0&&0===U[X].length;)--X;for(var W=10,Z=0,rt=0;rt<=X;++rt)-1==(Z=U[rt].indexOf(" "))?Z=U[rt].length:Z++,W=Math.max(W,Z);for(rt=0;rt<=X;++rt){L[rt]=[];var st=0;for(e(U[rt].slice(0,W).trim(),L,rt,st,O),st=1;st<=(U[rt].length-W)/10+1;++st)e(U[rt].slice(W+10*(st-1),W+10*st).trim(),L,rt,st,O)}return O.sheetRows&&(L=L.slice(0,O.sheetRows)),L}(M,P),P)}function l(M,P){var O="",L="string"==P.type?[0,0,0,0]:function $N(e,i){var t="";switch((i||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":t=Al(e.slice(0,12));break;case"binary":t=e;break;default:throw new Error("Unrecognized type "+(i&&i.type||"undefined"))}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t.charCodeAt(5),t.charCodeAt(6),t.charCodeAt(7)]}(M,P);switch(P.type){case"base64":O=Al(M);break;case"binary":case"string":O=M;break;case"buffer":O=65001==P.codepage?M.toString("utf8"):P.codepage&&typeof pn<"u"?pn.utils.decode(P.codepage,M):_n&&Buffer.isBuffer(M)?M.toString("binary"):wd(M);break;case"array":O=Ym(M);break;default:throw new Error("Unrecognized type "+P.type)}return 239==L[0]&&187==L[1]&&191==L[2]?O=gr(O.slice(3)):"string"!=P.type&&"buffer"!=P.type&&65001==P.codepage?O=gr(O):"binary"==P.type&&typeof pn<"u"&&P.codepage&&(O=pn.utils.decode(P.codepage,pn.utils.encode(28591,O))),"socialcalc:version:"==O.slice(0,19)?Gtt.to_sheet("string"==P.type?O:gr(O),P):o(O,P)}return{to_workbook:function w(M,P){return ff(l(M,P),P)},to_sheet:l,from_sheet:function C(M){var P=[];if(!M["!ref"])return"";for(var L,O=Gn(M["!ref"]),U=null!=M["!data"],X=O.s.r;X<=O.e.r;++X){for(var W=[],Z=O.s.c;Z<=O.e.c;++Z){var rt=Tn({r:X,c:Z});if((L=U?(M["!data"][X]||[])[Z]:M[rt])&&null!=L.v){for(var st=(L.w||(Sd(L),L.w)||"").slice(0,10);st.length<10;)st+=" ";W.push(st+(0===Z?" ":""))}else W.push(" ")}P.push(W.join(""))}return P.join("\n")}}}(),lp=function(){function e(Ft,jt,Xt){if(Ft){va(Ft,Ft.l||0);for(var Ht=Xt.Enum||ke;Ft.l255||Xe.s.r>999999)break;Xe.e.cen&&(Xe.s.c=en),mi=Qe.read_shift(4),Xe.s.r>mi&&(Xe.s.r=mi),mi=Qe.read_shift(4),Xe.e.rmi&&(Xe.s.r=mi),Xe.e.r0&&Ue>=0;){if(32&$n)switch(31&$n){case 2:ji={t:"n",v:ji.v+ac&65535};break;case 3:(ji={t:"n",v:ji.v+ac&65535}).v>32767&&(ji.v-=65536);break;case 7:ji={t:"s",v:Te[Bi=Bi+ac>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(31&$n)}else switch(31&$n){case 1:ji={t:"z"};break;case 2:ji={t:"n",v:Qe.read_shift(2)};break;case 7:ji={t:"s",v:Te[Bi=Qe.read_shift(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(31&$n)}!Xt.sheetStubs&&"z"==ji.t||(null!=Ht["!data"]?(Ht["!data"][mi]||(Ht["!data"][mi]=[]),Ht["!data"][mi][en]=ji):Ht[Ji+kn(mi)]=ji),++mi,--Ue}}break;case 3074:en=Qe.read_shift(2),mi=Qe.read_shift(4);var xp=ui(Qe);null!=Ht["!data"]?(Ht["!data"][mi]||(Ht["!data"][mi]=[]),Ht["!data"][mi][en]={t:"s",v:xp}):Ht[dn(en)+kn(mi)]={t:"s",v:xp}}Ft.l+=Xa}return nr}(Ft,jt);if(0==Ft[2]&&(8==Ft[3]||9==Ft[3])&&Ft.length>=16&&5==Ft[14]&&108===Ft[15])throw new Error("Unsupported Works 3 for Mac file");if(2==Ft[2])Xt.Enum=ke,e(Ft,function(qe,Co,qn){switch(qn){case 0:Xt.vers=qe,qe>=4096&&(Xt.qpro=!0);break;case 255:Xt.vers=qe,Xt.works=!0;break;case 6:mi=qe;break;case 204:qe&&(Pt=qe);break;case 222:Pt=qe;break;case 15:case 51:(!Xt.qpro&&!Xt.works||51==qn)&&qe[1].v.charCodeAt(0)<48&&(qe[1].v=qe[1].v.slice(1)),(Xt.works||Xt.works2)&&(qe[1].v=qe[1].v.replace(/\r\n/g,"\n"));case 13:case 14:case 16:!(112&~qe[2])&&(15&qe[2])>1&&(15&qe[2])<15&&(qe[1].z=Xt.dateNF||t[(15&qe[2])-1]||ki[14],Xt.cellDates&&(qe[1].v=Vu(qe[1].v),qe[1].t="number"==typeof qe[1].v?"n":"d")),Xt.qpro&&qe[3]>Ci&&(Ht["!ref"]=un(mi),Xe[Te]=Ht,Ue.push(Te),Ht={},Xt.dense&&(en=Ht["!data"]=[]),mi={s:{r:0,c:0},e:{r:0,c:0}},Ci=qe[3],Te=Pt||"Sheet"+(Ci+1),Pt="");var Hn=Xt.dense?(en[qe[0].r]||[])[qe[0].c]:Ht[Tn(qe[0])];if(Hn){Hn.t=qe[1].t,Hn.v=qe[1].v,null!=qe[1].z&&(Hn.z=qe[1].z),null!=qe[1].f&&(Hn.f=qe[1].f),Jn=Hn;break}Xt.dense?(en[qe[0].r]||(en[qe[0].r]=[]),en[qe[0].r][qe[0].c]=qe[1]):Ht[Tn(qe[0])]=qe[1],Jn=qe[1];break;case 21509:Xt.works2=!0;break;case 21506:5281==qe&&(Jn.z="hh:mm:ss",Xt.cellDates&&"n"==Jn.t&&(Jn.v=Vu(Jn.v),Jn.t="number"==typeof Jn.v?"n":"d"))}},Xt);else{if(26!=Ft[2]&&14!=Ft[2])throw new Error("Unrecognized LOTUS BOF "+Ft[2]);Xt.Enum=Ce,14==Ft[2]&&(Xt.qpro=!0,Ft.l=0),e(Ft,function(qe,Co,qn){switch(qn){case 204:Te=qe;break;case 22:qe[1].v.charCodeAt(0)<48&&(qe[1].v=qe[1].v.slice(1)),qe[1].v=qe[1].v.replace(/\x0F./g,function(Hn){return String.fromCharCode(Hn.charCodeAt(1)-32)}).replace(/\r\n/g,"\n");case 23:case 24:case 25:case 37:case 39:case 40:if(qe[3]>Ci&&(Ht["!ref"]=un(mi),Xe[Te]=Ht,Ue.push(Te),Ht={},Xt.dense&&(en=Ht["!data"]=[]),mi={s:{r:0,c:0},e:{r:0,c:0}},Te="Sheet"+((Ci=qe[3])+1)),nr>0&&qe[0].r>=nr)break;Xt.dense?(en[qe[0].r]||(en[qe[0].r]=[]),en[qe[0].r][qe[0].c]=qe[1]):Ht[Tn(qe[0])]=qe[1],mi.e.c=128?95:Pt)}return Ht.write_shift(1,0),Ht}function W(Ft,jt,Xt){var Ht=re(7);return Ht.write_shift(1,P(Xt)),Ht.write_shift(2,jt),Ht.write_shift(2,Ft),Ht.write_shift(2,Xt.v,"i"),Ht}function rt(Ft,jt,Xt){var Ht=re(13);return Ht.write_shift(1,P(Xt)),Ht.write_shift(2,jt),Ht.write_shift(2,Ft),Ht.write_shift(8,Xt.v,"f"),Ht}function vt(Ft,jt,Xt){var Ht=32768&jt;return jt=(Ht?Ft:0)+((jt&=-32769)>=8192?jt-16384:jt),(Ht?"":"$")+(Xt?dn(jt):kn(jt))}var _t={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],54:["DATE",3],63:["ROUND",2],64:["TIME",3],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]},Mt=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function dt(Ft){var jt=[{c:0,r:0},{t:"n",v:0},0];return jt[0].r=Ft.read_shift(2),jt[3]=Ft[Ft.l++],jt[0].c=Ft[Ft.l++],jt}function bt(Ft,jt,Xt,Ht){var Te=re(6+Ht.length);Te.write_shift(2,Ft),Te.write_shift(1,Xt),Te.write_shift(1,jt),Te.write_shift(1,39);for(var Pt=0;Pt=128?95:Ci)}return Te.write_shift(1,0),Te}function Et(Ft,jt){var Xt=dt(Ft),Ht=Ft.read_shift(4),Te=Ft.read_shift(4),Pt=Ft.read_shift(2);if(65535==Pt)return 0===Ht&&3221225472===Te?(Xt[1].t="e",Xt[1].v=15):0===Ht&&3489660928===Te?(Xt[1].t="e",Xt[1].v=42):Xt[1].v=0,Xt;var Ci=32768&Pt;return Pt=(32767&Pt)-16446,Xt[1].v=(1-2*Ci)*(Te*Math.pow(2,Pt+32)+Ht*Math.pow(2,Pt)),Xt}function Dt(Ft,jt,Xt,Ht){var Te=re(14);if(Te.write_shift(2,Ft),Te.write_shift(1,Xt),Te.write_shift(1,jt),0==Ht)return Te.write_shift(4,0),Te.write_shift(4,0),Te.write_shift(2,65535),Te;var Pt=0,Ci=0,Ue=0;return Ht<0&&(Pt=1,Ht=-Ht),Ci=0|Math.log2(Ht),2147483648&(Ue=(Ht/=Math.pow(2,Ci-31))>>>0)||(++Ci,Ue=(Ht/=2)>>>0),Ht-=Ue,Ue|=2147483648,Ue>>>=0,Ht*=Math.pow(2,32),Te.write_shift(4,Ht>>>0),Te.write_shift(4,Ue),Te.write_shift(2,Ci+=16383+(Pt?32768:0)),Te}function fe(Ft,jt){var Xt=dt(Ft),Ht=Ft.read_shift(8,"f");return Xt[1].v=Ht,Xt}function _e(Ft,jt){return 0==Ft[Ft.l+jt-1]?Ft.read_shift(jt,"cstr"):""}function Kt(Ft,jt){var Xt=re(5+Ft.length);Xt.write_shift(2,14e3),Xt.write_shift(2,jt);for(var Ht=0;Ht127?95:Te}return Xt[Xt.l++]=0,Xt}var ke={0:{n:"BOF",f:ws},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function w(Ft,jt,Xt){var Ht={s:{c:0,r:0},e:{c:0,r:0}};return 8==jt&&Xt.qpro?(Ht.s.c=Ft.read_shift(1),Ft.l++,Ht.s.r=Ft.read_shift(2),Ht.e.c=Ft.read_shift(1),Ft.l++,Ht.e.r=Ft.read_shift(2),Ht):(Ht.s.c=Ft.read_shift(2),Ht.s.r=Ft.read_shift(2),12==jt&&Xt.qpro&&(Ft.l+=2),Ht.e.c=Ft.read_shift(2),Ht.e.r=Ft.read_shift(2),12==jt&&Xt.qpro&&(Ft.l+=2),65535==Ht.s.c&&(Ht.s.c=Ht.e.c=Ht.s.r=Ht.e.r=0),Ht)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function X(Ft,jt,Xt){var Ht=M(Ft,0,Xt);return Ht[1].v=Ft.read_shift(2,"i"),Ht}},14:{n:"NUMBER",f:function Z(Ft,jt,Xt){var Ht=M(Ft,0,Xt);return Ht[1].v=Ft.read_shift(8,"f"),Ht}},15:{n:"LABEL",f:function O(Ft,jt,Xt){var Ht=Ft.l+jt,Te=M(Ft,0,Xt);if(Te[1].t="s",20768==(65534&Xt.vers)){Ft.l++;var Pt=Ft.read_shift(1);return Te[1].v=Ft.read_shift(Pt,"utf8"),Te}return Xt.qpro&&Ft.l++,Te[1].v=Ft.read_shift(Ht-Ft.l,"cstr"),Te}},16:{n:"FORMULA",f:function st(Ft,jt,Xt){var Ht=Ft.l+jt,Te=M(Ft,0,Xt);if(Te[1].v=Ft.read_shift(8,"f"),Xt.qpro)Ft.l=Ht;else{var Pt=Ft.read_shift(2);(function ft(Ft,jt){va(Ft,0);for(var Xt=[],Ht=0,Te="",Pt="",Ci="",Xe="";Ft.lXt.length)return void console.error("WK1 bad formula parse 0x"+Ue.toString(16)+":|"+Xt.join("|")+"|");var nr=Xt.slice(-Ht);Xt.length-=Ht,Xt.push(_t[Ue][0]+"("+nr.join(",")+")")}}}1==Xt.length?jt[1].f=""+Xt[0]:console.error("WK1 bad formula parse |"+Xt.join("|")+"|")})(Ft.slice(Ft.l,Ft.l+Pt),Te),Ft.l+=Pt}return Te}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:function U(Ft,jt,Xt){var Ht=Ft.l+jt,Te=M(Ft,0,Xt);if(Te[1].t="s",20768==Xt.vers){var Pt=Ft.read_shift(1);return Te[1].v=Ft.read_shift(Pt,"utf8"),Te}return Te[1].v=Ft.read_shift(Ht-Ft.l,"cstr"),Te}},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:_e},222:{n:"SHEETNAMELP",f:function Ne(Ft,jt){var Xt=Ft[Ft.l++];Xt>jt-1&&(Xt=jt-1);for(var Ht="";Ht.length>1;if(1&Xt[1].v)switch(7&Ht){case 0:Ht=5e3*(Ht>>3);break;case 1:Ht=500*(Ht>>3);break;case 2:Ht=(Ht>>3)/20;break;case 3:Ht=(Ht>>3)/200;break;case 4:Ht=(Ht>>3)/2e3;break;case 5:Ht=(Ht>>3)/2e4;break;case 6:Ht=(Ht>>3)/16;break;case 7:Ht=(Ht>>3)/64}return Xt[1].v=Ht,Xt}},25:{n:"FORMULA19",f:function Le(Ft,jt){var Xt=Et(Ft);return Ft.l+=jt-14,Xt}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function Ei(Ft,jt){for(var Xt={},Ht=Ft.l+jt;Ft.l>6,Xt}},38:{n:"??"},39:{n:"NUMBER27",f:fe},40:{n:"FORMULA28",f:function Qt(Ft,jt){var Xt=fe(Ft);return Ft.l+=jt-12,Xt}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:_e},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function Se(Ft,jt,Xt){if(Xt.qpro&&!(jt<21)){var Ht=Ft.read_shift(1);return Ft.l+=17,Ft.l+=1,Ft.l+=2,[Ht,Ft.read_shift(jt-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}},oi={5:"dd-mmm-yy",6:"dd-mmm",7:"mmm-yy",8:"mm/dd/yy",10:"hh:mm:ss AM/PM",11:"hh:mm AM/PM",14:"dd-mmm-yyyy",15:"mmm-yyyy",34:"0.00",50:"0.00;[Red]0.00",66:"0.00;(0.00)",82:"0.00;[Red](0.00)",162:'"$"#,##0.00;\\("$"#,##0.00\\)',288:"0%",304:"0E+00",320:"# ?/?"};function ui(Ft){var jt=Ft.read_shift(2),Xt=Ft.read_shift(1);if(0!=Xt)throw"unsupported QPW string type "+Xt.toString(16);return Ft.read_shift(jt,"sbcs-cont")}return{sheet_to_wk1:function r(Ft,jt){var Xt=jt||{};if(+Xt.codepage>=0&&Kl(+Xt.codepage),"string"==Xt.type)throw new Error("Cannot write WK1 to JS string");var Ht=po();if(!Ft["!ref"])throw new Error("Cannot export empty sheet to WK1");var Te=Gn(Ft["!ref"]),Pt=null!=Ft["!data"],Ci=[];Re(Ht,0,function o(Ft){var jt=re(2);return jt.write_shift(2,Ft),jt}(1030)),Re(Ht,6,function C(Ft){var jt=re(8);return jt.write_shift(2,Ft.s.c),jt.write_shift(2,Ft.s.r),jt.write_shift(2,Ft.e.c),jt.write_shift(2,Ft.e.r),jt}(Te));for(var Xe=Math.min(Te.e.r,8191),Ue=Te.s.c;Ue<=Te.e.c;++Ue)Ci[Ue]=dn(Ue);for(var Bi=Te.s.r;Bi<=Xe;++Bi){var en=kn(Bi);for(Ue=Te.s.c;Ue<=Te.e.c;++Ue){var mi=Pt?(Ft["!data"][Bi]||[])[Ue]:Ft[Ci[Ue]+en];if(mi&&"z"!=mi.t)switch(mi.t){case"n":(0|mi.v)==mi.v&&mi.v>=-32768&&mi.v<=32767?Re(Ht,13,W(Bi,Ue,mi)):Re(Ht,14,rt(Bi,Ue,mi));break;case"d":var nr=ms(mi.v);(0|nr)==nr&&nr>=-32768&&nr<=32767?Re(Ht,13,W(Bi,Ue,{t:"n",v:nr,z:mi.z||ki[14]})):Re(Ht,14,rt(Bi,Ue,{t:"n",v:nr,z:mi.z||ki[14]}));break;default:Re(Ht,15,L(Bi,Ue,Sd(mi).slice(0,239)))}}}return Re(Ht,1),Ht.end()},book_to_wk3:function s(Ft,jt){var Xt=jt||{};if(+Xt.codepage>=0&&Kl(+Xt.codepage),"string"==Xt.type)throw new Error("Cannot write WK3 to JS string");var Ht=po();Re(Ht,0,function l(Ft){var jt=re(26);jt.write_shift(2,4096),jt.write_shift(2,4),jt.write_shift(4,0);for(var Xt=0,Ht=0,Te=0,Pt=0;Pt8191&&(Xt=8191),jt.write_shift(2,Xt),jt.write_shift(1,Te),jt.write_shift(1,Ht),jt.write_shift(2,0),jt.write_shift(2,0),jt.write_shift(1,1),jt.write_shift(1,2),jt.write_shift(4,0),jt.write_shift(4,0),jt}(Ft));for(var Te=0,Pt=0;Te=0;--s)i=((16384&i?1:0)|i<<1&32767)^t[s];return 52811^i}function M1(e){for(var i=0,t=1;3!=i;++i)t=256*t+(e[i]>255?255:e[i]<0?0:e[i]);return t.toString(16).toUpperCase().slice(1)}var bo=6;function I1(e){return Math.floor((e+Math.round(128/bo)/256)*bo)}function R1(e){return Math.floor((e-5)/bo*100+.5)/100}function cA(e){return Math.round((e*bo+5)/bo*256)/256}function pf(e){e.width?(e.wpx=I1(e.width),e.wch=R1(e.wpx),e.MDW=bo):e.wpx?(e.wch=R1(e.wpx),e.width=cA(e.wch),e.MDW=bo):"number"==typeof e.wch&&(e.width=cA(e.wch),e.wpx=I1(e.width),e.MDW=bo),e.customWidth&&delete e.customWidth}var $tt=96;function k1(e){return 96*e/$tt}function b0(e){return e*$tt/96}function eHt(e,i,t){t||(t=re(6+4*i.length)),t.write_shift(2,e),ya(i,t);var n=t.length>t.l?t.slice(0,t.l):t;return null==t.l&&(t.l=t.length),n}var EN,rHt=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],sHt=mo;function Qtt(e,i){i||(i=re(84)),EN||(EN=HE(rHt));var t=EN[e.patternType];null==t&&(t=40),i.write_shift(4,t);var n=0;if(40!=t)for(JE({auto:1},i),JE({auto:1},i);n<12;++n)i.write_shift(4,0);else{for(;n<4;++n)i.write_shift(4,0);for(;n<12;++n)i.write_shift(4,0)}return i.length>i.l?i.slice(0,i.l):i}function Ktt(e,i,t){return t||(t=re(16)),t.write_shift(2,i||0),t.write_shift(2,e.numFmtId||0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t}function P1(e,i){return i||(i=re(10)),i.write_shift(1,0),i.write_shift(1,0),i.write_shift(4,0),i.write_shift(4,0),i}var oHt=mo;function wHt(e,i){var t=po();return Ee(t,278),function hHt(e,i){if(i){var t=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)null!=i[r]&&++t}),0!=t&&(Ee(e,615,Mc(t)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)null!=i[r]&&Ee(e,44,eHt(r,i[r]))}),Ee(e,616))}}(t,e.SSF),function fHt(e){Ee(e,611,Mc(1)),Ee(e,43,function nHt(e,i){i||(i=re(153)),i.write_shift(2,20*e.sz),function I9t(e,i){i||(i=re(2)),i.write_shift(1,(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0)),i.write_shift(1,0)}(e,i),i.write_shift(2,e.bold?700:400);var t=0;"superscript"==e.vertAlign?t=1:"subscript"==e.vertAlign&&(t=2),i.write_shift(2,t),i.write_shift(1,e.underline||0),i.write_shift(1,e.family||0),i.write_shift(1,e.charset||0),i.write_shift(1,0),JE(e.color,i);var n=0;return"major"==e.scheme&&(n=1),"minor"==e.scheme&&(n=2),i.write_shift(1,n),ya(e.name,i),i.length>i.l?i.slice(0,i.l):i}({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),Ee(e,612)}(t),function mHt(e){Ee(e,603,Mc(2)),Ee(e,45,Qtt({patternType:"none"})),Ee(e,45,Qtt({patternType:"gray125"})),Ee(e,604)}(t),function pHt(e){Ee(e,613,Mc(1)),Ee(e,46,function lHt(e,i){return i||(i=re(51)),i.write_shift(1,0),P1(0,i),P1(0,i),P1(0,i),P1(0,i),P1(0,i),i.length>i.l?i.slice(0,i.l):i}()),Ee(e,614)}(t),function gHt(e){Ee(e,626,Mc(1)),Ee(e,47,Ktt({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),Ee(e,627)}(t),function vHt(e,i){Ee(e,617,Mc(i.length)),i.forEach(function(t){Ee(e,47,Ktt(t,0))}),Ee(e,618)}(t,i.cellXfs),function xHt(e){Ee(e,619,Mc(1)),Ee(e,48,function cHt(e,i){return i||(i=re(52)),i.write_shift(4,e.xfId),i.write_shift(2,1),i.write_shift(1,+e.builtinId),i.write_shift(1,0),T1(e.name||"",i),i.length>i.l?i.slice(0,i.l):i}({xfId:0,builtinId:0,name:"Normal"})),Ee(e,620)}(t),function yHt(e){Ee(e,505,Mc(0)),Ee(e,506)}(t),function bHt(e){Ee(e,508,function dHt(e,i,t){var n=re(2052);return n.write_shift(4,e),T1(i,n),T1(t,n),n.length>n.l?n.slice(0,n.l):n}(0,"TableStyleMedium9","PivotStyleMedium4")),Ee(e,509)}(t),Ee(t,279),t.end()}function AN(e,i){if(i&&i.themeXLSX)return i.themeXLSX;if(e&&"string"==typeof e.raw)return e.raw;var t=[Bs];return t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t.join("")}function Jtt(e,i,t){var n=[21600,21600],r=["m0,0l0",n[1],n[0],n[1],n[0],"0xe"].join(","),s=[We("xml",null,{"xmlns:v":Il.v,"xmlns:o":Il.o,"xmlns:x":Il.x,"xmlns:mv":Il.mv}).replace(/\/>/,">"),We("o:shapelayout",We("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"})],o=65536*e,l=i||[];return l.length>0&&s.push(We("v:shapetype",[We("v:stroke",null,{joinstyle:"miter"}),We("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202",coordsize:n.join(","),"o:spt":202,path:r})),l.forEach(function(w){++o,s.push(function KHt(e,i,t){var n=vr(e[0]),r={color2:"#BEFF82",type:"gradient"};"gradient"==r.type&&(r.angle="-180");var s="gradient"==r.type?We("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,o=We("v:fill",s,r);return["",o,We("v:shadow",null,{on:"t",obscured:"t"}),We("v:path",null,{"o:connecttype":"none"}),'
','',"","",Wa("x:Anchor",[n.c+1,0,n.r+1,0,n.c+3,20,n.r+5,20].join(",")),Wa("x:AutoFill","False"),Wa("x:Row",String(n.r)),Wa("x:Column",String(n.c)),e[1].hidden?"":"","",""].join("")}(w,o))}),s.push(""),s.join("")}function JHt(e){var i=[Bs,We("comments",null,{xmlns:Km[0]})],t=[];return i.push(""),e.forEach(function(n){n[1].forEach(function(r){var s=gn(r.a);-1==t.indexOf(s)&&(t.push(s),i.push(""+s+"")),r.T&&r.ID&&-1==t.indexOf("tc="+r.ID)&&(t.push("tc="+r.ID),i.push("tc="+r.ID+""))})}),0==t.length&&(t.push("SheetJ5"),i.push("SheetJ5")),i.push(""),i.push(""),e.forEach(function(n){var r=0,s=[],o=0;if(n[1][0]&&n[1][0].T&&n[1][0].ID&&(r=t.indexOf("tc="+n[1][0].ID)),n[1].forEach(function(C){C.a&&(r=t.indexOf(gn(C.a))),C.T&&++o,s.push(null==C.t?"":gn(C.t))}),0===o)n[1].forEach(function(C){i.push(''),i.push(Wa("t",null==C.t?"":gn(C.t))),i.push("")});else{n[1][0]&&n[1][0].T&&n[1][0].ID&&(r=t.indexOf("tc="+n[1][0].ID)),i.push('');for(var l="Comment:\n "+s[0]+"\n",w=1;w")}}),i.push(""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function tet(e,i,t){var n=[Bs,We("ThreadedComments",null,{xmlns:ga.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(r){var s="";(r[1]||[]).forEach(function(o,l){if(o.T){o.a&&-1==i.indexOf(o.a)&&i.push(o.a);var w={ref:r[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+t.tcid++).slice(-12)+"}"};0==l?s=w.id:w.parentId=s,o.ID=w.id,o.a&&(w.personId="{54EE7950-7262-4200-6969-"+("000000000000"+i.indexOf(o.a)).slice(-12)+"}"),n.push(We("threadedComment",Wa("text",o.t||""),w))}else delete o.ID})}),n.push(""),n.join("")}function eet(e){var i=[Bs,We("personList",null,{xmlns:ga.TCMNT,"xmlns:x":Km[0]}).replace(/[\/]>/,">")];return e.forEach(function(t,n){i.push(We("person",null,{displayName:t,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:t,providerId:"None"}))}),i.push(""),i.join("")}var n7t=go;function iet(e){return ya(e.slice(0,54))}function s7t(e){var i=po(),t=[];return Ee(i,628),Ee(i,630),e.forEach(function(n){n[1].forEach(function(r){t.indexOf(r.a)>-1||(t.push(r.a.slice(0,54)),Ee(i,632,iet(r.a)),r.T&&r.ID&&-1==t.indexOf("tc="+r.ID)&&(t.push("tc="+r.ID),Ee(i,632,iet("tc="+r.ID))))})}),Ee(i,631),Ee(i,633),e.forEach(function(n){n[1].forEach(function(r){var s=-1;r.ID&&(s=t.indexOf("tc="+r.ID)),-1==s&&n[1][0].T&&n[1][0].ID&&(s=t.indexOf("tc="+n[1][0].ID)),-1==s&&(s=t.indexOf(r.a)),r.iauthor=s;var o={s:vr(n[0]),e:vr(n[0])};Ee(i,635,function i7t(e,i){return null==i&&(i=re(36)),i.write_shift(4,e[1].iauthor),g0(e[0],i),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i}([o,r])),r.t&&r.t.length>0&&Ee(i,637,function C9t(e,i){var t=!1;return null==i&&(t=!0,i=re(23+4*e.t.length)),i.write_shift(1,1),ya(e.t,i),i.write_shift(4,1),function w9t(e,i){i||(i=re(4)),i.write_shift(2,e.ich||0),i.write_shift(2,e.ifnt||0)}({ich:0,ifnt:0},i),t?i.slice(0,i.l):i}(r)),Ee(i,636),delete r.iauthor})}),Ee(i,634),Ee(i,629),i.end()}var c7t=["xlsb","xlsm","xlam","biff8","xla"],cp=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,i={r:0,c:0};function t(n,r,s,o){var l=!1,w=!1;0==s.length?w=!0:"["==s.charAt(0)&&(w=!0,s=s.slice(1,-1)),0==o.length?l=!0:"["==o.charAt(0)&&(l=!0,o=o.slice(1,-1));var C=s.length>0?0|parseInt(s,10):0,M=o.length>0?0|parseInt(o,10):0;return l?M+=i.c:--M,w?C+=i.r:--C,r+(l?"":"$")+dn(M)+(w?"":"$")+kn(C)}return function(r,s){return i=s,r.replace(e,t)}}(),hA=/(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g;try{hA=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g}catch{}var fA=function(){return function(i,t){return i.replace(hA,function(n,r,s,o,l,w){var C=nN(o)-(s?0:t.c),M=iN(w)-(l?0:t.r);return r+"R"+("$"==l?M+1:0==M?"":"["+M+"]")+"C"+("$"==s?C+1:0==C?"":"["+C+"]")})}}();function net(e,i){return e.replace(hA,function(t,n,r,s,o,l){return n+("$"==r?r+s:dn(nN(s)+i.c))+("$"==o?o+l:kn(iN(l)+i.r))})}function Zs(e){e.l+=1}function gf(e,i){var t=e.read_shift(1==i?1:2);return[16383&t,t>>14&1,t>>15&1]}function aet(e,i,t){var n=2;if(t){if(t.biff>=2&&t.biff<=5)return oet(e);12==t.biff&&(n=4)}var r=e.read_shift(n),s=e.read_shift(n),o=gf(e,2),l=gf(e,2);return{s:{r,c:o[0],cRel:o[1],rRel:o[2]},e:{r:s,c:l[0],cRel:l[1],rRel:l[2]}}}function oet(e){var i=gf(e,2),t=gf(e,2),n=e.read_shift(1),r=e.read_shift(1);return{s:{r:i[0],c:n,cRel:i[1],rRel:i[2]},e:{r:t[0],c:r,cRel:t[1],rRel:t[2]}}}function cet(e,i,t){if(t&&t.biff>=2&&t.biff<=5)return function g7t(e){var i=gf(e,2),t=e.read_shift(1);return{r:i[0],c:t,cRel:i[1],rRel:i[2]}}(e);var n=e.read_shift(t&&12==t.biff?4:2),r=gf(e,2);return{r:n,c:r[0],cRel:r[1],rRel:r[2]}}function v7t(e){var i=e.read_shift(2),t=e.read_shift(2);return{r:i,c:255&t,fQuoted:!!(16384&t),cRel:t>>15,rRel:t>>15}}function det(e){var i=1&e[e.l+1];return e.l+=4,[i,1]}function uet(e){return[e.read_shift(1),e.read_shift(1)]}function j7t(e,i){var t=[e.read_shift(1)];if(12==i)switch(t[0]){case 2:t[0]=4;break;case 4:t[0]=16;break;case 0:t[0]=1;break;case 1:t[0]=2}switch(t[0]){case 4:t[1]=function Vs(e,i){return 1===e.read_shift(i)}(e,1)?"TRUE":"FALSE",12!=i&&(e.l+=7);break;case 37:case 16:t[1]=ec[e[e.l]],e.l+=12==i?4:8;break;case 0:e.l+=8;break;case 1:t[1]=vo(e);break;case 2:t[1]=function ap(e,i,t){if(t.biff>5)return function A1(e,i,t){var n=e.read_shift(t&&2==t.biff?1:2);return 0===n?(e.l++,""):function sp(e,i,t){if(t){if(t.biff>=2&&t.biff<=5)return e.read_shift(i,"cpstr");if(t.biff>=12)return e.read_shift(i,"dbcs-cont")}var r=e.read_shift(1);return e.read_shift(i,0===r?"sbcs-cont":"dbcs-cont")}(e,n,t)}(e,0,t);var n=e.read_shift(1);return 0===n?(e.l++,""):e.read_shift(n,t.biff<=4||!e.lens?"cpstr":"sbcs-cont")}(e,0,{biff:i>0&&i<8?2:i});break;default:throw new Error("Bad SerAr: "+t[0])}return t}function Y7t(e,i,t){for(var n=e.read_shift(12==t.biff?4:2),r=[],s=0;s!=n;++s)r.push((12==t.biff?ep:sA)(e,8));return r}function $7t(e,i,t){var n=0,r=0;12==t.biff?(n=e.read_shift(4),r=e.read_shift(4)):(r=1+e.read_shift(1),n=1+e.read_shift(2)),t.biff>=2&&t.biff<8&&(--n,0==--r&&(r=256));for(var s=0,o=[];s!=n&&(o[s]=[]);++s)for(var l=0;l!=r;++l)o[s][l]=j7t(e,t.biff);return o}function F1(e,i,t){return e.l+=2,[v7t(e)]}function DN(e){return e.l+=6,[]}function het(e){return e.l+=2,[ws(e),1&e.read_shift(2)]}var mWt=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"],fet={1:{n:"PtgExp",f:function U7t(e,i,t){return e.l++,t&&12==t.biff?[e.read_shift(4,"i"),0]:[e.read_shift(2),e.read_shift(t&&2==t.biff?1:2)]}},2:{n:"PtgTbl",f:mo},3:{n:"PtgAdd",f:Zs},4:{n:"PtgSub",f:Zs},5:{n:"PtgMul",f:Zs},6:{n:"PtgDiv",f:Zs},7:{n:"PtgPower",f:Zs},8:{n:"PtgConcat",f:Zs},9:{n:"PtgLt",f:Zs},10:{n:"PtgLe",f:Zs},11:{n:"PtgEq",f:Zs},12:{n:"PtgGe",f:Zs},13:{n:"PtgGt",f:Zs},14:{n:"PtgNe",f:Zs},15:{n:"PtgIsect",f:Zs},16:{n:"PtgUnion",f:Zs},17:{n:"PtgRange",f:Zs},18:{n:"PtgUplus",f:Zs},19:{n:"PtgUminus",f:Zs},20:{n:"PtgPercent",f:Zs},21:{n:"PtgParen",f:Zs},22:{n:"PtgMissArg",f:Zs},23:{n:"PtgStr",f:function X7t(e,i,t){return e.l++,x0(e,0,t)}},26:{n:"PtgSheet",f:function vWt(e,i,t){return e.l+=5,e.l+=2,e.l+=2==t.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function xWt(e,i,t){return e.l+=2==t.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function z7t(e){return e.l++,ec[e.read_shift(1)]}},29:{n:"PtgBool",f:function H7t(e){return e.l++,0!==e.read_shift(1)}},30:{n:"PtgInt",f:function G7t(e){return e.l++,e.read_shift(2)}},31:{n:"PtgNum",f:function W7t(e){return e.l++,vo(e)}},32:{n:"PtgArray",f:function S7t(e,i,t){var n=(96&e[e.l++])>>5;return e.l+=2==t.biff?6:12==t.biff?14:7,[n]}},33:{n:"PtgFunc",f:function L7t(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=e.read_shift(t&&t.biff<=3?1:2);return[KWt[r],vet[r],n]}},34:{n:"PtgFuncVar",f:function N7t(e,i,t){var n=e[e.l++],r=e.read_shift(1),s=t&&t.biff<=3?[88==n?-1:0,e.read_shift(1)]:function B7t(e){return[e[e.l+1]>>7,32767&e.read_shift(2)]}(e);return[r,(0===s[0]?vet:QWt)[s[1]]]}},35:{n:"PtgName",f:function Q7t(e,i,t){var n=e.read_shift(1)>>>5&3,s=e.read_shift(!t||t.biff>=8?4:2);switch(t.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12}return[n,0,s]}},36:{n:"PtgRef",f:function P7t(e,i,t){var n=(96&e[e.l])>>5;return e.l+=1,[n,cet(e,0,t)]}},37:{n:"PtgArea",f:function b7t(e,i,t){return[(96&e[e.l++])>>5,aet(e,0,t)]}},38:{n:"PtgMemArea",f:function J7t(e,i,t){var n=e.read_shift(1)>>>5&3;return e.l+=t&&2==t.biff?3:4,[n,e.read_shift(t&&2==t.biff?1:2)]}},39:{n:"PtgMemErr",f:mo},40:{n:"PtgMemNoMem",f:mo},41:{n:"PtgMemFunc",f:function q7t(e,i,t){return[e.read_shift(1)>>>5&3,e.read_shift(t&&2==t.biff?1:2)]}},42:{n:"PtgRefErr",f:function tWt(e,i,t){var n=e.read_shift(1)>>>5&3;return e.l+=4,t.biff<8&&e.l--,12==t.biff&&(e.l+=2),[n]}},43:{n:"PtgAreaErr",f:function _7t(e,i,t){var n=(96&e[e.l++])>>5;return e.l+=t&&t.biff>8?12:t.biff<8?6:8,[n]}},44:{n:"PtgRefN",f:function F7t(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=function x7t(e,i,t){var n=t&&t.biff?t.biff:8;if(n>=2&&n<=5)return function y7t(e){var i=e.read_shift(2),t=e.read_shift(1),n=(32768&i)>>15,r=(16384&i)>>14;return i&=16383,1==n&&i>=8192&&(i-=16384),1==r&&t>=128&&(t-=256),{r:i,c:t,cRel:r,rRel:n}}(e);var r=e.read_shift(n>=12?4:2),s=e.read_shift(2),o=(16384&s)>>14,l=(32768&s)>>15;if(s&=16383,1==l)for(;r>524287;)r-=1048576;if(1==o)for(;s>8191;)s-=16384;return{r,c:s,cRel:o,rRel:l}}(e,0,t);return[n,r]}},45:{n:"PtgAreaN",f:function C7t(e,i,t){var n=(96&e[e.l++])>>5,r=function p7t(e,i,t){if(t.biff<8)return oet(e);var n=e.read_shift(12==t.biff?4:2),r=e.read_shift(12==t.biff?4:2),s=gf(e,2),o=gf(e,2);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r,c:o[0],cRel:o[1],rRel:o[2]}}}(e,0,t);return[n,r]}},46:{n:"PtgMemAreaN",f:function yWt(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function bWt(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},57:{n:"PtgNameX",f:function K7t(e,i,t){return 5==t.biff?function Z7t(e){var i=e.read_shift(1)>>>5&3,t=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[i,t,n]}(e):[e.read_shift(1)>>>5&3,e.read_shift(2),e.read_shift(4)]}},58:{n:"PtgRef3d",f:function O7t(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=e.read_shift(2);return t&&5==t.biff&&(e.l+=12),[n,r,cet(e,0,t)]}},59:{n:"PtgArea3d",f:function w7t(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2,"i");if(t&&5===t.biff)e.l+=12;return[n,r,aet(e,0,t)]}},60:{n:"PtgRefErr3d",f:function eWt(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2),s=4;if(t)switch(t.biff){case 5:s=15;break;case 12:s=6}return e.l+=s,[n,r]}},61:{n:"PtgAreaErr3d",f:function T7t(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2),s=8;if(t)switch(t.biff){case 5:e.l+=12,s=6;break;case 12:s=12}return e.l+=s,[n,r]}},255:{}},_Wt={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},TWt={1:{n:"PtgElfLel",f:het},2:{n:"PtgElfRw",f:F1},3:{n:"PtgElfCol",f:F1},6:{n:"PtgElfRwV",f:F1},7:{n:"PtgElfColV",f:F1},10:{n:"PtgElfRadical",f:F1},11:{n:"PtgElfRadicalS",f:DN},13:{n:"PtgElfColS",f:DN},15:{n:"PtgElfColSV",f:DN},16:{n:"PtgElfRadicalLel",f:het},25:{n:"PtgList",f:function pWt(e){e.l+=2;var i=e.read_shift(2),t=e.read_shift(2),n=e.read_shift(4),r=e.read_shift(2),s=e.read_shift(2);return{ixti:i,coltype:3&t,rt:mWt[t>>2&31],idx:n,c:r,C:s}}},29:{n:"PtgSxName",f:function gWt(e){return e.l+=2,[e.read_shift(4)]}},255:{}},CWt={0:{n:"PtgAttrNoop",f:function wWt(e){return e.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function I7t(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=t&&2==t.biff?3:4,[n]}},2:{n:"PtgAttrIf",f:function D7t(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&2==t.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function E7t(e,i,t){e.l+=2;for(var n=e.read_shift(t&&2==t.biff?1:2),r=[],s=0;s<=n;++s)r.push(e.read_shift(t&&2==t.biff?1:2));return r}},8:{n:"PtgAttrGoto",f:function A7t(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&2==t.biff?1:2)]}},16:{n:"PtgAttrSum",f:function V7t(e,i,t){e.l+=t&&2==t.biff?3:4}},32:{n:"PtgAttrBaxcel",f:det},33:{n:"PtgAttrBaxcel",f:det},64:{n:"PtgAttrSpace",f:function R7t(e){return e.read_shift(2),uet(e)}},65:{n:"PtgAttrSpaceSemi",f:function k7t(e){return e.read_shift(2),uet(e)}},128:{n:"PtgAttrIfError",f:function M7t(e){var i=255&e[e.l+1]?1:0;return e.l+=2,[i,e.read_shift(2)]}},255:{}};function O1(e,i,t,n){if(n.biff<8)return mo(e,i);for(var r=e.l+i,s=[],o=0;o!==t.length;++o)switch(t[o][0]){case"PtgArray":t[o][1]=$7t(e,0,n),s.push(t[o][1]);break;case"PtgMemArea":t[o][2]=Y7t(e,0,n),s.push(t[o][2]);break;case"PtgExp":n&&12==n.biff&&(t[o][1][1]=e.read_shift(4),s.push(t[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+t[o][0]}return 0!=(i=r-e.l)&&s.push(mo(e,i)),s}function SWt(e){for(var i=[],t=0;t=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function AWt(e,i){var t=e.lastIndexOf("!"),n=i.lastIndexOf("!");return-1==t&&-1==n?e+":"+i:t>0&&n>0&&e.slice(0,t).toLowerCase()==i.slice(0,n).toLowerCase()?e+":"+i.slice(n+1):(console.error("Cannot hydrate range",e,i),e+":"+i)}function met(e,i,t){if(!e)return"SH33TJSERR0";if(t.biff>8&&(!e.XTI||!e.XTI[i]))return e.SheetNames[i];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[i];if(t.biff<8)return i>1e4&&(i-=65536),i<0&&(i=-i),0==i?"":e.XTI[i-1];if(!n)return"SH33TJSERR1";var r="";if(t.biff>8)switch(e[n[0]][0]){case 357:return r=-1==n[1]?"#REF":e.SheetNames[n[1]],n[1]==n[2]?r:r+":"+e.SheetNames[n[2]];case 358:return null!=t.SID?e.SheetNames[t.SID]:"SH33TJSSAME"+e[n[0]][0];default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return r=-1==n[1]?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?r:r+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(s){return s.Name}).join(";;");default:return e[n[0]][0][3]?(r=-1==n[1]?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?r:r+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function pet(e,i,t){var n=met(e,i,t);return"#REF"==n?n:_1(n,t)}function wo(e,i,t,n,r){var w,C,M,L,s=r&&r.biff||8,o={s:{c:0,r:0},e:{c:0,r:0}},l=[],P=0,O=0,U="";if(!e[0]||!e[0][0])return"";for(var X=-1,W="",Z=0,rt=e[0].length;Z=0){switch(e[0][X][1][0]){case 0:W=Xn(" ",e[0][X][1][1]);break;case 1:W=Xn("\r",e[0][X][1][1]);break;default:if(W="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][X][1][0])}C+=W,X=-1}l.push(C+EWt[st[0]]+w);break;case"PtgIsect":w=l.pop(),C=l.pop(),l.push(C+" "+w);break;case"PtgUnion":w=l.pop(),C=l.pop(),l.push(C+","+w);break;case"PtgRange":w=l.pop(),C=l.pop(),l.push(AWt(C,w));break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":M=y1(st[1][1],o,r),l.push(b1(M,s));break;case"PtgRefN":M=t?y1(st[1][1],t,r):st[1][1],l.push(b1(M,s));break;case"PtgRef3d":P=st[1][1],M=y1(st[1][2],o,r),U=pet(n,P,r),l.push(U+"!"+b1(M,s));break;case"PtgFunc":case"PtgFuncVar":var _t=st[1][0],Mt=st[1][1];_t||(_t=0);var ft=0==(_t&=127)?[]:l.slice(-_t);l.length-=_t,"User"===Mt&&(Mt=ft.shift()),l.push(Mt+"("+ft.join(",")+")");break;case"PtgBool":l.push(st[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":l.push(st[1]);break;case"PtgNum":l.push(String(st[1]));break;case"PtgStr":l.push('"'+st[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":L=Gq(st[1][1],t?{s:t}:o,r),l.push(eN(L,r));break;case"PtgArea":L=Gq(st[1][1],o,r),l.push(eN(L,r));break;case"PtgArea3d":L=st[1][2],U=pet(n,P=st[1][1],r),l.push(U+"!"+eN(L,r));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgName":var dt=(n.names||[])[(O=st[1][2])-1]||(n[0]||[])[O],pt=dt?dt.Name:"SH33TJSNAME"+String(O);pt&&"_xlfn."==pt.slice(0,6)&&!r.xlfn&&(pt=pt.slice(6)),l.push(pt);break;case"PtgNameX":var Tt,bt=st[1][1];if(O=st[1][2],!(r.biff<=5)){var Et="";if(14849==((n[bt]||[])[0]||[])[0]||(1025==((n[bt]||[])[0]||[])[0]?n[bt][O]&&n[bt][O].itab>0&&(Et=n.SheetNames[n[bt][O].itab-1]+"!"):Et=n.SheetNames[O-1]+"!"),n[bt]&&n[bt][O])Et+=n[bt][O].Name;else if(n[0]&&n[0][O])Et+=n[0][O].Name;else{var Dt=(met(n,bt,r)||"").split(";;");Dt[O-1]?Et=Dt[O-1]:Et+="SH33TJSERRX"}l.push(Et);break}bt<0&&(bt=-bt),n[bt]&&(Tt=n[bt][O]),Tt||(Tt={Name:"SH33TJSERRY"}),l.push(Tt.Name);break;case"PtgParen":var Le="(",ge=")";if(X>=0){switch(W="",e[0][X][1][0]){case 2:Le=Xn(" ",e[0][X][1][1])+Le;break;case 3:Le=Xn("\r",e[0][X][1][1])+Le;break;case 4:ge=Xn(" ",e[0][X][1][1])+ge;break;case 5:ge=Xn("\r",e[0][X][1][1])+ge;break;default:if(r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][X][1][0])}X=-1}l.push(Le+l.pop()+ge);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":l.push("#REF!");break;case"PtgExp":var fe={c:t.c,r:t.r};if(n.sharedf[Tn(M={c:st[1][1],r:st[1][0]})]){var Qt=n.sharedf[Tn(M)];l.push(wo(Qt,0,fe,n,r))}else{var _e=!1;for(w=0;w!=n.arrayf.length;++w)if(!(M.c<(C=n.arrayf[w])[0].s.c||M.c>C[0].e.c||M.rC[0].e.r)){l.push(wo(C[1],0,fe,n,r)),_e=!0;break}_e||l.push(st[1])}break;case"PtgArray":l.push("{"+SWt(st[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":X=Z;break;case"PtgMissArg":l.push("");break;case"PtgList":l.push("Table"+st[1].idx+"[#"+st[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(st))}if(3!=r.biff&&X>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(e[0][Z][0])){var Se=!0;switch((st=e[0][X])[1][0]){case 4:Se=!1;case 0:W=Xn(" ",st[1][1]);break;case 5:Se=!1;case 1:W=Xn("\r",st[1][1]);break;default:if(W="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+st[1][0])}l.push((Se?W:"")+l.pop()+(Se?"":W)),X=-1}}if(l.length>1&&r.WTF)throw new Error("bad formula stack");return"TRUE"==l[0]||"FALSE"!=l[0]&&l[0]}function mA(e,i,t){var n=e.read_shift(4),r=function L1(e,i,t){for(var r,s,n=e.l+i,o=[];n!=e.l;)i=n-e.l,r=fet[s=e[e.l]]||fet[_Wt[s]],(24===s||25===s)&&(r=(24===s?TWt:CWt)[e[e.l+1]]),r&&r.f?o.push([r.n,r.f(e,i,t)]):mo(e,i);return o}(e,n,t),s=e.read_shift(4);return[r,s>0?O1(e,s,r,t):null]}var OWt=mA,pA=mA,LWt=mA,NWt=mA;function get(e){if((0|e)==e&&e=0){var i=re(11);return i.write_shift(4,3),i.write_shift(1,30),i.write_shift(2,e),i.write_shift(4,0),i}var t=re(17);return t.write_shift(4,11),t.write_shift(1,31),t.write_shift(8,e),t.write_shift(4,0),t}var $Wt=function YWt(e,i){if("number"==typeof e)return get(e);if("boolean"==typeof e)return function VWt(e){var i=re(10);return i.write_shift(4,2),i.write_shift(1,29),i.write_shift(1,e?1:0),i.write_shift(4,0),i}(e);if(/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(e))return function BWt(e){var i=re(10);return i.write_shift(4,2),i.write_shift(1,28),i.write_shift(1,e),i.write_shift(4,0),i}(+C1[e]);if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function zWt(e){var i=vr(e),t=re(15);return t.write_shift(4,7),t.write_shift(1,36),t.write_shift(4,i.r),t.write_shift(2,i.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),t.write_shift(4,0),t}(e);if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function WWt(e){var i=e.split(":"),t=i[0],n=re(23);n.write_shift(4,15);var r=vr(t=i[0]);return n.write_shift(1,36),n.write_shift(4,r.r),n.write_shift(2,r.c|("$"==t.charAt(0)?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),n.write_shift(4,0),r=vr(t=i[1]),n.write_shift(1,36),n.write_shift(4,r.r),n.write_shift(2,r.c|("$"==t.charAt(0)?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),n.write_shift(4,0),n.write_shift(1,17),n.write_shift(4,0),n}(e);if(e.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function jWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=xa(e),s=re(23);return s.write_shift(4,15),s.write_shift(1,59),s.write_shift(2,2+i.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,r.s.r),s.write_shift(4,r.e.r),s.write_shift(2,r.s.c),s.write_shift(2,r.e.c),s.write_shift(4,0),s}(e,i);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function GWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t),r=vr(e=e.slice(t+1));"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var s=re(17);return s.write_shift(4,9),s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,r.r),s.write_shift(2,r.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),s.write_shift(4,0),s}(e,i);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function XWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=e.split(":"),s=re(27);s.write_shift(4,19);var o=r[0],l=vr(o);return s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(w){return w.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,l.r),s.write_shift(2,l.c|("$"==o.charAt(0)?0:1)<<14|(o.match(/\$\d/)?0:1)<<15),l=vr(o=r[1]),s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(w){return w.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,l.r),s.write_shift(2,l.c|("$"==o.charAt(0)?0:1)<<14|(o.match(/\$\d/)?0:1)<<15),s.write_shift(1,17),s.write_shift(4,0),s}(e,i);if(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(e))return function HWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=re(17);return r.write_shift(4,9),r.write_shift(1,60),r.write_shift(2,2+i.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(n.toLowerCase())),r.write_shift(4,0),r.write_shift(2,0),r.write_shift(4,0),r}(e,i);if(/^".*"$/.test(e))return function UWt(e){var i=re(7);i.write_shift(4,3+2*e.length),i.write_shift(1,23),i.write_shift(2,e.length);var t=re(2*e.length);t.write_shift(2*e.length,e,"utf16le");var n=re(4);return n.write_shift(4,0),Ns([i,t,n])}(e);if(/^[+-]\d+$/.test(e))return get(parseInt(e,10));throw"Formula |"+e+"| not supported for XLSB"},QWt={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},vet={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},KWt={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function ZWt(e){return("of:="+e.replace(hA,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")}function yet(e){return e.replace(/!/,".").replace(/:/,":.")}var B1=typeof Map<"u";function RN(e,i,t){var n=0,r=e.length;if(t){if(B1?t.has(i):Object.prototype.hasOwnProperty.call(t,i))for(var s=B1?t.get(i):t[i];n-1?(t.width=cA(n),t.customWidth=1):null!=i.width&&(t.width=i.width),i.hidden&&(t.hidden=!0),null!=i.level&&(t.outlineLevel=t.level=i.level),t}function dp(e,i){if(e){var t=[.7,.7,.75,.75,.3,.3];"xlml"==i&&(t=[1,1,1,1,.5,.5]),null==e.left&&(e.left=t[0]),null==e.right&&(e.right=t[1]),null==e.top&&(e.top=t[2]),null==e.bottom&&(e.bottom=t[3]),null==e.header&&(e.header=t[4]),null==e.footer&&(e.footer=t[5])}}function vf(e,i,t){var n=t.revssf[null!=i.z?i.z:"General"],r=60,s=e.length;if(null==n&&t.ssf)for(;r<392;++r)if(null==t.ssf[r]){hf(i.z,r),t.ssf[r]=i.z,t.revssf[i.z]=n=r;break}for(r=0;r!=s;++r)if(e[r].numFmtId===n)return r;return e[s]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},s}function JWt(e,i,t){if(e&&e["!ref"]){var n=Gn(e["!ref"]);if(n.e.c"u")return"";var l="",w=e.t,C=e.v;if("z"!==e.t)switch(e.t){case"b":l=e.v?"1":"0";break;case"n":isNaN(e.v)?(e.t="e",l=ec[e.v=36]):isFinite(e.v)?l=""+e.v:(e.t="e",l=ec[e.v=7]);break;case"e":l=ec[e.v];break;case"d":if(n&&n.cellDates){var M=os(e.v,o);l=M.toISOString(),M.getUTCFullYear()<1900&&(l=l.slice(l.indexOf("T")+1).replace("Z",""))}else(e=pr(e)).t="n",l=""+(e.v=ms(os(e.v,o),o));typeof e.z>"u"&&(e.z=ki[14]);break;default:l=e.v}var P="z"==e.t||null==e.v?"":Wa("v",gn(l)),O={r:i},L=vf(n.cellXfs,e,n);switch(0!==L&&(O.s=L),e.t){case"n":case"z":break;case"d":O.t="d";break;case"b":O.t="b";break;case"e":O.t="e";break;default:if(null==e.v){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){P=Wa("v",""+RN(n.Strings,e.v,n.revStrings)),O.t="s";break}O.t="str"}if(e.t!=w&&(e.t=w,e.v=C),"string"==typeof e.f&&e.f){var U=e.F&&e.F.slice(0,i.length)==i?{t:"array",ref:e.F}:null;P=We("f",gn(e.f),U)+(null!=e.v?P:"")}return e.l&&(e.l.display=gn(l),t["!links"].push([i,e.l])),e.D&&(O.cm=1),We("c",P,O)}function EXt(e,i,t,n){var o,r=[Bs,We("worksheet",null,{xmlns:Km[0],"xmlns:r":ga.r})],l="",w=t.Sheets[t.SheetNames[e]];null==w&&(w={});var C=w["!ref"]||"A1",M=Gn(C);if(M.e.c>16383||M.e.r>1048575){if(i.WTF)throw new Error("Range "+C+" exceeds format limit A1:XFD1048576");M.e.c=Math.min(M.e.c,16383),M.e.r=Math.min(M.e.c,1048575),C=un(M)}n||(n={}),w["!comments"]=[];var P=[];(function cXt(e,i,t,n,r){var s=!1,o={},l=null;if("xlsx"!==n.bookType&&i.vbaraw){var w=i.SheetNames[t];try{i.Workbook&&(w=i.Workbook.Sheets[t].CodeName||w)}catch{}s=!0,o.codeName=Cd(gn(w))}if(e&&e["!outline"]){var C={summaryBelow:1,summaryRight:1};e["!outline"].above&&(C.summaryBelow=0),e["!outline"].left&&(C.summaryRight=0),l=(l||"")+We("outlinePr",null,C)}!s&&!l||(r[r.length]=We("sheetPr",l,o))})(w,t,e,i,r),r[r.length]=We("dimension",null,{ref:C}),r[r.length]=function _Xt(e,i,t,n){var r={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(r.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),We("sheetViews",We("sheetView",null,r),{})}(0,0,0,t),i.sheetFormat&&(r[r.length]=We("sheetFormatPr",null,{defaultRowHeight:i.sheetFormat.defaultRowHeight||"16",baseColWidth:i.sheetFormat.baseColWidth||"10",outlineLevelRow:i.sheetFormat.outlineLevelRow||"7"})),null!=w["!cols"]&&w["!cols"].length>0&&(r[r.length]=function vXt(e,i){for(var n,t=[""],r=0;r!=i.length;++r)(n=i[r])&&(t[t.length]=We("col",null,gA(r,n)));return t[t.length]="",t.join("")}(0,w["!cols"])),r[o=r.length]="",w["!links"]=[],null!=w["!ref"]&&(l=function SXt(e,i,t,n){var w,W,r=[],s=[],o=Gn(e["!ref"]),l="",C="",M=[],P=0,O=0,L=e["!rows"],U=null!=e["!data"],X={r:C},Z=-1,rt=(((n||{}).Workbook||{}).WBProps||{}).date1904;for(O=o.s.c;O<=o.e.c;++O)M[O]=dn(O);for(P=o.s.r;P<=o.e.r;++P){for(s=[],C=kn(P),O=o.s.c;O<=o.e.c;++O){w=M[O]+C;var st=U?(e["!data"][P]||[])[O]:e[w];void 0!==st&&null!=(l=TXt(st,w,e,i,0,0,rt))&&s.push(l)}(s.length>0||L&&L[P])&&(X={r:C},L&&L[P]&&((W=L[P]).hidden&&(X.hidden=1),Z=-1,W.hpx?Z=k1(W.hpx):W.hpt&&(Z=W.hpt),Z>-1&&(X.ht=Z,X.customHeight=1),W.level&&(X.outlineLevel=W.level)),r[r.length]=We("row",s.join(""),X))}if(L)for(;P-1&&(X.ht=Z,X.customHeight=1),W.level&&(X.outlineLevel=W.level),r[r.length]=We("row","",X));return r.join("")}(w,i,0,t),l.length>0&&(r[r.length]=l)),r.length>o+1&&(r[r.length]="",r[o]=r[o].replace("/>",">")),w["!protect"]&&(r[r.length]=function hXt(e){var i={sheet:1};return dXt.forEach(function(t){null!=e[t]&&e[t]&&(i[t]="1")}),uXt.forEach(function(t){null!=e[t]&&!e[t]&&(i[t]="0")}),e.password&&(i.password=TN(e.password).toString(16).toUpperCase()),We("sheetProtection",null,i)}(w["!protect"])),null!=w["!autofilter"]&&(r[r.length]=function yXt(e,i,t,n){var r="string"==typeof e.ref?e.ref:un(e.ref);t.Workbook||(t.Workbook={Sheets:[]}),t.Workbook.Names||(t.Workbook.Names=[]);var s=t.Workbook.Names,o=xa(r);o.s.r==o.e.r&&(o.e.r=xa(i["!ref"]).e.r,r=un(o));for(var l=0;l0&&(r[r.length]=function oXt(e){if(0===e.length)return"";for(var i='',t=0;t!=e.length;++t)i+='';return i+""}(w["!merges"]));var L,O=-1,U=-1;return w["!links"].length>0&&(r[r.length]="",w["!links"].forEach(function(X){X[1].Target&&(L={ref:X[0]},"#"!=X[1].Target.charAt(0)&&(U=dr(n,-1,gn(X[1].Target).replace(/#[\s\S]*$/,""),hn.HLINK),L["r:id"]="rId"+U),(O=X[1].Target.indexOf("#"))>-1&&(L.location=gn(X[1].Target.slice(O+1))),X[1].Tooltip&&(L.tooltip=gn(X[1].Tooltip)),L.display=X[1].display,r[r.length]=We("hyperlink",null,L))}),r[r.length]=""),delete w["!links"],null!=w["!margins"]&&(r[r.length]=function pXt(e){return dp(e),We("pageMargins",null,e)}(w["!margins"])),(!i||i.ignoreEC||null==i.ignoreEC)&&(r[r.length]=Wa("ignoredErrors",We("ignoredError",null,{numberStoredAsText:1,sqref:C}))),P.length>0&&(U=dr(n,-1,"../drawings/drawing"+(e+1)+".xml",hn.DRAW),r[r.length]=We("drawing",null,{"r:id":"rId"+U}),w["!drawing"]=P),w["!comments"].length>0&&(U=dr(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",hn.VML),r[r.length]=We("legacyDrawing",null,{"r:id":"rId"+U}),w["!legacy"]=U),r.length>1&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function MXt(e,i,t,n){var r=function DXt(e,i,t){var n=re(145),r=(t["!rows"]||[])[e]||{};n.write_shift(4,e),n.write_shift(4,0);var s=320;r.hpx?s=20*k1(r.hpx):r.hpt&&(s=20*r.hpt),n.write_shift(2,s),n.write_shift(1,0);var o=0;r.level&&(o|=r.level),r.hidden&&(o|=16),(r.hpx||r.hpt)&&(o|=32),n.write_shift(1,o),n.write_shift(1,0);var l=0,w=n.l;n.l+=4;for(var C={r:e,c:0},M=null!=t["!data"],P=0;P<16;++P)if(!(i.s.c>P+1<<10||i.e.cn.l?n.slice(0,n.l):n}(n,t,i);(r.length>17||(i["!rows"]||[])[n])&&Ee(e,0,r)}var IXt=ep,RXt=g0;function PN(e,i,t){return null==t&&(t=re(9)),Jm(i,t),t.write_shift(1,e.v),t}function FN(e,i,t){return null==t&&(t=re(8)),tp(i,t),t.write_shift(1,e.v),t.write_shift(2,0),t.write_shift(1,0),t}var ujt=ep,hjt=g0,Tet=["left","right","top","bottom","header","footer"];function Mjt(e,i,t,n,r,s,o,l){var w={r:t,c:n};if(i.c&&s["!comments"].push([Tn(w),i.c]),void 0===i.v)return!1;var C="";switch(i.t){case"b":C=i.v?"1":"0";break;case"d":(i=pr(i)).z=i.z||ki[14],i.v=ms(os(i.v,l),l),i.t="n";break;case"n":case"e":C=""+i.v;break;default:C=i.v}switch(w.s=vf(r.cellXfs,i,r),i.l&&s["!links"].push([Tn(w),i.l]),i.t){case"s":case"str":return r.bookSST?(C=RN(r.Strings,null==i.v?"":String(i.v),r.revStrings),w.t="s",w.v=C,o?Ee(e,18,function $Xt(e,i,t){return null==t&&(t=re(8)),tp(i,t),t.write_shift(4,i.v),t}(0,w)):Ee(e,7,function jXt(e,i,t){return null==t&&(t=re(12)),Jm(i,t),t.write_shift(4,i.v),t}(0,w))):(w.t="str",o?Ee(e,17,function ajt(e,i,t){var n=null==e.v?"":String(e.v);return null==t&&(t=re(8+4*n.length)),tp(i,t),ya(n,t),t.length>t.l?t.slice(0,t.l):t}(i,w)):Ee(e,6,function rjt(e,i,t){var n=null==e.v?"":String(e.v);return null==t&&(t=re(12+4*e.v.length)),Jm(i,t),ya(n,t),t.length>t.l?t.slice(0,t.l):t}(i,w))),!0;case"n":return i.v==(0|i.v)&&i.v>-1e3&&i.v<1e3?o?Ee(e,13,function ejt(e,i,t){return null==t&&(t=re(8)),tp(i,t),jq(e.v,t),t}(i,w)):Ee(e,2,function qXt(e,i,t){return null==t&&(t=re(12)),Jm(i,t),jq(e.v,t),t}(i,w)):isNaN(i.v)?o?Ee(e,14,FN({t:"e",v:36},w)):Ee(e,3,PN({t:"e",v:36},w)):isFinite(i.v)?o?Ee(e,16,function ZXt(e,i,t){return null==t&&(t=re(12)),tp(i,t),ip(e.v,t),t}(i,w)):Ee(e,5,function KXt(e,i,t){return null==t&&(t=re(16)),Jm(i,t),ip(e.v,t),t}(i,w)):o?Ee(e,14,FN({t:"e",v:7},w)):Ee(e,3,PN({t:"e",v:7},w)),!0;case"b":return w.t="b",o?Ee(e,15,function GXt(e,i,t){return null==t&&(t=re(5)),tp(i,t),t.write_shift(1,e.v?1:0),t}(i,w)):Ee(e,4,function UXt(e,i,t){return null==t&&(t=re(9)),Jm(i,t),t.write_shift(1,e.v?1:0),t}(i,w)),!0;case"e":return w.t="e",o?Ee(e,14,FN(i,w)):Ee(e,3,PN(i,w)),!0}return o?Ee(e,12,function BXt(e,i,t){return null==t&&(t=re(4)),tp(i,t)}(0,w)):Ee(e,1,function LXt(e,i,t){return null==t&&(t=re(8)),Jm(i,t)}(0,w)),!0}function Vjt(e,i,t,n){var r=po(),s=t.SheetNames[e],o=t.Sheets[s]||{},l=s;try{t&&t.Workbook&&(l=t.Workbook.Sheets[e].CodeName||l)}catch{}var w=Gn(o["!ref"]||"A1");if(w.e.c>16383||w.e.r>1048575){if(i.WTF)throw new Error("Range "+(o["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");w.e.c=Math.min(w.e.c,16383),w.e.r=Math.min(w.e.c,1048575)}return o["!links"]=[],o["!comments"]=[],Ee(r,129),(t.vbaraw||o["!outline"])&&Ee(r,147,function FXt(e,i,t){null==t&&(t=re(84+4*e.length));var n=192;i&&(i.above&&(n&=-65),i.left&&(n&=-129)),t.write_shift(1,n);for(var r=1;r<3;++r)t.write_shift(1,0);return JE({auto:1},t),t.write_shift(-4,-1),t.write_shift(-4,-1),Xq(e,t),t.slice(0,t.l)}(l,o["!outline"])),Ee(r,148,RXt(w)),function Njt(e,i,t){Ee(e,133),Ee(e,137,function Tjt(e,i,t){null==t&&(t=re(30));var n=924;return(((i||{}).Views||[])[0]||{}).RTL&&(n|=32),t.write_shift(2,n),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,100),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(4,0),t}(0,t)),Ee(e,138),Ee(e,134)}(r,0,t.Workbook),function kjt(e,i){!i||!i["!cols"]||(Ee(e,390),i["!cols"].forEach(function(t,n){t&&Ee(e,60,function yjt(e,i,t){null==t&&(t=re(18));var n=gA(e,i);t.write_shift(-4,e),t.write_shift(-4,e),t.write_shift(4,256*(n.width||10)),t.write_shift(4,0);var r=0;return i.hidden&&(r|=1),"number"==typeof n.width&&(r|=2),i.level&&(r|=i.level<<8),t.write_shift(2,r),t}(n,t))}),Ee(e,391))}(r,o),function Ijt(e,i,t,n,r){var s=Gn(i["!ref"]||"A1"),l="",w=[],C=(((r||{}).Workbook||{}).WBProps||{}).date1904;Ee(e,145);var M=null!=i["!data"],P=s.e.r;i["!rows"]&&(P=Math.max(s.e.r,i["!rows"].length-1));for(var O=s.s.r;O<=P;++O){l=kn(O),MXt(e,i,s,O);var L=!1;if(O<=s.e.r)for(var U=s.s.c;U<=s.e.c;++U){O===s.s.r&&(w[U]=dn(U));var X=M?(i["!data"][O]||[])[U]:i[w[U]+l];L=!!X&&Mjt(e,X,O,U,n,i,L,C)}}Ee(e,146)}(r,o,0,i,t),function Bjt(e,i){i["!protect"]&&Ee(e,535,function Sjt(e,i){return null==i&&(i=re(66)),i.write_shift(2,e.password?TN(e.password):0),i.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(t){i.write_shift(4,t[1]?null==e[t[0]]||e[t[0]]?0:1:null!=e[t[0]]&&e[t[0]]?0:1)}),i}(i["!protect"]))}(r,o),function Ljt(e,i,t,n){if(i["!autofilter"]){var r=i["!autofilter"],s="string"==typeof r.ref?r.ref:un(r.ref);t.Workbook||(t.Workbook={Sheets:[]}),t.Workbook.Names||(t.Workbook.Names=[]);var o=t.Workbook.Names,l=xa(s);l.s.r==l.e.r&&(l.e.r=xa(i["!ref"]).e.r,s=un(l));for(var w=0;w0){var r=dr(n,-1,"../drawings/vmlDrawing"+(t+1)+".vml",hn.VML);Ee(e,551,aN("rId"+r)),i["!legacy"]=r}}(r,o,e,n),Ee(r,130),r.end()}var ON=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],Qjt=":][*?/\\".split("");function Det(e,i){try{if(""==e)throw new Error("Sheet name cannot be blank");if(e.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(39==e.charCodeAt(0)||39==e.charCodeAt(e.length-1))throw new Error("Sheet name cannot start or end with apostrophe (')");if("history"==e.toLowerCase())throw new Error("Sheet name cannot be 'History'");Qjt.forEach(function(t){if(-1!=e.indexOf(t))throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(t){if(i)return!1;throw t}return!0}function eYt(e,i){return i||(i=re(127)),i.write_shift(4,e.Hidden),i.write_shift(4,e.iTabID),aN(e.strRelID,i),ya(e.name.slice(0,31),i),i.length>i.l?i.slice(0,i.l):i}function pYt(e,i){var t=po();return Ee(t,131),Ee(t,128,function cYt(e,i){i||(i=re(127));for(var t=0;4!=t;++t)i.write_shift(4,0);return ya("SheetJS",i),ya(a1.version,i),ya(a1.version,i),ya("7262",i),i.length>i.l?i.slice(0,i.l):i}()),Ee(t,153,function nYt(e,i){i||(i=re(72));var t=0;return e&&(e.date1904&&(t|=1),e.filterPrivacy&&(t|=8)),i.write_shift(4,t),i.write_shift(4,0),Xq(e&&e.CodeName||"ThisWorkbook",i),i.slice(0,i.l)}(e.Workbook&&e.Workbook.WBProps||null)),function uYt(e,i){if(i.Workbook&&i.Workbook.Sheets){for(var t=i.Workbook.Sheets,n=0,r=-1,s=-1;nr||(Ee(e,135),Ee(e,158,function dYt(e,i){return i||(i=re(29)),i.write_shift(-4,0),i.write_shift(-4,460),i.write_shift(4,28800),i.write_shift(4,17600),i.write_shift(4,500),i.write_shift(4,e),i.write_shift(4,e),i.write_shift(1,120),i.length>i.l?i.slice(0,i.l):i}(r)),Ee(e,136))}}(t,e),function lYt(e,i){Ee(e,143);for(var t=0;t!=i.SheetNames.length;++t)Ee(e,156,eYt({Hidden:i.Workbook&&i.Workbook.Sheets&&i.Workbook.Sheets[t]&&i.Workbook.Sheets[t].Hidden||0,iTabID:t+1,strRelID:"rId"+(t+1),name:i.SheetNames[t]}));Ee(e,144)}(t,e),function mYt(e,i){Ee(e,353),Ee(e,357),Ee(e,362,function fYt(e){var i=e.SheetNames.length,t=re(12*i+28);t.write_shift(4,i+2),t.write_shift(4,0),t.write_shift(4,-2),t.write_shift(4,-2),t.write_shift(4,0),t.write_shift(4,-1),t.write_shift(4,-1);for(var n=0;n-1&&(n|=32,r=r.slice(6)),t.write_shift(4,n),t.write_shift(1,0),t.write_shift(4,null==e.Sheet?4294967295:e.Sheet);var s=[t,ya(r),$Wt(e.Ref,i)];if(e.Comment)s.push(T1(e.Comment));else{var o=re(4);o.write_shift(4,4294967295),s.push(o)}return Ns(s)}(t,i))}catch{console.error("Could not serialize defined name "+JSON.stringify(t))}})}(t,e),Ee(t,132),t.end()}function ket(e){return We("NamedRange",null,{"ss:Name":"_xlnm."==e.Name.slice(0,6)?e.Name.slice(6):e.Name,"ss:RefersTo":"="+fA(e.Ref,{r:0,c:0})})}function GYt(e,i,t,n,r,s,o){if(!e||null==e.v&&null==e.f)return"";var l={};if(e.f&&(l["ss:Formula"]="="+gn(fA(e.f,o))),e.F&&e.F.slice(0,i.length)==i){var w=vr(e.F.slice(i.length+1));l["ss:ArrayRange"]="RC:R"+(w.r==o.r?"":"["+(w.r-o.r)+"]")+"C"+(w.c==o.c?"":"["+(w.c-o.c)+"]")}if(e.l&&e.l.Target&&(l["ss:HRef"]=gn(e.l.Target),e.l.Tooltip&&(l["x:HRefScreenTip"]=gn(e.l.Tooltip))),t["!merges"])for(var C=t["!merges"],M=0;M!=C.length;++M)C[M].s.c!=o.c||C[M].s.r!=o.r||(C[M].e.c>C[M].s.c&&(l["ss:MergeAcross"]=C[M].e.c-C[M].s.c),C[M].e.r>C[M].s.r&&(l["ss:MergeDown"]=C[M].e.r-C[M].s.r));var P="",O="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":P="Number",O=String(e.v);break;case"b":P="Boolean",O=e.v?"1":"0";break;case"e":P="Error",O=ec[e.v];break;case"d":P="DateTime",O=new Date(e.v).toISOString(),null==e.z&&(e.z=e.z||ki[14]);break;case"s":P="String",O=function t9t(e){return(e+"").replace(jL,function(t){return XL[t]}).replace(wq,function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"})}(e.v||"")}var L=vf(n.cellXfs,e,n);l["ss:StyleID"]="s"+(21+L),l["ss:Index"]=o.c+1;var X="z"==e.t?"":''+(null!=e.v?O:"")+"";return(e.c||[]).length>0&&(X+=function zYt(e){return e.map(function(i){var t=function e9t(e){return e.replace(/(\r\n|[\r\n])/g," ")}(i.t||""),n=We("ss:Data",t,{xmlns:"http://www.w3.org/TR/REC-html40"}),r={};return i.a&&(r["ss:Author"]=i.a),e.hidden||(r["ss:ShowAlways"]="1"),We("Comment",n,r)}).join("")}(e.c)),We("Cell",X,l)}function HYt(e,i){var t='"}function XYt(e,i,t){var n=[],s=t.Sheets[t.SheetNames[e]],o=s?function VYt(e,i,t,n){if(!e||!((n||{}).Workbook||{}).Names)return"";for(var r=n.Workbook.Names,s=[],o=0;o0&&n.push(""+o+""),o=s?function WYt(e,i,t,n){if(!e["!ref"])return"";var r=Gn(e["!ref"]),s=e["!merges"]||[],o=0,l=[];e["!cols"]&&e["!cols"].forEach(function(W,Z){pf(W);var rt=!!W.width,st=gA(Z,W),vt={"ss:Index":Z+1};rt&&(vt["ss:Width"]=I1(st.width)),W.hidden&&(vt["ss:Hidden"]="1"),l.push(We("Column",null,vt))});for(var w=null!=e["!data"],C=r.s.r;C<=r.e.r;++C){for(var M=[HYt(C,(e["!rows"]||[])[C])],P=r.s.c;P<=r.e.c;++P){var O=!1;for(o=0;o!=s.length;++o)if(!(s[o].s.c>P||s[o].s.r>C||s[o].e.c"),M.length>2&&l.push(M.join(""))}return l.join("")}(s,i):"",o.length>0&&n.push(""+o+"
"),n.push(function UYt(e,i,t,n){if(!e)return"";var r=[];if(e["!margins"]&&(r.push(""),e["!margins"].header&&r.push(We("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&r.push(We("Footer",null,{"x:Margin":e["!margins"].footer})),r.push(We("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),r.push("")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[t])if(n.Workbook.Sheets[t].Hidden)r.push(We("Visible",1==n.Workbook.Sheets[t].Hidden?"SheetHidden":"SheetVeryHidden",{}));else{for(var s=0;s")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&r.push(""),e["!protect"]&&(r.push(Wa("ProtectContents","True")),e["!protect"].objects&&r.push(Wa("ProtectObjects","True")),e["!protect"].scenarios&&r.push(Wa("ProtectScenarios","True")),null==e["!protect"].selectLockedCells||e["!protect"].selectLockedCells?null!=e["!protect"].selectUnlockedCells&&!e["!protect"].selectUnlockedCells&&r.push(Wa("EnableSelection","UnlockedCells")):r.push(Wa("EnableSelection","NoSelection")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(o){e["!protect"][o[0]]&&r.push("<"+o[1]+"/>")})),0==r.length?"":We("WorksheetOptions",r.join(""),{xmlns:Il.x})}(s,0,e,t)),s["!autofilter"]&&n.push(''),n.join("")}function jYt(e,i){i||(i={}),e.SSF||(e.SSF=pr(ki)),e.SSF&&(u0(),h1(e.SSF),i.revssf=WE(e.SSF),i.revssf[e.SSF[65535]]=0,i.ssf=e.SSF,i.cellXfs=[],vf(i.cellXfs,{},{revssf:{General:0}}));var t=[];t.push(function OYt(e,i){var t=[];return e.Props&&t.push(function Z9t(e,i){var t=[];return Jr(mN).map(function(n){for(var r=0;r'+r.join("")+""}(e.Props,e.Custprops)),t.join("")}(e,i)),t.push(function LYt(e){return(((e||{}).Workbook||{}).WBProps||{}).date1904?'':""}(e)),t.push(""),t.push("");for(var n=0;n'];return i.cellXfs.forEach(function(n,r){var s=[];s.push(We("NumberFormat",null,{"ss:Format":gn(ki[n.numFmtId])}));var o={"ss:ID":"s"+(21+r)};t.push(We("Style",s.join(""),o))}),We("Styles",t.join(""))}(0,i),t[3]=function BYt(e){if(!((e||{}).Workbook||{}).Names)return"";for(var i=e.Workbook.Names,t=[],n=0;n0&&(n.family=l);var w=e.read_shift(1);switch(w>0&&(n.charset=w),e.l++,n.color=function D9t(e){var i={},n=e.read_shift(1)>>>1,r=e.read_shift(1),s=e.read_shift(2,"i"),o=e.read_shift(1),l=e.read_shift(1),w=e.read_shift(1);switch(e.l++,n){case 0:i.auto=1;break;case 1:i.index=r;var C=np[r];C&&(i.rgb=M1(C));break;case 2:i.rgb=M1([o,l,w]);break;case 3:i.theme=r}return 0!=s&&(i.tint=s>0?s/32767:s/32768),i}(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor"}return n.name=go(e),n}},44:{f:function tHt(e,i){return[e.read_shift(2),go(e)]}},45:{f:sHt},46:{f:oHt},47:{f:function aHt(e,i){var t=e.l+i,n=e.read_shift(2),r=e.read_shift(2);return e.l=t,{ixfe:n,numFmtId:r}}},48:{},49:{f:function y9t(e){return e.read_shift(4,"i")}},50:{},51:{f:function OHt(e){for(var i=[],t=e.read_shift(4);t-- >0;)i.push([e.read_shift(4),e.read_shift(4)]);return i}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:function Vtt(e,i,t){if(!t.cellStyles)return mo(e,i);var n=t&&t.biff>=12?4:2,r=e.read_shift(n),s=e.read_shift(n),o=e.read_shift(n),l=e.read_shift(n),w=e.read_shift(2);2==n&&(e.l+=2);var C={s:r,e:s,w:o,ixfe:l,flags:w};return(t.biff>=5||!t.biff)&&(C.level=w>>8&7),C}},62:{f:function ijt(e){return[tc(e),rN(e),"is"]}},63:{f:function XHt(e){var i={};i.i=e.read_shift(4);var t={};t.r=e.read_shift(4),t.c=e.read_shift(4),i.r=Tn(t);var n=e.read_shift(1);return 2&n&&(i.l="1"),8&n&&(i.a="1"),i}},64:{f:function Ejt(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:mo,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function _jt(e){var i=e.read_shift(2);return e.l+=28,{RTL:32&i}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function PXt(e,i){var t={},n=e[e.l];return++e.l,t.above=!(64&n),t.left=!(128&n),e.l+=18,t.name=S9t(e,i-19),t}},148:{f:IXt,p:16},151:{f:function gjt(){}},152:{},153:{f:function iYt(e,i){var t={},n=e.read_shift(4);t.defaultThemeVersion=e.read_shift(4);var r=i>8?go(e):"";return r.length>0&&(t.CodeName=r),t.autoCompressPictures=!!(65536&n),t.backupFile=!!(64&n),t.checkCompatibility=!!(4096&n),t.date1904=!!(1&n),t.filterPrivacy=!!(8&n),t.hidePivotFieldList=!!(1024&n),t.promptedSolutions=!!(16&n),t.publishItems=!!(2048&n),t.refreshAllConnections=!!(262144&n),t.saveExternalLinkValues=!!(128&n),t.showBorderUnselectedTables=!!(4&n),t.showInkAnnotation=!!(32&n),t.showObjects=["all","placeholders","none"][n>>13&3],t.showPivotChartFilter=!!(32768&n),t.updateLinks=["userSet","never","always"][n>>8&3],t}},154:{},155:{},156:{f:function tYt(e,i){var t={};return t.Hidden=e.read_shift(4),t.iTabID=e.read_shift(4),t.strRelID=sN(e,i-8),t.name=go(e),t}},157:{},158:{},159:{T:1,f:function fGt(e){return[e.read_shift(4),e.read_shift(4)]}},160:{T:-1},161:{T:1,f:ep},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:ujt},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function PHt(e,i){return{flags:e.read_shift(4),version:e.read_shift(4),name:go(e)}}},336:{T:-1},337:{f:function BHt(e){return e.l+=4,0!=e.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:sN},357:{},358:{},359:{},360:{T:1},361:{},362:{f:function Ltt(e,i,t){if(t.biff<8||!(t.biff>8)&&i==e[e.l]+(3==e[e.l+1]?1:0)+1)return function Ntt(e,i,t){3==e[e.l+1]&&e[e.l]++;var n=x0(e,0,t);return 3==n.charCodeAt(0)?n.slice(1):n}(e,0,t);for(var n=[],r=e.l+i,s=e.read_shift(t.biff>8?4:2);0!=s--;)n.push(yUt(e,0,t));if(e.l!=r)throw new Error("Bad ExternSheet: "+e.l+" != "+r);return n}},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function vjt(e,i,t){var n=e.l+i,r=Yq(e),s=e.read_shift(1),o=[r];if(o[2]=s,t.cellFormula){var l=OWt(e,n-e.l,t);o[1]=l}else e.l=n;return o}},427:{f:function xjt(e,i,t){var n=e.l+i,s=[ep(e,16)];if(t.cellFormula){var o=NWt(e,n-e.l,t);s[1]=o,e.l=n}else e.l=n;return s}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function bjt(e){var i={};return Tet.forEach(function(t){i[t]=vo(e)}),i}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function kXt(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function mjt(e,i){var t=e.l+i,n=ep(e,16),r=KE(e),s=go(e),o=go(e),l=go(e);e.l=t;var w={rfx:n,relId:r,loc:s,display:l};return o&&(w.Tooltip=o),w}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:sN},551:{f:KE},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:n7t},633:{T:1},634:{T:-1},635:{T:1,f:function e7t(e){var i={};i.iauthor=e.read_shift(4);var t=ep(e,16);return i.rfx=t.s,i.ref=Tn(t.s),e.l+=16,i}},636:{T:-1},637:{f:T9t},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function Hjt(e,i){return e.l+=10,{name:go(e)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function Ajt(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function Re(e,i,t,n){var r=i;if(!isNaN(r)){var s=n||(t||[]).length||0,o=e.next(4);o.write_shift(2,r),o.write_shift(2,s),s>0&&tN(t)&&e.push(t)}}function UN(e,i,t,n){var r=re(9);return D1(r,e,i),btt(t,n||"b",r),r}function Pet(e,i){i.forEach(function(t){var n=t[0].map(function(s){return s.t}).join("");if(n.length<=2048)return Re(e,28,bN(n,t[1],t[2]));Re(e,28,bN(n.slice(0,2048),t[1],t[2],n.length));for(var r=2048;r=0&&w<65536?Re(e,2,function Qzt(e,i,t,n,r){var s=re(9);return D1(s,e,i,n||0,r||0),s.write_shift(2,t),s}(t,n,w,l,o)):isNaN(w)?Re(e,5,UN(t,n,36,"e")):isFinite(w)?Re(e,3,function Yzt(e,i,t,n,r){var s=re(15);return D1(s,e,i,n||0,r||0),s.write_shift(8,t,"f"),s}(t,n,w,l,o)):Re(e,5,UN(t,n,7,"e")));case"b":case"e":return void Re(e,5,UN(t,n,i.v,i.t));case"s":case"str":return void Re(e,4,function e$t(e,i,t){var n=re(8+2*t.length);return D1(n,e,i),n.write_shift(1,t.length),n.write_shift(t.length,t,"sbcs"),n.l255||L.e.r>=U){if(i.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:IV16384");L.e.c=Math.min(L.e.c,255),L.e.r=Math.min(L.e.c,U-1)}Re(n,2057,xN(0,16,i)),Re(n,13,ic(1)),Re(n,12,ic(100)),Re(n,15,xo(!0)),Re(n,17,xo(!1)),Re(n,16,ip(.001)),Re(n,95,xo(!0)),Re(n,42,xo(!1)),Re(n,43,xo(!1)),Re(n,130,ic(1)),Re(n,128,function hzt(e){var i=re(8);return i.write_shift(4,0),i.write_shift(2,e[0]?e[0]+1:0),i.write_shift(2,e[1]?e[1]+1:0),i}([0,0])),Re(n,131,xo(!1)),Re(n,132,xo(!1)),C&&function h$t(e,i){if(i){var t=0;i.forEach(function(n,r){++t<=256&&n&&Re(e,125,function Nzt(e,i){var t=re(12);t.write_shift(2,i),t.write_shift(2,i),t.write_shift(2,256*e.width),t.write_shift(2,0);var n=0;return e.hidden&&(n|=1),t.write_shift(1,n),t.write_shift(1,n=e.level||0),t.write_shift(2,0),t}(gA(r,n),r))})}}(n,s["!cols"]),Re(n,512,function tzt(e,i){var t=8!=i.biff&&i.biff?2:4,n=re(2*t+6);return n.write_shift(t,e.s.r),n.write_shift(t,e.e.r+1),n.write_shift(2,e.s.c),n.write_shift(2,e.e.c+1),n.write_shift(2,0),n}(L,i));var X=(((t||{}).Workbook||{}).WBProps||{}).date1904;C&&(s["!links"]=[]);for(var W=L.s.c;W<=L.e.c;++W)O[W]=dn(W);for(var Z=[],rt=[],st=L.s.r;st<=L.e.r;++st)for(w&&(rt=s["!data"][st]||[]),P=kn(st),W=L.s.c;W<=L.e.c;++W){M=O[W]+P;var vt=w?rt[W]:s[M];vt&&(f$t(n,vt,st,W,i,X),C&&vt.l&&s["!links"].push([M,vt.l]),vt.c&&Z.push([vt.c,st,W]))}var _t=l.CodeName||l.name||r;return C?function a$t(e,i){var o,t=[],n=0,r=po(),s=kc;i.forEach(function(w,C){var M="",P=w[0].map(function(st){return st.a&&!M&&(M=st.a),st.t}).join("");++kc;var O=re(150);O.write_shift(2,15),O.write_shift(2,61444),O.write_shift(4,150),O.write_shift(2,3234),O.write_shift(2,61450),O.write_shift(4,8),O.write_shift(4,kc),O.write_shift(4,2560),O.write_shift(2,227),O.write_shift(2,61451),O.write_shift(4,84),O.write_shift(2,128),O.write_shift(4,0),O.write_shift(2,139),O.write_shift(4,2),O.write_shift(2,191),O.write_shift(4,524296),O.write_shift(2,344),O.l+=4,O.write_shift(2,385),O.write_shift(4,134217808),O.write_shift(2,387),O.write_shift(4,134217808),O.write_shift(2,389),O.write_shift(4,268435700),O.write_shift(2,447),O.write_shift(4,1048592),O.write_shift(2,448),O.write_shift(4,134217809),O.write_shift(2,451),O.write_shift(4,268435700),O.write_shift(2,513),O.write_shift(4,134217809),O.write_shift(2,515),O.write_shift(4,268435700),O.write_shift(2,575),O.write_shift(4,196609),O.write_shift(2,959),O.write_shift(4,131072|(w[0].hidden?2:0)),O.l+=2,O.write_shift(2,61456),O.write_shift(4,18),O.write_shift(2,3),O.write_shift(2,w[2]+2),O.l+=2,O.write_shift(2,w[1]+1),O.l+=2,O.write_shift(2,w[2]+4),O.l+=2,O.write_shift(2,w[1]+5),O.l+=2,O.l+=2,O.write_shift(2,61457),O.l+=4,O.l=150,0==C?o=O:Re(r,236,O),n+=150;var L=re(52);L.write_shift(2,21),L.write_shift(2,18),L.write_shift(2,25),L.write_shift(2,kc),L.write_shift(2,0),L.l=22,L.write_shift(2,13),L.write_shift(2,22),L.write_shift(4,1651663474),L.write_shift(4,2503426821),L.write_shift(4,2150634280),L.write_shift(4,1768515844+256*kc),L.write_shift(2,0),L.write_shift(4,0),L.l+=4,Re(r,93,L);var U=re(8);U.l+=2,U.write_shift(2,61453),U.l+=4,Re(r,236,U),n+=8;var X=re(18);X.write_shift(2,18),X.l+=8,X.write_shift(2,P.length),X.write_shift(2,16),X.l+=4,Re(r,438,X);var W=re(1+P.length);W.write_shift(1,0),W.write_shift(P.length,P,"sbcs"),Re(r,60,W);var Z=re(16);Z.l+=8,Z.write_shift(2,P.length),Z.l+=6,Re(r,60,Z);var rt=re(12+M.length);rt.write_shift(2,w[1]),rt.write_shift(2,w[2]),rt.write_shift(2,0|(w[0].hidden?0:2)),rt.write_shift(2,kc),rt.write_shift(2,M.length),rt.write_shift(1,0),rt.write_shift(M.length,M,"sbcs"),rt.l++,t.push(rt)});var l=re(80);l.write_shift(2,15),l.write_shift(2,61442),l.write_shift(4,n+l.length-8),l.write_shift(2,16),l.write_shift(2,61448),l.write_shift(4,8),l.write_shift(4,i.length+1),l.write_shift(4,kc),l.write_shift(2,15),l.write_shift(2,61443),l.write_shift(4,n+48),l.write_shift(2,15),l.write_shift(2,61444),l.write_shift(4,40),l.write_shift(2,1),l.write_shift(2,61449),l.write_shift(4,16),l.l+=16,l.write_shift(2,2),l.write_shift(2,61450),l.write_shift(4,8),l.write_shift(4,s),l.write_shift(4,5),Re(e,236,o?Ns([l,o]):l),e.push(r.end()),t.forEach(function(w){Re(e,28,w)}),nc.push([s,i.length+1,kc]),++kc}(n,Z):Pet(n,Z),C&&Re(n,574,function zUt(e){var i=re(18),t=1718;return e&&e.RTL&&(t|=64),i.write_shift(2,t),i.write_shift(4,0),i.write_shift(4,64),i.write_shift(4,0),i.write_shift(4,0),i}((o.Views||[])[0])),C&&(s["!merges"]||[]).length&&Re(n,229,function Tzt(e){var i=re(2+8*e.length);i.write_shift(2,e.length);for(var t=0;t255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond column IV (255). Data may be lost.")}var s=i||{};switch(s.biff||2){case 8:case 5:return function g$t(e,i){var t=i||{},n=[];e&&!e.SSF&&(e.SSF=pr(ki)),e&&e.SSF&&(u0(),h1(e.SSF),t.revssf=WE(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),kc=1,nc=[],t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,YN(t),t.cellXfs=[],vf(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var r=0;r255||o.e.r>16383){if(n.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");o.e.c=Math.min(o.e.c,255),o.e.r=Math.min(o.e.c,16383)}for(var C=(((r||{}).Workbook||{}).WBProps||{}).date1904,M=[],P=[],O=o.s.c;O<=o.e.c;++O)w[O]=dn(O);for(var L=o.s.r;L<=o.e.r;++L)for(s&&(M=i["!data"][L]||[]),l=kn(L),O=o.s.c;O<=o.e.c;++O){var U=s?M[O]:i[w[O]+l];U&&(i$t(e,U,L,O,n,C),U.c&&P.push([U.c,L,O]))}Pet(e,P)}(o,e.Sheets[e.SheetNames[r]],0,t,e),t._BIFF2FmtTable.forEach(function(l){t.biff<=3?Re(n,30,function JUt(e){var i=re(1+e.length);return i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i}(l)):Re(n,1054,function qUt(e){var i=re(3+e.length);return i.l+=2,i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i}(l))}),t.cellXfs.forEach(function(l){switch(t.biff){case 2:Re(n,67,function ozt(e){var i=re(4);return i.l+=2,i.write_shift(1,e.numFmtId),i.l++,i}(l));break;case 3:Re(n,579,ktt(l));break;case 4:Re(n,1091,lzt(l))}}),delete t._BIFF2FmtTable,delete t.cellXfs,delete t._Fonts,n.push(o.end()),Re(n,10),n.end()}(e,i)}throw new Error("invalid type "+s.bookType+" for BIFF")}function Let(e,i,t,n){for(var r=e["!merges"]||[],s=[],o={},l=null!=e["!data"],w=i.s.c;w<=i.e.c;++w){for(var C=0,M=0,P=0;Pt||r[P].s.c>w||r[P].e.r1&&(o.rowspan=C),M>1&&(o.colspan=M),n.editable?U=''+U+"":L&&(o["data-t"]=L&&L.t||"z",null!=L.v&&(o["data-v"]=g1(L.v instanceof Date?L.v.toISOString():L.v)),null!=L.z&&(o["data-z"]=L.z),L.l&&"#"!=(L.l.Target||"#").charAt(0)&&(U=''+U+"")),o.id=(n.id||"sjs")+"-"+O,s.push(We("td",U,o))}}return""+s.join("")+""}var Net='SheetJS Table Export',Bet="";function Uet(e,i){var t=i||{},r=null!=t.footer?t.footer:Bet,s=[null!=t.header?t.header:Net],o=xa(e["!ref"]||"A1");if(s.push(function Vet(e,i,t){return[].join("")+""}(0,0,t)),e["!ref"])for(var l=o.s.r;l<=o.e.r;++l)s.push(Let(e,o,l,t));return s.push(""+r),s.join("")}var w$t=function(){var e=["",'',"",'',"",'',"",""].join(""),i=""+e+"";return function(){return Bs+i}}();function _$t(e,i){var t="number",n="",r={"style:name":i},s="",o=0;t:if((e=e.replace(/"[$]"/g,"$")).indexOf(";")>-1&&(console.error("Unsupported ODS Style Map exported. Using first branch of "+e),e=e.slice(0,e.indexOf(";"))),"@"!=e){if(e.indexOf(/\$/)>-1&&(t="currency"),'"'==e[o]){for(s="";'"'!=e[++o]||'"'==e[++o];)s+=e[o];"*"==e[1+--o]?(o++,n+=""+gn(s.replace(/""/g,'"'))+""):n+=""+gn(s.replace(/""/g,'"'))+"",e=e.slice(o+1),o=0}var l=e.match(/# (\?+)\/(\?+)/);if(l)n+=We("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":l[1].length,"number:max-denominator-value":Math.max(+l[1].replace(/./g,"9"),+l[2].replace(/./g,"9"))});else if(l=e.match(/# (\?+)\/(\d+)/))n+=We("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":l[1].length,"number:denominator-value":+l[2]});else if(l=e.match(/\b(\d+)(|\.\d+)%/))t="percentage",n+=We("number:number",null,{"number:decimal-places":l[2]&&l.length-1||0,"number:min-decimal-places":l[2]&&l.length-1||0,"number:min-integer-digits":l[1].length})+"%";else{var w=!1;if(["y","m","d"].indexOf(e[0])>-1){t="date";e:for(;o";break;case"yyy":case"yyyy":n+='';break;case"mmmmm":console.error("ODS has no equivalent of format |mmmmm|");case"m":case"mm":case"mmm":case"mmmm":n+='';break;case"d":case"dd":n+='';break;case"ddd":case"dddd":n+=''}break;case'"':for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+gn(s.slice(1).replace(/""/g,'"'))+"";break;case"\\":n+=""+gn(s=e[++o])+"";break;case"/":case":":n+=""+gn(s)+"";break;default:console.error("unrecognized character "+s+" in ODF format "+e)}if(!w)break t;e=e.slice(o+1),o=0}if(e.match(/^\[?[hms]/))for("number"==t&&(t="time"),e.match(/\[/)&&(e=e.replace(/[\[\]]/g,""),r["number:truncate-on-overflow"]="false");o';break;case"m":case"mm":n+='';break;case"s":case"ss":if("."==e[o+1])do{s+=e[o+1],++o}while("0"==e[o+1]);n+='"}break;case'"':for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+gn(s.slice(1).replace(/""/g,'"'))+"";break;case"/":case":":n+=""+gn(s)+"";break;case"a":if("a/p"==e.slice(o,o+3).toLowerCase()){n+="",o+=2;break}if("am/pm"==e.slice(o,o+5).toLowerCase()){n+="",o+=4;break}default:console.error("unrecognized character "+s+" in ODF format "+e)}else{if(e.indexOf(/\$/)>-1&&(t="currency"),"$"==e[0]&&(n+='$',e=e.slice(1),o=0),'"'==e[o=0]){for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];"*"==e[1+--o]?(o++,n+=""+gn(s.replace(/""/g,'"'))+""):n+=""+gn(s.replace(/""/g,'"'))+"",e=e.slice(o+1),o=0}var M=e.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(M&&M[0]){var P=M[1].replace(/,/g,"");n+="-1?' number:grouping="true"':"")+(M[2]&&' number:decimal-places="'+(M[2].length-1)+'"'||' number:decimal-places="0"')+(M[3]&&M[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(M[3]?' number:min-exponent-digits="'+M[3].match(/0+/)[0].length+'"':"")+">",o=M.index+M[0].length}else console.error("Could not find numeric part of "+e);if('"'==e[o]){for(s="";'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+gn(s.replace(/""/g,'"'))+""}}}}else t="text",n="";return n?We("number:"+t+"-style",n,r):(console.error("Could not generate ODS number format for |"+e+"|"),"")}function $et(e,i,t){for(var n=[],r=0;r\n"+n.map(function(o){var l=(-1==t?"$":"")+yet(o.Ref);return" "+We("table:named-range",null,{"table:name":o.Name,"table:cell-range-address":l,"table:base-cell-address":l.replace(/[\.][^\.]*$/,".$A$1")})}).join("\n")+"\n \n":""}var Qet=function(){var e=function(r,s){return gn(r).replace(/ +/g,function(o){return''}).replace(/\t/g,"").replace(/\n/g,s?"":"").replace(/^ /,"").replace(/ $/,"")},i=" \n",t=function(r,s,o,l,w,C){var M=[];M.push(' \n');var P=0,O=0,L=xa(r["!ref"]||"A1"),U=r["!merges"]||[],X=0,W=null!=r["!data"];if(r["!cols"])for(O=0;O<=L.e.c;++O)M.push(" \n");var rt=r["!rows"]||[];for(P=0;P\n");for(;P<=L.e.r;++P){for(M.push(" \n"),O=0;OO||U[X].s.r>P||U[X].e.c\n");else{var Mt=Tn({r:P,c:O}),ft=W?(r["!data"][P]||[])[O]:r[Mt];if(ft&&ft.f&&(vt["table:formula"]=gn(ZWt(ft.f)),ft.F&&ft.F.slice(0,Mt.length)==Mt)){var dt=xa(ft.F);vt["table:number-matrix-columns-spanned"]=dt.e.c-dt.s.c+1,vt["table:number-matrix-rows-spanned"]=dt.e.r-dt.s.r+1}if(ft){switch(ft.t){case"b":_t=ft.v?"TRUE":"FALSE",vt["office:value-type"]="boolean",vt["office:boolean-value"]=ft.v?"true":"false";break;case"n":_t=ft.w||String(ft.v||0),vt["office:value-type"]="float",vt["office:value"]=ft.v||0;break;case"s":case"str":_t=null==ft.v?"":ft.v,vt["office:value-type"]="string";break;case"d":_t=ft.w||os(ft.v,C).toISOString(),vt["office:value-type"]="date",vt["office:date-value"]=os(ft.v,C).toISOString(),vt["table:style-name"]="ce1";break;default:M.push(i);continue}var pt=e(_t);if(ft.l&&ft.l.Target){var bt=ft.l.Target;"#"!=(bt="#"==bt.charAt(0)?"#"+yet(bt.slice(1)):bt).charAt(0)&&!bt.match(/^\w+:/)&&(bt="../"+bt),pt=We("text:a",pt,{"xlink:href":bt.replace(/&/g,"&")})}w[ft.z]&&(vt["table:style-name"]="ce"+w[ft.z].slice(1));var Tt=We("text:p",pt,{});if(ft.c){for(var Et="",Dt="",Le={},ge=0;ge"+e(ft.c[ge].t)+"";ft.c.hidden||(Le["office:display"]=!0),Tt=We("office:annotation",Dt,Le)+Tt}M.push(" "+We("table:table-cell",Tt,vt)+"\n")}else M.push(i)}}M.push(" \n")}return(s.Workbook||{}).Names&&M.push($et(s.Workbook.Names,0,o)),M.push(" \n"),M.join("")};return function(s,o){var l=[Bs],w=v1({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),C=v1({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==o.bookType?(l.push("\n"),l.push(ttt().replace(/]*?>/,"").replace(/<\/office:document-meta>/,"")+"\n")):l.push("\n");var M=function(r,s){r.push(" \n");var o=0;s.SheetNames.map(function(M){return s.Sheets[M]}).forEach(function(M){if(M&&M["!cols"])for(var P=0;P\n'),r.push(' \n'),r.push(" \n"),++o}});var l=0;s.SheetNames.map(function(M){return s.Sheets[M]}).forEach(function(M){if(M&&M["!rows"])for(var P=0;P\n'),r.push(' \n'),r.push(" \n"),++l}}),r.push(' \n'),r.push(' \n'),r.push(" \n"),r.push(' \n'),r.push(' \n'),r.push(" /\n"),r.push(' \n'),r.push(" /\n"),r.push(" \n"),r.push(" \n");var w={},C=69;return s.SheetNames.map(function(M){return s.Sheets[M]}).forEach(function(M){if(M){var P=null!=M["!data"];if(M["!ref"])for(var O=xa(M["!ref"]),L=0;L<=O.e.r;++L)for(var U=0;U<=O.e.c;++U){var X=P?(M["!data"][L]||[])[U]:M[Tn({r:L,c:U})];if(X&&X.z&&"general"!=X.z.toLowerCase()&&!w[X.z]){var W=_$t(X.z,"N"+C);W&&(w[X.z]="N"+C,++C,r.push(W+"\n"))}}}}),r.push(' \n'),Jr(w).forEach(function(M){r.push('\n')}),r.push(" \n"),w}(l,s);l.push(" \n"),l.push(" \n"),((s.Workbook||{}).WBProps||{}).date1904&&l.push(' \n \n \n');for(var P=0;P!=s.SheetNames.length;++P)l.push(t(s.Sheets[s.SheetNames[P]],s,P,0,M,((s.Workbook||{}).WBProps||{}).date1904));return(s.Workbook||{}).Names&&l.push($et(s.Workbook.Names,0,-1)),l.push(" \n"),l.push(" \n"),l.push("fods"==o.bookType?"":""),l.join("")}}();function Ket(e,i){if("fods"==i.bookType)return Qet(e,i);var t=WL(),n="",r=[],s=[];return cn(t,n="mimetype","application/vnd.oasis.opendocument.spreadsheet"),cn(t,n="content.xml",Qet(e,i)),r.push([n,"text/xml"]),s.push([n,"ContentFile"]),cn(t,n="styles.xml",w$t(e,i)),r.push([n,"text/xml"]),s.push([n,"StylesFile"]),cn(t,n="meta.xml",Bs+ttt()),r.push([n,"text/xml"]),s.push([n,"MetadataFile"]),cn(t,n="manifest.rdf",function j9t(e){var i=[Bs];i.push('\n');for(var t=0;t!=e.length;++t)i.push(qq(e[t][0],e[t][1])),i.push(X9t("",e[t][0]));return i.push(qq("","Document","pkg")),i.push(""),i.join("")}(s)),r.push([n,"application/rdf+xml"]),cn(t,n="META-INF/manifest.xml",function W9t(e){var i=[Bs];i.push('\n'),i.push(' \n');for(var t=0;t\n');return i.push(""),i.join("")}(r)),t}var Us=function(){try{return typeof Uint8Array>"u"||typeof Uint8Array.prototype.subarray>"u"?"slice":typeof Buffer<"u"?typeof Buffer.prototype.subarray>"u"?"slice":("function"==typeof Buffer.from?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray"}catch{return"slice"}}();function Wu(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Pc(e){return typeof TextDecoder<"u"?(new TextDecoder).decode(e):gr(wd(e))}function Go(e){return typeof TextEncoder<"u"?(new TextEncoder).encode(e):Vo(Cd(e))}function xf(e){for(var i=0,t=0;t=128&&(n|=(127&e[t])<<7,e[t++]<128||(n|=(127&e[t])<<14,e[t++]<128)||(n|=(127&e[t])<<21,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,28),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,35),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,42),++t,e[t++]<128)))break t;return i.l=t,n}function Si(e){var i=new Uint8Array(7);i[0]=127&e;var t=1;t:if(e>127){if(i[t-1]|=128,i[t]=e>>7&127,++t,e<=16383||(i[t-1]|=128,i[t]=e>>14&127,++t,e<=2097151)||(i[t-1]|=128,i[t]=e>>21&127,++t,e<=268435455)||(i[t-1]|=128,i[t]=e/256>>>21&127,++t,e<=34359738367)||(i[t-1]|=128,i[t]=e/65536>>>21&127,++t,e<=4398046511103))break t;i[t-1]|=128,i[t]=e/16777216>>>21&127,++t}return i[Us](0,t)}function Zet(e){for(var i={l:0},t=[];i.l=128;);o=e[Us](t.l,l),t.l=l;break;case 1:o=e[Us](l,l+8),t.l=l+8;break;case 2:var w=H1(e,t);o=e[Us](t.l,t.l+w),t.l+=w;break;case 5:o=e[Us](l,l+4),t.l=l+4;break;default:throw new Error("PB Type ".concat(s," for Field ").concat(r," at offset ").concat(n))}var C={data:o,type:s};null==i[r]&&(i[r]=[]),i[r].push(C)}return i}function Ri(e){var i=[];return e.forEach(function(t,n){0!=n&&t.forEach(function(r){r.data&&(i.push(Si(8*n+r.type)),2==r.type&&i.push(Si(r.data.length)),i.push(r.data))})}),xf(i)}function up(e,i){return e?.map(function(t){return i(t.data)})||[]}function W1(e){for(var i,t=[],n={l:0};n.l>>0>0),t.push(o)}return t}function _0(e){var i=[];return e.forEach(function(t){var n=[[],[{data:Si(t.id),type:0}],[]];null!=t.merge&&(n[3]=[{data:Si(+!!t.merge),type:0}]);var r=[];t.messages.forEach(function(o){r.push(o.data),o.meta[3]=[{type:0,data:Si(o.data.length)}],n[2].push({data:Ri(o.meta),type:2})});var s=Ri(n);i.push(Si(s.length)),i.push(s),r.forEach(function(o){return i.push(o)})}),xf(i)}function S$t(e,i){if(0!=e)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var t={l:0},n=H1(i,t),r=[],s=t.l;s>2&7),C=(224&i[s++])<<3,C|=i[s++]):(M=1+(i[s++]>>2),2==o?(C=i[s]|i[s+1]<<8,s+=2):(C=(i[s]|i[s+1]<<8|i[s+2]<<16|i[s+3]<<24)>>>0,s+=4)),0==C)throw new Error("Invalid offset 0");for(var P=r.length-1,O=C;P>=0&&O>=r[P].length;)O-=r[P].length,--P;if(P<0){if(0!=O)throw new Error("Invalid offset beyond length");O=r[P=0].length}if(M0&&(r.push(r[P][Us](r[P].length-O)),M-=O),++P;M>=r[P].length;)r.push(r[P]),M-=r[P].length,++P;M&&r.push(r[P][Us](0,M))}r.length>25&&(r=[xf(r)])}else{var l=i[s++]>>2;if(l<60)++l;else{var w=l-59;l=i[s],w>1&&(l|=i[s+1]<<8),w>2&&(l|=i[s+2]<<16),w>3&&(l|=i[s+3]<<24),l>>>=0,l++,s+=w}r.push(i[Us](s,s+l)),s+=l}}for(var L=0,U=0;U>8&255]))):n<=16777216?(o+=4,i.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(o+=5,i.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),i.push(e[Us](t,t+n)),o+=n,r[0]=0,r[1]=255&o,r[2]=o>>8&255,r[3]=o>>16&255,t+=n}return xf(i)}function zN(e,i){var t=new Uint8Array(32),n=Wu(t),r=12,s=0;switch(t[0]=5,e.t){case"n":if(e.z&&Dl(e.z)){t[1]=5,n.setFloat64(r,(Vu(e.v+1462).getTime()-Date.UTC(2001,0,1))/1e3,!0),s|=4,r+=8;break}t[1]=2,function C$t(e,i,t){var n=Math.floor(0==t?0:Math.LOG10E*Math.log(Math.abs(t)))+6176-16,r=t/Math.pow(10,n-6176);e[i+15]|=n>>7,e[i+14]|=(127&n)<<1;for(var s=0;r>=1;++s,r/=256)e[i+s]=255&r;e[i+15]|=t>=0?0:128}(t,r,e.v),s|=1,r+=16;break;case"b":t[1]=6,n.setFloat64(r,e.v?1:0,!0),s|=2,r+=8;break;case"s":var o=null==e.v?"":String(e.v);if(e.l){var l=i.rsst.findIndex(function(C){var M;return C.v==o&&C.l==(null==(M=e.l)?void 0:M.Target)});-1==l&&(i.rsst[l=i.rsst.length]={v:o,l:e.l.Target}),t[1]=9,n.setUint32(r,l,!0),s|=16,r+=4}else{var w=i.sst.indexOf(o);-1==w&&(i.sst[w=i.sst.length]=o),t[1]=3,n.setUint32(r,w,!0),s|=8,r+=4}break;case"d":t[1]=5,n.setFloat64(r,(e.v.getTime()-Date.UTC(2001,0,1))/1e3,!0),s|=4,r+=8;break;case"z":t[1]=0;break;default:throw"unsupported cell type "+e.t}return e.c&&(i.cmnt.push(function P$t(e){for(var i={a:"",t:"",replies:[]},t=0;t-1,r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};YN(i=i||{});var s=WL(),o="",l=0;if(i.cellXfs=[],vf(i.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),cn(s,o="docProps/core.xml",itt(e.Props,i)),r.coreprops.push(o),dr(i.rels,2,o,hn.CORE_PROPS),o="docProps/app.xml",!e.Props||!e.Props.SheetNames)if(e.Workbook&&e.Workbook.Sheets){for(var w=[],C=0;C0&&(cn(s,o="docProps/custom.xml",att(e.Custprops)),r.custprops.push(o),dr(i.rels,4,o,hn.CUST_PROPS));var M=["SheetJ5"];for(i.tcid=0,l=1;l<=e.SheetNames.length;++l){var P={"!id":{}},O=e.Sheets[e.SheetNames[l-1]];if(cn(s,o="xl/worksheets/sheet"+l+"."+t,EXt(l-1,i,e,P)),r.sheets.push(o),dr(i.wbrels,-1,"worksheets/sheet"+l+"."+t,hn.WS[0]),O){var U=O["!comments"],X=!1,W="";if(U&&U.length>0){var Z=!1;U.forEach(function(rt){rt[1].forEach(function(st){1==st.T&&(Z=!0)})}),Z&&(cn(s,W="xl/threadedComments/threadedComment"+l+".xml",tet(U,M,i)),r.threadedcomments.push(W),dr(P,-1,"../threadedComments/threadedComment"+l+".xml",hn.TCMNT)),cn(s,W="xl/comments"+l+"."+t,JHt(U)),r.comments.push(W),dr(P,-1,"../comments"+l+"."+t,hn.CMNT),X=!0}O["!legacy"]&&X&&cn(s,"xl/drawings/vmlDrawing"+l+".vml",Jtt(l,O["!comments"])),delete O["!comments"],delete O["!legacy"]}P["!id"].rId1&&cn(s,S1(o),v0(P))}return null!=i.Strings&&i.Strings.length>0&&(cn(s,o="xl/sharedStrings."+t,function hGt(e,i){if(!i.bookSST)return"";var t=[Bs];t[t.length]=We("sst",null,{xmlns:Km[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(null!=e[n]){var r=e[n],s="";r.r?s+=r.r:(s+=""),t[t.length]=s+=""}return t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(i.Strings,i)),r.strs.push(o),dr(i.wbrels,-1,"sharedStrings."+t,hn.SST)),cn(s,o="xl/workbook."+t,function qjt(e){var i=[Bs];i[i.length]=We("workbook",null,{xmlns:Km[0],"xmlns:r":ga.r});var t=e.Workbook&&(e.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(ON.forEach(function(l){null!=e.Workbook.WBProps[l[0]]&&e.Workbook.WBProps[l[0]]!=l[1]&&(n[l[0]]=e.Workbook.WBProps[l[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),i[i.length]=We("workbookPr",null,n);var r=e.Workbook&&e.Workbook.Sheets||[],s=0;if(r&&r[0]&&r[0].Hidden){for(i[i.length]="",s=0;s!=e.SheetNames.length&&r[s]&&r[s].Hidden;++s);s==e.SheetNames.length&&(s=0),i[i.length]='',i[i.length]=""}for(i[i.length]="",s=0;s!=e.SheetNames.length;++s){var o={name:gn(e.SheetNames[s].slice(0,31))};if(o.sheetId=""+(s+1),o["r:id"]="rId"+(s+1),r[s])switch(r[s].Hidden){case 1:o.state="hidden";break;case 2:o.state="veryHidden"}i[i.length]=We("sheet",null,o)}return i[i.length]="",t&&(i[i.length]="",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(l){var w={name:l.Name};l.Comment&&(w.comment=l.Comment),null!=l.Sheet&&(w.localSheetId=""+l.Sheet),l.Hidden&&(w.hidden="1"),l.Ref&&(i[i.length]=We("definedName",gn(l.Ref),w))}),i[i.length]=""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}(e)),r.workbooks.push(o),dr(i.rels,1,o,hn.WB),cn(s,o="xl/theme/theme1.xml",AN(e.Themes,i)),r.themes.push(o),dr(i.wbrels,-1,"theme/theme1.xml",hn.THEME),cn(s,o="xl/styles."+t,function qGt(e,i){var n,t=[Bs,We("styleSheet",null,{xmlns:Km[0],"xmlns:vt":ga.vt})];return e.SSF&&null!=(n=function QGt(e){var i=[""];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var n=t[0];n<=t[1];++n)null!=e[n]&&(i[i.length]=We("numFmt",null,{numFmtId:n,formatCode:gn(e[n])}))}),1===i.length?"":(i[i.length]="",i[0]=We("numFmts",null,{count:i.length-2}).replace("/>",">"),i.join(""))}(e.SSF))&&(t[t.length]=n),t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',(n=function ZGt(e){var i=[];return i[i.length]=We("cellXfs",null),e.forEach(function(t){i[i.length]=We("xf",null,t)}),i[i.length]="",2===i.length?"":(i[0]=We("cellXfs",null,{count:i.length-2}).replace("/>",">"),i.join(""))}(i.cellXfs))&&(t[t.length]=n),t[t.length]='',t[t.length]='',t[t.length]='',t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(e,i)),r.styles.push(o),dr(i.wbrels,-1,"styles."+t,hn.STY),e.vbaraw&&n&&(cn(s,o="xl/vbaProject.bin",e.vbaraw),r.vba.push(o),dr(i.wbrels,-1,"vbaProject.bin",hn.VBA)),cn(s,o="xl/metadata."+t,function HHt(){var e=[Bs];return e.push('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),e.join("")}()),r.metadata.push(o),dr(i.wbrels,-1,"metadata."+t,hn.XLMETA),M.length>1&&(cn(s,o="xl/persons/person.xml",eet(M)),r.people.push(o),dr(i.wbrels,-1,"persons/person.xml",hn.PEOPLE)),cn(s,"[Content_Types].xml",Jq(r,i)),cn(s,"_rels/.rels",v0(i.rels)),cn(s,"xl/_rels/workbook.xml.rels",v0(i.wbrels)),delete i.revssf,delete i.ssf,s}function lit(e,i){switch(i.type){case"base64":case"binary":break;case"buffer":case"array":i.type="";break;case"file":return f1(i.file,Oi.write(e,{type:_n?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");default:throw new Error("Unrecognized type "+i.type)}return Oi.write(e,i)}function iQt(e,i){switch(i.bookType){case"ods":return Ket(e,i);case"numbers":return function U$t(e,i){if(!i||!i.numbers)throw new Error("Must pass a `numbers` option -- check the README");var t=Oi.read(i.numbers,{type:"base64"}),n=function V$t(e){var i={},t=[];return e.FileIndex.map(function(n,r){return[n,e.FullPaths[r]]}).forEach(function(n){var r=n[0],s=n[1];2==r.type&&r.name.match(/\.iwa/)&&0==r.content[0]&&W1(X1(r.content)).forEach(function(o){t.push(o.id),i[o.id]={deps:[],location:s,type:Pn(o.messages[0].meta[1][0].data)}})}),e.FileIndex.forEach(function(n){n.name.match(/\.iwa/)&&0==n.content[0]&&W1(X1(n.content)).forEach(function(r){r.messages.forEach(function(s){[5,6].forEach(function(o){s.meta[o]&&s.meta[o].forEach(function(l){i[r.id].deps.push(Pn(l.data))})})})})}),i}(t),r=Dd(t,n,1);if(null==r)throw"Could not find message ".concat(1," in Numbers template");var s=up(ci(r.messages[0].data)[1],Fn);if(s.length>1)throw new Error("Template NUMBERS file must have exactly one sheet");return e.SheetNames.forEach(function(o,l){l>=1&&(function G$t(e,i,t){var n=-1,r=-1,s={};Tr(e,i,1,function(w,C){var M=ci(w.messages[0].data);n=Fn(ci(w.messages[0].data)[1][0].data),r=Ad({deps:[1],location:i[n].location,type:2},i),s[n]=r,To(w,r),M[1].push({type:2,data:_o(r)});var P=Dd(e,i,n);P.id=r,i[1].location==i[r].location?C.push(P):Tr(e,i,r,function(O,L){return L.push(P)}),w.messages[0].data=Ri(M)});var o=-1;Tr(e,i,r,function(w,C){for(var M=ci(w.messages[0].data),P=3;P<=69;++P)delete M[P];var O=up(M[2],Fn);O.forEach(function(U){return Xu(w,U)}),o=Ad({deps:[r],location:i[O[0]].location,type:i[O[0]].type},i),To(w,o),s[O[0]]=o,M[2]=[{type:2,data:_o(o)}];var L=Dd(e,i,O[0]);L.id=o,i[O[0]].location==i[r].location?C.push(L):(Tr(e,i,2,function(U){var X=ci(U.messages[0].data);sl(X,i,r,o),U.messages[0].data=Ri(X)}),Tr(e,i,o,function(U,X){return X.push(L)})),w.messages[0].data=Ri(M)});var l=-1;Tr(e,i,o,function(w,C){for(var M=ci(w.messages[0].data),P=ci(M[1][0].data),O=3;O<=69;++O)delete P[O];var L=Fn(P[2][0].data);P[2][0].data=_o(s[L]),M[1][0].data=Ri(P);var U=Fn(M[2][0].data);Xu(w,U),To(w,l=Ad({deps:[o],location:i[U].location,type:i[U].type},i)),s[U]=l,M[2][0].data=_o(l);var X=Dd(e,i,U);X.id=l,i[o].location==i[l].location?C.push(X):Tr(e,i,l,function(W,Z){return Z.push(X)}),w.messages[0].data=Ri(M)}),Tr(e,i,l,function(w,C){var M,P,O=ci(w.messages[0].data),U=Pc(O[1][0].data).replace(/-[A-Z0-9]*/,"-".concat(("0000"+t.toString(16)).slice(-4)));if(O[1][0].data=Go(U),[12,13,29,31,32,33,39,44,47,81,82,84].forEach(function(_t){return delete O[_t]}),O[45]){var W=Fn(ci(O[45][0].data)[1][0].data);Xu(w,W),delete O[45]}O[70]&&(null==(M=ci(O[70][0].data)[2])||M.forEach(function(_t){var Mt=ci(_t.data);[2,3].map(function(ft){return Mt[ft][0]}).forEach(function(ft){var dt=ci(ft.data);if(dt[8]){var pt=Fn(dt[8][0].data);Xu(w,pt)}})}),delete O[70]),[46,30,34,35,36,38,48,49,60,61,62,63,64,71,72,73,74,75,85,86,87,88,89].forEach(function(_t){if(O[_t]){var Mt=Fn(O[_t][0].data);delete O[_t],Xu(w,Mt)}});var rt=ci(O[4][0].data);[2,4,5,6,11,12,13,15,16,17,18,19,20,21,22].forEach(function(_t){var Mt;if(null!=(Mt=rt[_t])&&Mt[0]){var ft=Fn(rt[_t][0].data),dt=Ad({deps:[l],location:i[ft].location,type:i[ft].type},i);Xu(w,ft),To(w,dt),s[ft]=dt;var pt=Dd(e,i,ft);if(pt.id=dt,i[ft].location==i[l].location)C.push(pt);else{i[dt].location=i[ft].location.replace(ft.toString(),dt.toString()),i[dt].location==i[ft].location&&(i[dt].location=i[dt].location.replace(/\.iwa/,"-".concat(dt,".iwa"))),Oi.utils.cfb_add(e,i[dt].location,T0(_0([pt])));var bt=i[dt].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Tr(e,i,2,function(Tt){var Et=ci(Tt.messages[0].data);XN(Et,dt,bt),sl(Et,i,l,dt),Tt.messages[0].data=Ri(Et)})}rt[_t][0].data=_o(dt)}});var st=ci(rt[1][0].data);null==(P=st[2])||P.forEach(function(_t){var Mt=Fn(_t.data),ft=Ad({deps:[l],location:i[Mt].location,type:i[Mt].type},i);Xu(w,Mt),To(w,ft),s[Mt]=ft;var dt=Dd(e,i,Mt);if(dt.id=ft,i[Mt].location==i[l].location)C.push(dt);else{i[ft].location=i[Mt].location.replace(Mt.toString(),ft.toString()),i[ft].location==i[Mt].location&&(i[ft].location=i[ft].location.replace(/\.iwa/,"-".concat(ft,".iwa"))),Oi.utils.cfb_add(e,i[ft].location,T0(_0([dt])));var pt=i[ft].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Tr(e,i,2,function(bt){var Tt=ci(bt.messages[0].data);XN(Tt,ft,pt),sl(Tt,i,l,ft),bt.messages[0].data=Ri(Tt)})}_t.data=_o(ft)}),rt[1][0].data=Ri(st);var vt=ci(rt[3][0].data);vt[1].forEach(function(_t){var Mt=ci(_t.data),ft=Fn(Mt[2][0].data),dt=s[ft];if(!s[ft]){dt=Ad({deps:[l],location:"",type:i[ft].type},i),i[dt].location="Root Entry/Index/Tables/Tile-".concat(dt,".iwa"),s[ft]=dt;var pt=Dd(e,i,ft);pt.id=dt,Xu(w,ft),To(w,dt),Oi.utils.cfb_add(e,"/Index/Tables/Tile-".concat(dt,".iwa"),T0(_0([pt]))),Tr(e,i,2,function(bt){var Tt=ci(bt.messages[0].data);Tt[3].push({type:2,data:Ri([[],[{type:0,data:Si(dt)}],[{type:2,data:Go("Tables/Tile")}],[{type:2,data:Go("Tables/Tile-".concat(dt))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:Si(0)}],[],[{type:0,data:Si(0)}]])}),Tt[1]=[{type:0,data:Si(Math.max(dt+1,Pn(Tt[1][0].data)))}],sl(Tt,i,l,dt),bt.messages[0].data=Ri(Tt)})}Mt[2][0].data=_o(dt),_t.data=Ri(Mt)}),rt[3][0].data=Ri(vt),O[4][0].data=Ri(rt),w.messages[0].data=Ri(O)})}(t,n,l+1),r=Dd(t,n,1),s=up(ci(r.messages[0].data)[1],Fn)),function H$t(e,i,t,n,r,s){var o=[];Tr(e,i,s,function(C){var M=ci(C.messages[0].data);M[1]=[{type:2,data:Go(n)}],o=up(M[2],Fn),C.messages[0].data=Ri(M)});var w=Fn(ci(Dd(e,i,o[0]).messages[0].data)[2][0].data);Tr(e,i,w,function(C,M){return function W$t(e,i,t,n,r,s){if(!t["!ref"])throw new Error("Cannot export empty sheet to NUMBERS");var o=xa(t["!ref"]);o.s.r=o.s.c=0;var l=!1;o.e.c>999&&(l=!0,o.e.c=999),o.e.r>999999&&(l=!0,o.e.r=999999),l&&console.error("Truncating to ".concat(un(o)));var w=[];if(t["!data"])w=t["!data"];else{for(var C=[],M=0;M<=o.e.c;++M)C[M]=dn(M);for(var P=0;P<=o.e.r;++P){w[P]=[];var O=""+(P+1);for(M=0;M<=o.e.c;++M){var L=t[C[M]+O];L&&(w[P][M]=L)}}}var U={cmnt:[{a:"~54ee77S~",t:"... the people who are crazy enough to think they can change the world, are the ones who do."}],ferr:[],fmla:[],nfmt:[],ofmt:[],rsst:[{v:"~54ee77S~",l:"https://sheetjs.com/"}],sst:["~Sh33tJ5~"]},X=ci(n.messages[0].data);X[6][0].data=Si(o.e.r+1),X[7][0].data=Si(o.e.c+1),delete X[46];var W=ci(X[4][0].data),Z=Fn(ci(W[1][0].data)[2][0].data);Tr(e,i,Z,function(Kt,ke){var Ce,oi=ci(Kt.messages[0].data);if(null!=(Ce=oi?.[2])&&Ce[0])for(var ui=0;ui1){var Ne=Fn(W[19][0].data),Se={},Ei=0;Tr(e,i,Ne,function(Kt){var ke=ci(Kt.messages[0].data);ke[3]=[],U.cmnt.forEach(function(Ce,oi){if(0!=oi){var ui=[];Ce.replies&&Ce.replies.forEach(function(jt){Se[jt.a||""]||(Se[jt.a||""]=fp(e,212,[[],[{type:2,data:Go(jt.a||"")}],[{type:2,data:eit(++Ei)}],[],[{type:0,data:Si(0)}]],"/Index/Tables/DataList",i));var Xt=Se[jt.a||""],Ht=fp(e,3056,[[],[{type:2,data:Go(jt.t||"")}],[{type:2,data:Ri([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:_o(Xt)}]],"/Index/Tables/DataList",i);Tr(e,i,Ht,function(Te){return To(Te,Xt)}),ui.push(Ht),Tr(e,i,2,function(Te){var Pt=ci(Te.messages[0].data);sl(Pt,i,Ht,Xt),Te.messages[0].data=Ri(Pt)})}),Se[Ce.a||""]||(Se[Ce.a||""]=fp(e,212,[[],[{type:2,data:Go(Ce.a||"")}],[{type:2,data:eit(++Ei)}],[],[{type:0,data:Si(0)}]],"/Index/Tables/DataList",i));var ii=Se[Ce.a||""],Ft=fp(e,3056,[[],[{type:2,data:Go(Ce.t||"")}],[{type:2,data:Ri([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:_o(ii)}],ui.map(function(jt){return{type:2,data:_o(jt)}}),[{type:2,data:Ri([[],[{type:0,data:Si(oi)}],[{type:0,data:Si(0)}]])}]],"/Index/Tables/DataList",i);Tr(e,i,Ft,function(jt){To(jt,ii),ui.forEach(function(Xt){return To(jt,Xt)})}),ke[3].push({type:2,data:Ri([[],[{type:0,data:Si(oi)}],[{type:0,data:Si(1)}],[],[],[],[],[],[],[],[{type:2,data:_o(Ft)}]])}),To(Kt,Ft),Tr(e,i,2,function(jt){var Xt=ci(jt.messages[0].data);sl(Xt,i,Ne,Ft),sl(Xt,i,Ft,ii),ui.length&&sl(Xt,i,Ft,ui),jt.messages[0].data=Ri(Xt)})}}),ke[2][0].data=Si(U.cmnt.length+1),Kt.messages[0].data=Ri(ke)})}X[4][0].data=Ri(W),n.messages[0].data=Ri(X)}(e,i,t,C,M,w)})}(t,n,e.Sheets[o],o,0,s[l])}),t}(e,i);case"xlsb":return function K$t(e,i){e&&!e.SSF&&(e.SSF=pr(ki)),e&&e.SSF&&(u0(),h1(e.SSF),i.revssf=WE(e.SSF),i.revssf[e.SSF[65535]]=0,i.ssf=e.SSF),i.rels={},i.wbrels={},i.Strings=[],i.Strings.Count=0,i.Strings.Unique=0,B1?i.revStrings=new Map:(i.revStrings={},i.revStrings.foo=[],delete i.revStrings.foo);var t="bin",r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};YN(i=i||{});var s=WL(),o="",l=0;if(i.cellXfs=[],vf(i.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),cn(s,o="docProps/core.xml",itt(e.Props,i)),r.coreprops.push(o),dr(i.rels,2,o,hn.CORE_PROPS),o="docProps/app.xml",!e.Props||!e.Props.SheetNames)if(e.Workbook&&e.Workbook.Sheets){for(var w=[],C=0;C0&&(cn(s,o="docProps/custom.xml",att(e.Custprops)),r.custprops.push(o),dr(i.rels,4,o,hn.CUST_PROPS));var M=["SheetJ5"];for(i.tcid=0,l=1;l<=e.SheetNames.length;++l){var P={"!id":{}},O=e.Sheets[e.SheetNames[l-1]];if(cn(s,o="xl/worksheets/sheet"+l+"."+t,Vjt(l-1,i,e,P)),r.sheets.push(o),dr(i.wbrels,-1,"worksheets/sheet"+l+"."+t,hn.WS[0]),O){var U=O["!comments"],X=!1,W="";if(U&&U.length>0){var Z=!1;U.forEach(function(st){st[1].forEach(function(vt){1==vt.T&&(Z=!0)})}),Z&&(cn(s,W="xl/threadedComments/threadedComment"+l+".xml",tet(U,M,i)),r.threadedcomments.push(W),dr(P,-1,"../threadedComments/threadedComment"+l+".xml",hn.TCMNT)),cn(s,W="xl/comments"+l+"."+t,s7t(U)),r.comments.push(W),dr(P,-1,"../comments"+l+"."+t,hn.CMNT),X=!0}O["!legacy"]&&X&&cn(s,"xl/drawings/vmlDrawing"+l+".vml",Jtt(l,O["!comments"])),delete O["!comments"],delete O["!legacy"]}P["!id"].rId1&&cn(s,S1(o),v0(P))}return null!=i.Strings&&i.Strings.length>0&&(cn(s,o="xl/sharedStrings."+t,function vGt(e){var i=po();Ee(i,159,function pGt(e,i){return i||(i=re(8)),i.write_shift(4,e.Count),i.write_shift(4,e.Unique),i}(e));for(var t=0;t1&&(cn(s,o="xl/persons/person.xml",eet(M)),r.people.push(o),dr(i.wbrels,-1,"persons/person.xml",hn.PEOPLE)),cn(s,"[Content_Types].xml",Jq(r,i)),cn(s,"_rels/.rels",v0(i.rels)),cn(s,"xl/_rels/workbook.bin.rels",v0(i.wbrels)),delete i.revssf,delete i.ssf,s}(e,i);default:return sit(e,i)}}function Md(e,i,t){t||(t="");var n=t+e;switch(i.type){case"base64":return BE(Cd(n));case"binary":return Cd(n);case"string":return e;case"file":return f1(i.file,n,"utf8");case"buffer":return _n?bd(n,"utf8"):typeof TextEncoder<"u"?(new TextEncoder).encode(n):Md(n,{type:"binary"}).split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}function yA(e,i){switch(i.type){case"string":case"base64":case"binary":for(var t="",n=0;n22)throw new Error("Bad Code Name: Worksheet"+o)}})}(e.SheetNames,e.Workbook&&e.Workbook.Sheets||[],!!e.vbaraw);for(var t=0;t255&&(t=95),s=t>>2,(n=e.charCodeAt(C++))>255&&(n=95),o=(3&t)<<4|n>>4,(r=e.charCodeAt(C++))>255&&(r=95),l=(15&n)<<2|r>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=ho.charAt(s)+ho.charAt(o)+ho.charAt(l)+ho.charAt(w);return i}(e);case"binary":case"string":return e;case"file":return f1(i.file,e,"binary");case"buffer":return _n?bd(e,"binary"):e.split("").map(function(t){return t.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}(mit(e.Sheets[e.SheetNames[r]],t),t);case"csv":return Md(qN(e.Sheets[e.SheetNames[r]],t),t,"\ufeff");case"dif":return Md(ztt.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"dbf":return yA(wN.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"prn":return Md(y0.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"rtf":return Md(function NGt(e,i){var t=["{\\rtf1\\ansi"];if(!e["!ref"])return t[0]+"}";for(var r,n=Gn(e["!ref"]),s=null!=e["!data"],o=[],l=n.s.r;l<=n.e.r;++l){t.push("\\trowd\\trautofit1");for(var w=n.s.c;w<=n.e.c;++w)t.push("\\cellx"+(w+1));for(t.push("\\pard\\intbl"),s&&(o=e["!data"][l]||[]),w=n.s.c;w<=n.e.c;++w){var C=Tn({r:l,c:w});(r=s?o[w]:e[C])&&(null!=r.v||r.f&&!r.F)?(t.push(" "+(r.w||(Sd(r),r.w)||"").replace(/[\r\n]/g,"\\par ")),t.push("\\cell")):t.push(" \\cell")}t.push("\\pard\\intbl\\row")}return t.join("")+"}"}(e.Sheets[e.SheetNames[r]]),t);case"eth":return Md(Gtt.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"fods":return Md(Ket(e,t),t);case"wk1":return yA(lp.sheet_to_wk1(e.Sheets[e.SheetNames[r]],t),t);case"wk3":return yA(lp.book_to_wk3(e,t),t);case"biff2":t.biff||(t.biff=2);case"biff3":t.biff||(t.biff=3);case"biff4":return t.biff||(t.biff=4),yA(Fet(e,t),t);case"biff5":t.biff||(t.biff=5);case"biff8":case"xla":case"xls":return t.biff||(t.biff=8),function sQt(e,i){var t=i||{};return lit(function qYt(e,i){var t=i||{},n=Oi.utils.cfb_new({root:"R"}),r="/Workbook";switch(t.bookType||"xls"){case"xls":t.bookType="biff8";case"xla":t.bookType||(t.bookType="xla");case"biff8":r="/Workbook",t.biff=8;break;case"biff5":r="/Book",t.biff=5;break;default:throw new Error("invalid type "+t.bookType+" for XLS CFB")}return Oi.utils.cfb_add(n,r,Fet(e,t)),8==t.biff&&(e.Props||e.Custprops)&&function JYt(e,i){var o,t=[],n=[],r=[],s=0,l=cq(lN,"n"),w=cq(cN,"n");if(e.Props)for(o=Jr(e.Props),s=0;s-1||ntt.indexOf(r[s][0])>-1||null!=r[s][1]&&C.push(r[s]);n.length&&Oi.utils.cfb_add(i,"/\x05SummaryInformation",vtt(n,U1.SI,w,cN)),(t.length||C.length)&&Oi.utils.cfb_add(i,"/\x05DocumentSummaryInformation",vtt(t,U1.DSI,l,lN,C.length?C:null,U1.UDI))}(e,n),8==t.biff&&e.vbaraw&&function l7t(e,i){i.FullPaths.forEach(function(t,n){if(0!=n){var r=t.replace(/^[\/]*[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");"/"!==r.slice(-1)&&Oi.utils.cfb_add(e,r,i.FileIndex[n].content)}})}(n,Oi.read(e.vbaraw,{type:"string"==typeof e.vbaraw?"binary":"buffer"})),n}(e,t),t)}(e,t);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return function nQt(e,i){var t=pr(i||{});return function cit(e,i){var t={},n=_n?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(i.compression&&(t.compression="DEFLATE"),i.password)t.type=n;else switch(i.type){case"base64":t.type="base64";break;case"binary":t.type="string";break;case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");case"buffer":case"file":t.type=n;break;default:throw new Error("Unrecognized type "+i.type)}var r=e.FullPaths?Oi.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[t.type]||t.type,compression:!!i.compression}):e.generate(t);if(typeof Deno<"u"&&"string"==typeof r){if("binary"==i.type||"base64"==i.type)return r;r=new Uint8Array(c1(r))}return i.password&&typeof encrypt_agile<"u"?lit(encrypt_agile(r,i.password),i):"file"===i.type?f1(i.file,r):"string"==i.type?gr(r):r}(iQt(e,t),t)}(e,t);default:throw new Error("Unrecognized bookType |"+t.bookType+"|")}}function uit(e,i,t,n,r,s,o){var l=kn(t),w=o.defval,C=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),M=!0,P=null!=e["!data"],O=1===r?[]:{};if(1!==r)if(Object.defineProperty)try{Object.defineProperty(O,"__rowNum__",{value:t,enumerable:!1})}catch{O.__rowNum__=t}else O.__rowNum__=t;if(!P||e["!data"][t])for(var L=i.s.c;L<=i.e.c;++L){var U=P?(e["!data"][t]||[])[L]:e[n[L]+l];if(null!=U&&void 0!==U.t){var X=U.v;switch(U.t){case"z":if(null==X)break;continue;case"e":X=0==X?null:void 0;break;case"s":case"b":case"n":if(!U.z||!Dl(U.z)||"number"==typeof(X=Vu(X)))break;case"d":o&&(o.UTC||!1===o.raw)||(X=$m(new Date(X)));break;default:throw new Error("unrecognized type "+U.t)}if(null!=s[L]){if(null==X)if("e"==U.t&&null===X)O[s[L]]=null;else if(void 0!==w)O[s[L]]=w;else{if(!C||null!==X)continue;O[s[L]]=null}else O[s[L]]=("n"===U.t&&"boolean"==typeof o.rawNumbers?o.rawNumbers:C)?X:Sd(U,X,o);null!=X&&(M=!1)}}else{if(void 0===w)continue;null!=s[L]&&(O[s[L]]=w)}}return{row:O,isempty:M}}function JN(e,i){if(null==e||null==e["!ref"])return[];var t={t:"n",v:0},n=0,r=1,s=[],o=0,l="",w={s:{r:0,c:0},e:{r:0,c:0}},C=i||{},M=null!=C.range?C.range:e["!ref"];switch(1===C.header?n=1:"A"===C.header?n=2:Array.isArray(C.header)?n=3:null==C.header&&(n=0),typeof M){case"string":w=Gn(M);break;case"number":(w=Gn(e["!ref"])).s.r=M;break;default:w=M}n>0&&(r=0);var P=kn(w.s.r),O=[],L=[],U=0,X=0,W=null!=e["!data"],Z=w.s.r,rt=0,st={};W&&!e["!data"][Z]&&(e["!data"][Z]=[]);var vt=C.skipHidden&&e["!cols"]||[],_t=C.skipHidden&&e["!rows"]||[];for(rt=w.s.c;rt<=w.e.c;++rt)if(!(vt[rt]||{}).hidden)switch(O[rt]=dn(rt),t=W?e["!data"][Z][rt]:e[O[rt]+P],n){case 1:s[rt]=rt-w.s.c;break;case 2:s[rt]=O[rt];break;case 3:s[rt]=C.header[rt-w.s.c];break;default:if(null==t&&(t={w:"__EMPTY",t:"s"}),l=o=Sd(t,null,C),X=st[o]||0){do{l=o+"_"+X++}while(st[l]);st[o]=X,st[l]=1}else st[o]=1;s[rt]=l}for(Z=w.s.r+r;Z<=w.e.r;++Z)if(!(_t[Z]||{}).hidden){var Mt=uit(e,w,Z,O,n,s,C);(!1===Mt.isempty||(1===n?!1!==C.blankrows:C.blankrows))&&(L[U++]=Mt.row)}return L.length=U,L}var hit=/"/g;function fit(e,i,t,n,r,s,o,l){for(var w=!0,C=[],M="",P=kn(t),O=null!=e["!data"],L=O&&e["!data"][t]||[],U=i.s.c;U<=i.e.c;++U)if(n[U]){var X=O?L[U]:e[n[U]+P];if(null==X)M="";else if(null!=X.v){w=!1,M=""+(l.rawNumbers&&"n"==X.t?X.v:Sd(X,null,l));for(var W=0,Z=0;W!==M.length;++W)if((Z=M.charCodeAt(W))===r||Z===s||34===Z||l.forceQuotes){M='"'+M.replace(hit,'""')+'"';break}"ID"==M&&(M='"ID"')}else null==X.f||X.F?M="":(w=!1,(M="="+X.f).indexOf(",")>=0&&(M='"'+M.replace(hit,'""')+'"'));C.push(M)}if(l.strip)for(;""===C[C.length-1];)--C.length;return!1===l.blankrows&&w?null:C.join(o)}function qN(e,i){var t=[],n=i??{};if(null==e||null==e["!ref"])return"";for(var r=Gn(e["!ref"]),s=void 0!==n.FS?n.FS:",",o=s.charCodeAt(0),l=void 0!==n.RS?n.RS:"\n",w=l.charCodeAt(0),C="",M=[],P=n.skipHidden&&e["!cols"]||[],O=n.skipHidden&&e["!rows"]||[],L=r.s.c;L<=r.e.c;++L)(P[L]||{}).hidden||(M[L]=dn(L));for(var U=0,X=r.s.r;X<=r.e.r;++X)(O[X]||{}).hidden||null!=(C=fit(e,r,X,M,o,w,s,n))&&(C||!1!==n.blankrows)&&t.push((U++?l:"")+C);return t.join("")}function mit(e,i){i||(i={}),i.FS="\t",i.RS="\n";var t=qN(e,i);return typeof pn>"u"||"string"==i.type?t:"\xff\xfe"+pn.utils.encode(1200,t,"str")}function pit(e,i,t){var n=t||{},r=e?null!=e["!data"]:n.dense;null!=Ls&&null==r&&(r=Ls);var s=+!n.skipHeader,o=e||{};!e&&r&&(o["!data"]=[]);var l=0,w=0;if(o&&null!=n.origin)if("number"==typeof n.origin)l=n.origin;else{var C="string"==typeof n.origin?vr(n.origin):n.origin;l=C.r,w=C.c}var M={s:{c:0,r:0},e:{c:w,r:l+i.length-1+s}};if(o["!ref"]){var P=Gn(o["!ref"]);M.e.c=Math.max(M.e.c,P.e.c),M.e.r=Math.max(M.e.r,P.e.r),-1==l&&(M.e.r=(l=P.e.r+1)+i.length-1+s)}else-1==l&&(l=0,M.e.r=i.length-1+s);var O=n.header||[],L=0,U=[];i.forEach(function(W,Z){r&&!o["!data"][l+Z+s]&&(o["!data"][l+Z+s]=[]),r&&(U=o["!data"][l+Z+s]),Jr(W).forEach(function(rt){-1==(L=O.indexOf(rt))&&(O[L=O.length]=rt);var st=W[rt],vt="z",_t="",Mt=r?"":dn(w+L)+kn(l+Z+s),ft=r?U[w+L]:o[Mt];!st||"object"!=typeof st||st instanceof Date?("number"==typeof st?vt="n":"boolean"==typeof st?vt="b":"string"==typeof st?vt="s":st instanceof Date?(vt="d",n.UTC||(st=XE(st)),n.cellDates||(vt="n",st=ms(st)),_t=null!=ft&&ft.z&&Dl(ft.z)?ft.z:n.dateNF||ki[14]):null===st&&n.nullError&&(vt="e",st=0),ft?(ft.t=vt,ft.v=st,delete ft.w,delete ft.R,_t&&(ft.z=_t)):r?U[w+L]=ft={t:vt,v:st}:o[Mt]=ft={t:vt,v:st},_t&&(ft.z=_t)):r?U[w+L]=st:o[Mt]=st})}),M.e.c=Math.max(M.e.c,w+O.length-1);var X=kn(l);if(r&&!o["!data"][l]&&(o["!data"][l]=[]),s)for(L=0;L=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(t)>=0&&t.length<32){var s=t.match(/\d+$/);r=s&&+s[0]||0;var o=s&&t.slice(0,s.index)||t;for(++r;r<=65535&&-1!=e.SheetNames.indexOf(t=o+r);++r);}if(Det(t),e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");return e.SheetNames.push(t),e.Sheets[t]=i,t}var vit_json_to_sheet=function dQt(e,i){return pit(null,e,i)};let CQt=(()=>{class e{constructor(){}exportAsExcelFile(t,n){const o=j1({Sheets:{data:vit_json_to_sheet(t)},SheetNames:["data"]},{bookType:"xlsx",type:"array"});this.saveAsExcelFile(o,n)}saveAsExcelFile(t,n){const r=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});dd.saveAs(r,n+"_export_"+(new Date).getTime()+".xlsx")}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const SQt=["*",[["mat-toolbar-row"]]],EQt=["*","mat-toolbar-row"];let AQt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"],standalone:!0})}return e})(),DQt=(()=>{class e{constructor(t,n,r){this._elementRef=t,this._platform=n,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(ir),mt(Ni))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-toolbar"]],contentQueries:function(n,r,s){if(1&n&&An(s,AQt,5),2&n){let o;Be(o=Ve())&&(r._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(n,r){2&n&&(Ll(r.color?"mat-"+r.color:""),bi("mat-toolbar-multiple-rows",r._toolbarRows.length>0)("mat-toolbar-single-row",0===r._toolbarRows.length))},inputs:{color:"color"},exportAs:["matToolbar"],standalone:!0,features:[Vi],ngContentSelectors:EQt,decls:2,vars:0,template:function(n,r){1&n&&(Kn(SQt),xi(0),xi(1,1))},styles:[".mat-toolbar{background:var(--mat-toolbar-container-background-color);color:var(--mat-toolbar-container-text-color)}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font);font-size:var(--mat-toolbar-title-text-size);line-height:var(--mat-toolbar-title-text-line-height);font-weight:var(--mat-toolbar-title-text-weight);letter-spacing:var(--mat-toolbar-title-text-tracking);margin:0}.cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color:var(--mat-toolbar-container-text-color);--mdc-outlined-button-label-text-color:var(--mat-toolbar-container-text-color)}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height)}}"],encapsulation:2,changeDetection:0})}return e})(),MQt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})();const xit=["*"],IQt=["content"],RQt=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],kQt=["mat-drawer","mat-drawer-content","*"];function PQt(e,i){if(1&e){const t=ve();tt(0,"div",1),Vt("click",function(){return Ut(t),zt(Ct()._onBackdropClicked())}),et()}2&e&&bi("mat-drawer-shown",Ct()._isShowingBackdrop())}function FQt(e,i){1&e&&(tt(0,"mat-drawer-content"),xi(1,2),et())}const OQt={transformDrawer:mr("transform",[Nn("open, open-instant",si({transform:"none",visibility:"visible"})),Nn("void",si({"box-shadow":"none",visibility:"hidden"})),ln("void => open-instant",an("0ms")),ln("void <=> open, open-instant => void",an("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},LQt=new ee("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function NQt(){return!1}}),yit=new ee("MAT_DRAWER_CONTAINER");let e4=(()=>{class e extends lC{constructor(t,n,r,s,o){super(r,s,o),this._changeDetectorRef=t,this._container=n}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn),mt(Sn(()=>wit)),mt(ri),mt(Ry),mt(ei))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(n,r){2&n&&Ds("margin-left",r._container._contentMargins.left,"px")("margin-right",r._container._contentMargins.right,"px")},standalone:!0,features:[fi([{provide:lC,useExisting:e}]),hi,Vi],ngContentSelectors:xit,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},encapsulation:2,changeDetection:0})}return e})(),bit=(()=>{class e{get position(){return this._position}set position(t){(t="end"===t?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=la(t)}get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(t){("true"===t||"false"===t||null==t)&&(t=la(t)),this._autoFocus=t}get opened(){return this._opened}set opened(t){this.toggle(la(t))}constructor(t,n,r,s,o,l,w,C){this._elementRef=t,this._focusTrapFactory=n,this._focusMonitor=r,this._platform=s,this._ngZone=o,this._interactivityChecker=l,this._doc=w,this._container=C,this._focusTrap=null,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new Pe,this._animationEnd=new Pe,this._animationState="void",this.openedChange=new De(!0),this._openedStream=this.openedChange.pipe(In(M=>M),Di(()=>{})),this.openedStart=this._animationStarted.pipe(In(M=>M.fromState!==M.toState&&0===M.toState.indexOf("open")),bT(void 0)),this._closedStream=this.openedChange.pipe(In(M=>!M),Di(()=>{})),this.closedStart=this._animationStarted.pipe(In(M=>M.fromState!==M.toState&&"void"===M.toState),bT(void 0)),this._destroyed=new Pe,this.onPositionChanged=new De,this._modeChanged=new Pe,this.openedChange.subscribe(M=>{M?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{Sc(this._elementRef.nativeElement,"keydown").pipe(In(M=>27===M.keyCode&&!this.disableClose&&!io(M)),Ui(this._destroyed)).subscribe(M=>this._ngZone.run(()=>{this.close(),M.stopPropagation(),M.preventDefault()}))}),this._animationEnd.pipe(eu((M,P)=>M.fromState===P.fromState&&M.toState===P.toState)).subscribe(M=>{const{fromState:P,toState:O}=M;(0===O.indexOf("open")&&"void"===P||"void"===O&&0===P.indexOf("open"))&&this.openedChange.emit(this._opened)})}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(n)}_focusByCssSelector(t,n){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,n)}_takeFocus(){if(!this._focusTrap)return;const t=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(n=>{!n&&"function"==typeof this._elementRef.nativeElement.focus&&t.focus()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(t){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const t=this._doc.activeElement;return!!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=!0,"end"===this._position&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(t=!this.opened,n){t&&n&&(this._openedVia=n);const r=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),r}_setOpen(t,n,r){return this._opened=t,t?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",n&&this._restoreFocus(r)),this._updateFocusTrapState(),new Promise(s=>{this.openedChange.pipe(er(1)).subscribe(o=>s(o?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop)}_updatePositionInParent(t){if(!this._platform.isBrowser)return;const n=this._elementRef.nativeElement,r=n.parentNode;"end"===t?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),r.insertBefore(this._anchor,n)),r.appendChild(n)):this._anchor&&this._anchor.parentNode.insertBefore(n,this._anchor)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ri),mt(UR),mt(Ul),mt(ir),mt(ei),mt(QT),mt(Ni,8),mt(yit,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-drawer"]],viewQuery:function(n,r){if(1&n&&Mi(IQt,5),2&n){let s;Be(s=Ve())&&(r._content=s.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(n,r){1&n&&G_("@transform.start",function(o){return r._animationStarted.next(o)})("@transform.done",function(o){return r._animationEnd.next(o)}),2&n&&(N_("@transform",r._animationState),Ti("align",null),bi("mat-drawer-end","end"===r.position)("mat-drawer-over","over"===r.mode)("mat-drawer-push","push"===r.mode)("mat-drawer-side","side"===r.mode)("mat-drawer-opened",r.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],standalone:!0,features:[Vi],ngContentSelectors:xit,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(n,r){1&n&&(Kn(),tt(0,"div",1,0),xi(2),et())},dependencies:[lC],encapsulation:2,data:{animation:[OQt.transformDrawer]},changeDetection:0})}return e})(),wit=(()=>{class e{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=la(t)}get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=null==t?null:la(t)}get scrollable(){return this._userContent||this._content}constructor(t,n,r,s,o,l=!1,w){this._dir=t,this._element=n,this._ngZone=r,this._changeDetectorRef=s,this._animationMode=w,this._drawers=new nh,this.backdropClick=new De,this._destroyed=new Pe,this._doCheckSubject=new Pe,this._contentMargins={left:null,right:null},this._contentMarginChanges=new Pe,t&&t.change.pipe(Ui(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),o.change().pipe(Ui(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=l}ngAfterContentInit(){this._allDrawers.changes.pipe(Ta(this._allDrawers),Ui(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(n=>!n._container||n._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Ta(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(tu(10),Ui(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const r=this._left._getWidth();t+=r,n-=r}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._getWidth();else if("push"==this._right.mode){const r=this._right._getWidth();n+=r,t-=r}t=t||null,n=n||null,(t!==this._contentMargins.left||n!==this._contentMargins.right)&&(this._contentMargins={left:t,right:n},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(In(n=>n.fromState!==n.toState),Ui(this._drawers.changes)).subscribe(n=>{"open-instant"!==n.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Ui(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Ui(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(er(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Ui(Yr(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const n=this._element.nativeElement.classList,r="mat-drawer-container-has-open";t?n.add(r):n.remove(r)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return null!=t&&t.opened}_drawerHasBackdrop(t){return null==this._backdropOverride?!!t&&"side"!==t.mode:this._backdropOverride}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ba,8),mt(ri),mt(ei),mt(Mn),mt(ou),mt(LQt),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(n,r,s){if(1&n&&(An(s,e4,5),An(s,bit,5)),2&n){let o;Be(o=Ve())&&(r._content=o.first),Be(o=Ve())&&(r._allDrawers=o)}},viewQuery:function(n,r){if(1&n&&Mi(e4,5),2&n){let s;Be(s=Ve())&&(r._userContent=s.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-drawer-container-explicit-backdrop",r._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],standalone:!0,features:[fi([{provide:yit,useExisting:e}]),Vi],ngContentSelectors:kQt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(n,r){1&n&&(Kn(RQt),Gt(0,PQt,1,2,"div",0),xi(1),xi(2,1),Gt(3,FQt,2,0,"mat-drawer-content")),2&n&&(xn(0,r.hasBackdrop?0:-1),lt(3),xn(3,r._content?-1:3))},dependencies:[e4],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);box-shadow:var(--mat-sidenav-container-elevation-shadow);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);width:var(--mat-sidenav-container-width);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0})}return e})(),BQt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,lu,lu,Ki]})}return e})();function VQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().navigate(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function UQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().setFhirServer(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function zQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setEdition(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.resource.version)}}function GQt(e,i){if(1&e&&(Wi(0),tt(1,"button",20),ut(2),et(),tt(3,"mat-menu",null,5)(5,"span",16),ut(6,"Versions / Releases"),et(),Gt(7,zQt,2,1,"button",15),et(),Xi()),2&e){const t=i.$implicit,n=qi(4);lt(),yt("matMenuTriggerFor",n),lt(),Ze(t.editionName),lt(5),yt("ngForOf",t.editions)}}function HQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().setLanguage(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t)}}function WQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).navigate(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function XQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setFhirServer(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function jQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(3).setEdition(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.resource.version)}}function YQt(e,i){if(1&e&&(Wi(0),tt(1,"button",20),ut(2),et(),tt(3,"mat-menu",null,5)(5,"span",16),ut(6,"Versions / Releases"),et(),Gt(7,jQt,2,1,"button",15),et(),Xi()),2&e){const t=i.$implicit,n=qi(4);lt(),yt("matMenuTriggerFor",n),lt(),Ze(t.editionName),lt(5),yt("ngForOf",t.editions)}}function $Qt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setLanguage(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t)}}function QQt(e,i){if(1&e){const t=ve();tt(0,"mat-toolbar")(1,"button",21),Vt("click",function(){return Ut(t),Ct(),zt(qi(2).toggle())}),tt(2,"mat-icon"),ut(3,"menu"),et()(),tt(4,"a",22),Vt("click",function(){return Ut(t),zt(Ct().navigate({url:"home",type:"internal"}))}),we(5,"img",23),et(),tt(6,"span",24),ut(7,"SNOMED CT Implementation Demos"),et(),tt(8,"span",25),ut(9,"Implementation Demos"),et(),we(10,"span",26),tt(11,"button",27),ut(12,"Select Demonstrator"),et(),tt(13,"mat-menu",14,6),Gt(15,WQt,2,1,"button",15),et(),tt(16,"button",28),ut(17),et(),tt(18,"mat-menu",null,7),Gt(20,XQt,2,1,"button",15),et(),tt(21,"button",28),ut(22),et(),tt(23,"mat-menu",14,8)(25,"span",16),ut(26,"Editions"),et(),Gt(27,YQt,8,3,"ng-container",17),et(),tt(28,"button",28),ut(29),et(),tt(30,"mat-menu",null,9),Gt(32,$Qt,2,1,"button",15),et(),tt(33,"a",29)(34,"mat-icon"),ut(35,"info"),et()()()}if(2&e){const t=qi(14),n=qi(19),r=qi(24),s=qi(31),o=Ct();lt(11),yt("matMenuTriggerFor",t),lt(4),yt("ngForOf",o.demos),lt(),yt("matMenuTriggerFor",n),lt(),Ye("FHIR Server: ",o.selectedServer.name,""),lt(3),yt("ngForOf",o.fhirServers),lt(),yt("matMenuTriggerFor",r),lt(),Ze(o.selectedEdition),lt(5),yt("ngForOf",o.editionsDetails),lt(),yt("matMenuTriggerFor",s),lt(),Ze(o.selectedLanguage),lt(3),yt("ngForOf",o.languages)}}let KQt=(()=>{class e{constructor(t,n,r,s,o,l){this.codingSpecService=t,this.excelService=n,this.terminologyService=r,this.router=s,this.menuService=o,this.activatedRoute=l,this.title="sct-implementation-demonstrator",this.bindingsForExport=[],this.editions=[],this.editionsDetails=[],this.languages=["da","de","en","es","et","fi","fr","nl","no","sv"],this.selectedEdition="Edition",this.selectedLanguage="en",this.fhirServers=[{name:"SNOMED Dev IS",url:"https://dev-is-browser.ihtsdotools.org/fhir"},{name:"SNOMED Public",url:"https://snowstorm.ihtsdotools.org/fhir"},{name:"SNOMED Dev 2",url:"https://snowstorm-temp.kaicode.io/fhir"},{name:"SNOMED Lite Demo",url:"https://snowstorm-lite.nw.r.appspot.com/fhir"}],this.selectedServer=this.fhirServers[1],this.embeddedMode=!1,this.demos=[],this.router.events.subscribe(w=>{w instanceof id&>ag("config","G-7SK998GPMX",{page_path:w.urlAfterRedirects})})}ngOnInit(){this.demos=this.menuService.getDemos(),this.setFhirServer(this.selectedServer),this.bindingsForExport=[];let t=this.codingSpecService.getCodingSpec();for(const n of t)for(const r of n.bindings)this.bindingsForExport.push({section:n.title,title:r.title,ecl:r.ecl.replace(/\s\s+/g," ")});this.activatedRoute.queryParams.subscribe(n=>{this.embeddedMode="true"===n.embedded,n.edition?this.updateCodeSystemOptions(n.edition):this.updateCodeSystemOptions()}),this.terminologyService.lang$.subscribe(n=>{this.selectedLanguage=n}),this.terminologyService.fhirUrlParam$.subscribe(n=>{this.editions?.length>0&&this.editions.forEach(r=>{r.resource.version===n&&(this.selectedEdition=r.resource.title?.replace("SNOMED CT release ",""))})})}navigate(t){"internal"===t.type?this.router.navigate([t.url],{queryParams:t.queryParams}):this.openInNewTab(t.url)}openInNewTab(t){window.open(t,"_blank")}updateCodeSystemOptions(t){this.terminologyService.getCodeSystems().subscribe(n=>{this.editionsDetails=[],this.editions=n.entry;let r=new Set;this.editions.forEach(o=>{r.add(o.resource.title)}),r.forEach(o=>{this.editionsDetails.push({editionName:o,editions:this.editions.filter(l=>l.resource.title.includes(o)).sort(this.compare)})});let s=this.editionsDetails.findIndex(o=>"International Edition"===o.editionName);t?this.editions.forEach(o=>{o.resource.version===t&&this.setEdition(o)}):this.setEdition(s>=0?this.editionsDetails[s].editions[0]:this.editions[0])})}compare(t,n){return t.resource.daten.resource.date?-1:0}setFhirServer(t){this.selectedServer=t,this.terminologyService.setSnowstormFhirBase(t.url),this.selectedEdition="Edition",this.editions=[],this.editionsDetails=[],this.updateCodeSystemOptions()}setEdition(t){this.selectedEdition=t.resource.title?.replace("SNOMED CT release ",""),this.terminologyService.setFhirUrlParam(t.resource.version)}setLanguage(t){this.selectedLanguage=t,this.terminologyService.setLang(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Q8t),mt(CQt),mt(ca),mt(Fo),mt(VJ),mt(Tc))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-root"]],decls:28,vars:12,consts:[["drawer",""],["demosMenuN","matMenu"],["serverMenuN","matMenu"],["editionsMenuN","matMenu"],["menuN","matMenu"],["sub_menu","matMenu"],["demosMenu","matMenu"],["serverMenu","matMenu"],["editionsMenu","matMenu"],["menu","matMenu"],["autosize","",1,"example-container"],["mode","over",1,"example-sidenav"],[1,"flex","flex-col","justify-center"],["mat-button","",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"ml-4"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-icon-button","","id","menu-button",3,"click"],["href","javascript:void(0)",3,"click"],["src","assets/img/small_logo.png","id","logo"],["id","title"],["id","short-title"],[1,"example-spacer"],["mat-flat-button","","color","accent",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","color","primary",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank","color","primary","id","info-button"]],template:function(n,r){if(1&n&&(tt(0,"mat-drawer-container",10)(1,"mat-drawer",11,0)(3,"div",12)(4,"button",13),ut(5,"Select Demonstrator"),et(),tt(6,"mat-menu",14,1),Gt(8,VQt,2,1,"button",15),et(),tt(9,"button",13),ut(10),et(),tt(11,"mat-menu",null,2),Gt(13,UQt,2,1,"button",15),et(),tt(14,"button",13),ut(15),et(),tt(16,"mat-menu",14,3)(18,"span",16),ut(19,"Editions"),et(),Gt(20,GQt,8,3,"ng-container",17),et(),tt(21,"button",13),ut(22),et(),tt(23,"mat-menu",null,4),Gt(25,HQt,2,1,"button",15),et()()(),Gt(26,QQt,36,11,"mat-toolbar",18),we(27,"router-outlet"),et()),2&n){const s=qi(7),o=qi(12),l=qi(17),w=qi(24);lt(4),yt("matMenuTriggerFor",s),lt(4),yt("ngForOf",r.demos),lt(),yt("matMenuTriggerFor",o),lt(),Ye("FHIR Server: ",r.selectedServer.name,""),lt(3),yt("ngForOf",r.fhirServers),lt(),yt("matMenuTriggerFor",l),lt(),Ye("Edition: ",r.selectedEdition,""),lt(5),yt("ngForOf",r.editionsDetails),lt(),yt("matMenuTriggerFor",w),lt(),Ye("Language: ",r.selectedLanguage,""),lt(3),yt("ngForOf",r.languages),lt(),yt("ngIf",!r.embeddedMode)}},dependencies:[gs,Ms,oR,DQt,V1t,Sa,Oo,da,bl,Gl,cu,bit,wit],styles:[".mat-toolbar[_ngcontent-%COMP%]{background-color:#434a55;color:#fff;font-size:1.8rem;font-weight:700}button[_ngcontent-%COMP%]{font-weight:700;font-size:medium}.bar-button[_ngcontent-%COMP%]{margin-left:15px}#title[_ngcontent-%COMP%]{margin-left:15px;font-size:1.4rem}.example-spacer[_ngcontent-%COMP%]{flex:1 1 auto}a[_ngcontent-%COMP%]{margin-left:15px} .mat-mdc-menu-panel{max-width:-moz-fit-content!important;max-width:fit-content!important;overflow-x:hidden!important}.mat-mdc-unelevated-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-raised-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{margin:0!important}#demo-selector[_ngcontent-%COMP%]{margin:5px 15px;padding:10px}#menu-button[_ngcontent-%COMP%], #short-title[_ngcontent-%COMP%]{display:none}#logo[_ngcontent-%COMP%]{height:4rem}@media (max-width: 768px){#title[_ngcontent-%COMP%]{display:none}#short-title[_ngcontent-%COMP%]{display:block;margin-left:15px;font-size:.9rem}#logo[_ngcontent-%COMP%]{height:3.5rem}#info-button[_ngcontent-%COMP%]{display:none}}@media (max-width: 1200px){.bar-button[_ngcontent-%COMP%]{display:none}#menu-button[_ngcontent-%COMP%]{display:block}}"]})}return e})();function _it(e){return new ue(3e3,!1)}function yf(e){switch(e.length){case 0:return new Dy;case 1:return e[0];default:return new VH(e)}}function Tit(e,i,t=new Map,n=new Map){const r=[],s=[];let o=-1,l=null;if(i.forEach(w=>{const C=w.get("offset"),M=C==o,P=M&&l||new Map;w.forEach((O,L)=>{let U=L,X=O;if("offset"!==L)switch(U=e.normalizePropertyName(U,r),X){case"!":X=t.get(L);break;case ru:X=n.get(L);break;default:X=e.normalizeStyleValue(L,U,X,r)}P.set(U,X)}),M||s.push(P),l=P,o=C}),r.length)throw function yKt(e){return new ue(3502,!1)}();return s}function n4(e,i,t,n){switch(i){case"start":e.onStart(()=>n(t&&r4(t,"start",e)));break;case"done":e.onDone(()=>n(t&&r4(t,"done",e)));break;case"destroy":e.onDestroy(()=>n(t&&r4(t,"destroy",e)))}}function r4(e,i,t){const s=s4(e.element,e.triggerName,e.fromState,e.toState,i||e.phaseName,t.totalTime??e.totalTime,!!t.disabled),o=e._data;return null!=o&&(s._data=o),s}function s4(e,i,t,n,r="",s=0,o){return{element:e,triggerName:i,fromState:t,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function Rl(e,i,t){let n=e.get(i);return n||e.set(i,n=t),n}function Cit(e){const i=e.indexOf(":");return[e.substring(1,i),e.slice(i+1)]}const RKt=typeof document>"u"?null:document.documentElement;function a4(e){const i=e.parentNode||e.host||null;return i===RKt?null:i}let mp=null,Sit=!1;function Eit(e,i){for(;i;){if(i===e)return!0;i=a4(i)}return!1}function Ait(e,i,t){if(t)return Array.from(e.querySelectorAll(i));const n=e.querySelector(i);return n?[n]:[]}let o4=(()=>{class e{validateStyleProperty(t){return function PKt(e){mp||(mp=function FKt(){return typeof document<"u"?document.body:null}()||{},Sit=!!mp.style&&"WebkitAppearance"in mp.style);let i=!0;return mp.style&&!function kKt(e){return"ebkit"==e.substring(1,6)}(e)&&(i=e in mp.style,!i&&Sit&&(i="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in mp.style)),i}(t)}matchesElement(t,n){return!1}containsElement(t,n){return Eit(t,n)}getParentElement(t){return a4(t)}query(t,n,r){return Ait(t,n,r)}computeStyle(t,n,r){return r||""}animate(t,n,r,s,o,l=[],w){return new Dy(r,s)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();class l4{static#t=this.NOOP=new o4}class c4{}const LKt=1e3,d4="ng-enter",wA="ng-leave",_A="ng-trigger",TA=".ng-trigger",Mit="ng-animating",u4=".ng-animating";function ju(e){if("number"==typeof e)return e;const i=e.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:h4(parseFloat(i[1]),i[2])}function h4(e,i){return"s"===i?e*LKt:e}function CA(e,i,t){return e.hasOwnProperty("duration")?e:function BKt(e,i,t){let r,s=0,o="";if("string"==typeof e){const l=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===l)return i.push(_it()),{duration:0,delay:0,easing:""};r=h4(parseFloat(l[1]),l[2]);const w=l[3];null!=w&&(s=h4(parseFloat(w),l[4]));const C=l[5];C&&(o=C)}else r=e;if(!t){let l=!1,w=i.length;r<0&&(i.push(function ZQt(){return new ue(3100,!1)}()),l=!0),s<0&&(i.push(function JQt(){return new ue(3101,!1)}()),l=!0),l&&i.splice(w,0,_it())}return{duration:r,delay:s,easing:o}}(e,i,t)}function Id(e,i,t){i.forEach((n,r)=>{const s=m4(r);t&&!t.has(r)&&t.set(r,e.style[s]),e.style[s]=n})}function pp(e,i){i.forEach((t,n)=>{const r=m4(n);e.style[r]=""})}function Q1(e){return Array.isArray(e)?1==e.length?e[0]:function z1t(e,i=null){return{type:Zi.Sequence,steps:e,options:i}}(e):e}const f4=new RegExp("{{\\s*(.+?)\\s*}}","g");function Rit(e){let i=[];if("string"==typeof e){let t;for(;t=f4.exec(e);)i.push(t[1]);f4.lastIndex=0}return i}function K1(e,i,t){const n=`${e}`,r=n.replace(f4,(s,o)=>{let l=i[o];return null==l&&(t.push(function tKt(e){return new ue(3003,!1)}()),l=""),l.toString()});return r==n?e:r}const zKt=/-+([a-z0-9])/g;function m4(e){return e.replace(zKt,(...i)=>i[1].toUpperCase())}function kl(e,i,t){switch(i.type){case Zi.Trigger:return e.visitTrigger(i,t);case Zi.State:return e.visitState(i,t);case Zi.Transition:return e.visitTransition(i,t);case Zi.Sequence:return e.visitSequence(i,t);case Zi.Group:return e.visitGroup(i,t);case Zi.Animate:return e.visitAnimate(i,t);case Zi.Keyframes:return e.visitKeyframes(i,t);case Zi.Style:return e.visitStyle(i,t);case Zi.Reference:return e.visitReference(i,t);case Zi.AnimateChild:return e.visitAnimateChild(i,t);case Zi.AnimateRef:return e.visitAnimateRef(i,t);case Zi.Query:return e.visitQuery(i,t);case Zi.Stagger:return e.visitStagger(i,t);default:throw function eKt(e){return new ue(3004,!1)}()}}function p4(e,i){return window.getComputedStyle(e)[i]}const WKt=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class kit extends c4{normalizePropertyName(i,t){return m4(i)}normalizeStyleValue(i,t,n,r){let s="";const o=n.toString().trim();if(WKt.has(t)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const l=n.match(/^[+-]?[\d\.]+([a-z]*)$/);l&&0==l[1].length&&r.push(function iKt(e,i){return new ue(3005,!1)}())}return o+s}}const SA="*";const EA=new Set(["true","1"]),AA=new Set(["false","0"]);function Pit(e,i){const t=EA.has(e)||AA.has(e),n=EA.has(i)||AA.has(i);return(r,s)=>{let o=e==SA||e==r,l=i==SA||i==s;return!o&&t&&"boolean"==typeof r&&(o=r?EA.has(e):AA.has(e)),!l&&n&&"boolean"==typeof s&&(l=s?EA.has(i):AA.has(i)),o&&l}}const $Kt=new RegExp("s*:selfs*,?","g");function g4(e,i,t,n){return new QKt(e).build(i,t,n)}class QKt{constructor(i){this._driver=i}build(i,t,n){const r=new JKt(t);return this._resetContextStyleTimingState(r),kl(this,Q1(i),r)}_resetContextStyleTimingState(i){i.currentQuerySelector="",i.collectedStyles=new Map,i.collectedStyles.set("",new Map),i.currentTime=0}visitTrigger(i,t){let n=t.queryCount=0,r=t.depCount=0;const s=[],o=[];return"@"==i.name.charAt(0)&&t.errors.push(function nKt(){return new ue(3006,!1)}()),i.definitions.forEach(l=>{if(this._resetContextStyleTimingState(t),l.type==Zi.State){const w=l,C=w.name;C.toString().split(/\s*,\s*/).forEach(M=>{w.name=M,s.push(this.visitState(w,t))}),w.name=C}else if(l.type==Zi.Transition){const w=this.visitTransition(l,t);n+=w.queryCount,r+=w.depCount,o.push(w)}else t.errors.push(function rKt(){return new ue(3007,!1)}())}),{type:Zi.Trigger,name:i.name,states:s,transitions:o,queryCount:n,depCount:r,options:null}}visitState(i,t){const n=this.visitStyle(i.styles,t),r=i.options&&i.options.params||null;if(n.containsDynamicStyles){const s=new Set,o=r||{};n.styles.forEach(l=>{l instanceof Map&&l.forEach(w=>{Rit(w).forEach(C=>{o.hasOwnProperty(C)||s.add(C)})})}),s.size&&t.errors.push(function sKt(e,i){return new ue(3008,!1)}(0,s.values()))}return{type:Zi.State,name:i.name,style:n,options:r?{params:r}:null}}visitTransition(i,t){t.queryCount=0,t.depCount=0;const n=kl(this,Q1(i.animation),t),r=function XKt(e,i){const t=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(n=>function jKt(e,i,t){if(":"==e[0]){const w=function YKt(e,i){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}(e,t);if("function"==typeof w)return void i.push(w);e=w}const n=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return t.push(function mKt(e){return new ue(3015,!1)}()),i;const r=n[1],s=n[2],o=n[3];i.push(Pit(r,o)),"<"==s[0]&&(r!=SA||o!=SA)&&i.push(Pit(o,r))}(n,t,i)):t.push(e),t}(i.expr,t.errors);return{type:Zi.Transition,matchers:r,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:gp(i.options)}}visitSequence(i,t){return{type:Zi.Sequence,steps:i.steps.map(n=>kl(this,n,t)),options:gp(i.options)}}visitGroup(i,t){const n=t.currentTime;let r=0;const s=i.steps.map(o=>{t.currentTime=n;const l=kl(this,o,t);return r=Math.max(r,t.currentTime),l});return t.currentTime=r,{type:Zi.Group,steps:s,options:gp(i.options)}}visitAnimate(i,t){const n=function tZt(e,i){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return v4(CA(e,i).duration,0,"");const t=e;if(t.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=v4(0,0,"");return s.dynamic=!0,s.strValue=t,s}const r=CA(t,i);return v4(r.duration,r.delay,r.easing)}(i.timings,t.errors);t.currentAnimateTimings=n;let r,s=i.styles?i.styles:si({});if(s.type==Zi.Keyframes)r=this.visitKeyframes(s,t);else{let o=i.styles,l=!1;if(!o){l=!0;const C={};n.easing&&(C.easing=n.easing),o=si(C)}t.currentTime+=n.duration+n.delay;const w=this.visitStyle(o,t);w.isEmptyStep=l,r=w}return t.currentAnimateTimings=null,{type:Zi.Animate,timings:n,style:r,options:null}}visitStyle(i,t){const n=this._makeStyleAst(i,t);return this._validateStyleAst(n,t),n}_makeStyleAst(i,t){const n=[],r=Array.isArray(i.styles)?i.styles:[i.styles];for(let l of r)"string"==typeof l?l===ru?n.push(l):t.errors.push(new ue(3002,!1)):n.push(new Map(Object.entries(l)));let s=!1,o=null;return n.forEach(l=>{if(l instanceof Map&&(l.has("easing")&&(o=l.get("easing"),l.delete("easing")),!s))for(let w of l.values())if(w.toString().indexOf("{{")>=0){s=!0;break}}),{type:Zi.Style,styles:n,easing:o,offset:i.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(i,t){const n=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;n&&s>0&&(s-=n.duration+n.delay),i.styles.forEach(o=>{"string"!=typeof o&&o.forEach((l,w)=>{const C=t.collectedStyles.get(t.currentQuerySelector),M=C.get(w);let P=!0;M&&(s!=r&&s>=M.startTime&&r<=M.endTime&&(t.errors.push(function oKt(e,i,t,n,r){return new ue(3010,!1)}()),P=!1),s=M.startTime),P&&C.set(w,{startTime:s,endTime:r}),t.options&&function UKt(e,i,t){const n=i.params||{},r=Rit(e);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||t.push(function qQt(e){return new ue(3001,!1)}())})}(l,t.options,t.errors)})})}visitKeyframes(i,t){const n={type:Zi.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function lKt(){return new ue(3011,!1)}()),n;let s=0;const o=[];let l=!1,w=!1,C=0;const M=i.steps.map(Z=>{const rt=this._makeStyleAst(Z,t);let st=null!=rt.offset?rt.offset:function qKt(e){if("string"==typeof e)return null;let i=null;if(Array.isArray(e))e.forEach(t=>{if(t instanceof Map&&t.has("offset")){const n=t;i=parseFloat(n.get("offset")),n.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const t=e;i=parseFloat(t.get("offset")),t.delete("offset")}return i}(rt.styles),vt=0;return null!=st&&(s++,vt=rt.offset=st),w=w||vt<0||vt>1,l=l||vt0&&s{const st=O>0?rt==L?1:O*rt:o[rt],vt=st*W;t.currentTime=U+X.delay+vt,X.duration=vt,this._validateStyleAst(Z,t),Z.offset=st,n.styles.push(Z)}),n}visitReference(i,t){return{type:Zi.Reference,animation:kl(this,Q1(i.animation),t),options:gp(i.options)}}visitAnimateChild(i,t){return t.depCount++,{type:Zi.AnimateChild,options:gp(i.options)}}visitAnimateRef(i,t){return{type:Zi.AnimateRef,animation:this.visitReference(i.animation,t),options:gp(i.options)}}visitQuery(i,t){const n=t.currentQuerySelector,r=i.options||{};t.queryCount++,t.currentQuery=i;const[s,o]=function KKt(e){const i=!!e.split(/\s*,\s*/).find(t=>":self"==t);return i&&(e=e.replace($Kt,"")),e=e.replace(/@\*/g,TA).replace(/@\w+/g,t=>TA+"-"+t.slice(1)).replace(/:animating/g,u4),[e,i]}(i.selector);t.currentQuerySelector=n.length?n+" "+s:s,Rl(t.collectedStyles,t.currentQuerySelector,new Map);const l=kl(this,Q1(i.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:Zi.Query,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:l,originalSelector:i.selector,options:gp(i.options)}}visitStagger(i,t){t.currentQuery||t.errors.push(function hKt(){return new ue(3013,!1)}());const n="full"===i.timings?{duration:0,delay:0,easing:"full"}:CA(i.timings,t.errors,!0);return{type:Zi.Stagger,animation:kl(this,Q1(i.animation),t),timings:n,options:null}}}class JKt{constructor(i){this.errors=i,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function gp(e){return e?(e={...e}).params&&(e.params=function ZKt(e){return e?{...e}:null}(e.params)):e={},e}function v4(e,i,t){return{duration:e,delay:i,easing:t}}function x4(e,i,t,n,r,s,o=null,l=!1){return{type:1,element:e,keyframes:i,preStyleProps:t,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:l}}class DA{constructor(){this._map=new Map}get(i){return this._map.get(i)||[]}append(i,t){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...t)}has(i){return this._map.has(i)}clear(){this._map.clear()}}const nZt=new RegExp(":enter","g"),sZt=new RegExp(":leave","g");function y4(e,i,t,n,r,s=new Map,o=new Map,l,w,C=[]){return(new aZt).buildKeyframes(e,i,t,n,r,s,o,l,w,C)}class aZt{buildKeyframes(i,t,n,r,s,o,l,w,C,M=[]){C=C||new DA;const P=new b4(i,t,C,r,s,M,[]);P.options=w;const O=w.delay?ju(w.delay):0;P.currentTimeline.delayNextStep(O),P.currentTimeline.setStyles([o],null,P.errors,w),kl(this,n,P);const L=P.timelines.filter(U=>U.containsAnimation());if(L.length&&l.size){let U;for(let X=L.length-1;X>=0;X--){const W=L[X];if(W.element===t){U=W;break}}U&&!U.allowOnlyTimelineStyles()&&U.setStyles([l],null,P.errors,w)}return L.length?L.map(U=>U.buildKeyframes()):[x4(t,[],[],[],0,O,"",!1)]}visitTrigger(i,t){}visitState(i,t){}visitTransition(i,t){}visitAnimateChild(i,t){const n=t.subInstructions.get(t.element);if(n){const r=t.createSubContext(i.options),s=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);s!=o&&t.transformIntoNewTimeline(o)}t.previousNode=i}visitAnimateRef(i,t){const n=t.createSubContext(i.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],t,n),this.visitReference(i.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=i}_applyAnimationRefDelays(i,t,n){for(const r of i){const s=r?.delay;if(s){const o="number"==typeof s?s:ju(K1(s,r?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(i,t,n){let s=t.currentTimeline.currentTime;const o=null!=n.duration?ju(n.duration):null,l=null!=n.delay?ju(n.delay):null;return 0!==o&&i.forEach(w=>{const C=t.appendInstructionToTimeline(w,o,l);s=Math.max(s,C.duration+C.delay)}),s}visitReference(i,t){t.updateOptions(i.options,!0),kl(this,i.animation,t),t.previousNode=i}visitSequence(i,t){const n=t.subContextCount;let r=t;const s=i.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){r.previousNode.type==Zi.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=MA);const o=ju(s.delay);r.delayNextStep(o)}i.steps.length&&(i.steps.forEach(o=>kl(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=i}visitGroup(i,t){const n=[];let r=t.currentTimeline.currentTime;const s=i.options&&i.options.delay?ju(i.options.delay):0;i.steps.forEach(o=>{const l=t.createSubContext(i.options);s&&l.delayNextStep(s),kl(this,o,l),r=Math.max(r,l.currentTimeline.currentTime),n.push(l.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(r),t.previousNode=i}_visitTiming(i,t){if(i.dynamic){const n=i.strValue;return CA(t.params?K1(n,t.params,t.errors):n,t.errors)}return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,t){const n=t.currentAnimateTimings=this._visitTiming(i.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());const s=i.style;s.type==Zi.Keyframes?this.visitKeyframes(s,t):(t.incrementTime(n.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=i}visitStyle(i,t){const n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();const s=r&&r.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(s):n.setStyles(i.styles,s,t.errors,t.options),t.previousNode=i}visitKeyframes(i,t){const n=t.currentAnimateTimings,r=t.currentTimeline.duration,s=n.duration,l=t.createSubContext().currentTimeline;l.easing=n.easing,i.styles.forEach(w=>{l.forwardTime((w.offset||0)*s),l.setStyles(w.styles,w.easing,t.errors,t.options),l.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(l),t.transformIntoNewTimeline(r+s),t.previousNode=i}visitQuery(i,t){const n=t.currentTimeline.currentTime,r=i.options||{},s=r.delay?ju(r.delay):0;s&&(t.previousNode.type===Zi.Style||0==n&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=MA);let o=n;const l=t.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=l.length;let w=null;l.forEach((C,M)=>{t.currentQueryIndex=M;const P=t.createSubContext(i.options,C);s&&P.delayNextStep(s),C===t.element&&(w=P.currentTimeline),kl(this,i.animation,P),P.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,P.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),w&&(t.currentTimeline.mergeTimelineCollectedStyles(w),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=i}visitStagger(i,t){const n=t.parentContext,r=t.currentTimeline,s=i.timings,o=Math.abs(s.duration),l=o*(t.currentQueryTotal-1);let w=o*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":w=l-w;break;case"full":w=n.currentStaggerTime}const M=t.currentTimeline;w&&M.delayNextStep(w);const P=M.currentTime;kl(this,i.animation,t),t.previousNode=i,n.currentStaggerTime=r.currentTime-P+(r.startTime-n.currentTimeline.startTime)}}const MA={};class b4{constructor(i,t,n,r,s,o,l,w){this._driver=i,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=l,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=MA,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=w||new IA(this._driver,t,0),l.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,t){if(!i)return;const n=i;let r=this.options;null!=n.duration&&(r.duration=ju(n.duration)),null!=n.delay&&(r.delay=ju(n.delay));const s=n.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(l=>{(!t||!o.hasOwnProperty(l))&&(o[l]=K1(s[l],o,this.errors))})}}_copyOptions(){const i={};if(this.options){const t=this.options.params;if(t){const n=i.params={};Object.keys(t).forEach(r=>{n[r]=t[r]})}}return i}createSubContext(i=null,t,n){const r=t||this.element,s=new b4(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(i),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(i){return this.previousNode=MA,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,t,n){const r={duration:t??i.duration,delay:this.currentTimeline.currentTime+(n??0)+i.delay,easing:""},s=new oZt(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,r,i.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,t,n,r,s,o){let l=[];if(r&&l.push(this.element),i.length>0){i=(i=i.replace(nZt,"."+this._enterClassName)).replace(sZt,"."+this._leaveClassName);let C=this._driver.query(this.element,i,1!=n);0!==n&&(C=n<0?C.slice(C.length+n,C.length):C.slice(0,n)),l.push(...C)}return!s&&0==l.length&&o.push(function fKt(e){return new ue(3014,!1)}()),l}}class IA{constructor(i,t,n,r){this._driver=i,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+i),t&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,t){return this.applyStylesToKeyframe(),new IA(this._driver,i,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,t){this._localTimelineStyles.set(i,t),this._globalTimelineStyles.set(i,t),this._styleSummary.set(i,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||ru),this._currentKeyframe.set(t,ru);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,t,n,r){t&&this._previousKeyframe.set("easing",t);const s=r&&r.params||{},o=function lZt(e,i){const t=new Map;let n;return e.forEach(r=>{if("*"===r){n??=i.keys();for(let s of n)t.set(s,ru)}else for(let[s,o]of r)t.set(s,o)}),t}(i,this._globalTimelineStyles);for(let[l,w]of o){const C=K1(w,s,n);this._pendingStyles.set(l,C),this._localTimelineStyles.has(l)||this._backFill.set(l,this._globalTimelineStyles.get(l)??ru),this._updateStyle(l,C)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((i,t)=>{this._currentKeyframe.set(t,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,i)}))}snapshotCurrentStyles(){for(let[i,t]of this._localTimelineStyles)this._pendingStyles.set(i,t),this._updateStyle(i,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const i=[];for(let t in this._currentKeyframe)i.push(t);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((t,n)=>{const r=this._styleSummary.get(n);(!r||t.time>r.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const i=new Set,t=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((l,w)=>{const C=new Map([...this._backFill,...l]);C.forEach((M,P)=>{"!"===M?i.add(P):M===ru&&t.add(P)}),n||C.set("offset",w/this.duration),r.push(C)});const s=[...i.values()],o=[...t.values()];if(n){const l=r[0],w=new Map(l);l.set("offset",0),w.set("offset",1),r=[l,w]}return x4(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class oZt extends IA{constructor(i,t,n,r,s,o,l=!1){super(i,t,o.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=l,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],o=n+t,l=t/o,w=new Map(i[0]);w.set("offset",0),s.push(w);const C=new Map(i[0]);C.set("offset",Lit(l)),s.push(C);const M=i.length-1;for(let P=1;P<=M;P++){let O=new Map(i[P]);const L=O.get("offset");O.set("offset",Lit((t+L*n)/o)),s.push(O)}n=o,t=0,r="",i=s}return x4(this.element,i,this.preStyleProps,this.postStyleProps,n,t,r,!0)}}function Lit(e,i=3){const t=Math.pow(10,i-1);return Math.round(e*t)/t}function Nit(e,i,t,n,r,s,o,l,w,C,M,P,O){return{type:0,element:e,triggerName:i,isRemovalTransition:r,fromState:t,fromStyles:s,toState:n,toStyles:o,timelines:l,queriedElements:w,preStyleProps:C,postStyleProps:M,totalTime:P,errors:O}}const w4={};class Bit{constructor(i,t,n){this._triggerName=i,this.ast=t,this._stateStyles=n}match(i,t,n,r){return function cZt(e,i,t,n,r){return e.some(s=>s(i,t,n,r))}(this.ast.matchers,i,t,n,r)}buildStyles(i,t,n){let r=this._stateStyles.get("*");return void 0!==i&&(r=this._stateStyles.get(i?.toString())||r),r?r.buildStyles(t,n):new Map}build(i,t,n,r,s,o,l,w,C,M){const P=[],O=this.ast.options&&this.ast.options.params||w4,U=this.buildStyles(n,l&&l.params||w4,P),X=w&&w.params||w4,W=this.buildStyles(r,X,P),Z=new Set,rt=new Map,st=new Map,vt="void"===r,_t={params:Vit(X,O),delay:this.ast.options?.delay},Mt=M?[]:y4(i,t,this.ast.animation,s,o,U,W,_t,C,P);let ft=0;return Mt.forEach(dt=>{ft=Math.max(dt.duration+dt.delay,ft)}),P.length?Nit(t,this._triggerName,n,r,vt,U,W,[],[],rt,st,ft,P):(Mt.forEach(dt=>{const pt=dt.element,bt=Rl(rt,pt,new Set);dt.preStyleProps.forEach(Et=>bt.add(Et));const Tt=Rl(st,pt,new Set);dt.postStyleProps.forEach(Et=>Tt.add(Et)),pt!==t&&Z.add(pt)}),Nit(t,this._triggerName,n,r,vt,U,W,Mt,[...Z.values()],rt,st,ft))}}function Vit(e,i){const t={...i};return Object.entries(e).forEach(([n,r])=>{null!=r&&(t[n]=r)}),t}class dZt{constructor(i,t,n){this.styles=i,this.defaultParams=t,this.normalizer=n}buildStyles(i,t){const n=new Map,r=Vit(i,this.defaultParams);return this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,l)=>{o&&(o=K1(o,r,t));const w=this.normalizer.normalizePropertyName(l,t);o=this.normalizer.normalizeStyleValue(l,w,o,t),n.set(l,o)})}),n}}class hZt{constructor(i,t,n){this.name=i,this.ast=t,this._normalizer=n,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new dZt(r.style,r.options&&r.options.params||{},n))}),Uit(this.states,"true","1"),Uit(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new Bit(i,r,this.states))}),this.fallbackTransition=function fZt(e,i,t){return new Bit(e,{type:Zi.Transition,animation:{type:Zi.Sequence,steps:[],options:null},matchers:[(o,l)=>!0],options:null,queryCount:0,depCount:0},i)}(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,t,n,r){return this.transitionFactories.find(o=>o.match(i,t,n,r))||null}matchStyles(i,t,n){return this.fallbackTransition.buildStyles(i,t,n)}}function Uit(e,i,t){e.has(i)?e.has(t)||e.set(t,e.get(i)):e.has(t)&&e.set(i,e.get(t))}const mZt=new DA;class pZt{constructor(i,t,n){this.bodyNode=i,this._driver=t,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(i,t){const n=[],s=g4(this._driver,t,n,[]);if(n.length)throw function bKt(e){return new ue(3503,!1)}();this._animations.set(i,s)}_buildPlayer(i,t,n){const r=i.element,s=Tit(this._normalizer,i.keyframes,t,n);return this._driver.animate(r,s,i.duration,i.delay,i.easing,[],!0)}create(i,t,n={}){const r=[],s=this._animations.get(i);let o;const l=new Map;if(s?(o=y4(this._driver,t,s,d4,wA,new Map,new Map,n,mZt,r),o.forEach(M=>{const P=Rl(l,M.element,new Map);M.postStyleProps.forEach(O=>P.set(O,null))})):(r.push(function wKt(){return new ue(3300,!1)}()),o=[]),r.length)throw function _Kt(e){return new ue(3504,!1)}();l.forEach((M,P)=>{M.forEach((O,L)=>{M.set(L,this._driver.computeStyle(P,L,ru))})});const C=yf(o.map(M=>{const P=l.get(M.element);return this._buildPlayer(M,new Map,P)}));return this._playersById.set(i,C),C.onDestroy(()=>this.destroy(i)),this.players.push(C),C}destroy(i){const t=this._getPlayer(i);t.destroy(),this._playersById.delete(i);const n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(i){const t=this._playersById.get(i);if(!t)throw function TKt(e){return new ue(3301,!1)}();return t}listen(i,t,n,r){const s=s4(t,"","","");return n4(this._getPlayer(i),n,s,r),()=>{}}command(i,t,n,r){if("register"==n)return void this.register(i,r[0]);if("create"==n)return void this.create(i,t,r[0]||{});const s=this._getPlayer(i);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(i)}}}const zit="ng-animate-queued",_4="ng-animate-disabled",bZt=[],Git={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},wZt={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Fc="__ng_removed";class T4{get params(){return this.options.params}constructor(i,t=""){this.namespaceId=t;const n=i&&i.hasOwnProperty("value");if(this.value=function SZt(e){return e??null}(n?i.value:i),n){const{value:s,...o}=i;this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){const t=i.params;if(t){const n=this.options.params;Object.keys(t).forEach(r=>{null==n[r]&&(n[r]=t[r])})}}}const Z1="void",C4=new T4(Z1);class _Zt{constructor(i,t,n){this.id=i,this.hostElement=t,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+i,sc(t,this._hostClassName)}listen(i,t,n,r){if(!this._triggers.has(t))throw function CKt(e,i){return new ue(3302,!1)}();if(null==n||0==n.length)throw function SKt(e){return new ue(3303,!1)}();if(!function EZt(e){return"start"==e||"done"==e}(n))throw function EKt(e,i){return new ue(3400,!1)}();const s=Rl(this._elementListeners,i,[]),o={name:t,phase:n,callback:r};s.push(o);const l=Rl(this._engine.statesByElement,i,new Map);return l.has(t)||(sc(i,_A),sc(i,_A+"-"+t),l.set(t,C4)),()=>{this._engine.afterFlush(()=>{const w=s.indexOf(o);w>=0&&s.splice(w,1),this._triggers.has(t)||l.delete(t)})}}register(i,t){return!this._triggers.has(i)&&(this._triggers.set(i,t),!0)}_getTrigger(i){const t=this._triggers.get(i);if(!t)throw function AKt(e){return new ue(3401,!1)}();return t}trigger(i,t,n,r=!0){const s=this._getTrigger(t),o=new S4(this.id,t,i);let l=this._engine.statesByElement.get(i);l||(sc(i,_A),sc(i,_A+"-"+t),this._engine.statesByElement.set(i,l=new Map));let w=l.get(t);const C=new T4(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&w&&C.absorbOptions(w.options),l.set(t,C),w||(w=C4),C.value!==Z1&&w.value===C.value){if(!function MZt(e,i){const t=Object.keys(e),n=Object.keys(i);if(t.length!=n.length)return!1;for(let r=0;r{pp(i,W),Id(i,Z)})}return}const O=Rl(this._engine.playersByElement,i,[]);O.forEach(X=>{X.namespaceId==this.id&&X.triggerName==t&&X.queued&&X.destroy()});let L=s.matchTransition(w.value,C.value,i,C.params),U=!1;if(!L){if(!r)return;L=s.fallbackTransition,U=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:t,transition:L,fromState:w,toState:C,player:o,isFallbackTransition:U}),U||(sc(i,zit),o.onStart(()=>{S0(i,zit)})),o.onDone(()=>{let X=this.players.indexOf(o);X>=0&&this.players.splice(X,1);const W=this._engine.playersByElement.get(i);if(W){let Z=W.indexOf(o);Z>=0&&W.splice(Z,1)}}),this.players.push(o),O.push(o),o}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(t=>t.delete(i)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(r=>r.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);const t=this._engine.playersByElement.get(i);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,t){const n=this._engine.driver.query(i,TA,!0);n.forEach(r=>{if(r[Fc])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(i,t,n,r){const s=this._engine.statesByElement.get(i),o=new Map;if(s){const l=[];if(s.forEach((w,C)=>{if(o.set(C,w.value),this._triggers.has(C)){const M=this.trigger(i,C,Z1,r);M&&l.push(M)}}),l.length)return this._engine.markElementAsRemoved(this.id,i,!0,t,o),n&&yf(l).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){const t=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(t&&n){const r=new Set;t.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const w=this._triggers.get(o).fallbackTransition,C=n.get(o)||C4,M=new T4(Z1),P=new S4(this.id,o,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:o,transition:w,fromState:C,toState:M,player:P,isFallbackTransition:!0})})}}removeNode(i,t){const n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,t),this.triggerLeaveAnimation(i,t,!0))return;let r=!1;if(n.totalAnimations){const s=n.players.length?n.playersByQueriedElement.get(i):[];if(s&&s.length)r=!0;else{let o=i;for(;o=o.parentNode;)if(n.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(i),r)n.markElementAsRemoved(this.id,i,!1,t);else{const s=i[Fc];(!s||s===Git)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,t))}}insertNode(i,t){sc(i,this._hostClassName)}drainQueuedTransitions(i){const t=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const s=n.element,o=this._elementListeners.get(s);o&&o.forEach(l=>{if(l.name==n.triggerName){const w=s4(s,n.triggerName,n.fromState.value,n.toState.value);w._data=i,n4(n.player,l.phase,w,l.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((n,r)=>{const s=n.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(i){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}}class TZt{_onRemovalComplete(i,t){this.onRemovalComplete(i,t)}constructor(i,t,n,r){this.bodyNode=i,this.driver=t,this._normalizer=n,this.scheduler=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,o)=>{}}get queuedPlayers(){const i=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,t){const n=new _Zt(i,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,t){const n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,l=this.driver.getParentElement(t);for(;l;){const w=r.get(l);if(w){const C=n.indexOf(w);n.splice(C+1,0,i),o=!0;break}l=this.driver.getParentElement(l)}o||n.unshift(i)}else n.push(i);return r.set(t,i),i}register(i,t){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,t)),n}registerTrigger(i,t,n){let r=this._namespaceLookup[i];r&&r.register(t,n)&&this.totalAnimations++}destroy(i,t){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const n=this._fetchNamespace(i);this.namespacesByHostElement.delete(n.hostElement);const r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(t),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){const t=new Set,n=this.statesByElement.get(i);if(n)for(let r of n.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&t.add(s)}return t}trigger(i,t,n,r){if(RA(t)){const s=this._fetchNamespace(i);if(s)return s.trigger(t,n,r),!0}return!1}insertNode(i,t,n,r){if(!RA(t))return;const s=t[Fc];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(i){const o=this._fetchNamespace(i);o&&o.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,t){t?this.disabledNodes.has(i)||(this.disabledNodes.add(i),sc(i,_4)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),S0(i,_4))}removeNode(i,t,n){if(RA(t)){this.scheduler?.notify();const r=i?this._fetchNamespace(i):null;r?r.removeNode(t,n):this.markElementAsRemoved(i,t,!1,n);const s=this.namespacesByHostElement.get(t);s&&s.id!==i&&s.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(i,t,n,r,s){this.collectedLeaveElements.push(t),t[Fc]={namespaceId:i,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(i,t,n,r,s){return RA(t)?this._fetchNamespace(i).listen(t,n,r,s):()=>{}}_buildInstruction(i,t,n,r,s){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,r,i.fromState.options,i.toState.options,t,s)}destroyInnerAnimations(i){let t=this.driver.query(i,TA,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(i,u4,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){const t=this.playersByElement.get(i);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){const t=this.playersByQueriedElement.get(i);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return yf(this.players).onDone(()=>i());i()})}processLeaveNode(i){const t=i[Fc];if(t&&t.setForRemoval){if(i[Fc]=Git,t.namespaceId){this.destroyInnerAnimations(i);const n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(i)}this._onRemovalComplete(i,t.setForRemoval)}i.classList?.contains(_4)&&this.markElementAsDisabled(i,!1),this.driver.query(i,".ng-animate-disabled",!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(i=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){const n=this._whenQuietFns;this._whenQuietFns=[],t.length?yf(t).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(i){throw function DKt(e){return new ue(3402,!1)}()}_flushAnimations(i,t){const n=new DA,r=[],s=new Map,o=[],l=new Map,w=new Map,C=new Map,M=new Set;this.disabledNodes.forEach(fe=>{M.add(fe);const Qt=this.driver.query(fe,".ng-animate-queued",!0);for(let _e=0;_e{const _e=d4+X++;U.set(Qt,_e),fe.forEach(Ne=>sc(Ne,_e))});const W=[],Z=new Set,rt=new Set;for(let fe=0;feZ.add(Ne)):rt.add(Qt))}const st=new Map,vt=Xit(O,Array.from(Z));vt.forEach((fe,Qt)=>{const _e=wA+X++;st.set(Qt,_e),fe.forEach(Ne=>sc(Ne,_e))}),i.push(()=>{L.forEach((fe,Qt)=>{const _e=U.get(Qt);fe.forEach(Ne=>S0(Ne,_e))}),vt.forEach((fe,Qt)=>{const _e=st.get(Qt);fe.forEach(Ne=>S0(Ne,_e))}),W.forEach(fe=>{this.processLeaveNode(fe)})});const _t=[],Mt=[];for(let fe=this._namespaceList.length-1;fe>=0;fe--)this._namespaceList[fe].drainQueuedTransitions(t).forEach(_e=>{const Ne=_e.player,Se=_e.element;if(_t.push(Ne),this.collectedEnterElements.length){const ii=Se[Fc];if(ii&&ii.setForMove){if(ii.previousTriggersValues&&ii.previousTriggersValues.has(_e.triggerName)){const Ft=ii.previousTriggersValues.get(_e.triggerName),jt=this.statesByElement.get(_e.element);if(jt&&jt.has(_e.triggerName)){const Xt=jt.get(_e.triggerName);Xt.value=Ft,jt.set(_e.triggerName,Xt)}}return void Ne.destroy()}}const Ei=!P||!this.driver.containsElement(P,Se),Kt=st.get(Se),ke=U.get(Se),Ce=this._buildInstruction(_e,n,ke,Kt,Ei);if(Ce.errors&&Ce.errors.length)return void Mt.push(Ce);if(Ei)return Ne.onStart(()=>pp(Se,Ce.fromStyles)),Ne.onDestroy(()=>Id(Se,Ce.toStyles)),void r.push(Ne);if(_e.isFallbackTransition)return Ne.onStart(()=>pp(Se,Ce.fromStyles)),Ne.onDestroy(()=>Id(Se,Ce.toStyles)),void r.push(Ne);const oi=[];Ce.timelines.forEach(ii=>{ii.stretchStartingKeyframe=!0,this.disabledNodes.has(ii.element)||oi.push(ii)}),Ce.timelines=oi,n.append(Se,Ce.timelines),o.push({instruction:Ce,player:Ne,element:Se}),Ce.queriedElements.forEach(ii=>Rl(l,ii,[]).push(Ne)),Ce.preStyleProps.forEach((ii,Ft)=>{if(ii.size){let jt=w.get(Ft);jt||w.set(Ft,jt=new Set),ii.forEach((Xt,Ht)=>jt.add(Ht))}}),Ce.postStyleProps.forEach((ii,Ft)=>{let jt=C.get(Ft);jt||C.set(Ft,jt=new Set),ii.forEach((Xt,Ht)=>jt.add(Ht))})});if(Mt.length){const fe=[];Mt.forEach(Qt=>{fe.push(function MKt(e,i){return new ue(3505,!1)}())}),_t.forEach(Qt=>Qt.destroy()),this.reportError(fe)}const ft=new Map,dt=new Map;o.forEach(fe=>{const Qt=fe.element;n.has(Qt)&&(dt.set(Qt,Qt),this._beforeAnimationBuild(fe.player.namespaceId,fe.instruction,ft))}),r.forEach(fe=>{const Qt=fe.element;this._getPreviousPlayers(Qt,!1,fe.namespaceId,fe.triggerName,null).forEach(Ne=>{Rl(ft,Qt,[]).push(Ne),Ne.destroy()})});const pt=W.filter(fe=>Yit(fe,w,C)),bt=new Map;Wit(bt,this.driver,rt,C,ru).forEach(fe=>{Yit(fe,w,C)&&pt.push(fe)});const Et=new Map;L.forEach((fe,Qt)=>{Wit(Et,this.driver,new Set(fe),w,"!")}),pt.forEach(fe=>{const Qt=bt.get(fe),_e=Et.get(fe);bt.set(fe,new Map([...Qt?.entries()??[],..._e?.entries()??[]]))});const Dt=[],Le=[],ge={};o.forEach(fe=>{const{element:Qt,player:_e,instruction:Ne}=fe;if(n.has(Qt)){if(M.has(Qt))return _e.onDestroy(()=>Id(Qt,Ne.toStyles)),_e.disabled=!0,_e.overrideTotalTime(Ne.totalTime),void r.push(_e);let Se=ge;if(dt.size>1){let Kt=Qt;const ke=[];for(;Kt=Kt.parentNode;){const Ce=dt.get(Kt);if(Ce){Se=Ce;break}ke.push(Kt)}ke.forEach(Ce=>dt.set(Ce,Se))}const Ei=this._buildAnimation(_e.namespaceId,Ne,ft,s,Et,bt);if(_e.setRealPlayer(Ei),Se===ge)Dt.push(_e);else{const Kt=this.playersByElement.get(Se);Kt&&Kt.length&&(_e.parentPlayer=yf(Kt)),r.push(_e)}}else pp(Qt,Ne.fromStyles),_e.onDestroy(()=>Id(Qt,Ne.toStyles)),Le.push(_e),M.has(Qt)&&r.push(_e)}),Le.forEach(fe=>{const Qt=s.get(fe.element);if(Qt&&Qt.length){const _e=yf(Qt);fe.setRealPlayer(_e)}}),r.forEach(fe=>{fe.parentPlayer?fe.syncPlayerEvents(fe.parentPlayer):fe.destroy()});for(let fe=0;fe!Ei.destroyed);Se.length?AZt(this,Qt,Se):this.processLeaveNode(Qt)}return W.length=0,Dt.forEach(fe=>{this.players.push(fe),fe.onDone(()=>{fe.destroy();const Qt=this.players.indexOf(fe);this.players.splice(Qt,1)}),fe.play()}),Dt}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,t,n,r,s){let o=[];if(t){const l=this.playersByQueriedElement.get(i);l&&(o=l)}else{const l=this.playersByElement.get(i);if(l){const w=!s||s==Z1;l.forEach(C=>{C.queued||!w&&C.triggerName!=r||o.push(C)})}}return(n||r)&&(o=o.filter(l=>!(n&&n!=l.namespaceId||r&&r!=l.triggerName))),o}_beforeAnimationBuild(i,t,n){const s=t.element,o=t.isRemovalTransition?void 0:i,l=t.isRemovalTransition?void 0:t.triggerName;for(const w of t.timelines){const C=w.element,M=C!==s,P=Rl(n,C,[]);this._getPreviousPlayers(C,M,o,l,t.toState).forEach(L=>{const U=L.getRealPlayer();U.beforeDestroy&&U.beforeDestroy(),L.destroy(),P.push(L)})}pp(s,t.fromStyles)}_buildAnimation(i,t,n,r,s,o){const l=t.triggerName,w=t.element,C=[],M=new Set,P=new Set,O=t.timelines.map(U=>{const X=U.element;M.add(X);const W=X[Fc];if(W&&W.removedBeforeQueried)return new Dy(U.duration,U.delay);const Z=X!==w,rt=function DZt(e){const i=[];return jit(e,i),i}((n.get(X)||bZt).map(ft=>ft.getRealPlayer())).filter(ft=>!!ft.element&&ft.element===X),st=s.get(X),vt=o.get(X),_t=Tit(this._normalizer,U.keyframes,st,vt),Mt=this._buildPlayer(U,_t,rt);if(U.subTimeline&&r&&P.add(X),Z){const ft=new S4(i,l,X);ft.setRealPlayer(Mt),C.push(ft)}return Mt});C.forEach(U=>{Rl(this.playersByQueriedElement,U.element,[]).push(U),U.onDone(()=>function CZt(e,i,t){let n=e.get(i);if(n){if(n.length){const r=n.indexOf(t);n.splice(r,1)}0==n.length&&e.delete(i)}return n}(this.playersByQueriedElement,U.element,U))}),M.forEach(U=>sc(U,Mit));const L=yf(O);return L.onDestroy(()=>{M.forEach(U=>S0(U,Mit)),Id(w,t.toStyles)}),P.forEach(U=>{Rl(r,U,[]).push(L)}),L}_buildPlayer(i,t,n){return t.length>0?this.driver.animate(i.element,t,i.duration,i.delay,i.easing,n):new Dy(i.duration,i.delay)}}class S4{constructor(i,t,n){this.namespaceId=i,this.triggerName=t,this.element=n,this._player=new Dy,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((t,n)=>{t.forEach(r=>n4(i,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){const t=this._player;t.triggerCallback&&i.onStart(()=>t.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,t){Rl(this._queuedCallbacks,i,[]).push(t)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){const t=this._player;t.triggerCallback&&t.triggerCallback(i)}}function RA(e){return e&&1===e.nodeType}function Hit(e,i){const t=e.style.display;return e.style.display=i??"none",t}function Wit(e,i,t,n,r){const s=[];t.forEach(w=>s.push(Hit(w)));const o=[];n.forEach((w,C)=>{const M=new Map;w.forEach(P=>{const O=i.computeStyle(C,P,r);M.set(P,O),(!O||0==O.length)&&(C[Fc]=wZt,o.push(C))}),e.set(C,M)});let l=0;return t.forEach(w=>Hit(w,s[l++])),o}function Xit(e,i){const t=new Map;if(e.forEach(l=>t.set(l,[])),0==i.length)return t;const r=new Set(i),s=new Map;function o(l){if(!l)return 1;let w=s.get(l);if(w)return w;const C=l.parentNode;return w=t.has(C)?C:r.has(C)?1:o(C),s.set(l,w),w}return i.forEach(l=>{const w=o(l);1!==w&&t.get(w).push(l)}),t}function sc(e,i){e.classList?.add(i)}function S0(e,i){e.classList?.remove(i)}function AZt(e,i,t){yf(t).onDone(()=>e.processLeaveNode(i))}function jit(e,i){for(let t=0;tr.add(s)):i.set(e,n),t.delete(e),!0}class J1{constructor(i,t,n,r){this._driver=t,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(s,o)=>{},this._transitionEngine=new TZt(i.body,t,n,r),this._timelineEngine=new pZt(i.body,t,n),this._transitionEngine.onRemovalComplete=(s,o)=>this.onRemovalComplete(s,o)}registerTrigger(i,t,n,r,s){const o=i+"-"+r;let l=this._triggerCache[o];if(!l){const w=[],M=g4(this._driver,s,w,[]);if(w.length)throw function xKt(e,i){return new ue(3404,!1)}();l=function uZt(e,i,t){return new hZt(e,i,t)}(r,M,this._normalizer),this._triggerCache[o]=l}this._transitionEngine.registerTrigger(t,r,l)}register(i,t){this._transitionEngine.register(i,t)}destroy(i,t){this._transitionEngine.destroy(i,t)}onInsert(i,t,n,r){this._transitionEngine.insertNode(i,t,n,r)}onRemove(i,t,n){this._transitionEngine.removeNode(i,t,n)}disableAnimations(i,t){this._transitionEngine.markElementAsDisabled(i,t)}process(i,t,n,r){if("@"==n.charAt(0)){const[s,o]=Cit(n);this._timelineEngine.command(s,t,o,r)}else this._transitionEngine.trigger(i,t,n,r)}listen(i,t,n,r,s){if("@"==n.charAt(0)){const[o,l]=Cit(n);return this._timelineEngine.listen(o,t,l,s)}return this._transitionEngine.listen(i,t,n,r,s)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}}class q1{static#t=this.initialStylesByElement=new WeakMap;constructor(i,t,n){this._element=i,this._startStyles=t,this._endStyles=n,this._state=0;let r=q1.initialStylesByElement.get(i);r||q1.initialStylesByElement.set(i,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Id(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Id(this._element,this._initialStyles),this._endStyles&&(Id(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(q1.initialStylesByElement.delete(this._element),this._startStyles&&(pp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(pp(this._element,this._endStyles),this._endStyles=null),Id(this._element,this._initialStyles),this._state=3)}}function E4(e){let i=null;return e.forEach((t,n)=>{(function RZt(e){return"display"===e||"position"===e})(n)&&(i=i||new Map,i.set(n,t))}),i}class $it{constructor(i,t,n,r){this.element=i,this.keyframes=t,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.length-1]:new Map;const t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(i){const t=[];return i.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(i,t,n){return i.animate(this._convertKeyframesToObject(t),n)}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{"offset"!==r&&i.set(r,this._finished?n:p4(this.element,r))}),this.currentSnapshot=i}triggerCallback(i){const t="start"===i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class Qit{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}matchesElement(i,t){return!1}containsElement(i,t){return Eit(i,t)}getParentElement(i){return a4(i)}query(i,t,n){return Ait(i,t,n)}computeStyle(i,t,n){return p4(i,t)}animate(i,t,n,r,s,o=[]){const w={duration:n,delay:r,fill:0==r?"both":"forwards"};s&&(w.easing=s);const C=new Map,M=o.filter(L=>L instanceof $it);(function GKt(e,i){return 0===e||0===i})(n,r)&&M.forEach(L=>{L.currentSnapshot.forEach((U,X)=>C.set(X,U))});let P=function VKt(e){return e.length?e[0]instanceof Map?e:e.map(i=>new Map(Object.entries(i))):[]}(t).map(L=>new Map(L));P=function HKt(e,i,t){if(t.size&&i.length){let n=i[0],r=[];if(t.forEach((s,o)=>{n.has(o)||r.push(o),n.set(o,s)}),r.length)for(let s=1;so.set(l,p4(e,l)))}}return i}(i,P,C);const O=function IZt(e,i){let t=null,n=null;return Array.isArray(i)&&i.length?(t=E4(i[0]),i.length>1&&(n=E4(i[i.length-1]))):i instanceof Map&&(t=E4(i)),t||n?new q1(e,t,n):null}(i,P);return new $it(i,P,w,O)}}const Kit="@.disabled";class Zit{constructor(i,t,n,r){this.namespaceId=i,this.delegate=t,this.engine=n,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,t){return this.delegate.createElement(i,t)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,t){this.delegate.appendChild(i,t),this.engine.onInsert(this.namespaceId,t,i,!1)}insertBefore(i,t,n,r=!0){this.delegate.insertBefore(i,t,n),this.engine.onInsert(this.namespaceId,t,i,r)}removeChild(i,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(i,t){return this.delegate.selectRootElement(i,t)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,t,n,r){this.delegate.setAttribute(i,t,n,r)}removeAttribute(i,t,n){this.delegate.removeAttribute(i,t,n)}addClass(i,t){this.delegate.addClass(i,t)}removeClass(i,t){this.delegate.removeClass(i,t)}setStyle(i,t,n,r){this.delegate.setStyle(i,t,n,r)}removeStyle(i,t,n){this.delegate.removeStyle(i,t,n)}setProperty(i,t,n){"@"==t.charAt(0)&&t==Kit?this.disableAnimations(i,!!n):this.delegate.setProperty(i,t,n)}setValue(i,t){this.delegate.setValue(i,t)}listen(i,t,n){return this.delegate.listen(i,t,n)}disableAnimations(i,t){this.engine.disableAnimations(i,t)}}class kZt extends Zit{constructor(i,t,n,r,s){super(t,n,r,s),this.factory=i,this.namespaceId=t}setProperty(i,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&t==Kit?this.disableAnimations(i,n=void 0===n||!!n):this.engine.process(this.namespaceId,i,t.slice(1),n):this.delegate.setProperty(i,t,n)}listen(i,t,n){if("@"==t.charAt(0)){const r=function PZt(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(i);let s=t.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function FZt(e){const i=e.indexOf(".");return[e.substring(0,i),e.slice(i+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,l=>{this.factory.scheduleListenerCallback(l._data||-1,n,l)})}return this.delegate.listen(i,t,n)}}class OZt{constructor(i,t,n){this.delegate=i,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,s)=>{const o=s?.parentNode(r);o&&s.removeChild(o,r)}}createRenderer(i,t){const r=this.delegate.createRenderer(i,t);if(!i||!t?.data?.animation){const C=this._rendererCache;let M=C.get(r);return M||(M=new Zit("",r,this.engine,()=>C.delete(r)),C.set(r,M)),M}const s=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,i);const l=C=>{Array.isArray(C)?C.forEach(l):this.engine.registerTrigger(s,o,i,C.name,C)};return t.data.animation.forEach(l),new kZt(this,o,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,t,n){if(i>=0&&it(n));const r=this._animationCallbacksBuffer;0==r.length&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(s=>{const[o,l]=s;o(l)}),this._animationCallbacksBuffer=[]})}),r.push([t,n])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}const Jit=[{provide:c4,useFactory:function NZt(){return new kit}},{provide:J1,useClass:(()=>{class e extends J1{constructor(t,n,r){super(t,n,r,me(g_,{optional:!0}))}ngOnDestroy(){this.flush()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(l4),Jt(c4))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})()},{provide:Q2,useFactory:function BZt(e,i,t){return new OZt(e,i,t)},deps:[RI,J1,ei]}],A4=[{provide:l4,useFactory:()=>new Qit},{provide:Nr,useValue:"BrowserAnimations"},...Jit],qit=[{provide:l4,useClass:o4},{provide:Nr,useValue:"NoopAnimations"},...Jit];let VZt=(()=>{class e{static withConfig(t){return{ngModule:e,providers:t.disableAnimations?qit:A4}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:A4,imports:[qU]})}return e})(),UZt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})(),gJt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[LR,qc,Ki,Qg,DH,UZt]})}return e})(),EJt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Qg]})}return e})();hm("firebase","10.12.3","app"),Aj({apiKey:"AIzaSyAFjiIuMBA1IpTrw__WdkQiK5PKht4_go8",authDomain:"snoguess-e4d1c.firebaseapp.com",projectId:"snoguess-e4d1c",storageBucket:"snoguess-e4d1c.appspot.com",messagingSenderId:"289449411190",appId:"1:289449411190:web:49ff68411f9e5148f11557"});let MJt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e,bootstrap:[KQt]});static#i=this.\u0275inj=Pi({imports:[ubt,qU,QSt,Y8t,VZt,lAt,MQt,QR,$wt,l_t,Nwt,J2t,zC,OCt,m_t,zCt,zTt,jSt,__t,j_t,KW,Bk,eX,MEt,VAt,YAt,_At,rDt,gJt,t2t,Bk,BQt,EJt,g2t]})}return e})();pvt().bootstrapModule(MJt).catch(e=>console.error(e))},867:(Gs,kd,ps)=>{const Do=ps(293).a,de=ps(687).array;Gs.exports=class S{constructor(a={}){Object.assign(this,{list:a.emptyList&&[]||Array.prototype.concat.apply(Do,[de,a.list||[]]),exclude:a.exclude||[],splitRegex:a.splitRegex||/\b/,placeHolder:a.placeHolder||"*",regex:a.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:a.replaceRegex||/\w/g})}isProfane(a){return this.list.filter(b=>{const T=new RegExp(`\\b${b.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(b.toLowerCase())&&T.test(a)}).length>0||!1}replaceWord(a){return a.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean(a){return a.split(this.splitRegex).map(b=>this.isProfane(b)?this.replaceWord(b):b).join(this.splitRegex.exec(a)[0])}addWords(){let a=Array.from(arguments);this.list.push(...a),a.map(b=>b.toLowerCase()).forEach(b=>{this.exclude.includes(b)&&this.exclude.splice(this.exclude.indexOf(b),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map(a=>a.toLowerCase()))}}},402:Gs=>{Gs.exports=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bitching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"]},687:(Gs,kd,ps)=>{Gs.exports={object:ps(424),array:ps(402),regex:ps(658)}},424:Gs=>{Gs.exports={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckwhit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1}},658:Gs=>{Gs.exports=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi},578:function(Gs,kd){var ps,de;void 0!==(de="function"==typeof(ps=function(){"use strict";function k(h,c,u){var m=new XMLHttpRequest;m.open("GET",h),m.responseType="blob",m.onload=function(){f(m.response,c,u)},m.onerror=function(){console.error("could not download file")},m.send()}function a(h){var c=new XMLHttpRequest;c.open("HEAD",h,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function b(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(c)}}var T="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,g=T.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=T.saveAs||("object"!=typeof window||window!==T?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(h,c,u){var m=T.URL||T.webkitURL,d=document.createElement("a");d.download=c=c||h.name||"download",d.rel="noopener","string"==typeof h?(d.href=h,d.origin===location.origin?b(d):a(d.href)?k(h,c,u):b(d,d.target="_blank")):(d.href=m.createObjectURL(h),setTimeout(function(){m.revokeObjectURL(d.href)},4e4),setTimeout(function(){b(d)},0))}:"msSaveOrOpenBlob"in navigator?function(h,c,u){if(c=c||h.name||"download","string"!=typeof h)navigator.msSaveOrOpenBlob(function S(h,c){return typeof c>"u"?c={autoBom:!1}:"object"!=typeof c&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\ufeff",h],{type:h.type}):h}(h,u),c);else if(a(h))k(h,c,u);else{var m=document.createElement("a");m.href=h,m.target="_blank",setTimeout(function(){b(m)})}}:function(h,c,u,m){if((m=m||open("","_blank"))&&(m.document.title=m.document.body.innerText="downloading..."),"string"==typeof h)return k(h,c,u);var d="application/octet-stream"===h.type,p=/constructor/i.test(T.HTMLElement)||T.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||d&&p||g)&&typeof FileReader<"u"){var x=new FileReader;x.onloadend=function(){var E=x.result;E=v?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=E:location=E,m=null},x.readAsDataURL(h)}else{var y=T.URL||T.webkitURL,_=y.createObjectURL(h);m?m.location=_:location.href=_,m=null,setTimeout(function(){y.revokeObjectURL(_)},4e4)}});T.saveAs=f.saveAs=f,Gs.exports=f})?ps.apply(kd,[]):ps)&&(Gs.exports=de)},945:function(Gs){var Do;Do=()=>(()=>{var kd={50792:S=>{"use strict";var k=Object.prototype.hasOwnProperty,a="~";function b(){}function T(c,u,m){this.fn=c,this.context=u,this.once=m||!1}function g(c,u,m,d,p){if("function"!=typeof m)throw new TypeError("The listener must be a function");var v=new T(m,d||c,p),x=a?a+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],v]:c._events[x].push(v):(c._events[x]=v,c._eventsCount++),c}function f(c,u){0==--c._eventsCount?c._events=new b:delete c._events[u]}function h(){this._events=new b,this._eventsCount=0}Object.create&&(b.prototype=Object.create(null),(new b).__proto__||(a=!1)),h.prototype.eventNames=function(){var m,d,u=[];if(0===this._eventsCount)return u;for(d in m=this._events)k.call(m,d)&&u.push(a?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(m)):u},h.prototype.listeners=function(u){var d=this._events[a?a+u:u];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,v=d.length,x=new Array(v);p{var b=a(38829);S.exports=function(g,f,h,c){for(var u=g[0],m=1;m{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"angle",f,h,c,u)}},60757:S=>{S.exports=function(a,b,T){for(var g=0;g{S.exports=function(a,b,T){void 0===T&&(T=0);for(var g=T;g{S.exports=function(a,b,T){void 0===T&&(T=0);for(var g=a.length-1;g>=T;g--){var f=a[g],h=!0;for(var c in b)f[c]!==b[c]&&(h=!1);if(h)return f}return null}},94420:(S,k,a)=>{var b=a(11879),T=a(60461),g=a(95540),f=a(29747),c=new(a(41481))({sys:{queueDepthSort:f,events:{once:f}}},0,0,1,1).setOrigin(0,0);S.exports=function(m,d){void 0===d&&(d={});var p=d.hasOwnProperty("width"),v=d.hasOwnProperty("height"),x=g(d,"width",-1),y=g(d,"height",-1),_=g(d,"cellWidth",1),E=g(d,"cellHeight",_),A=g(d,"position",T.TOP_LEFT),D=g(d,"x",0),I=g(d,"y",0),R=0,F=0,N=x*_,V=y*E;c.setPosition(D,I),c.setSize(_,E);for(var B=0;B{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"alpha",f,h,c,u)}},67285:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"x",f,h,c,u)}},9074:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"x",f,c,m,d),b(g,"y",h,u,m,d)}},75222:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"y",f,h,c,u)}},22983:S=>{S.exports=function(a,b,T,g){void 0===T&&(T=0),void 0===g&&(g=6.28);for(var f=T,h=(g-T)/a.length,c=b.x,u=b.y,m=b.radius,d=0;d{S.exports=function(a,b,T,g){void 0===T&&(T=0),void 0===g&&(g=6.28);for(var f=T,h=(g-T)/a.length,c=b.width/2,u=b.height/2,m=0;m{var b=a(15258),T=a(26708);S.exports=function(f,h,c){var u;u=c?T(h,c,f.length):b(h,f.length);for(var m=0;m{var b=a(14649),T=a(86003),g=a(49498);S.exports=function(h,c,u){void 0===u&&(u=0);var m=b(c,!1,h.length);u>0?T(m,u):u<0&&g(m,Math.abs(u));for(var d=0;d{var b=a(84993);S.exports=function(g,f,h){var c=b({x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2},h),u=b({x1:f.x2,y1:f.y2,x2:f.x3,y2:f.y3},h),m=b({x1:f.x3,y1:f.y3,x2:f.x1,y2:f.y1},h);c.pop(),u.pop(),m.pop();for(var d=(c=c.concat(u,m)).length/g.length,p=0,v=0;v{S.exports=function(a,b,T){for(var g=0;g{S.exports=function(a,b,T,g,f,h){void 0===g&&(g=0),void 0===f&&(f=0),void 0===h&&(h=1);var c,u=0,m=a.length;if(1===h)for(c=f;c=0;c--)a[c][b]+=T+u*g,u++;return a}},43967:S=>{S.exports=function(a,b,T,g,f,h){void 0===g&&(g=0),void 0===f&&(f=0),void 0===h&&(h=1);var c,u=0,m=a.length;if(1===h)for(c=f;c=0;c--)a[c][b]=T+u*g,u++;return a}},88926:(S,k,a)=>{var b=a(28176);S.exports=function(g,f){for(var h=0;h{var b=a(24820);S.exports=function(g,f){for(var h=0;h{var b=a(65822);S.exports=function(g,f){for(var h=0;h{var b=a(26597);S.exports=function(g,f){for(var h=0;h{var b=a(90260);S.exports=function(g,f){for(var h=0;h{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"rotation",f,h,c,u)}},91051:(S,k,a)=>{var b=a(1163),T=a(20339);S.exports=function(f,h,c){for(var u=h.x,m=h.y,d=0;d{var b=a(1163);S.exports=function(g,f,h,c){var u=f.x,m=f.y;if(0===c)return g;for(var d=0;d{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"scaleX",f,h,c,u)}},94868:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"scaleX",f,c,m,d),b(g,"scaleY",h,u,m,d)}},95532:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"scaleY",f,h,c,u)}},8689:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"alpha",f,h,c,u)}},2645:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c){return b(g,"blendMode",f,0,h,c)}},32372:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"depth",f,h,c,u)}},85373:S=>{S.exports=function(a,b,T){for(var g=0;g{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"originX",f,c,m,d),b(g,"originY",h,u,m,d),g.forEach(function(p){p.updateDisplayOrigin()}),g}},79939:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"rotation",f,h,c,u)}},2699:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"scaleX",f,c,m,d),b(g,"scaleY",h,u,m,d)}},98739:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scaleX",f,h,c,u)}},98476:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scaleY",f,h,c,u)}},6207:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"scrollFactorX",f,c,m,d),b(g,"scrollFactorY",h,u,m,d)}},6607:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scrollFactorX",f,h,c,u)}},72248:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scrollFactorY",f,h,c,u)}},14036:S=>{S.exports=function(a,b,T,g,f){for(var h=0;h{var b=a(43967);S.exports=function(g,f,h,c){return b(g,"visible",f,0,h,c)}},77597:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"x",f,h,c,u)}},83194:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"x",f,c,m,d),b(g,"y",h,u,m,d)}},67678:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"y",f,h,c,u)}},35850:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=new b);var m,d,p=g.length;if(1===p)m=g[0].x,d=g[0].y,g[0].x=f,g[0].y=h;else{var v=1,x=0;0===c&&(x=p-1,v=p-2),m=g[x].x,d=g[x].y,g[x].x=f,g[x].y=h;for(var y=0;y=p||-1===v)){var _=g[v],E=_.x,A=_.y;_.x=m,_.y=d,m=E,d=A,0===c?v--:v++}}return u.x=m,u.y=d,u}},8628:(S,k,a)=>{var b=a(33680);S.exports=function(g){return b(g)}},21837:(S,k,a)=>{var b=a(7602);S.exports=function(g,f,h,c,u){void 0===u&&(u=!1);var d,m=Math.abs(c-h)/g.length;if(u)for(d=0;d{var b=a(54261);S.exports=function(g,f,h,c,u){void 0===u&&(u=!1);var d,m=Math.abs(c-h)/g.length;if(u)for(d=0;d{S.exports=function(a,b,T,g,f){if(void 0===f&&(f=!1),0===a.length)return a;if(1===a.length)return f?a[0][b]+=(g+T)/2:a[0][b]=(g+T)/2,a;var c,h=Math.abs(g-T)/(a.length-1);if(f)for(c=0;c{S.exports=function(a){for(var b=0;b{var b=a(15994);S.exports=function(g,f,h){void 0===h&&(h=0);for(var c=0;c{S.exports={AlignTo:a(11517),Angle:a(80318),Call:a(60757),GetFirst:a(69927),GetLast:a(32265),GridAlign:a(94420),IncAlpha:a(41721),IncX:a(67285),IncXY:a(9074),IncY:a(75222),PlaceOnCircle:a(22983),PlaceOnEllipse:a(95253),PlaceOnLine:a(88505),PlaceOnRectangle:a(41346),PlaceOnTriangle:a(11575),PlayAnimation:a(29953),PropertyValueInc:a(66979),PropertyValueSet:a(43967),RandomCircle:a(88926),RandomEllipse:a(33286),RandomLine:a(96e3),RandomRectangle:a(28789),RandomTriangle:a(97154),Rotate:a(20510),RotateAround:a(91051),RotateAroundDistance:a(76332),ScaleX:a(61619),ScaleXY:a(94868),ScaleY:a(95532),SetAlpha:a(8689),SetBlendMode:a(2645),SetDepth:a(32372),SetHitArea:a(85373),SetOrigin:a(81583),SetRotation:a(79939),SetScale:a(2699),SetScaleX:a(98739),SetScaleY:a(98476),SetScrollFactor:a(6207),SetScrollFactorX:a(6607),SetScrollFactorY:a(72248),SetTint:a(14036),SetVisible:a(50159),SetX:a(77597),SetXY:a(83194),SetY:a(67678),ShiftPosition:a(35850),Shuffle:a(8628),SmootherStep:a(21910),SmoothStep:a(21837),Spread:a(62054),ToggleVisible:a(79815),WrapInRectangle:a(39665)}},42099:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(74943),f=a(81957),h=a(41138),c=a(35154),u=a(90126),m=new T({initialize:function(p,v,x){this.manager=p,this.key=v,this.type="frame",this.frames=this.getFrames(p.textureManager,c(x,"frames",[]),c(x,"defaultTextureKey",null),c(x,"sortFrames",!0)),this.frameRate=c(x,"frameRate",null),this.duration=c(x,"duration",null),this.skipMissedFrames=c(x,"skipMissedFrames",!0),this.delay=c(x,"delay",0),this.repeat=c(x,"repeat",0),this.repeatDelay=c(x,"repeatDelay",0),this.yoyo=c(x,"yoyo",!1),this.showBeforeDelay=c(x,"showBeforeDelay",!1),this.showOnStart=c(x,"showOnStart",!1),this.hideOnComplete=c(x,"hideOnComplete",!1),this.randomFrame=c(x,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(g.PAUSE_ALL,this.pause,this),this.manager.on(g.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(d,p,v,x){null===v&&null===x?(d.frameRate=24,d.duration=24/p*1e3):v&&null===x?(d.duration=v,d.frameRate=p/(v/1e3)):(d.frameRate=x,d.duration=p/x*1e3),d.msPerFrame=1e3/d.frameRate},addFrame:function(d){return this.addFrameAt(this.frames.length,d)},addFrameAt:function(d,p){var v=this.getFrames(this.manager.textureManager,p);if(v.length>0){if(0===d)this.frames=v.concat(this.frames);else if(d===this.frames.length)this.frames=this.frames.concat(v);else{var x=this.frames.slice(0,d),y=this.frames.slice(d);this.frames=x.concat(v,y)}this.updateFrameSequence()}return this},checkFrame:function(d){return d>=0&&d0){E.isLast=!0,E.nextFrame=y[0],y[0].prevFrame=E;var Q=1/(y.length-1);for(D=0;D0?d.inReverse&&d.forward?d.forward=!1:this.repeatAnimation(d):d.complete():this.updateAndGetNextTick(d,p.nextFrame)},handleYoyoFrame:function(d,p){if(p||(p=!1),d.inReverse===!p&&d.repeatCounter>0)return(0===d.repeatDelay||d.pendingRepeat)&&(d.forward=p),void this.repeatAnimation(d);d.inReverse===p||0!==d.repeatCounter?(d.forward=p,this.updateAndGetNextTick(d,p?d.currentFrame.nextFrame:d.currentFrame.prevFrame)):d.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(d){var p=d.currentFrame;p.isFirst?d.yoyo?this.handleYoyoFrame(d,!0):d.repeatCounter>0?(d.inReverse&&!d.forward||(d.forward=!0),this.repeatAnimation(d)):d.complete():this.updateAndGetNextTick(d,p.prevFrame)},updateAndGetNextTick:function(d,p){d.setCurrentFrame(p),this.getNextTick(d)},removeFrame:function(d){var p=this.frames.indexOf(d);return-1!==p&&this.removeFrameAt(p),this},removeFrameAt:function(d){return this.frames.splice(d,1),this.updateFrameSequence(),this},repeatAnimation:function(d){if(2===d._pendingStop){if(0===d._pendingStopValue)return d.stop();d._pendingStopValue--}d.repeatDelay>0&&!d.pendingRepeat?(d.pendingRepeat=!0,d.accumulator-=d.nextTick,d.nextTick+=d.repeatDelay):(d.repeatCounter--,d.setCurrentFrame(d.forward?d.currentFrame.nextFrame:d.currentFrame.prevFrame),d.isPlaying&&(this.getNextTick(d),d.handleRepeat()))},toJSON:function(){var d={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(p){d.frames.push(p.toJSON())}),d},updateFrameSequence:function(){for(var v,d=this.frames.length,p=1/(d-1),x=0;x1?(v.isLast=!0,v.prevFrame=this.frames[d-2],v.nextFrame=this.frames[0]):d>1&&(v.prevFrame=this.frames[x-1],v.nextFrame=this.frames[x+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(g.PAUSE_ALL,this.pause,this),this.manager.off(g.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var d=0;d{var T=new(a(83419))({initialize:function(f,h,c,u,m){void 0===m&&(m=!1),this.textureKey=f,this.textureFrame=h,this.index=c,this.frame=u,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=m},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});S.exports=T},60848:(S,k,a)=>{var b=a(42099),T=a(83419),g=a(90330),f=a(50792),h=a(74943),c=a(8443),u=a(95540),m=a(35154),d=a(36383),p=a(20283),v=a(41836),x=new T({Extends:f,initialize:function(_){f.call(this),this.game=_,this.textureManager=null,this.globalTimeScale=1,this.anims=new g,this.mixes=new g,this.paused=!1,this.name="AnimationManager",_.events.once(c.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(c.DESTROY,this.destroy,this)},addMix:function(y,_,E){var A=this.anims,D=this.mixes,I="string"==typeof y?y:y.key,R="string"==typeof _?_:_.key;if(A.has(I)&&A.has(R)){var F=D.get(I);F||(F={}),F[R]=E,D.set(I,F)}return this},removeMix:function(y,_){var E=this.mixes,A="string"==typeof y?y:y.key,D=E.get(A);if(D)if(_){var I="string"==typeof _?_:_.key;D.hasOwnProperty(I)&&delete D[I]}else _||E.delete(A);return this},getMix:function(y,_){var D="string"==typeof _?_:_.key,I=this.mixes.get("string"==typeof y?y:y.key);return I&&I.hasOwnProperty(D)?I[D]:0},add:function(y,_){return this.anims.has(y)?(console.warn("Animation key exists: "+y),this):(_.key=y,this.anims.set(y,_),this.emit(h.ADD_ANIMATION,y,_),this)},exists:function(y){return this.anims.has(y)},createFromAseprite:function(y,_,E){var A=[],D=this.game.cache.json.get(y);if(!D)return console.warn("No Aseprite data found for: "+y),A;var I=this,R=m(D,"meta",null),F=m(D,"frames",null);return R&&F&&m(R,"frameTags",[]).forEach(function(V){var B=[],H=u(V,"name",null),Q=u(V,"from",0),G=u(V,"to",0),K=u(V,"direction","forward");if(H&&(!_||_&&_.indexOf(H)>-1)){for(var q=0,at=Q;at<=G;at++){var ot=at.toString(),J=F[ot];if(J){var it=u(J,"duration",d.MAX_SAFE_INTEGER);B.push({key:y,frame:ot,duration:it}),q+=it}}"reverse"===K&&(B=B.reverse());var j,Y={key:H,frames:B,duration:q,yoyo:"pingpong"===K};E?E.anims&&(j=E.anims.create(Y)):j=I.create(Y),j&&A.push(j)}}),A},create:function(y){var _=y.key,E=!1;return _&&((E=this.get(_))?console.warn("AnimationManager key already exists: "+_):(E=new b(this,_,y),this.anims.set(_,E),this.emit(h.ADD_ANIMATION,_,E))),E},fromJSON:function(y,_){void 0===_&&(_=!1),_&&this.anims.clear(),"string"==typeof y&&(y=JSON.parse(y));var E=[];if(y.hasOwnProperty("anims")&&Array.isArray(y.anims)){for(var A=0;A{var b=a(42099),T=a(30976),g=a(83419),f=a(90330),h=a(74943),c=a(95540),u=new g({initialize:function(d){this.parent=d,this.animationManager=d.scene.sys.anims,this.animationManager.on(h.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0},chain:function(m){var d=this.parent;if(void 0===m)return this.nextAnimsQueue.length=0,this.nextAnim=null,d;Array.isArray(m)||(m=[m]);for(var p=0;px&&(E=0),this.randomFrame&&(E=T(0,x-1));var A=v.frames[E];0===E&&!this.forward&&(A=v.getLastFrame()),this.currentFrame=A}else console.warn("Missing animation: "+p);return this.parent},pause:function(m){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==m&&this.setCurrentFrame(m),this.parent},resume:function(m){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==m&&this.setCurrentFrame(m),this.parent},playAfterDelay:function(m,d){if(this.isPlaying){var p=this.nextAnim;p&&this.nextAnimsQueue.unshift(p),this.nextAnim=m,this._pendingStop=1,this._pendingStopValue=d}else this.delayCounter=d,this.play(m,!0);return this.parent},playAfterRepeat:function(m,d){if(void 0===d&&(d=1),this.isPlaying){var p=this.nextAnim;p&&this.nextAnimsQueue.unshift(p),-1!==this.repeatCounter&&d>this.repeatCounter&&(d=this.repeatCounter),this.nextAnim=m,this._pendingStop=2,this._pendingStopValue=d}else this.play(m);return this.parent},play:function(m,d){void 0===d&&(d=!1);var p=this.currentAnim;if(d&&this.isPlaying&&p.key===("string"==typeof m?m:m.key))return this.parent;if(p&&this.isPlaying){var y=this.animationManager.getMix(p.key,m);if(y>0)return this.playAfterDelay(m,y)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(m)},playReverse:function(m,d){return void 0===d&&(d=!1),d&&this.isPlaying&&this.currentAnim.key===("string"==typeof m?m:m.key)?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(m))},startAnimation:function(m){this.load(m);var d=this.currentAnim,p=this.parent;return d&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,d.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),p},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(h.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(h.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(h.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(h.ANIMATION_COMPLETE,h.ANIMATION_COMPLETE_KEY)},emitEvents:function(m,d){var p=this.currentAnim;if(p){var v=this.currentFrame,x=this.parent,y=v.textureFrame;x.emit(m,p,v,x,y),d&&x.emit(d+p.key,p,v,x,y)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var m=this.currentFrame;if(!m)return 0;var d=m.progress;return this.inReverse&&(d*=-1),d},setProgress:function(m){return this.forward||(m=1-m),this.setCurrentFrame(this.currentAnim.getFrameByProgress(m)),this.parent},setRepeat:function(m){return this.repeatCounter=-1===m?Number.MAX_VALUE:m,this.parent},globalRemove:function(m,d){void 0===d&&(d=this.currentAnim),this.isPlaying&&d.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(m,d){void 0===m&&(m=!1),void 0===d&&(d=!1);var p=this.currentAnim,v=this.parent;return p?(d&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),p.getFirstTick(this),this.emitEvents(h.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!m,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(p.frames[0]),this.parent):v},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var m=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(m)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var m=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(m)}return this.parent},stopAfterDelay:function(m){return this._pendingStop=1,this._pendingStopValue=m,this.parent},stopAfterRepeat:function(m){return void 0===m&&(m=1),-1!==this.repeatCounter&&m>this.repeatCounter&&(m=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=m,this.parent},stopOnFrame:function(m){return this._pendingStop=3,this._pendingStopValue=m,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(m,d){var p=this.currentAnim;if(this.isPlaying&&p&&!p.paused){if(this.accumulator+=d*this.timeScale*this.animationManager.globalTimeScale,1===this._pendingStop&&(this._pendingStopValue-=d,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?p.nextFrame(this):p.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var v=0;do{this.forward?p.nextFrame(this):p.previousFrame(this),v++}while(this.isPlaying&&this.accumulator>this.nextTick&&v<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(m){var d=this.parent;return this.currentFrame=m,d.texture=m.frame.texture,d.frame=m.frame,d.isCropped&&d.frame.updateCropUVs(d._crop,d.flipX,d.flipY),m.setAlpha&&(d.alpha=m.alpha),d.setSizeToFrame(),d._originComponent&&(m.frame.customPivot?d.setOrigin(m.frame.pivotX,m.frame.pivotY):d.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(h.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===m&&this.stop()),d},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(m){return this.anims?this.anims.get(m):null},exists:function(m){return!!this.anims&&this.anims.has(m)},create:function(m){var d=m.key,p=!1;return d&&((p=this.get(d))?console.warn("Animation key already exists: "+d):(p=new b(this,d,m),this.anims||(this.anims=new f),this.anims.set(d,p))),p},createFromAseprite:function(m,d){return this.animationManager.createFromAseprite(m,d,this.parent)},generateFrameNames:function(m,d){return this.animationManager.generateFrameNames(m,d)},generateFrameNumbers:function(m,d){return this.animationManager.generateFrameNumbers(m,d)},remove:function(m){var d=this.get(m);return d&&(this.currentAnim===d&&this.stop(),this.anims.delete(m)),d},destroy:function(){this.animationManager.off(h.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});S.exports=u},57090:S=>{S.exports="add"},25312:S=>{S.exports="animationcomplete"},89580:S=>{S.exports="animationcomplete-"},52860:S=>{S.exports="animationrepeat"},63850:S=>{S.exports="animationrestart"},99085:S=>{S.exports="animationstart"},28087:S=>{S.exports="animationstop"},1794:S=>{S.exports="animationupdate"},52562:S=>{S.exports="pauseall"},57953:S=>{S.exports="remove"},68339:S=>{S.exports="resumeall"},74943:(S,k,a)=>{S.exports={ADD_ANIMATION:a(57090),ANIMATION_COMPLETE:a(25312),ANIMATION_COMPLETE_KEY:a(89580),ANIMATION_REPEAT:a(52860),ANIMATION_RESTART:a(63850),ANIMATION_START:a(99085),ANIMATION_STOP:a(28087),ANIMATION_UPDATE:a(1794),PAUSE_ALL:a(52562),REMOVE_ANIMATION:a(57953),RESUME_ALL:a(68339)}},60421:(S,k,a)=>{S.exports={Animation:a(42099),AnimationFrame:a(41138),AnimationManager:a(60848),AnimationState:a(9674),Events:a(74943)}},2161:(S,k,a)=>{var b=a(83419),T=a(90330),g=a(50792),f=a(24736),h=new b({initialize:function(){this.entries=new T,this.events=new g},add:function(c,u){return this.entries.set(c,u),this.events.emit(f.ADD,this,c,u),this},has:function(c){return this.entries.has(c)},exists:function(c){return this.entries.has(c)},get:function(c){return this.entries.get(c)},remove:function(c){var u=this.get(c);return u&&(this.entries.delete(c),this.events.emit(f.REMOVE,this,c,u.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});S.exports=h},24047:(S,k,a)=>{var b=a(2161),T=a(83419),g=a(8443),f=new T({initialize:function(c){this.game=c,this.binary=new b,this.bitmapFont=new b,this.json=new b,this.physics=new b,this.shader=new b,this.audio=new b,this.video=new b,this.text=new b,this.html=new b,this.obj=new b,this.tilemap=new b,this.xml=new b,this.custom={},this.game.events.once(g.DESTROY,this.destroy,this)},addCustom:function(h){return this.custom.hasOwnProperty(h)||(this.custom[h]=new b),this.custom[h]},destroy:function(){for(var h=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],c=0;c{S.exports="add"},59261:S=>{S.exports="remove"},24736:(S,k,a)=>{S.exports={ADD:a(51464),REMOVE:a(59261)}},83388:(S,k,a)=>{S.exports={BaseCache:a(2161),CacheManager:a(24047),Events:a(24736)}},71911:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(39506),f=a(50792),h=a(19715),c=a(87841),u=a(61340),m=a(80333),d=a(26099),p=new b({Extends:f,Mixins:[T.AlphaSingle,T.Visible],initialize:function(x,y,_,E){void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),f.call(this),this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new c,this.dirty=!0,this._x=x,this._y=y,this._width=_,this._height=E,this._bounds=new c,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new u,this.transparent=!0,this.backgroundColor=m("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new d(_/2,E/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(v){this.renderList.push(v)},setOrigin:function(v,x){return void 0===v&&(v=.5),void 0===x&&(x=v),this.originX=v,this.originY=x,this},getScroll:function(v,x,y){void 0===y&&(y=new d);var E=.5*this.height;return y.x=v-.5*this.width,y.y=x-E,this.useBounds&&(y.x=this.clampX(y.x),y.y=this.clampY(y.y)),y},centerOnX:function(v){var x=.5*this.width;return this.midPoint.x=v,this.scrollX=v-x,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(v){var x=.5*this.height;return this.midPoint.y=v,this.scrollY=v-x,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(v,x){return this.centerOnX(v),this.centerOnY(x),this},centerToBounds:function(){if(this.useBounds){var v=this._bounds,x=.5*this.width,y=.5*this.height;this.midPoint.set(v.centerX,v.centerY),this.scrollX=v.centerX-x,this.scrollY=v.centerY-y}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(v){if(this.disableCull)return v;var x=this.matrix.matrix,y=x[0],_=x[1],E=x[2],A=x[3],D=y*A-_*E;if(!D)return v;var I=x[4],R=x[5],F=this.scrollX,N=this.scrollY,H=this.y,Q=H+this.height,G=this.x,K=G+this.width,q=this.culledObjects,at=v.length;D=1/D,q.length=0;for(var ot=0;otG&&j*y+nt*E+IH&&j*_+nt*A+RE&&(v=E),v},clampY:function(v){var x=this._bounds,y=this.displayHeight,_=x.y+(y-this.height)/2,E=Math.max(_,_+x.height-y);return v<_?v=_:v>E&&(v=E),v},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(v){return void 0===v&&(v=0),this.rotation=g(v),this},setBackgroundColor:function(v){return void 0===v&&(v="rgba(0,0,0,0)"),this.backgroundColor=m(v),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(v,x,y,_,E){return void 0===E&&(E=!1),this._bounds.setTo(v,x,y,_),this.dirty=!0,this.useBounds=!0,E?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(v){void 0===v&&(v=new c);var x=this._bounds;return v.setTo(x.x,x.y,x.width,x.height),v},setName:function(v){return void 0===v&&(v=""),this.name=v,this},setPosition:function(v,x){return void 0===x&&(x=v),this.x=v,this.y=x,this},setRotation:function(v){return void 0===v&&(v=0),this.rotation=v,this},setRoundPixels:function(v){return this.roundPixels=v,this},setScene:function(v,x){void 0===x&&(x=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=v,this.isSceneCamera=x;var y=v.sys;return this.sceneManager=y.game.scene,this.scaleManager=y.scale,this.cameraManager=y.cameras,this.updateSystem(),this},setScroll:function(v,x){return void 0===x&&(x=v),this.scrollX=v,this.scrollY=x,this},setSize:function(v,x){return void 0===x&&(x=v),this.width=v,this.height=x,this},setViewport:function(v,x,y,_){return this.x=v,this.y=x,this.width=y,this.height=_,this},setZoom:function(v,x){return void 0===v&&(v=1),void 0===x&&(x=v),0===v&&(v=.001),0===x&&(x=.001),this.zoomX=v,this.zoomY=x,this},setMask:function(v,x){return void 0===x&&(x=!0),this.mask=v,this._maskCamera=x?this.cameraManager.default:this,this},clearMask:function(v){return void 0===v&&(v=!1),v&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var v={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(v.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),v},update:function(){},setIsSceneCamera:function(v){return this.isSceneCamera=v,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var v=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,x=this.sceneManager;v&&!this._customViewport?x.customViewports++:!v&&this._customViewport&&x.customViewports--,this.dirty=!0,this._customViewport=v}},destroy:function(){this.emit(h.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(v){this._x=v,this.updateSystem()}},y:{get:function(){return this._y},set:function(v){this._y=v,this.updateSystem()}},width:{get:function(){return this._width},set:function(v){this._width=v,this.updateSystem()}},height:{get:function(){return this._height},set:function(v){this._height=v,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(v){v!==this._scrollX&&(this._scrollX=v,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(v){v!==this._scrollY&&(this._scrollY=v,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(v){this._zoomX=v,this._zoomY=v,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(v){this._zoomX=v,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(v){this._zoomY=v,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(v){this._rotation=v,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});S.exports=p},38058:(S,k,a)=>{var b=a(71911),T=a(67502),g=a(45319),f=a(83419),h=a(31401),c=a(20052),u=a(19715),m=a(28915),d=a(87841),p=a(26099),v=new f({Extends:b,Mixins:[h.PostPipeline],initialize:function(y,_,E,A){b.call(this,y,_,E,A),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new c.Fade(this),this.flashEffect=new c.Flash(this),this.shakeEffect=new c.Shake(this),this.panEffect=new c.Pan(this),this.rotateToEffect=new c.RotateTo(this),this.zoomEffect=new c.Zoom(this),this.lerp=new p(1,1),this.followOffset=new p,this.deadzone=null,this._follow=null},setDeadzone:function(x,y){if(void 0===x)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=x,this.deadzone.height=y):this.deadzone=new d(0,0,x,y),this._follow){var _=this.width/2,E=this.height/2,A=this._follow.x-this.followOffset.x,D=this._follow.y-this.followOffset.y;this.midPoint.set(A,D),this.scrollX=A-_,this.scrollY=D-E}T(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(x,y,_,E,A,D){return this.fadeEffect.start(!1,x,y,_,E,!0,A,D)},fadeOut:function(x,y,_,E,A,D){return this.fadeEffect.start(!0,x,y,_,E,!0,A,D)},fadeFrom:function(x,y,_,E,A,D,I){return this.fadeEffect.start(!1,x,y,_,E,A,D,I)},fade:function(x,y,_,E,A,D,I){return this.fadeEffect.start(!0,x,y,_,E,A,D,I)},flash:function(x,y,_,E,A,D,I){return this.flashEffect.start(x,y,_,E,A,D,I)},shake:function(x,y,_,E,A){return this.shakeEffect.start(x,y,_,E,A)},pan:function(x,y,_,E,A,D,I){return this.panEffect.start(x,y,_,E,A,D,I)},rotateTo:function(x,y,_,E,A,D,I){return this.rotateToEffect.start(x,y,_,E,A,D,I)},zoomTo:function(x,y,_,E,A,D){return this.zoomEffect.start(x,y,_,E,A,D)},preRender:function(){this.renderList.length=0;var x=this.width,y=this.height,_=.5*x,E=.5*y,A=this.zoomX,D=this.zoomY,I=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(A)&&Number.isInteger(D);var R=x*this.originX,F=y*this.originY,N=this._follow,V=this.deadzone,B=this.scrollX,H=this.scrollY;V&&T(V,this.midPoint.x,this.midPoint.y);var Q=!1;if(N&&!this.panEffect.isRunning){var G=this.lerp,K=N.x-this.followOffset.x,q=N.y-this.followOffset.y;V?(KV.right&&(B=m(B,B+(K-V.right),G.x)),qV.bottom&&(H=m(H,H+(q-V.bottom),G.y))):(B=m(B,K-R,G.x),H=m(H,q-F,G.y)),Q=!0}this.roundPixels&&(B=Math.floor(B),H=Math.floor(H)),this.useBounds&&(B=this.clampX(B),H=this.clampY(H)),this.scrollX=B,this.scrollY=H;var at=B+_,ot=H+E;this.midPoint.set(at,ot);var J=Math.floor(x/A+.5),it=Math.floor(y/D+.5),Y=Math.floor(at-J/2+.5),j=Math.floor(ot-it/2+.5);this.worldView.setTo(Y,j,J,it),I.applyITRS(Math.floor(this.x+R+.5),Math.floor(this.y+F+.5),this.rotation,A,D),I.translate(-R,-F),this.shakeEffect.preRender(),Q&&this.emit(u.FOLLOW_UPDATE,this,N)},setLerp:function(x,y){return void 0===x&&(x=1),void 0===y&&(y=x),this.lerp.set(x,y),this},setFollowOffset:function(x,y){return void 0===x&&(x=0),void 0===y&&(y=0),this.followOffset.set(x,y),this},startFollow:function(x,y,_,E,A,D){void 0===y&&(y=!1),void 0===_&&(_=1),void 0===E&&(E=_),void 0===A&&(A=0),void 0===D&&(D=A),this._follow=x,this.roundPixels=y,_=g(_,0,1),E=g(E,0,1),this.lerp.set(_,E),this.followOffset.set(A,D);var I=this.width/2,R=this.height/2,F=x.x-A,N=x.y-D;return this.midPoint.set(F,N),this.scrollX=F-I,this.scrollY=N-R,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(x,y){this.visible&&(this.rotateToEffect.update(x,y),this.panEffect.update(x,y),this.zoomEffect.update(x,y),this.shakeEffect.update(x,y),this.flashEffect.update(x,y),this.fadeEffect.update(x,y))},destroy:function(){this.resetFX(),b.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});S.exports=v},32743:(S,k,a)=>{var b=a(38058),T=a(83419),g=a(95540),f=a(37277),h=a(37303),c=a(97480),u=a(44594),m=new T({initialize:function(p){this.scene=p,this.systems=p.sys,this.roundPixels=p.sys.game.config.roundPixels,this.cameras=[],p.sys.events.once(u.BOOT,this.boot,this),p.sys.events.on(u.START,this.start,this)},boot:function(){var d=this.systems;d.settings.cameras?this.fromJSON(d.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new b(0,0,d.scale.width,d.scale.height).setScene(this.scene),d.game.scale.on(c.RESIZE,this.onResize,this),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){if(!this.main){var d=this.systems;d.settings.cameras?this.fromJSON(d.settings.cameras):this.add(),this.main=this.cameras[0]}var p=this.systems.events;p.on(u.UPDATE,this.update,this),p.once(u.SHUTDOWN,this.shutdown,this)},add:function(d,p,v,x,y,_){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=this.scene.sys.scale.width),void 0===x&&(x=this.scene.sys.scale.height),void 0===y&&(y=!1),void 0===_&&(_="");var E=new b(d,p,v,x);return E.setName(_),E.setScene(this.scene),E.setRoundPixels(this.roundPixels),E.id=this.getNextID(),this.cameras.push(E),y&&(this.main=E),E},addExisting:function(d,p){return void 0===p&&(p=!1),-1===this.cameras.indexOf(d)?(d.id=this.getNextID(),d.setRoundPixels(this.roundPixels),this.cameras.push(d),p&&(this.main=d),d):null},getNextID:function(){for(var d=this.cameras,p=1,v=0;v<32;v++){for(var x=!1,y=0;y0){_.preRender();var E=this.getVisibleChildren(p.getChildren(),_);d.render(v,E,_)}}},getVisibleChildren:function(d,p){return d.filter(function(v){return v.willRender(p)})},resetAll:function(){for(var d=0;d{var b=a(45319),T=a(83419),g=a(19715),f=new T({initialize:function(c){this.camera=c,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0},start:function(h,c,u,m,d,p,v,x){return void 0===h&&(h=!0),void 0===c&&(c=1e3),void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=!1),void 0===v&&(v=null),void 0===x&&(x=this.camera.scene),!p&&this.isRunning||(this.isRunning=!0,this.isComplete=!1,this.duration=c,this.direction=h,this.progress=0,this.red=u,this.green=m,this.blue=d,this.alpha=h?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=v,this._onUpdateScope=x,this.camera.emit(h?g.FADE_OUT_START:g.FADE_IN_START,this.camera,this,c,u,m,d)),this.camera},update:function(h,c){this.isRunning&&(this._elapsed+=c,this.progress=b(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var b=a(45319),T=a(83419),g=a(19715),f=new T({initialize:function(c){this.camera=c,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0},start:function(h,c,u,m,d,p,v){return void 0===h&&(h=250),void 0===c&&(c=255),void 0===u&&(u=255),void 0===m&&(m=255),void 0===d&&(d=!1),void 0===p&&(p=null),void 0===v&&(v=this.camera.scene),!d&&this.isRunning||(this.isRunning=!0,this.duration=h,this.progress=0,this.red=c,this.green=u,this.blue=m,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v,this.camera.emit(g.FLASH_START,this.camera,this,h,c,u,m)),this.camera},update:function(h,c){this.isRunning&&(this._elapsed+=c,this.progress=b(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var b=a(45319),T=a(83419),g=a(62640),f=a(19715),h=a(26099),c=new T({initialize:function(m){this.camera=m,this.isRunning=!1,this.duration=0,this.source=new h,this.current=new h,this.destination=new h,this.progress=0,this._elapsed=0},start:function(u,m,d,p,v,x,y){void 0===d&&(d=1e3),void 0===p&&(p=g.Linear),void 0===v&&(v=!1),void 0===x&&(x=null),void 0===y&&(y=this.camera.scene);var _=this.camera;return!v&&this.isRunning||(this.isRunning=!0,this.duration=d,this.progress=0,this.source.set(_.scrollX,_.scrollY),this.destination.set(u,m),_.getScroll(u,m,this.current),"string"==typeof p&&g.hasOwnProperty(p)?this.ease=g[p]:"function"==typeof p&&(this.ease=p),this._elapsed=0,this._onUpdate=x,this._onUpdateScope=y,this.camera.emit(f.PAN_START,this.camera,this,d,u,m)),_},update:function(u,m){if(this.isRunning){this._elapsed+=m;var d=b(this._elapsed/this.duration,0,1);this.progress=d;var p=this.camera;if(this._elapsed{var b=a(45319),T=a(83419),g=a(19715),f=a(62640),h=new T({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.progress=0,this._elapsed=0,this.clockwise=!0,this.shortestPath=!1},start:function(c,u,m,d,p,v,x){void 0===m&&(m=1e3),void 0===d&&(d=f.Linear),void 0===p&&(p=!1),void 0===v&&(v=null),void 0===x&&(x=this.camera.scene),void 0===u&&(u=!1),this.shortestPath=u;var y=c;c<0?(y=-1*c,this.clockwise=!1):this.clockwise=!0;var _=360*Math.PI/180;y-=Math.floor(y/_)*_;var E=this.camera;if(!p&&this.isRunning)return E;if(this.isRunning=!0,this.duration=m,this.progress=0,this.source=E.rotation,this.destination=y,"string"==typeof d&&f.hasOwnProperty(d)?this.ease=f[d]:"function"==typeof d&&(this.ease=d),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=x,this.shortestPath){var A,D;(A=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+_)-this.source)<(D=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+_)-this.destination)?this.clockwise=!0:A>D&&(this.clockwise=!1)}return this.camera.emit(g.ROTATE_START,this.camera,this,m,y),E},update:function(c,u){if(this.isRunning){this._elapsed+=u;var m=b(this._elapsed/this.duration,0,1);this.progress=m;var d=this.camera;if(this._elapsed=_?Math.abs(y-_):Math.abs(y+x)-_;var E;d.rotation=E=this.clockwise?d.rotation+v*p:d.rotation-v*p,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,d,m,E)}else d.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,d,m,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(g.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});S.exports=h},30330:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(19715),f=a(26099),h=new T({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.intensity=new f,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0},start:function(c,u,m,d,p){return void 0===c&&(c=100),void 0===u&&(u=.05),void 0===m&&(m=!1),void 0===d&&(d=null),void 0===p&&(p=this.camera.scene),!m&&this.isRunning||(this.isRunning=!0,this.duration=c,this.progress=0,"number"==typeof u?this.intensity.set(u):this.intensity.set(u.x,u.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=d,this._onUpdateScope=p,this.camera.emit(g.SHAKE_START,this.camera,this,c,u)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(c,u){if(this.isRunning)if(this._elapsed+=u,this.progress=b(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var b=a(45319),T=a(83419),g=a(62640),f=a(19715),h=new T({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.progress=0,this._elapsed=0},start:function(c,u,m,d,p,v){void 0===u&&(u=1e3),void 0===m&&(m=g.Linear),void 0===d&&(d=!1),void 0===p&&(p=null),void 0===v&&(v=this.camera.scene);var x=this.camera;return!d&&this.isRunning||(this.isRunning=!0,this.duration=u,this.progress=0,this.source=x.zoom,this.destination=c,"string"==typeof m&&g.hasOwnProperty(m)?this.ease=g[m]:"function"==typeof m&&(this.ease=m),this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v,this.camera.emit(f.ZOOM_START,this.camera,this,u,c)),x},update:function(c,u){this.isRunning&&(this._elapsed+=u,this.progress=b(this._elapsed/this.duration,0,1),this._elapsed{S.exports={Fade:a(5020),Flash:a(10662),Pan:a(20359),Shake:a(30330),RotateTo:a(34208),Zoom:a(45641)}},16438:S=>{S.exports="cameradestroy"},32726:S=>{S.exports="camerafadeincomplete"},87807:S=>{S.exports="camerafadeinstart"},45917:S=>{S.exports="camerafadeoutcomplete"},95666:S=>{S.exports="camerafadeoutstart"},47056:S=>{S.exports="cameraflashcomplete"},91261:S=>{S.exports="cameraflashstart"},45047:S=>{S.exports="followupdate"},81927:S=>{S.exports="camerapancomplete"},74264:S=>{S.exports="camerapanstart"},54419:S=>{S.exports="postrender"},79330:S=>{S.exports="prerender"},93183:S=>{S.exports="camerarotatecomplete"},80112:S=>{S.exports="camerarotatestart"},62252:S=>{S.exports="camerashakecomplete"},86017:S=>{S.exports="camerashakestart"},539:S=>{S.exports="camerazoomcomplete"},51892:S=>{S.exports="camerazoomstart"},19715:(S,k,a)=>{S.exports={DESTROY:a(16438),FADE_IN_COMPLETE:a(32726),FADE_IN_START:a(87807),FADE_OUT_COMPLETE:a(45917),FADE_OUT_START:a(95666),FLASH_COMPLETE:a(47056),FLASH_START:a(91261),FOLLOW_UPDATE:a(45047),PAN_COMPLETE:a(81927),PAN_START:a(74264),POST_RENDER:a(54419),PRE_RENDER:a(79330),ROTATE_COMPLETE:a(93183),ROTATE_START:a(80112),SHAKE_COMPLETE:a(62252),SHAKE_START:a(86017),ZOOM_COMPLETE:a(539),ZOOM_START:a(51892)}},87969:(S,k,a)=>{S.exports={Camera:a(38058),BaseCamera:a(71911),CameraManager:a(32743),Effects:a(20052),Events:a(19715)}},63091:(S,k,a)=>{var b=a(83419),T=a(35154),g=new b({initialize:function(h){this.camera=T(h,"camera",null),this.left=T(h,"left",null),this.right=T(h,"right",null),this.up=T(h,"up",null),this.down=T(h,"down",null),this.zoomIn=T(h,"zoomIn",null),this.zoomOut=T(h,"zoomOut",null),this.zoomSpeed=T(h,"zoomSpeed",.01),this.minZoom=T(h,"minZoom",.001),this.maxZoom=T(h,"maxZoom",1e3),this.speedX=0,this.speedY=0;var c=T(h,"speed",null);"number"==typeof c?(this.speedX=c,this.speedY=c):(this.speedX=T(h,"speed.x",0),this.speedY=T(h,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(f){return this.camera=f,this},update:function(f){if(this.active){void 0===f&&(f=1);var h=this.camera;this.up&&this.up.isDown?h.scrollY-=this.speedY*f|0:this.down&&this.down.isDown&&(h.scrollY+=this.speedY*f|0),this.left&&this.left.isDown?h.scrollX-=this.speedX*f|0:this.right&&this.right.isDown&&(h.scrollX+=this.speedX*f|0),this.zoomIn&&this.zoomIn.isDown?(h.zoom-=this.zoomSpeed,h.zoomthis.maxZoom&&(h.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});S.exports=g},58818:(S,k,a)=>{var b=a(83419),T=a(35154),g=new b({initialize:function(h){this.camera=T(h,"camera",null),this.left=T(h,"left",null),this.right=T(h,"right",null),this.up=T(h,"up",null),this.down=T(h,"down",null),this.zoomIn=T(h,"zoomIn",null),this.zoomOut=T(h,"zoomOut",null),this.zoomSpeed=T(h,"zoomSpeed",.01),this.minZoom=T(h,"minZoom",.001),this.maxZoom=T(h,"maxZoom",1e3),this.accelX=0,this.accelY=0;var c=T(h,"acceleration",null);"number"==typeof c?(this.accelX=c,this.accelY=c):(this.accelX=T(h,"acceleration.x",0),this.accelY=T(h,"acceleration.y",0)),this.dragX=0,this.dragY=0;var u=T(h,"drag",null);"number"==typeof u?(this.dragX=u,this.dragY=u):(this.dragX=T(h,"drag.x",0),this.dragY=T(h,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var m=T(h,"maxSpeed",null);"number"==typeof m?(this.maxSpeedX=m,this.maxSpeedY=m):(this.maxSpeedX=T(h,"maxSpeed.x",0),this.maxSpeedY=T(h,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(f){return this.camera=f,this},update:function(f){if(this.active){void 0===f&&(f=1);var h=this.camera;this._speedX>0?(this._speedX-=this.dragX*f,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*f,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*f,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*f,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this._zoom=this.zoomIn&&this.zoomIn.isDown?-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this.zoomSpeed:0,0!==this._speedX&&(h.scrollX-=this._speedX*f|0),0!==this._speedY&&(h.scrollY-=this._speedY*f|0),0!==this._zoom&&(h.zoom+=this._zoom,h.zoomthis.maxZoom&&(h.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});S.exports=g},38865:(S,k,a)=>{S.exports={FixedKeyControl:a(63091),SmoothedKeyControl:a(58818)}},26638:(S,k,a)=>{S.exports={Controls:a(38865),Scene2D:a(87969)}},8054:(S,k,a)=>{var b={VERSION:"3.87",LOG_VERSION:"v387",BlendModes:a(10312),ScaleModes:a(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};S.exports=b},69547:(S,k,a)=>{var b=a(83419),T=a(8054),g=a(42363),f=a(82264),h=a(95540),c=a(35154),u=a(41212),m=a(29747),d=a(75508),p=a(36060),v=a(80333),x=new b({initialize:function(_){void 0===_&&(_={});var D=c(_,"scale",null);this.width=c(D,"width",1024,_),this.height=c(D,"height",768,_),this.zoom=c(D,"zoom",1,_),this.parent=c(D,"parent",void 0,_),this.scaleMode=c(D,D?"mode":"scaleMode",0,_),this.expandParent=c(D,"expandParent",!0,_),this.autoRound=c(D,"autoRound",!1,_),this.autoCenter=c(D,"autoCenter",0,_),this.resizeInterval=c(D,"resizeInterval",500,_),this.fullscreenTarget=c(D,"fullscreenTarget",null,_),this.minWidth=c(D,"min.width",0,_),this.maxWidth=c(D,"max.width",0,_),this.minHeight=c(D,"min.height",0,_),this.maxHeight=c(D,"max.height",0,_),this.snapWidth=c(D,"snap.width",0,_),this.snapHeight=c(D,"snap.height",0,_),this.renderType=c(_,"type",T.AUTO),this.canvas=c(_,"canvas",null),this.context=c(_,"context",null),this.canvasStyle=c(_,"canvasStyle",null),this.customEnvironment=c(_,"customEnvironment",!1),this.sceneConfig=c(_,"scene",null),this.seed=c(_,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=c(_,"title",""),this.gameURL=c(_,"url","https://phaser.io/"+T.LOG_VERSION),this.gameVersion=c(_,"version",""),this.autoFocus=c(_,"autoFocus",!0),this.stableSort=c(_,"stableSort",-1),-1===this.stableSort&&(this.stableSort=f.browser.es2019?1:0),f.features.stableSort=this.stableSort,this.domCreateContainer=c(_,"dom.createContainer",!1),this.domPointerEvents=c(_,"dom.pointerEvents","none"),this.inputKeyboard=c(_,"input.keyboard",!0),this.inputKeyboardEventTarget=c(_,"input.keyboard.target",window),this.inputKeyboardCapture=c(_,"input.keyboard.capture",[]),this.inputMouse=c(_,"input.mouse",!0),this.inputMouseEventTarget=c(_,"input.mouse.target",null),this.inputMousePreventDefaultDown=c(_,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=c(_,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=c(_,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=c(_,"input.mouse.preventDefaultWheel",!0),this.inputTouch=c(_,"input.touch",f.input.touch),this.inputTouchEventTarget=c(_,"input.touch.target",null),this.inputTouchCapture=c(_,"input.touch.capture",!0),this.inputActivePointers=c(_,"input.activePointers",1),this.inputSmoothFactor=c(_,"input.smoothFactor",0),this.inputWindowEvents=c(_,"input.windowEvents",!0),this.inputGamepad=c(_,"input.gamepad",!1),this.inputGamepadEventTarget=c(_,"input.gamepad.target",window),this.disableContextMenu=c(_,"disableContextMenu",!1),this.audio=c(_,"audio",{}),this.hideBanner=!1===c(_,"banner",null),this.hidePhaser=c(_,"banner.hidePhaser",!1),this.bannerTextColor=c(_,"banner.text","#ffffff"),this.bannerBackgroundColor=c(_,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=c(_,"fps",null),this.disablePreFX=c(_,"disablePreFX",!1),this.disablePostFX=c(_,"disablePostFX",!1);var I=c(_,"render",null);this.pipeline=c(I,"pipeline",null,_),this.autoMobilePipeline=c(I,"autoMobilePipeline",!0,_),this.defaultPipeline=c(I,"defaultPipeline",p.MULTI_PIPELINE,_),this.antialias=c(I,"antialias",!0,_),this.antialiasGL=c(I,"antialiasGL",!0,_),this.mipmapFilter=c(I,"mipmapFilter","",_),this.desynchronized=c(I,"desynchronized",!1,_),this.roundPixels=c(I,"roundPixels",!1,_),this.pixelArt=c(I,"pixelArt",1!==this.zoom,_),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=c(I,"transparent",!1,_),this.clearBeforeRender=c(I,"clearBeforeRender",!0,_),this.preserveDrawingBuffer=c(I,"preserveDrawingBuffer",!1,_),this.premultipliedAlpha=c(I,"premultipliedAlpha",!0,_),this.failIfMajorPerformanceCaveat=c(I,"failIfMajorPerformanceCaveat",!1,_),this.powerPreference=c(I,"powerPreference","default",_),this.batchSize=c(I,"batchSize",4096,_),this.maxTextures=c(I,"maxTextures",-1,_),this.maxLights=c(I,"maxLights",10,_);var R=c(_,"backgroundColor",0);this.backgroundColor=v(R),this.transparent&&(this.backgroundColor=v(0),this.backgroundColor.alpha=0),this.preBoot=c(_,"callbacks.preBoot",m),this.postBoot=c(_,"callbacks.postBoot",m),this.physics=c(_,"physics",{}),this.defaultPhysicsSystem=c(this.physics,"default",!1),this.loaderBaseURL=c(_,"loader.baseURL",""),this.loaderPath=c(_,"loader.path",""),this.loaderMaxParallelDownloads=c(_,"loader.maxParallelDownloads",f.os.android?6:32),this.loaderCrossOrigin=c(_,"loader.crossOrigin",void 0),this.loaderResponseType=c(_,"loader.responseType",""),this.loaderAsync=c(_,"loader.async",!0),this.loaderUser=c(_,"loader.user",""),this.loaderPassword=c(_,"loader.password",""),this.loaderTimeout=c(_,"loader.timeout",0),this.loaderMaxRetries=c(_,"loader.maxRetries",2),this.loaderWithCredentials=c(_,"loader.withCredentials",!1),this.loaderImageLoadType=c(_,"loader.imageLoadType","XHR"),this.loaderLocalScheme=c(_,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=c(_,"fx.glow.quality",.1),this.glowFXDistance=c(_,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var F=c(_,"plugins",null),N=g.DefaultScene;F&&(Array.isArray(F)?this.defaultPlugins=F:u(F)&&(this.installGlobalPlugins=h(F,"global",[]),this.installScenePlugins=h(F,"scene",[]),Array.isArray(F.default)?N=F.default:Array.isArray(F.defaultMerge)&&(N=N.concat(F.defaultMerge)))),this.defaultPlugins=N;var V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=c(_,"images.default",V+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=c(_,"images.missing",V+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=c(_,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=T.WEBGL:window.FORCE_CANVAS&&(this.renderType=T.CANVAS))}});S.exports=x},86054:(S,k,a)=>{var b=a(20623),T=a(27919),g=a(8054),f=a(89357);S.exports=function(c){var u=c.config;if((u.customEnvironment||u.canvas)&&u.renderType===g.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!u.customEnvironment&&!u.canvas&&u.renderType!==g.HEADLESS)if(u.renderType===g.AUTO&&(u.renderType=f.webGL?g.WEBGL:g.CANVAS),u.renderType===g.WEBGL){if(!f.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(u.renderType!==g.CANVAS)throw new Error("Unknown value for renderer type: "+u.renderType);if(!f.canvas)throw new Error("Cannot create Canvas context, aborting.")}u.antialias||T.disableSmoothing();var v,x,m=c.scale.baseSize,d=m.width,p=m.height;u.canvas?(c.canvas=u.canvas,c.canvas.width=d,c.canvas.height=p):c.canvas=T.create(c,d,p,u.renderType),u.canvasStyle&&(c.canvas.style=u.canvasStyle),u.antialias||b.setCrisp(c.canvas),u.renderType!==g.HEADLESS&&(v=a(68627),x=a(74797),u.renderType===g.WEBGL?c.renderer=new x(c):(c.renderer=new v(c),c.context=c.renderer.gameContext))}},96391:(S,k,a)=>{var b=a(8054);S.exports=function(g){var f=g.config;if(!f.hideBanner){var h="WebGL";f.renderType===b.CANVAS?h="Canvas":f.renderType===b.HEADLESS&&(h="Headless");var m,c=f.audio,u=g.device.audio;if(m=u.webAudio&&!c.disableWebAudio?"Web Audio":c.noAudio||!u.webAudio&&!u.audioData?"No Audio":"HTML5 Audio",g.device.browser.ie)window.console&&console.log("Phaser v"+b.VERSION+" / https://phaser.io");else{var v,d="",p=[d];Array.isArray(f.bannerBackgroundColor)?(f.bannerBackgroundColor.forEach(function(y){d=d.concat("%c "),p.push("background: "+y),v=y}),p[p.length-1]="color: "+f.bannerTextColor+"; background: "+v):(d=d.concat("%c "),p.push("color: "+f.bannerTextColor+"; background: "+f.bannerBackgroundColor)),p.push("background: transparent"),f.gameTitle&&(d=d.concat(f.gameTitle),f.gameVersion&&(d=d.concat(" v"+f.gameVersion)),f.hidePhaser||(d=d.concat(" / "))),f.hidePhaser||(d=d.concat("Phaser v"+b.VERSION+" ("+h+" | "+m+")")),d=d.concat(" %c "+f.gameURL),p[0]=d,console.log.apply(console,p)}}}},50127:(S,k,a)=>{var b=a(40366),T=a(60848),g=a(24047),f=a(27919),h=a(83419),c=a(69547),u=a(83719),m=a(86054),d=a(45893),p=a(96391),v=a(82264),x=a(57264),y=a(50792),_=a(8443),E=a(7003),A=a(37277),D=a(77332),I=a(76531),R=a(60903),F=a(69442),N=a(17130),V=a(65898),B=a(51085),H=a(14747),G=new h({initialize:function(q){this.config=new c(q),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new y,this.anims=new T(this),this.textures=new N(this),this.cache=new g(this),this.registry=new d(this,new y),this.input=new E(this,this.config),this.scene=new R(this,this.config.sceneConfig),this.device=v,this.scale=new I(this,this.config),this.sound=null,this.sound=H.create(this),this.loop=new V(this,this.config.fps),this.plugins=new D(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,x(this.boot.bind(this))},boot:function(){A.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),m(this),u(this),p(this),b(this.canvas,this.config.parent),this.textures.once(F.READY,this.texturesReady,this),this.events.emit(_.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(_.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.loop.start(this.renderer?this.step.bind(this):this.headlessStep.bind(this)),B(this);var K=this.events;K.on(_.HIDDEN,this.onHidden,this),K.on(_.VISIBLE,this.onVisible,this),K.on(_.BLUR,this.onBlur,this),K.on(_.FOCUS,this.onFocus,this)},step:function(K,q){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var at=this.events;at.emit(_.PRE_STEP,K,q),at.emit(_.STEP,K,q),this.scene.update(K,q),at.emit(_.POST_STEP,K,q);var ot=this.renderer;ot.preRender(),at.emit(_.PRE_RENDER,ot,K,q),this.scene.render(ot),ot.postRender(),at.emit(_.POST_RENDER,ot,K,q)}},headlessStep:function(K,q){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var at=this.events;at.emit(_.PRE_STEP,K,q),at.emit(_.STEP,K,q),this.scene.update(K,q),at.emit(_.POST_STEP,K,q),this.scene.isProcessing=!1,at.emit(_.PRE_RENDER,null,K,q),at.emit(_.POST_RENDER,null,K,q)}},onHidden:function(){this.loop.pause(),this.events.emit(_.PAUSE)},pause:function(){var K=this.isPaused;this.isPaused=!0,K||this.events.emit(_.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(_.RESUME,this.loop.pauseDuration)},resume:function(){var K=this.isPaused;this.isPaused=!1,K&&this.events.emit(_.RESUME,0)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(K,q){void 0===q&&(q=!1),this.pendingDestroy=!0,this.removeCanvas=K,this.noReturn=q},runDestroy:function(){this.scene.destroy(),this.events.emit(_.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(f.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});S.exports=G},65898:(S,k,a)=>{var b=a(83419),T=a(35154),g=a(29747),f=a(43092),h=new b({initialize:function(u,m){this.game=u,this.raf=new f,this.started=!1,this.running=!1,this.minFps=T(m,"min",5),this.targetFps=T(m,"target",60),this.fpsLimit=T(m,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=g,this.forceSetTimeOut=T(m,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=T(m,"deltaHistory",10),this.panicMax=T(m,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=T(m,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var c=window.performance.now();this.time=c,this.lastTime=c,this.nextFpsUpdate=c+1e3,this.framesThisSecond=0;for(var u=0;u0||!this.inFocus)&&(this._coolDown--,c=Math.min(c,this._target)),c>this._min&&(c=m[u],c=Math.min(c,this._min)),m[u]=c,this.deltaIndex++,this.deltaIndex>=d&&(this.deltaIndex=0);for(var p=0,v=0;v=this.nextFpsUpdate&&this.updateFPS(c),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(c,this.delta),this.delta=0),this.lastTime=c,this.frame++},step:function(c){this.now=c;var u=Math.max(0,c-this.lastTime);this.rawDelta=u,this.time+=this.rawDelta,this.smoothStep&&(u=this.smoothDelta(u)),this.delta=u,c>=this.nextFpsUpdate&&this.updateFPS(c),this.framesThisSecond++,this.callback(c,u),this.lastTime=c,this.frame++},tick:function(){var c=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(c):this.step(c)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(c){void 0===c&&(c=!1);var u=window.performance.now();if(!this.running){c&&(this.startTime+=-this.lastTime+(this.lastTime+u));var m=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(m,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=u+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});S.exports=h},51085:(S,k,a)=>{var b=a(8443);S.exports=function(g){var f,h=g.events;void 0!==document.hidden?f="visibilitychange":["webkit","moz","ms"].forEach(function(m){void 0!==document[m+"Hidden"]&&(document.hidden=function(){return document[m+"Hidden"]},f=m+"visibilitychange")}),f&&document.addEventListener(f,function(m){document.hidden||"pause"===m.type?h.emit(b.HIDDEN):h.emit(b.VISIBLE)},!1),window.onblur=function(){h.emit(b.BLUR)},window.onfocus=function(){h.emit(b.FOCUS)},window.focus&&g.config.autoFocus&&window.focus()}},97217:S=>{S.exports="blur"},47548:S=>{S.exports="boot"},19814:S=>{S.exports="contextlost"},68446:S=>{S.exports="destroy"},41700:S=>{S.exports="focus"},25432:S=>{S.exports="hidden"},65942:S=>{S.exports="pause"},59211:S=>{S.exports="postrender"},47789:S=>{S.exports="poststep"},39066:S=>{S.exports="prerender"},460:S=>{S.exports="prestep"},16175:S=>{S.exports="ready"},42331:S=>{S.exports="resume"},11966:S=>{S.exports="step"},32969:S=>{S.exports="systemready"},94830:S=>{S.exports="visible"},8443:(S,k,a)=>{S.exports={BLUR:a(97217),BOOT:a(47548),CONTEXT_LOST:a(19814),DESTROY:a(68446),FOCUS:a(41700),HIDDEN:a(25432),PAUSE:a(65942),POST_RENDER:a(59211),POST_STEP:a(47789),PRE_RENDER:a(39066),PRE_STEP:a(460),READY:a(16175),RESUME:a(42331),STEP:a(11966),SYSTEM_READY:a(32969),VISIBLE:a(94830)}},42857:(S,k,a)=>{S.exports={Config:a(69547),CreateRenderer:a(86054),DebugHeader:a(96391),Events:a(8443),TimeStep:a(65898),VisibilityHandler:a(51085)}},99584:(S,k,a)=>{var b=a(5290),T=a(27919),g=a(35154);S.exports=function(h){var c=g(h,"data",[]),u=g(h,"canvas",null),m=g(h,"palette",b),d=g(h,"pixelWidth",1),p=g(h,"pixelHeight",d),v=g(h,"resizeCanvas",!0),x=g(h,"clearCanvas",!0),y=g(h,"preRender",null),_=g(h,"postRender",null),E=Math.floor(Math.abs(c[0].length*d)),A=Math.floor(Math.abs(c.length*p));u||(u=T.create2D(this,E,A),v=!1,x=!1),v&&(u.width=E,u.height=A);var D=u.getContext("2d",{willReadFrequently:!0});x&&D.clearRect(0,0,E,A),y&&y(u,D);for(var I=0;I{S.exports={GenerateTexture:a(99584),Palettes:a(57763)}},5290:S=>{S.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:S=>{S.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:S=>{S.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:S=>{S.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:S=>{S.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(S,k,a)=>{S.exports={ARNE16:a(5290),C64:a(23816),CGA:a(9866),JMP:a(77552),MSX:a(92259)}},46728:(S,k,a)=>{var b=a(83419),T=a(36316),g=a(80021),f=a(26099),h=new b({Extends:g,initialize:function(u,m,d,p){g.call(this,"CubicBezierCurve"),Array.isArray(u)&&(p=new f(u[6],u[7]),d=new f(u[4],u[5]),m=new f(u[2],u[3]),u=new f(u[0],u[1])),this.p0=u,this.p1=m,this.p2=d,this.p3=p},getStartPoint:function(c){return void 0===c&&(c=new f),c.copy(this.p0)},getResolution:function(c){return c},getPoint:function(c,u){void 0===u&&(u=new f);var m=this.p0,d=this.p1,p=this.p2,v=this.p3;return u.set(T(c,m.x,d.x,p.x,v.x),T(c,m.y,d.y,p.y,v.y))},draw:function(c,u){void 0===u&&(u=32);var m=this.getPoints(u);c.beginPath(),c.moveTo(this.p0.x,this.p0.y);for(var d=1;d{var b=a(83419),T=a(19217),g=a(87841),f=a(26099),h=new b({initialize:function(u){this.type=u,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new f,this._tmpVec2B=new f},draw:function(c,u){return void 0===u&&(u=32),c.strokePoints(this.getPoints(u))},getBounds:function(c,u){c||(c=new g),void 0===u&&(u=16);var m=this.getLength();u>m&&(u=m/2);var d=Math.max(1,Math.round(m/u));return T(this.getSpacedPoints(d),c)},getDistancePoints:function(c){var u=this.getLength(),m=Math.max(1,u/c);return this.getSpacedPoints(m)},getEndPoint:function(c){return void 0===c&&(c=new f),this.getPointAt(1,c)},getLength:function(){var c=this.getLengths();return c[c.length-1]},getLengths:function(c){if(void 0===c&&(c=this.arcLengthDivisions),this.cacheArcLengths.length===c+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var m,u=[],d=this.getPoint(0,this._tmpVec2A),p=0;u.push(0);for(var v=1;v<=c;v++)p+=(m=this.getPoint(v/c,this._tmpVec2B)).distance(d),u.push(p),d.copy(m);return this.cacheArcLengths=u,u},getPointAt:function(c,u){var m=this.getUtoTmapping(c);return this.getPoint(m,u)},getPoints:function(c,u,m){void 0===m&&(m=[]),c||(c=u?this.getLength()/u:this.defaultDivisions);for(var d=0;d<=c;d++)m.push(this.getPoint(d/c));return m},getRandomPoint:function(c){return void 0===c&&(c=new f),this.getPoint(Math.random(),c)},getSpacedPoints:function(c,u,m){void 0===m&&(m=[]),c||(c=u?this.getLength()/u:this.defaultDivisions);for(var d=0;d<=c;d++){var p=this.getUtoTmapping(d/c,null,c);m.push(this.getPoint(p))}return m},getStartPoint:function(c){return void 0===c&&(c=new f),this.getPointAt(0,c)},getTangent:function(c,u){void 0===u&&(u=new f);var m=1e-4,d=c-m,p=c+m;return d<0&&(d=0),p>1&&(p=1),this.getPoint(d,this._tmpVec2A),this.getPoint(p,u),u.subtract(this._tmpVec2A).normalize()},getTangentAt:function(c,u){var m=this.getUtoTmapping(c);return this.getTangent(m,u)},getTFromDistance:function(c,u){return c<=0?0:this.getUtoTmapping(0,c,u)},getUtoTmapping:function(c,u,m){var x,d=this.getLengths(m),p=0,v=d.length;x=u?Math.min(u,d[v-1]):c*d[v-1];for(var E,y=0,_=v-1;y<=_;)if((E=d[p=Math.floor(y+(_-y)/2)]-x)<0)y=p+1;else{if(!(E>0)){_=p;break}_=p-1}if(d[p=_]===x)return p/(v-1);var A=d[p];return(p+(x-A)/(d[p+1]-A))/(v-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});S.exports=h},73825:(S,k,a)=>{var b=a(83419),T=a(80021),g=a(39506),f=a(35154),h=a(43396),c=a(26099),u=new b({Extends:T,initialize:function(d,p,v,x,y,_,E,A){if("object"==typeof d){var D=d;d=f(D,"x",0),p=f(D,"y",0),v=f(D,"xRadius",0),x=f(D,"yRadius",v),y=f(D,"startAngle",0),_=f(D,"endAngle",360),E=f(D,"clockwise",!1),A=f(D,"rotation",0)}else void 0===x&&(x=v),void 0===y&&(y=0),void 0===_&&(_=360),void 0===E&&(E=!1),void 0===A&&(A=0);T.call(this,"EllipseCurve"),this.p0=new c(d,p),this._xRadius=v,this._yRadius=x,this._startAngle=g(y),this._endAngle=g(_),this._clockwise=E,this._rotation=g(A)},getStartPoint:function(m){return void 0===m&&(m=new c),this.getPoint(0,m)},getResolution:function(m){return 2*m},getPoint:function(m,d){void 0===d&&(d=new c);for(var p=2*Math.PI,v=this._endAngle-this._startAngle,x=Math.abs(v)p;)v-=p;v{var b=a(83419),T=a(80021),g=a(19217),f=a(87841),h=a(26099),c=new b({Extends:T,initialize:function(m,d){T.call(this,"LineCurve"),Array.isArray(m)&&(d=new h(m[2],m[3]),m=new h(m[0],m[1])),this.p0=m,this.p1=d,this.arcLengthDivisions=1},getBounds:function(u){return void 0===u&&(u=new f),g([this.p0,this.p1],u)},getStartPoint:function(u){return void 0===u&&(u=new h),u.copy(this.p0)},getResolution:function(u){return void 0===u&&(u=1),u},getPoint:function(u,m){return void 0===m&&(m=new h),1===u?m.copy(this.p1):(m.copy(this.p1).subtract(this.p0).scale(u).add(this.p0),m)},getPointAt:function(u,m){return this.getPoint(u,m)},getTangent:function(u,m){return void 0===m&&(m=new h),m.copy(this.p1).subtract(this.p0).normalize(),m},getUtoTmapping:function(u,m,d){var p;if(m){var v=this.getLengths(d),x=v[v.length-1];p=Math.min(m,x)/x}else p=u;return p},draw:function(u){return u.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),u},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});c.fromJSON=function(u){var m=u.points,d=new h(m[0],m[1]),p=new h(m[2],m[3]);return new c(d,p)},S.exports=c},14744:(S,k,a)=>{var b=a(83419),T=a(80021),g=a(32112),f=a(26099),h=new b({Extends:T,initialize:function(u,m,d){T.call(this,"QuadraticBezierCurve"),Array.isArray(u)&&(d=new f(u[4],u[5]),m=new f(u[2],u[3]),u=new f(u[0],u[1])),this.p0=u,this.p1=m,this.p2=d},getStartPoint:function(c){return void 0===c&&(c=new f),c.copy(this.p0)},getResolution:function(c){return c},getPoint:function(c,u){void 0===u&&(u=new f);var m=this.p0,d=this.p1,p=this.p2;return u.set(g(c,m.x,d.x,p.x),g(c,m.y,d.y,p.y))},draw:function(c,u){void 0===u&&(u=32);var m=this.getPoints(u);c.beginPath(),c.moveTo(this.p0.x,this.p0.y);for(var d=1;d{var b=a(87842),T=a(83419),g=a(80021),f=a(26099),h=new T({Extends:g,initialize:function(u){void 0===u&&(u=[]),g.call(this,"SplineCurve"),this.points=[],this.addPoints(u)},addPoints:function(c){for(var u=0;um.length-2?m.length-1:p+1],E=m[p>m.length-3?m.length-1:p+2];return u.set(b(v,x.x,y.x,_.x,E.x),b(v,x.y,y.y,_.y,E.y))},toJSON:function(){for(var c=[],u=0;u{S.exports={Path:a(46669),MoveTo:a(68618),CubicBezier:a(46728),Curve:a(80021),Ellipse:a(73825),Line:a(33951),QuadraticBezier:a(14744),Spline:a(42534)}},68618:(S,k,a)=>{var b=a(83419),T=a(26099),g=new b({initialize:function(h,c){this.active=!1,this.p0=new T(h,c)},getPoint:function(f,h){return void 0===h&&(h=new T),h.copy(this.p0)},getPointAt:function(f,h){return this.getPoint(f,h)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});S.exports=g},46669:(S,k,a)=>{var b=a(83419),T=a(46728),g=a(73825),f=a(39429),h=a(33951),c=a(68618),u=a(14744),m=a(87841),d=a(42534),p=a(26099),v=a(36383),x=new b({initialize:function(_,E){void 0===_&&(_=0),void 0===E&&(E=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new p,this._tmpVec2A=new p,this._tmpVec2B=new p,"object"==typeof _?this.fromJSON(_):this.startPoint.set(_,E)},add:function(y){return this.curves.push(y),this},circleTo:function(y,_,E){return void 0===_&&(_=!1),this.ellipseTo(y,y,0,360,_,E)},closePath:function(){var y=this.curves[0].getPoint(0),_=this.curves[this.curves.length-1].getPoint(1);return y.equals(_)||this.curves.push(new h(_,y)),this},cubicBezierTo:function(y,_,E,A,D,I){var F,N,V,R=this.getEndPoint();return y instanceof p?(F=y,N=_,V=E):(F=new p(E,A),N=new p(D,I),V=new p(y,_)),this.add(new T(R,F,N,V))},quadraticBezierTo:function(y,_,E,A){var I,R,D=this.getEndPoint();return y instanceof p?(I=y,R=_):(I=new p(E,A),R=new p(y,_)),this.add(new u(D,I,R))},draw:function(y,_){for(var E=0;E=_)return this.curves[A];A++}return null},getEndPoint:function(y){return void 0===y&&(y=new p),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,y):y.copy(this.startPoint),y},getLength:function(){var y=this.getCurveLengths();return y[y.length-1]},getPoint:function(y,_){void 0===_&&(_=new p);for(var E=y*this.getLength(),A=this.getCurveLengths(),D=0;D=E){var I=A[D]-E,R=this.curves[D],F=R.getLength();return R.getPointAt(0===F?0:1-I/F,_)}D++}return null},getPoints:function(y,_){!y&&!_&&(y=this.defaultDivisions);for(var A,E=[],D=0;D1&&!E[E.length-1].equals(E[0])&&E.push(E[0]),E},getRandomPoint:function(y){return void 0===y&&(y=new p),this.getPoint(Math.random(),y)},getSpacedPoints:function(y){void 0===y&&(y=40);for(var _=[],E=0;E<=y;E++)_.push(this.getPoint(E/y));return this.autoClose&&_.push(_[0]),_},getStartPoint:function(y){return void 0===y&&(y=new p),y.copy(this.startPoint)},getTangent:function(y,_){void 0===_&&(_=new p);for(var E=y*this.getLength(),A=this.getCurveLengths(),D=0;D=E){var I=A[D]-E,R=this.curves[D],F=R.getLength();return R.getTangentAt(0===F?0:1-I/F,_)}D++}return null},lineTo:function(y,_){y instanceof p?this._tmpVec2B.copy(y):"object"==typeof y?this._tmpVec2B.setFromObject(y):this._tmpVec2B.set(y,_);var E=this.getEndPoint(this._tmpVec2A);return this.add(new h([E.x,E.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(y){return y.unshift(this.getEndPoint()),this.add(new d(y))},moveTo:function(y,_){return this.add(y instanceof p?new c(y.x,y.y):new c(y,_))},toJSON:function(){for(var y=[],_=0;_{var b=a(83419),T=a(24882),g=new b({initialize:function(h,c){this.parent=h,this.events=c,c||(this.events=h.events?h.events:h),this.list={},this.values={},this._frozen=!1,!h.hasOwnProperty("sys")&&this.events&&this.events.once(T.DESTROY,this.destroy,this)},get:function(f){var h=this.list;if(Array.isArray(f)){for(var c=[],u=0;u{var b=a(83419),T=a(45893),g=a(37277),f=a(44594),h=new b({Extends:T,initialize:function(u){T.call(this,u,u.sys.events),this.scene=u,this.systems=u.sys,u.sys.events.once(f.BOOT,this.boot,this),u.sys.events.on(f.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(f.DESTROY,this.destroy,this)},start:function(){this.events.once(f.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(f.SHUTDOWN,this.shutdown,this)},destroy:function(){T.prototype.destroy.call(this),this.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});g.register("DataManagerPlugin",h,"data"),S.exports=h},10700:S=>{S.exports="changedata"},93608:S=>{S.exports="changedata-"},60883:S=>{S.exports="destroy"},69780:S=>{S.exports="removedata"},22166:S=>{S.exports="setdata"},24882:(S,k,a)=>{S.exports={CHANGE_DATA:a(10700),CHANGE_DATA_KEY:a(93608),DESTROY:a(60883),REMOVE_DATA:a(69780),SET_DATA:a(22166)}},44965:(S,k,a)=>{S.exports={DataManager:a(45893),DataManagerPlugin:a(63646),Events:a(24882)}},7098:(S,k,a)=>{var b=a(84148),T={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};S.exports=function g(){if("function"==typeof importScripts)return T;T.audioData=!!window.Audio,T.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var f=document.createElement("audio"),h=!!f.canPlayType;try{if(h){var c=function(d,p){var v=f.canPlayType("audio/"+d).replace(/^no$/,"");return p?!(!v&&!f.canPlayType("audio/"+p).replace(/^no$/,"")):!!v};if(T.ogg=c('ogg; codecs="vorbis"'),T.opus=c('ogg; codecs="opus"',"opus"),T.mp3=c("mpeg"),T.wav=c("wav"),T.m4a=c("x-m4a"),T.aac=c("aac"),T.flac=c("flac","x-flac"),T.webm=c('webm; codecs="vorbis"'),""!==f.canPlayType('audio/mp4; codecs="ec-3"'))if(b.edge)T.dolby=!0;else if(b.safari&&b.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var u=parseInt(RegExp.$1,10),m=parseInt(RegExp.$2,10);(10===u&&m>=11||u>10)&&(T.dolby=!0)}}}catch{}return T}()},84148:(S,k,a)=>{var b=a(25892),T={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};S.exports=function g(){var f=navigator.userAgent;return/Edg\/\d+/.test(f)?(T.edge=!0,T.es2019=!0):/OPR/.test(f)?(T.opera=!0,T.es2019=!0):/Chrome\/(\d+)/.test(f)&&!b.windowsPhone?(T.chrome=!0,T.chromeVersion=parseInt(RegExp.$1,10),T.es2019=T.chromeVersion>69):/Firefox\D+(\d+)/.test(f)?(T.firefox=!0,T.firefoxVersion=parseInt(RegExp.$1,10),T.es2019=T.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(f)&&b.iOS?(T.mobileSafari=!0,T.es2019=!0):/MSIE (\d+\.\d+);/.test(f)?(T.ie=!0,T.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(f)&&!b.windowsPhone?(T.safari=!0,T.safariVersion=parseInt(RegExp.$1,10),T.es2019=T.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(f)&&(T.ie=!0,T.trident=!0,T.tridentVersion=parseInt(RegExp.$1,10),T.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(f)&&(T.silk=!0),T}()},89289:(S,k,a)=>{var b=a(27919),T={supportInverseAlpha:!1,supportNewBlendModes:!1};S.exports=function h(){return"function"!=typeof importScripts&&void 0!==document&&(T.supportNewBlendModes=function g(){var c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",u="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",m=new Image;return m.onload=function(){var d=new Image;d.onload=function(){var v=b.create2D(d,6).getContext("2d",{willReadFrequently:!0});if(v.globalCompositeOperation="multiply",v.drawImage(m,0,0),v.drawImage(d,2,0),!v.getImageData(2,0,1,1))return!1;var x=v.getImageData(2,0,1,1).data;b.remove(d),T.supportNewBlendModes=255===x[0]&&0===x[1]&&0===x[2]},d.src=c+"/wCKxvRF"+u},m.src=c+"AP804Oa6"+u,!1}(),T.supportInverseAlpha=function f(){var u=b.create2D(this,2).getContext("2d",{willReadFrequently:!0});u.fillStyle="rgba(10, 20, 30, 0.5)",u.fillRect(0,0,1,1);var m=u.getImageData(0,0,1,1);if(null===m)return!1;u.putImageData(m,1,0);var d=u.getImageData(1,0,1,1),p=d.data[0]===m.data[0]&&d.data[1]===m.data[1]&&d.data[2]===m.data[2]&&d.data[3]===m.data[3];return b.remove(this),p}()),T}()},89357:(S,k,a)=>{var b=a(25892),T=a(84148),g=a(27919),f={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};S.exports=function c(){if("function"==typeof importScripts)return f;f.canvas=!!window.CanvasRenderingContext2D;try{f.localStorage=!!localStorage.getItem}catch{f.localStorage=!1}f.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),f.fileSystem=!!window.requestFileSystem;var u=!1;return f.webGL=function(){if(window.WebGLRenderingContext)try{var d=g.createWebGL(this),p=d.getContext("webgl")||d.getContext("experimental-webgl"),v=g.create2D(this),y=v.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return u=y.data instanceof Uint8ClampedArray,g.remove(d),g.remove(v),!!p}catch{return!1}return!1}(),f.worker=!!window.Worker,f.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,f.getUserMedia=f.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,T.firefox&&T.firefoxVersion<21&&(f.getUserMedia=!1),!b.iOS&&(T.ie||T.firefox||T.chrome)&&(f.canvasBitBltShift=!0),(T.safari||T.mobileSafari)&&(f.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(f.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(f.littleEndian=function h(){var u=new ArrayBuffer(4),m=new Uint8Array(u),d=new Uint32Array(u);return m[0]=161,m[1]=178,m[2]=195,m[3]=212,3569595041===d[0]||2712847316!==d[0]&&null}()),f.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&null!==f.littleEndian&&u,f}()},91639:S=>{var k={available:!1,cancel:"",keyboard:!1,request:""};S.exports=function a(){if("function"==typeof importScripts)return k;var b,T="Fullscreen",g="FullScreen",f=["request"+T,"request"+g,"webkitRequest"+T,"webkitRequest"+g,"msRequest"+T,"msRequest"+g,"mozRequest"+g,"mozRequest"+T];for(b=0;b{var b=a(84148),T={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};S.exports=function g(){return"function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(T.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(T.mspointer=!0),navigator.getGamepads&&(T.gamepads=!0),"onwheel"in window||b.ie&&"WheelEvent"in window?T.wheelEvent="wheel":"onmousewheel"in window?T.wheelEvent="mousewheel":b.firefox&&"MouseScrollEvent"in window&&(T.wheelEvent="DOMMouseScroll")),T}()},25892:S=>{var k={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};S.exports=function a(){if("function"==typeof importScripts)return k;var b=navigator.userAgent;/Windows/.test(b)?k.windows=!0:/Mac OS/.test(b)&&!/like Mac OS/.test(b)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(k.iOS=!0,k.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),k.iOSVersion=parseInt(RegExp.$1,10)):k.macOS=!0:/Android/.test(b)?k.android=!0:/Linux/.test(b)?k.linux=!0:/iP[ao]d|iPhone/i.test(b)?(k.iOS=!0,navigator.appVersion.match(/OS (\d+)/),k.iOSVersion=parseInt(RegExp.$1,10),k.iPhone=-1!==b.toLowerCase().indexOf("iphone"),k.iPad=-1!==b.toLowerCase().indexOf("ipad")):/Kindle/.test(b)||/\bKF[A-Z][A-Z]+/.test(b)||/Silk.*Mobile Safari/.test(b)?k.kindle=!0:/CrOS/.test(b)&&(k.chromeOS=!0),(/Windows Phone/i.test(b)||/IEMobile/i.test(b))&&(k.android=!1,k.iOS=!1,k.macOS=!1,k.windows=!0,k.windowsPhone=!0);var T=/Silk/.test(b);return(k.windows||k.macOS||k.linux&&!T||k.chromeOS)&&(k.desktop=!0),(k.windowsPhone||/Windows NT/i.test(b)&&/Touch/i.test(b))&&(k.desktop=!1),navigator.standalone&&(k.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(k.cordova=!0),void 0!==window.ejecta&&(k.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(k.node=!0),k.node&&"object"==typeof process.versions&&(k.nodeWebkit=!!process.versions["node-webkit"],k.electron=!!process.versions.electron),/Crosswalk/.test(b)&&(k.crosswalk=!0),k.pixelRatio=window.devicePixelRatio||1,k}()},43267:(S,k,a)=>{var b=a(95540),T={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};S.exports=function g(){if("function"==typeof importScripts)return T;var f=document.createElement("video"),h=!!f.canPlayType,c=/^no$/;try{h&&(f.canPlayType('video/ogg; codecs="theora"').replace(c,"")&&(T.ogg=!0),f.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(c,"")&&(T.h264=!0,T.mp4=!0),f.canPlayType("video/x-m4v").replace(c,"")&&(T.m4v=!0),f.canPlayType('video/webm; codecs="vp8, vorbis"').replace(c,"")&&(T.webm=!0),f.canPlayType('video/webm; codecs="vp9"').replace(c,"")&&(T.vp9=!0),f.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(c,"")&&(T.hls=!0))}catch{}return f.parentNode&&f.parentNode.removeChild(f),T.getVideoURL=function(u){Array.isArray(u)||(u=[u]);for(var m=0;m{S.exports={os:a(25892),browser:a(84148),features:a(89357),input:a(31784),audio:a(7098),video:a(43267),fullscreen:a(91639),canvasFeatures:a(89289)}},89422:(S,k,a)=>{var b=a(83419),T=new Float32Array(20),g=new b({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(f){return this._matrix.set(f),this._dirty=!0,this},reset:function(){var f=this._matrix;return f.fill(0),f[0]=1,f[6]=1,f[12]=1,f[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var f=this._data;return this._dirty&&(f.set(this._matrix),f[4]/=255,f[9]/=255,f[14]/=255,f[19]/=255,this._dirty=!1),f},brightness:function(f,h){return void 0===f&&(f=0),void 0===h&&(h=!1),this.multiply([f,0,0,0,0,0,f,0,0,0,0,0,f,0,0,0,0,0,1,0],h)},saturate:function(f,h){void 0===f&&(f=0),void 0===h&&(h=!1);var c=2*f/3+1,u=-.5*(c-1);return this.multiply([c,u,u,0,0,u,c,u,0,0,u,u,c,0,0,0,0,0,1,0],h)},desaturate:function(f){return void 0===f&&(f=!1),this.saturate(-1,f)},hue:function(f,h){void 0===f&&(f=0),void 0===h&&(h=!1),f=f/180*Math.PI;var c=Math.cos(f),u=Math.sin(f),m=.213,d=.715,p=.072;return this.multiply([m+c*(1-m)+u*-m,d+c*-d+u*-d,p+c*-p+u*(1-p),0,0,m+c*-m+.143*u,d+c*(1-d)+.14*u,p+c*-p+-.283*u,0,0,m+c*-m+-.787*u,d+c*-d+u*d,p+c*(1-p)+u*p,0,0,0,0,0,1,0],h)},grayscale:function(f,h){return void 0===f&&(f=1),void 0===h&&(h=!1),this.saturate(-f,h)},blackWhite:function(f){return void 0===f&&(f=!1),this.multiply(g.BLACK_WHITE,f)},contrast:function(f,h){void 0===f&&(f=0),void 0===h&&(h=!1);var c=f+1,u=-.5*(c-1);return this.multiply([c,0,0,0,u,0,c,0,0,u,0,0,c,0,u,0,0,0,1,0],h)},negative:function(f){return void 0===f&&(f=!1),this.multiply(g.NEGATIVE,f)},desaturateLuminance:function(f){return void 0===f&&(f=!1),this.multiply(g.DESATURATE_LUMINANCE,f)},sepia:function(f){return void 0===f&&(f=!1),this.multiply(g.SEPIA,f)},night:function(f,h){return void 0===f&&(f=.1),void 0===h&&(h=!1),this.multiply([-2*f,-f,0,0,0,-f,0,f,0,0,0,f,2*f,0,0,0,0,0,1,0],h)},lsd:function(f){return void 0===f&&(f=!1),this.multiply(g.LSD,f)},brown:function(f){return void 0===f&&(f=!1),this.multiply(g.BROWN,f)},vintagePinhole:function(f){return void 0===f&&(f=!1),this.multiply(g.VINTAGE,f)},kodachrome:function(f){return void 0===f&&(f=!1),this.multiply(g.KODACHROME,f)},technicolor:function(f){return void 0===f&&(f=!1),this.multiply(g.TECHNICOLOR,f)},polaroid:function(f){return void 0===f&&(f=!1),this.multiply(g.POLAROID,f)},shiftToBGR:function(f){return void 0===f&&(f=!1),this.multiply(g.SHIFT_BGR,f)},multiply:function(f,h){void 0===h&&(h=!1),h||this.reset();var c=this._matrix,u=T;return u.set(c),c.set([u[0]*f[0]+u[1]*f[5]+u[2]*f[10]+u[3]*f[15],u[0]*f[1]+u[1]*f[6]+u[2]*f[11]+u[3]*f[16],u[0]*f[2]+u[1]*f[7]+u[2]*f[12]+u[3]*f[17],u[0]*f[3]+u[1]*f[8]+u[2]*f[13]+u[3]*f[18],u[0]*f[4]+u[1]*f[9]+u[2]*f[14]+u[3]*f[19]+u[4],u[5]*f[0]+u[6]*f[5]+u[7]*f[10]+u[8]*f[15],u[5]*f[1]+u[6]*f[6]+u[7]*f[11]+u[8]*f[16],u[5]*f[2]+u[6]*f[7]+u[7]*f[12]+u[8]*f[17],u[5]*f[3]+u[6]*f[8]+u[7]*f[13]+u[8]*f[18],u[5]*f[4]+u[6]*f[9]+u[7]*f[14]+u[8]*f[19]+u[9],u[10]*f[0]+u[11]*f[5]+u[12]*f[10]+u[13]*f[15],u[10]*f[1]+u[11]*f[6]+u[12]*f[11]+u[13]*f[16],u[10]*f[2]+u[11]*f[7]+u[12]*f[12]+u[13]*f[17],u[10]*f[3]+u[11]*f[8]+u[12]*f[13]+u[13]*f[18],u[10]*f[4]+u[11]*f[9]+u[12]*f[14]+u[13]*f[19]+u[14],u[15]*f[0]+u[16]*f[5]+u[17]*f[10]+u[18]*f[15],u[15]*f[1]+u[16]*f[6]+u[17]*f[11]+u[18]*f[16],u[15]*f[2]+u[16]*f[7]+u[17]*f[12]+u[18]*f[17],u[15]*f[3]+u[16]*f[8]+u[17]*f[13]+u[18]*f[18],u[15]*f[4]+u[16]*f[9]+u[17]*f[14]+u[18]*f[19]+u[19]]),this._dirty=!0,this}});g.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],g.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],g.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],g.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],g.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],g.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],g.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],g.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],g.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],g.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],g.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],S.exports=g},51767:(S,k,a)=>{var b=a(83419),T=a(29747),g=new b({initialize:function(h,c,u){this._rgb=[0,0,0],this.onChangeCallback=T,this.dirty=!1,this.set(h,c,u)},set:function(f,h,c){return void 0===f&&(f=0),void 0===h&&(h=0),void 0===c&&(c=0),this._rgb=[f,h,c],this.onChange(),this},equals:function(f,h,c){var u=this._rgb;return u[0]===f&&u[1]===h&&u[2]===c},onChange:function(){this.dirty=!0;var f=this._rgb;this.onChangeCallback.call(this,f[0],f[1],f[2])},r:{get:function(){return this._rgb[0]},set:function(f){this._rgb[0]=f,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(f){this._rgb[1]=f,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(f){this._rgb[2]=f,this.onChange()}},destroy:function(){this.onChangeCallback=null}});S.exports=g},60461:S=>{S.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},54312:(S,k,a)=>{var b=a(62235),T=a(35893),g=a(86327),f=a(88417);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},46768:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(86327),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},35827:(S,k,a)=>{var b=a(62235),T=a(54380),g=a(86327),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},46871:(S,k,a)=>{var b=a(66786),T=a(35893),g=a(7702);S.exports=function(h,c,u,m){return void 0===u&&(u=0),void 0===m&&(m=0),b(h,T(c)+u,g(c)+m),h}},5198:(S,k,a)=>{var b=a(7702),T=a(26541),g=a(20786),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},11879:(S,k,a)=>{var b=a(60461),T=[];T[b.BOTTOM_CENTER]=a(54312),T[b.BOTTOM_LEFT]=a(46768),T[b.BOTTOM_RIGHT]=a(35827),T[b.CENTER]=a(46871),T[b.LEFT_CENTER]=a(5198),T[b.RIGHT_CENTER]=a(80503),T[b.TOP_CENTER]=a(89698),T[b.TOP_LEFT]=a(922),T[b.TOP_RIGHT]=a(21373),T[b.LEFT_BOTTOM]=T[b.BOTTOM_LEFT],T[b.LEFT_TOP]=T[b.TOP_LEFT],T[b.RIGHT_BOTTOM]=T[b.BOTTOM_RIGHT],T[b.RIGHT_TOP]=T[b.TOP_RIGHT],S.exports=function(f,h,c,u,m){return T[c](f,h,u,m)}},80503:(S,k,a)=>{var b=a(7702),T=a(54380),g=a(20786),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},89698:(S,k,a)=>{var b=a(35893),T=a(17717),g=a(88417),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)+m),f(c,T(u)-d),c}},922:(S,k,a)=>{var b=a(26541),T=a(17717),g=a(385),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)-m),f(c,T(u)-d),c}},21373:(S,k,a)=>{var b=a(54380),T=a(17717),g=a(40136),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)+m),f(c,T(u)-d),c}},91660:(S,k,a)=>{S.exports={BottomCenter:a(54312),BottomLeft:a(46768),BottomRight:a(35827),Center:a(46871),LeftCenter:a(5198),QuickSet:a(11879),RightCenter:a(80503),TopCenter:a(89698),TopLeft:a(922),TopRight:a(21373)}},71926:(S,k,a)=>{var b=a(60461),T=a(79291),g={In:a(91660),To:a(16694)};g=T(!1,g,b),S.exports=g},21578:(S,k,a)=>{var b=a(62235),T=a(35893),g=a(88417),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,T(u)+m),f(c,b(u)+d),c}},10210:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(385),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,T(u)-m),f(c,b(u)+d),c}},82341:(S,k,a)=>{var b=a(62235),T=a(54380),g=a(40136),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,T(u)+m),f(c,b(u)+d),c}},87958:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(86327),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},40080:(S,k,a)=>{var b=a(7702),T=a(26541),g=a(20786),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},88466:(S,k,a)=>{var b=a(26541),T=a(17717),g=a(40136),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)-m),f(c,T(u)-d),c}},38829:(S,k,a)=>{var b=a(60461),T=[];T[b.BOTTOM_CENTER]=a(21578),T[b.BOTTOM_LEFT]=a(10210),T[b.BOTTOM_RIGHT]=a(82341),T[b.LEFT_BOTTOM]=a(87958),T[b.LEFT_CENTER]=a(40080),T[b.LEFT_TOP]=a(88466),T[b.RIGHT_BOTTOM]=a(19211),T[b.RIGHT_CENTER]=a(34609),T[b.RIGHT_TOP]=a(48741),T[b.TOP_CENTER]=a(49440),T[b.TOP_LEFT]=a(81288),T[b.TOP_RIGHT]=a(61323),S.exports=function(f,h,c,u,m){return T[c](f,h,u,m)}},19211:(S,k,a)=>{var b=a(62235),T=a(54380),g=a(86327),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},34609:(S,k,a)=>{var b=a(7702),T=a(54380),g=a(20786),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},48741:(S,k,a)=>{var b=a(54380),T=a(17717),g=a(385),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)+m),f(c,T(u)-d),c}},49440:(S,k,a)=>{var b=a(35893),T=a(17717),g=a(86327),f=a(88417);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,b(u)+m),g(c,T(u)-d),c}},81288:(S,k,a)=>{var b=a(26541),T=a(17717),g=a(86327),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,b(u)-m),g(c,T(u)-d),c}},61323:(S,k,a)=>{var b=a(54380),T=a(17717),g=a(86327),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,b(u)+m),g(c,T(u)-d),c}},16694:(S,k,a)=>{S.exports={BottomCenter:a(21578),BottomLeft:a(10210),BottomRight:a(82341),LeftBottom:a(87958),LeftCenter:a(40080),LeftTop:a(88466),QuickSet:a(38829),RightBottom:a(19211),RightCenter:a(34609),RightTop:a(48741),TopCenter:a(49440),TopLeft:a(81288),TopRight:a(61323)}},66786:(S,k,a)=>{var b=a(88417),T=a(20786);S.exports=function(f,h,c){return b(f,h),T(f,c)}},62235:S=>{S.exports=function(a){return a.y+a.height-a.height*a.originY}},72873:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(54380),f=a(17717),h=a(87841);S.exports=function(u,m){void 0===m&&(m=new h);var d=T(u),p=f(u);return m.x=d,m.y=p,m.width=g(u)-d,m.height=b(u)-p,m}},35893:S=>{S.exports=function(a){return a.x-a.width*a.originX+.5*a.width}},7702:S=>{S.exports=function(a){return a.y-a.height*a.originY+.5*a.height}},26541:S=>{S.exports=function(a){return a.x-a.width*a.originX}},87431:S=>{S.exports=function(a){return a.width*a.originX}},46928:S=>{S.exports=function(a){return a.height*a.originY}},54380:S=>{S.exports=function(a){return a.x+a.width-a.width*a.originX}},17717:S=>{S.exports=function(a){return a.y-a.height*a.originY}},86327:S=>{S.exports=function(a,b){return a.y=b-a.height+a.height*a.originY,a}},88417:S=>{S.exports=function(a,b){return a.x=b+a.width*a.originX-.5*a.width,a}},20786:S=>{S.exports=function(a,b){return a.y=b+a.height*a.originY-.5*a.height,a}},385:S=>{S.exports=function(a,b){return a.x=b+a.width*a.originX,a}},40136:S=>{S.exports=function(a,b){return a.x=b-a.width+a.width*a.originX,a}},66737:S=>{S.exports=function(a,b){return a.y=b+a.height*a.originY,a}},58724:(S,k,a)=>{S.exports={CenterOn:a(66786),GetBottom:a(62235),GetBounds:a(72873),GetCenterX:a(35893),GetCenterY:a(7702),GetLeft:a(26541),GetOffsetX:a(87431),GetOffsetY:a(46928),GetRight:a(54380),GetTop:a(17717),SetBottom:a(86327),SetCenterX:a(88417),SetCenterY:a(20786),SetLeft:a(385),SetRight:a(40136),SetTop:a(66737)}},20623:S=>{S.exports={setCrisp:function(a){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(T){a.style["image-rendering"]=T}),a.style.msInterpolationMode="nearest-neighbor",a},setBicubic:function(a){return a.style["image-rendering"]="auto",a.style.msInterpolationMode="bicubic",a}}},27919:(S,k,a)=>{var c,d,v,b=a(8054),T=a(68703),g=[],f=!1;S.exports=(v=function(){var E=0;return g.forEach(function(A){A.parent&&E++}),E},{create2D:function(E,A,D){return c(E,A,D,b.CANVAS)},create:c=function(E,A,D,I,R){void 0===A&&(A=1),void 0===D&&(D=1),void 0===I&&(I=b.CANVAS),void 0===R&&(R=!1);var F,N=d(I);return null===N?(N={parent:E,canvas:document.createElement("canvas"),type:I},I===b.CANVAS&&g.push(N),F=N.canvas):(N.parent=E,F=N.canvas),R&&(N.parent=F),F.width=A,F.height=D,f&&I===b.CANVAS&&T.disable(F.getContext("2d",{willReadFrequently:!1})),F},createWebGL:function(E,A,D){return c(E,A,D,b.WEBGL)},disableSmoothing:function(){f=!0},enableSmoothing:function(){f=!1},first:d=function(E){if(void 0===E&&(E=b.CANVAS),E===b.WEBGL)return null;for(var A=0;A{var b,k="";S.exports={disable:function(h){return""===k&&(k=b(h)),k&&(h[k]=!1),h},enable:function(h){return""===k&&(k=b(h)),k&&(h[k]=!0),h},getPrefix:b=function(h){for(var c=["i","webkitI","msI","mozI","oI"],u=0;u{S.exports=function(a,b){return void 0===b&&(b="none"),a.style.msTouchAction=b,a.style["ms-touch-action"]=b,a.style["touch-action"]=b,a}},91610:S=>{S.exports=function(a,b){return void 0===b&&(b="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(g){a.style[g+"user-select"]=b}),a.style["-webkit-touch-callout"]=b,a.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",a}},26253:(S,k,a)=>{S.exports={CanvasInterpolation:a(20623),CanvasPool:a(27919),Smoothing:a(68703),TouchAction:a(65208),UserSelect:a(91610)}},40987:(S,k,a)=>{var b=a(83419),T=a(37589),g=a(1e3),f=a(7537),h=a(87837),c=new b({initialize:function(m,d,p,v){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(m,d,p,v)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(u,m,d,p,v){return void 0===p&&(p=255),void 0===v&&(v=!0),this._locked=!0,this.red=u,this.green=m,this.blue=d,this.alpha=p,this._locked=!1,this.update(v)},setGLTo:function(u,m,d,p){return void 0===p&&(p=1),this._locked=!0,this.redGL=u,this.greenGL=m,this.blueGL=d,this.alphaGL=p,this._locked=!1,this.update(!0)},setFromRGB:function(u){return this._locked=!0,this.red=u.r,this.green=u.g,this.blue=u.b,u.hasOwnProperty("a")&&(this.alpha=u.a),this._locked=!1,this.update(!0)},setFromHSV:function(u,m,d){return f(u,m,d,this)},update:function(u){if(void 0===u&&(u=!1),this._locked)return this;var m=this.r,d=this.g,p=this.b,v=this.a;return this._color=T(m,d,p),this._color32=g(m,d,p,v),this._rgba="rgba("+m+","+d+","+p+","+v/255+")",u&&h(m,d,p,this),this},updateHSV:function(){return h(this.r,this.g,this.b,this),this},clone:function(){return new c(this.r,this.g,this.b,this.a)},gray:function(u){return this.setTo(u,u,u)},random:function(u,m){void 0===u&&(u=0),void 0===m&&(m=255);var d=Math.floor(u+Math.random()*(m-u)),p=Math.floor(u+Math.random()*(m-u)),v=Math.floor(u+Math.random()*(m-u));return this.setTo(d,p,v)},randomGray:function(u,m){void 0===u&&(u=0),void 0===m&&(m=255);var d=Math.floor(u+Math.random()*(m-u));return this.setTo(d,d,d)},saturate:function(u){return this.s+=u/100,this},desaturate:function(u){return this.s-=u/100,this},lighten:function(u){return this.v+=u/100,this},darken:function(u){return this.v-=u/100,this},brighten:function(u){var m=this.r,d=this.g,p=this.b;return m=Math.max(0,Math.min(255,m-Math.round(-u/100*255))),d=Math.max(0,Math.min(255,d-Math.round(-u/100*255))),p=Math.max(0,Math.min(255,p-Math.round(-u/100*255))),this.setTo(m,d,p)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(u){this.gl[0]=Math.min(Math.abs(u),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(u){this.gl[1]=Math.min(Math.abs(u),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(u){this.gl[2]=Math.min(Math.abs(u),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(u){this.gl[3]=Math.min(Math.abs(u),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(u){u=Math.floor(Math.abs(u)),this.r=Math.min(u,255),this.gl[0]=u/255,this.update(!0)}},green:{get:function(){return this.g},set:function(u){u=Math.floor(Math.abs(u)),this.g=Math.min(u,255),this.gl[1]=u/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(u){u=Math.floor(Math.abs(u)),this.b=Math.min(u,255),this.gl[2]=u/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(u){u=Math.floor(Math.abs(u)),this.a=Math.min(u,255),this.gl[3]=u/255,this.update()}},h:{get:function(){return this._h},set:function(u){this._h=u,f(u,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(u){this._s=u,f(this._h,u,this._v,this)}},v:{get:function(){return this._v},set:function(u){this._v=u,f(this._h,this._s,u,this)}}});S.exports=c},92728:(S,k,a)=>{var b=a(37589);S.exports=function(g){void 0===g&&(g=1024);var c,f=[],h=255,u=255,m=0,d=0;for(c=0;c<=h;c++)f.push({r:u,g:c,b:d,color:b(u,c,d)});for(m=255,c=h;c>=0;c--)f.push({r:c,g:m,b:d,color:b(c,m,d)});for(u=0,c=0;c<=h;c++,m--)f.push({r:u,g:m,b:c,color:b(u,m,c)});for(m=0,d=255,c=0;c<=h;c++,d--,u++)f.push({r:u,g:m,b:d,color:b(u,m,d)});if(1024===g)return f;var p=[],v=0,x=1024/g;for(c=0;c{S.exports=function(a){var b={r:a>>16&255,g:a>>8&255,b:255&a,a:255};return a>16777215&&(b.a=a>>>24),b}},62957:S=>{S.exports=function(a){var b=a.toString(16);return 1===b.length?"0"+b:b}},37589:S=>{S.exports=function(a,b,T){return a<<16|b<<8|T}},1e3:S=>{S.exports=function(a,b,T,g){return g<<24|a<<16|b<<8|T}},62183:(S,k,a)=>{var b=a(40987),T=a(89528);S.exports=function(f,h,c){var u=c,m=c,d=c;if(0!==h){var p=c<.5?c*(1+h):c+h-c*h,v=2*c-p;u=T(v,p,f+1/3),m=T(v,p,f),d=T(v,p,f-1/3)}return(new b).setGLTo(u,m,d,1)}},27939:(S,k,a)=>{var b=a(7537);S.exports=function(g,f){void 0===g&&(g=1),void 0===f&&(f=1);for(var h=[],c=0;c<=359;c++)h.push(b(c/359,g,f));return h}},7537:(S,k,a)=>{var b=a(37589);function T(f,h,c,u){var m=(f+6*h)%6,d=Math.min(m,4-m,1);return Math.round(255*(u-u*c*Math.max(0,d)))}S.exports=function(f,h,c,u){void 0===h&&(h=1),void 0===c&&(c=1);var m=T(5,f,h,c),d=T(3,f,h,c),p=T(1,f,h,c);return u?u.setTo?u.setTo(m,d,p,u.alpha,!0):(u.r=m,u.g=d,u.b=p,u.color=b(m,d,p),u):{r:m,g:d,b:p,color:b(m,d,p)}}},70238:(S,k,a)=>{var b=a(40987);S.exports=function(g){var f=new b;g=g.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(d,p,v,x){return p+p+v+v+x+x});var h=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(g);if(h){var c=parseInt(h[1],16),u=parseInt(h[2],16),m=parseInt(h[3],16);f.setTo(c,u,m)}return f}},89528:S=>{S.exports=function(a,b,T){return T<0&&(T+=1),T>1&&(T-=1),T<.16666666666666666?a+6*(b-a)*T:T<.5?b:T<.6666666666666666?a+(b-a)*(.6666666666666666-T)*6:a}},30100:(S,k,a)=>{var b=a(40987),T=a(90664);S.exports=function(f){var h=T(f);return new b(h.r,h.g,h.b,h.a)}},90664:S=>{S.exports=function(a){return a>16777215?{a:a>>>24,r:a>>16&255,g:a>>8&255,b:255&a}:{a:255,r:a>>16&255,g:a>>8&255,b:255&a}}},13699:(S,k,a)=>{var b=a(28915),T=function(h,c,u,m,d,p,v,x){void 0===v&&(v=100),void 0===x&&(x=0);var y=x/v;return{r:b(h,m,y),g:b(c,d,y),b:b(u,p,y)}};S.exports={RGBWithRGB:T,ColorWithRGB:function(h,c,u,m,d,p){return void 0===d&&(d=100),void 0===p&&(p=0),T(h.r,h.g,h.b,c,u,m,d,p)},ColorWithColor:function(h,c,u,m){return void 0===u&&(u=100),void 0===m&&(m=0),T(h.r,h.g,h.b,c.r,c.g,c.b,u,m)}}},68957:(S,k,a)=>{var b=a(40987);S.exports=function(g){return new b(g.r,g.g,g.b,g.a)}},87388:(S,k,a)=>{var b=a(40987);S.exports=function(g){var f=new b,h=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(g.toLowerCase());if(h){var c=parseInt(h[1],10),u=parseInt(h[2],10),m=parseInt(h[3],10),d=void 0!==h[4]?parseFloat(h[4]):1;f.setTo(c,u,m,255*d)}return f}},87837:S=>{S.exports=function(a,b,T,g){void 0===g&&(g={h:0,s:0,v:0}),a/=255,b/=255,T/=255;var f=Math.min(a,b,T),h=Math.max(a,b,T),c=h-f,u=0,m=0===h?0:c/h,d=h;return h!==f&&(h===a?u=(b-T)/c+(b{var b=a(62957);S.exports=function(g,f,h,c,u){return void 0===c&&(c=255),void 0===u&&(u="#"),"#"===u?"#"+((1<<24)+(g<<16)+(f<<8)+h).toString(16).slice(1,7):"0x"+b(c)+b(g)+b(f)+b(h)}},85386:(S,k,a)=>{var b=a(30976),T=a(40987);S.exports=function(f,h){return void 0===f&&(f=0),void 0===h&&(h=255),new T(b(f,h),b(f,h),b(f,h))}},80333:(S,k,a)=>{var b=a(70238),T=a(30100),g=a(68957),f=a(87388);S.exports=function(c){switch(typeof c){case"string":return"rgb"===c.substr(0,3).toLowerCase()?f(c):b(c);case"number":return T(c);case"object":return g(c)}}},3956:(S,k,a)=>{var b=a(40987);b.ColorSpectrum=a(92728),b.ColorToRGBA=a(91588),b.ComponentToHex=a(62957),b.GetColor=a(37589),b.GetColor32=a(1e3),b.HexStringToColor=a(70238),b.HSLToColor=a(62183),b.HSVColorWheel=a(27939),b.HSVToRGB=a(7537),b.HueToComponent=a(89528),b.IntegerToColor=a(30100),b.IntegerToRGB=a(90664),b.Interpolate=a(13699),b.ObjectToColor=a(68957),b.RandomRGB=a(85386),b.RGBStringToColor=a(87388),b.RGBToHSV=a(87837),b.RGBToString=a(75723),b.ValueToColor=a(80333),S.exports=b},27460:(S,k,a)=>{S.exports={Align:a(71926),BaseShader:a(73894),Bounds:a(58724),Canvas:a(26253),Color:a(3956),ColorMatrix:a(89422),Masks:a(69781),RGB:a(51767)}},6858:(S,k,a)=>{var b=a(83419),T=a(39429),g=new b({initialize:function(h,c,u,m,d,p){c||(c=h.sys.make.image({x:u,y:m,key:d,frame:p,add:!1})),this.bitmapMask=c,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(f){this.bitmapMask=f},preRenderWebGL:function(f,h,c){f.pipelines.BITMAPMASK_PIPELINE.beginMask(this,h,c)},postRenderWebGL:function(f,h,c){f.pipelines.BITMAPMASK_PIPELINE.endMask(this,h,c)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});T.register("bitmapMask",function(f,h,c,u,m){return new g(this.scene,f,h,c,u,m)}),S.exports=g},80661:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.geometryMask=h,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(g){return this.geometryMask=g,this},setInvertAlpha:function(g){return void 0===g&&(g=!0),this.invertAlpha=g,this},preRenderWebGL:function(g,f,h){var c=g.gl;g.flush(),0===g.maskStack.length&&(c.enable(c.STENCIL_TEST),c.clear(c.STENCIL_BUFFER_BIT),g.maskCount=0),g.currentCameraMask.mask!==this&&(g.currentMask.mask=this),g.maskStack.push({mask:this,camera:h}),this.applyStencil(g,h,!0),g.maskCount++},applyStencil:function(g,f,h){var c=g.gl,u=this.geometryMask,m=g.maskCount;c.colorMask(!1,!1,!1,!1),h?(c.stencilFunc(c.EQUAL,m,255),c.stencilOp(c.KEEP,c.KEEP,c.INCR),m++):(c.stencilFunc(c.EQUAL,m+1,255),c.stencilOp(c.KEEP,c.KEEP,c.DECR)),this.level=m,u.renderWebGL(g,u,f),g.flush(),c.colorMask(!0,!0,!0,!0),c.stencilOp(c.KEEP,c.KEEP,c.KEEP),c.stencilFunc(this.invertAlpha?c.NOTEQUAL:c.EQUAL,m,255)},postRenderWebGL:function(g){var f=g.gl;g.maskStack.pop(),g.maskCount--,g.flush();var h=g.currentMask;if(0===g.maskStack.length)h.mask=null,f.disable(f.STENCIL_TEST);else{var c=g.maskStack[g.maskStack.length-1];c.mask.applyStencil(g,c.camera,!1),g.currentCameraMask.mask!==c.mask?(h.mask=c.mask,h.camera=c.camera):h.mask=null}},preRenderCanvas:function(g,f,h){var c=this.geometryMask;g.currentContext.save(),c.renderCanvas(g,c,h,null,null,!0),g.currentContext.clip()},postRenderCanvas:function(g){g.currentContext.restore()},destroy:function(){this.geometryMask=null}});S.exports=T},69781:(S,k,a)=>{S.exports={BitmapMask:a(6858),GeometryMask:a(80661)}},73894:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u){(!h||""===h)&&(h=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),(!c||""===c)&&(c=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===u&&(u=null),this.key=f,this.fragmentSrc=h,this.vertexSrc=c,this.uniforms=u}});S.exports=T},40366:S=>{S.exports=function(a,b){var T;if(b)"string"==typeof b?T=document.getElementById(b):"object"==typeof b&&1===b.nodeType&&(T=b);else if(a.parentElement||null===b)return a;return T||(T=document.body),T.appendChild(a),a}},83719:(S,k,a)=>{var b=a(40366);S.exports=function(g){var f=g.config;if(f.parent&&f.domCreateContainer){var h=document.createElement("div");h.style.cssText=["display: block;","width: "+g.scale.width+"px;","height: "+g.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+f.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),g.domContainer=h,b(h,f.parent)}}},57264:(S,k,a)=>{var b=a(25892);S.exports=function(g){if("complete"!==document.readyState&&"interactive"!==document.readyState){var f=function(){document.removeEventListener("deviceready",f,!0),document.removeEventListener("DOMContentLoaded",f,!0),window.removeEventListener("load",f,!0),g()};document.body?b.cordova?document.addEventListener("deviceready",f,!1):(document.addEventListener("DOMContentLoaded",f,!0),window.addEventListener("load",f,!0)):window.setTimeout(f,20)}else g()}},57811:S=>{S.exports=function(a){if(!a)return window.innerHeight;var b=Math.abs(window.orientation),T={w:0,h:0},g=document.createElement("div");return g.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(g),T.w=90===b?g.offsetHeight:window.innerWidth,T.h=90===b?window.innerWidth:g.offsetHeight,document.documentElement.removeChild(g),g=null,90!==Math.abs(window.orientation)?T.h:T.w}},45818:(S,k,a)=>{var b=a(13560);S.exports=function(g,f){var h=window.screen,c=!!h&&(h.orientation||h.mozOrientation||h.msOrientation);return c&&"string"==typeof c.type?c.type:"string"==typeof c?c:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?b.ORIENTATION.PORTRAIT:b.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?b.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?b.ORIENTATION.LANDSCAPE:void 0:f>g?b.ORIENTATION.PORTRAIT:b.ORIENTATION.LANDSCAPE}},74403:S=>{S.exports=function(a){var b;return""!==a&&("string"==typeof a?b=document.getElementById(a):a&&1===a.nodeType&&(b=a)),b||(b=document.body),b}},56836:S=>{S.exports=function(a){var b="";try{window.DOMParser?b=(new DOMParser).parseFromString(a,"text/xml"):(b=new ActiveXObject("Microsoft.XMLDOM")).loadXML(a)}catch{b=null}return b&&b.documentElement&&!b.getElementsByTagName("parsererror").length?b:null}},35846:S=>{S.exports=function(a){a.parentNode&&a.parentNode.removeChild(a)}},43092:(S,k,a)=>{var b=a(83419),T=a(29747),g=new b({initialize:function(){this.isRunning=!1,this.callback=T,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var h=this;this.step=function c(u){h.callback(u),h.isRunning&&(h.timeOutID=window.requestAnimationFrame(c))},this.stepTimeout=function c(){h.isRunning&&(h.timeOutID=window.setTimeout(c,h.delay)),h.callback(window.performance.now())}},start:function(f,h,c){this.isRunning||(this.callback=f,this.isSetTimeOut=h,this.delay=c,this.isRunning=!0,this.timeOutID=h?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=T}});S.exports=g},84902:(S,k,a)=>{var b={AddToDOM:a(40366),DOMContentLoaded:a(57264),GetInnerHeight:a(57811),GetScreenOrientation:a(45818),GetTarget:a(74403),ParseXML:a(56836),RemoveFromDOM:a(35846),RequestAnimationFrame:a(43092)};S.exports=b},47565:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(37277),f=new b({Extends:T,initialize:function(){T.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});g.register("EventEmitter",f,"events"),S.exports=f},93055:(S,k,a)=>{S.exports={EventEmitter:a(47565)}},20122:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u){void 0===u&&(u=1),T.call(this,g.BARREL,c),this.amount=u}});S.exports=f},32251:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x){void 0===m&&(m=1),void 0===d&&(d=1),void 0===p&&(p=1),void 0===v&&(v=1),void 0===x&&(x=4),T.call(this,g.BLOOM,c),this.steps=x,this.offsetX=m,this.offsetY=d,this.blurStrength=p,this.strength=v,this.glcolor=[1,1,1],null!=u&&(this.color=u)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},9047:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x){void 0===u&&(u=0),void 0===m&&(m=2),void 0===d&&(d=2),void 0===p&&(p=1),void 0===x&&(x=4),T.call(this,g.BLUR,c),this.quality=u,this.x=m,this.y=d,this.steps=x,this.strength=p,this.glcolor=[1,1,1],null!=v&&(this.color=v)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},27885:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y){void 0===u&&(u=.5),void 0===m&&(m=1),void 0===d&&(d=.2),void 0===p&&(p=!1),void 0===v&&(v=1),void 0===x&&(x=1),void 0===y&&(y=1),T.call(this,g.BOKEH,c),this.radius=u,this.amount=m,this.contrast=d,this.isTiltShift=p,this.strength=y,this.blurX=v,this.blurY=x}});S.exports=f},12578:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v){void 0===u&&(u=8),void 0===p&&(p=1),void 0===v&&(v=.005),T.call(this,g.CIRCLE,c),this.scale=p,this.feather=v,this.thickness=u,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=m&&(this.color=m),null!=d&&(this.backgroundColor=d)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}},backgroundColor:{get:function(){var h=this.glcolor2;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor2;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(h){this.glcolor2[3]=h}}});S.exports=f},15802:(S,k,a)=>{var b=a(83419),T=a(89422),g=a(14811),f=new b({Extends:T,initialize:function(c){T.call(this),this.type=g.COLOR_MATRIX,this.gameObject=c,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});S.exports=f},72898:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.type=f,this.gameObject=h,this.active=!0},setActive:function(g){return this.active=g,this},destroy:function(){this.gameObject=null,this.active=!1}});S.exports=T},44553:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d){void 0===u&&(u="__WHITE"),void 0===m&&(m=.005),void 0===d&&(d=.005),T.call(this,g.DISPLACEMENT,c),this.x=m,this.y=d,this.setTexture(u)},setTexture:function(h){var c=this.gameObject.scene.sys.textures.getFrame(h);return c&&(this.glTexture=c.glTexture),this}});S.exports=f},68531:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===m&&(m=4),void 0===d&&(d=0),void 0===p&&(p=!1),T.call(this,g.GLOW,c),this.outerStrength=m,this.innerStrength=d,this.knockout=p,this.glcolor=[1,1,1,1],void 0!==u&&(this.color=u)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},37102:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y,_){void 0===d&&(d=.2),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=1),void 0===_&&(_=0),T.call(this,g.GRADIENT,c),this.alpha=d,this.size=_,this.fromX=p,this.fromY=v,this.toX=x,this.toY=y,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=u&&(this.color1=u),null!=m&&(this.color2=m)},color1:{get:function(){var h=this.glcolor1;return(h[0]<<16)+(h[1]<<8)+(0|h[2])},set:function(h){var c=this.glcolor1;c[0]=h>>16&255,c[1]=h>>8&255,c[2]=255&h}},color2:{get:function(){var h=this.glcolor2;return(h[0]<<16)+(h[1]<<8)+(0|h[2])},set:function(h){var c=this.glcolor2;c[0]=h>>16&255,c[1]=h>>8&255,c[2]=255&h}}});S.exports=f},86886:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u){void 0===u&&(u=1),T.call(this,g.PIXELATE,c),this.amount=u}});S.exports=f},92322:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=.1),void 0===p&&(p=1),void 0===x&&(x=6),void 0===y&&(y=1),T.call(this,g.SHADOW,c),this.x=u,this.y=m,this.decay=d,this.power=p,this.glcolor=[0,0,0,1],this.samples=x,this.intensity=y,void 0!==v&&(this.color=v)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},39563:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===u&&(u=.5),void 0===m&&(m=.5),void 0===d&&(d=3),void 0===p&&(p=!1),T.call(this,g.SHINE,c),this.speed=u,this.lineWidth=m,this.gradient=d,this.reveal=p}});S.exports=f},56448:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===u&&(u=.5),void 0===m&&(m=.5),void 0===d&&(d=.5),void 0===p&&(p=.5),T.call(this,g.VIGNETTE,c),this.x=u,this.y=m,this.radius=d,this.strength=p}});S.exports=f},38433:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===u&&(u=.1),void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=!1),T.call(this,g.WIPE,c),this.progress=0,this.wipeWidth=u,this.direction=m,this.axis=d,this.reveal=p}});S.exports=f},14811:S=>{S.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},66064:(S,k,a)=>{var b=a(79291),T=a(14811),g={Barrel:a(20122),Controller:a(72898),Bloom:a(32251),Blur:a(9047),Bokeh:a(27885),Circle:a(12578),ColorMatrix:a(15802),Displacement:a(44553),Glow:a(68531),Gradient:a(37102),Pixelate:a(86886),Shadow:a(92322),Shine:a(39563),Vignette:a(56448),Wipe:a(38433)};g=b(!1,g,T),S.exports=g},25305:(S,k,a)=>{var b=a(10312),T=a(23568);S.exports=function(f,h,c){h.x=T(c,"x",0),h.y=T(c,"y",0),h.depth=T(c,"depth",0),h.flipX=T(c,"flipX",!1),h.flipY=T(c,"flipY",!1);var u=T(c,"scale",null);"number"==typeof u?h.setScale(u):null!==u&&(h.scaleX=T(u,"x",1),h.scaleY=T(u,"y",1));var m=T(c,"scrollFactor",null);"number"==typeof m?h.setScrollFactor(m):null!==m&&(h.scrollFactorX=T(m,"x",1),h.scrollFactorY=T(m,"y",1)),h.rotation=T(c,"rotation",0);var d=T(c,"angle",null);null!==d&&(h.angle=d),h.alpha=T(c,"alpha",1);var p=T(c,"origin",null);if("number"==typeof p)h.setOrigin(p);else if(null!==p){var v=T(p,"x",.5),x=T(p,"y",.5);h.setOrigin(v,x)}return h.blendMode=T(c,"blendMode",b.NORMAL),h.visible=T(c,"visible",!0),T(c,"add",!0)&&f.sys.displayList.add(h),h.preUpdate&&f.sys.updateList.add(h),h}},13059:(S,k,a)=>{var b=a(23568);S.exports=function(g,f){var h=b(f,"anims",null);if(null===h)return g;if("string"==typeof h)g.anims.play(h);else if("object"==typeof h){var c=g.anims,u=b(h,"key",void 0);if(u){var m=b(h,"startFrame",void 0),d=b(h,"delay",0),p=b(h,"repeat",0),v=b(h,"repeatDelay",0),x=b(h,"yoyo",!1),y=b(h,"play",!1),_=b(h,"delayedPlay",0),E={key:u,delay:d,repeat:p,repeatDelay:v,yoyo:x,startFrame:m};y?c.play(E):_>0?c.playAfterDelay(E,_):c.load(E)}}return g}},8050:(S,k,a)=>{var b=a(83419),T=a(73162),g=a(37277),f=a(51708),h=a(44594),c=a(19186),u=new b({Extends:T,initialize:function(d){T.call(this,d),this.sortChildrenFlag=!1,this.scene=d,this.systems=d.sys,this.events=d.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},addChildCallback:function(m){m.displayList&&m.displayList!==this&&m.removeFromDisplayList(),m.parentContainer&&m.parentContainer.remove(m),m.displayList||(this.queueDepthSort(),m.displayList=this,m.emit(f.ADDED_TO_SCENE,m,this.scene),this.events.emit(h.ADDED_TO_SCENE,m,this.scene))},removeChildCallback:function(m){this.queueDepthSort(),m.displayList=null,m.emit(f.REMOVED_FROM_SCENE,m,this.scene),this.events.emit(h.REMOVED_FROM_SCENE,m,this.scene)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(c(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(m,d){return m._depth-d._depth},getChildren:function(){return this.list},shutdown:function(){for(var m=this.list;m.length;)m[0].destroy(!0);this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});g.register("DisplayList",u,"displayList"),S.exports=u},95643:(S,k,a)=>{var b=a(83419),T=a(53774),g=a(45893),f=a(50792),h=a(51708),c=a(44594),u=new b({Extends:f,initialize:function(d,p){f.call(this),this.scene=d,this.displayList=null,this.type=p,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this),d.sys.queueDepthSort()},setActive:function(m){return this.active=m,this},setName:function(m){return this.name=m,this},setState:function(m){return this.state=m,this},setDataEnabled:function(){return this.data||(this.data=new g(this)),this},setData:function(m,d){return this.data||(this.data=new g(this)),this.data.set(m,d),this},incData:function(m,d){return this.data||(this.data=new g(this)),this.data.inc(m,d),this},toggleData:function(m){return this.data||(this.data=new g(this)),this.data.toggle(m),this},getData:function(m){return this.data||(this.data=new g(this)),this.data.get(m)},setInteractive:function(m,d,p){return this.scene.sys.input.enable(this,m,d,p),this},disableInteractive:function(m){return void 0===m&&(m=!1),this.scene.sys.input.disable(this,m),this},removeInteractive:function(m){return void 0===m&&(m=!1),this.scene.sys.input.clear(this),m&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return T(this)},willRender:function(m){return!(this.displayList&&this.displayList.active&&!this.displayList.willRender(m)||u.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&m.id)},getIndexList:function(){for(var m=this,d=this.parentContainer,p=[];d&&(p.unshift(d.getIndex(m)),m=d,d.parentContainer);)d=d.parentContainer;return p.unshift(this.displayList?this.displayList.getIndex(m):this.scene.sys.displayList.getIndex(m)),p},addToDisplayList:function(m){return void 0===m&&(m=this.scene.sys.displayList),this.displayList&&this.displayList!==m&&this.removeFromDisplayList(),m.exists(this)||(this.displayList=m,m.add(this,!0),m.queueDepthSort(),this.emit(h.ADDED_TO_SCENE,this,this.scene),m.events.emit(c.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var m=this.displayList||this.scene.sys.displayList;return m&&m.exists(this)&&(m.remove(this,!0),m.queueDepthSort(),this.displayList=null,this.emit(h.REMOVED_FROM_SCENE,this,this.scene),m.events.emit(c.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var m=null;return this.parentContainer?m=this.parentContainer.list:this.displayList&&(m=this.displayList.list),m},destroy:function(m){!this.scene||this.ignoreDestroy||(void 0===m&&(m=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(h.DESTROY,this,m),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});u.RENDER_MASK=15,S.exports=u},44603:(S,k,a)=>{var b=a(83419),T=a(37277),g=a(44594),f=new b({initialize:function(c){this.scene=c,this.systems=c.sys,this.events=c.sys.events,this.events.once(g.BOOT,this.boot,this),this.events.on(g.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(g.DESTROY,this.destroy,this)},start:function(){this.events.once(g.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(g.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});f.register=function(h,c){f.prototype.hasOwnProperty(h)||(f.prototype[h]=c)},f.remove=function(h){f.prototype.hasOwnProperty(h)&&delete f.prototype[h]},T.register("GameObjectCreator",f,"make"),S.exports=f},39429:(S,k,a)=>{var b=a(83419),T=a(37277),g=a(44594),f=new b({initialize:function(c){this.scene=c,this.systems=c.sys,this.events=c.sys.events,this.events.once(g.BOOT,this.boot,this),this.events.on(g.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(g.DESTROY,this.destroy,this)},start:function(){this.events.once(g.SHUTDOWN,this.shutdown,this)},existing:function(h){return(h.renderCanvas||h.renderWebGL)&&this.displayList.add(h),h.preUpdate&&this.updateList.add(h),h},shutdown:function(){this.events.off(g.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});f.register=function(h,c){f.prototype.hasOwnProperty(h)||(f.prototype[h]=c)},f.remove=function(h){f.prototype.hasOwnProperty(h)&&delete f.prototype[h]},T.register("GameObjectFactory",f,"add"),S.exports=f},91296:(S,k,a)=>{var b=a(61340),T=new b,g=new b,f=new b,h={camera:T,sprite:g,calc:f};S.exports=function(u,m,d){var p=T,v=g,x=f;return v.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),p.copyFrom(m.matrix),d?(p.multiplyWithOffset(d,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),v.e=u.x,v.f=u.y):(v.e-=m.scrollX*u.scrollFactorX,v.f-=m.scrollY*u.scrollFactorY),p.multiply(v,x),h}},45027:(S,k,a)=>{var b=a(83419),T=a(25774),g=a(37277),f=a(44594),h=new b({Extends:T,initialize:function(u){T.call(this),this.checkQueue=!0,this.scene=u,this.systems=u.sys,u.sys.events.once(f.BOOT,this.boot,this),u.sys.events.on(f.START,this.start,this)},boot:function(){this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){var c=this.systems.events;c.on(f.PRE_UPDATE,this.update,this),c.on(f.UPDATE,this.sceneUpdate,this),c.once(f.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(c,u){for(var m=this._active,d=m.length,p=0;p{S.exports=function(a,b,T,g,f,h,c,u,m,d,p,v,x,y,_){var E=T.x-b.displayOriginX+f,A=T.y-b.displayOriginY+h,D=E+T.w,I=A+T.h,R=c.a,F=c.b,N=c.c,V=c.d,B=c.e,H=c.f,Q=E*R+A*N+B,G=E*F+A*V+H,K=E*R+I*N+B,q=E*F+I*V+H,at=D*R+I*N+B,ot=D*F+I*V+H,J=D*R+A*N+B,it=D*F+A*V+H;u&&(Q=Math.round(Q),G=Math.round(G),K=Math.round(K),q=Math.round(q),at=Math.round(at),ot=Math.round(ot),J=Math.round(J),it=Math.round(it)),a.batchQuad(b,Q,G,K,q,at,ot,J,it,g.u0,g.v0,g.u1,g.v1,m,d,p,v,x,y,_)}},53048:S=>{S.exports=function(a,b,T,g){if(void 0===T&&(T=!1),void 0===g)return{local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var Y,j,nt,f=a.text,h=f.length,c=a.maxWidth,u=a.wordWrapCharCode,m=Number.MAX_VALUE,d=Number.MAX_VALUE,p=0,v=0,x=a.fontData.chars,y=a.fontData.lineHeight,_=a.letterSpacing,E=a.lineSpacing,A=0,D=0,I=0,R=null,F=a._align,N=0,V=0,B=a.fontSize/a.fontData.size,H=B*a.scaleX,Q=B*a.scaleY,G=null,K=0,q=[],at=Number.MAX_VALUE,ot=0,J=0,it=0,ht=[],gt=[],wt=null,St=function(Fr,cs){for(var Dn=0,xr=0;xr0){nt=f.split("\n");var Bt=[];for(Y=0;YN&&(m=N),d>(V=D)&&(d=V);var _i=N+R.xAdvance,be=V+y;p<_i&&(p=_i),vot&&(ot=it),itot&&(ot=it),it0)for(var Ke=0;Ke{var b=a(21859);S.exports=function(g,f,h,c,u,m,d){var p=g.sys.textures.get(h),v=p.get(c),x=g.sys.cache.xml.get(u);if(v&&x){var y=b(x,v,m,d,p);return g.sys.cache.bitmapFont.add(f,{data:y,texture:h,frame:c,fromAtlas:!0}),!0}return!1}},6925:(S,k,a)=>{var b=a(35154);S.exports=function(g,f){var h=f.width,c=f.height,u=Math.floor(h/2),m=Math.floor(c/2),d=b(f,"chars","");if(""!==d){var p=b(f,"image",""),v=g.sys.textures.getFrame(p),x=v.cutX,y=v.cutY,_=v.source.width,E=v.source.height,A=b(f,"offset.x",0),D=b(f,"offset.y",0),I=b(f,"spacing.x",0),R=b(f,"spacing.y",0),F=b(f,"lineSpacing",0),N=b(f,"charsPerRow",null);null===N&&(N=_/h)>d.length&&(N=d.length);for(var V=A,B=D,H={retroFont:!0,font:p,size:h,lineHeight:c+F,chars:{}},Q=0,G=0;G{function k(b,T){return parseInt(b.getAttribute(T),10)}S.exports=function(b,T,g,f,h){void 0===g&&(g=0),void 0===f&&(f=0);var c=T.cutX,u=T.cutY,m=T.source.width,d=T.source.height,p=T.sourceIndex,v={},x=b.getElementsByTagName("info")[0],y=b.getElementsByTagName("common")[0];v.font=x.getAttribute("face"),v.size=k(x,"size"),v.lineHeight=k(y,"lineHeight")+f,v.chars={};var _=b.getElementsByTagName("char"),E=void 0!==T&&T.trimmed;if(E)var A=T.height,D=T.width;for(var I=0;I<_.length;I++){var R=_[I],F=k(R,"id"),N=String.fromCharCode(F),V=k(R,"x"),B=k(R,"y"),H=k(R,"width"),Q=k(R,"height");E&&(V{var b=a(87662),T=a(79291),g={Parse:a(6925)};g=T(!1,g,b),S.exports=g},87662:S=>{S.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},2638:(S,k,a)=>{var b=a(22186),T=a(83419),g=a(12310),f=new T({Extends:b,Mixins:[g],initialize:function(c,u,m,d,p,v,x){b.call(this,c,u,m,d,p,v,x),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(h,c){return this.cropWidth=h,this.cropHeight=c,this},setDisplayCallback:function(h){return this.displayCallback=h,this},setScrollX:function(h){return this.scrollX=h,this},setScrollY:function(h){return this.scrollY=h,this}});S.exports=f},86741:(S,k,a)=>{var b=a(20926);S.exports=function(g,f,h,c){var u=f._text,m=u.length,d=g.currentContext;if(0!==m&&b(g,d,f,h,c)){h.addToRenderList(f);var p=f.fromAtlas?f.frame:f.texture.frames.__BASE,v=f.displayCallback,x=f.callbackData,y=f.fontData.chars,_=f.fontData.lineHeight,E=f._letterSpacing,A=0,D=0,I=0,R=null,F=0,N=0,V=0,B=0,H=0,Q=0,G=null,K=0,q=f.frame.source.image,at=p.cutX,ot=p.cutY,J=0,it=0,Y=f._fontSize/f.fontData.size,j=f._align,nt=0,ht=0;f.getTextBounds(!1);var gt=f._bounds.lines;1===j?ht=(gt.longest-gt.lengths[0])/2:2===j&&(ht=gt.longest-gt.lengths[0]),d.translate(-f.displayOriginX,-f.displayOriginY);var wt=h.roundPixels;f.cropWidth>0&&f.cropHeight>0&&(d.beginPath(),d.rect(0,0,f.cropWidth,f.cropHeight),d.clip());for(var St=0;St{var b=a(2638),T=a(25305),g=a(44603),f=a(23568);g.register("dynamicBitmapText",function(h,c){void 0===h&&(h={});var u=f(h,"font",""),m=f(h,"text",""),d=f(h,"size",!1),p=new b(this.scene,0,0,u,m,d);return void 0!==c&&(h.add=c),T(this.scene,p,h),p})},72566:(S,k,a)=>{var b=a(2638);a(39429).register("dynamicBitmapText",function(g,f,h,c,u){return this.displayList.add(new b(this.scene,g,f,h,c,u))})},12310:(S,k,a)=>{var T,g;a(29747),T=a(73482),g=a(86741),S.exports={renderWebGL:T,renderCanvas:g}},73482:(S,k,a)=>{var b=a(91296),T=a(61340),g=a(70554),f=new T;S.exports=function(c,u,m,d){var p=u.text,v=p.length;if(0!==v){m.addToRenderList(u);var x=c.pipelines.set(u.pipeline,u),y=b(u,m,d);c.pipelines.preBatch(u);var _=y.sprite,E=y.calc,A=f,D=u.cropWidth>0||u.cropHeight>0;D&&(x.flush(),c.pushScissor(E.tx,E.ty,u.cropWidth*E.scaleX,u.cropHeight*E.scaleY));var J,j,R=u.frame.glTexture,F=u.tintFill,N=g.getTintAppendFloatAlpha(u.tintTopLeft,m.alpha*u._alphaTL),V=g.getTintAppendFloatAlpha(u.tintTopRight,m.alpha*u._alphaTR),B=g.getTintAppendFloatAlpha(u.tintBottomLeft,m.alpha*u._alphaBL),H=g.getTintAppendFloatAlpha(u.tintBottomRight,m.alpha*u._alphaBR),Q=x.setGameObject(u),G=0,K=0,q=0,at=0,ot=u.letterSpacing,it=0,Y=0,nt=u.scrollX,ht=u.scrollY,gt=u.fontData,wt=gt.chars,St=gt.lineHeight,Bt=u.fontSize/gt.size,Yt=0,$t=u._align,qt=0,ne=0,le=u.getTextBounds(!1);u.maxWidth>0&&(v=(p=le.wrappedText).length);var Me=u._bounds.lines;1===$t?ne=(Me.longest-Me.lengths[0])/2:2===$t&&(ne=Me.longest-Me.lengths[0]);for(var pi=m.roundPixels,Ie=u.displayCallback,_i=u.callbackData,be=0;be{var b=a(83419),T=a(45319),g=a(31401),f=a(95643),h=a(53048),c=a(61327),u=a(21859),m=a(87841),d=a(18658),p=new b({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Texture,g.Tint,g.Transform,g.Visible,d],initialize:function(x,y,_,E,A,D,I){void 0===A&&(A=""),void 0===I&&(I=0),f.call(this,x,"BitmapText"),this.font=E;var R=this.scene.sys.cache.bitmapFont.get(E);if(!R)throw new Error("Invalid BitmapText key: "+E);this.fontData=R.data,this._text="",this._fontSize=D||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=I,this._bounds=h(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=R.fromAtlas,this.setTexture(R.texture,R.frame),this.setPosition(y,_),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(A)},setLeftAlign:function(){return this._align=p.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=p.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=p.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(v){return this._fontSize=v,this._dirty=!0,this},setLetterSpacing:function(v){return void 0===v&&(v=0),this._letterSpacing=v,this._dirty=!0,this},setLineSpacing:function(v){return void 0===v&&(v=0),this.lineSpacing=v,this},setText:function(v){return!v&&0!==v&&(v=""),Array.isArray(v)&&(v=v.join("\n")),v!==this.text&&(this._text=v.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(v,x,y,_){return void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=.5),this.dropShadowX=v,this.dropShadowY=x,this.dropShadowColor=y,this.dropShadowAlpha=_,this},setCharacterTint:function(v,x,y,_,E,A,D){void 0===v&&(v=0),void 0===x&&(x=1),void 0===y&&(y=!1),void 0===_&&(_=-1),void 0===E&&(E=_,A=_,D=_);var I=this.text.length;-1===x&&(x=I),v<0&&(v=I+v),v=T(v,0,I-1);for(var R=T(v+x,v,I),F=this.charColors,N=v;N{var b=a(20926);S.exports=function(g,f,h,c){var u=f._text,m=u.length,d=g.currentContext;if(0!==m&&b(g,d,f,h,c)){h.addToRenderList(f);var p=f.fromAtlas?f.frame:f.texture.frames.__BASE,v=f.fontData.chars,x=f.fontData.lineHeight,y=f._letterSpacing,_=f._lineSpacing,E=0,A=0,D=0,I=null,R=0,F=0,N=0,V=0,B=0,H=0,Q=null,G=0,K=p.source.image,q=p.cutX,at=p.cutY,ot=f._fontSize/f.fontData.size,J=f._align,it=0,Y=0,j=f.getTextBounds(!1);f.maxWidth>0&&(m=(u=j.wrappedText).length);var nt=f._bounds.lines;1===J?Y=(nt.longest-nt.lengths[0])/2:2===J&&(Y=nt.longest-nt.lengths[0]),d.translate(-f.displayOriginX,-f.displayOriginY);for(var ht=h.roundPixels,gt=0;gt{var b=a(22186),T=a(25305),g=a(44603),f=a(23568),h=a(35154);g.register("bitmapText",function(c,u){void 0===c&&(c={});var m=h(c,"font",""),d=f(c,"text",""),p=f(c,"size",!1),v=h(c,"align",0),x=new b(this.scene,0,0,m,d,p,v);return void 0!==u&&(c.add=u),T(this.scene,x,c),x})},34914:(S,k,a)=>{var b=a(22186);a(39429).register("bitmapText",function(g,f,h,c,u,m){return this.displayList.add(new b(this.scene,g,f,h,c,u,m))})},18658:(S,k,a)=>{var T,g;a(29747),T=a(33590),g=a(37289),S.exports={renderWebGL:T,renderCanvas:g}},33590:(S,k,a)=>{var b=a(3217),T=a(91296),g=a(70554);S.exports=function(h,c,u,m){if(0!==c._text.length){u.addToRenderList(c);var v=h.pipelines.set(c.pipeline,c),x=T(c,u,m).calc;h.pipelines.preBatch(c);var Q,G,K,y=u.roundPixels,_=u.alpha,E=c.charColors,A=c.tintFill,D=g.getTintAppendFloatAlpha,I=D(c.tintTopLeft,_*c._alphaTL),R=D(c.tintTopRight,_*c._alphaTR),F=D(c.tintBottomLeft,_*c._alphaBL),N=D(c.tintBottomRight,_*c._alphaBR),V=c.frame.glTexture,B=v.setGameObject(c),q=c.getTextBounds(!1).characters,at=c.dropShadowX,ot=c.dropShadowY;if(0!==at||0!==ot){var it=c.dropShadowColor,Y=c.dropShadowAlpha,j=D(it,_*Y*c._alphaTL),nt=D(it,_*Y*c._alphaTR),ht=D(it,_*Y*c._alphaBL),gt=D(it,_*Y*c._alphaBR);for(Q=0;Q{var b=a(48011),T=a(46590),g=a(83419),f=a(31401),h=a(4327),c=a(95643),u=a(73162),m=new g({Extends:c,Mixins:[f.Alpha,f.BlendMode,f.Depth,f.Mask,f.Pipeline,f.PostPipeline,f.ScrollFactor,f.Size,f.Texture,f.Transform,f.Visible,b],initialize:function(p,v,x,y,_){c.call(this,p,"Blitter"),this.setTexture(y,_),this.setPosition(v,x),this.initPipeline(),this.initPostPipeline(),this.children=new u,this.renderList=[],this.dirty=!1},create:function(d,p,v,x,y){void 0===x&&(x=!0),void 0===y&&(y=this.children.length),void 0===v?v=this.frame:v instanceof h||(v=this.texture.get(v));var _=new T(this,d,p,v,x);return this.children.addAt(_,y,!1),this.dirty=!0,_},createFromCallback:function(d,p,v,x){for(var y=this.createMultiple(p,v,x),_=0;_0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});S.exports=m},72396:S=>{S.exports=function(a,b,T,g){var f=b.getRenderList();if(0!==f.length){var h=a.currentContext,c=T.alpha*b.alpha;if(0!==c){T.addToRenderList(b),h.globalCompositeOperation=a.blendModes[b.blendMode],h.imageSmoothingEnabled=!b.frame.source.scaleMode;var u=b.x-T.scrollX*b.scrollFactorX,m=b.y-T.scrollY*b.scrollFactorY;h.save(),g&&g.copyToContext(h);for(var d=T.roundPixels,p=0;p0&&_.height>0&&(h.save(),h.translate(v.x+u,v.y+m),h.scale(D,I),h.drawImage(y.source.image,_.x,_.y,_.width,_.height,E,A,_.width,_.height),h.restore())):(d&&(E=Math.round(E),A=Math.round(A)),_.width>0&&_.height>0&&h.drawImage(y.source.image,_.x,_.y,_.width,_.height,E+v.x+u,A+v.y+m,_.width,_.height)))}h.restore()}}}},9403:(S,k,a)=>{var b=a(6107),T=a(25305),g=a(44603),f=a(23568);g.register("blitter",function(h,c){void 0===h&&(h={});var u=f(h,"key",null),m=f(h,"frame",null),d=new b(this.scene,0,0,u,m);return void 0!==c&&(h.add=c),T(this.scene,d,h),d})},12709:(S,k,a)=>{var b=a(6107);a(39429).register("blitter",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},48011:(S,k,a)=>{var T,g;a(29747),T=a(99485),g=a(72396),S.exports={renderWebGL:T,renderCanvas:g}},99485:(S,k,a)=>{var b=a(61340),T=a(70554),g=new b;S.exports=function(h,c,u,m){var d=c.getRenderList(),p=u.alpha*c.alpha;if(0!==d.length&&0!==p){u.addToRenderList(c);var v=h.pipelines.set(this.pipeline,c),x=u.scrollX*c.scrollFactorX,y=u.scrollY*c.scrollFactorY,_=g.copyFrom(u.matrix);m&&(_.multiplyWithOffset(m,-x,-y),x=0,y=0);var E=c.x-x,A=c.y-y,D=-1,R=u.roundPixels;h.pipelines.preBatch(c);for(var F=0;F{var b=a(83419),T=a(4327),g=new b({initialize:function(h,c,u,m,d){this.parent=h,this.x=c,this.y=u,this.frame=m,this.data={},this.tint=16777215,this._visible=d,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(f){return this.frame=void 0===f?this.parent.frame:f instanceof T&&f.texture===this.parent.texture?f:this.parent.texture.get(f),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(f,h,c){return this.x=f,this.y=h,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,c&&this.setFrame(c),this},setPosition:function(f,h){return this.x=f,this.y=h,this},setFlipX:function(f){return this.flipX=f,this},setFlipY:function(f){return this.flipY=f,this},setFlip:function(f,h){return this.flipX=f,this.flipY=h,this},setVisible:function(f){return this.visible=f,this},setAlpha:function(f){return this.alpha=f,this},setTint:function(f){return this.tint=f,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(f){this.parent.dirty|=this._visible!==f,this._visible=f}},alpha:{get:function(){return this._alpha},set:function(f){this.parent.dirty|=this._alpha>0!=f>0,this._alpha=f}}});S.exports=g},16005:(S,k,a)=>{var b=a(45319);S.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(f,h,c,u){return void 0===f&&(f=1),void 0===h?this.alpha=f:(this._alphaTL=b(f,0,1),this._alphaTR=b(h,0,1),this._alphaBL=b(c,0,1),this._alphaBR=b(u,0,1)),this},alpha:{get:function(){return this._alpha},set:function(f){var h=b(f,0,1);this._alpha=h,this._alphaTL=h,this._alphaTR=h,this._alphaBL=h,this._alphaBR=h,0===h?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(f){var h=b(f,0,1);this._alphaTL=h,0!==h&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(f){var h=b(f,0,1);this._alphaTR=h,0!==h&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(f){var h=b(f,0,1);this._alphaBL=h,0!==h&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(f){var h=b(f,0,1);this._alphaBR=h,0!==h&&(this.renderFlags|=2)}}}},88509:(S,k,a)=>{var b=a(45319);S.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(f){return void 0===f&&(f=1),this.alpha=f,this},alpha:{get:function(){return this._alpha},set:function(f){var h=b(f,0,1);this._alpha=h,0===h?this.renderFlags&=-3:this.renderFlags|=2}}}},90065:(S,k,a)=>{var b=a(10312);S.exports={_blendMode:b.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(g){"string"==typeof g&&(g=b[g]),(g|=0)>=-1&&(this._blendMode=g)}},setBlendMode:function(g){return this.blendMode=g,this}}},94215:S=>{S.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}},setSize:function(a,b){return this.width=a,this.height=b,this},setDisplaySize:function(a,b){return this.displayWidth=a,this.displayHeight=b,this}}},61683:S=>{S.exports={texture:null,frame:null,isCropped:!1,setCrop:function(a,b,T,g){return void 0===a?this.isCropped=!1:this.frame&&("number"==typeof a?this.frame.setCropUVs(this._crop,a,b,T,g,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,a.x,a.y,a.width,a.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},89272:(S,k,a)=>{var b=a(37105);S.exports={_depth:0,depth:{get:function(){return this._depth},set:function(g){this.displayList&&this.displayList.queueDepthSort(),this._depth=g}},setDepth:function(g){return void 0===g&&(g=0),this.depth=g,this},setToTop:function(){var g=this.getDisplayList();return g&&b.BringToTop(g,this),this},setToBack:function(){var g=this.getDisplayList();return g&&b.SendToBack(g,this),this},setAbove:function(g){var f=this.getDisplayList();return f&&g&&b.MoveAbove(f,this,g),this},setBelow:function(g){var f=this.getDisplayList();return f&&g&&b.MoveBelow(f,this,g),this}}},47059:(S,k,a)=>{var b=a(83419),T=a(66064),g=a(19133),f=new b({initialize:function(c,u){this.gameObject=c,this.isPost=u,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(h){return void 0===h&&(h=0),this.padding=h,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(h){if(!this.isPost){var c=this.gameObject.scene.sys.renderer;c&&c.pipelines?(this.gameObject.pipeline=c.pipelines.FX_PIPELINE,void 0!==h&&(this.padding=h),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var h=this.list,c=0;c{S.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(a){return this.flipX=a,this},setFlipY:function(a){return this.flipY=a,this},setFlip:function(a,b){return this.flipX=a,this.flipY=b,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},8004:(S,k,a)=>{var b=a(87841),T=a(11520),g=a(26099);S.exports={prepareBoundsOutput:function(h,c){return void 0===c&&(c=!1),0!==this.rotation&&T(h,this.x,this.y,this.rotation),c&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(h.x,h.y,h),h},getCenter:function(h,c){return void 0===h&&(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,c)},getTopLeft:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,c)},getTopCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,c)},getTopRight:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,c)},getLeftCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,c)},getRightCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,c)},getBottomLeft:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,c)},getBottomCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,c)},getBottomRight:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,c)},getBounds:function(h){var c,u,m,d,p,v,x,y;if(void 0===h&&(h=new b),this.parentContainer){var _=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(h),_.transformPoint(h.x,h.y,h),c=h.x,u=h.y,this.getTopRight(h),_.transformPoint(h.x,h.y,h),m=h.x,d=h.y,this.getBottomLeft(h),_.transformPoint(h.x,h.y,h),p=h.x,v=h.y,this.getBottomRight(h),_.transformPoint(h.x,h.y,h),x=h.x,y=h.y}else this.getTopLeft(h),c=h.x,u=h.y,this.getTopRight(h),m=h.x,d=h.y,this.getBottomLeft(h),p=h.x,v=h.y,this.getBottomRight(h),x=h.x,y=h.y;return h.x=Math.min(c,m,p,x),h.y=Math.min(u,d,v,y),h.width=Math.max(c,m,p,x)-h.x,h.height=Math.max(u,d,v,y)-h.y,h}}},8573:(S,k,a)=>{var b=a(6858),T=a(80661);S.exports={mask:null,setMask:function(f){return this.mask=f,this},clearMask:function(f){return void 0===f&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(f,h,c,u,m){return void 0===f&&(this.texture||this.shader||this.geom)&&(f=this),new b(this.scene,f,h,c,u,m)},createGeometryMask:function(f){return void 0===f&&("Graphics"===this.type||this.geom)&&(f=this),new T(this.scene,f)}}},27387:S=>{S.exports={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(a){this._displayOriginX=a,this.originX=a/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(a){this._displayOriginY=a,this.originY=a/this.height}},setOrigin:function(a,b){return void 0===a&&(a=.5),void 0===b&&(b=a),this.originX=a,this.originY=b,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(a,b){return void 0===a&&(a=0),void 0===b&&(b=a),this.displayOriginX=a,this.displayOriginY=b,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}}},37640:(S,k,a)=>{var b=a(39506),T=a(57355),g=a(35154),f=a(86353),h=a(26099);S.exports={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:f.PLAYING_FORWARD,setPath:function(u,m){void 0===m&&(m=this.pathConfig);var d=this.pathTween;return d&&d.isPlaying()&&d.stop(),this.path=u,m&&this.startFollow(m),this},setRotateToPath:function(u,m){return void 0===m&&(m=0),this.rotateToPath=u,this.pathRotationOffset=m,this},isFollowing:function(){var u=this.pathTween;return u&&u.isPlaying()},startFollow:function(u,m){void 0===u&&(u={}),void 0===m&&(m=0);var d=this.pathTween;d&&d.isPlaying()&&d.stop(),"number"==typeof u&&(u={duration:u}),u.from=g(u,"from",0),u.to=g(u,"to",1);var p=T(u,"positionOnPath",!1);this.rotateToPath=T(u,"rotateToPath",!1),this.pathRotationOffset=g(u,"rotationOffset",0);var v=g(u,"startAt",m);if(v&&(u.onStart=function(y){var _=y.data[0];_.progress=v,_.elapsed=_.duration*v;var E=_.ease(_.progress);_.current=_.start+(_.end-_.start)*E,_.setTargetValue()}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),u.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(u),this.path.getStartPoint(this.pathOffset),p&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=f.PLAYING_FORWARD,this.rotateToPath){var x=this.path.getPoint(.1);this.rotation=Math.atan2(x.y-this.y,x.x-this.x)+b(this.pathRotationOffset)}return this.pathConfig=u,this},pauseFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.pause(),this},resumeFollow:function(){var u=this.pathTween;return u&&u.isPaused()&&u.resume(),this},stopFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.stop(),this},pathUpdate:function(){var u=this.pathTween;if(u&&u.data){var m=u.data[0],d=this.pathDelta,p=this.pathVector;if(d.copy(p).negate(),m.state===f.COMPLETE)return this.path.getPoint(m.end,p),d.add(p),p.add(this.pathOffset),void this.setPosition(p.x,p.y);if(m.state!==f.PLAYING_FORWARD&&m.state!==f.PLAYING_BACKWARD)return;this.path.getPoint(u.getValue(),p),d.add(p),p.add(this.pathOffset);var v=this.x,x=this.y;this.setPosition(p.x,p.y);var y=this.x-v,_=this.y-x;if(0===y&&0===_)return;if(m.state!==this._prevDirection)return void(this._prevDirection=m.state);this.rotateToPath&&(this.rotation=Math.atan2(_,y)+b(this.pathRotationOffset))}}}},72699:(S,k,a)=>{var b=a(62644);S.exports={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(g){this.pipelineData={};var f=this.scene.sys.renderer;if(!f)return!1;var h=f.pipelines;if(h){void 0===g&&(g=h.default);var c=h.get(g);if(c)return this.defaultPipeline=c,this.pipeline=c,!0}return!1},setPipeline:function(g,f,h){var c=this.scene.sys.renderer;if(!c)return this;var u=c.pipelines;if(u){var m=u.get(g);m&&(this.pipeline=m),f&&(this.pipelineData=h?b(f):f)}return this},setPipelineData:function(g,f){var h=this.pipelineData;return void 0===f?delete h[g]:h[g]=f,this},resetPipeline:function(g){return void 0===g&&(g=!1),this.pipeline=this.defaultPipeline,g&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return null===this.pipeline?null:this.pipeline.name}}},17581:(S,k,a)=>{var b=a(62644),T=a(47059),g=a(19133);S.exports={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(h){this.postPipelines=[],this.postPipelineData={},this.postFX=new T(this,!0),h&&(this.preFX=new T(this,!1))},setPostPipeline:function(h,c,u){var m=this.scene.sys.renderer;if(!m)return this;var d=m.pipelines;if(d){Array.isArray(h)||(h=[h]);for(var p=0;p0,this},setPostPipelineData:function(h,c){var u=this.postPipelineData;return void 0===c?delete u[h]:u[h]=c,this},getPostPipeline:function(h){for(var c="string"==typeof h,u=this.postPipelines,m=[],d=0;d=0;m--){var d=u[m];(c&&d.name===h||!c&&d===h)&&(d.destroy(),g(u,m))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}}},80227:S=>{S.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(a,b){return void 0===b&&(b=a),this.scrollFactorX=a,this.scrollFactorY=b,this}}},16736:S=>{S.exports={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(a){this.scaleX=a/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(a){this.scaleY=a/this.frame.realHeight}},setSizeToFrame:function(a){a||(a=this.frame),this.width=a.realWidth,this.height=a.realHeight;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},setSize:function(a,b){return this.width=a,this.height=b,this},setDisplaySize:function(a,b){return this.displayWidth=a,this.displayHeight=b,this}}},37726:(S,k,a)=>{var b=a(4327);S.exports={texture:null,frame:null,isCropped:!1,setTexture:function(f,h,c,u){return this.texture=this.scene.sys.textures.get(f),this.setFrame(h,c,u)},setFrame:function(f,h,c){return void 0===h&&(h=!0),void 0===c&&(c=!0),f instanceof b?(this.texture=this.scene.sys.textures.get(f.texture.key),this.frame=f):this.frame=this.texture.get(f),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&c&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}}},79812:(S,k,a)=>{var b=a(4327);S.exports={texture:null,frame:null,isCropped:!1,setCrop:function(f,h,c,u){return void 0===f?this.isCropped=!1:this.frame&&("number"==typeof f?this.frame.setCropUVs(this._crop,f,h,c,u,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,f.x,f.y,f.width,f.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(f,h){return this.texture=this.scene.sys.textures.get(f),this.setFrame(h)},setFrame:function(f,h,c){return void 0===h&&(h=!0),void 0===c&&(c=!0),f instanceof b?(this.texture=this.scene.sys.textures.get(f.texture.key),this.frame=f):this.frame=this.texture.get(f),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&c&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},27472:S=>{S.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(a,b,T,g){return void 0===a&&(a=16777215),void 0===b&&(b=a,T=a,g=a),this.tintTopLeft=a,this.tintTopRight=b,this.tintBottomLeft=T,this.tintBottomRight=g,this.tintFill=!1,this},setTintFill:function(a,b,T,g){return this.setTint(a,b,T,g),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(a){this.setTint(a,a,a,a)}},isTinted:{get:function(){var a=16777215;return this.tintFill||this.tintTopLeft!==a||this.tintTopRight!==a||this.tintBottomLeft!==a||this.tintBottomRight!==a}}}},53774:S=>{S.exports=function(a){var b={name:a.name,type:a.type,x:a.x,y:a.y,depth:a.depth,scale:{x:a.scaleX,y:a.scaleY},origin:{x:a.originX,y:a.originY},flipX:a.flipX,flipY:a.flipY,rotation:a.rotation,alpha:a.alpha,visible:a.visible,blendMode:a.blendMode,textureKey:"",frameKey:"",data:{}};return a.texture&&(b.textureKey=a.texture.key,b.frameKey=a.frame.name),b}},16901:(S,k,a)=>{var b=a(36383),T=a(61340),g=a(85955),f=a(86554),h=a(30954),c=a(26099);S.exports={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(d){this._scaleX=d,this._scaleY=d,0===d?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(d){this._scaleX=d,0===d?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(d){this._scaleY=d,0===d?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return h(this._rotation*b.RAD_TO_DEG)},set:function(d){this.rotation=h(d)*b.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(d){this._rotation=f(d)}},setPosition:function(d,p,v,x){return void 0===d&&(d=0),void 0===p&&(p=d),void 0===v&&(v=0),void 0===x&&(x=0),this.x=d,this.y=p,this.z=v,this.w=x,this},copyPosition:function(d){return void 0!==d.x&&(this.x=d.x),void 0!==d.y&&(this.y=d.y),void 0!==d.z&&(this.z=d.z),void 0!==d.w&&(this.w=d.w),this},setRandomPosition:function(d,p,v,x){return void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=this.scene.sys.scale.width),void 0===x&&(x=this.scene.sys.scale.height),this.x=d+Math.random()*v,this.y=p+Math.random()*x,this},setRotation:function(d){return void 0===d&&(d=0),this.rotation=d,this},setAngle:function(d){return void 0===d&&(d=0),this.angle=d,this},setScale:function(d,p){return void 0===d&&(d=1),void 0===p&&(p=d),this.scaleX=d,this.scaleY=p,this},setX:function(d){return void 0===d&&(d=0),this.x=d,this},setY:function(d){return void 0===d&&(d=0),this.y=d,this},setZ:function(d){return void 0===d&&(d=0),this.z=d,this},setW:function(d){return void 0===d&&(d=0),this.w=d,this},getLocalTransformMatrix:function(d){return void 0===d&&(d=new T),d.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(d,p){void 0===d&&(d=new T);var v=this.parentContainer;if(!v)return this.getLocalTransformMatrix(d);for(p||(p=new T),d.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);v;)p.applyITRS(v.x,v.y,v._rotation,v._scaleX,v._scaleY),p.multiply(d,d),v=v.parentContainer;return d},getLocalPoint:function(d,p,v,x){v||(v=new c),x||(x=this.scene.sys.cameras.main);var y=x.scrollX,_=x.scrollY,E=d+y*this.scrollFactorX-y,A=p+_*this.scrollFactorY-_;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(E,A,v):g(E,A,this.x,this.y,this.rotation,this.scaleX,this.scaleY,v),this._originComponent&&(v.x+=this._displayOriginX,v.y+=this._displayOriginY),v},getParentRotation:function(){for(var d=0,p=this.parentContainer;p;)d+=p.rotation,p=p.parentContainer;return d}}},61340:(S,k,a)=>{var b=a(83419),T=a(36383),g=a(26099),f=new b({initialize:function(c,u,m,d,p,v){void 0===c&&(c=1),void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=1),void 0===p&&(p=0),void 0===v&&(v=0),this.matrix=new Float32Array([c,u,m,d,p,v,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(h){this.matrix[0]=h}},b:{get:function(){return this.matrix[1]},set:function(h){this.matrix[1]=h}},c:{get:function(){return this.matrix[2]},set:function(h){this.matrix[2]=h}},d:{get:function(){return this.matrix[3]},set:function(h){this.matrix[3]=h}},e:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},f:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},tx:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},ty:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var h=this.matrix,c=h[0],u=h[1],m=h[2],d=h[3];return c||u?u>0?Math.acos(c/this.scaleX):-Math.acos(c/this.scaleX):m||d?T.TAU-(d>0?Math.acos(-m/this.scaleY):-Math.acos(m/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var h=this.matrix;return h[0]=1,h[1]=0,h[2]=0,h[3]=1,h[4]=0,h[5]=0,this},translate:function(h,c){var u=this.matrix;return u[4]=u[0]*h+u[2]*c+u[4],u[5]=u[1]*h+u[3]*c+u[5],this},scale:function(h,c){var u=this.matrix;return u[0]*=h,u[1]*=h,u[2]*=c,u[3]*=c,this},rotate:function(h){var c=Math.sin(h),u=Math.cos(h),m=this.matrix,d=m[0],p=m[1],v=m[2],x=m[3];return m[0]=d*u+v*c,m[1]=p*u+x*c,m[2]=d*-c+v*u,m[3]=p*-c+x*u,this},multiply:function(h,c){var u=this.matrix,m=h.matrix,d=u[0],p=u[1],v=u[2],x=u[3],y=u[4],_=u[5],E=m[0],A=m[1],D=m[2],I=m[3],R=m[4],F=m[5],N=void 0===c?u:c.matrix;return N[0]=E*d+A*v,N[1]=E*p+A*x,N[2]=D*d+I*v,N[3]=D*p+I*x,N[4]=R*d+F*v+y,N[5]=R*p+F*x+_,N},multiplyWithOffset:function(h,c,u){var m=this.matrix,d=h.matrix,p=m[0],v=m[1],x=m[2],y=m[3],A=c*p+u*x+m[4],D=c*v+u*y+m[5],I=d[0],R=d[1],F=d[2],N=d[3],V=d[4],B=d[5];return m[0]=I*p+R*x,m[1]=I*v+R*y,m[2]=F*p+N*x,m[3]=F*v+N*y,m[4]=V*p+B*x+A,m[5]=V*v+B*y+D,this},transform:function(h,c,u,m,d,p){var v=this.matrix,x=v[0],y=v[1],_=v[2],E=v[3],A=v[4],D=v[5];return v[0]=h*x+c*_,v[1]=h*y+c*E,v[2]=u*x+m*_,v[3]=u*y+m*E,v[4]=d*x+p*_+A,v[5]=d*y+p*E+D,this},transformPoint:function(h,c,u){void 0===u&&(u={x:0,y:0});var m=this.matrix,p=m[1],x=m[3],_=m[5];return u.x=h*m[0]+c*m[2]+m[4],u.y=h*p+c*x+_,u},invert:function(){var h=this.matrix,c=h[0],u=h[1],m=h[2],d=h[3],p=h[4],v=h[5],x=c*d-u*m;return h[0]=d/x,h[1]=-u/x,h[2]=-m/x,h[3]=c/x,h[4]=(m*v-d*p)/x,h[5]=-(c*v-u*p)/x,this},copyFrom:function(h){var c=this.matrix;return c[0]=h.a,c[1]=h.b,c[2]=h.c,c[3]=h.d,c[4]=h.e,c[5]=h.f,this},copyFromArray:function(h){var c=this.matrix;return c[0]=h[0],c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],this},copyToContext:function(h){var c=this.matrix;return h.transform(c[0],c[1],c[2],c[3],c[4],c[5]),h},setToContext:function(h){return h.setTransform(this),h},copyToArray:function(h){var c=this.matrix;return void 0===h?h=[c[0],c[1],c[2],c[3],c[4],c[5]]:(h[0]=c[0],h[1]=c[1],h[2]=c[2],h[3]=c[3],h[4]=c[4],h[5]=c[5]),h},setTransform:function(h,c,u,m,d,p){var v=this.matrix;return v[0]=h,v[1]=c,v[2]=u,v[3]=m,v[4]=d,v[5]=p,this},decomposeMatrix:function(){var h=this.decomposedMatrix,c=this.matrix,u=c[0],m=c[1],d=c[2],p=c[3],v=u*p-m*d;if(h.translateX=c[4],h.translateY=c[5],u||m){var x=Math.sqrt(u*u+m*m);h.rotation=m>0?Math.acos(u/x):-Math.acos(u/x),h.scaleX=x,h.scaleY=v/x}else if(d||p){var y=Math.sqrt(d*d+p*p);h.rotation=.5*Math.PI-(p>0?Math.acos(-d/y):-Math.acos(d/y)),h.scaleX=v/y,h.scaleY=y}else h.rotation=0,h.scaleX=0,h.scaleY=0;return h},applyITRS:function(h,c,u,m,d){var p=this.matrix,v=Math.sin(u),x=Math.cos(u);return p[4]=h,p[5]=c,p[0]=x*m,p[1]=v*m,p[2]=-v*d,p[3]=x*d,this},applyInverse:function(h,c,u){void 0===u&&(u=new g);var m=this.matrix,d=m[0],p=m[1],v=m[2],x=m[3],y=m[4],_=m[5],E=1/(d*x+v*-p);return u.x=x*E*h+-v*E*c+(_*v-y*x)*E,u.y=d*E*c+-p*E*h+(-_*d+y*p)*E,u},setQuad:function(h,c,u,m,d,p){void 0===d&&(d=!1),void 0===p&&(p=this.quad);var v=this.matrix,x=v[0],y=v[1],_=v[2],E=v[3],A=v[4],D=v[5],I=h*x+c*_+A,R=h*y+c*E+D,F=h*x+m*_+A,N=h*y+m*E+D,V=u*x+m*_+A,B=u*y+m*E+D,H=u*x+c*_+A,Q=u*y+c*E+D;if(d){var G=Math.floor(I+.5),K=Math.floor(R+.5),q=G-I,at=K-R;p[0]=G,p[1]=K,p[2]=F+q,p[3]=N+at,p[4]=V+q,p[5]=B+at,p[6]=H+q,p[7]=Q+at}else p[0]=I,p[1]=R,p[2]=F,p[3]=N,p[4]=V,p[5]=B,p[6]=H,p[7]=Q;return p},getX:function(h,c){return h*this.a+c*this.c+this.e},getY:function(h,c){return h*this.b+c*this.d+this.f},getXRound:function(h,c,u){var m=this.getX(h,c);return u&&(m=Math.floor(m+.5)),m},getYRound:function(h,c,u){var m=this.getY(h,c);return u&&(m=Math.floor(m+.5)),m},getCSSMatrix:function(){var h=this.matrix;return"matrix("+h[0]+","+h[1]+","+h[2]+","+h[3]+","+h[4]+","+h[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});S.exports=f},59715:S=>{S.exports={_visible:!0,visible:{get:function(){return this._visible},set:function(b){b?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(b){return this.visible=b,this}}},31401:(S,k,a)=>{S.exports={Alpha:a(16005),AlphaSingle:a(88509),BlendMode:a(90065),ComputedSize:a(94215),Crop:a(61683),Depth:a(89272),Flip:a(54434),FX:a(47059),GetBounds:a(8004),Mask:a(8573),Origin:a(27387),PathFollower:a(37640),Pipeline:a(72699),PostPipeline:a(17581),ScrollFactor:a(80227),Size:a(16736),Texture:a(37726),TextureCrop:a(79812),Tint:a(27472),ToJSON:a(53774),Transform:a(16901),TransformMatrix:a(61340),Visible:a(59715)}},31559:(S,k,a)=>{var b=a(37105),T=a(10312),g=a(83419),f=a(31401),h=a(51708),c=a(95643),u=a(87841),m=a(29959),d=a(36899),p=a(26099),v=new f.TransformMatrix,x=new g({Extends:c,Mixins:[f.AlphaSingle,f.BlendMode,f.ComputedSize,f.Depth,f.Mask,f.PostPipeline,f.Transform,f.Visible,m],initialize:function(_,E,A,D){c.call(this,_,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new f.TransformMatrix,this._sortKey="",this._sysEvents=_.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(E,A),this.setBlendMode(T.SKIP_CHECK),D&&this.add(D)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(y){return void 0===y&&(y=!0),this.exclusive=y,this},getBounds:function(y){if(void 0===y&&(y=new u),y.setTo(this.x,this.y,0,0),this.parentContainer){var E=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);y.setTo(E.x,E.y,0,0)}if(this.list.length>0){var A=this.list,D=new u,I=!1;y.setEmpty();for(var R=0;R-1},setAll:function(y,_,E,A){return b.SetAll(this.list,y,_,E,A),this},each:function(y,_){var A,E=[null],D=this.list.slice(),I=D.length;for(A=2;A0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.list=[]},onChildDestroyed:function(y){b.Remove(this.list,y),this.exclusive&&(y.parentContainer=null,y.removedFromScene())}});S.exports=x},53584:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b);var f=b.list;if(0!==f.length){var h=b.localTransform;g?(h.loadIdentity(),h.multiply(g),h.translate(b.x,b.y),h.rotate(b.rotation),h.scale(b.scaleX,b.scaleY)):h.applyITRS(b.x,b.y,b.rotation,b.scaleX,b.scaleY);var c=-1!==b.blendMode;c||a.setBlendMode(0);var u=b._alpha,m=b.scrollFactorX,d=b.scrollFactorY;b.mask&&b.mask.preRenderCanvas(a,null,T);for(var p=0;p{var b=a(25305),T=a(31559),g=a(44603),f=a(23568),h=a(95540);g.register("container",function(c,u){void 0===c&&(c={});var m=f(c,"x",0),d=f(c,"y",0),p=h(c,"children",null),v=new T(this.scene,m,d,p);return void 0!==u&&(c.add=u),b(this.scene,v,c),v})},24961:(S,k,a)=>{var b=a(31559);a(39429).register("container",function(g,f,h){return this.displayList.add(new b(this.scene,g,f,h))})},29959:(S,k,a)=>{var T,g;a(29747),T=a(72249),g=a(53584),S.exports={renderWebGL:T,renderCanvas:g}},72249:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b);var f=b.list,h=f.length;if(0!==h){var c=b.localTransform;g?(c.loadIdentity(),c.multiply(g),c.translate(b.x,b.y),c.rotate(b.rotation),c.scale(b.scaleX,b.scaleY)):c.applyITRS(b.x,b.y,b.rotation,b.scaleX,b.scaleY),a.pipelines.preBatch(b);var u=-1!==b.blendMode;u||a.setBlendMode(0);for(var m=b.alpha,d=b.scrollFactorX,p=b.scrollFactorY,v=0;v{S.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(441),f=a(95643),h=a(41212),c=a(35846),u=a(44594),m=a(61369),d=new b({Extends:f,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Origin,T.ScrollFactor,T.Transform,T.Visible,g],initialize:function(v,x,y,_,E,A){f.call(this,v,"DOMElement"),this.parent=v.sys.game.domContainer,this.cache=v.sys.cache.html,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new m,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(x,y),"string"==typeof _?"#"===_[0]?this.setElement(_.substr(1),E,A):this.createElement(_,E,A):_&&this.setElement(_,E,A),v.sys.events.on(u.SLEEP,this.handleSceneEvent,this),v.sys.events.on(u.WAKE,this.handleSceneEvent,this),v.sys.events.on(u.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(p){var v=this.node;v&&(v.style.display=p.settings.visible?"block":"none")},setSkew:function(p,v){return void 0===p&&(p=0),void 0===v&&(v=p),this.skewX=p,this.skewY=v,this},setPerspective:function(p){return this.parent.style.perspective=p+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(p){this.parent.style.perspective=p+"px"}},addListener:function(p){if(this.node){p=p.split(" ");for(var v=0;v{var b=a(47407),T=a(95643),g=a(61340),f=new g,h=new g,c=new g;S.exports=function(m,d,p,v){if(d.node){var x=d.node.style;if(!x||!d.scene.sys.settings.visible||T.RENDER_MASK!==d.renderFlags||0!==d.cameraFilter&&d.cameraFilter&p.id||d.parentContainer&&!d.parentContainer.willRender())return void(x.display="none");var _=d.parentContainer,E=p.alpha*d.alpha;_&&(E*=_.alpha);var A=f,D=h,I=c,R=0,F=0,N="0%",V="0%";v?(D.applyITRS(d.x-(R=d.width*d.scaleX*d.originX),d.y-(F=d.height*d.scaleY*d.originY),d.rotation,d.scaleX,d.scaleY),A.copyFrom(p.matrix),A.multiplyWithOffset(v,-p.scrollX*d.scrollFactorX,-p.scrollY*d.scrollFactorY),D.e=d.x-R,D.f=d.y-F,A.multiply(D,I)):(R=d.width*d.originX,F=d.height*d.originY,D.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),A.copyFrom(p.matrix),N=100*d.originX+"%",V=100*d.originY+"%",D.e-=p.scrollX*d.scrollFactorX,D.f-=p.scrollY*d.scrollFactorY,A.multiply(D,I),I.e-=R,I.f-=F),d.transformOnly||(x.display="block",x.opacity=E,x.zIndex=d._depth,x.pointerEvents=d.pointerEvents,x.mixBlendMode=b[d._blendMode]),x.transform=I.getCSSMatrix()+" skew("+d.skewX+"rad, "+d.skewY+"rad) rotate3d("+d.rotate3d.x+","+d.rotate3d.y+","+d.rotate3d.z+","+d.rotate3d.w+d.rotate3dAngle+")",x.transformOrigin=N+" "+V}}},2611:(S,k,a)=>{var b=a(3069);a(39429).register("dom",function(g,f,h,c,u){var m=new b(this.scene,g,f,h,c,u);return this.displayList.add(m),m})},441:(S,k,a)=>{var T,g;a(29747),T=a(49381),g=a(49381),S.exports={renderWebGL:T,renderCanvas:g}},62980:S=>{S.exports="addedtoscene"},41337:S=>{S.exports="destroy"},44947:S=>{S.exports="removedfromscene"},49358:S=>{S.exports="complete"},35163:S=>{S.exports="created"},97249:S=>{S.exports="error"},19483:S=>{S.exports="locked"},56059:S=>{S.exports="loop"},26772:S=>{S.exports="metadata"},64437:S=>{S.exports="playing"},83411:S=>{S.exports="play"},75780:S=>{S.exports="seeked"},67799:S=>{S.exports="seeking"},63500:S=>{S.exports="stalled"},55541:S=>{S.exports="stop"},53208:S=>{S.exports="textureready"},4992:S=>{S.exports="unlocked"},12:S=>{S.exports="unsupported"},51708:(S,k,a)=>{S.exports={ADDED_TO_SCENE:a(62980),DESTROY:a(41337),REMOVED_FROM_SCENE:a(44947),VIDEO_COMPLETE:a(49358),VIDEO_CREATED:a(35163),VIDEO_ERROR:a(97249),VIDEO_LOCKED:a(19483),VIDEO_LOOP:a(56059),VIDEO_METADATA:a(26772),VIDEO_PLAY:a(83411),VIDEO_PLAYING:a(64437),VIDEO_SEEKED:a(75780),VIDEO_SEEKING:a(67799),VIDEO_STALLED:a(63500),VIDEO_STOP:a(55541),VIDEO_TEXTURE:a(53208),VIDEO_UNLOCKED:a(4992),VIDEO_UNSUPPORTED:a(12)}},42421:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(64993),h=new b({Extends:g,Mixins:[T.Alpha,T.BlendMode,T.Depth,T.Flip,T.Origin,T.ScrollFactor,T.Size,T.Texture,T.Tint,T.Transform,T.Visible,f],initialize:function(u){g.call(this,u,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});S.exports=h},70217:()=>{},56315:(S,k,a)=>{var b=a(42421);a(39429).register("extern",function(){var g=new b(this.scene);return this.displayList.add(g),g})},64993:(S,k,a)=>{var T,g;a(29747),T=a(80287),g=a(70217),S.exports={renderWebGL:T,renderCanvas:g}},80287:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){g.pipelines.clear();var u=b(f,h,c).calc;f.render.call(f,g,h,u),g.pipelines.rebind()}},85592:S=>{S.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(S,k,a)=>{var b=a(71911),T=a(83419),g=a(85592),f=a(31401),h=a(8497),c=a(95643),u=a(95540),m=a(35154),d=a(36383),p=a(84503),v=new T({Extends:c,Mixins:[f.AlphaSingle,f.BlendMode,f.Depth,f.Mask,f.Pipeline,f.PostPipeline,f.Transform,f.Visible,f.ScrollFactor,p],initialize:function(y,_){var E=m(_,"x",0),A=m(_,"y",0);c.call(this,y,"Graphics"),this.setPosition(E,A),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(_)},setDefaultStyles:function(x){return m(x,"lineStyle",null)&&(this.defaultStrokeWidth=m(x,"lineStyle.width",1),this.defaultStrokeColor=m(x,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(x,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(x,"fillStyle",null)&&(this.defaultFillColor=m(x,"fillStyle.color",16777215),this.defaultFillAlpha=m(x,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(x,y,_){return void 0===_&&(_=1),this.commandBuffer.push(g.LINE_STYLE,x,y,_),this._lineWidth=x,this},fillStyle:function(x,y){return void 0===y&&(y=1),this.commandBuffer.push(g.FILL_STYLE,x,y),this},fillGradientStyle:function(x,y,_,E,A,D,I,R){return void 0===A&&(A=1),void 0===D&&(D=A),void 0===I&&(I=A),void 0===R&&(R=A),this.commandBuffer.push(g.GRADIENT_FILL_STYLE,A,D,I,R,x,y,_,E),this},lineGradientStyle:function(x,y,_,E,A,D){return void 0===D&&(D=1),this.commandBuffer.push(g.GRADIENT_LINE_STYLE,x,D,y,_,E,A),this},beginPath:function(){return this.commandBuffer.push(g.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(g.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(g.FILL_PATH),this},fill:function(){return this.commandBuffer.push(g.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(g.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(g.STROKE_PATH),this},fillCircleShape:function(x){return this.fillCircle(x.x,x.y,x.radius)},strokeCircleShape:function(x){return this.strokeCircle(x.x,x.y,x.radius)},fillCircle:function(x,y,_){return this.beginPath(),this.arc(x,y,_,0,d.PI2),this.fillPath(),this},strokeCircle:function(x,y,_){return this.beginPath(),this.arc(x,y,_,0,d.PI2),this.strokePath(),this},fillRectShape:function(x){return this.fillRect(x.x,x.y,x.width,x.height)},strokeRectShape:function(x){return this.strokeRect(x.x,x.y,x.width,x.height)},fillRect:function(x,y,_,E){return this.commandBuffer.push(g.FILL_RECT,x,y,_,E),this},strokeRect:function(x,y,_,E){var A=this._lineWidth/2,D=x-A,I=x+A;return this.beginPath(),this.moveTo(x,y),this.lineTo(x,y+E),this.strokePath(),this.beginPath(),this.moveTo(x+_,y),this.lineTo(x+_,y+E),this.strokePath(),this.beginPath(),this.moveTo(D,y),this.lineTo(I+_,y),this.strokePath(),this.beginPath(),this.moveTo(D,y+E),this.lineTo(I+_,y+E),this.strokePath(),this},fillRoundedRect:function(x,y,_,E,A){void 0===A&&(A=20);var D=A,I=A,R=A,F=A;"number"!=typeof A&&(D=u(A,"tl",20),I=u(A,"tr",20),R=u(A,"bl",20),F=u(A,"br",20));var N=D>=0,V=I>=0,B=R>=0,H=F>=0;return D=Math.abs(D),I=Math.abs(I),R=Math.abs(R),F=Math.abs(F),this.beginPath(),this.moveTo(x+D,y),this.lineTo(x+_-I,y),V?this.arc(x+_-I,y+I,I,-d.TAU,0):this.arc(x+_,y,I,Math.PI,d.TAU,!0),this.lineTo(x+_,y+E-F),H?this.arc(x+_-F,y+E-F,F,0,d.TAU):this.arc(x+_,y+E,F,-d.TAU,Math.PI,!0),this.lineTo(x+R,y+E),B?this.arc(x+R,y+E-R,R,d.TAU,Math.PI):this.arc(x,y+E,R,0,-d.TAU,!0),this.lineTo(x,y+D),N?this.arc(x+D,y+D,D,-Math.PI,-d.TAU):this.arc(x,y,D,d.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(x,y,_,E,A){void 0===A&&(A=20);var D=A,I=A,R=A,F=A,N=Math.min(_,E)/2;"number"!=typeof A&&(D=u(A,"tl",20),I=u(A,"tr",20),R=u(A,"bl",20),F=u(A,"br",20));var V=D>=0,B=I>=0,H=R>=0,Q=F>=0;return D=Math.min(Math.abs(D),N),I=Math.min(Math.abs(I),N),R=Math.min(Math.abs(R),N),F=Math.min(Math.abs(F),N),this.beginPath(),this.moveTo(x+D,y),this.lineTo(x+_-I,y),this.moveTo(x+_-I,y),B?this.arc(x+_-I,y+I,I,-d.TAU,0):this.arc(x+_,y,I,Math.PI,d.TAU,!0),this.lineTo(x+_,y+E-F),this.moveTo(x+_,y+E-F),Q?this.arc(x+_-F,y+E-F,F,0,d.TAU):this.arc(x+_,y+E,F,-d.TAU,Math.PI,!0),this.lineTo(x+R,y+E),this.moveTo(x+R,y+E),H?this.arc(x+R,y+E-R,R,d.TAU,Math.PI):this.arc(x,y+E,R,0,-d.TAU,!0),this.lineTo(x,y+D),this.moveTo(x,y+D),V?this.arc(x+D,y+D,D,-Math.PI,-d.TAU):this.arc(x,y,D,d.TAU,0,!0),this.strokePath(),this},fillPointShape:function(x,y){return this.fillPoint(x.x,x.y,y)},fillPoint:function(x,y,_){return!_||_<1?_=1:(x-=_/2,y-=_/2),this.commandBuffer.push(g.FILL_RECT,x,y,_,_),this},fillTriangleShape:function(x){return this.fillTriangle(x.x1,x.y1,x.x2,x.y2,x.x3,x.y3)},strokeTriangleShape:function(x){return this.strokeTriangle(x.x1,x.y1,x.x2,x.y2,x.x3,x.y3)},fillTriangle:function(x,y,_,E,A,D){return this.commandBuffer.push(g.FILL_TRIANGLE,x,y,_,E,A,D),this},strokeTriangle:function(x,y,_,E,A,D){return this.commandBuffer.push(g.STROKE_TRIANGLE,x,y,_,E,A,D),this},strokeLineShape:function(x){return this.lineBetween(x.x1,x.y1,x.x2,x.y2)},lineBetween:function(x,y,_,E){return this.beginPath(),this.moveTo(x,y),this.lineTo(_,E),this.strokePath(),this},lineTo:function(x,y){return this.commandBuffer.push(g.LINE_TO,x,y),this},moveTo:function(x,y){return this.commandBuffer.push(g.MOVE_TO,x,y),this},strokePoints:function(x,y,_,E){void 0===y&&(y=!1),void 0===_&&(_=!1),void 0===E&&(E=x.length),this.beginPath(),this.moveTo(x[0].x,x[0].y);for(var A=1;A-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(x,y,_){var E=this.scene.sys,A=E.game.renderer;void 0===y&&(y=E.scale.width),void 0===_&&(_=E.scale.height),v.TargetCamera.setScene(this.scene),v.TargetCamera.setViewport(0,0,y,_),v.TargetCamera.scrollX=this.x,v.TargetCamera.scrollY=this.y;var D,I,R={willReadFrequently:!0};if("string"==typeof x)if(E.textures.exists(x)){var F=(D=E.textures.get(x)).getSourceImage();F instanceof HTMLCanvasElement&&(I=F.getContext("2d",R))}else I=(D=E.textures.createCanvas(x,y,_)).getSourceImage().getContext("2d",R);else x instanceof HTMLCanvasElement&&(I=x.getContext("2d",R));return I&&(this.renderCanvas(A,this,v.TargetCamera,null,I,!1),D&&D.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});v.TargetCamera=new b,S.exports=v},32768:(S,k,a)=>{var b=a(85592),T=a(20926);S.exports=function(f,h,c,u,m,d){var p=h.commandBuffer,v=p.length,x=m||f.currentContext;if(0!==v&&T(f,x,h,c,u)){c.addToRenderList(h);var E=0,A=0,D=1;x.beginPath();for(var N=0;N>>16)+","+((65280&E)>>>8)+","+(255&E)+","+p[N+3]+")",x.lineWidth=D,N+=3;break;case b.FILL_STYLE:x.fillStyle="rgba("+((16711680&(A=p[N+1]))>>>16)+","+((65280&A)>>>8)+","+(255&A)+","+p[N+2]+")",N+=2;break;case b.BEGIN_PATH:x.beginPath();break;case b.CLOSE_PATH:x.closePath();break;case b.FILL_PATH:d||x.fill();break;case b.STROKE_PATH:d||x.stroke();break;case b.FILL_RECT:d?x.rect(p[N+1],p[N+2],p[N+3],p[N+4]):x.fillRect(p[N+1],p[N+2],p[N+3],p[N+4]),N+=4;break;case b.FILL_TRIANGLE:x.beginPath(),x.moveTo(p[N+1],p[N+2]),x.lineTo(p[N+3],p[N+4]),x.lineTo(p[N+5],p[N+6]),x.closePath(),d||x.fill(),N+=6;break;case b.STROKE_TRIANGLE:x.beginPath(),x.moveTo(p[N+1],p[N+2]),x.lineTo(p[N+3],p[N+4]),x.lineTo(p[N+5],p[N+6]),x.closePath(),d||x.stroke(),N+=6;break;case b.LINE_TO:x.lineTo(p[N+1],p[N+2]),N+=2;break;case b.MOVE_TO:x.moveTo(p[N+1],p[N+2]),N+=2;break;case b.LINE_FX_TO:x.lineTo(p[N+1],p[N+2]),N+=5;break;case b.MOVE_FX_TO:x.moveTo(p[N+1],p[N+2]),N+=5;break;case b.SAVE:x.save();break;case b.RESTORE:x.restore();break;case b.TRANSLATE:x.translate(p[N+1],p[N+2]),N+=2;break;case b.SCALE:x.scale(p[N+1],p[N+2]),N+=2;break;case b.ROTATE:x.rotate(p[N+1]),N+=1;break;case b.GRADIENT_FILL_STYLE:N+=5;break;case b.GRADIENT_LINE_STYLE:N+=6}x.restore()}}},87079:(S,k,a)=>{var b=a(44603),T=a(43831);b.register("graphics",function(g,f){void 0===g&&(g={}),void 0!==f&&(g.add=f);var h=new T(this.scene,g);return g.add&&this.scene.sys.displayList.add(h),h})},1201:(S,k,a)=>{var b=a(43831);a(39429).register("graphics",function(g){return this.displayList.add(new b(this.scene,g))})},84503:(S,k,a)=>{var T,g;a(29747),T=a(77545),a(32768),g=a(32768),S.exports={renderWebGL:T,renderCanvas:g}},77545:(S,k,a)=>{var b=a(85592),T=a(91296),g=a(61340),f=a(70554),h=function(p,v,x){this.x=p,this.y=v,this.width=x},c=function(p,v,x){this.points=[],this.pointsLength=1,this.points[0]=new h(p,v,x)},u=[],m=new g;S.exports=function(p,v,x,y){if(0!==v.commandBuffer.length){x.addToRenderList(v);var _=p.pipelines.set(v.pipeline,v);p.pipelines.preBatch(v);for(var K,E=T(v,x,y).calc,A=m.loadIdentity(),D=v.commandBuffer,I=x.alpha*v.alpha,R=1,F=_.fillTint,N=_.strokeTint,V=0,B=0,H=0,G=2*Math.PI,q=[],at=0,ot=!0,J=null,it=f.getTintAppendFloatAlpha,Y=0;Y0&&(be=be%G-G):be>G?be=G:be<0&&(be=G+be%G),null===J&&(J=new c(Me+Math.cos(_i)*Ie,pi+Math.sin(_i)*Ie,R),q.push(J),le+=.01);le<1+Ke;)H=be*le+_i,V=Me+Math.cos(H)*Ie,B=pi+Math.sin(H)*Ie,J.points.push(new h(V,B,R)),le+=.01;H=be+_i,V=Me+Math.cos(H)*Ie,B=pi+Math.sin(H)*Ie,J.points.push(new h(V,B,R));break;case b.FILL_RECT:_.batchFillRect(D[++Y],D[++Y],D[++Y],D[++Y],A,E);break;case b.FILL_TRIANGLE:_.batchFillTriangle(D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],A,E);break;case b.STROKE_TRIANGLE:_.batchStrokeTriangle(D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],R,A,E);break;case b.LINE_TO:null!==J?J.points.push(new h(D[++Y],D[++Y],R)):(J=new c(D[++Y],D[++Y],R),q.push(J));break;case b.MOVE_TO:J=new c(D[++Y],D[++Y],R),q.push(J);break;case b.SAVE:u.push(A.copyToArray());break;case b.RESTORE:A.copyFromArray(u.pop());break;case b.TRANSLATE:Me=D[++Y],pi=D[++Y],A.translate(Me,pi);break;case b.SCALE:Me=D[++Y],pi=D[++Y],A.scale(Me,pi);break;case b.ROTATE:A.rotate(D[++Y])}p.pipelines.postBatch(v)}}},26479:(S,k,a)=>{var b=a(61061),T=a(83419),g=a(51708),f=a(50792),h=a(46710),c=a(95540),u=a(35154),m=a(97022),d=a(41212),p=a(88492),v=a(35072),x=a(68287),y=new T({Extends:f,initialize:function(E,A,D){f.call(this),D?A&&!Array.isArray(A)&&(A=[A]):Array.isArray(A)?d(A[0])&&(D=A,A=null):d(A)&&(D=A,A=null),this.scene=E,this.children=new v,this.isParent=!0,this.type="Group",this.classType=c(D,"classType",x),this.name=c(D,"name",""),this.active=c(D,"active",!0),this.maxSize=c(D,"maxSize",-1),this.defaultKey=c(D,"defaultKey",null),this.defaultFrame=c(D,"defaultFrame",null),this.runChildUpdate=c(D,"runChildUpdate",!1),this.createCallback=c(D,"createCallback",null),this.removeCallback=c(D,"removeCallback",null),this.createMultipleCallback=c(D,"createMultipleCallback",null),this.internalCreateCallback=c(D,"internalCreateCallback",null),this.internalRemoveCallback=c(D,"internalRemoveCallback",null),A&&this.addMultiple(A),D&&this.createMultiple(D),this.on(g.ADDED_TO_SCENE,this.addedToScene,this),this.on(g.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(_,E,A,D,I,R){if(void 0===_&&(_=0),void 0===E&&(E=0),void 0===A&&(A=this.defaultKey),void 0===D&&(D=this.defaultFrame),void 0===I&&(I=!0),void 0===R&&(R=!0),this.isFull())return null;var F=new this.classType(this.scene,_,E,A,D);return F.addToDisplayList(this.scene.sys.displayList),F.addToUpdateList(),F.visible=I,F.setActive(R),this.add(F),F},createMultiple:function(_){if(this.isFull())return[];Array.isArray(_)||(_=[_]);var E=[];if(_[0].key)for(var A=0;A<_.length;A++){var D=this.createFromConfig(_[A]);E=E.concat(D)}return E},createFromConfig:function(_){if(this.isFull())return[];this.classType=c(_,"classType",this.classType);var E=c(_,"key",void 0),A=c(_,"frame",null),D=c(_,"visible",!0),I=c(_,"active",!0),R=[];if(void 0===E)return R;Array.isArray(E)||(E=[E]),Array.isArray(A)||(A=[A]);var F=c(_,"repeat",0),N=c(_,"randomKey",!1),V=c(_,"randomFrame",!1),B=c(_,"yoyo",!1),H=c(_,"quantity",!1),Q=c(_,"frameQuantity",1),G=c(_,"max",0),K=p(E,A,{max:G,qty:H||Q,random:N,randomB:V,repeat:F,yoyo:B});_.createCallback&&(this.createCallback=_.createCallback),_.removeCallback&&(this.removeCallback=_.removeCallback),_.internalCreateCallback&&(this.internalCreateCallback=_.internalCreateCallback),_.internalRemoveCallback&&(this.internalRemoveCallback=_.internalRemoveCallback);for(var q=0;q=0;H--)if((B=G[H]).active===A){if(++Q===E)break}else B=null;return B?("number"==typeof I&&(B.x=I),"number"==typeof R&&(B.y=R),B):D?this.create(I,R,F,N,V):null},get:function(_,E,A,D,I){return this.getFirst(!1,!0,_,E,A,D,I)},getFirstAlive:function(_,E,A,D,I,R){return this.getFirst(!0,_,E,A,D,I,R)},getFirstDead:function(_,E,A,D,I,R){return this.getFirst(!1,_,E,A,D,I,R)},playAnimation:function(_,E){return b.PlayAnimation(this.children.entries,_,E),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(_){void 0===_&&(_=!0);for(var E=0,A=0;A{var b=a(44603),T=a(26479);b.register("group",function(g){return new T(this.scene,null,g)})},3385:(S,k,a)=>{var b=a(26479);a(39429).register("group",function(g,f){return this.updateList.add(new b(this.scene,g,f))})},88571:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(59819),h=new b({Extends:g,Mixins:[T.Alpha,T.BlendMode,T.Depth,T.Flip,T.GetBounds,T.Mask,T.Origin,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Size,T.TextureCrop,T.Tint,T.Transform,T.Visible,f],initialize:function(u,m,d,p,v){g.call(this,u,"Image"),this._crop=this.resetCropObject(),this.setTexture(p,v),this.setPosition(m,d),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=h},40652:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),a.batchSprite(b,b.frame,T,g)}},82459:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(88571);T.register("image",function(h,c){void 0===h&&(h={});var u=g(h,"key",null),m=g(h,"frame",null),d=new f(this.scene,0,0,u,m);return void 0!==c&&(h.add=c),b(this.scene,d,h),d})},2117:(S,k,a)=>{var b=a(88571);a(39429).register("image",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},59819:(S,k,a)=>{var T,g;a(29747),T=a(99517),g=a(40652),S.exports={renderWebGL:T,renderCanvas:g}},99517:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),this.pipeline.batchSprite(b,T,g)}},77856:(S,k,a)=>{var b={Events:a(51708),DisplayList:a(8050),GameObjectCreator:a(44603),GameObjectFactory:a(39429),UpdateList:a(45027),Components:a(31401),GetCalcMatrix:a(91296),BuildGameObject:a(25305),BuildGameObjectAnimation:a(13059),GameObject:a(95643),BitmapText:a(22186),Blitter:a(6107),Bob:a(46590),Container:a(31559),DOMElement:a(3069),DynamicBitmapText:a(2638),Extern:a(42421),Graphics:a(43831),Group:a(26479),Image:a(88571),Layer:a(93595),Particles:a(18404),PathFollower:a(1159),RenderTexture:a(591),RetroFont:a(196),Rope:a(77757),Sprite:a(68287),Text:a(50171),GetTextSize:a(14220),MeasureText:a(79557),TextStyle:a(35762),TileSprite:a(20839),Zone:a(41481),Video:a(18471),Shape:a(17803),Arc:a(23629),Curve:a(89),Ellipse:a(19921),Grid:a(30479),IsoBox:a(61475),IsoTriangle:a(16933),Line:a(57847),Polygon:a(24949),Rectangle:a(74561),Star:a(55911),Triangle:a(36931),Factories:{Blitter:a(12709),Container:a(24961),DOMElement:a(2611),DynamicBitmapText:a(72566),Extern:a(56315),Graphics:a(1201),Group:a(3385),Image:a(2117),Layer:a(20005),Particles:a(676),PathFollower:a(90145),RenderTexture:a(60505),Rope:a(96819),Sprite:a(46409),StaticBitmapText:a(34914),Text:a(68005),TileSprite:a(91681),Zone:a(84175),Video:a(89025),Arc:a(42563),Curve:a(40511),Ellipse:a(1543),Grid:a(34137),IsoBox:a(3933),IsoTriangle:a(49803),Line:a(2481),Polygon:a(64827),Rectangle:a(87959),Star:a(93697),Triangle:a(45245)},Creators:{Blitter:a(9403),Container:a(77143),DynamicBitmapText:a(11164),Graphics:a(87079),Group:a(94975),Image:a(82459),Layer:a(25179),Particles:a(92730),RenderTexture:a(34495),Rope:a(26209),Sprite:a(15567),StaticBitmapText:a(57336),Text:a(71259),TileSprite:a(14167),Zone:a(95261),Video:a(11511)}};b.Shader=a(20071),b.Mesh=a(4703),b.NineSlice=a(28103),b.PointLight=a(80321),b.Plane=a(33663),b.Factories.Shader=a(74177),b.Factories.Mesh=a(9225),b.Factories.NineSlice=a(47521),b.Factories.PointLight=a(71255),b.Factories.Plane=a(30985),b.Creators.Shader=a(54935),b.Creators.Mesh=a(20527),b.Creators.NineSlice=a(28279),b.Creators.PointLight=a(39829),b.Creators.Plane=a(56015),b.Light=a(41432),b.LightsManager=a(61356),b.LightsPlugin=a(88992),S.exports=b},93595:(S,k,a)=>{var b=a(10312),T=a(83419),g=a(31401),f=a(53774),h=a(45893),c=a(50792),u=a(51708),m=a(73162),d=a(33963),p=a(44594),v=a(19186),x=new T({Extends:m,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Mask,g.PostPipeline,g.Visible,c,d],initialize:function(_,E){m.call(this,_),c.call(this),this.scene=_,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=_.sys,this.events=_.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(b.SKIP_CHECK),E&&this.add(E),_.sys.queueDepthSort()},setActive:function(y){return this.active=y,this},setName:function(y){return this.name=y,this},setState:function(y){return this.state=y,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(y,_){return this.data||(this.data=new h(this)),this.data.set(y,_),this},incData:function(y,_){return this.data||(this.data=new h(this)),this.data.inc(y,_),this},toggleData:function(y){return this.data||(this.data=new h(this)),this.data.toggle(y),this},getData:function(y){return this.data||(this.data=new h(this)),this.data.get(y)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return f(this)},willRender:function(y){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&y.id)},getIndexList:function(){for(var y=this,_=this.parentContainer,E=[];_&&(E.unshift(_.getIndex(y)),y=_,_.parentContainer);)_=_.parentContainer;return E.unshift(this.displayList.getIndex(y)),E},addChildCallback:function(y){var _=y.displayList;_&&_!==this&&y.removeFromDisplayList(),y.displayList||(this.queueDepthSort(),y.displayList=this,y.emit(u.ADDED_TO_SCENE,y,this.scene),this.events.emit(p.ADDED_TO_SCENE,y,this.scene))},removeChildCallback:function(y){this.queueDepthSort(),y.displayList=null,y.emit(u.REMOVED_FROM_SCENE,y,this.scene),this.events.emit(p.REMOVED_FROM_SCENE,y,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(v(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(y,_){return y._depth-_._depth},getChildren:function(){return this.list},addToDisplayList:function(y){return void 0===y&&(y=this.scene.sys.displayList),this.displayList&&this.displayList!==y&&this.removeFromDisplayList(),y.exists(this)||(this.displayList=y,y.add(this,!0),y.queueDepthSort(),this.emit(u.ADDED_TO_SCENE,this,this.scene),y.events.emit(p.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var y=this.displayList||this.scene.sys.displayList;return y.exists(this)&&(y.remove(this,!0),y.queueDepthSort(),this.displayList=null,this.emit(u.REMOVED_FROM_SCENE,this,this.scene),y.events.emit(p.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(y){if(this.scene&&!this.ignoreDestroy){this.emit(u.DESTROY,this);for(var _=this.list;_.length;)_[0].destroy(y);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});S.exports=x},2956:S=>{S.exports=function(a,b,T){var g=b.list;if(0!==g.length){b.depthSort();var f=-1!==b.blendMode;f||a.setBlendMode(0);var h=b._alpha;b.mask&&b.mask.preRenderCanvas(a,null,T);for(var c=0;c{var b=a(25305),T=a(93595),g=a(44603),f=a(23568);g.register("layer",function(h,c){void 0===h&&(h={});var u=f(h,"children",null),m=new T(this.scene,u);return void 0!==c&&(h.add=c),b(this.scene,m,h),m})},20005:(S,k,a)=>{var b=a(93595);a(39429).register("layer",function(g){return this.displayList.add(new b(this.scene,g))})},33963:(S,k,a)=>{var T,g;a(29747),T=a(15869),g=a(2956),S.exports={renderWebGL:T,renderCanvas:g}},15869:S=>{S.exports=function(a,b,T){var g=b.list,f=g.length;if(0!==f){b.depthSort(),a.pipelines.preBatch(b);var h=-1!==b.blendMode;h||a.setBlendMode(0);for(var c=b.alpha,u=0;u{var b=a(96503),T=a(83419),g=a(31401),f=a(51767),h=a(70554),c=new T({Extends:b,Mixins:[g.Origin,g.ScrollFactor,g.Visible],initialize:function(m,d,p,v,x,y,_){b.call(this,m,d,p),this.color=new f(v,x,y),this.intensity=_,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(p)},displayWidth:{get:function(){return this.diameter},set:function(u){this.diameter=u}},displayHeight:{get:function(){return this.diameter},set:function(u){this.diameter=u}},width:{get:function(){return this.diameter},set:function(u){this.diameter=u}},height:{get:function(){return this.diameter},set:function(u){this.diameter=u}},willRender:function(u){return!(c.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&u.id)},setColor:function(u){var m=h.getFloatsFromUintRGB(u);return this.color.set(m[0],m[1],m[2]),this},setIntensity:function(u){return this.intensity=u,this},setRadius:function(u){return this.radius=u,this}});c.RENDER_MASK=15,S.exports=c},61356:(S,k,a)=>{var b=a(81491),T=a(83419),g=a(20339),f=a(41432),h=a(80321),c=a(51767),u=a(19133),m=a(19186),d=a(70554),p=new T({initialize:function(){this.lights=[],this.ambientColor=new c(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(v,x,y,_,E,A){return this.systems.displayList.add(new h(this.scene,v,x,y,_,E,A))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(v){for(var x=this.lights,y=v.worldView,_=[],E=0;Ethis.maxLights&&(m(_,this.sortByDistance),_=_.slice(0,this.maxLights)),this.visibleLights=_.length,_},sortByDistance:function(v,x){return v.distance>=x.distance},setAmbientColor:function(v){var x=d.getFloatsFromUintRGB(v);return this.ambientColor.set(x[0],x[1],x[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(v,x,y,_,E){void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=128),void 0===_&&(_=16777215),void 0===E&&(E=1);var A=d.getFloatsFromUintRGB(_),D=new f(v,x,y,A[0],A[1],A[2],E);return this.lights.push(D),D},removeLight:function(v){var x=this.lights.indexOf(v);return x>=0&&u(this.lights,x),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});S.exports=p},88992:(S,k,a)=>{var b=a(83419),T=a(61356),g=a(37277),f=a(44594),h=new b({Extends:T,initialize:function(u){this.scene=u,this.systems=u.sys,u.sys.settings.isBooted||u.sys.events.once(f.BOOT,this.boot,this),T.call(this)},boot:function(){var c=this.systems.events;c.on(f.SHUTDOWN,this.shutdown,this),c.on(f.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});g.register("LightsPlugin",h,"lights"),S.exports=h},4703:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(39506),f=a(83997),h=a(95643),c=a(34684),u=a(92515),m=a(91296),d=a(37867),p=a(29807),v=a(43396),x=a(19186),y=a(25836),_=a(39318),E=new b({Extends:h,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Mask,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Size,T.Texture,T.Transform,T.Visible,p],initialize:function(D,I,R,F,N,V,B,H,Q,G,K,q){void 0===I&&(I=0),void 0===R&&(R=0),void 0===F&&(F="__WHITE"),h.call(this,D,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new y,this.modelScale=new y(1,1,1),this.modelRotation=new y,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new d,this.viewPosition=new y,this.viewMatrix=new d,this.projectionMatrix=new d,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.displayOriginX=0,this.displayOriginY=0;var at=D.sys.renderer;this.setPosition(I,R),this.setTexture(F,N),this.setSize(at.width,at.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(at.width,at.height),V&&this.addVertices(V,B,H,Q,G,K,q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(A){return this.viewPosition.addScale(y.LEFT,A),this.dirtyCache[10]=1,this},panY:function(A){return this.viewPosition.y+=y.DOWN.y*A,this.dirtyCache[10]=1,this},panZ:function(A){return this.viewPosition.z+=A,this.dirtyCache[10]=1,this},setPerspective:function(A,D,I,R,F){return void 0===I&&(I=45),void 0===R&&(R=.01),void 0===F&&(F=1e3),this.fov=I,this.projectionMatrix.perspective(g(I),A/D,R,F),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(A,D,I,R){return void 0===A&&(A=this.scene.sys.renderer.getAspectRatio()),void 0===D&&(D=1),void 0===I&&(I=-1e3),void 0===R&&(R=1e3),this.fov=0,this.projectionMatrix.ortho(-A,A,-D,D,I,R),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(A){A.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(A,D,I,R,F,N,V,B,H){var G,Q=this.scene.sys.cache.obj.get(A);return Q&&(G=c(Q,this,D,I,R,F,N,V,B,H)),(!G||0===G.verts.length)&&console.warn("Mesh.addVerticesFromObj data empty:",A),this},sortByDepth:function(A,D){return A.depth-D.depth},depthSort:function(){return x(this.faces,this.sortByDepth),this},addVertex:function(A,D,I,R,F,N,V){var B=new _(A,D,I,R,F,N,V);return this.vertices.push(B),B},addFace:function(A,D,I){var R=new f(A,D,I);return this.faces.push(R),this.dirtyCache[9]=-1,R},addVertices:function(A,D,I,R,F,N,V){var B=u(A,D,I,R,F,N,V);return B?(this.faces=this.faces.concat(B.faces),this.vertices=this.vertices.concat(B.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(A){return this.faces[A]},hasFaceAt:function(A,D,I){void 0===I&&(I=this.scene.sys.cameras.main);for(var R=m(this,I).calc,F=this.faces,N=0;N{S.exports=function(){}},20527:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(35154),h=a(4703);T.register("mesh",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=g(c,"frame",null),p=f(c,"vertices",[]),v=f(c,"uvs",[]),x=f(c,"indicies",[]),y=f(c,"containsZ",!1),_=f(c,"normals",[]),E=f(c,"colors",16777215),A=f(c,"alphas",1),D=new h(this.scene,0,0,m,d,p,v,x,y,_,E,A);return void 0!==u&&(c.add=u),b(this.scene,D,c),D})},9225:(S,k,a)=>{var b=a(4703);a(39429).register("mesh",function(g,f,h,c,u,m,d,p,v,x,y){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p,v,x,y))})},29807:(S,k,a)=>{var T,g;a(29747),T=a(48833),g=a(36488),S.exports={renderWebGL:T,renderCanvas:g}},48833:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){var u=f.faces,m=u.length;if(0!==m){h.addToRenderList(f);var d=g.pipelines.set(f.pipeline,f),p=b(f,h,c).calc;g.pipelines.preBatch(f);for(var v=d.setGameObject(f),x=d.vertexViewF32,y=d.vertexViewU32,_=d.vertexCount*d.currentShader.vertexComponentCount-1,E=f.tintFill,A=[],D=f.debugCallback,I=p.a,R=p.b,F=p.c,N=p.d,V=p.e,B=p.f,H=f.viewPosition.z,Q=f.hideCCW,G=h.roundPixels,K=h.alpha*f.alpha,q=0,at=0;at{var b=a(83419),T=a(31401),g=a(95643),f=a(78023),h=a(39318),c=new b({Extends:g,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.GetBounds,T.Mask,T.Origin,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Texture,T.Transform,T.Visible,f],initialize:function(m,d,p,v,x,y,_,E,A,D,I){g.call(this,m,"NineSlice"),this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.tint=16777215,this.tintFill=!1;var R=m.textures.getFrame(v,x);this.is3Slice=!D&&!I,R&&R.scale9&&(this.is3Slice=R.is3Slice);for(var F=this.is3Slice?18:54,N=0;N{var b=a(25305),T=a(44603),g=a(23568),f=a(35154),h=a(28103);T.register("nineslice",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=g(c,"frame",null),p=f(c,"width",256),v=f(c,"height",256),x=f(c,"leftWidth",10),y=f(c,"rightWidth",10),_=f(c,"topHeight",0),E=f(c,"bottomHeight",0),A=new h(this.scene,0,0,m,d,p,v,x,y,_,E);return void 0!==u&&(c.add=u),b(this.scene,A,c),A})},47521:(S,k,a)=>{var b=a(28103);a(39429).register("nineslice",function(g,f,h,c,u,m,d,p,v,x){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p,v,x))})},78023:(S,k,a)=>{var T,g=a(29747);T=a(52230),S.exports={renderWebGL:T,renderCanvas:g}},52230:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){var m=h.vertices,d=m.length;if(0!==d){c.addToRenderList(h);var p=f.pipelines.set(h.pipeline,h),v=b(h,c,u,!1).calc;f.pipelines.preBatch(h);var x=p.setGameObject(h),y=p.vertexViewF32,_=p.vertexViewU32,E=p.vertexCount*p.currentShader.vertexComponentCount-1,A=c.roundPixels,D=h.tintFill,R=T.getTintAppendFloatAlpha(h.tint,c.alpha*h.alpha),F=p.vertexAvailable(),N=-1;F{var b=a(83419),T=a(44777),g=a(37589),f=a(6113),h=a(91389),c=a(90664),u=new b({Extends:T,initialize:function(d){T.call(this,d,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var m=this.propertyValue,d=m,p=this.defaultEmit,v=this.defaultUpdate;if(9===this.method){this.start=m[0],this.ease=f("Linear"),this.interpolation=h("linear"),p=this.easedValueEmit,v=this.easeValueUpdate,d=m[0],this.active=!0;for(var x=0;x{var b=a(30976),T=a(45319),g=a(83419),f=a(99472),h=a(6113),c=a(95540),u=a(91389),m=a(77720),d=a(15994),p=new g({initialize:function(x,y,_){void 0===_&&(_=!1),this.propertyKey=x,this.propertyValue=y,this.defaultValue=y,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=_,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0},loadConfig:function(v,x){void 0===v&&(v={}),x&&(this.propertyKey=x),this.propertyValue=c(v,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(v){var x;switch(this.method){case 1:case 3:case 8:x=v;break;case 2:this.propertyValue.indexOf(v)>=0&&(x=v);break;case 4:x=m(v,(this.end-this.start)/this.steps),this.counter=x;break;case 5:case 6:case 7:x=T(v,this.start,this.end);break;case 9:x=this.start[0]}return this.current=x,this},getMethod:function(){var v=this.propertyValue;if(null===v)return 0;var x=typeof v;if("number"===x)return 1;if(Array.isArray(v))return 2;if("function"===x)return 3;if("object"===x){if(this.hasBoth(v,"start","end"))return this.has(v,"steps")?4:5;if(this.hasBoth(v,"min","max"))return 6;if(this.has(v,"random"))return 7;if(this.hasEither(v,"onEmit","onUpdate"))return 8;if(this.hasEither(v,"values","interpolation"))return 9}return 0},setMethods:function(){var v=this.propertyValue,x=v,y=this.defaultEmit,_=this.defaultUpdate;switch(this.method){case 1:y=this.staticValueEmit;break;case 2:y=this.randomStaticValueEmit,x=v[0];break;case 3:this._onEmit=v,y=this.proxyEmit;break;case 4:this.start=v.start,this.end=v.end,this.steps=v.steps,this.counter=this.start,this.yoyo=!!this.has(v,"yoyo")&&v.yoyo,this.direction=0,y=this.steppedEmit,x=this.start;break;case 5:this.start=v.start,this.end=v.end;var E=this.has(v,"ease")?v.ease:"Linear";this.ease=h(E,v.easeParams),y=this.has(v,"random")&&v.random?this.randomRangedValueEmit:this.easedValueEmit,_=this.easeValueUpdate,x=this.start;break;case 6:this.start=v.min,this.end=v.max,y=this.has(v,"int")&&v.int?this.randomRangedIntEmit:this.randomRangedValueEmit,x=this.start;break;case 7:var A=v.random;Array.isArray(A)&&(this.start=A[0],this.end=A[1]),y=this.randomRangedIntEmit,x=this.start;break;case 8:this._onEmit=this.has(v,"onEmit")?v.onEmit:this.defaultEmit,this._onUpdate=this.has(v,"onUpdate")?v.onUpdate:this.defaultUpdate,y=this.proxyEmit,_=this.proxyUpdate;break;case 9:this.start=v.values;var D=this.has(v,"ease")?v.ease:"Linear";this.ease=h(D,v.easeParams),this.interpolation=u(v.interpolation),y=this.easedValueEmit,_=this.easeValueUpdate,x=this.start[0]}return this.onEmit=y,this.onUpdate=_,this.current=x,this},has:function(v,x){return v.hasOwnProperty(x)},hasBoth:function(v,x,y){return v.hasOwnProperty(x)&&v.hasOwnProperty(y)},hasEither:function(v,x,y){return v.hasOwnProperty(x)||v.hasOwnProperty(y)},defaultEmit:function(v,x,y){return y},defaultUpdate:function(v,x,y,_){return _},proxyEmit:function(v,x,y){var _=this._onEmit(v,x,y);return this.current=_,_},proxyUpdate:function(v,x,y,_){var E=this._onUpdate(v,x,y,_);return this.current=E,E},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var v=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[v],this.current},randomRangedValueEmit:function(v,x){var y=f(this.start,this.end);return v&&v.data[x]&&(v.data[x].min=y,v.data[x].max=this.end),this.current=y,y},randomRangedIntEmit:function(v,x){var y=b(this.start,this.end);return v&&v.data[x]&&(v.data[x].min=y,v.data[x].max=this.end),this.current=y,y},steppedEmit:function(){var v=this.counter,x=v,y=(this.end-this.start)/this.steps;return this.yoyo?(0===this.direction?(x+=y)>=this.end&&(x=this.end-(x-this.end),this.direction=1):(x-=y)<=this.start&&(x=this.start+(this.start-x),this.direction=0),this.counter=x):this.counter=d(x+y,this.start,this.end),this.current=v,v},easedValueEmit:function(v,x){if(v&&v.data[x]){var y=v.data[x];y.min=this.start,y.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(v,x,y){var E,_=v.data[x],A=this.ease(y);return E=this.interpolation?this.interpolation(this.start,A):(_.max-_.min)*A+_.min,this.current=E,E},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});S.exports=p},24502:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(20286),f=new b({Extends:g,initialize:function(c,u,m,d,p){if("object"==typeof c){var v=c;c=T(v,"x",0),u=T(v,"y",0),m=T(v,"power",0),d=T(v,"epsilon",100),p=T(v,"gravity",50)}else void 0===c&&(c=0),void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=100),void 0===p&&(p=50);g.call(this,c,u,!0),this._gravity=p,this._power=m*p,this._epsilon=d*d},update:function(h,c){var u=this.x-h.x,m=this.y-h.y,d=u*u+m*m;if(0!==d){var p=Math.sqrt(d);d{var b=a(9674),T=a(45319),g=a(83419),f=a(39506),h=a(87841),c=a(11520),u=a(26099),m=new g({initialize:function(p){this.emitter=p,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new u,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=p.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new b(this)),this.bounds=new h},emit:function(d,p,v,x,y,_){return this.emitter.emit(d,p,v,x,y,_)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(d,p){void 0===d&&(d=0),void 0===p&&(p=0),this.x=d,this.y=p},fire:function(d,p){var v=this.emitter,x=v.ops,y=v.getAnim();if(y?this.anims.play(y):(this.frame=v.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(v.getEmitZone(this),this.x+=void 0===d?x.x.onEmit(this,"x"):x.x.steps>0?d+x.x.onEmit(this,"x"):d,this.y+=void 0===p?x.y.onEmit(this,"y"):x.y.steps>0?p+x.y.onEmit(this,"y"):p,this.life=x.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=x.delay.onEmit(this,"delay"),this.holdCurrent=x.hold.onEmit(this,"hold"),this.scaleX=x.scaleX.onEmit(this,"scaleX"),this.scaleY=x.scaleY.active?x.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=x.rotate.onEmit(this,"rotate"),this.rotation=f(this.angle),v.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),0===this.delayCurrent&&v.getDeathZone(this))return this.lifeCurrent=0,!1;var _=x.speedX.onEmit(this,"speedX"),E=x.speedY.active?x.speedY.onEmit(this,"speedY"):_;if(v.radial){var A=f(x.angle.onEmit(this,"angle"));this.velocityX=Math.cos(A)*Math.abs(_),this.velocityY=Math.sin(A)*Math.abs(E)}else if(v.moveTo){var D=x.moveToX.onEmit(this,"moveToX"),I=x.moveToY.onEmit(this,"moveToY"),R=this.life/1e3;this.velocityX=(D-this.x)/R,this.velocityY=(I-this.y)/R}else this.velocityX=_,this.velocityY=E;return v.acceleration&&(this.accelerationX=x.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=x.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=x.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=x.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=x.bounce.onEmit(this,"bounce"),this.alpha=x.alpha.onEmit(this,"alpha"),this.tint=x.color.active?x.color.onEmit(this,"tint"):x.tint.onEmit(this,"tint"),!0},update:function(d,p,v){if(this.lifeCurrent<=0)return!(this.holdCurrent>0)||(this.holdCurrent-=d,this.holdCurrent<=0);if(this.delayCurrent>0)return this.delayCurrent-=d,!1;this.anims&&this.anims.update(0,d);var x=this.emitter,y=x.ops,_=1-this.lifeCurrent/this.life;if(this.lifeT=_,this.x=y.x.onUpdate(this,"x",_,this.x),this.y=y.y.onUpdate(this,"y",_,this.y),x.moveTo){var E=y.moveToX.onUpdate(this,"moveToX",_,x.moveToX),A=y.moveToY.onUpdate(this,"moveToY",_,x.moveToY),D=this.lifeCurrent/1e3;this.velocityX=(E-this.x)/D,this.velocityY=(A-this.y)/D}return this.computeVelocity(x,d,p,v,_),this.scaleX=y.scaleX.onUpdate(this,"scaleX",_,this.scaleX),this.scaleY=y.scaleY.active?y.scaleY.onUpdate(this,"scaleY",_,this.scaleY):this.scaleX,this.angle=y.rotate.onUpdate(this,"rotate",_,this.angle),this.rotation=f(this.angle),x.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=T(y.alpha.onUpdate(this,"alpha",_,this.alpha),0,1),this.tint=y.color.active?y.color.onUpdate(this,"color",_,this.tint):y.tint.onUpdate(this,"tint",_,this.tint),this.lifeCurrent-=d,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(d,p,v,x,y){var _=d.ops,E=this.velocityX,A=this.velocityY,D=_.accelerationX.onUpdate(this,"accelerationX",y,this.accelerationX),I=_.accelerationY.onUpdate(this,"accelerationY",y,this.accelerationY),R=_.maxVelocityX.onUpdate(this,"maxVelocityX",y,this.maxVelocityX),F=_.maxVelocityY.onUpdate(this,"maxVelocityY",y,this.maxVelocityY);this.bounce=_.bounce.onUpdate(this,"bounce",y,this.bounce),A+=d.gravityY*v+I*v,E=T(E+=d.gravityX*v+D*v,-R,R),A=T(A,-F,F),this.velocityX=E,this.velocityY=A,this.x+=E*v,this.y+=A*v,d.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var N=0;N{var b=a(83419),T=a(20286),g=a(87841),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y){void 0===p&&(p=!0),void 0===v&&(v=!0),void 0===x&&(x=!0),void 0===y&&(y=!0),T.call(this,c,u,!0),this.bounds=new g(c,u,m,d),this.collideLeft=p,this.collideRight=v,this.collideTop=x,this.collideBottom=y},update:function(h){var c=this.bounds,u=-h.bounce,m=h.worldPosition;m.xc.right&&this.collideRight&&(h.x-=m.x-c.right,h.velocityX*=u),m.yc.bottom&&this.collideBottom&&(h.y-=m.y-c.bottom,h.velocityY*=u)}});S.exports=f},31600:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(53774),f=a(43459),h=a(26388),c=a(19909),u=a(76472),m=a(44777),d=a(20696),p=a(95643),v=a(95540),x=a(26546),y=a(24502),_=a(1985),E=a(97022),A=a(86091),D=a(73162),I=a(20074),R=a(269),F=a(56480),N=a(69601),V=a(68875),B=a(87841),H=a(59996),Q=a(72905),G=a(90668),K=a(19186),q=a(61340),at=a(26099),ot=a(15994),J=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],it=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new b({Extends:p,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Mask,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Texture,T.Transform,T.Visible,G],initialize:function(nt,ht,gt,wt,St){p.call(this,nt,"ParticleEmitter"),this.particleClass=F,this.config=null,this.ops={accelerationX:new m("accelerationX",0),accelerationY:new m("accelerationY",0),alpha:new m("alpha",1),angle:new m("angle",{min:0,max:360},!0),bounce:new m("bounce",0),color:new u("color"),delay:new m("delay",0,!0),hold:new m("hold",0,!0),lifespan:new m("lifespan",1e3,!0),maxVelocityX:new m("maxVelocityX",1e4),maxVelocityY:new m("maxVelocityY",1e4),moveToX:new m("moveToX",0),moveToY:new m("moveToY",0),quantity:new m("quantity",1,!0),rotate:new m("rotate",0),scaleX:new m("scaleX",1),scaleY:new m("scaleY",1),speedX:new m("speedX",0,!0),speedY:new m("speedY",0,!0),tint:new m("tint",16777215),x:new m("x",0),y:new m("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new at,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new q,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new D(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(ht,gt),this.setTexture(wt),St&&this.setConfig(St)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(j){if(!j)return this;this.config=j;var nt=0,ht="",gt=this.ops;for(nt=0;nt=this.animQuantity&&(this.animCounter=0,this.currentAnim=ot(this.currentAnim+1,0,nt)),ht},setAnim:function(j,nt,ht){void 0===nt&&(nt=!0),void 0===ht&&(ht=1),this.randomAnim=nt,this.animQuantity=ht,this.currentAnim=0;var gt=typeof j;if(this.anims.length=0,Array.isArray(j))this.anims=this.anims.concat(j);else if("string"===gt)this.anims.push(j);else if("object"===gt){var wt=j;(j=v(wt,"anims",null))&&(this.anims=this.anims.concat(j));var St=v(wt,"cycle",!1);this.randomAnim=!St,this.animQuantity=v(wt,"quantity",ht)}return 1===this.anims.length&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(j){return void 0===j&&(j=!0),this.radial=j,this},addParticleBounds:function(j,nt,ht,gt,wt,St,Bt,Yt){if("object"==typeof j){var $t=j;j=$t.x,nt=$t.y,ht=E($t,"w")?$t.w:$t.width,gt=E($t,"h")?$t.h:$t.height}return this.addParticleProcessor(new N(j,nt,ht,gt,wt,St,Bt,Yt))},setParticleSpeed:function(j,nt){return void 0===nt&&(nt=j),this.ops.speedX.onChange(j),j===nt?this.ops.speedY.active=!1:this.ops.speedY.onChange(nt),this.radial=!0,this},setParticleScale:function(j,nt){return void 0===j&&(j=1),void 0===nt&&(nt=j),this.ops.scaleX.onChange(j),this.ops.scaleY.onChange(nt),this},setParticleGravity:function(j,nt){return this.gravityX=j,this.gravityY=nt,this},setParticleAlpha:function(j){return this.ops.alpha.onChange(j),this},setParticleTint:function(j){return this.ops.tint.onChange(j),this},setEmitterAngle:function(j){return this.ops.angle.onChange(j),this},setParticleLifespan:function(j){return this.ops.lifespan.onChange(j),this},setQuantity:function(j){return this.quantity=j,this},setFrequency:function(j,nt){return this.frequency=j,this.flowCounter=j>0?j:0,nt&&(this.quantity=nt),this},addDeathZone:function(j){Array.isArray(j)||(j=[j]);for(var nt,ht=[],gt=0;gt-1&&(this.zoneTotal++,this.zoneTotal===gt.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===ht&&(this.zoneIndex=0)))}},getDeathZone:function(j){for(var nt=this.deathZones,ht=0;ht=0&&(this.zoneIndex=nt),this},addParticleProcessor:function(j){return this.processors.exists(j)||(j.emitter&&j.emitter.removeParticleProcessor(j),this.processors.add(j),j.emitter=this),j},removeParticleProcessor:function(j){return this.processors.exists(j)&&(this.processors.remove(j,!0),j.emitter=null),j},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(j){return this.addParticleProcessor(new y(j))},reserve:function(j){var nt=this.dead;if(this.maxParticles>0){var ht=this.getParticleCount();ht+j>this.maxParticles&&(j=this.maxParticles-(ht+j))}for(var gt=0;gt0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(j,nt){return void 0===j?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof j&&(this.emitCallback=j,nt&&(this.emitCallbackScope=nt)),this},onParticleDeath:function(j,nt){return void 0===j?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof j&&(this.deathCallback=j,nt&&(this.deathCallbackScope=nt)),this},killAll:function(){for(var j=this.dead,nt=this.alive;nt.length>0;)j.push(nt.pop());return this},forEachAlive:function(j,nt){for(var ht=this.alive,gt=ht.length,wt=0;wt0&&this.fastForward(j),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==nt&&(this.duration=Math.abs(nt)),this.emit(d.START,this)),this},stop:function(j){return void 0===j&&(j=!1),this.emitting&&(this.emitting=!1,j&&this.killAll(),this.emit(d.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(j,nt){return void 0===j&&(j=""),void 0===nt&&(nt=this.true),this.sortProperty=j,this.sortOrderAsc=nt,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(j){return this.sortCallback=""!==this.sortProperty?this.depthSortCallback:null,this},depthSort:function(){return K(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(j,nt){var ht=this.sortProperty;return this.sortOrderAsc?j[ht]-nt[ht]:nt[ht]-j[ht]},flow:function(j,nt,ht){return void 0===nt&&(nt=1),this.emitting=!1,this.frequency=j,this.quantity=nt,void 0!==ht&&(this.stopAfter=ht),this.start()},explode:function(j,nt,ht){this.frequency=-1,this.resetCounters(-1,!0);var gt=this.emitParticle(j,nt,ht);return this.emit(d.EXPLODE,this,gt),gt},emitParticleAt:function(j,nt,ht){return this.emitParticle(ht,j,nt)},emitParticle:function(j,nt,ht){if(!this.atLimit()){void 0===j&&(j=this.ops.quantity.onEmit());for(var gt=this.dead,wt=this.stopAfter,St=this.follow?this.follow.x+this.followOffset.x:nt,Bt=this.follow?this.follow.y+this.followOffset.y:ht,Yt=0;Yt0&&(this.stopCounter++,this.stopCounter>=wt)||this.atLimit())break}return $t}},fastForward:function(j,nt){void 0===nt&&(nt=1e3/60);var ht=0;for(this.skipping=!0;ht0){var ne=this.deathCallback,le=this.deathCallbackScope;for(Bt=$t-1;Bt>=0;Bt--){var Me=Yt[Bt];wt.splice(Me.index,1),St.push(Me.particle),ne&&ne.call(le,Me.particle),Me.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=nt;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=nt,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===wt.length&&(this.completeFlag=0,this.emit(d.COMPLETE,this))},overlap:function(j){for(var nt=this.getWorldTransformMatrix(),ht=this.alive,gt=ht.length,wt=[],St=0;St0){var qt=0;for(this.skipping=!0;qt0&&A(gt,j,j),gt},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(j){this.ops.x.onChange(j)}},particleY:{get:function(){return this.ops.y.current},set:function(j){this.ops.y.onChange(j)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(j){this.ops.accelerationX.onChange(j)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(j){this.ops.accelerationY.onChange(j)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(j){this.ops.maxVelocityX.onChange(j)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(j){this.ops.maxVelocityY.onChange(j)}},speed:{get:function(){return this.ops.speedX.current},set:function(j){this.ops.speedX.onChange(j),this.ops.speedY.onChange(j)}},speedX:{get:function(){return this.ops.speedX.current},set:function(j){this.ops.speedX.onChange(j)}},speedY:{get:function(){return this.ops.speedY.current},set:function(j){this.ops.speedY.onChange(j)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(j){this.ops.moveToX.onChange(j)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(j){this.ops.moveToY.onChange(j)}},bounce:{get:function(){return this.ops.bounce.current},set:function(j){this.ops.bounce.onChange(j)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(j){this.ops.scaleX.onChange(j)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(j){this.ops.scaleY.onChange(j)}},particleColor:{get:function(){return this.ops.color.current},set:function(j){this.ops.color.onChange(j)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(j){this.ops.color.setEase(j)}},particleTint:{get:function(){return this.ops.tint.current},set:function(j){this.ops.tint.onChange(j)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(j){this.ops.alpha.onChange(j)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(j){this.ops.lifespan.onChange(j)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(j){this.ops.angle.onChange(j)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(j){this.ops.rotate.onChange(j)}},quantity:{get:function(){return this.ops.quantity.current},set:function(j){this.ops.quantity.onChange(j)}},delay:{get:function(){return this.ops.delay.current},set:function(j){this.ops.delay.onChange(j)}},hold:{get:function(){return this.ops.hold.current},set:function(j){this.ops.hold.onChange(j)}},flowCounter:{get:function(){return this.counters[0]},set:function(j){this.counters[0]=j}},frameCounter:{get:function(){return this.counters[1]},set:function(j){this.counters[1]=j}},animCounter:{get:function(){return this.counters[2]},set:function(j){this.counters[2]=j}},elapsed:{get:function(){return this.counters[3]},set:function(j){this.counters[3]=j}},stopCounter:{get:function(){return this.counters[4]},set:function(j){this.counters[4]=j}},completeFlag:{get:function(){return this.counters[5]},set:function(j){this.counters[5]=j}},zoneIndex:{get:function(){return this.counters[6]},set:function(j){this.counters[6]=j}},zoneTotal:{get:function(){return this.counters[7]},set:function(j){this.counters[7]=j}},currentFrame:{get:function(){return this.counters[8]},set:function(j){this.counters[8]=j}},currentAnim:{get:function(){return this.counters[9]},set:function(j){this.counters[9]=j}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var j,nt=this.ops;for(j=0;j{var b=a(59996),T=a(61340),g=new T,f=new T,h=new T,c=new T;S.exports=function(m,d,p,v){var x=g,y=f,_=h,E=c;v?(E.loadIdentity(),E.multiply(v),E.translate(d.x,d.y),E.rotate(d.rotation),E.scale(d.scaleX,d.scaleY)):E.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var A=m.currentContext,D=p.roundPixels,I=p.alpha,R=d.alpha,F=d.alive,N=F.length,V=d.viewBounds;if(d.visible&&0!==N&&(!V||b(V,p.worldView))){d.sortCallback&&d.depthSort(),p.addToRenderList(d);var B=d.scrollFactorX,H=d.scrollFactorY;A.save(),A.globalCompositeOperation=m.blendModes[d.blendMode];for(var Q=0;Q0&&at.height>0){var ot=-q.halfWidth,J=-q.halfHeight;A.globalAlpha=K,A.save(),y.setToContext(A),D&&(ot=Math.round(ot),J=Math.round(J)),A.imageSmoothingEnabled=!q.source.scaleMode,A.drawImage(q.source.image,at.x,at.y,at.width,at.height,ot,J,at.width,at.height),A.restore()}}}A.restore()}}},92730:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(95540),h=a(31600);T.register("particles",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=f(c,"config",null),p=new h(this.scene,0,0,m);return void 0!==u&&(c.add=u),b(this.scene,p,c),d&&p.setConfig(d),p})},676:(S,k,a)=>{var b=a(39429),T=a(31600);b.register("particles",function(g,f,h,c){return void 0!==g&&"string"==typeof g&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new T(this.scene,g,f,h,c))})},90668:(S,k,a)=>{var T,g;a(29747),T=a(21188),g=a(9871),S.exports={renderWebGL:T,renderCanvas:g}},21188:(S,k,a)=>{var b=a(59996),T=a(61340),g=a(70554),f=new T,h=new T,c=new T,u=new T;S.exports=function(d,p,v,x){var y=d.pipelines.set(p.pipeline),_=f,E=h,A=c,D=u;x?(D.loadIdentity(),D.multiply(x),D.translate(p.x,p.y),D.rotate(p.rotation),D.scale(p.scaleX,p.scaleY)):D.applyITRS(p.x,p.y,p.rotation,p.scaleX,p.scaleY);var I=g.getTintAppendFloatAlpha,R=v.alpha,F=p.alpha;d.pipelines.preBatch(p);var N=p.alive,V=N.length,B=p.viewBounds;if(0!==V&&(!B||b(B,v.worldView))){p.sortCallback&&p.depthSort(),v.addToRenderList(p),_.copyFrom(v.matrix),_.multiplyWithOffset(D,-v.scrollX*p.scrollFactorX,-v.scrollY*p.scrollFactorY),d.setBlendMode(p.blendMode),p.mask&&(p.mask.preRenderWebGL(d,p,v),d.pipelines.set(p.pipeline));for(var Q,G,H=p.tintFill,K=0;K{var T=new(a(83419))({initialize:function(f,h,c){void 0===f&&(f=0),void 0===h&&(h=0),void 0===c&&(c=!0),this.x=f,this.y=h,this.active=c},update:function(){},destroy:function(){this.emitter=null}});S.exports=T},9774:S=>{S.exports="complete"},812:S=>{S.exports="deathzone"},30522:S=>{S.exports="explode"},96695:S=>{S.exports="start"},18677:S=>{S.exports="stop"},20696:(S,k,a)=>{S.exports={COMPLETE:a(9774),DEATH_ZONE:a(812),EXPLODE:a(30522),START:a(96695),STOP:a(18677)}},18404:(S,k,a)=>{S.exports={EmitterColorOp:a(76472),EmitterOp:a(44777),Events:a(20696),GravityWell:a(24502),Particle:a(56480),ParticleBounds:a(69601),ParticleEmitter:a(31600),ParticleProcessor:a(20286),Zones:a(21024)}},26388:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.source=f,this.killOnEnter=h},willKill:function(g){var f=this.source.contains(g.x,g.y);return f&&this.killOnEnter||!f&&!this.killOnEnter}});S.exports=T},19909:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u,m,d){void 0===u&&(u=!1),void 0===m&&(m=!0),void 0===d&&(d=-1),this.source=f,this.points=[],this.quantity=h,this.stepRate=c,this.yoyo=u,this.counter=-1,this.seamless=m,this._length=0,this._direction=0,this.total=d,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var g=this.points[0],f=this.points[this.points.length-1];g.x===f.x&&g.y===f.y&&this.points.pop()}var h=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(g){return this.source=g,this.updateSource()},getPoint:function(g){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var f=this.points[this.counter];f&&(g.x=f.x,g.y=f.y)}});S.exports=T},68875:(S,k,a)=>{var b=a(83419),T=a(26099),g=new b({initialize:function(h){this.source=h,this._tempVec=new T,this.total=-1},getPoint:function(f){var h=this._tempVec;this.source.getRandomPoint(h),f.x=h.x,f.y=h.y}});S.exports=g},21024:(S,k,a)=>{S.exports={DeathZone:a(26388),EdgeZone:a(19909),RandomZone:a(68875)}},1159:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(68287),f=new b({Extends:g,Mixins:[T.PathFollower],initialize:function(c,u,m,d,p,v){g.call(this,c,m,d,p,v),this.path=u},preUpdate:function(h,c){this.anims.update(h,c),this.pathUpdate(h)}});S.exports=f},90145:(S,k,a)=>{var b=a(39429),T=a(1159);b.register("follower",function(g,f,h,c,u){var m=new T(this.scene,g,f,h,c,u);return this.displayList.add(m),this.updateList.add(m),m})},33663:(S,k,a)=>{var b=a(9674),T=a(83419),g=a(48803),f=a(90664),h=a(4703),c=a(45650),u=new T({Extends:h,initialize:function(d,p,v,x,y,_,E,A){x||(x="__DEFAULT"),h.call(this,d,p,v,x,y),this.type="Plane",this.anims=new b(this),this._checkerboard=null,this.hideCCW=!1,this.setGridSize(_,E,A),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return.5}},originY:{get:function(){return.5}},setGridSize:function(m,d,p){void 0===m&&(m=8),void 0===d&&(d=8),void 0===p&&(p=!1);var v=!1;return p&&(v=!0),this.gridWidth=m,this.gridHeight=d,this.isTiled=p,this.clear(),g({mesh:this,widthSegments:m,heightSegments:d,isOrtho:!1,tile:p,flipY:v}),this},setSizeToFrame:function(m){void 0===m&&(m=!0);var d=this.frame;if(this.setPerspective(this.width/d.width,this.height/d.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!m)return this;var D,I,p=this.gridWidth,v=this.gridHeight,x=this.vertices,y=d.u0,_=d.u1,E=d.v0,A=d.v1,R=0;if(this.isTiled)for(E=d.v1,A=d.v0,I=0;I7&&D>7?E.push(y.r,y.g,y.b,p):E.push(_.r,_.g,_.b,v);var I=this.scene.sys.textures.addUint8Array(c(),new Uint8Array(E),16,16);return this.removeCheckerboard(),this.setTexture(I),this.setSizeToFrame(),this.setViewHeight(x),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(m,d){return this.anims.play(m,d)},playReverse:function(m,d){return this.anims.playReverse(m,d)},playAfterDelay:function(m,d){return this.anims.playAfterDelay(m,d)},playAfterRepeat:function(m,d){return this.anims.playAfterRepeat(m,d)},stop:function(){return this.anims.stop()},stopAfterDelay:function(m){return this.anims.stopAfterDelay(m)},stopAfterRepeat:function(m){return this.anims.stopAfterRepeat(m)},stopOnFrame:function(m){return this.anims.stopOnFrame(m)},preUpdate:function(m,d){h.prototype.preUpdate.call(this,m,d),this.anims.update(m,d)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});S.exports=u},56015:(S,k,a)=>{var b=a(25305),T=a(13059),g=a(44603),f=a(23568),h=a(35154),c=a(33663);g.register("plane",function(u,m){void 0===u&&(u={});var d=f(u,"key",null),p=f(u,"frame",null),v=h(u,"width",8),x=h(u,"height",8),y=h(u,"tile",!1),_=new c(this.scene,0,0,d,p,v,x,y);void 0!==m&&(u.add=m);var E=h(u,"checkerboard",null);if(E){var A=h(E,"color1",16777215),D=h(E,"color2",255),I=h(E,"alpha1",255),R=h(E,"alpha2",255),F=h(E,"height",128);_.createCheckerboard(A,D,I,R,F)}return b(this.scene,_,u),T(_,u),_})},30985:(S,k,a)=>{var b=a(33663);a(39429).register("plane",function(g,f,h,c,u,m,d){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d))})},80321:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(30100),h=a(36060),c=a(67277),u=new b({Extends:g,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Mask,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Transform,T.Visible,c],initialize:function(d,p,v,x,y,_,E){void 0===x&&(x=16777215),void 0===y&&(y=128),void 0===_&&(_=1),void 0===E&&(E=.1),g.call(this,d,"PointLight"),this.initPipeline(h.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(p,v),this.color=f(x),this.intensity=_,this.attenuation=E,this.width=2*y,this.height=2*y,this._radius=y},radius:{get:function(){return this._radius},set:function(m){this._radius=m,this.width=2*m,this.height=2*m}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});S.exports=u},39829:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(80321);T.register("pointlight",function(h,c){void 0===h&&(h={});var u=g(h,"color",16777215),m=g(h,"radius",128),d=g(h,"intensity",1),p=g(h,"attenuation",.1),v=new f(this.scene,0,0,u,m,d,p);return void 0!==c&&(h.add=c),b(this.scene,v,h),v})},71255:(S,k,a)=>{var b=a(39429),T=a(80321);b.register("pointlight",function(g,f,h,c,u,m){return this.displayList.add(new T(this.scene,g,f,h,c,u,m))})},67277:(S,k,a)=>{var T,g=a(29747);T=a(57787),S.exports={renderWebGL:T,renderCanvas:g}},57787:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){h.addToRenderList(f);var u=g.pipelines.set(f.pipeline),m=b(f,h,c).calc,v=-f._radius,x=-f._radius,y=v+f.width,_=x+f.height,E=m.getX(0,0),A=m.getY(0,0),D=m.getX(v,x),I=m.getY(v,x),R=m.getX(v,_),F=m.getY(v,_),N=m.getX(y,_),V=m.getY(y,_),B=m.getX(y,x),H=m.getY(y,x);g.pipelines.preBatch(f),u.batchPointLight(f,h,D,I,R,F,N,V,B,H,E,A),g.pipelines.postBatch(f)}},591:(S,k,a)=>{var b=a(83419),T=a(81320),g=a(88571),f=new b({Extends:g,initialize:function(c,u,m,d,p){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=32),void 0===p&&(p=32);var v=new T(c.sys.textures,"",d,p);g.call(this,c,u,m,v),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(h,c){this.width=h,this.height=c,this.texture.setSize(h,c),this.updateDisplayOrigin();var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=h,u.hitArea.height=c),this},resize:function(h,c){return this.setSize(h,c),this},saveTexture:function(h){var c=this.texture;return c.key=h,c.manager.addDynamicTexture(c)&&(this._saved=!0),c},fill:function(h,c,u,m,d,p){return this.texture.fill(h,c,u,m,d,p),this},clear:function(){return this.texture.clear(),this},stamp:function(h,c,u,m,d){return this.texture.stamp(h,c,u,m,d),this},erase:function(h,c,u){return this.texture.erase(h,c,u),this},draw:function(h,c,u,m,d){return this.texture.draw(h,c,u,m,d),this},drawFrame:function(h,c,u,m,d,p){return this.texture.drawFrame(h,c,u,m,d,p),this},repeat:function(h,c,u,m,d,p,v,x,y){return this.texture.repeat(h,c,u,m,d,p,v,x,y),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(h,c,u,m,d){return this.texture.batchDraw(h,c,u,m,d),this},batchDrawFrame:function(h,c,u,m,d,p){return this.texture.batchDrawFrame(h,c,u,m,d,p),this},endDraw:function(h){return this.texture.endDraw(h),this},snapshotArea:function(h,c,u,m,d,p,v){return this.texture.snapshotArea(h,c,u,m,d,p,v),this},snapshot:function(h,c,u){return this.snapshotArea(0,0,this.width,this.height,h,c,u)},snapshotPixel:function(h,c,u){return this.snapshotArea(h,c,1,1,u,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});S.exports=f},34495:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(591);T.register("renderTexture",function(h,c){void 0===h&&(h={});var u=g(h,"x",0),m=g(h,"y",0),d=g(h,"width",32),p=g(h,"height",32),v=new f(this.scene,u,m,d,p);return void 0!==c&&(h.add=c),b(this.scene,v,h),v})},60505:(S,k,a)=>{var b=a(39429),T=a(591);b.register("renderTexture",function(g,f,h,c){return this.displayList.add(new T(this.scene,g,f,h,c))})},77757:(S,k,a)=>{var b=a(9674),T=a(83419),g=a(31401),f=a(95643),h=a(36060),c=a(38745),u=a(26099),m=new T({Extends:f,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Flip,g.Mask,g.Pipeline,g.PostPipeline,g.Size,g.Texture,g.Transform,g.Visible,g.ScrollFactor,c],initialize:function(p,v,x,y,_,E,A,D,I){void 0===y&&(y="__DEFAULT"),void 0===E&&(E=2),void 0===A&&(A=!0),f.call(this,p,"Rope"),this.anims=new b(this),this.points=E,this.tintFill="__DEFAULT"===y,this.dirty=!1,this.horizontal=A,this._flipX=!1,this._flipY=!1,this._perp=new u,this.debugCallback=null,this.debugGraphic=null,this.setTexture(y,_),this.setPosition(v,x),this.setSizeToFrame(),this.initPipeline(h.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(E)&&this.resizeArrays(E.length),this.setPoints(E,D,I),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(d,p){var v=this.anims.currentFrame;this.anims.update(d,p),this.anims.currentFrame!==v&&(this.updateUVs(),this.updateVertices())},play:function(d,p,v){return this.anims.play(d,p,v),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(d,p,v){return void 0===d&&(d=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(d,p,v))},setVertical:function(d,p,v){return void 0===d&&(d=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(d,p,v)):this},setTintFill:function(d){return void 0===d&&(d=!1),this.tintFill=d,this},setAlphas:function(d,p){var v=this.points.length;if(v<1)return this;var x=this.alphas;void 0===d?d=[1]:!Array.isArray(d)&&void 0===p&&(d=[d]);var y,_=0;if(void 0!==p)for(y=0;y(_=2*y)&&(E=d[_]),x[_]=E,d.length>_+1&&(E=d[_+1]),x[_+1]=E}return this},setColors:function(d){var p=this.points.length;if(p<1)return this;var v=this.colors;void 0===d?d=[16777215]:Array.isArray(d)||(d=[d]);var x,y=0;if(d.length===p)for(x=0;x(y=2*x)&&(_=d[y]),v[y]=_,d.length>y+1&&(_=d[y+1]),v[y+1]=_}return this},setPoints:function(d,p,v){if(void 0===d&&(d=2),"number"==typeof d){var y,_,E,x=d;if(x<2&&(x=2),d=[],this.horizontal)for(E=-this.frame.halfWidth,_=this.frame.width/(x-1),y=0;y{S.exports=function(){}},26209:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(35154),h=a(77757);T.register("rope",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=g(c,"frame",null),p=g(c,"horizontal",!0),v=f(c,"points",void 0),x=f(c,"colors",void 0),y=f(c,"alphas",void 0),_=new h(this.scene,0,0,m,d,v,p,x,y);return void 0!==u&&(c.add=u),b(this.scene,_,c),_})},96819:(S,k,a)=>{var b=a(77757);a(39429).register("rope",function(g,f,h,c,u,m,d,p){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p))})},38745:(S,k,a)=>{var T,g;a(29747),T=a(20439),g=a(95262),S.exports={renderWebGL:T,renderCanvas:g}},20439:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline,h),d=b(h,c,u).calc,p=h.vertices,v=h.uv,x=h.colors,y=h.alphas,_=h.alpha,E=T.getTintAppendFloatAlpha,A=c.roundPixels,D=p.length,I=Math.floor(.5*D);m.flush(),f.pipelines.preBatch(h);var R=m.setGameObject(h),F=m.vertexViewF32,N=m.vertexViewU32,V=m.vertexCount*m.currentShader.vertexComponentCount-1,B=0,H=h.tintFill;h.dirty&&h.updateVertices();for(var Q=h.debugCallback,G=[],K=0;K{var b=a(83419),T=a(31401),g=a(95643),f=a(95540),h=a(79291),c=a(61622),u=a(25479),m=a(61340),d=a(95428),p=a(92503),v=new b({Extends:g,Mixins:[T.ComputedSize,T.Depth,T.GetBounds,T.Mask,T.Origin,T.ScrollFactor,T.Transform,T.Visible,u],initialize:function(y,_,E,A,D,I,R,F){void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=128),void 0===I&&(I=128),g.call(this,y,"Shader"),this.blendMode=-1;var N=y.sys.renderer;this.renderer=N,this.gl=N.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=N.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new m,this._tempMatrix2=new m,this._tempMatrix3=new m,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=N.width,this._rendererHeight=N.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(E,A),this.setSize(D,I),this.setOrigin(.5,.5),this.setShader(_,R,F),this.renderer.on(p.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(x){return!!this.renderToTexture||!(g.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&x.id)},setRenderToTexture:function(x,y){if(void 0===y&&(y=!1),!this.renderToTexture){var _=this.width,E=this.height,A=this.renderer;this.glTexture=A.createTextureFromSource(null,_,E,0),this.framebuffer=A.createFramebuffer(_,E,this.glTexture,!1),this._rendererWidth=_,this._rendererHeight=E,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),x&&(this.texture=this.scene.sys.textures.addGLTexture(x,this.glTexture))}return this.shader&&(A.pipelines.clear(),this.load(),this.flush(),A.pipelines.rebind()),this},setShader:function(x,y,_){if(this.renderer.contextLost)return this._deferSetShader={key:x,textures:y,textureData:_},this;if(void 0===y&&(y=[]),"string"==typeof x){var E=this.scene.sys.cache.shader;if(!E.has(x))return console.warn("Shader missing: "+x),this;this.shader=E.get(x)}else this.shader=x;var A=this.gl,D=this.renderer;this.program&&D.deleteProgram(this.program);var I=D.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);A.uniformMatrix4fv(A.getUniformLocation(I.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),A.uniformMatrix4fv(A.getUniformLocation(I.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),A.uniform2f(A.getUniformLocation(I.webGLProgram,"uResolution"),this.width,this.height),this.program=I;var R=new Date,F={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[R.getFullYear(),R.getMonth(),R.getDate(),60*R.getHours()*60+60*R.getMinutes()+R.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.uniforms=this.shader.uniforms?h(!0,{},this.shader.uniforms,F):F;for(var N=0;N<4;N++)y[N]&&this.setSampler2D("iChannel"+N,y[N],N,_);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(x){return this.pointer=x,this},projOrtho:function(x,y,_,E){if(this.renderer.contextLost)this._deferProjOrtho={left:x,right:y,bottom:_,top:E};else{var I=1/(x-y),R=1/(_-E),N=this.projectionMatrix;N[0]=-2*I,N[5]=-2*R,N[10]=-.001,N[12]=(x+y)*I,N[13]=(E+_)*R,N[14]=-0;var V=this.program,B=this.gl;this.renderer.setProgram(V),B.uniformMatrix4fv(B.getUniformLocation(V.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=y,this._rendererHeight=_}},initUniforms:function(){var x=this.renderer.glFuncMap,y=this.program;for(var _ in this._textureCount=0,this.uniforms){var E=this.uniforms[_],A=E.type,D=x[A];E.uniformLocation=this.renderer.createUniformLocation(y,_),"sampler2D"!==A&&(E.glMatrix=D.matrix,E.glValueLength=D.length,E.glFunc=D.func)}},setSampler2DBuffer:function(x,y,_,E,A,D){void 0===A&&(A=0),void 0===D&&(D={});var I=this.uniforms[x];return I.value=y,D.width=_,D.height=E,I.textureData=D,this._textureCount=A,this.initSampler2D(I),this},setSampler2D:function(x,y,_,E){void 0===_&&(_=0);var A=this.scene.sys.textures;if(A.exists(y)){var D=A.getFrame(y);if(D.glTexture&&D.glTexture.isRenderTexture)return this.setSampler2DBuffer(x,D.glTexture,D.width,D.height,_,E);var I=this.uniforms[x],R=D.source;I.textureKey=y,I.source=R.image,I.value=D.glTexture,R.isGLTexture&&(E||(E={}),E.width=R.width,E.height=R.height),E&&(I.textureData=E),this._textureCount=_,this.initSampler2D(I)}return this},setUniform:function(x,y){return c(this.uniforms,x,y),this},getUniform:function(x){return f(this.uniforms,x,null)},setChannel0:function(x,y){return this.setSampler2D("iChannel0",x,0,y)},setChannel1:function(x,y){return this.setSampler2D("iChannel1",x,1,y)},setChannel2:function(x,y){return this.setSampler2D("iChannel2",x,2,y)},setChannel3:function(x,y){return this.setSampler2D("iChannel3",x,3,y)},initSampler2D:function(x){if(x.value){var y=x.textureData;if(y&&!x.value.isRenderTexture){var _=this.gl,E=x.value,A=_[f(y,"magFilter","linear").toUpperCase()],D=_[f(y,"minFilter","linear").toUpperCase()],I=_[f(y,"wrapS","repeat").toUpperCase()],R=_[f(y,"wrapT","repeat").toUpperCase()],F=_[f(y,"format","rgba").toUpperCase()],N=f(y,"flipY",!1),V=f(y,"width",E.width),B=f(y,"height",E.height),H=f(y,"source",E.pixels);y.repeat&&(I=_.REPEAT,R=_.REPEAT),y.width&&(H=null),E.update(H,V,B,N,I,R,D,A,F)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var _,E,A,D,I,x=this.gl,y=this.uniforms,R=0;for(var F in y)A=(_=y[F]).glFunc,E=_.glValueLength,D=_.uniformLocation,null!==(I=_.value)&&(1===E?_.glMatrix?A.call(x,D.webGLUniformLocation,_.transpose,I):A.call(x,D.webGLUniformLocation,I):2===E?A.call(x,D.webGLUniformLocation,I.x,I.y):3===E?A.call(x,D.webGLUniformLocation,I.x,I.y,I.z):4===E?A.call(x,D.webGLUniformLocation,I.x,I.y,I.z,I.w):"sampler2D"===_.type&&(x.activeTexture(x.TEXTURE0+R),x.bindTexture(x.TEXTURE_2D,I.webGLTexture),x.uniform1i(D.webGLUniformLocation,R),R++))},load:function(x){var y=this.gl,_=this.width,E=this.height,A=this.renderer,D=this.program,I=this.viewMatrix;if(!this.renderToTexture){var R=-this._displayOriginX,F=-this._displayOriginY;I[0]=x[0],I[1]=x[1],I[4]=x[2],I[5]=x[3],I[8]=x[4],I[9]=x[5],I[12]=I[0]*R+I[4]*F,I[13]=I[1]*R+I[5]*F}y.useProgram(D.webGLProgram),y.uniformMatrix4fv(y.getUniformLocation(D.webGLProgram,"uViewMatrix"),!1,I),y.uniformMatrix4fv(y.getUniformLocation(D.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),y.uniform2f(y.getUniformLocation(D.webGLProgram,"uResolution"),this.width,this.height);var N=this.uniforms,V=N.resolution;V.value.x=_,V.value.y=E,N.time.value=A.game.loop.getDuration();var B=this.pointer;if(B){var H=N.mouse,G=1-B.y/E;H.value.x=(B.x/_).toFixed(2),H.value.y=G.toFixed(2)}this.syncUniforms()},flush:function(){var x=this.width,y=this.height,_=this.program,E=this.gl,A=this.vertexBuffer,D=this.renderer,I=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(D.setFramebuffer(this.framebuffer),E.clearColor(0,0,0,0),E.clear(E.COLOR_BUFFER_BIT)),E.bindBuffer(E.ARRAY_BUFFER,A.webGLBuffer);var R=E.getAttribLocation(_.webGLProgram,"inPosition");-1!==R&&(E.enableVertexAttribArray(R),E.vertexAttribPointer(R,2,E.FLOAT,!1,I,0));var F=this.vertexViewF32;F[3]=y,F[4]=x,F[5]=y,F[8]=x,F[9]=y,F[10]=x,E.bufferSubData(E.ARRAY_BUFFER,0,this.bytes.subarray(0,6*I)),E.drawArrays(E.TRIANGLES,0,6),this.renderToTexture&&D.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(null!==this._deferSetShader){var x=this._deferSetShader.key,y=this._deferSetShader.textures,_=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(x,y,_)}if(null!==this._deferProjOrtho){var E=this._deferProjOrtho.left,A=this._deferProjOrtho.right,D=this._deferProjOrtho.bottom,I=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(E,A,D,I)}},preDestroy:function(){var x=this.renderer;x.off(p.RESTORE_WEBGL,this.onContextRestored,this),x.deleteProgram(this.program),x.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(x.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),d(this.uniforms,function(y){x.deleteUniformLocation(y.uniformLocation),y.uniformLocation=null})}});S.exports=v},80464:S=>{S.exports=function(){}},54935:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(20071);T.register("shader",function(h,c){void 0===h&&(h={});var u=g(h,"key",null),m=g(h,"x",0),d=g(h,"y",0),p=g(h,"width",128),v=g(h,"height",128),x=new f(this.scene,u,m,d,p,v);return void 0!==c&&(h.add=c),b(this.scene,x,h),x})},74177:(S,k,a)=>{var b=a(20071);a(39429).register("shader",function(g,f,h,c,u,m,d){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d))})},25479:(S,k,a)=>{var T,g;a(29747),T=a(19257),g=a(80464),S.exports={renderWebGL:T,renderCanvas:g}},19257:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){if(f.shader){if(h.addToRenderList(f),g.pipelines.clear(),f.renderToTexture)f.load(),f.flush();else{var u=b(f,h,c).calc;(g.width!==f._rendererWidth||g.height!==f._rendererHeight)&&f.projOrtho(0,g.width,g.height,0),f.load(u.matrix),f.flush()}g.pipelines.rebind()}}},10441:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c,u,m){for(var d=b.getTintAppendFloatAlpha(h.fillColor,h.fillAlpha*c),p=h.pathData,v=h.pathIndexes,x=0;x{S.exports=function(a,b,T,g){var f=T||b.fillColor;a.fillStyle="rgba("+((16711680&f)>>>16)+","+((65280&f)>>>8)+","+(255&f)+","+(g||b.fillAlpha)+")"}},75177:S=>{S.exports=function(a,b,T,g){var f=T||b.strokeColor;a.strokeStyle="rgba("+((16711680&f)>>>16)+","+((65280&f)>>>8)+","+(255&f)+","+(g||b.strokeAlpha)+")",a.lineWidth=b.lineWidth}},17803:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(23031),h=new b({Extends:g,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.GetBounds,T.Mask,T.Origin,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Transform,T.Visible],initialize:function(u,m,d){void 0===m&&(m="Shape"),g.call(this,u,m),this.geom=d,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new f,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(c,u){return void 0===u&&(u=1),void 0===c?this.isFilled=!1:(this.fillColor=c,this.fillAlpha=u,this.isFilled=!0),this},setStrokeStyle:function(c,u,m){return void 0===m&&(m=1),void 0===c?this.isStroked=!1:(this.lineWidth=c,this.strokeColor=u,this.strokeAlpha=m,this.isStroked=!0),this},setClosePath:function(c){return this.closePath=c,this},setSize:function(c,u){return this.width=c,this.height=u,this},setDisplaySize:function(c,u){return this.displayWidth=c,this.displayHeight=u,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(c){this.scaleX=c/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(c){this.scaleY=c/this.height}}});S.exports=h},34682:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c,u){var m=g.strokeTint,d=b.getTintAppendFloatAlpha(f.strokeColor,f.strokeAlpha*h);m.TL=d,m.TR=d,m.BL=d,m.BR=d;var p=f.pathData,v=p.length-1,x=f.lineWidth,y=x/2,_=p[0]-c,E=p[1]-u;f.closePath||(v-=2);for(var A=2;A{var b=a(13609),T=a(83419),g=a(39506),f=a(94811),h=a(96503),c=a(36383),u=a(17803),m=new T({Extends:u,Mixins:[b],initialize:function(p,v,x,y,_,E,A,D,I){void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=128),void 0===_&&(_=0),void 0===E&&(E=360),void 0===A&&(A=!1),u.call(this,p,"Arc",new h(0,0,y)),this._startAngle=_,this._endAngle=E,this._anticlockwise=A,this._iterations=.01,this.setPosition(v,x);var R=2*this.geom.radius;this.setSize(R,R),void 0!==D&&this.setFillStyle(D,I),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(d){this._iterations=d,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(d){this.geom.radius=d;var p=2*d;this.setSize(p,p),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(d){this._startAngle=d,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(d){this._endAngle=d,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(d){this._anticlockwise=d,this.updateData()}},setRadius:function(d){return this.radius=d,this},setIterations:function(d){return void 0===d&&(d=.01),this.iterations=d,this},setStartAngle:function(d,p){return this._startAngle=d,void 0!==p&&(this._anticlockwise=p),this.updateData()},setEndAngle:function(d,p){return this._endAngle=d,void 0!==p&&(this._anticlockwise=p),this.updateData()},updateData:function(){var d=this._iterations,p=d,v=this.geom.radius,x=g(this._startAngle),y=g(this._endAngle),E=v,A=v;y-=x,this._anticlockwise?y<-c.PI2?y=-c.PI2:y>0&&(y=y%c.PI2-c.PI2):y>c.PI2?y=c.PI2:y<0&&(y=c.PI2+y%c.PI2);for(var I,D=[E+Math.cos(x)*v,A+Math.sin(x)*v];p<1;)I=y*p+x,D.push(E+Math.cos(I)*v,A+Math.sin(I)*v),p+=d;return I=y+x,D.push(E+Math.cos(I)*v,A+Math.sin(I)*v),D.push(E+Math.cos(x)*v,A+Math.sin(x)*v),this.pathIndexes=f(D),this.pathData=D,this}});S.exports=m},42542:(S,k,a)=>{var b=a(39506),T=a(65960),g=a(75177),f=a(20926);S.exports=function(c,u,m,d){m.addToRenderList(u);var p=c.currentContext;if(f(c,p,u,m,d)){var v=u.radius;p.beginPath(),p.arc(v-u.originX*(2*v),v-u.originY*(2*v),v,b(u._startAngle),b(u._endAngle),u.anticlockwise),u.closePath&&p.closePath(),u.isFilled&&(T(p,u),p.fill()),u.isStroked&&(g(p,u),p.stroke()),p.restore()}}},42563:(S,k,a)=>{var b=a(23629),T=a(39429);T.register("arc",function(g,f,h,c,u,m,d,p){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p))}),T.register("circle",function(g,f,h,c,u){return this.displayList.add(new b(this.scene,g,f,h,0,360,!1,c,u))})},13609:(S,k,a)=>{var T,g;a(29747),T=a(41447),g=a(42542),S.exports={renderWebGL:T,renderCanvas:g}},41447:(S,k,a)=>{var b=a(91296),T=a(10441),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=b(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&T(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},89:(S,k,a)=>{var b=a(83419),T=a(33141),g=a(94811),f=a(87841),h=a(17803),c=new b({Extends:h,Mixins:[T],initialize:function(m,d,p,v,x,y){void 0===d&&(d=0),void 0===p&&(p=0),h.call(this,m,"Curve",v),this._smoothness=32,this._curveBounds=new f,this.closePath=!1,this.setPosition(d,p),void 0!==x&&this.setFillStyle(x,y),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){var u=this._curveBounds,m=this._smoothness;this.geom.getBounds(u,m),this.setSize(u.width,u.height),this.updateDisplayOrigin();for(var d=[],p=this.geom.getPoints(m),v=0;v{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX+c._curveBounds.x,v=c._displayOriginY+c._curveBounds.y,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(39429),T=a(89);b.register("curve",function(g,f,h,c,u){return this.displayList.add(new T(this.scene,g,f,h,c,u))})},33141:(S,k,a)=>{var T,g;a(29747),T=a(53987),g=a(3170),S.exports={renderWebGL:T,renderCanvas:g}},53987:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX+c._curveBounds.x,y=c._displayOriginY+c._curveBounds.y,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},19921:(S,k,a)=>{var b=a(83419),T=a(94811),g=a(54205),f=a(8497),h=a(17803),c=new b({Extends:h,Mixins:[g],initialize:function(m,d,p,v,x,y,_){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=128),void 0===x&&(x=128),h.call(this,m,"Ellipse",new f(v/2,x/2,v,x)),this._smoothness=64,this.setPosition(d,p),this.width=v,this.height=x,void 0!==y&&this.setFillStyle(y,_),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSize:function(u,m){return this.width=u,this.height=m,this.geom.setPosition(u/2,m/2),this.geom.setSize(u,m),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){for(var u=[],m=this.geom.getPoints(this._smoothness),d=0;d{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(19921);a(39429).register("ellipse",function(g,f,h,c,u,m){return this.displayList.add(new b(this.scene,g,f,h,c,u,m))})},54205:(S,k,a)=>{var T,g;a(29747),T=a(19467),g=a(7930),S.exports={renderWebGL:T,renderCanvas:g}},19467:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},30479:(S,k,a)=>{var b=a(83419),T=a(17803),g=a(26015),f=new b({Extends:T,Mixins:[g],initialize:function(c,u,m,d,p,v,x,y,_,E,A){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=128),void 0===p&&(p=128),void 0===v&&(v=32),void 0===x&&(x=32),T.call(this,c,"Grid",null),this.cellWidth=v,this.cellHeight=x,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.setPosition(u,m),this.setSize(d,p),this.setFillStyle(y,_),void 0!==E&&this.setOutlineStyle(E,A),this.updateDisplayOrigin()},setFillStyle:function(h,c){return void 0===c&&(c=1),void 0===h?this.showCells=!1:(this.fillColor=h,this.fillAlpha=c,this.showCells=!0),this},setAltFillStyle:function(h,c){return void 0===c&&(c=1),void 0===h?this.showAltCells=!1:(this.altFillColor=h,this.altFillAlpha=c,this.showAltCells=!0),this},setOutlineStyle:function(h,c){return void 0===c&&(c=1),void 0===h?this.showOutline=!1:(this.outlineFillColor=h,this.outlineFillAlpha=c,this.showOutline=!0),this}});S.exports=f},49912:(S,k,a)=>{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=-c._displayOriginX,v=-c._displayOriginY,x=u.alpha*c.alpha,y=c.width,_=c.height,E=c.cellWidth,A=c.cellHeight,D=Math.ceil(y/E),I=Math.ceil(_/A),R=E,F=A,N=E-(D*E-y),V=A-(I*A-_),H=c.showAltCells,Q=c.showOutline,G=0,K=0,q=0;if(Q&&(R--,F--,N===E&&N--,V===A&&V--),c.showCells&&c.fillAlpha>0)for(b(d,c),K=0;K0)for(b(d,c,c.altFillColor,c.altFillAlpha*x),K=0;K0){for(T(d,c,c.outlineFillColor,c.outlineFillAlpha*x),G=1;G{var b=a(39429),T=a(30479);b.register("grid",function(g,f,h,c,u,m,d,p,v,x){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p,v,x))})},26015:(S,k,a)=>{var T,g;a(29747),T=a(46161),g=a(49912),S.exports={renderWebGL:T,renderCanvas:g}},46161:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline),d=b(h,c,u);m.calcMatrix.copyFrom(d.calc).translate(-h._displayOriginX,-h._displayOriginY);var V,B,v=c.alpha*h.alpha,x=h.width,y=h.height,_=h.cellWidth,E=h.cellHeight,A=Math.ceil(x/_),D=Math.ceil(y/E),I=_,R=E,F=_-(A*_-x),N=E-(D*E-y),H=h.showCells,Q=h.showAltCells,G=h.showOutline,K=0,q=0,at=0;if(G&&(I--,R--,F===_&&F--,N===E&&N--),f.pipelines.preBatch(h),H&&h.fillAlpha>0)for(V=m.fillTint,B=T.getTintAppendFloatAlpha(h.fillColor,h.fillAlpha*v),V.TL=B,V.TR=B,V.BL=B,V.BR=B,q=0;q0)for(V=m.fillTint,B=T.getTintAppendFloatAlpha(h.altFillColor,h.altFillAlpha*v),V.TL=B,V.TR=B,V.BL=B,V.BR=B,q=0;q0){var it=m.strokeTint,Y=T.getTintAppendFloatAlpha(h.outlineFillColor,h.outlineFillAlpha*v);for(it.TL=Y,it.TR=Y,it.BL=Y,it.BR=Y,K=1;K{var b=a(99651),T=a(83419),g=a(17803),f=new T({Extends:g,Mixins:[b],initialize:function(c,u,m,d,p,v,x,y){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=48),void 0===p&&(p=32),void 0===v&&(v=15658734),void 0===x&&(x=10066329),void 0===y&&(y=13421772),g.call(this,c,"IsoBox",null),this.projection=4,this.fillTop=v,this.fillLeft=x,this.fillRight=y,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(u,m),this.setSize(d,p),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setFaces:function(h,c,u){return void 0===h&&(h=!0),void 0===c&&(c=!0),void 0===u&&(u=!0),this.showTop=h,this.showLeft=c,this.showRight=u,this},setFillStyle:function(h,c,u){return this.fillTop=h,this.fillLeft=c,this.fillRight=u,this.isFilled=!0,this}});S.exports=f},11508:(S,k,a)=>{var b=a(65960),T=a(20926);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.currentContext;if(T(f,m,h,c,u)&&h.isFilled){var d=h.width,p=h.height,v=d/2,x=d/h.projection;h.showTop&&(b(m,h,h.fillTop),m.beginPath(),m.moveTo(-v,-p),m.lineTo(0,-x-p),m.lineTo(v,-p),m.lineTo(v,-1),m.lineTo(0,x-1),m.lineTo(-v,-1),m.lineTo(-v,-p),m.fill()),h.showLeft&&(b(m,h,h.fillLeft),m.beginPath(),m.moveTo(-v,0),m.lineTo(0,x),m.lineTo(0,x-p),m.lineTo(-v,-p),m.lineTo(-v,0),m.fill()),h.showRight&&(b(m,h,h.fillRight),m.beginPath(),m.moveTo(v,0),m.lineTo(0,x),m.lineTo(0,x-p),m.lineTo(v,-p),m.lineTo(v,0),m.fill()),m.restore()}}},3933:(S,k,a)=>{var b=a(39429),T=a(61475);b.register("isobox",function(g,f,h,c,u,m,d){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d))})},99651:(S,k,a)=>{var T,g;a(29747),T=a(68149),g=a(11508),S.exports={renderWebGL:T,renderCanvas:g}},68149:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var A,D,I,R,F,N,V,B,H,m=f.pipelines.set(h.pipeline),d=b(h,c,u),p=m.calcMatrix.copyFrom(d.calc),v=h.width,x=h.height,y=v/2,_=v/h.projection,E=c.alpha*h.alpha;h.isFilled&&(f.pipelines.preBatch(h),h.showTop&&(A=T.getTintAppendFloatAlpha(h.fillTop,E),D=p.getX(-y,-x),I=p.getY(-y,-x),R=p.getX(0,-_-x),F=p.getY(0,-_-x),N=p.getX(y,-x),V=p.getY(y,-x),B=p.getX(0,_-x),H=p.getY(0,_-x),m.batchQuad(h,D,I,R,F,N,V,B,H,0,0,1,1,A,A,A,A,2)),h.showLeft&&(A=T.getTintAppendFloatAlpha(h.fillLeft,E),D=p.getX(-y,0),I=p.getY(-y,0),R=p.getX(0,_),F=p.getY(0,_),N=p.getX(0,_-x),V=p.getY(0,_-x),B=p.getX(-y,-x),H=p.getY(-y,-x),m.batchQuad(h,D,I,R,F,N,V,B,H,0,0,1,1,A,A,A,A,2)),h.showRight&&(A=T.getTintAppendFloatAlpha(h.fillRight,E),D=p.getX(y,0),I=p.getY(y,0),R=p.getX(0,_),F=p.getY(0,_),N=p.getX(0,_-x),V=p.getY(0,_-x),B=p.getX(y,-x),H=p.getY(y,-x),m.batchQuad(h,D,I,R,F,N,V,B,H,0,0,1,1,A,A,A,A,2)),f.pipelines.postBatch(h))}},16933:(S,k,a)=>{var b=a(83419),T=a(60561),g=a(17803),f=new b({Extends:g,Mixins:[T],initialize:function(c,u,m,d,p,v,x,y,_){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=48),void 0===p&&(p=32),void 0===v&&(v=!1),void 0===x&&(x=15658734),void 0===y&&(y=10066329),void 0===_&&(_=13421772),g.call(this,c,"IsoTriangle",null),this.projection=4,this.fillTop=x,this.fillLeft=y,this.fillRight=_,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=v,this.isFilled=!0,this.setPosition(u,m),this.setSize(d,p),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setReversed:function(h){return this.isReversed=h,this},setFaces:function(h,c,u){return void 0===h&&(h=!0),void 0===c&&(c=!0),void 0===u&&(u=!0),this.showTop=h,this.showLeft=c,this.showRight=u,this},setFillStyle:function(h,c,u){return this.fillTop=h,this.fillLeft=c,this.fillRight=u,this.isFilled=!0,this}});S.exports=f},79590:(S,k,a)=>{var b=a(65960),T=a(20926);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.currentContext;if(T(f,m,h,c,u)&&h.isFilled){var d=h.width,p=h.height,v=d/2,x=d/h.projection,y=h.isReversed;h.showTop&&y&&(b(m,h,h.fillTop),m.beginPath(),m.moveTo(-v,-p),m.lineTo(0,-x-p),m.lineTo(v,-p),m.lineTo(0,x-p),m.fill()),h.showLeft&&(b(m,h,h.fillLeft),m.beginPath(),y?(m.moveTo(-v,-p),m.lineTo(0,x),m.lineTo(0,x-p)):(m.moveTo(-v,0),m.lineTo(0,x),m.lineTo(0,x-p)),m.fill()),h.showRight&&(b(m,h,h.fillRight),m.beginPath(),y?(m.moveTo(v,-p),m.lineTo(0,x),m.lineTo(0,x-p)):(m.moveTo(v,0),m.lineTo(0,x),m.lineTo(0,x-p)),m.fill()),m.restore()}}},49803:(S,k,a)=>{var b=a(39429),T=a(16933);b.register("isotriangle",function(g,f,h,c,u,m,d,p){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p))})},60561:(S,k,a)=>{var T,g;a(29747),T=a(51503),g=a(79590),S.exports={renderWebGL:T,renderCanvas:g}},51503:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline),d=b(h,c,u),p=m.calcMatrix.copyFrom(d.calc),v=h.width,x=h.height,y=v/2,_=v/h.projection,E=h.isReversed,A=c.alpha*h.alpha;if(h.isFilled){var D,I,R,F,N,V,B;if(f.pipelines.preBatch(h),h.showTop&&E){D=T.getTintAppendFloatAlpha(h.fillTop,A),I=p.getX(-y,-x),R=p.getY(-y,-x),F=p.getX(0,-_-x),N=p.getY(0,-_-x),V=p.getX(y,-x),B=p.getY(y,-x);var H=p.getX(0,_-x),Q=p.getY(0,_-x);m.batchQuad(h,I,R,F,N,V,B,H,Q,0,0,1,1,D,D,D,D,2)}h.showLeft&&(D=T.getTintAppendFloatAlpha(h.fillLeft,A),E?(I=p.getX(-y,-x),R=p.getY(-y,-x),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)):(I=p.getX(-y,0),R=p.getY(-y,0),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)),m.batchTri(h,I,R,F,N,V,B,0,0,1,1,D,D,D,2)),h.showRight&&(D=T.getTintAppendFloatAlpha(h.fillRight,A),E?(I=p.getX(y,-x),R=p.getY(y,-x),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)):(I=p.getX(y,0),R=p.getY(y,0),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)),m.batchTri(h,I,R,F,N,V,B,0,0,1,1,D,D,D,2)),f.pipelines.postBatch(h)}}},57847:(S,k,a)=>{var b=a(83419),T=a(17803),g=a(23031),f=a(36823),h=new b({Extends:T,Mixins:[f],initialize:function(u,m,d,p,v,x,y,_,E){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=128),void 0===y&&(y=0),T.call(this,u,"Line",new g(p,v,x,y));var A=Math.max(1,this.geom.right-this.geom.left),D=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(m,d),this.setSize(A,D),void 0!==_&&this.setStrokeStyle(1,_,E),this.updateDisplayOrigin()},setLineWidth:function(c,u){return void 0===u&&(u=c),this._startWidth=c,this._endWidth=u,this.lineWidth=c,this},setTo:function(c,u,m,d){return this.geom.setTo(c,u,m,d),this}});S.exports=h},17440:(S,k,a)=>{var b=a(75177),T=a(20926);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.currentContext;if(T(f,m,h,c,u)){var d=h._displayOriginX,p=h._displayOriginY;h.isStroked&&(b(m,h),m.beginPath(),m.moveTo(h.geom.x1-d,h.geom.y1-p),m.lineTo(h.geom.x2-d,h.geom.y2-p),m.stroke()),m.restore()}}},2481:(S,k,a)=>{var b=a(39429),T=a(57847);b.register("line",function(g,f,h,c,u,m,d,p){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p))})},36823:(S,k,a)=>{var T,g;a(29747),T=a(77385),g=a(17440),S.exports={renderWebGL:T,renderCanvas:g}},77385:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline),d=b(h,c,u);m.calcMatrix.copyFrom(d.calc);var p=h._displayOriginX,v=h._displayOriginY,x=c.alpha*h.alpha;if(f.pipelines.preBatch(h),h.isStroked){var y=m.strokeTint,_=T.getTintAppendFloatAlpha(h.strokeColor,h.strokeAlpha*x);y.TL=_,y.TR=_,y.BL=_,y.BR=_,m.batchLine(h.geom.x1-p,h.geom.y1-v,h.geom.x2-p,h.geom.y2-v,h._startWidth/2,h._endWidth/2,1,0,!1,d.sprite,d.camera)}f.pipelines.postBatch(h)}},24949:(S,k,a)=>{var b=a(90273),T=a(83419),g=a(94811),f=a(13829),h=a(25717),c=a(17803),u=a(5469),m=new T({Extends:c,Mixins:[b],initialize:function(p,v,x,y,_,E){void 0===v&&(v=0),void 0===x&&(x=0),c.call(this,p,"Polygon",new h(y));var A=f(this.geom);this.setPosition(v,x),this.setSize(A.width,A.height),void 0!==_&&this.setFillStyle(_,E),this.updateDisplayOrigin(),this.updateData()},smooth:function(d){void 0===d&&(d=1);for(var p=0;p{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(39429),T=a(24949);b.register("polygon",function(g,f,h,c,u){return this.displayList.add(new T(this.scene,g,f,h,c,u))})},90273:(S,k,a)=>{var T,g;a(29747),T=a(73695),g=a(38710),S.exports={renderWebGL:T,renderCanvas:g}},73695:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},74561:(S,k,a)=>{var b=a(83419),T=a(87841),g=a(17803),f=a(95597),h=new b({Extends:g,Mixins:[f],initialize:function(u,m,d,p,v,x,y){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=128),void 0===v&&(v=128),g.call(this,u,"Rectangle",new T(0,0,p,v)),this.setPosition(m,d),this.setSize(p,v),void 0!==x&&this.setFillStyle(x,y),this.updateDisplayOrigin(),this.updateData()},setSize:function(c,u){this.width=c,this.height=u,this.geom.setSize(c,u),this.updateData(),this.updateDisplayOrigin();var m=this.input;return m&&!m.customHitArea&&(m.hitArea.width=c,m.hitArea.height=u),this},updateData:function(){var c=[],u=this.geom,m=this._tempLine;return u.getLineA(m),c.push(m.x1,m.y1,m.x2,m.y2),u.getLineB(m),c.push(m.x2,m.y2),u.getLineC(m),c.push(m.x2,m.y2),u.getLineD(m),c.push(m.x2,m.y2),this.pathData=c,this}});S.exports=h},48682:(S,k,a)=>{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY;c.isFilled&&(b(d,c),d.fillRect(-p,-v,c.width,c.height)),c.isStroked&&(T(d,c),d.beginPath(),d.rect(-p,-v,c.width,c.height),d.stroke()),d.restore()}}},87959:(S,k,a)=>{var b=a(39429),T=a(74561);b.register("rectangle",function(g,f,h,c,u,m){return this.displayList.add(new T(this.scene,g,f,h,c,u,m))})},95597:(S,k,a)=>{var T,g;a(29747),T=a(52059),g=a(48682),S.exports={renderWebGL:T,renderCanvas:g}},52059:(S,k,a)=>{var b=a(91296),T=a(34682),g=a(70554);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=b(c,u,m);d.calcMatrix.copyFrom(p.calc);var v=c._displayOriginX,x=c._displayOriginY,y=u.alpha*c.alpha;if(h.pipelines.preBatch(c),c.isFilled){var _=d.fillTint,E=g.getTintAppendFloatAlpha(c.fillColor,c.fillAlpha*y);_.TL=E,_.TR=E,_.BL=E,_.BR=E,d.batchFillRect(-v,-x,c.width,c.height)}c.isStroked&&T(d,c,y,v,x),h.pipelines.postBatch(c)}},55911:(S,k,a)=>{var b=a(81991),T=a(83419),g=a(94811),f=a(17803),h=new T({Extends:f,Mixins:[b],initialize:function(u,m,d,p,v,x,y,_){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=5),void 0===v&&(v=32),void 0===x&&(x=64),f.call(this,u,"Star",null),this._points=p,this._innerRadius=v,this._outerRadius=x,this.setPosition(m,d),this.setSize(2*x,2*x),void 0!==y&&this.setFillStyle(y,_),this.updateDisplayOrigin(),this.updateData()},setPoints:function(c){return this._points=c,this.updateData()},setInnerRadius:function(c){return this._innerRadius=c,this.updateData()},setOuterRadius:function(c){return this._outerRadius=c,this.updateData()},points:{get:function(){return this._points},set:function(c){this._points=c,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(c){this._innerRadius=c,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(c){this._outerRadius=c,this.updateData()}},updateData:function(){var c=[],u=this._points,m=this._innerRadius,d=this._outerRadius,p=Math.PI/2*3,v=Math.PI/u,x=d,y=d;c.push(x,y+-d);for(var _=0;_{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(55911);a(39429).register("star",function(g,f,h,c,u,m,d){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d))})},81991:(S,k,a)=>{var T,g;a(29747),T=a(57017),g=a(64272),S.exports={renderWebGL:T,renderCanvas:g}},57017:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},36931:(S,k,a)=>{var b=a(83419),T=a(17803),g=a(16483),f=a(96195),h=new b({Extends:T,Mixins:[f],initialize:function(u,m,d,p,v,x,y,_,E,A,D){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=128),void 0===x&&(x=64),void 0===y&&(y=0),void 0===_&&(_=128),void 0===E&&(E=128),T.call(this,u,"Triangle",new g(p,v,x,y,_,E));var I=this.geom.right-this.geom.left,R=this.geom.bottom-this.geom.top;this.setPosition(m,d),this.setSize(I,R),void 0!==A&&this.setFillStyle(A,D),this.updateDisplayOrigin(),this.updateData()},setTo:function(c,u,m,d,p,v){return this.geom.setTo(c,u,m,d,p,v),this.updateData()},updateData:function(){var c=[],u=this.geom,m=this._tempLine;return u.getLineA(m),c.push(m.x1,m.y1,m.x2,m.y2),u.getLineB(m),c.push(m.x2,m.y2),u.getLineC(m),c.push(m.x2,m.y2),this.pathData=c,this}});S.exports=h},85172:(S,k,a)=>{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.geom.x1-p,y=c.geom.y1-v,_=c.geom.x2-p,E=c.geom.y2-v,A=c.geom.x3-p,D=c.geom.y3-v;d.beginPath(),d.moveTo(x,y),d.lineTo(_,E),d.lineTo(A,D),d.closePath(),c.isFilled&&(b(d,c),d.fill()),c.isStroked&&(T(d,c),d.stroke()),d.restore()}}},45245:(S,k,a)=>{var b=a(39429),T=a(36931);b.register("triangle",function(g,f,h,c,u,m,d,p,v,x){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p,v,x))})},96195:(S,k,a)=>{var T,g;a(29747),T=a(83253),g=a(85172),S.exports={renderWebGL:T,renderCanvas:g}},83253:(S,k,a)=>{var b=a(91296),T=a(34682),g=a(70554);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=b(c,u,m);d.calcMatrix.copyFrom(p.calc);var v=c._displayOriginX,x=c._displayOriginY,y=u.alpha*c.alpha;if(h.pipelines.preBatch(c),c.isFilled){var _=d.fillTint,E=g.getTintAppendFloatAlpha(c.fillColor,c.fillAlpha*y);_.TL=E,_.TR=E,_.BL=E,_.BR=E,d.batchFillTriangle(c.geom.x1-v,c.geom.y1-x,c.geom.x2-v,c.geom.y2-x,c.geom.x3-v,c.geom.y3-x,p.sprite,p.camera)}c.isStroked&&T(d,c,y,v,x),h.pipelines.postBatch(c)}},68287:(S,k,a)=>{var b=a(9674),T=a(83419),g=a(31401),f=a(95643),h=a(92751),c=new T({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Size,g.TextureCrop,g.Tint,g.Transform,g.Visible,h],initialize:function(m,d,p,v,x){f.call(this,m,"Sprite"),this._crop=this.resetCropObject(),this.anims=new b(this),this.setTexture(v,x),this.setPosition(d,p),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(u,m){this.anims.update(u,m)},play:function(u,m){return this.anims.play(u,m)},playReverse:function(u,m){return this.anims.playReverse(u,m)},playAfterDelay:function(u,m){return this.anims.playAfterDelay(u,m)},playAfterRepeat:function(u,m){return this.anims.playAfterRepeat(u,m)},chain:function(u){return this.anims.chain(u)},stop:function(){return this.anims.stop()},stopAfterDelay:function(u){return this.anims.stopAfterDelay(u)},stopAfterRepeat:function(u){return this.anims.stopAfterRepeat(u)},stopOnFrame:function(u){return this.anims.stopOnFrame(u)},toJSON:function(){return g.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});S.exports=c},76552:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),a.batchSprite(b,b.frame,T,g)}},15567:(S,k,a)=>{var b=a(25305),T=a(13059),g=a(44603),f=a(23568),h=a(68287);g.register("sprite",function(c,u){void 0===c&&(c={});var m=f(c,"key",null),d=f(c,"frame",null),p=new h(this.scene,0,0,m,d);return void 0!==u&&(c.add=u),b(this.scene,p,c),T(p,c),p})},46409:(S,k,a)=>{var b=a(39429),T=a(68287);b.register("sprite",function(g,f,h,c){return this.displayList.add(new T(this.scene,g,f,h,c))})},92751:(S,k,a)=>{var T,g;a(29747),T=a(9409),g=a(76552),S.exports={renderWebGL:T,renderCanvas:g}},9409:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),b.pipeline.batchSprite(b,T,g)}},14220:S=>{S.exports=function(a,b,T){var f=a.context,h=a.style,c=[],u=0,m=T.length;h.maxLines>0&&h.maxLines1&&(v+=d*(x.length-1))}h.wordWrap&&(v-=f.measureText(" ").width),c[p]=Math.ceil(v),u=Math.max(u,c[p])}var _=b.fontSize+h.strokeThickness,E=_*m,A=a.lineSpacing;return m>1&&(E+=A*(m-1)),{width:u,height:E,lines:m,lineWidths:c,lineSpacing:A,lineHeight:_}}},79557:(S,k,a)=>{var b=a(27919);S.exports=function(g){var f=b.create(this),h=f.getContext("2d",{willReadFrequently:!0});g.syncFont(f,h);var c=h.measureText(g.testString);if("actualBoundingBoxAscent"in c){var u=c.actualBoundingBoxAscent,m=c.actualBoundingBoxDescent;return b.remove(f),{ascent:u,descent:m,fontSize:u+m}}var d=Math.ceil(c.width*g.baselineX),p=d,v=2*p;p=p*g.baselineY|0,f.width=d,f.height=v,h.fillStyle="#f00",h.fillRect(0,0,d,v),h.font=g._font,h.textBaseline="alphabetic",h.fillStyle="#000",h.fillText(g.testString,0,p);var x={ascent:0,descent:0,fontSize:0},y=h.getImageData(0,0,d,v);if(!y)return x.ascent=p,x.descent=p+6,x.fontSize=x.ascent+x.descent,b.remove(f),x;var D,I,_=y.data,E=_.length,A=4*d,R=0,F=!1;for(D=0;Dp;D--){for(I=0;I{var b=a(40366),T=a(27919),g=a(83419),f=a(31401),h=a(95643),c=a(14220),u=a(35154),m=a(35846),d=a(61771),p=a(35762),v=a(45650),x=new g({Extends:h,Mixins:[f.Alpha,f.BlendMode,f.ComputedSize,f.Crop,f.Depth,f.Flip,f.GetBounds,f.Mask,f.Origin,f.Pipeline,f.PostPipeline,f.ScrollFactor,f.Tint,f.Transform,f.Visible,d],initialize:function(_,E,A,D,I){void 0===E&&(E=0),void 0===A&&(A=0),h.call(this,_,"Text"),this.renderer=_.sys.renderer,this.setPosition(E,A),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=T.create(this),this.style=new p(this,I),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=v(),this.texture=_.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(D),I&&I.padding&&this.setPadding(I.padding),I&&I.lineSpacing&&this.setLineSpacing(I.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",b(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(y){var _=this.style;if(_.wordWrapCallback){var E=_.wordWrapCallback.call(_.wordWrapCallbackScope,y,this);return Array.isArray(E)&&(E=E.join("\n")),E}return _.wordWrapWidth?_.wordWrapUseAdvanced?this.advancedWordWrap(y,this.context,this.style.wordWrapWidth):this.basicWordWrap(y,this.context,this.style.wordWrapWidth):y},advancedWordWrap:function(y,_,E){for(var A="",D=y.replace(/ +/gi," ").split(this.splitRegExp),I=D.length,R=0;RB){if(0===Q){for(var at=K;at.length&&(at=at.slice(0,-1),!((q=_.measureText(at).width)<=B)););if(!at.length)throw new Error("wordWrapWidth < a single character");var ot=G.substr(at.length);H[Q]=ot,N+=at}var it=H.slice(H[Q].length?Q:Q+1).join(" ").replace(/[ \n]*$/gi,"");D.splice(R+1,0,it),I=D.length;break}N+=K,B-=q}A+=N.replace(/[ \n]*$/gi,"")+"\n"}}return A.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(y,_,E){for(var A="",D=y.split(this.splitRegExp),I=D.length-1,R=_.measureText(" ").width,F=0;F<=I;F++){for(var N=E,V=D[F].split(" "),B=V.length-1,H=0;H<=B;H++){var Q=V[H],G=_.measureText(Q).width,K=G;HN&&H>0&&(A+="\n",N=E),A+=Q,H0&&(G+=F.lineSpacing*K),E.rtl)Q=B-Q-N.left-N.right;else if("right"===E.align)Q+=V-F.lineWidths[K];else if("center"===E.align)Q+=(V-F.lineWidths[K])/2;else if("justify"===E.align&&F.lineWidths[K]/F.width>=.85){for(var at=F.width-F.lineWidths[K],ot=_.measureText(" ").width,J=R[K].trim(),it=J.split(" "),Y=Math.floor((at+=(R[K].length-J.length)*ot)/ot),j=0;Y>0;)it[j]+=" ",j=(j+1)%(it.length-1||1),--Y;R[K]=it.join(" ")}this.autoRound&&(Q=Math.round(Q),G=Math.round(G));var nt=this.letterSpacing;if(E.strokeThickness&&0===nt&&(E.syncShadow(_,E.shadowStroke),_.strokeText(R[K],Q,G)),E.color)if(E.syncShadow(_,E.shadowFill),0!==nt)for(var ht=0,gt=R[K].split(""),wt=0;wt{S.exports=function(a,b,T,g){0===b.width||0===b.height||(T.addToRenderList(b),a.batchSprite(b,b.frame,T,g))}},71259:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(50171);T.register("text",function(h,c){void 0===h&&(h={});var u=g(h,"text",""),m=g(h,"style",null),d=g(h,"padding",null);null!==d&&(m.padding=d);var p=new f(this.scene,0,0,u,m);return void 0!==c&&(h.add=c),b(this.scene,p,h),p.autoRound=g(h,"autoRound",!0),p.resolution=g(h,"resolution",1),p})},68005:(S,k,a)=>{var b=a(50171);a(39429).register("text",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},61771:(S,k,a)=>{var T,g;a(29747),T=a(34397),g=a(79724),S.exports={renderWebGL:T,renderCanvas:g}},35762:(S,k,a)=>{var b=a(83419),T=a(23568),g=a(35154),f=a(79557),h={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|M\xc3\u2030qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},c=new b({initialize:function(m,d){this.parent=m,this.setStyle(d,!1,!0)},setStyle:function(u,m,d){for(var p in void 0===m&&(m=!0),void 0===d&&(d=!1),h){var v=d?h[p][1]:this[p];this[p]="wordWrapCallback"===p||"wordWrapCallbackScope"===p?g(u,h[p][0],v):u&&"fontSize"===p&&"number"==typeof u.fontSize?u.fontSize.toString()+"px":T(u,h[p][0],v)}var x=g(u,"font",null);null!==x&&this.setFont(x,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var y=g(u,"fill",null);null!==y&&(this.color=y);var _=g(u,"metrics",!1);return _?this.metrics={ascent:g(_,"ascent",0),descent:g(_,"descent",0),fontSize:g(_,"fontSize",0)}:(m||!this.metrics)&&(this.metrics=f(this)),m?this.parent.updateText():this.parent},syncFont:function(u,m){m.font=this._font},syncStyle:function(u,m){m.textBaseline="alphabetic",m.fillStyle=this.color,m.strokeStyle=this.stroke,m.lineWidth=this.strokeThickness,m.lineCap="round",m.lineJoin="round"},syncShadow:function(u,m){m?(u.shadowOffsetX=this.shadowOffsetX,u.shadowOffsetY=this.shadowOffsetY,u.shadowColor=this.shadowColor,u.shadowBlur=this.shadowBlur):(u.shadowOffsetX=0,u.shadowOffsetY=0,u.shadowColor=0,u.shadowBlur=0)},update:function(u){return u&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=f(this)),this.parent.updateText()},setFont:function(u,m){void 0===m&&(m=!0);var d=u,p="",v="";if("string"!=typeof u)d=g(u,"fontFamily","Courier"),p=g(u,"fontSize","16px"),v=g(u,"fontStyle","");else{var x=u.split(" "),y=0;v=x.length>2?x[y++]:"",p=x[y++]||"16px",d=x[y++]||"Courier"}return(d!==this.fontFamily||p!==this.fontSize||v!==this.fontStyle)&&(this.fontFamily=d,this.fontSize=p,this.fontStyle=v,m&&this.update(!0)),this.parent},setFontFamily:function(u){return this.fontFamily!==u&&(this.fontFamily=u,this.update(!0)),this.parent},setFontStyle:function(u){return this.fontStyle!==u&&(this.fontStyle=u,this.update(!0)),this.parent},setFontSize:function(u){return"number"==typeof u&&(u=u.toString()+"px"),this.fontSize!==u&&(this.fontSize=u,this.update(!0)),this.parent},setTestString:function(u){return this.testString=u,this.update(!0)},setFixedSize:function(u,m){return this.fixedWidth=u,this.fixedHeight=m,u&&(this.parent.width=u),m&&(this.parent.height=m),this.update(!1)},setBackgroundColor:function(u){return this.backgroundColor=u,this.update(!1)},setFill:function(u){return this.color=u,this.update(!1)},setColor:function(u){return this.color=u,this.update(!1)},setResolution:function(u){return this.resolution=u,this.update(!1)},setStroke:function(u,m){return void 0===m&&(m=this.strokeThickness),void 0===u&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):(this.stroke!==u||this.strokeThickness!==m)&&(this.stroke=u,this.strokeThickness=m,this.update(!0)),this.parent},setShadow:function(u,m,d,p,v,x){return void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d="#000"),void 0===p&&(p=0),void 0===v&&(v=!1),void 0===x&&(x=!0),this.shadowOffsetX=u,this.shadowOffsetY=m,this.shadowColor=d,this.shadowBlur=p,this.shadowStroke=v,this.shadowFill=x,this.update(!1)},setShadowOffset:function(u,m){return void 0===u&&(u=0),void 0===m&&(m=u),this.shadowOffsetX=u,this.shadowOffsetY=m,this.update(!1)},setShadowColor:function(u){return void 0===u&&(u="#000"),this.shadowColor=u,this.update(!1)},setShadowBlur:function(u){return void 0===u&&(u=0),this.shadowBlur=u,this.update(!1)},setShadowStroke:function(u){return this.shadowStroke=u,this.update(!1)},setShadowFill:function(u){return this.shadowFill=u,this.update(!1)},setWordWrapWidth:function(u,m){return void 0===m&&(m=!1),this.wordWrapWidth=u,this.wordWrapUseAdvanced=m,this.update(!1)},setWordWrapCallback:function(u,m){return void 0===m&&(m=null),this.wordWrapCallback=u,this.wordWrapCallbackScope=m,this.update(!1)},setAlign:function(u){return void 0===u&&(u="left"),this.align=u,this.update(!1)},setMaxLines:function(u){return void 0===u&&(u=0),this.maxLines=u,this.update(!1)},getTextMetrics:function(){var u=this.metrics;return{ascent:u.ascent,descent:u.descent,fontSize:u.fontSize}},toJSON:function(){var u={};for(var m in h)u[m]=this[m];return u.metrics=this.getTextMetrics(),u},destroy:function(){this.parent=void 0}});S.exports=c},34397:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c){if(0!==f.width&&0!==f.height){h.addToRenderList(f);var u=f.frame,m=u.width,d=u.height,p=b.getTintAppendFloatAlpha,v=g.pipelines.set(f.pipeline,f),x=v.setTexture2D(u.glTexture,f);v.batchTexture(f,u.glTexture,m,d,f.x,f.y,m/f.style.resolution,d/f.style.resolution,f.scaleX,f.scaleY,f.rotation,f.flipX,f.flipY,f.scrollFactorX,f.scrollFactorY,f.displayOriginX,f.displayOriginY,0,0,m,d,p(f.tintTopLeft,h.alpha*f._alphaTL),p(f.tintTopRight,h.alpha*f._alphaTR),p(f.tintBottomLeft,h.alpha*f._alphaBL),p(f.tintBottomRight,h.alpha*f._alphaBR),f.tintFill,0,0,h,c,!1,x)}}},20839:(S,k,a)=>{var b=a(27919),T=a(83419),g=a(31401),f=a(95643),h=a(98439),c=a(68703),u=a(56295),m=a(45650),d=a(26099),v=new T({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Crop,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Tint,g.Transform,g.Visible,u],initialize:function(y,_,E,A,D,I,R){var F=y.sys.renderer;f.call(this,y,"TileSprite");var N=y.sys.textures.get(I),V=N.get(R);V.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),V=(N=y.sys.textures.get("__MISSING")).get()),"DynamicTexture"===N.type&&(console.warn("TileSprite cannot use Dynamic Texture"),V=(N=y.sys.textures.get("__MISSING")).get()),A&&D?(A=Math.floor(A),D=Math.floor(D)):(A=A||V.width,D=D||V.height),this._tilePosition=new d,this._tileScale=new d(1,1),this.dirty=!1,this.renderer=F,this.canvas=b.create(this,A,D),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=N,this.displayFrame=V,this._crop=this.resetCropObject(),this._textureKey=m(),this.texture=y.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=h(V.width),this.potHeight=h(V.height),this.fillCanvas=b.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(_,E),this.setSize(A,D),this.setFrame(R),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(x,y){return this.displayTexture=this.scene.sys.textures.get(x),this.setFrame(y)},setFrame:function(x){var y=this.displayTexture.get(x);return this.potWidth=h(y.width),this.potHeight=h(y.height),this.canvas.width=0,y.cutWidth&&y.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=y,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(x,y){return void 0!==x&&(this.tilePositionX=x),void 0!==y&&(this.tilePositionY=y),this},setTileScale:function(x,y){return void 0===x&&(x=this.tileScaleX),void 0===y&&(y=x),this.tileScaleX=x,this.tileScaleY=y,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var x=this.displayFrame;if(x.source.isRenderTexture||x.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var y=this.fillContext,_=this.fillCanvas,E=this.potWidth,A=this.potHeight;(!this.renderer||!this.renderer.gl)&&(E=x.cutWidth,A=x.cutHeight),y.clearRect(0,0,E,A),_.width=E,_.height=A,y.drawImage(x.source.image,x.cutX,x.cutY,x.cutWidth,x.cutHeight,0,0,E,A),this.fillPattern=this.renderer&&this.renderer.gl?this.renderer.canvasToTexture(_,this.fillPattern):y.createPattern(_,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var x=this.canvas;if((x.width!==this.width||x.height!==this.height)&&(x.width=this.width,x.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var y=this.context;this.scene.sys.game.config.antialias||c.disable(y);var _=this._tileScale.x,E=this._tileScale.y,A=this._tilePosition.x,D=this._tilePosition.y;y.clearRect(0,0,this.width,this.height),y.save(),y.scale(_,E),y.translate(-A,-D),y.fillStyle=this.fillPattern,y.fillRect(A,D,this.width/_,this.height/E),y.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),b.remove(this.canvas),b.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var x=this.texture;x&&x.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(x){this._tilePosition.x=x,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(x){this._tilePosition.y=x,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(x){this._tileScale.x=x,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(x){this._tileScale.y=x,this.dirty=!0}}});S.exports=v},46992:S=>{S.exports=function(a,b,T,g){b.updateCanvas(),T.addToRenderList(b),a.batchSprite(b,b.frame,T,g)}},14167:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(20839);T.register("tileSprite",function(h,c){void 0===h&&(h={});var u=g(h,"x",0),m=g(h,"y",0),d=g(h,"width",512),p=g(h,"height",512),v=g(h,"key",""),x=g(h,"frame",""),y=new f(this.scene,u,m,d,p,v,x);return void 0!==c&&(h.add=c),b(this.scene,y,h),y})},91681:(S,k,a)=>{var b=a(20839);a(39429).register("tileSprite",function(g,f,h,c,u,m){return this.displayList.add(new b(this.scene,g,f,h,c,u,m))})},56295:(S,k,a)=>{var T,g;a(29747),T=a(18553),g=a(46992),S.exports={renderWebGL:T,renderCanvas:g}},18553:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c){f.updateCanvas();var u=f.width,m=f.height;if(0!==u&&0!==m){h.addToRenderList(f);var d=b.getTintAppendFloatAlpha,p=g.pipelines.set(f.pipeline,f),v=p.setTexture2D(f.fillPattern,f);p.batchTexture(f,f.fillPattern,f.displayFrame.width*f.tileScaleX,f.displayFrame.height*f.tileScaleY,f.x,f.y,u,m,f.scaleX,f.scaleY,f.rotation,f.flipX,f.flipY,f.scrollFactorX,f.scrollFactorY,f.originX*u,f.originY*m,0,0,u,m,d(f.tintTopLeft,h.alpha*f._alphaTL),d(f.tintTopRight,h.alpha*f._alphaTR),d(f.tintBottomLeft,h.alpha*f._alphaBL),d(f.tintBottomRight,h.alpha*f._alphaBR),f.tintFill,f.tilePositionX%f.displayFrame.width/f.displayFrame.width,f.tilePositionY%f.displayFrame.height/f.displayFrame.height,h,c,!1,v)}}},18471:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(31401),f=a(51708),h=a(8443),c=a(95643),u=a(36383),m=a(14463),d=a(45650),p=a(10247),v=new T({Extends:c,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.TextureCrop,g.Tint,g.Transform,g.Visible,p],initialize:function(y,_,E,A){c.call(this,y,"Video"),this.flipY=!1,this._key=d(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var D=y.sys.game;this._device=D.device.video,this.setPosition(_,E),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),D.events.on(h.PAUSE,this.globalPause,this),D.events.on(h.RESUME,this.globalResume,this);var I=y.sys.sound;I&&I.on(m.GLOBAL_MUTE,this.globalMute,this),A&&this.load(A)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(x){var y=this.scene.sys.cache.video.get(x);return y?(this.cacheKey=x,this.loadHandler(y.url,y.noAudio,y.crossOrigin)):console.warn("No video in cache for key: "+x),this},changeSource:function(x,y,_,E,A){void 0===y&&(y=!0),void 0===_&&(_=!1),this.cacheKey!==x&&(this.load(x),y&&this.play(_,E,A))},getVideoKey:function(){return this.cacheKey},loadURL:function(x,y,_){void 0===y&&(y=!1);var E=this._device.getVideoURL(x);return E?(this.cacheKey="",this.loadHandler(E.url,y,_)):console.warn("No supported video format found for "+x),this},loadMediaStream:function(x,y,_){return this.loadHandler(null,y,_,x)},loadHandler:function(x,y,_,E){y||(y=!1);var A=this.video;if(A?(this.removeLoadEventHandlers(),this.stop()):((A=document.createElement("video")).controls=!1,A.setAttribute("playsinline","playsinline"),A.setAttribute("preload","auto"),A.setAttribute("disablePictureInPicture","true")),y?(A.muted=!0,A.defaultMuted=!0,A.setAttribute("autoplay","autoplay")):(A.muted=!1,A.defaultMuted=!1,A.removeAttribute("autoplay")),_?A.setAttribute("crossorigin",_):A.removeAttribute("crossorigin"),E)if("srcObject"in A)try{A.srcObject=E}catch(I){if("TypeError"!==I.name)throw I;A.src=URL.createObjectURL(E)}else A.src=URL.createObjectURL(E);else A.src=x;this.retry=0,this.video=A,this._playCalled=!1,A.load(),this.addLoadEventHandlers();var D=this.scene.sys.textures.get(this._key);return this.setTexture(D),this},requestVideoFrame:function(x,y){var _=this.video;if(_){var E=y.width,A=y.height,D=this.videoTexture,I=this.videoTextureSource,R=!D||I.source!==_;R?(this._codePaused=_.paused,this._codeMuted=_.muted,D?(I.source=_,I.width=E,I.height=A,D.get().setSize(E,A)):((D=this.scene.sys.textures.create(this._key,_,E,A)).add("__BASE",0,0,0,E,A),this.setTexture(D),this.videoTexture=D,this.videoTextureSource=D.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(f.VIDEO_TEXTURE,this,D)),this.setSizeToFrame(),this.updateDisplayOrigin()):I.update(),this.isStalled=!1,this.metadata=y;var F=y.mediaTime;R&&(this._lastUpdate=F,this.emit(f.VIDEO_CREATED,this,E,A),this.frameReady||(this.frameReady=!0,this.emit(f.VIDEO_PLAY,this))),this._playingMarker?F>=this._markerOut&&(_.loop?(_.currentTime=this._markerIn,this.emit(f.VIDEO_LOOP,this)):(this.stop(!1),this.emit(f.VIDEO_COMPLETE,this))):F-1&&_>y&&_=0&&!isNaN(_)&&_>y&&(this.markers[x]=[y,_]),this},playMarker:function(x,y){var _=this.markers[x];return _&&this.play(y,_[0],_[1]),this},removeMarker:function(x){return delete this.markers[x],this},snapshot:function(x,y){return void 0===x&&(x=this.width),void 0===y&&(y=this.height),this.snapshotArea(0,0,this.width,this.height,x,y)},snapshotArea:function(x,y,_,E,A,D){void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=this.width),void 0===E&&(E=this.height),void 0===A&&(A=_),void 0===D&&(D=E);var I=this.video,R=this.snapshotTexture;return R?(R.setSize(A,D),I&&R.context.drawImage(I,x,y,_,E,0,0,A,D)):(R=this.scene.sys.textures.createCanvas(d(),A,D),this.snapshotTexture=R,I&&R.context.drawImage(I,x,y,_,E,0,0,A,D)),R.update()},saveSnapshotTexture:function(x){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,x):this.snapshotTexture=this.scene.sys.textures.createCanvas(x,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(f.VIDEO_UNLOCKED,this));var x=this.scene.sys.sound;x&&x.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(x){var y=x.name;"NotAllowedError"===y?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(f.VIDEO_LOCKED,this)):"NotSupportedError"===y?(this.stop(!1),this.emit(f.VIDEO_UNSUPPORTED,this,x)):(this.stop(!1),this.emit(f.VIDEO_ERROR,this,x))},legacyPlayHandler:function(){var x=this.video;x&&(this.playSuccess(),x.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(f.VIDEO_PLAYING,this)},loadErrorHandler:function(x){this.stop(!1),this.emit(f.VIDEO_ERROR,this,x)},metadataHandler:function(x){this.emit(f.VIDEO_METADATA,this,x)},setSizeToFrame:function(x){x||(x=this.frame),this.width=x.realWidth,this.height=x.realHeight,1!==this.scaleX&&(this.scaleX=this.displayWidth/this.width),1!==this.scaleY&&(this.scaleY=this.displayHeight/this.height);var y=this.input;return y&&!y.customHitArea&&(y.hitArea.width=this.width,y.hitArea.height=this.height),this},stalledHandler:function(x){this.isStalled=!0,this.emit(f.VIDEO_STALLED,this,x)},completeHandler:function(){this._playCalled=!1,this.emit(f.VIDEO_COMPLETE,this)},preUpdate:function(x,y){!this.video||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=y,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(x){var y=this.video;if(y){var _=y.duration;_===1/0||isNaN(_)||this.setCurrentTime(_*x)}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(x){var y=this.video;if(y){if("string"==typeof x){var _=x[0],E=parseFloat(x.substr(1));"+"===_?x=y.currentTime+E:"-"===_&&(x=y.currentTime-E)}y.currentTime=x}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(f.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(f.VIDEO_SEEKED,this)},getProgress:function(){var x=this.video;if(x){var y=x.duration;if(y!==1/0&&!isNaN(y))return x.currentTime/y}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(x){void 0===x&&(x=!0),this._codeMuted=x;var y=this.video;return y&&(y.muted=!!this._systemMuted||x),this},isMuted:function(){return this._codeMuted},globalMute:function(x,y){this._systemMuted=y;var _=this.video;_&&(_.muted=!!this._codeMuted||y)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(x){void 0===x&&(x=!0);var y=this.video;return this._codePaused=x,y&&!y.ended&&(x?y.paused||(this.removeEventHandlers(),y.pause()):x||(this._playCalled?y.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(x){return void 0===x&&(x=1),this.video&&(this.video.volume=b(x,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(x){return this.video&&(this.video.playbackRate=x),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(x){return void 0===x&&(x=!0),this.video&&(this.video.loop=x),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(x,y){return void 0===y&&(y=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,x),this.videoTextureSource.setFlipY(y)),this._key=x,this.flipY=y,!!this.videoTexture},stop:function(x){void 0===x&&(x=!0);var y=this.video;return y&&(this.removeEventHandlers(),y.cancelVideoFrameCallback(this._rfvCallbackId),y.pause()),this.retry=0,this._playCalled=!1,x&&this.emit(f.VIDEO_STOP,this),this},removeVideoElement:function(){var x=this.video;if(x){for(x.parentNode&&x.parentNode.removeChild(x);x.hasChildNodes();)x.removeChild(x.firstChild);x.removeAttribute("autoplay"),x.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var x=this.scene.sys.game.events;x.off(h.PAUSE,this.globalPause,this),x.off(h.RESUME,this.globalResume,this);var y=this.scene.sys.sound;y&&y.off(m.GLOBAL_MUTE,this.globalMute,this)}});S.exports=v},58352:S=>{S.exports=function(a,b,T,g){b.videoTexture&&(T.addToRenderList(b),a.batchSprite(b,b.frame,T,g))}},11511:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(18471);T.register("video",function(h,c){void 0===h&&(h={});var u=g(h,"key",null),m=new f(this.scene,0,0,u);return void 0!==c&&(h.add=c),b(this.scene,m,h),m})},89025:(S,k,a)=>{var b=a(18471);a(39429).register("video",function(g,f,h){return this.displayList.add(new b(this.scene,g,f,h))})},10247:(S,k,a)=>{var T,g;a(29747),T=a(29849),g=a(58352),S.exports={renderWebGL:T,renderCanvas:g}},29849:S=>{S.exports=function(a,b,T,g){b.videoTexture&&(T.addToRenderList(b),b.pipeline.batchSprite(b,T,g))}},41481:(S,k,a)=>{var b=a(10312),T=a(96503),g=a(87902),f=a(83419),h=a(31401),c=a(95643),u=a(87841),m=a(37303),d=new f({Extends:c,Mixins:[h.Depth,h.GetBounds,h.Origin,h.Transform,h.ScrollFactor,h.Visible],initialize:function(v,x,y,_,E){void 0===_&&(_=1),void 0===E&&(E=_),c.call(this,v,"Zone"),this.setPosition(x,y),this.width=_,this.height=E,this.blendMode=b.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(p){this.scaleX=p/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(p){this.scaleY=p/this.height}},setSize:function(p,v,x){void 0===x&&(x=!0),this.width=p,this.height=v,this.updateDisplayOrigin();var y=this.input;return x&&y&&!y.customHitArea&&(y.hitArea.width=p,y.hitArea.height=v),this},setDisplaySize:function(p,v){return this.displayWidth=p,this.displayHeight=v,this},setCircleDropZone:function(p){return this.setDropZone(new T(0,0,p),g)},setRectangleDropZone:function(p,v){return this.setDropZone(new u(0,0,p,v),m)},setDropZone:function(p,v){return this.input||this.setInteractive(p,v,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(p,v,x){x.addToRenderList(v)},renderWebGL:function(p,v,x){x.addToRenderList(v)}});S.exports=d},95261:(S,k,a)=>{var b=a(44603),T=a(23568),g=a(41481);b.register("zone",function(f){var h=T(f,"x",0),c=T(f,"y",0),u=T(f,"width",1),m=T(f,"height",u);return new g(this.scene,h,c,u,m)})},84175:(S,k,a)=>{var b=a(41481);a(39429).register("zone",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},95166:S=>{S.exports=function(a){return a.radius>0?Math.PI*a.radius*a.radius:0}},96503:(S,k,a)=>{var b=a(83419),T=a(87902),g=a(26241),f=a(79124),h=a(23777),c=a(28176),u=new b({initialize:function(d,p,v){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),this.type=h.CIRCLE,this.x=d,this.y=p,this._radius=v,this._diameter=2*v},contains:function(m,d){return T(this,m,d)},getPoint:function(m,d){return g(this,m,d)},getPoints:function(m,d,p){return f(this,m,d,p)},getRandomPoint:function(m){return c(this,m)},setTo:function(m,d,p){return this.x=m,this.y=d,this._radius=p,this._diameter=2*p,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(m,d){return void 0===d&&(d=m),this.x=m,this.y=d,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(m){this._radius=m,this._diameter=2*m}},diameter:{get:function(){return this._diameter},set:function(m){this._diameter=m,this._radius=.5*m}},left:{get:function(){return this.x-this._radius},set:function(m){this.x=m+this._radius}},right:{get:function(){return this.x+this._radius},set:function(m){this.x=m-this._radius}},top:{get:function(){return this.y-this._radius},set:function(m){this.y=m+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(m){this.y=m-this._radius}}});S.exports=u},71562:S=>{S.exports=function(a){return Math.PI*a.radius*2}},92110:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){return void 0===h&&(h=new b),h.x=g.x+g.radius*Math.cos(f),h.y=g.y+g.radius*Math.sin(f),h}},42250:(S,k,a)=>{var b=a(96503);S.exports=function(g){return new b(g.x,g.y,g.radius)}},87902:S=>{S.exports=function(a,b,T){return a.radius>0&&b>=a.left&&b<=a.right&&T>=a.top&&T<=a.bottom&&(a.x-b)*(a.x-b)+(a.y-T)*(a.y-T)<=a.radius*a.radius}},5698:(S,k,a)=>{var b=a(87902);S.exports=function(g,f){return b(g,f.x,f.y)}},70588:(S,k,a)=>{var b=a(87902);S.exports=function(g,f){return b(g,f.x,f.y)&&b(g,f.right,f.y)&&b(g,f.x,f.bottom)&&b(g,f.right,f.bottom)}},26394:S=>{S.exports=function(a,b){return b.setTo(a.x,a.y,a.radius)}},76278:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y&&a.radius===b.radius}},2074:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.left,f.y=g.top,f.width=g.diameter,f.height=g.diameter,f}},26241:(S,k,a)=>{var b=a(92110),T=a(62945),g=a(36383),f=a(2141);S.exports=function(c,u,m){void 0===m&&(m=new f);var d=T(u,0,g.PI2);return b(c,d,m)}},79124:(S,k,a)=>{var b=a(71562),T=a(92110),g=a(62945),f=a(36383);S.exports=function(c,u,m,d){void 0===d&&(d=[]),!u&&m>0&&(u=b(c)/m);for(var p=0;p{S.exports=function(a,b,T){return a.x+=b,a.y+=T,a}},39212:S=>{S.exports=function(a,b){return a.x+=b.x,a.y+=b.y,a}},28176:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=2*Math.PI*Math.random(),c=Math.random()+Math.random(),u=c>1?2-c:c,m=u*Math.cos(h),d=u*Math.sin(h);return f.x=g.x+m*g.radius,f.y=g.y+d*g.radius,f}},88911:(S,k,a)=>{var b=a(96503);b.Area=a(95166),b.Circumference=a(71562),b.CircumferencePoint=a(92110),b.Clone=a(42250),b.Contains=a(87902),b.ContainsPoint=a(5698),b.ContainsRect=a(70588),b.CopyFrom=a(26394),b.Equals=a(76278),b.GetBounds=a(2074),b.GetPoint=a(26241),b.GetPoints=a(79124),b.Offset=a(50884),b.OffsetPoint=a(39212),b.Random=a(28176),S.exports=b},23777:S=>{S.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},78874:S=>{S.exports=function(a){return a.isEmpty()?0:a.getMajorRadius()*a.getMinorRadius()*Math.PI}},92990:S=>{S.exports=function(a){var b=a.width/2,T=a.height/2,g=Math.pow(b-T,2)/Math.pow(b+T,2);return Math.PI*(b+T)*(1+3*g/(10+Math.sqrt(4-3*g)))}},79522:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){void 0===h&&(h=new b);var u=g.height/2;return h.x=g.x+g.width/2*Math.cos(f),h.y=g.y+u*Math.sin(f),h}},58102:(S,k,a)=>{var b=a(8497);S.exports=function(g){return new b(g.x,g.y,g.width,g.height)}},81154:S=>{S.exports=function(a,b,T){if(a.width<=0||a.height<=0)return!1;var g=(b-a.x)/a.width,f=(T-a.y)/a.height;return(g*=g)+(f*=f)<.25}},46662:(S,k,a)=>{var b=a(81154);S.exports=function(g,f){return b(g,f.x,f.y)}},1632:(S,k,a)=>{var b=a(81154);S.exports=function(g,f){return b(g,f.x,f.y)&&b(g,f.right,f.y)&&b(g,f.x,f.bottom)&&b(g,f.right,f.bottom)}},65534:S=>{S.exports=function(a,b){return b.setTo(a.x,a.y,a.width,a.height)}},8497:(S,k,a)=>{var b=a(83419),T=a(81154),g=a(90549),f=a(48320),h=a(23777),c=a(24820),u=new b({initialize:function(d,p,v,x){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),this.type=h.ELLIPSE,this.x=d,this.y=p,this.width=v,this.height=x},contains:function(m,d){return T(this,m,d)},getPoint:function(m,d){return g(this,m,d)},getPoints:function(m,d,p){return f(this,m,d,p)},getRandomPoint:function(m){return c(this,m)},setTo:function(m,d,p,v){return this.x=m,this.y=d,this.width=p,this.height=v,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(m,d){return void 0===d&&(d=m),this.x=m,this.y=d,this},setSize:function(m,d){return void 0===d&&(d=m),this.width=m,this.height=d,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(m){this.x=m+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(m){this.x=m-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(m){this.y=m+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(m){this.y=m-this.height/2}}});S.exports=u},36146:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}},23694:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.left,f.y=g.top,f.width=g.width,f.height=g.height,f}},90549:(S,k,a)=>{var b=a(79522),T=a(62945),g=a(36383),f=a(2141);S.exports=function(c,u,m){void 0===m&&(m=new f);var d=T(u,0,g.PI2);return b(c,d,m)}},48320:(S,k,a)=>{var b=a(92990),T=a(79522),g=a(62945),f=a(36383);S.exports=function(c,u,m,d){void 0===d&&(d=[]),!u&&m>0&&(u=b(c)/m);for(var p=0;p{S.exports=function(a,b,T){return a.x+=b,a.y+=T,a}},44808:S=>{S.exports=function(a,b){return a.x+=b.x,a.y+=b.y,a}},24820:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=Math.random()*Math.PI*2,c=Math.sqrt(Math.random());return f.x=g.x+c*Math.cos(h)*g.width/2,f.y=g.y+c*Math.sin(h)*g.height/2,f}},49203:(S,k,a)=>{var b=a(8497);b.Area=a(78874),b.Circumference=a(92990),b.CircumferencePoint=a(79522),b.Clone=a(58102),b.Contains=a(81154),b.ContainsPoint=a(46662),b.ContainsRect=a(1632),b.CopyFrom=a(65534),b.Equals=a(36146),b.GetBounds=a(23694),b.GetPoint=a(90549),b.GetPoints=a(48320),b.Offset=a(73424),b.OffsetPoint=a(44808),b.Random=a(24820),S.exports=b},55738:(S,k,a)=>{var b=a(23777),T=a(79291),g={Circle:a(88911),Ellipse:a(49203),Intersects:a(91865),Line:a(2529),Mesh:a(73090),Point:a(43711),Polygon:a(58423),Rectangle:a(93232),Triangle:a(84435)};g=T(!1,g,b),S.exports=g},2044:(S,k,a)=>{var b=a(20339);S.exports=function(g,f){return b(g.x,g.y,f.x,f.y)<=g.radius+f.radius}},81491:S=>{S.exports=function(a,b){var T=b.width/2,g=b.height/2,f=Math.abs(a.x-b.x-T),h=Math.abs(a.y-b.y-g);if(f>T+a.radius||h>g+a.radius)return!1;if(f<=T||h<=g)return!0;var m=f-T,d=h-g;return m*m+d*d<=a.radius*a.radius}},63376:(S,k,a)=>{var b=a(2141),T=a(2044);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var y,_,A,D,u=f.x,m=f.y,d=f.radius,p=h.x,v=h.y,x=h.radius;if(m===v)0==(A=(_=-2*v)*_-4*(y=1)*(p*p+(D=(x*x-d*d-p*p+u*u)/(2*(u-p)))*D-2*p*D+v*v-x*x))?c.push(new b(D,-_/(2*y))):A>0&&(c.push(new b(D,(-_+Math.sqrt(A))/(2*y))),c.push(new b(D,(-_-Math.sqrt(A))/(2*y))));else{var I=(u-p)/(m-v),R=(x*x-d*d-p*p+u*u-v*v+m*m)/(2*(m-v));0==(A=(_=2*m*I-2*R*I-2*u)*_-4*(y=I*I+1)*(u*u+m*m+R*R-d*d-2*m*R))?c.push(new b(D=-_/(2*y),R-D*I)):A>0&&(D=(-_+Math.sqrt(A))/(2*y),c.push(new b(D,R-D*I)),D=(-_-Math.sqrt(A))/(2*y),c.push(new b(D,R-D*I)))}}return c}},97439:(S,k,a)=>{var b=a(4042),T=a(81491);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var u=h.getLineA(),m=h.getLineB(),d=h.getLineC(),p=h.getLineD();b(u,f,c),b(m,f,c),b(d,f,c),b(p,f,c)}return c}},4042:(S,k,a)=>{var b=a(2141),T=a(80462);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var V,B,u=f.x1,m=f.y1,y=h.radius,_=f.x2-u,E=f.y2-m,A=u-h.x,D=m-h.y,I=_*_+E*E,R=2*(_*A+E*D),N=R*R-4*I*(A*A+D*D-y*y);if(0===N){var H=-R/(2*I);V=u+H*_,B=m+H*E,H>=0&&H<=1&&c.push(new b(V,B))}else if(N>0){var Q=(-R-Math.sqrt(N))/(2*I);V=u+Q*_,B=m+Q*E,Q>=0&&Q<=1&&c.push(new b(V,B));var G=(-R+Math.sqrt(N))/(2*I);V=u+G*_,B=m+G*E,G>=0&&G<=1&&c.push(new b(V,B))}}return c}},36100:(S,k,a)=>{var b=a(25836);S.exports=function(g,f,h,c){void 0===h&&(h=!1);var F,N,V,u=g.x1,m=g.y1,v=f.x1,x=f.y1,E=g.x2-u,A=g.y2-m,D=f.x2-v,I=f.y2-x,R=E*I-A*D;if(0===R)return null;if(h){if(F=(E*(x-m)+A*(u-v))/(D*A-I*E),0!==E)N=(v+D*F-u)/E;else{if(0===A)return null;N=(x+I*F-m)/A}if(N<0||F<0||F>1)return null;V=N}else{if(N=((m-x)*E-(u-v)*A)/R,(F=((v-u)*I-(x-m)*D)/R)<0||F>1||N<0||N>1)return null;V=F}return void 0===c&&(c=new b),c.set(u+E*V,m+A*V,V)}},3073:(S,k,a)=>{var b=a(36100),T=a(23031),g=a(25836),f=new T,h=new g;S.exports=function(u,m,d,p){void 0===d&&(d=!1),void 0===p&&(p=new g);var v=!1;p.set(),h.set();for(var x=m[m.length-1],y=0;y{var b=a(25836),T=a(61369),g=a(3073),f=new b;S.exports=function(c,u,m,d){void 0===d&&(d=new T),Array.isArray(u)||(u=[u]);var p=!1;d.set(),f.set();for(var v=0;v{var b=a(2141),T=a(76112),g=a(92773);S.exports=function(h,c,u){if(void 0===u&&(u=[]),g(h,c))for(var m=c.getLineA(),d=c.getLineB(),p=c.getLineC(),v=c.getLineD(),x=[new b,new b,new b,new b],y=[T(m,h,x[0]),T(d,h,x[1]),T(p,h,x[2]),T(v,h,x[3])],_=0;_<4;_++)y[_]&&u.push(x[_]);return u}},71147:(S,k,a)=>{var b=a(61369),T=a(56362),f=new(a(23031));function h(m,d,p,v,x){var y=Math.cos(m),_=Math.sin(m);f.setTo(d,p,d+y,p+_);var E=T(f,v,!0);E&&x.push(new b(E.x,E.y,m,E.w))}function c(m,d){return m.z-d.z}S.exports=function(m,d,p){Array.isArray(p)||(p=[p]);for(var v=[],x=[],y=0;y{var b=a(87841),T=a(59996);S.exports=function(f,h,c){return void 0===c&&(c=new b),T(f,h)&&(c.x=Math.max(f.x,h.x),c.y=Math.max(f.y,h.y),c.width=Math.min(f.right,h.right)-c.x,c.height=Math.min(f.bottom,h.bottom)-c.y),c}},52784:(S,k,a)=>{var b=a(60646),T=a(59996);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var u=f.getLineA(),m=f.getLineB(),d=f.getLineC(),p=f.getLineD();b(u,h,c),b(m,h,c),b(d,h,c),b(p,h,c)}return c}},26341:(S,k,a)=>{var b=a(89265),T=a(60646);S.exports=function(f,h,c){if(void 0===c&&(c=[]),b(f,h)){var u=h.getLineA(),m=h.getLineB(),d=h.getLineC();T(u,f,c),T(m,f,c),T(d,f,c)}return c}},38720:(S,k,a)=>{var b=a(4042),T=a(67636);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var u=f.getLineA(),m=f.getLineB(),d=f.getLineC();b(u,h,c),b(m,h,c),b(d,h,c)}return c}},13882:(S,k,a)=>{var b=a(2141),T=a(2822),g=a(76112);S.exports=function(h,c,u){if(void 0===u&&(u=[]),T(h,c))for(var m=h.getLineA(),d=h.getLineB(),p=h.getLineC(),v=[new b,new b,new b],x=[g(m,c,v[0]),g(d,c,v[1]),g(p,c,v[2])],y=0;y<3;y++)x[y]&&u.push(v[y]);return u}},75636:(S,k,a)=>{var b=a(82944),T=a(13882);S.exports=function(f,h,c){if(void 0===c&&(c=[]),b(f,h)){var u=h.getLineA(),m=h.getLineB(),d=h.getLineC();T(f,u,c),T(f,m,c),T(f,d,c)}return c}},80462:(S,k,a)=>{var b=a(87902),g=new(a(2141));S.exports=function(h,c,u){if(void 0===u&&(u=g),b(c,h.x1,h.y1))return u.x=h.x1,u.y=h.y1,!0;if(b(c,h.x2,h.y2))return u.x=h.x2,u.y=h.y2,!0;var m=h.x2-h.x1,d=h.y2-h.y1,x=m*m+d*d,y=m,_=d;if(x>0){var E=((c.x-h.x1)*m+(c.y-h.y1)*d)/x;y*=E,_*=E}return u.x=h.x1+y,u.y=h.y1+_,y*y+_*_<=x&&y*m+_*d>=0&&b(c,u.x,u.y)}},76112:S=>{S.exports=function(a,b,T){var g=a.x1,f=a.y1,h=a.x2,c=a.y2,u=b.x1,m=b.y1,d=b.x2,p=b.y2;if(g===h&&f===c||u===d&&m===p)return!1;var v=(p-m)*(h-g)-(d-u)*(c-f);if(0===v)return!1;var x=((d-u)*(f-m)-(p-m)*(g-u))/v,y=((h-g)*(f-m)-(c-f)*(g-u))/v;return!(x<0||x>1||y<0||y>1||(T&&(T.x=g+x*(h-g),T.y=f+x*(c-f)),0))}},92773:S=>{S.exports=function(a,b){var T=a.x1,g=a.y1,f=a.x2,h=a.y2,c=b.x,u=b.y,m=b.right,d=b.bottom,p=0;if(T>=c&&T<=m&&g>=u&&g<=d||f>=c&&f<=m&&h>=u&&h<=d)return!0;if(T=c){if((p=g+(h-g)*(c-T)/(f-T))>u&&p<=d)return!0}else if(T>m&&f<=m&&(p=g+(h-g)*(m-T)/(f-T))>=u&&p<=d)return!0;if(g=u){if((p=T+(f-T)*(u-g)/(h-g))>=c&&p<=m)return!0}else if(g>d&&h<=d&&(p=T+(f-T)*(d-g)/(h-g))>=c&&p<=m)return!0;return!1}},16204:S=>{S.exports=function(a,b,T){void 0===T&&(T=1);var g=b.x1,f=b.y1,h=b.x2,c=b.y2,u=a.x,m=a.y,d=(h-g)*(h-g)+(c-f)*(c-f);if(0===d)return!1;var p=((u-g)*(h-g)+(m-f)*(c-f))/d;return p<0?Math.sqrt((g-u)*(g-u)+(f-m)*(f-m))<=T:p>=0&&p<=1?Math.abs(((f-m)*(h-g)-(g-u)*(c-f))/d)*Math.sqrt(d)<=T:Math.sqrt((h-u)*(h-u)+(c-m)*(c-m))<=T}},14199:(S,k,a)=>{var b=a(16204);S.exports=function(g,f){if(!b(g,f))return!1;var h=Math.min(f.x1,f.x2),c=Math.max(f.x1,f.x2),u=Math.min(f.y1,f.y2),m=Math.max(f.y1,f.y2);return g.x>=h&&g.x<=c&&g.y>=u&&g.y<=m}},59996:S=>{S.exports=function(a,b){return!(a.width<=0||a.height<=0||b.width<=0||b.height<=0||a.rightb.right||a.y>b.bottom)}},89265:(S,k,a)=>{var b=a(76112),T=a(37303),g=a(48653),f=a(77493);S.exports=function(c,u){if(u.left>c.right||u.rightc.bottom||u.bottom0}},84411:S=>{S.exports=function(a,b,T,g,f,h){return void 0===h&&(h=0),!(b>a.right+h||Ta.bottom+h||f{var b=a(80462),T=a(10690);S.exports=function(f,h){return!(f.left>h.right||f.righth.bottom||f.bottom{var b=a(76112);S.exports=function(g,f){return!!(g.contains(f.x1,f.y1)||g.contains(f.x2,f.y2)||b(g.getLineA(),f)||b(g.getLineB(),f)||b(g.getLineC(),f))}},82944:(S,k,a)=>{var b=a(48653),T=a(71694),g=a(76112);S.exports=function(h,c){if(h.left>c.right||h.rightc.bottom||h.bottom0||(y=T(c),(_=b(h,y,!0)).length>0)}},91865:(S,k,a)=>{S.exports={CircleToCircle:a(2044),CircleToRectangle:a(81491),GetCircleToCircle:a(63376),GetCircleToRectangle:a(97439),GetLineToCircle:a(4042),GetLineToLine:a(36100),GetLineToPoints:a(3073),GetLineToPolygon:a(56362),GetLineToRectangle:a(60646),GetRaysFromPointToPolygon:a(71147),GetRectangleIntersection:a(68389),GetRectangleToRectangle:a(52784),GetRectangleToTriangle:a(26341),GetTriangleToCircle:a(38720),GetTriangleToLine:a(13882),GetTriangleToTriangle:a(75636),LineToCircle:a(80462),LineToLine:a(76112),LineToRectangle:a(92773),PointToLine:a(16204),PointToLineSegment:a(14199),RectangleToRectangle:a(59996),RectangleToTriangle:a(89265),RectangleToValues:a(84411),TriangleToCircle:a(67636),TriangleToLine:a(2822),TriangleToTriangle:a(82944)}},91938:S=>{S.exports=function(a){return Math.atan2(a.y2-a.y1,a.x2-a.x1)}},84993:S=>{S.exports=function(a,b,T){void 0===b&&(b=1),void 0===T&&(T=[]);var g=Math.round(a.x1),f=Math.round(a.y1),h=Math.round(a.x2),c=Math.round(a.y2),u=Math.abs(h-g),m=Math.abs(c-f),d=g-m&&(v-=m,g+=d),y{S.exports=function(a,b,T){var g=b-(a.x1+a.x2)/2,f=T-(a.y1+a.y2)/2;return a.x1+=g,a.y1+=f,a.x2+=g,a.y2+=f,a}},31116:(S,k,a)=>{var b=a(23031);S.exports=function(g){return new b(g.x1,g.y1,g.x2,g.y2)}},59944:S=>{S.exports=function(a,b){return b.setTo(a.x1,a.y1,a.x2,a.y2)}},59220:S=>{S.exports=function(a,b){return a.x1===b.x1&&a.y1===b.y1&&a.x2===b.x2&&a.y2===b.y2}},78177:(S,k,a)=>{var b=a(35001);S.exports=function(g,f,h){void 0===h&&(h=f);var c=b(g),u=g.x2-g.x1,m=g.y2-g.y1;return f&&(g.x1=g.x1-u/c*f,g.y1=g.y1-m/c*f),h&&(g.x2=g.x2+u/c*h,g.y2=g.y2+m/c*h),g}},26708:(S,k,a)=>{var b=a(52816),T=a(6113),g=a(2141);S.exports=function(h,c,u,m,d){void 0===m&&(m=0),void 0===d&&(d=[]);var A,D,p=[],v=h.x1,x=h.y1,y=h.x2-v,_=h.y2-x,E=T(c,d),I=u-1;for(A=0;A0){var R=p[0],F=[R];for(A=1;A=m&&(F.push(N),R=N)}var V=p[p.length-1];return b(R,V){var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=(g.x1+g.x2)/2,f.y=(g.y1+g.y2)/2,f}},99569:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){void 0===h&&(h=new b);var c=g.x1,u=g.y1,m=g.x2,d=g.y2,p=(m-c)*(m-c)+(d-u)*(d-u);if(0===p)return h;var v=((f.x-c)*(m-c)+(f.y-u)*(d-u))/p;return h.x=c+v*(m-c),h.y=u+v*(d-u),h}},34638:(S,k,a)=>{var b=a(36383),T=a(91938),g=a(2141);S.exports=function(h,c){void 0===c&&(c=new g);var u=T(h)-b.TAU;return c.x=Math.cos(u),c.y=Math.sin(u),c}},13151:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){return void 0===h&&(h=new b),h.x=g.x1+(g.x2-g.x1)*f,h.y=g.y1+(g.y2-g.y1)*f,h}},15258:(S,k,a)=>{var b=a(35001),T=a(2141);S.exports=function(f,h,c,u){void 0===u&&(u=[]),!h&&c>0&&(h=b(f)/c);for(var m=f.x1,d=f.y1,p=f.x2,v=f.y2,x=0;x{S.exports=function(a,b){var T=a.x1,g=a.y1,f=a.x2,h=a.y2,c=(f-T)*(f-T)+(h-g)*(h-g);return 0!==c&&Math.abs(((g-b.y)*(f-T)-(T-b.x)*(h-g))/c)*Math.sqrt(c)}},98770:S=>{S.exports=function(a){return Math.abs(a.y1-a.y2)}},35001:S=>{S.exports=function(a){return Math.sqrt((a.x2-a.x1)*(a.x2-a.x1)+(a.y2-a.y1)*(a.y2-a.y1))}},23031:(S,k,a)=>{var b=a(83419),T=a(13151),g=a(15258),f=a(23777),h=a(65822),c=a(26099),u=new b({initialize:function(d,p,v,x){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),this.type=f.LINE,this.x1=d,this.y1=p,this.x2=v,this.y2=x},getPoint:function(m,d){return T(this,m,d)},getPoints:function(m,d,p){return g(this,m,d,p)},getRandomPoint:function(m){return h(this,m)},setTo:function(m,d,p,v){return void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),this.x1=m,this.y1=d,this.x2=p,this.y2=v,this},setFromObjects:function(m,d){return this.x1=m.x,this.y1=m.y,this.x2=d.x,this.y2=d.y,this},getPointA:function(m){return void 0===m&&(m=new c),m.set(this.x1,this.y1),m},getPointB:function(m){return void 0===m&&(m=new c),m.set(this.x2,this.y2),m},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(m){this.x1<=this.x2?this.x1=m:this.x2=m}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(m){this.x1>this.x2?this.x1=m:this.x2=m}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(m){this.y1<=this.y2?this.y1=m:this.y2=m}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(m){this.y1>this.y2?this.y1=m:this.y2=m}}});S.exports=u},64795:(S,k,a)=>{var b=a(36383),T=a(15994),g=a(91938);S.exports=function(h){var c=g(h)-b.TAU;return T(c,-Math.PI,Math.PI)}},52616:(S,k,a)=>{var b=a(36383),T=a(91938);S.exports=function(f){return Math.cos(T(f)-b.TAU)}},87231:(S,k,a)=>{var b=a(36383),T=a(91938);S.exports=function(f){return Math.sin(T(f)-b.TAU)}},89662:S=>{S.exports=function(a,b,T){return a.x1+=b,a.y1+=T,a.x2+=b,a.y2+=T,a}},71165:S=>{S.exports=function(a){return-(a.x2-a.x1)/(a.y2-a.y1)}},65822:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=Math.random();return f.x=g.x1+h*(g.x2-g.x1),f.y=g.y1+h*(g.y2-g.y1),f}},69777:(S,k,a)=>{var b=a(91938),T=a(64795);S.exports=function(f,h){return 2*T(h)-Math.PI-b(f)}},39706:(S,k,a)=>{var b=a(64400);S.exports=function(g,f){return b(g,(g.x1+g.x2)/2,(g.y1+g.y2)/2,f)}},82585:(S,k,a)=>{var b=a(64400);S.exports=function(g,f,h){return b(g,f.x,f.y,h)}},64400:S=>{S.exports=function(a,b,T,g){var f=Math.cos(g),h=Math.sin(g),c=a.x1-b,u=a.y1-T;return a.x1=c*f-u*h+b,a.y1=c*h+u*f+T,a.x2=(c=a.x2-b)*f-(u=a.y2-T)*h+b,a.y2=c*h+u*f+T,a}},62377:S=>{S.exports=function(a,b,T,g,f){return a.x1=b,a.y1=T,a.x2=b+Math.cos(g)*f,a.y2=T+Math.sin(g)*f,a}},71366:S=>{S.exports=function(a){return(a.y2-a.y1)/(a.x2-a.x1)}},10809:S=>{S.exports=function(a){return Math.abs(a.x1-a.x2)}},2529:(S,k,a)=>{var b=a(23031);b.Angle=a(91938),b.BresenhamPoints=a(84993),b.CenterOn=a(36469),b.Clone=a(31116),b.CopyFrom=a(59944),b.Equals=a(59220),b.Extend=a(78177),b.GetEasedPoints=a(26708),b.GetMidPoint=a(32125),b.GetNearestPoint=a(99569),b.GetNormal=a(34638),b.GetPoint=a(13151),b.GetPoints=a(15258),b.GetShortestDistance=a(26408),b.Height=a(98770),b.Length=a(35001),b.NormalAngle=a(64795),b.NormalX=a(52616),b.NormalY=a(87231),b.Offset=a(89662),b.PerpSlope=a(71165),b.Random=a(65822),b.ReflectAngle=a(69777),b.Rotate=a(39706),b.RotateAroundPoint=a(82585),b.RotateAroundXY=a(64400),b.SetToAngle=a(62377),b.Slope=a(71366),b.Width=a(10809),S.exports=b},83997:(S,k,a)=>{var b=a(83419),T=a(87841),g=a(26099);function f(c,u,m,d){var p=c-m,v=u-d;return Math.sqrt(p*p+v*v)}var h=new b({initialize:function(u,m,d){this.vertex1=u,this.vertex2=m,this.vertex3=d,this.bounds=new T,this._inCenter=new g},getInCenter:function(c){void 0===c&&(c=!0);var p,v,x,y,_,E,u=this.vertex1,m=this.vertex2,d=this.vertex3;c?(p=u.x,v=u.y,x=m.x,y=m.y,_=d.x,E=d.y):(p=u.vx,v=u.vy,x=m.vx,y=m.vy,_=d.vx,E=d.vy);var A=f(_,E,x,y),D=f(p,v,_,E),I=f(x,y,p,v),R=A+D+I;return this._inCenter.set((p*A+x*D+_*I)/R,(v*A+y*D+E*I)/R)},contains:function(c,u,m){var d=this.vertex1,p=this.vertex2,v=this.vertex3,x=d.vx,y=d.vy,_=p.vx,E=p.vy,A=v.vx,D=v.vy;if(m){var I=m.a,R=m.b,F=m.c,N=m.d,V=m.e,B=m.f;x=d.vx*I+d.vy*F+V,y=d.vx*R+d.vy*N+B,_=p.vx*I+p.vy*F+V,E=p.vx*R+p.vy*N+B,A=v.vx*I+v.vy*F+V,D=v.vx*R+v.vy*N+B}var H=A-x,Q=D-y,G=_-x,K=E-y,q=c-x,at=u-y,ot=H*H+Q*Q,J=H*G+Q*K,it=H*q+Q*at,Y=G*G+K*K,j=G*q+K*at,nt=ot*Y-J*J,ht=0===nt?0:1/nt,gt=(Y*it-J*j)*ht,wt=(ot*j-J*it)*ht;return gt>=0&&wt>=0&>+wt<1},isCounterClockwise:function(c){var u=this.vertex1,m=this.vertex2,d=this.vertex3,p=(m.vx-u.vx)*(d.vy-u.vy)-(m.vy-u.vy)*(d.vx-u.vx);return c<=0?p>=0:p<0},load:function(c,u,m,d,p){return m=this.vertex1.load(c,u,m,d,p),m=this.vertex2.load(c,u,m,d,p),this.vertex3.load(c,u,m,d,p)},transformCoordinatesLocal:function(c,u,m,d){return this.vertex1.transformCoordinatesLocal(c,u,m,d),this.vertex2.transformCoordinatesLocal(c,u,m,d),this.vertex3.transformCoordinatesLocal(c,u,m,d),this},updateBounds:function(){var c=this.vertex1,u=this.vertex2,m=this.vertex3,d=this.bounds;return d.x=Math.min(c.vx,u.vx,m.vx),d.y=Math.min(c.vy,u.vy,m.vy),d.width=Math.max(c.vx,u.vx,m.vx)-d.x,d.height=Math.max(c.vy,u.vy,m.vy)-d.y,this},isInView:function(c,u,m,d,p,v,x,y,_,E,A){this.update(d,p,v,x,y,_,E,A);var D=this.vertex1,I=this.vertex2,R=this.vertex3;if(D.ta<=0&&I.ta<=0&&R.ta<=0||u&&!this.isCounterClockwise(m))return!1;var F=this.bounds;return F.x=Math.min(D.tx,I.tx,R.tx),F.y=Math.min(D.ty,I.ty,R.ty),F.width=Math.max(D.tx,I.tx,R.tx)-F.x,F.height=Math.max(D.ty,I.ty,R.ty)-F.y,!(F.width<=0||F.height<=0||c.width<=0||c.height<=0||F.rightc.x+c.width||F.y>c.y+c.height)},scrollUV:function(c,u){return this.vertex1.scrollUV(c,u),this.vertex2.scrollUV(c,u),this.vertex3.scrollUV(c,u),this},scaleUV:function(c,u){return this.vertex1.scaleUV(c,u),this.vertex2.scaleUV(c,u),this.vertex3.scaleUV(c,u),this},setColor:function(c){return this.vertex1.color=c,this.vertex2.color=c,this.vertex3.color=c,this},update:function(c,u,m,d,p,v,x,y){return this.vertex1.update(u,m,d,p,v,x,y,c),this.vertex2.update(u,m,d,p,v,x,y,c),this.vertex3.update(u,m,d,p,v,x,y,c),this},translate:function(c,u){void 0===u&&(u=0);var m=this.vertex1,d=this.vertex2,p=this.vertex3;return m.x+=c,m.y+=u,d.x+=c,d.y+=u,p.x+=c,p.y+=u,this},x:{get:function(){return this.getInCenter().x},set:function(c){var u=this.getInCenter();this.translate(c-u.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(c){var u=this.getInCenter();this.translate(0,c-u.y)}},alpha:{get:function(){return(this.vertex1.alpha+this.vertex2.alpha+this.vertex3.alpha)/3},set:function(c){this.vertex1.alpha=c,this.vertex2.alpha=c,this.vertex3.alpha=c}},depth:{get:function(){return(this.vertex1.vz+this.vertex2.vz+this.vertex3.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});S.exports=h},48803:(S,k,a)=>{var b=a(83997),T=a(95540),g=a(37867),f=a(25836),h=a(39318),c=new f,u=new f,m=new g;S.exports=function(p){var it,v=T(p,"mesh"),x=T(p,"texture",null),y=T(p,"frame"),_=T(p,"width",1),E=T(p,"height",_),A=T(p,"widthSegments",1),D=T(p,"heightSegments",A),I=T(p,"x",0),R=T(p,"y",0),F=T(p,"z",0),N=T(p,"rotateX",0),V=T(p,"rotateY",0),B=T(p,"rotateZ",0),H=T(p,"zIsUp",!0),Q=T(p,"isOrtho",!!v&&v.dirtyCache[11]),G=T(p,"colors",[16777215]),K=T(p,"alphas",[1]),q=T(p,"tile",!1),at=T(p,"flipY",!1),ot=T(p,"width",null),J={faces:[],verts:[]};if(c.set(I,R,F),u.set(N,V,B),m.fromRotationXYTranslation(u,c,H),!x&&v)x=v.texture,y||(it=v.frame);else if(v&&"string"==typeof x)x=v.scene.sys.textures.get(x);else if(!x)return J;it||(it=x.get(y)),!ot&&Q&&x&&v&&(_=it.width/v.height,E=it.height/v.height);var qt,ne,Y=_/2,j=E/2,nt=Math.floor(A),ht=Math.floor(D),gt=nt+1,wt=ht+1,St=_/nt,Bt=E/ht,Yt=[],$t=[],le=0,Me=1,pi=0,Ie=1;it&&(le=it.u0,Me=it.u1,at?(pi=it.v1,Ie=it.v0):(pi=it.v0,Ie=it.v1));var _i=Me-le,be=Ie-pi;for(ne=0;ne{var b=a(83997),T=a(37867),g=a(25836),f=a(39318),h=new g,c=new g,u=new T;S.exports=function(d,p,v,x,y,_,E,A,D,I){void 0===v&&(v=1),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=0),void 0===I&&(I=!0);var R={faces:[],verts:[]},F=d.materials;h.set(x,y,_),c.set(E,A,D),u.fromRotationXYTranslation(c,h,I);for(var N=0;N{var b=a(83997),T=a(39318);S.exports=function(f,h,c,u,m,d,p,v){if(void 0===u&&(u=!1),void 0===d&&(d=16777215),void 0===p&&(p=1),void 0===v&&(v=!1),f.length===h.length||u){var y,I,N,V,B,x={faces:[],vertices:[]},H=u?3:2,Q=Array.isArray(d),G=Array.isArray(p);if(Array.isArray(c)&&c.length>0)for(y=0;y{var k=!0,a="untitled",b="",T="";function g(_){var E=_.indexOf("#");return E>-1?_.substring(0,E):_}function f(_){return 0===_.models.length&&_.models.push({faces:[],name:a,textureCoords:[],vertexNormals:[],vertices:[]}),b="",_.models[_.models.length-1]}function h(_,E){E.models.push({faces:[],name:_.length>=2?_[1]:a,textureCoords:[],vertexNormals:[],vertices:[]}),b=""}function c(_){2===_.length&&(b=_[1])}function u(_,E){var A=_.length,D=A>=2?parseFloat(_[1]):0,I=A>=3?parseFloat(_[2]):0,R=A>=4?parseFloat(_[3]):0;f(E).vertices.push({x:D,y:I,z:R})}function m(_,E){var A=_.length,D=A>=2?parseFloat(_[1]):0,I=A>=3?parseFloat(_[2]):0,R=A>=4?parseFloat(_[3]):0;isNaN(D)&&(D=0),isNaN(I)&&(I=0),isNaN(R)&&(R=0),k&&(I=1-I),f(E).textureCoords.push({u:D,v:I,w:R})}function d(_,E){var A=_.length,D=A>=2?parseFloat(_[1]):0,I=A>=3?parseFloat(_[2]):0,R=A>=4?parseFloat(_[3]):0;f(E).vertexNormals.push({x:D,y:I,z:R})}function p(_,E){var A=_.length-1;if(!(A<3)){for(var D={group:b,material:T,vertices:[]},I=0;I3)){var V=0,B=0,H=0;V=parseInt(F[0],10),N>1&&""!==F[1]&&(B=parseInt(F[1],10)),N>2&&(H=parseInt(F[2],10)),0!==V&&(V<0&&(V=f(E).vertices.length+1+V),D.vertices.push({textureCoordsIndex:B-=1,vertexIndex:V-=1,vertexNormalIndex:H-=1}))}}f(E).faces.push(D)}}function v(_,E){_.length>=2&&E.materialLibraries.push(_[1])}function x(_){_.length>=2&&(T=_[1])}S.exports=function(_,E){void 0===E&&(E=!0),k=E;var A={materials:{},materialLibraries:[],models:[]};b="",T="";for(var D=_.split("\n"),I=0;I{var b=a(37589);S.exports=function(g){for(var f={},h=g.split("\n"),c="",u=0;u=2?Math.floor(255*d[2]):p,x=d.length>=3?Math.floor(255*d[3]):p;f[c]=b(p,v,x)}}}return f}},92570:S=>{S.exports=function(a,b,T,g){var f,h;if(void 0===T&&void 0===g){var c=a.getInCenter();f=c.x,h=c.y}var u=Math.cos(b),m=Math.sin(b),d=a.vertex1,p=a.vertex2,v=a.vertex3,x=d.x-f,y=d.y-h;d.set(x*u-y*m+f,x*m+y*u+h),p.set((x=p.x-f)*u-(y=p.y-h)*m+f,x*m+y*u+h),v.set((x=v.x-f)*u-(y=v.y-h)*m+f,x*m+y*u+h)}},39318:(S,k,a)=>{var b=a(83419),T=a(70554),g=a(25836),f=new b({Extends:g,initialize:function(c,u,m,d,p,v,x,y,_,E){void 0===v&&(v=16777215),void 0===x&&(x=1),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),g.call(this,c,u,m),this.vx=0,this.vy=0,this.vz=0,this.nx=y,this.ny=_,this.nz=E,this.u=d,this.v=p,this.color=v,this.alpha=x,this.tx=0,this.ty=0,this.ta=0,this.tu=d,this.tv=p},setUVs:function(h,c){return this.u=h,this.v=c,this.tu=h,this.tv=c,this},scrollUV:function(h,c){return this.tu+=h,this.tv+=c,this},scaleUV:function(h,c){return this.tu=this.u*h,this.tv=this.v*c,this},transformCoordinatesLocal:function(h,c,u,m){var d=this.x,p=this.y,v=this.z,x=h.val,_=d*x[1]+p*x[5]+v*x[9]+x[13],E=d*x[2]+p*x[6]+v*x[10]+x[14],A=d*x[3]+p*x[7]+v*x[11]+x[15];this.vx=(d*x[0]+p*x[4]+v*x[8]+x[12])/A*c,this.vy=-_/A*u,this.vz=m<=0?E/A:-E/A},resize:function(h,c,u,m,d,p){return this.x=h,this.y=c,this.vx=this.x*u,this.vy=-this.y*m,this.vz=0,d<.5?this.vx+=u*(.5-d):d>.5&&(this.vx-=u*(d-.5)),p<.5?this.vy+=m*(.5-p):p>.5&&(this.vy-=m*(p-.5)),this},update:function(h,c,u,m,d,p,v,x){var y=this.vx*h+this.vy*u+d,_=this.vx*c+this.vy*m+p;return v&&(y=Math.round(y),_=Math.round(_)),this.tx=y,this.ty=_,this.ta=this.alpha*x,this},load:function(h,c,u,m,d){return h[++u]=this.tx,h[++u]=this.ty,h[++u]=this.tu,h[++u]=this.tv,h[++u]=m,h[++u]=d,c[++u]=T.getTintAppendFloatAlpha(this.color,this.ta),u}});S.exports=f},73090:(S,k,a)=>{var b={Face:a(83997),GenerateGridVerts:a(48803),GenerateObjVerts:a(34684),GenerateVerts:a(92515),ParseObj:a(85048),ParseObjMaterial:a(61485),RotateFace:a(92570),Vertex:a(39318)};S.exports=b},96550:S=>{S.exports=function(a){return a.setTo(Math.ceil(a.x),Math.ceil(a.y))}},99706:(S,k,a)=>{var b=a(2141);S.exports=function(g){return new b(g.x,g.y)}},68010:S=>{S.exports=function(a,b){return b.setTo(a.x,a.y)}},27814:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y}},73565:S=>{S.exports=function(a){return a.setTo(Math.floor(a.x),Math.floor(a.y))}},87555:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){if(void 0===f&&(f=new b),!Array.isArray(g))throw new Error("GetCentroid points argument must be an array");var h=g.length;if(h<1)throw new Error("GetCentroid points array must not be empty");if(1===h)f.x=g[0].x,f.y=g[0].y;else{for(var c=0;c{S.exports=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)}},44405:S=>{S.exports=function(a){return a.x*a.x+a.y*a.y}},20873:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){void 0===f&&(f=new b);for(var h=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,m=Number.POSITIVE_INFINITY,d=0;dh&&(h=p.x),p.xu&&(u=p.y),p.y{var b=a(2141);S.exports=function(g,f,h,c){return void 0===h&&(h=0),void 0===c&&(c=new b),c.x=g.x+(f.x-g.x)*h,c.y=g.y+(f.y-g.y)*h,c}},55767:S=>{S.exports=function(a){return a.setTo(a.y,a.x)}},79432:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.setTo(-g.x,-g.y)}},2141:(S,k,a)=>{var b=a(83419),T=a(23777),g=new b({initialize:function(h,c){void 0===h&&(h=0),void 0===c&&(c=h),this.type=T.POINT,this.x=h,this.y=c},setTo:function(f,h){return void 0===f&&(f=0),void 0===h&&(h=f),this.x=f,this.y=h,this}});S.exports=g},72930:(S,k,a)=>{var b=a(2141),T=a(44405);S.exports=function(f,h,c){void 0===c&&(c=new b);var m=(f.x*h.x+f.y*h.y)/T(h);return 0!==m&&(c.x=m*h.x,c.y=m*h.y),c}},62880:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){void 0===h&&(h=new b);var c=g.x*f.x+g.y*f.y;return 0!==c&&(h.x=c*f.x,h.y=c*f.y),h}},15093:(S,k,a)=>{var b=a(28793);S.exports=function(g,f){if(0!==g.x||0!==g.y){var h=b(g);g.x/=h,g.y/=h}return g.x*=f,g.y*=f,g}},43711:(S,k,a)=>{var b=a(2141);b.Ceil=a(96550),b.Clone=a(99706),b.CopyFrom=a(68010),b.Equals=a(27814),b.Floor=a(73565),b.GetCentroid=a(87555),b.GetMagnitude=a(28793),b.GetMagnitudeSq=a(44405),b.GetRectangleFromPoints=a(20873),b.Interpolate=a(26152),b.Invert=a(55767),b.Negative=a(79432),b.Project=a(72930),b.ProjectUnit=a(62880),b.SetMagnitude=a(15093),S.exports=b},12306:(S,k,a)=>{var b=a(25717);S.exports=function(g){return new b(g.points)}},63814:S=>{S.exports=function(a,b,T){for(var g=!1,f=-1,h=a.points.length-1;++f{var b=a(63814);S.exports=function(g,f){return b(g,f.x,f.y)}},94811:S=>{"use strict";function k(J,it,Y){Y=Y||2;var wt,St,Bt,Yt,$t,qt,ne,j=it&&it.length,nt=j?it[0]*Y:J.length,ht=a(J,0,nt,Y,!0),gt=[];if(!ht||ht.next===ht.prev)return gt;if(j&&(ht=function u(J,it,Y,j){var ht,gt,Bt,nt=[];for(ht=0,gt=it.length;ht80*Y){wt=Bt=J[0],St=Yt=J[1];for(var le=Y;leBt&&(Bt=$t),qt>Yt&&(Yt=qt);ne=0!==(ne=Math.max(Bt-wt,Yt-St))?32767/ne:0}return T(ht,gt,Y,wt,St,ne,0),gt}function a(J,it,Y,j,nt){var ht,gt;if(nt===ot(J,it,Y,j)>0)for(ht=it;ht=it;ht-=j)gt=K(ht,J[ht],J[ht+1],gt);return gt&&R(gt,gt.next)&&(q(gt),gt=gt.next),gt}function b(J,it){if(!J)return J;it||(it=J);var j,Y=J;do{if(j=!1,Y.steiner||!R(Y,Y.next)&&0!==I(Y.prev,Y,Y.next))Y=Y.next;else{if(q(Y),(Y=it=Y.prev)===Y.next)break;j=!0}}while(j||Y!==it);return it}function T(J,it,Y,j,nt,ht,gt){if(J){!gt&&ht&&function x(J,it,Y,j){var nt=J;do{0===nt.z&&(nt.z=_(nt.x,nt.y,it,Y,j)),nt.prevZ=nt.prev,nt.nextZ=nt.next,nt=nt.next}while(nt!==J);nt.prevZ.nextZ=null,nt.prevZ=null,function y(J){var it,Y,j,nt,ht,gt,wt,St,Bt=1;do{for(Y=J,J=null,ht=null,gt=0;Y;){for(gt++,j=Y,wt=0,it=0;it0||St>0&&j;)0!==wt&&(0===St||!j||Y.z<=j.z)?(nt=Y,Y=Y.nextZ,wt--):(nt=j,j=j.nextZ,St--),ht?ht.nextZ=nt:J=nt,nt.prevZ=ht,ht=nt;Y=j}ht.nextZ=null,Bt*=2}while(gt>1)}(nt)}(J,j,nt,ht);for(var St,Bt,wt=J;J.prev!==J.next;)if(St=J.prev,Bt=J.next,ht?f(J,j,nt,ht):g(J))it.push(St.i/Y|0),it.push(J.i/Y|0),it.push(Bt.i/Y|0),q(J),J=Bt.next,wt=Bt.next;else if((J=Bt)===wt){gt?1===gt?T(J=h(b(J),it,Y),it,Y,j,nt,ht,2):2===gt&&c(J,it,Y,j,nt,ht):T(b(J),it,Y,j,nt,ht,1);break}}}function g(J){var it=J.prev,Y=J,j=J.next;if(I(it,Y,j)>=0)return!1;for(var nt=it.x,ht=Y.x,gt=j.x,wt=it.y,St=Y.y,Bt=j.y,Yt=ntht?nt>gt?nt:gt:ht>gt?ht:gt,ne=wt>St?wt>Bt?wt:Bt:St>Bt?St:Bt,le=j.next;le!==it;){if(le.x>=Yt&&le.x<=qt&&le.y>=$t&&le.y<=ne&&A(nt,wt,ht,St,gt,Bt,le.x,le.y)&&I(le.prev,le,le.next)>=0)return!1;le=le.next}return!0}function f(J,it,Y,j){var nt=J.prev,ht=J,gt=J.next;if(I(nt,ht,gt)>=0)return!1;for(var wt=nt.x,St=ht.x,Bt=gt.x,Yt=nt.y,$t=ht.y,qt=gt.y,ne=wtSt?wt>Bt?wt:Bt:St>Bt?St:Bt,pi=Yt>$t?Yt>qt?Yt:qt:$t>qt?$t:qt,Ie=_(ne,le,it,Y,j),_i=_(Me,pi,it,Y,j),be=J.prevZ,ni=J.nextZ;be&&be.z>=Ie&&ni&&ni.z<=_i;){if(be.x>=ne&&be.x<=Me&&be.y>=le&&be.y<=pi&&be!==nt&&be!==gt&&A(wt,Yt,St,$t,Bt,qt,be.x,be.y)&&I(be.prev,be,be.next)>=0||(be=be.prevZ,ni.x>=ne&&ni.x<=Me&&ni.y>=le&&ni.y<=pi&&ni!==nt&&ni!==gt&&A(wt,Yt,St,$t,Bt,qt,ni.x,ni.y)&&I(ni.prev,ni,ni.next)>=0))return!1;ni=ni.nextZ}for(;be&&be.z>=Ie;){if(be.x>=ne&&be.x<=Me&&be.y>=le&&be.y<=pi&&be!==nt&&be!==gt&&A(wt,Yt,St,$t,Bt,qt,be.x,be.y)&&I(be.prev,be,be.next)>=0)return!1;be=be.prevZ}for(;ni&&ni.z<=_i;){if(ni.x>=ne&&ni.x<=Me&&ni.y>=le&&ni.y<=pi&&ni!==nt&&ni!==gt&&A(wt,Yt,St,$t,Bt,qt,ni.x,ni.y)&&I(ni.prev,ni,ni.next)>=0)return!1;ni=ni.nextZ}return!0}function h(J,it,Y){var j=J;do{var nt=j.prev,ht=j.next.next;!R(nt,ht)&&F(nt,j,j.next,ht)&&H(nt,ht)&&H(ht,nt)&&(it.push(nt.i/Y|0),it.push(j.i/Y|0),it.push(ht.i/Y|0),q(j),q(j.next),j=J=ht),j=j.next}while(j!==J);return b(j)}function c(J,it,Y,j,nt,ht){var gt=J;do{for(var wt=gt.next.next;wt!==gt.prev;){if(gt.i!==wt.i&&D(gt,wt)){var St=G(gt,wt);return gt=b(gt,gt.next),St=b(St,St.next),T(gt,it,Y,j,nt,ht,0),void T(St,it,Y,j,nt,ht,0)}wt=wt.next}gt=gt.next}while(gt!==J)}function m(J,it){return J.x-it.x}function d(J,it){var Y=function p(J,it){var gt,Y=it,j=J.x,nt=J.y,ht=-1/0;do{if(nt<=Y.y&&nt>=Y.next.y&&Y.next.y!==Y.y){var wt=Y.x+(nt-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(wt<=j&&wt>ht&&(ht=wt,gt=Y.x=Y.x&&Y.x>=Bt&&j!==Y.x&&A(ntgt.x||Y.x===gt.x&&v(gt,Y)))&&(gt=Y,$t=qt)),Y=Y.next}while(Y!==St);return gt}(J,it);if(!Y)return it;var j=G(Y,J);return b(j,j.next),b(Y,Y.next)}function v(J,it){return I(J.prev,J,it.prev)<0&&I(it.next,J,J.next)<0}function _(J,it,Y,j,nt){return(J=1431655765&((J=858993459&((J=252645135&((J=16711935&((J=(J-Y)*nt|0)|J<<8))|J<<4))|J<<2))|J<<1))|(it=1431655765&((it=858993459&((it=252645135&((it=16711935&((it=(it-j)*nt|0)|it<<8))|it<<4))|it<<2))|it<<1))<<1}function E(J){var it=J,Y=J;do{(it.x=(J-gt)*(ht-wt)&&(J-gt)*(j-wt)>=(Y-gt)*(it-wt)&&(Y-gt)*(ht-wt)>=(nt-gt)*(j-wt)}function D(J,it){return J.next.i!==it.i&&J.prev.i!==it.i&&!function B(J,it){var Y=J;do{if(Y.i!==J.i&&Y.next.i!==J.i&&Y.i!==it.i&&Y.next.i!==it.i&&F(Y,Y.next,J,it))return!0;Y=Y.next}while(Y!==J);return!1}(J,it)&&(H(J,it)&&H(it,J)&&function Q(J,it){var Y=J,j=!1,nt=(J.x+it.x)/2,ht=(J.y+it.y)/2;do{Y.y>ht!=Y.next.y>ht&&Y.next.y!==Y.y&&nt<(Y.next.x-Y.x)*(ht-Y.y)/(Y.next.y-Y.y)+Y.x&&(j=!j),Y=Y.next}while(Y!==J);return j}(J,it)&&(I(J.prev,J,it.prev)||I(J,it.prev,it))||R(J,it)&&I(J.prev,J,J.next)>0&&I(it.prev,it,it.next)>0)}function I(J,it,Y){return(it.y-J.y)*(Y.x-it.x)-(it.x-J.x)*(Y.y-it.y)}function R(J,it){return J.x===it.x&&J.y===it.y}function F(J,it,Y,j){var nt=V(I(J,it,Y)),ht=V(I(J,it,j)),gt=V(I(Y,j,J)),wt=V(I(Y,j,it));return!!(nt!==ht&>!==wt||0===nt&&N(J,Y,it)||0===ht&&N(J,j,it)||0===gt&&N(Y,J,j)||0===wt&&N(Y,it,j))}function N(J,it,Y){return it.x<=Math.max(J.x,Y.x)&&it.x>=Math.min(J.x,Y.x)&&it.y<=Math.max(J.y,Y.y)&&it.y>=Math.min(J.y,Y.y)}function V(J){return J>0?1:J<0?-1:0}function H(J,it){return I(J.prev,J,J.next)<0?I(J,it,J.next)>=0&&I(J,J.prev,it)>=0:I(J,it,J.prev)<0||I(J,J.next,it)<0}function G(J,it){var Y=new at(J.i,J.x,J.y),j=new at(it.i,it.x,it.y),nt=J.next,ht=it.prev;return J.next=it,it.prev=J,Y.next=nt,nt.prev=Y,j.next=Y,Y.prev=j,ht.next=j,j.prev=ht,j}function K(J,it,Y,j){var nt=new at(J,it,Y);return j?(nt.next=j.next,nt.prev=j,j.next.prev=nt,j.next=nt):(nt.prev=nt,nt.next=nt),nt}function q(J){J.next.prev=J.prev,J.prev.next=J.next,J.prevZ&&(J.prevZ.nextZ=J.nextZ),J.nextZ&&(J.nextZ.prevZ=J.prevZ)}function at(J,it,Y){this.i=J,this.x=it,this.y=Y,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ot(J,it,Y,j){for(var nt=0,ht=it,gt=Y-j;ht0&&Y.holes.push(j+=J[nt-1].length)}return Y},S.exports=k},13829:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){void 0===f&&(f=new b);for(var d,h=1/0,c=1/0,u=-h,m=-c,p=0;p{S.exports=function(a,b){void 0===b&&(b=[]);for(var T=0;T{var b=a(35001),T=a(23031),g=a(30052);S.exports=function(h,c,u,m){void 0===m&&(m=[]);var d=h.points,p=g(h);!c&&u>0&&(c=p/u);for(var v=0;vy+I)){var R=D.getPoint((x-y)/I);m.push(R);break}y+=I}return m}},30052:(S,k,a)=>{var b=a(35001),T=a(23031);S.exports=function(f){for(var h=f.points,c=0,u=0;u{var b=a(83419),T=a(63814),g=a(9564),f=a(23777),h=new b({initialize:function(u){this.type=f.POLYGON,this.area=0,this.points=[],u&&this.setTo(u)},contains:function(c,u){return T(this,c,u)},setTo:function(c){if(this.area=0,this.points=[],"string"==typeof c&&(c=c.split(" ")),!Array.isArray(c))return this;for(var u,m=0;m{S.exports=function(a){return a.points.reverse(),a}},29524:S=>{function k(h,c){var u=h.x-c.x,m=h.y-c.y;return u*u+m*m}function a(h,c,u){var m=c.x,d=c.y,p=u.x-m,v=u.y-d;if(0!==p||0!==v){var x=((h.x-m)*p+(h.y-d)*v)/(p*p+v*v);x>1?(m=u.x,d=u.y):x>0&&(m+=p*x,d+=v*x)}return(p=h.x-m)*p+(v=h.y-d)*v}function T(h,c,u,m,d){for(var v,p=m,x=c+1;xp&&(v=x,p=y)}p>m&&(v-c>1&&T(h,c,v,m,d),d.push(h[v]),u-v>1&&T(h,v,u,m,d))}function g(h,c){var u=h.length-1,m=[h[0]];return T(h,0,u,c,m),m.push(h[u]),m}S.exports=function(h,c,u){void 0===c&&(c=1),void 0===u&&(u=!1);var m=h.points;if(m.length>2){var d=c*c;u||(m=function b(h,c){for(var d,u=h[0],m=[u],p=1,v=h.length;pc&&(m.push(d),u=d);return u!==d&&m.push(d),m}(m,d)),h.setTo(g(m,d))}return h}},5469:S=>{var k=function(b,T){return b[0]=T[0],b[1]=T[1],b};S.exports=function(b){var T,g=[],f=b.points;for(T=0;T0&&h.push(k([0,0],g[0])),T=0;T1&&h.push(k([0,0],g[g.length-1])),b.setTo(h)}},24709:S=>{S.exports=function(a,b,T){for(var g=a.points,f=0;f{var b=a(25717);b.Clone=a(12306),b.Contains=a(63814),b.ContainsPoint=a(99338),b.Earcut=a(94811),b.GetAABB=a(13829),b.GetNumberArray=a(26173),b.GetPoints=a(9564),b.Perimeter=a(30052),b.Reverse=a(8133),b.Simplify=a(29524),b.Smooth=a(5469),b.Translate=a(24709),S.exports=b},62224:S=>{S.exports=function(a){return a.width*a.height}},98615:S=>{S.exports=function(a){return a.x=Math.ceil(a.x),a.y=Math.ceil(a.y),a}},31688:S=>{S.exports=function(a){return a.x=Math.ceil(a.x),a.y=Math.ceil(a.y),a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),a}},67502:S=>{S.exports=function(a,b,T){return a.x=b-a.width/2,a.y=T-a.height/2,a}},65085:(S,k,a)=>{var b=a(87841);S.exports=function(g){return new b(g.x,g.y,g.width,g.height)}},37303:S=>{S.exports=function(a,b,T){return!(a.width<=0||a.height<=0)&&a.x<=b&&a.x+a.width>=b&&a.y<=T&&a.y+a.height>=T}},96553:(S,k,a)=>{var b=a(37303);S.exports=function(g,f){return b(g,f.x,f.y)}},70273:S=>{S.exports=function(a,b){return!(b.width*b.height>a.width*a.height)&&b.x>a.x&&b.xa.x&&b.righta.y&&b.ya.y&&b.bottom{S.exports=function(a,b){return b.setTo(a.x,a.y,a.width,a.height)}},77493:S=>{S.exports=function(a,b){return void 0===b&&(b=[]),b.push({x:a.x,y:a.y}),b.push({x:a.right,y:a.y}),b.push({x:a.right,y:a.bottom}),b.push({x:a.x,y:a.bottom}),b}},9219:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}},53751:(S,k,a)=>{var b=a(8249);S.exports=function(g,f){var h=b(g);return h{var b=a(8249);S.exports=function(g,f){var h=b(g);return h>b(f)?g.setSize(f.height*h,f.height):g.setSize(f.width,f.width/h),g.setPosition(f.centerX-g.width/2,f.centerY-g.height/2)}},80774:S=>{S.exports=function(a){return a.x=Math.floor(a.x),a.y=Math.floor(a.y),a}},83859:S=>{S.exports=function(a){return a.x=Math.floor(a.x),a.y=Math.floor(a.y),a.width=Math.floor(a.width),a.height=Math.floor(a.height),a}},19217:(S,k,a)=>{var b=a(87841),T=a(36383);S.exports=function(f,h){if(void 0===h&&(h=new b),0===f.length)return h;for(var p,v,x,c=Number.MAX_VALUE,u=Number.MAX_VALUE,m=T.MIN_SAFE_INTEGER,d=T.MIN_SAFE_INTEGER,y=0;y{var b=a(87841);S.exports=function(g,f,h,c,u){return void 0===u&&(u=new b),u.setTo(Math.min(g,h),Math.min(f,c),Math.abs(g-h),Math.abs(f-c))}},8249:S=>{S.exports=function(a){return 0===a.height?NaN:a.width/a.height}},27165:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.centerX,f.y=g.centerY,f}},20812:(S,k,a)=>{var b=a(13019),T=a(2141);S.exports=function(f,h,c){if(void 0===c&&(c=new T),h<=0||h>=1)return c.x=f.x,c.y=f.y,c;var u=b(f)*h;return h>.5?(u-=f.width+f.height)<=f.width?(c.x=f.right-u,c.y=f.bottom):(c.x=f.x,c.y=f.bottom-(u-f.width)):u<=f.width?(c.x=f.x+u,c.y=f.y):(c.x=f.right,c.y=f.y+(u-f.width)),c}},34819:(S,k,a)=>{var b=a(20812),T=a(13019);S.exports=function(f,h,c,u){void 0===u&&(u=[]),!h&&c>0&&(h=T(f)/c);for(var m=0;m{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.width,f.y=g.height,f}},86091:(S,k,a)=>{var b=a(67502);S.exports=function(g,f,h){var c=g.centerX,u=g.centerY;return g.setSize(g.width+2*f,g.height+2*h),b(g,c,u)}},53951:(S,k,a)=>{var b=a(87841),T=a(59996);S.exports=function(f,h,c){return void 0===c&&(c=new b),T(f,h)?(c.x=Math.max(f.x,h.x),c.y=Math.max(f.y,h.y),c.width=Math.min(f.right,h.right)-c.x,c.height=Math.min(f.bottom,h.bottom)-c.y):c.setEmpty(),c}},14649:(S,k,a)=>{var b=a(13019),T=a(2141);S.exports=function(f,h,c,u){if(void 0===u&&(u=[]),!h&&!c)return u;h?c=Math.round(b(f)/h):h=b(f)/c;for(var m=f.x,d=f.y,p=0,v=0;v=f.right&&(p=1,d+=m-f.right,m=f.right);break;case 1:(d+=h)>=f.bottom&&(p=2,m-=d-f.bottom,d=f.bottom);break;case 2:(m-=h)<=f.left&&(p=3,d-=f.left-m,m=f.left);break;case 3:(d-=h)<=f.top&&(p=0,d=f.top)}return u}},33595:S=>{S.exports=function(a,b){for(var T=a.x,g=a.right,f=a.y,h=a.bottom,c=0;c{S.exports=function(a,b){var T=Math.min(a.x,b.x),g=Math.max(a.right,b.right);a.x=T,a.width=g-T;var f=Math.min(a.y,b.y),h=Math.max(a.bottom,b.bottom);return a.y=f,a.height=h-f,a}},92171:S=>{S.exports=function(a,b,T){var g=Math.min(a.x,b),f=Math.max(a.right,b);a.x=g,a.width=f-g;var h=Math.min(a.y,T),c=Math.max(a.bottom,T);return a.y=h,a.height=c-h,a}},42981:S=>{S.exports=function(a,b,T){return a.x+=b,a.y+=T,a}},46907:S=>{S.exports=function(a,b){return a.x+=b.x,a.y+=b.y,a}},60170:S=>{S.exports=function(a,b){return a.xb.x&&a.yb.y}},13019:S=>{S.exports=function(a){return 2*(a.width+a.height)}},85133:(S,k,a)=>{var b=a(2141),T=a(39506);S.exports=function(f,h,c){void 0===c&&(c=new b),h=T(h);var u=Math.sin(h),m=Math.cos(h),d=m>0?f.width/2:f.width/-2,p=u>0?f.height/2:f.height/-2;return Math.abs(d*u){var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.x+Math.random()*g.width,f.y=g.y+Math.random()*g.height,f}},86470:(S,k,a)=>{var b=a(30976),T=a(70273),g=a(2141);S.exports=function(h,c,u){if(void 0===u&&(u=new g),T(h,c))switch(b(0,3)){case 0:u.x=h.x+Math.random()*(c.right-h.x),u.y=h.y+Math.random()*(c.top-h.y);break;case 1:u.x=c.x+Math.random()*(h.right-c.x),u.y=c.bottom+Math.random()*(h.bottom-c.bottom);break;case 2:u.x=h.x+Math.random()*(c.x-h.x),u.y=c.y+Math.random()*(h.bottom-c.y);break;case 3:u.x=c.right+Math.random()*(h.right-c.right),u.y=h.y+Math.random()*(c.bottom-h.y)}return u}},87841:(S,k,a)=>{var b=a(83419),T=a(37303),g=a(20812),f=a(34819),h=a(23777),c=a(23031),u=a(26597),m=new b({initialize:function(p,v,x,y){void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),this.type=h.RECTANGLE,this.x=p,this.y=v,this.width=x,this.height=y},contains:function(d,p){return T(this,d,p)},getPoint:function(d,p){return g(this,d,p)},getPoints:function(d,p,v){return f(this,d,p,v)},getRandomPoint:function(d){return u(this,d)},setTo:function(d,p,v,x){return this.x=d,this.y=p,this.width=v,this.height=x,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(d,p){return void 0===p&&(p=d),this.x=d,this.y=p,this},setSize:function(d,p){return void 0===p&&(p=d),this.width=d,this.height=p,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(d){return void 0===d&&(d=new c),d.setTo(this.x,this.y,this.right,this.y),d},getLineB:function(d){return void 0===d&&(d=new c),d.setTo(this.right,this.y,this.right,this.bottom),d},getLineC:function(d){return void 0===d&&(d=new c),d.setTo(this.right,this.bottom,this.x,this.bottom),d},getLineD:function(d){return void 0===d&&(d=new c),d.setTo(this.x,this.bottom,this.x,this.y),d},left:{get:function(){return this.x},set:function(d){this.width=d>=this.right?0:this.right-d,this.x=d}},right:{get:function(){return this.x+this.width},set:function(d){this.width=d<=this.x?0:d-this.x}},top:{get:function(){return this.y},set:function(d){this.height=d>=this.bottom?0:this.bottom-d,this.y=d}},bottom:{get:function(){return this.y+this.height},set:function(d){this.height=d<=this.y?0:d-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(d){this.x=d-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(d){this.y=d-this.height/2}}});S.exports=m},94845:S=>{S.exports=function(a,b){return a.width===b.width&&a.height===b.height}},31730:S=>{S.exports=function(a,b,T){return void 0===T&&(T=b),a.width*=b,a.height*=T,a}},36899:(S,k,a)=>{var b=a(87841);S.exports=function(g,f,h){void 0===h&&(h=new b);var c=Math.min(g.x,f.x),u=Math.min(g.y,f.y),m=Math.max(g.right,f.right)-c,d=Math.max(g.bottom,f.bottom)-u;return h.setTo(c,u,m,d)}},93232:(S,k,a)=>{var b=a(87841);b.Area=a(62224),b.Ceil=a(98615),b.CeilAll=a(31688),b.CenterOn=a(67502),b.Clone=a(65085),b.Contains=a(37303),b.ContainsPoint=a(96553),b.ContainsRect=a(70273),b.CopyFrom=a(43459),b.Decompose=a(77493),b.Equals=a(9219),b.FitInside=a(53751),b.FitOutside=a(16088),b.Floor=a(80774),b.FloorAll=a(83859),b.FromPoints=a(19217),b.FromXY=a(9477),b.GetAspectRatio=a(8249),b.GetCenter=a(27165),b.GetPoint=a(20812),b.GetPoints=a(34819),b.GetSize=a(51313),b.Inflate=a(86091),b.Intersection=a(53951),b.MarchingAnts=a(14649),b.MergePoints=a(33595),b.MergeRect=a(20074),b.MergeXY=a(92171),b.Offset=a(42981),b.OffsetPoint=a(46907),b.Overlaps=a(60170),b.Perimeter=a(13019),b.PerimeterPoint=a(85133),b.Random=a(26597),b.RandomOutside=a(86470),b.SameDimensions=a(94845),b.Scale=a(31730),b.Union=a(36899),S.exports=b},41658:S=>{S.exports=function(a){var b=a.x1,T=a.y1;return Math.abs(((a.x3-b)*(a.y2-T)-(a.x2-b)*(a.y3-T))/2)}},39208:(S,k,a)=>{var b=a(16483);S.exports=function(g,f,h){var c=h*(Math.sqrt(3)/2);return new b(g,f,g+h/2,f+c,g-h/2,f+c)}},39545:(S,k,a)=>{var b=a(94811),T=a(16483);S.exports=function(f,h,c,u,m){void 0===h&&(h=null),void 0===c&&(c=1),void 0===u&&(u=1),void 0===m&&(m=[]);for(var p,v,x,d=b(f,h),R=0;R{var b=a(16483);S.exports=function(g,f,h,c){return void 0===c&&(c=h),new b(g,f,g,f-c,g+h,f)}},23707:(S,k,a)=>{var b=a(97523),T=a(13584);S.exports=function(f,h,c,u){void 0===u&&(u=b);var m=u(f);return T(f,h-m.x,c-m.y)}},97523:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=(g.x1+g.x2+g.x3)/3,f.y=(g.y1+g.y2+g.y3)/3,f}},24951:(S,k,a)=>{var b=a(26099);function T(f,h,c,u){return f*u-h*c}S.exports=function(f,h){void 0===h&&(h=new b);var c=f.x3,u=f.y3,m=f.x1-c,d=f.y1-u,p=f.x2-c,v=f.y2-u,x=2*T(m,d,p,v),y=T(d,m*m+d*d,v,p*p+v*v),_=T(m,m*m+d*d,p,p*p+v*v);return h.x=c-y/x,h.y=u+_/x,h}},85614:(S,k,a)=>{var b=a(96503);S.exports=function(g,f){void 0===f&&(f=new b);var I,R,h=g.x1,c=g.y1,u=g.x2,m=g.y2,d=g.x3,p=g.y3,v=u-h,x=m-c,y=d-h,_=p-c,E=v*(h+u)+x*(c+m),A=y*(h+d)+_*(c+p),D=2*(v*(p-m)-x*(d-u));if(Math.abs(D)<1e-6){var F=Math.min(h,u,d),N=Math.min(c,m,p);I=.5*(Math.max(h,u,d)-F),R=.5*(Math.max(c,m,p)-N),f.x=F+I,f.y=N+R,f.radius=Math.sqrt(I*I+R*R)}else f.x=(_*E-x*A)/D,f.y=(v*A-y*E)/D,I=f.x-h,R=f.y-c,f.radius=Math.sqrt(I*I+R*R);return f}},74422:(S,k,a)=>{var b=a(16483);S.exports=function(g){return new b(g.x1,g.y1,g.x2,g.y2,g.x3,g.y3)}},10690:S=>{S.exports=function(a,b,T){var g=a.x3-a.x1,f=a.y3-a.y1,h=a.x2-a.x1,c=a.y2-a.y1,u=b-a.x1,m=T-a.y1,d=g*g+f*f,p=g*h+f*c,v=g*u+f*m,x=h*h+c*c,y=h*u+c*m,_=d*x-p*p,E=0===_?0:1/_,A=(x*v-p*y)*E,D=(d*y-p*v)*E;return A>=0&&D>=0&&A+D<1}},48653:S=>{S.exports=function(a,b,T,g){void 0===T&&(T=!1),void 0===g&&(g=[]);for(var y,_,E,A,D,I,f=a.x3-a.x1,h=a.y3-a.y1,c=a.x2-a.x1,u=a.y2-a.y1,m=f*f+h*h,d=f*c+h*u,p=c*c+u*u,v=m*p-d*d,x=0===v?0:1/v,R=a.x1,F=a.y1,N=0;N=0&&_>=0&&y+_<1&&(g.push({x:b[N].x,y:b[N].y}),T)));N++);return g}},96006:(S,k,a)=>{var b=a(10690);S.exports=function(g,f){return b(g,f.x,f.y)}},71326:S=>{S.exports=function(a,b){return b.setTo(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)}},71694:S=>{S.exports=function(a,b){return void 0===b&&(b=[]),b.push({x:a.x1,y:a.y1}),b.push({x:a.x2,y:a.y2}),b.push({x:a.x3,y:a.y3}),b}},33522:S=>{S.exports=function(a,b){return a.x1===b.x1&&a.y1===b.y1&&a.x2===b.x2&&a.y2===b.y2&&a.x3===b.x3&&a.y3===b.y3}},20437:(S,k,a)=>{var b=a(2141),T=a(35001);S.exports=function(f,h,c){void 0===c&&(c=new b);var u=f.getLineA(),m=f.getLineB(),d=f.getLineC();if(h<=0||h>=1)return c.x=u.x1,c.y=u.y1,c;var p=T(u),v=T(m),x=T(d),_=(p+v+x)*h,E=0;return _p+v?(c.x=d.x1+(d.x2-d.x1)*(E=(_-=p+v)/x),c.y=d.y1+(d.y2-d.y1)*E):(c.x=m.x1+(m.x2-m.x1)*(E=(_-=p)/v),c.y=m.y1+(m.y2-m.y1)*E),c}},80672:(S,k,a)=>{var b=a(35001),T=a(2141);S.exports=function(f,h,c,u){void 0===u&&(u=[]);var m=f.getLineA(),d=f.getLineB(),p=f.getLineC(),v=b(m),x=b(d),y=b(p),_=v+x+y;!h&&c>0&&(h=_/c);for(var E=0;Ev+x?(I.x=p.x1+(p.x2-p.x1)*(D=(A-=v+x)/y),I.y=p.y1+(p.y2-p.y1)*D):(I.x=d.x1+(d.x2-d.x1)*(D=(A-=v)/x),I.y=d.y1+(d.y2-d.y1)*D),u.push(I)}return u}},39757:(S,k,a)=>{var b=a(2141);function T(f,h,c,u){var m=f-c,d=h-u;return Math.sqrt(m*m+d*d)}S.exports=function(f,h){void 0===h&&(h=new b);var c=f.x1,u=f.y1,m=f.x2,d=f.y2,p=f.x3,v=f.y3,x=T(p,v,m,d),y=T(c,u,p,v),_=T(m,d,c,u),E=x+y+_;return h.x=(c*x+m*y+p*_)/E,h.y=(u*x+d*y+v*_)/E,h}},13584:S=>{S.exports=function(a,b,T){return a.x1+=b,a.y1+=T,a.x2+=b,a.y2+=T,a.x3+=b,a.y3+=T,a}},1376:(S,k,a)=>{var b=a(35001);S.exports=function(g){var f=g.getLineA(),h=g.getLineB(),c=g.getLineC();return b(f)+b(h)+b(c)}},90260:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=g.x2-g.x1,c=g.y2-g.y1,u=g.x3-g.x1,m=g.y3-g.y1,d=Math.random(),p=Math.random();return d+p>=1&&(d=1-d,p=1-p),f.x=g.x1+(h*d+u*p),f.y=g.y1+(c*d+m*p),f}},52172:(S,k,a)=>{var b=a(99614),T=a(39757);S.exports=function(f,h){var c=T(f);return b(f,c.x,c.y,h)}},49907:(S,k,a)=>{var b=a(99614);S.exports=function(g,f,h){return b(g,f.x,f.y,h)}},99614:S=>{S.exports=function(a,b,T,g){var f=Math.cos(g),h=Math.sin(g),c=a.x1-b,u=a.y1-T;return a.x1=c*f-u*h+b,a.y1=c*h+u*f+T,a.x2=(c=a.x2-b)*f-(u=a.y2-T)*h+b,a.y2=c*h+u*f+T,a.x3=(c=a.x3-b)*f-(u=a.y3-T)*h+b,a.y3=c*h+u*f+T,a}},16483:(S,k,a)=>{var b=a(83419),T=a(10690),g=a(20437),f=a(80672),h=a(23777),c=a(23031),u=a(90260),m=new b({initialize:function(p,v,x,y,_,E){void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),this.type=h.TRIANGLE,this.x1=p,this.y1=v,this.x2=x,this.y2=y,this.x3=_,this.y3=E},contains:function(d,p){return T(this,d,p)},getPoint:function(d,p){return g(this,d,p)},getPoints:function(d,p,v){return f(this,d,p,v)},getRandomPoint:function(d){return u(this,d)},setTo:function(d,p,v,x,y,_){return void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),this.x1=d,this.y1=p,this.x2=v,this.y2=x,this.x3=y,this.y3=_,this},getLineA:function(d){return void 0===d&&(d=new c),d.setTo(this.x1,this.y1,this.x2,this.y2),d},getLineB:function(d){return void 0===d&&(d=new c),d.setTo(this.x2,this.y2,this.x3,this.y3),d},getLineC:function(d){return void 0===d&&(d=new c),d.setTo(this.x3,this.y3,this.x1,this.y1),d},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(d){var p;this.x1-=p=this.x1<=this.x2&&this.x1<=this.x3?this.x1-d:this.x2<=this.x1&&this.x2<=this.x3?this.x2-d:this.x3-d,this.x2-=p,this.x3-=p}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(d){var p;this.x1-=p=this.x1>=this.x2&&this.x1>=this.x3?this.x1-d:this.x2>=this.x1&&this.x2>=this.x3?this.x2-d:this.x3-d,this.x2-=p,this.x3-=p}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(d){var p;this.y1-=p=this.y1<=this.y2&&this.y1<=this.y3?this.y1-d:this.y2<=this.y1&&this.y2<=this.y3?this.y2-d:this.y3-d,this.y2-=p,this.y3-=p}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(d){var p;this.y1-=p=this.y1>=this.y2&&this.y1>=this.y3?this.y1-d:this.y2>=this.y1&&this.y2>=this.y3?this.y2-d:this.y3-d,this.y2-=p,this.y3-=p}}});S.exports=m},84435:(S,k,a)=>{var b=a(16483);b.Area=a(41658),b.BuildEquilateral=a(39208),b.BuildFromPolygon=a(39545),b.BuildRight=a(90301),b.CenterOn=a(23707),b.Centroid=a(97523),b.CircumCenter=a(24951),b.CircumCircle=a(85614),b.Clone=a(74422),b.Contains=a(10690),b.ContainsArray=a(48653),b.ContainsPoint=a(96006),b.CopyFrom=a(71326),b.Decompose=a(71694),b.Equals=a(33522),b.GetPoint=a(20437),b.GetPoints=a(80672),b.InCenter=a(39757),b.Perimeter=a(1376),b.Offset=a(13584),b.Random=a(90260),b.Rotate=a(52172),b.RotateAroundPoint=a(49907),b.RotateAroundXY=a(99614),S.exports=b},74457:S=>{S.exports=function(a,b,T){return{gameObject:a,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:b,hitAreaCallback:T,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}}},84409:S=>{S.exports=function(a,b){return function(T,g,f,h){var c=a.getPixelAlpha(g,f,h.texture.key,h.frame.name);return c&&c>=b}}},7003:(S,k,a)=>{var b=a(83419),T=a(93301),g=a(50792),f=a(8214),h=a(8443),c=a(78970),u=a(85098),m=a(42515),d=a(36210),p=a(61340),v=a(85955),x=new b({initialize:function(_,E){this.game=_,this.config=E,this.enabled=!0,this.events=new g,this.isOver=!0,this.defaultCursor="",this.keyboard=E.inputKeyboard?new c(this):null,this.mouse=E.inputMouse?new u(this):null,this.touch=E.inputTouch?new d(this):null,this.pointers=[],this.pointersTotal=E.inputActivePointers;for(var A=0;A<=this.pointersTotal;A++){var D=new m(this,A);D.smoothFactor=E.inputSmoothFactor,this.pointers.push(D)}this.mousePointer=E.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new p,this._tempMatrix2=new p,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],_.events.once(h.BOOT,this.boot,this)},boot:function(){var y=this.game,_=y.events;this.canvas=y.canvas,this.scaleManager=y.scale,this.events.emit(f.MANAGER_BOOT),_.on(h.PRE_RENDER,this.preRender,this),_.once(h.DESTROY,this.destroy,this)},setCanvasOver:function(y){this.isOver=!0,this.events.emit(f.GAME_OVER,y)},setCanvasOut:function(y){this.isOver=!1,this.events.emit(f.GAME_OUT,y)},preRender:function(){var y=this.game.loop.now,_=this.game.loop.delta,E=this.game.scene.getScenes(!0,!0);this.time=y,this.events.emit(f.MANAGER_UPDATE);for(var A=0;A10&&(y=10-this.pointersTotal);for(var E=0;E{var b=a(96503),T=a(87902),g=a(83419),f=a(93301),h=a(74457),c=a(84409),u=a(20339),m=a(8497),d=a(81154),p=a(8214),v=a(50792),x=a(95540),y=a(23777),_=a(89639),E=a(41212),A=a(37277),D=a(87841),I=a(37303),R=a(44594),F=a(16483),N=a(10690),V=new g({Extends:v,initialize:function(H){v.call(this),this.scene=H,this.systems=H.sys,this.settings=H.sys.settings,this.manager=H.sys.game.input,this.pluginEvents=new v,this.enabled=!0,_.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var Q={cancelled:!1};this._eventContainer={stopPropagation:function(){Q.cancelled=!0}},this._eventData=Q,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,H.sys.events.once(R.BOOT,this.boot,this),H.sys.events.on(R.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(R.DESTROY,this.destroy,this),this.pluginEvents.emit(p.BOOT)},start:function(){var B=this.systems.events;B.on(R.TRANSITION_START,this.transitionIn,this),B.on(R.TRANSITION_OUT,this.transitionOut,this),B.on(R.TRANSITION_COMPLETE,this.transitionComplete,this),B.on(R.PRE_UPDATE,this.preUpdate,this),B.once(R.SHUTDOWN,this.shutdown,this),this.manager.events.on(p.GAME_OUT,this.onGameOut,this),this.manager.events.on(p.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(p.START)},onGameOver:function(B){this.isActive()&&this.emit(p.GAME_OVER,B.timeStamp,B)},onGameOut:function(B){this.isActive()&&this.emit(p.GAME_OUT,B.timeStamp,B)},preUpdate:function(){this.pluginEvents.emit(p.PRE_UPDATE);var B=this._pendingRemoval,H=this._pendingInsertion,Q=B.length;if(0!==Q||0!==H.length){for(var K=this._list,q=0;q-1&&(K.splice(ot,1),this.clear(at,!0))}this._pendingRemoval.length=0,this._list=K.concat(H.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(B){this.manager&&this.manager.setCursor(B)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(B,H){if(!this.isActive())return!1;if(this.pluginEvents.emit(p.UPDATE,B,H),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var Q,K=this.manager.pointers;for(Q=0;Q0){if(this._pollTimer-=H,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var at=!1;for(Q=0;Q0&&(at=!0)}return at},update:function(B,H){if(!this.isActive())return!1;for(var Q=!1,G=0;G0&&(Q=!0)}return this._updatedThisFrame=!0,Q},clear:function(B,H){void 0===H&&(H=!1),this.disable(B);var Q=B.input;Q&&(this.removeDebug(B),this.manager.resetCursor(Q),Q.gameObject=void 0,Q.target=void 0,Q.hitArea=void 0,Q.hitAreaCallback=void 0,Q.callbackContext=void 0,B.input=null),H||this.queueForRemoval(B);var G=this._draggable.indexOf(B);return G>-1&&this._draggable.splice(G,1),B},disable:function(B,H){void 0===H&&(H=!1);var Q=B.input;Q&&(Q.enabled=!1,Q.dragState=0);for(var ot,G=this._drag,K=this._over,q=this.manager,at=0;at-1&&G[at].splice(ot,1),(ot=K[at].indexOf(B))>-1&&K[at].splice(ot,1);return H&&this.resetCursor(),this},enable:function(B,H,Q,G){return void 0===G&&(G=!1),B.input?B.input.enabled=!0:this.setHitArea(B,H,Q),B.input&&G&&!B.input.dropZone&&(B.input.dropZone=G),this},hitTestPointer:function(B){for(var H=this.cameras.getCamerasBelowPointer(B),Q=0;Q0)return B.camera=G,K}return B.camera=H[0],[]},processDownEvents:function(B){var H=0,Q=this._temp,G=this._eventData,K=this._eventContainer;G.cancelled=!1;for(var q=0;q0&&u(B.x,B.y,B.downX,B.downY)>=K||G>0&&H>=B.downTime+G)&&(Q=!0),Q)return this.setDragState(B,3),this.processDragStartList(B)},processDragStartList:function(B){if(3!==this.getDragState(B))return 0;var H=this._drag[B.id];H.length>1&&(H=H.slice(0));for(var Q=0;Q1&&(this.sortGameObjects(Q,B),this.topOnly&&Q.splice(1)),this._drag[B.id]=Q,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(B,3),this.processDragStartList(B)):(this.setDragState(B,2),0))},processDragMoveEvent:function(B){if(2===this.getDragState(B)&&this.processDragThresholdEvent(B,this.manager.game.loop.now),4!==this.getDragState(B))return 0;var H=this._tempZones,Q=this._drag[B.id];Q.length>1&&(Q=Q.slice(0));for(var G=0;G0?(K.emit(p.GAMEOBJECT_DRAG_LEAVE,B,at),this.emit(p.DRAG_LEAVE,B,K,at),q.target=H[0],K.emit(p.GAMEOBJECT_DRAG_ENTER,B,at=q.target),this.emit(p.DRAG_ENTER,B,K,at)):(K.emit(p.GAMEOBJECT_DRAG_LEAVE,B,at),this.emit(p.DRAG_LEAVE,B,K,at),H[0]?(q.target=H[0],K.emit(p.GAMEOBJECT_DRAG_ENTER,B,at=q.target),this.emit(p.DRAG_ENTER,B,K,at)):q.target=null)}else!at&&H[0]&&(q.target=H[0],K.emit(p.GAMEOBJECT_DRAG_ENTER,B,at=q.target),this.emit(p.DRAG_ENTER,B,K,at));var J,it,Y=B.positionToCamera(q.dragStartCamera);if(K.parentContainer){var j=Y.x-q.dragStartXGlobal,nt=Y.y-q.dragStartYGlobal,ht=K.getParentRotation(),gt=j*Math.cos(ht)+nt*Math.sin(ht),wt=nt*Math.cos(ht)-j*Math.sin(ht);J=(gt*=1/K.parentContainer.scaleX)+q.dragStartX,it=(wt*=1/K.parentContainer.scaleY)+q.dragStartY}else J=Y.x-q.dragX,it=Y.y-q.dragY;K.emit(p.GAMEOBJECT_DRAG,B,J,it),this.emit(p.DRAG,B,K,J,it)}return Q.length},processDragUpEvent:function(B){var H=this._drag[B.id];H.length>1&&(H=H.slice(0));for(var Q=0;Q0){var q=this.manager,at=this._eventData,ot=this._eventContainer;at.cancelled=!1;for(var J=0;J0){var K=this.manager,q=this._eventData,at=this._eventContainer;q.cancelled=!1,this.sortGameObjects(H,B);for(var ot=0;ot0){for(this.sortGameObjects(K,B),Q=0;Q0){for(this.sortGameObjects(q,B),Q=0;Q-1&&this._draggable.splice(K,1)}return this},makePixelPerfect:function(B){return void 0===B&&(B=1),c(this.systems.textures,B)},setHitArea:function(B,H,Q){if(void 0===H)return this.setHitAreaFromTexture(B);Array.isArray(B)||(B=[B]);var G=!1,K=!1,q=!1,at=!1,ot=!1,J=!0;if(E(H)&&Object.keys(H).length){var it=H;if(!B.some(function(wt){return wt.hasOwnProperty("faces")})){H=x(it,"hitArea",null),Q=x(it,"hitAreaCallback",null),ot=x(it,"pixelPerfect",!1);var j=x(it,"alphaTolerance",1);ot&&(H={},Q=this.makePixelPerfect(j))}G=x(it,"draggable",!1),K=x(it,"dropZone",!1),q=x(it,"cursor",!1),at=x(it,"useHandCursor",!1),(!H||!Q)&&(this.setHitAreaFromTexture(B),J=!1)}else"function"==typeof H&&!Q&&(Q=H,H={});for(var nt=0;nt{var b=a(35154),T={};S.exports={register:function(f,h,c,u,m){T[f]={plugin:h,mapping:c,settingsKey:u,configKey:m}},getPlugin:function(f){return T[f]},install:function(f){var h=f.scene.sys,c=h.settings.input,u=h.game.config;for(var m in T){var d=T[m].plugin,p=T[m].mapping;b(c,T[m].settingsKey,u[T[m].configKey])&&(f[p]=new d(f))}},remove:function(f){T.hasOwnProperty(f)&&delete T[f]}}},42515:(S,k,a)=>{var b=a(31040),T=a(83419),g=a(20339),f=a(43855),h=a(47235),c=a(26099),u=a(25892),m=new T({initialize:function(p,v){this.manager=p,this.id=v,this.camera=null,this.button=0,this.buttons=0,this.position=new c,this.prevPosition=new c,this.midPoint=new c(-1,-1),this.velocity=new c,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===v,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(d){var p=d.getWorldPoint(this.x,this.y);return this.worldX=p.x,this.worldY=p.y,this},positionToCamera:function(d,p){return d.getWorldPoint(this.x,this.y,p)},updateMotion:function(){var d=this.position.x,p=this.position.y,v=this.midPoint.x,x=this.midPoint.y;if(d!==v||p!==x){var y=h(this.motionFactor,v,d),_=h(this.motionFactor,x,p);f(y,d,.1)&&(y=d),f(_,p,.1)&&(_=p),this.midPoint.set(y,_);var E=d-y,A=p-_;this.velocity.set(E,A),this.angle=b(y,_,d,p),this.distance=Math.sqrt(E*E+A*A)}},up:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.button=d.button,this.upElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),0===d.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=d.timeStamp,this.wasTouch=!1)},down:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.button=d.button,this.downElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),0===d.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),u.macOS&&d.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=d.timeStamp),this.wasTouch=!1},move:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.manager.transformPointer(this,d.pageX,d.pageY,!0),this.locked&&(this.movementX=d.movementX||d.mozMovementX||d.webkitMovementX||0,this.movementY=d.movementY||d.mozMovementY||d.webkitMovementY||0),this.moveTime=d.timeStamp,this.wasTouch=!1},wheel:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.deltaX=d.deltaX,this.deltaY=d.deltaY,this.deltaZ=d.deltaZ,this.wasTouch=!1},touchstart:function(d,p){d.pointerId&&(this.pointerId=d.pointerId),this.identifier=d.identifier,this.target=d.target,this.active=!0,this.buttons=1,this.event=p,this.downElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=p.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(d,p){this.event=p,this.manager.transformPointer(this,d.pageX,d.pageY,!0),this.moveTime=p.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(d,p){this.buttons=0,this.event=p,this.upElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=p.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(d,p){this.buttons=0,this.event=p,this.upElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=p.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.buttons?0===this.button&&!this.isDown:0===this.button},rightButtonReleased:function(){return 0===this.buttons?2===this.button&&!this.isDown:2===this.button},middleButtonReleased:function(){return 0===this.buttons?1===this.button&&!this.isDown:1===this.button},backButtonReleased:function(){return 0===this.buttons?3===this.button&&!this.isDown:3===this.button},forwardButtonReleased:function(){return 0===this.buttons?4===this.button&&!this.isDown:4===this.button},getDistance:function(){return this.isDown?g(this.downX,this.downY,this.x,this.y):g(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?b(this.downX,this.downY,this.x,this.y):b(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(d,p){void 0===d&&(d=10),void 0===p&&(p=[]);for(var v=this.prevPosition.x,x=this.prevPosition.y,y=this.position.x,_=this.position.y,E=0;E{S.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},7179:S=>{S.exports="boot"},85375:S=>{S.exports="destroy"},39843:S=>{S.exports="dragend"},23388:S=>{S.exports="dragenter"},16133:S=>{S.exports="drag"},27829:S=>{S.exports="dragleave"},53904:S=>{S.exports="dragover"},56058:S=>{S.exports="dragstart"},2642:S=>{S.exports="drop"},88171:S=>{S.exports="gameobjectdown"},36147:S=>{S.exports="dragend"},71692:S=>{S.exports="dragenter"},96149:S=>{S.exports="drag"},81285:S=>{S.exports="dragleave"},74048:S=>{S.exports="dragover"},21322:S=>{S.exports="dragstart"},49378:S=>{S.exports="drop"},86754:S=>{S.exports="gameobjectmove"},86433:S=>{S.exports="gameobjectout"},60709:S=>{S.exports="gameobjectover"},24081:S=>{S.exports="pointerdown"},11172:S=>{S.exports="pointermove"},18907:S=>{S.exports="pointerout"},95579:S=>{S.exports="pointerover"},35368:S=>{S.exports="pointerup"},26972:S=>{S.exports="wheel"},47078:S=>{S.exports="gameobjectup"},73802:S=>{S.exports="gameobjectwheel"},56718:S=>{S.exports="gameout"},25936:S=>{S.exports="gameover"},27503:S=>{S.exports="boot"},50852:S=>{S.exports="process"},96438:S=>{S.exports="update"},59152:S=>{S.exports="pointerlockchange"},47777:S=>{S.exports="pointerdown"},27957:S=>{S.exports="pointerdownoutside"},19444:S=>{S.exports="pointermove"},54251:S=>{S.exports="pointerout"},18667:S=>{S.exports="pointerover"},27192:S=>{S.exports="pointerup"},24652:S=>{S.exports="pointerupoutside"},45132:S=>{S.exports="wheel"},44512:S=>{S.exports="preupdate"},15757:S=>{S.exports="shutdown"},41637:S=>{S.exports="start"},93802:S=>{S.exports="update"},8214:(S,k,a)=>{S.exports={BOOT:a(7179),DESTROY:a(85375),DRAG_END:a(39843),DRAG_ENTER:a(23388),DRAG:a(16133),DRAG_LEAVE:a(27829),DRAG_OVER:a(53904),DRAG_START:a(56058),DROP:a(2642),GAME_OUT:a(56718),GAME_OVER:a(25936),GAMEOBJECT_DOWN:a(88171),GAMEOBJECT_DRAG_END:a(36147),GAMEOBJECT_DRAG_ENTER:a(71692),GAMEOBJECT_DRAG:a(96149),GAMEOBJECT_DRAG_LEAVE:a(81285),GAMEOBJECT_DRAG_OVER:a(74048),GAMEOBJECT_DRAG_START:a(21322),GAMEOBJECT_DROP:a(49378),GAMEOBJECT_MOVE:a(86754),GAMEOBJECT_OUT:a(86433),GAMEOBJECT_OVER:a(60709),GAMEOBJECT_POINTER_DOWN:a(24081),GAMEOBJECT_POINTER_MOVE:a(11172),GAMEOBJECT_POINTER_OUT:a(18907),GAMEOBJECT_POINTER_OVER:a(95579),GAMEOBJECT_POINTER_UP:a(35368),GAMEOBJECT_POINTER_WHEEL:a(26972),GAMEOBJECT_UP:a(47078),GAMEOBJECT_WHEEL:a(73802),MANAGER_BOOT:a(27503),MANAGER_PROCESS:a(50852),MANAGER_UPDATE:a(96438),POINTER_DOWN:a(47777),POINTER_DOWN_OUTSIDE:a(27957),POINTER_MOVE:a(19444),POINTER_OUT:a(54251),POINTER_OVER:a(18667),POINTER_UP:a(27192),POINTER_UP_OUTSIDE:a(24652),POINTER_WHEEL:a(45132),POINTERLOCK_CHANGE:a(59152),PRE_UPDATE:a(44512),SHUTDOWN:a(15757),START:a(41637),UPDATE:a(93802)}},97421:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.pad=f,this.events=f.events,this.index=h,this.value=0,this.threshold=.1},update:function(g){this.value=g},getValue:function(){return Math.abs(this.value){var b=a(83419),T=a(92734),g=new b({initialize:function(h,c){this.pad=h,this.events=h.manager,this.index=c,this.value=0,this.threshold=1,this.pressed=!1},update:function(f){this.value=f;var h=this.pad,c=this.index;f>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(T.BUTTON_DOWN,h,this,f),this.pad.emit(T.GAMEPAD_BUTTON_DOWN,c,f,this)):this.pressed&&(this.pressed=!1,this.events.emit(T.BUTTON_UP,h,this,f),this.pad.emit(T.GAMEPAD_BUTTON_UP,c,f,this))},destroy:function(){this.pad=null,this.events=null}});S.exports=g},99125:(S,k,a)=>{var b=a(97421),T=a(28884),g=a(83419),f=a(50792),h=a(26099),c=new g({Extends:f,initialize:function(m,d){f.call(this),this.manager=m,this.pad=d,this.id=d.id,this.index=d.index;for(var p=[],v=0;v=2&&(this.leftStick.set(x[0].getValue(),x[1].getValue()),v>=4&&this.rightStick.set(x[2].getValue(),x[3].getValue()))}},destroy:function(){var u;for(this.removeAllListeners(),this.manager=null,this.pad=null,u=0;u{var b=a(83419),T=a(50792),g=a(92734),f=a(99125),h=a(35154),c=a(89639),u=a(8214),m=new b({Extends:T,initialize:function(p){T.call(this),this.scene=p.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=p,this.enabled=!0,this.gamepads=[],this.queue=[],p.pluginEvents.once(u.BOOT,this.boot,this),p.pluginEvents.on(u.START,this.start,this)},boot:function(){var d=this.scene.sys.game,p=this.settings.input,v=d.config;this.enabled=h(p,"gamepad",v.inputGamepad)&&d.device.input.gamepads,this.target=h(p,"gamepad.target",v.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(u.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(u.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var d=this,p=this.target,v=function(x){x.defaultPrevented||!d.isActive()||(d.refreshPads(),d.queue.push(x))};this.onGamepadHandler=v,p.addEventListener("gamepadconnected",v,!1),p.addEventListener("gamepaddisconnected",v,!1),this.sceneInputPlugin.pluginEvents.on(u.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(u.UPDATE,this.update);for(var d=0;d{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:S=>{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:S=>{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(S,k,a)=>{S.exports={DUALSHOCK_4:a(65294),SNES_USB:a(89651),XBOX_360:a(90089)}},46008:S=>{S.exports="down"},7629:S=>{S.exports="up"},42206:S=>{S.exports="connected"},86544:S=>{S.exports="disconnected"},94784:S=>{S.exports="down"},14325:S=>{S.exports="up"},92734:(S,k,a)=>{S.exports={BUTTON_DOWN:a(46008),BUTTON_UP:a(7629),CONNECTED:a(42206),DISCONNECTED:a(86544),GAMEPAD_BUTTON_DOWN:a(94784),GAMEPAD_BUTTON_UP:a(14325)}},48646:(S,k,a)=>{S.exports={Axis:a(97421),Button:a(28884),Events:a(92734),Gamepad:a(99125),GamepadPlugin:a(56654),Configs:a(64894)}},14350:(S,k,a)=>{var b=a(93301),T=a(79291),g={CreatePixelPerfectHandler:a(84409),CreateInteractiveObject:a(74457),Events:a(8214),Gamepad:a(48646),InputManager:a(7003),InputPlugin:a(48205),InputPluginCache:a(89639),Keyboard:a(51442),Mouse:a(87078),Pointer:a(42515),Touch:a(95618)};g=T(!1,g,b),S.exports=g},78970:(S,k,a)=>{var b=a(72905),T=a(83419),g=a(8443),f=a(8214),h=a(46032),c=a(29747),u=new T({initialize:function(d){this.manager=d,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.onKeyDown=c,this.onKeyUp=c,d.events.once(f.MANAGER_BOOT,this.boot,this)},boot:function(){var m=this.manager.config;this.enabled=m.inputKeyboard,this.target=m.inputKeyboardEventTarget,this.addCapture(m.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(g.POST_STEP,this.postUpdate,this)},startListeners:function(){var m=this;this.onKeyDown=function(p){!p.defaultPrevented&&m.enabled&&m.manager&&(m.queue.push(p),m.manager.events.emit(f.MANAGER_PROCESS),m.preventDefault&&!(p.altKey||p.ctrlKey||p.shiftKey||p.metaKey)&&m.captures.indexOf(p.keyCode)>-1&&p.preventDefault())},this.onKeyUp=function(p){!p.defaultPrevented&&m.enabled&&m.manager&&(m.queue.push(p),m.manager.events.emit(f.MANAGER_PROCESS),m.preventDefault&&!(p.altKey||p.ctrlKey||p.shiftKey||p.metaKey)&&m.captures.indexOf(p.keyCode)>-1&&p.preventDefault())};var d=this.target;d&&(d.addEventListener("keydown",this.onKeyDown,!1),d.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var m=this.target;m.removeEventListener("keydown",this.onKeyDown,!1),m.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(m){"string"==typeof m&&(m=m.split(",")),Array.isArray(m)||(m=[m]);for(var d=this.captures,p=0;p0},removeCapture:function(m){"string"==typeof m&&(m=m.split(",")),Array.isArray(m)||(m=[m]);for(var d=this.captures,p=0;p0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(g.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});S.exports=u},28846:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(95922),f=a(8443),h=a(35154),c=a(8214),u=a(89639),m=a(30472),d=a(46032),p=a(87960),v=a(74600),x=a(44594),y=a(56583),_=new b({Extends:T,initialize:function(A){T.call(this),this.game=A.systems.game,this.scene=A.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=A,this.manager=A.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,A.pluginEvents.once(c.BOOT,this.boot,this),A.pluginEvents.on(c.START,this.start,this)},boot:function(){var E=this.settings.input;this.enabled=h(E,"keyboard",!0);var A=h(E,"keyboard.capture",null);A&&this.addCaptures(A),this.sceneInputPlugin.pluginEvents.once(c.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(c.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(c.SHUTDOWN,this.shutdown,this),this.game.events.on(f.BLUR,this.resetKeys,this),this.scene.sys.events.on(x.PAUSE,this.resetKeys,this),this.scene.sys.events.on(x.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(E){return this.manager.addCapture(E),this},removeCapture:function(E){return this.manager.removeCapture(E),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:d.UP,down:d.DOWN,left:d.LEFT,right:d.RIGHT,space:d.SPACE,shift:d.SHIFT})},addKeys:function(E,A,D){void 0===A&&(A=!0),void 0===D&&(D=!1);var I={};if("string"==typeof E){E=E.split(",");for(var R=0;R-1?I[R]=E:I[E.keyCode]=E,A&&this.addCapture(E.keyCode),E.setEmitOnRepeat(D),E}return"string"==typeof E&&(E=d[E.toUpperCase()]),I[E]||(I[E]=new m(this,E),A&&this.addCapture(E),I[E].setEmitOnRepeat(D)),I[E]},removeKey:function(E,A,D){void 0===A&&(A=!1),void 0===D&&(D=!1);var R,I=this.keys;if(E instanceof m){var F=I.indexOf(E);F>-1&&(R=this.keys[F],this.keys[F]=void 0)}else"string"==typeof E&&(E=d[E.toUpperCase()]);return I[E]&&(R=I[E],I[E]=void 0),R&&(R.plugin=null,D&&this.removeCapture(R.keyCode),A&&R.destroy()),this},removeAllKeys:function(E,A){void 0===E&&(E=!1),void 0===A&&(A=!1);for(var D=this.keys,I=0;IE._tick)return E._tick=D,!0}return!1},update:function(){var E=this.manager.queue,A=E.length;if(this.isActive()&&0!==A)for(var D=this.keys,I=0;I{S.exports=function(a,b){return b.timeLastMatched=a.timeStamp,b.index++,b.index===b.size||(b.current=b.keyCodes[b.index],!1)}},87960:(S,k,a)=>{var b=a(83419),T=a(95922),g=a(95540),f=a(68769),h=a(92803),c=new b({initialize:function(m,d,p){if(void 0===p&&(p={}),d.length<2)return!1;this.manager=m,this.enabled=!0,this.keyCodes=[];for(var v=0;v{var b=a(66970);S.exports=function(g,f){if(f.matched)return!0;var h=!1,c=!1;return g.keyCode===f.current&&(f.index>0&&f.maxKeyDelay>0?g.timeStamp<=f.timeLastMatched+f.maxKeyDelay&&(c=!0,h=b(g,f)):(c=!0,h=b(g,f))),!c&&f.resetOnWrongKey&&(f.index=0,f.current=f.keyCodes[0]),h&&(f.timeLastMatched=g.timeStamp,f.matched=!0,f.timeMatched=g.timeStamp),h}},92803:S=>{S.exports=function(a){return a.current=a.keyCodes[0],a.index=0,a.timeLastMatched=0,a.matched=!1,a.timeMatched=0,a}},92612:S=>{S.exports="keydown"},23345:S=>{S.exports="keyup"},21957:S=>{S.exports="keycombomatch"},44743:S=>{S.exports="down"},3771:S=>{S.exports="keydown-"},46358:S=>{S.exports="keyup-"},75674:S=>{S.exports="up"},95922:(S,k,a)=>{S.exports={ANY_KEY_DOWN:a(92612),ANY_KEY_UP:a(23345),COMBO_MATCH:a(21957),DOWN:a(44743),KEY_DOWN:a(3771),KEY_UP:a(46358),UP:a(75674)}},51442:(S,k,a)=>{S.exports={Events:a(95922),KeyboardManager:a(78970),KeyboardPlugin:a(28846),Key:a(30472),KeyCodes:a(46032),KeyCombo:a(87960),AdvanceKeyCombo:a(66970),ProcessKeyCombo:a(68769),ResetKeyCombo:a(92803),JustDown:a(90229),JustUp:a(38796),DownDuration:a(37015),UpDuration:a(41170)}},37015:S=>{S.exports=function(a,b){return void 0===b&&(b=50),a.isDown&&a.plugin.game.loop.time-a.timeDown{S.exports=function(a){return!!a._justDown&&(a._justDown=!1,!0)}},38796:S=>{S.exports=function(a){return!!a._justUp&&(a._justUp=!1,!0)}},30472:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(95922),f=new b({Extends:T,initialize:function(c,u){T.call(this),this.plugin=c,this.keyCode=u,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(h){return this.emitOnRepeat=h,this},onDown:function(h){this.originalEvent=h,this.enabled&&(this.altKey=h.altKey,this.ctrlKey=h.ctrlKey,this.shiftKey=h.shiftKey,this.metaKey=h.metaKey,this.location=h.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(g.DOWN,this,h):(this.isDown=!0,this.isUp=!1,this.timeDown=h.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(g.DOWN,this,h)))},onUp:function(h){this.originalEvent=h,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=h.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(g.UP,this,h))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});S.exports=f},46032:S=>{S.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},74600:(S,k,a)=>{var b=a(46032),T={};for(var g in b)T[b[g]]=g;S.exports=T},41170:S=>{S.exports=function(a,b){return void 0===b&&(b=50),a.isUp&&a.plugin.game.loop.time-a.timeUp{var b=a(83419),T=a(89357),g=a(8214),f=a(29747),h=new b({initialize:function(u){this.manager=u,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.locked=!1,this.onMouseMove=f,this.onMouseDown=f,this.onMouseUp=f,this.onMouseDownWindow=f,this.onMouseUpWindow=f,this.onMouseOver=f,this.onMouseOut=f,this.onMouseWheel=f,this.pointerLockChange=f,this.isTop=!0,u.events.once(g.MANAGER_BOOT,this.boot,this)},boot:function(){var c=this.manager.config;this.enabled=c.inputMouse,this.target=c.inputMouseEventTarget,this.passive=c.inputMousePassive,this.preventDefaultDown=c.inputMousePreventDefaultDown,this.preventDefaultUp=c.inputMousePreventDefaultUp,this.preventDefaultMove=c.inputMousePreventDefaultMove,this.preventDefaultWheel=c.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,c.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(c){return c.preventDefault(),!1}),this},requestPointerLock:function(){if(T.pointerLock){var c=this.target;c.requestPointerLock=c.requestPointerLock||c.mozRequestPointerLock||c.webkitRequestPointerLock,c.requestPointerLock()}},releasePointerLock:function(){T.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var c=this.target;if(c){var u=this,m=this.manager,d=m.canvas,p=window&&window.focus&&m.game.config.autoFocus;this.onMouseMove=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&(m.onMouseMove(x),u.preventDefaultMove&&x.preventDefault())},this.onMouseDown=function(x){p&&window.focus(),!x.defaultPrevented&&u.enabled&&m&&m.enabled&&(m.onMouseDown(x),u.preventDefaultDown&&x.target===d&&x.preventDefault())},this.onMouseDownWindow=function(x){x.sourceCapabilities&&x.sourceCapabilities.firesTouchEvents||!x.defaultPrevented&&u.enabled&&m&&m.enabled&&x.target!==d&&m.onMouseDown(x)},this.onMouseUp=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&(m.onMouseUp(x),u.preventDefaultUp&&x.target===d&&x.preventDefault())},this.onMouseUpWindow=function(x){x.sourceCapabilities&&x.sourceCapabilities.firesTouchEvents||!x.defaultPrevented&&u.enabled&&m&&m.enabled&&x.target!==d&&m.onMouseUp(x)},this.onMouseOver=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&m.setCanvasOver(x)},this.onMouseOut=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&m.setCanvasOut(x)},this.onMouseWheel=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&m.onMouseWheel(x),u.preventDefaultWheel&&x.target===d&&x.preventDefault()};var v={passive:!0};if(c.addEventListener("mousemove",this.onMouseMove),c.addEventListener("mousedown",this.onMouseDown),c.addEventListener("mouseup",this.onMouseUp),c.addEventListener("mouseover",this.onMouseOver,v),c.addEventListener("mouseout",this.onMouseOut,v),c.addEventListener("wheel",this.onMouseWheel,this.preventDefaultWheel?{passive:!1}:v),window&&m.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,v),window.top.addEventListener("mouseup",this.onMouseUpWindow,v)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,v),window.addEventListener("mouseup",this.onMouseUpWindow,v),this.isTop=!1}T.pointerLock&&(this.pointerLockChange=function(x){var y=u.target;u.locked=document.pointerLockElement===y||document.mozPointerLockElement===y||document.webkitPointerLockElement===y,m.onPointerLockChange(x)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var c=this.target;c.removeEventListener("mousemove",this.onMouseMove),c.removeEventListener("mousedown",this.onMouseDown),c.removeEventListener("mouseup",this.onMouseUp),c.removeEventListener("mouseover",this.onMouseOver),c.removeEventListener("mouseout",this.onMouseOut),window&&((c=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),c.removeEventListener("mouseup",this.onMouseUpWindow)),T.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});S.exports=h},87078:(S,k,a)=>{S.exports={MouseManager:a(85098)}},36210:(S,k,a)=>{var b=a(83419),T=a(8214),g=a(29747),f=new b({initialize:function(c){this.manager=c,this.capture=!0,this.enabled=!1,this.onTouchStart=g,this.onTouchStartWindow=g,this.onTouchMove=g,this.onTouchEnd=g,this.onTouchEndWindow=g,this.onTouchCancel=g,this.onTouchCancelWindow=g,this.isTop=!0,c.events.once(T.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputTouch,this.target=h.inputTouchEventTarget,this.capture=h.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,h.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(h){return h.preventDefault(),!1}),this},startListeners:function(){var h=this.target;if(h){var c=this,u=this.manager,m=u.canvas,d=window&&window.focus&&u.game.config.autoFocus;this.onTouchMove=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchMove(y),c.capture&&y.cancelable&&y.preventDefault())},this.onTouchStart=function(y){d&&window.focus(),!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchStart(y),c.capture&&y.cancelable&&y.target===m&&y.preventDefault())},this.onTouchStartWindow=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&y.target!==m&&u.onTouchStart(y)},this.onTouchEnd=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchEnd(y),c.capture&&y.cancelable&&y.target===m&&y.preventDefault())},this.onTouchEndWindow=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&y.target!==m&&u.onTouchEnd(y)},this.onTouchCancel=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchCancel(y),c.capture&&y.preventDefault())},this.onTouchCancelWindow=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&u.onTouchCancel(y)};var p=this.capture,v={passive:!0},x={passive:!1};if(h.addEventListener("touchstart",this.onTouchStart,p?x:v),h.addEventListener("touchmove",this.onTouchMove,p?x:v),h.addEventListener("touchend",this.onTouchEnd,p?x:v),h.addEventListener("touchcancel",this.onTouchCancel,p?x:v),window&&u.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,x),window.top.addEventListener("touchend",this.onTouchEndWindow,x),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,x)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,x),window.addEventListener("touchend",this.onTouchEndWindow,x),window.addEventListener("touchcancel",this.onTouchCancelWindow,x),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var h=this.target;h.removeEventListener("touchstart",this.onTouchStart),h.removeEventListener("touchmove",this.onTouchMove),h.removeEventListener("touchend",this.onTouchEnd),h.removeEventListener("touchcancel",this.onTouchCancel),window&&((h=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),h.removeEventListener("touchend",this.onTouchEndWindow),h.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});S.exports=f},95618:(S,k,a)=>{S.exports={TouchManager:a(36210)}},41299:(S,k,a)=>{var b=a(83419),T=a(23906),g=a(54899),f=a(95540),h=a(98356),c=a(3374),u=a(84376),m=a(92638),d=new b({initialize:function(v,x){if(this.loader=v,this.cache=f(x,"cache",!1),this.type=f(x,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=f(x,"key",!1);var y=this.key;if(v.prefix&&""!==v.prefix&&(this.key=v.prefix+y),!this.key)throw new Error("Invalid File key: "+this.key);var _=f(x,"url");void 0===_?_=v.path+y+"."+f(x,"extension",""):"string"==typeof _&&!_.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(_=v.path+_),this.url=_,this.src="",this.xhrSettings=m(f(x,"responseType",void 0)),f(x,"xhrSettings",!1)&&(this.xhrSettings=c(this.xhrSettings,f(x,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?T.FILE_POPULATED:T.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=f(x,"config",{}),this.base64="string"==typeof _&&0===_.indexOf("data:"),this.retryAttempts=f(x,"maxRetries",v.maxRetries)},setLink:function(p){this.linkFile=p,p.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===T.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=T.FILE_LOADING,this.src=h(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);0===this.src.indexOf("data:")&&(this.base64=!0),this.xhrLoader=u(this,this.loader.xhr)}},onLoad:function(p,v){var x=p.responseURL&&this.loader.localSchemes.some(function(E){return 0===p.responseURL.indexOf(E)}),_=!(v.target&&200!==v.target.status)||x&&0===v.target.status;4===p.readyState&&p.status>=400&&p.status<=599&&(_=!1),this.state=T.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,_)},onBase64Load:function(p){this.xhrLoader=p,this.state=T.FILE_LOADED,this.percentComplete=1,this.loader.emit(g.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(p){p.lengthComputable&&(this.bytesLoaded=p.loaded,this.bytesTotal=p.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(g.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=T.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=T.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=T.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(p){if(this.state!==T.FILE_PENDING_DESTROY){void 0===p&&(p=this.data);var v=this.key,x=this.type;this.loader.emit(g.FILE_COMPLETE,v,x,p),this.loader.emit(g.FILE_KEY_COMPLETE+x+"-"+v,v,x,p),this.loader.flagForRemoval(this),this.state=T.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});d.createObjectURL=function(p,v,x){if("function"==typeof URL)p.src=URL.createObjectURL(v);else{var y=new FileReader;y.onload=function(){p.removeAttribute("crossOrigin"),p.src="data:"+(v.type||x)+";base64,"+y.result.split(",")[1]},y.onerror=p.onerror,y.readAsDataURL(v)}},d.revokeObjectURL=function(p){"function"==typeof URL&&URL.revokeObjectURL(p.src)},S.exports=d},74099:S=>{var k={};S.exports={install:function(b){for(var T in k)b[T]=k[T]},register:function(b,T){k[b]=T},destroy:function(){k={}}}},98356:S=>{S.exports=function(a,b){return!!a.url&&(a.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?a.url:b+a.url)}},74261:(S,k,a)=>{var b=a(83419),T=a(23906),g=a(35072),f=a(50792),h=a(54899),c=a(74099),u=a(95540),m=a(35154),d=a(41212),p=a(37277),v=a(44594),x=a(92638),y=new b({Extends:f,initialize:function(E){f.call(this);var A=E.sys.game.config,D=E.sys.settings.loader;this.scene=E,this.systems=E.sys,this.cacheManager=E.sys.cache,this.textureManager=E.sys.textures,this.sceneManager=E.sys.game.scene,c.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(u(D,"baseURL",A.loaderBaseURL)),this.setPath(u(D,"path",A.loaderPath)),this.setPrefix(u(D,"prefix",A.loaderPrefix)),this.maxParallelDownloads=u(D,"maxParallelDownloads",A.loaderMaxParallelDownloads),this.xhr=x(u(D,"responseType",A.loaderResponseType),u(D,"async",A.loaderAsync),u(D,"user",A.loaderUser),u(D,"password",A.loaderPassword),u(D,"timeout",A.loaderTimeout),u(D,"withCredentials",A.loaderWithCredentials)),this.crossOrigin=u(D,"crossOrigin",A.loaderCrossOrigin),this.imageLoadType=u(D,"imageLoadType",A.loaderImageLoadType),this.localSchemes=u(D,"localScheme",A.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new g,this.inflight=new g,this.queue=new g,this._deleteQueue=new g,this.totalFailed=0,this.totalComplete=0,this.state=T.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=u(D,"maxRetries",A.loaderMaxRetries),E.sys.events.once(v.BOOT,this.boot,this),E.sys.events.on(v.START,this.pluginStart,this)},boot:function(){this.systems.events.once(v.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(v.SHUTDOWN,this.shutdown,this)},setBaseURL:function(_){return void 0===_&&(_=""),""!==_&&"/"!==_.substr(-1)&&(_=_.concat("/")),this.baseURL=_,this},setPath:function(_){return void 0===_&&(_=""),""!==_&&"/"!==_.substr(-1)&&(_=_.concat("/")),this.path=_,this},setPrefix:function(_){return void 0===_&&(_=""),this.prefix=_,this},setCORS:function(_){return this.crossOrigin=_,this},addFile:function(_){Array.isArray(_)||(_=[_]);for(var E=0;E<_.length;E++){var A=_[E];this.keyExists(A)||(this.list.set(A),this.emit(h.ADD,A.key,A.type,this,A),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(_){var E=_.hasCacheConflict();return E||this.list.iterate(function(A){if(A.type===_.type&&A.key===_.key)return E=!0,!1}),!E&&this.isLoading()&&(this.inflight.iterate(function(A){if(A.type===_.type&&A.key===_.key)return E=!0,!1}),this.queue.iterate(function(A){if(A.type===_.type&&A.key===_.key)return E=!0,!1})),E},addPack:function(_,E){if("string"==typeof E){var A=m(_,E);A&&(_={packKey:A})}var D=0,I=this.baseURL,R=this.path,F=this.prefix;for(var N in _)if(Object.prototype.hasOwnProperty.call(_,N)){var V=_[N],B=u(V,"baseURL",I),H=u(V,"path",R),Q=u(V,"prefix",F),G=u(V,"files",null),K=u(V,"defaultType","void");if(Array.isArray(G)){this.setBaseURL(B),this.setPath(H),this.setPrefix(Q);for(var q=0;q0},removePack:function(_,E){var F,A=this.systems.anims,D=this.cacheManager,I=this.textureManager,R={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"};if(d(_))F=_;else if(!(F=D.json.get(_)))return void console.warn("Asset Pack not found in JSON cache:",_);for(var N in E&&(F={_:F[E]}),F){var V=F[N],B=u(V,"prefix",""),H=u(V,"files"),Q=u(V,"defaultType");if(Array.isArray(H))for(var G=0;G0&&this.inflight.size{var b=a(79291),T=a(92638);S.exports=function(f,h){var c=void 0===f?T():b({},f);if(h)for(var u in h)void 0!==h[u]&&(c[u]=h[u]);return c}},26430:(S,k,a)=>{var b=a(83419),T=a(23906),g=a(54899),f=new b({initialize:function(c,u,m,d){var p=[];d.forEach(function(y){y&&p.push(y)}),this.loader=c,this.type=u,this.key=m,c.prefix&&""!==c.prefix&&(this.key=c.prefix+this.key),this.multiKeyIndex=c.multiKeyIndex++,this.files=p,this.state=T.FILE_PENDING,this.complete=!1,this.pending=p.length,this.failed=0,this.config={},this.baseURL=c.baseURL,this.path=c.path,this.prefix=c.prefix;for(var x=0;x{var b=a(3374);S.exports=function(g,f){var h=b(f,g.xhrSettings);if(!g.base64){var m=new XMLHttpRequest;if(m.open("GET",g.src,h.async,h.user,h.password),m.responseType=g.xhrSettings.responseType,m.timeout=h.timeout,h.headers)for(var d in h.headers)m.setRequestHeader(d,h.headers[d]);return h.header&&h.headerValue&&m.setRequestHeader(h.header,h.headerValue),h.requestedWith&&m.setRequestHeader("X-Requested-With",h.requestedWith),h.overrideMimeType&&m.overrideMimeType(h.overrideMimeType),h.withCredentials&&(m.withCredentials=!0),m.onload=g.onLoad.bind(g,m),m.onerror=g.onError.bind(g,m),m.onprogress=g.onProgress.bind(g),m.ontimeout=g.onError.bind(g,m),m.send(),m}var c=g.url.split(";base64,").pop()||g.url.split(",").pop(),u={responseText:atob(c)};g.onBase64Load(u)}},92638:S=>{S.exports=function(a,b,T,g,f,h){return void 0===a&&(a=""),void 0===b&&(b=!0),void 0===T&&(T=""),void 0===g&&(g=""),void 0===f&&(f=0),void 0===h&&(h=!1),{responseType:a,async:b,user:T,password:g,timeout:f,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:h}}},23906:S=>{S.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},42155:S=>{S.exports="addfile"},38991:S=>{S.exports="complete"},27540:S=>{S.exports="filecomplete"},87464:S=>{S.exports="filecomplete-"},94486:S=>{S.exports="loaderror"},13035:S=>{S.exports="load"},38144:S=>{S.exports="fileprogress"},97520:S=>{S.exports="postprocess"},85595:S=>{S.exports="progress"},55680:S=>{S.exports="start"},54899:(S,k,a)=>{S.exports={ADD:a(42155),COMPLETE:a(38991),FILE_COMPLETE:a(27540),FILE_KEY_COMPLETE:a(87464),FILE_LOAD_ERROR:a(94486),FILE_LOAD:a(13035),FILE_PROGRESS:a(38144),POST_PROCESS:a(97520),PROGRESS:a(85595),START:a(55680)}},14135:(S,k,a)=>{var b=a(83419),T=a(74099),g=a(518),f=a(54899),h=new b({Extends:g,initialize:function(u,m,d,p,v){g.call(this,u,m,d,p,v),this.type="animationJSON"},onProcess:function(){this.loader.once(f.POST_PROCESS,this.onLoadComplete,this),g.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});T.register("animation",function(c,u,m,d){if(Array.isArray(c))for(var p=0;p{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(518),u=a(26430),m=new b({Extends:u,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new c(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","json"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new c(p,v,y,E);u.call(this,p,"atlasjson",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0],p=this.files[1];this.loader.textureManager.addAtlas(d.key,d.data,p.data,this.files[2]?this.files[2].data:null),p.addToCache(),this.complete=!0}}});T.register("aseprite",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(518),u=a(26430),m=new b({Extends:u,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new c(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","json"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new c(p,v,y,E);u.call(this,p,"atlasjson",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0];this.loader.textureManager.addAtlas(d.key,d.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});T.register("atlas",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(26430),u=a(57318),m=new b({Extends:c,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new u(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","xml"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new u(p,v,y,E);c.call(this,p,"atlasxml",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0];this.loader.textureManager.addAtlasXML(d.key,d.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});T.register("atlasXML",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(89749),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y,_){if(u(v)){var E=v;v=h(E,"key"),y=h(E,"xhrSettings"),_=h(E,"context",_)}g.call(this,p,{type:"audio",cache:p.cacheManager.audio,extension:x.type,responseType:"arraybuffer",key:v,url:x.url,xhrSettings:y,config:{context:_}})},onProcess:function(){this.state=T.FILE_PROCESSING;var d=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(p){d.data=p,d.onProcessComplete()},function(p){console.error("Error decoding audio: "+d.key+" - ",p?p.message:null),d.onProcessError()}),this.config.context=null}});m.create=function(d,p,v,x,y){var _=d.systems.game,E=_.config.audio,A=_.device.audio;u(p)&&(v=h(p,"url",[]),x=h(p,"config",{}));var D=m.getAudioURL(_,v);return D?A.webAudio&&!E.disableWebAudio?new m(d,p,D,y,_.sound.context):new c(d,p,D,x):(console.warn('No audio URLs for "%s" can play on this device',p),null)},m.getAudioURL=function(d,p){Array.isArray(p)||(p=[p]);for(var v=0;v{var b=a(21097),T=a(83419),g=a(74099),f=a(95540),h=a(41212),c=a(518),u=a(26430),m=new T({Extends:u,initialize:function(p,v,x,y,_,E,A){if(h(v)){var D=v;v=f(D,"key"),x=f(D,"jsonURL"),y=f(D,"audioURL"),_=f(D,"audioConfig"),E=f(D,"audioXhrSettings"),A=f(D,"jsonXhrSettings")}var I;if(y){var R=b.create(p,v,y,_,E);R&&(I=new c(p,v,x,A),u.call(this,p,"audiosprite",v,[R,I]),this.config.resourceLoad=!1)}else I=new c(p,v,x,A),u.call(this,p,"audiosprite",v,[I]),this.config.resourceLoad=!0,this.config.audioConfig=_,this.config.audioXhrSettings=E},onFileComplete:function(d){if(-1!==this.files.indexOf(d)&&(this.pending--,this.config.resourceLoad&&"json"===d.type&&d.data.hasOwnProperty("resources"))){var v=d.data.resources,x=f(this.config,"audioConfig"),y=f(this.config,"audioXhrSettings"),_=b.create(this.loader,d.key,v,x,y);_&&(this.addToMultiFile(_),this.loader.addFile(_))}},addToCache:function(){if(this.isReadyToProcess()){var p=this.files[1];this.files[0].addToCache(),p.addToCache(),this.complete=!0}}});g.register("audioSprite",function(d,p,v,x,y,_){var I,E=this.systems.game,A=E.config.audio,D=E.device.audio;if(A&&A.noAudio||!D.webAudio&&!D.audioData)return this;if(Array.isArray(d))for(var R=0;R{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y){var _="bin";if(c(p)){var E=p;p=h(E,"key"),v=h(E,"url"),x=h(E,"xhrSettings"),_=h(E,"extension",_),y=h(E,"dataType",y)}g.call(this,d,{type:"binary",cache:d.cacheManager.binary,extension:_,responseType:"arraybuffer",key:p,url:v,xhrSettings:x,config:{dataType:y}})},onProcess:function(){this.state=T.FILE_PROCESSING;var m=this.config.dataType;this.data=m?new m(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});f.register("binary",function(m,d,p,v){if(Array.isArray(m))for(var x=0;x{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(26430),u=a(21859),m=a(57318),d=new b({Extends:c,initialize:function(v,x,y,_,E,A){var D,I;if(h(x)){var R=x;x=g(R,"key"),D=new f(v,{key:x,url:g(R,"textureURL"),extension:g(R,"textureExtension","png"),normalMap:g(R,"normalMap"),xhrSettings:g(R,"textureXhrSettings")}),I=new m(v,{key:x,url:g(R,"fontDataURL"),extension:g(R,"fontDataExtension","xml"),xhrSettings:g(R,"fontDataXhrSettings")})}else D=new f(v,x,y,E),I=new m(v,x,_,A);c.call(this,v,"bitmapfont",x,D.linkFile?[D,I,D.linkFile]:[D,I])},addToCache:function(){if(this.isReadyToProcess()){var p=this.files[0],v=this.files[1];p.addToCache();var x=p.cache.get(p.key),y=u(v.data,p.cache.getFrame(p.key),0,0,x);this.loader.cacheManager.bitmapFont.add(p.key,{data:y,texture:p.key,frame:null}),this.complete=!0}}});T.register("bitmapFont",function(p,v,x,y,_){var E;if(Array.isArray(p))for(var A=0;A{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="css";if(c(p)){var _=p;p=h(_,"key"),v=h(_,"url"),x=h(_,"xhrSettings"),y=h(_,"extension",y)}g.call(this,d,{type:"script",cache:!1,extension:y,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});f.register("css",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(38734),T=a(85722),g=a(83419),f=a(74099),h=a(95540),c=a(19550),u=a(41212),m=a(518),d=a(31403),p=a(46975),v=a(59327),x=a(26430),y=a(82038),_=a(55222),E=new g({Extends:x,initialize:function(D,I,R,F){if(R.multiAtlasURL){var N=new m(D,{key:I,url:R.multiAtlasURL,xhrSettings:F,config:R});x.call(this,D,"texture",I,[N])}else{var V=R.textureURL.substr(R.textureURL.length-3);R.type||(R.type="ktx"===V.toLowerCase()?"KTX":"PVR");var B=new T(D,{key:I,url:R.textureURL,extension:V,xhrSettings:F,config:R});if(R.atlasURL){var H=new m(D,{key:I,url:R.atlasURL,xhrSettings:F,config:R});x.call(this,D,"texture",I,[B,H])}else x.call(this,D,"texture",I,[B])}this.config=R},onFileComplete:function(A){if(-1!==this.files.indexOf(A)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===A.type&&A.data.hasOwnProperty("textures")){var I=A.data.textures,R=this.config,F=this.loader,N=F.baseURL,V=F.path,B=F.prefix,H=h(R,"multiBaseURL",this.baseURL),Q=h(R,"multiPath",this.path),G=h(R,"prefix",this.prefix),K=h(R,"textureXhrSettings");H&&F.setBaseURL(H),Q&&F.setPath(Q),G&&F.setPrefix(G);for(var q=0;q{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(98356),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y,_,E){var A="ttf";if(u(v)){var D=v;v=h(D,"key"),x=h(D,"url"),y=h(D,"format","truetype"),_=h(D,"descriptors",null),E=h(D,"xhrSettings"),A=h(D,"extension",A)}else void 0===y&&(y="truetype");g.call(this,p,{type:"font",cache:!1,extension:A,responseType:"text",key:v,url:x,xhrSettings:E}),this.data={format:y,descriptors:_},this.state=T.FILE_POPULATED},onProcess:function(){this.state=T.FILE_PROCESSING,this.src=c(this,this.loader.baseURL);var d,p=this.key,v="url("+this.src+') format("'+this.data.format+'")';d=this.data.descriptors?new FontFace(p,v,this.data.descriptors):new FontFace(p,v);var x=this;d.load().then(function(){document.fonts.add(d),document.body.classList.add("fonts-loaded"),x.onProcessComplete()}).catch(function(){console.warn("Font failed to load",v),x.onProcessComplete()})}});f.register("font",function(d,p,v,x,y){if(Array.isArray(d))for(var _=0;_{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(73894),m=new b({Extends:g,initialize:function(p,v,x,y,_){var E="glsl";if(c(v)){var A=v;v=h(A,"key"),x=h(A,"url"),y=h(A,"shaderType","fragment"),_=h(A,"xhrSettings"),E=h(A,"extension",E)}else void 0===y&&(y="fragment");g.call(this,p,{type:"glsl",cache:p.cacheManager.shader,extension:E,responseType:"text",key:v,url:x,config:{shaderType:y},xhrSettings:_})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var d=this.data.split("\n"),p=this.extractBlock(d,0);if(p)for(;p;){var v=this.getShaderName(p.header),x=this.getShaderType(p.header),y=this.getShaderUniforms(p.header),_=p.shader;if(this.cache.has(v)){var E=this.cache.get(v);"fragment"===x?E.fragmentSrc=_:E.vertexSrc=_,E.uniforms||(E.uniforms=y)}else this.cache.add(v,"fragment"===x?new u(v,_,"",y):new u(v,"",_,y));p=this.extractBlock(d,p.offset)}else this.cache.add(this.key,"fragment"===this.config.shaderType?new u(this.key,this.data):new u(this.key,"",this.data))},getShaderName:function(d){for(var p=0;p{var b=a(83419),T=a(54899),g=a(41299),f=a(95540),h=a(98356),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){if(c(p)){var y=p;p=f(y,"key"),x=f(y,"config",x)}g.call(this,d,{type:"audio",cache:d.cacheManager.audio,extension:v.type,key:p,url:v.url,config:x}),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var m=0;m{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="html";if(c(p)){var _=p;p=h(_,"key"),v=h(_,"url"),x=h(_,"xhrSettings"),y=h(_,"extension",y)}g.call(this,d,{type:"text",cache:d.cacheManager.html,extension:y,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});f.register("html",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y,_){void 0===x&&(x=512),void 0===y&&(y=512);var E="html";if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),_=h(A,"xhrSettings"),E=h(A,"extension",E),x=h(A,"width",x),y=h(A,"height",y)}g.call(this,d,{type:"html",cache:d.textureManager,extension:E,responseType:"text",key:p,url:v,xhrSettings:_,config:{width:x,height:y}})},onProcess:function(){this.state=T.FILE_PROCESSING;var m=this.config.width,d=this.config.height,p=[];p.push(''),p.push(''),p.push(''),p.push(this.xhrLoader.responseText),p.push(""),p.push(""),p.push("");var v=[p.join("\n")],x=this;try{var y=new window.Blob(v,{type:"image/svg+xml;charset=utf-8"})}catch{return x.state=T.FILE_ERRORED,void x.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){g.revokeObjectURL(x.data),x.onProcessComplete()},this.data.onerror=function(){g.revokeObjectURL(x.data),x.onProcessError()},g.createObjectURL(this.data,y,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});f.register("htmlTexture",function(m,d,p,v,x){if(Array.isArray(m))for(var y=0;y{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(98356),m=new b({Extends:g,initialize:function d(p,v,x,y,_){var A,E="png";if(c(v)){var D=v;v=h(D,"key"),x=h(D,"url"),A=h(D,"normalMap"),y=h(D,"xhrSettings"),E=h(D,"extension",E),_=h(D,"frameConfig")}if(Array.isArray(x)&&(A=x[1],x=x[0]),g.call(this,p,{type:"image",cache:p.textureManager,extension:E,responseType:"blob",key:v,url:x,xhrSettings:y,config:_}),A){var R=new d(p,this.key,A,y,_);R.type="normalMap",this.setLink(R),p.addFile(R)}this.useImageElementLoad="HTMLImageElement"===p.imageLoadType||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var d=this;this.data.onload=function(){g.revokeObjectURL(d.data),d.onProcessComplete()},this.data.onerror=function(){g.revokeObjectURL(d.data),d.onProcessError()},g.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var d=this.state;this.state=T.FILE_PROCESSING,d===T.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=T.FILE_LOADING,this.src=u(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var d=this;this.data.onload=function(){d.state=T.FILE_LOADED,d.loader.nextFile(d,!0)},this.data.onerror=function(){d.loader.nextFile(d,!1)},this.data.src=this.src},addToCache:function(){var d=this.linkFile;d?d.state>=T.FILE_COMPLETE&&("spritesheet"===d.type?d.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,d.data,this.data):this.cache.addImage(this.key,this.data,d.data)):this.cache.addImage(this.key,this.data)}});f.register("image",function(d,p,v){if(Array.isArray(d))for(var x=0;x{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(35154),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y,_){var E="json";if(u(v)){var A=v;v=h(A,"key"),x=h(A,"url"),y=h(A,"xhrSettings"),E=h(A,"extension",E),_=h(A,"dataKey",_)}g.call(this,p,{type:"json",cache:p.cacheManager.json,extension:E,responseType:"text",key:v,url:x,xhrSettings:y,config:_}),u(x)&&(this.data=_?c(x,_):x,this.state=T.FILE_POPULATED)},onProcess:function(){if(this.state!==T.FILE_POPULATED){this.state=T.FILE_PROCESSING;try{var d=JSON.parse(this.xhrLoader.responseText)}catch(v){throw this.onProcessError(),v}var p=this.config;this.data="string"==typeof p?c(d,p,d):d}this.onProcessComplete()}});f.register("json",function(d,p,v,x){if(Array.isArray(d))for(var y=0;y{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(518),u=a(26430),m=new b({Extends:u,initialize:function(p,v,x,y,_,E,A){if(h(v)){var D=v;v=g(D,"key"),x=g(D,"url",!1)?g(D,"url"):g(D,"atlasURL"),E=g(D,"xhrSettings"),y=g(D,"path"),_=g(D,"baseURL"),A=g(D,"textureXhrSettings")}var I=new c(p,v,x,E);u.call(this,p,"multiatlas",v,[I]),this.config.path=y,this.config.baseURL=_,this.config.textureXhrSettings=A},onFileComplete:function(d){if(-1!==this.files.indexOf(d)&&(this.pending--,"json"===d.type&&d.data.hasOwnProperty("textures"))){var v=d.data.textures,x=this.config,y=this.loader,_=y.baseURL,E=y.path,A=y.prefix,D=g(x,"baseURL",this.baseURL),I=g(x,"path",this.path),R=g(x,"prefix",this.prefix),F=g(x,"textureXhrSettings");y.setBaseURL(D),y.setPath(I),y.setPrefix(R);for(var N=0;N{var b=a(83419),T=a(74099),g=a(95540),f=a(41212),h=a(26430),c=a(34328),u=new b({Extends:h,initialize:function(d,p,v,x){var y="js",_=[];if(f(p)){var E=p;p=g(E,"key"),v=g(E,"url"),x=g(E,"xhrSettings"),y=g(E,"extension",y)}Array.isArray(v)||(v=[v]);for(var A=0;A{var b=a(83419),T=a(74099),g=a(95540),f=a(41212),h=a(26430),c=a(85048),u=a(61485),m=a(78776),d=new b({Extends:h,initialize:function(v,x,y,_,E,A){var D,I,R=v.cacheManager.obj;if(f(x)){var F=x;x=g(F,"key"),D=new m(v,{key:x,type:"obj",cache:R,url:g(F,"url"),extension:g(F,"extension","obj"),xhrSettings:g(F,"xhrSettings"),config:{flipUV:g(F,"flipUV",E)}}),(_=g(F,"matURL"))&&(I=new m(v,{key:x,type:"mat",cache:R,url:_,extension:g(F,"matExtension","mat"),xhrSettings:g(F,"xhrSettings")}))}else D=new m(v,{key:x,url:y,type:"obj",cache:R,extension:"obj",xhrSettings:A,config:{flipUV:E}}),_&&(I=new m(v,{key:x,url:_,type:"mat",cache:R,extension:"mat",xhrSettings:A}));h.call(this,v,"obj",x,[D,I])},addToCache:function(){if(this.isReadyToProcess()){var p=this.files[0],v=this.files[1],x=c(p.data,p.config.flipUV);v&&(x.materials=u(v.data)),p.cache.add(p.key,x),this.complete=!0}}});T.register("obj",function(p,v,x,y,_){var E;if(Array.isArray(p))for(var A=0;A{var b=a(83419),T=a(23906),g=a(74099),f=a(518),h=new b({Extends:f,initialize:function(u,m,d,p,v){f.call(this,u,m,d,p,v),this.type="packfile"},onProcess:function(){if(this.state!==T.FILE_POPULATED&&(this.state=T.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var c={};c[this.config]=this.data,this.data=c}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});g.register("pack",function(c,u,m,d){if(Array.isArray(c))for(var p=0;p{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y,_){var E="js";if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),_=h(A,"xhrSettings"),E=h(A,"extension",E),x=h(A,"start"),y=h(A,"mapping")}g.call(this,d,{type:"plugin",cache:!1,extension:E,responseType:"text",key:p,url:v,xhrSettings:_,config:{start:x,mapping:y}}),"function"==typeof v&&(this.data=v,this.state=T.FILE_POPULATED)},onProcess:function(){var m=this.loader.systems.plugins,d=this.config,p=h(d,"start",!1),v=h(d,"mapping",null);if(this.state===T.FILE_POPULATED)m.install(this.key,this.data,p,v);else{this.state=T.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var x=m.install(this.key,window[this.key],p,v);(p||v)&&(this.loader.systems[v]=x,this.loader.scene[v]=x)}this.onProcessComplete()}});f.register("plugin",function(m,d,p,v,x){if(Array.isArray(m))for(var y=0;y{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y){var _="svg";if(c(p)){var E=p;p=h(E,"key"),v=h(E,"url"),x=h(E,"svgConfig",{}),y=h(E,"xhrSettings"),_=h(E,"extension",_)}var A={type:"svg",cache:d.textureManager,extension:_,responseType:"text",key:p,url:v,xhrSettings:y,config:{width:h(x,"width"),height:h(x,"height"),scale:h(x,"scale")}};g.call(this,d,A)},onProcess:function(){this.state=T.FILE_PROCESSING;var m=this.xhrLoader.responseText,d=[m],p=this.config.width,v=this.config.height,x=this.config.scale;t:if(p&&v||x){var E=(new DOMParser).parseFromString(m,"text/xml").getElementsByTagName("svg")[0],A=E.hasAttribute("viewBox"),D=parseFloat(E.getAttribute("width")),I=parseFloat(E.getAttribute("height"));if(!A&&D&&I)E.setAttribute("viewBox","0 0 "+D+" "+I);else if(A&&!D&&!I){var R=E.getAttribute("viewBox").split(/\s+|,/);D=R[2],I=R[3]}if(x){if(!D||!I)break t;p=D*x,v=I*x}E.setAttribute("width",p.toString()+"px"),E.setAttribute("height",v.toString()+"px"),d=[(new XMLSerializer).serializeToString(E)]}try{var F=new window.Blob(d,{type:"image/svg+xml;charset=utf-8"})}catch{return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var N=this,V=!1;this.data.onload=function(){V||g.revokeObjectURL(N.data),N.onProcessComplete()},this.data.onerror=function(){V?N.onProcessError():(V=!0,g.revokeObjectURL(N.data),N.data.src="data:image/svg+xml,"+encodeURIComponent(d.join("")))},g.createObjectURL(this.data,F,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});f.register("svg",function(m,d,p,v){if(Array.isArray(m))for(var x=0;x{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="js";if(c(p)){var _=p;p=h(_,"key"),v=h(_,"url"),x=h(_,"xhrSettings"),y=h(_,"extension",y)}g.call(this,d,{type:"text",extension:y,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var m=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),d=eval;this.loader.sceneManager.add(this.key,d(m)),this.complete=!0}});f.register("sceneFile",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y,_){var E="js";if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),_=h(A,"xhrSettings"),E=h(A,"extension",E),x=h(A,"systemKey"),y=h(A,"sceneKey")}g.call(this,d,{type:"scenePlugin",cache:!1,extension:E,responseType:"text",key:p,url:v,xhrSettings:_,config:{systemKey:x,sceneKey:y}}),"function"==typeof v&&(this.data=v,this.state=T.FILE_POPULATED)},onProcess:function(){var m=this.loader.systems.plugins,d=this.config,p=this.key,v=h(d,"systemKey",p),x=h(d,"sceneKey",p);this.state===T.FILE_POPULATED?m.installScenePlugin(v,this.data,x,this.loader.scene,!0):(this.state=T.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),m.installScenePlugin(v,window[this.key],x,this.loader.scene,!0)),this.onProcessComplete()}});f.register("scenePlugin",function(m,d,p,v,x){if(Array.isArray(m))for(var y=0;y{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y){var _="js";if(c(p)){var E=p;p=h(E,"key"),v=h(E,"url"),x=h(E,"type","script"),y=h(E,"xhrSettings"),_=h(E,"extension",_)}else void 0===x&&(x="script");g.call(this,d,{type:x,cache:!1,extension:_,responseType:"text",key:p,url:v,xhrSettings:y})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});f.register("script",function(m,d,p,v){if(Array.isArray(m))for(var x=0;x{var b=a(83419),T=a(23906),g=a(74099),f=a(19550),h=new b({Extends:f,initialize:function(u,m,d,p,v){f.call(this,u,m,d,v,p),this.type="spritesheet"},addToCache:function(){var c=this.linkFile;c?c.state>=T.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addSpriteSheet(this.key,c.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,c.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});g.register("spritesheet",function(c,u,m,d){if(Array.isArray(c))for(var p=0;p{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="text",_="txt",E=d.cacheManager.text;if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),x=h(A,"xhrSettings"),_=h(A,"extension",_),y=h(A,"type",y),E=h(A,"cache",E)}g.call(this,d,{type:y,cache:E,extension:_,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});f.register("text",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(80341),m=new b({Extends:g,initialize:function(p,v,x,y){var _="csv";if(c(v)){var E=v;v=h(E,"key"),x=h(E,"url"),y=h(E,"xhrSettings"),_=h(E,"extension",_)}g.call(this,p,{type:"tilemapCSV",cache:p.cacheManager.tilemap,extension:_,responseType:"text",key:v,url:x,xhrSettings:y}),this.tilemapFormat=u.CSV},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){this.cache.add(this.key,{format:this.tilemapFormat,data:this.data})}});f.register("tilemapCSV",function(d,p,v){if(Array.isArray(d))for(var x=0;x{var b=a(83419),T=a(74099),g=a(518),f=a(80341),h=new b({Extends:g,initialize:function(u,m,d,p){g.call(this,u,m,d,p),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){this.cache.add(this.key,{format:f.WELTMEISTER,data:this.data})}});T.register("tilemapImpact",function(c,u,m){if(Array.isArray(c))for(var d=0;d{var b=a(83419),T=a(74099),g=a(518),f=a(80341),h=new b({Extends:g,initialize:function(u,m,d,p){g.call(this,u,m,d,p),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){this.cache.add(this.key,{format:f.TILED_JSON,data:this.data})}});T.register("tilemapTiledJSON",function(c,u,m){if(Array.isArray(c))for(var d=0;d{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(26430),u=a(78776),m=new b({Extends:c,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new u(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","txt"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new u(p,v,y,E);c.call(this,p,"unityatlas",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0];this.loader.textureManager.addUnityAtlas(d.key,d.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});T.register("unityAtlas",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(98356),c=a(95540),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y){if(void 0===y&&(y=!1),u(v)){var _=v;v=c(_,"key"),x=c(_,"url",[]),y=c(_,"noAudio",!1)}var E=p.systems.game.device.video.getVideoURL(x);E||console.warn("VideoFile: No supported format for "+v),g.call(this,p,{type:"video",cache:p.cacheManager.video,extension:E.type,key:v,url:E.url,config:{noAudio:y}})},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=h(this,this.loader.baseURL),this.state=T.FILE_LOADED,this.loader.nextFile(this,!0)}});f.register("video",function(d,p,v){if(Array.isArray(d))for(var x=0;x{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(56836),m=new b({Extends:g,initialize:function(p,v,x,y){var _="xml";if(c(v)){var E=v;v=h(E,"key"),x=h(E,"url"),y=h(E,"xhrSettings"),_=h(E,"extension",_)}g.call(this,p,{type:"xml",cache:p.cacheManager.xml,extension:_,responseType:"text",key:v,url:x,xhrSettings:y})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=u(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});f.register("xml",function(d,p,v){if(Array.isArray(d))for(var x=0;x{S.exports={AnimationJSONFile:a(14135),AsepriteFile:a(76272),AtlasJSONFile:a(38734),AtlasXMLFile:a(74599),AudioFile:a(21097),AudioSpriteFile:a(89524),BinaryFile:a(85722),BitmapFontFile:a(97025),CompressedTextureFile:a(69559),CSSFile:a(16024),FontFile:a(87674),GLSLFile:a(47931),HTML5AudioFile:a(89749),HTMLFile:a(88470),HTMLTextureFile:a(14643),ImageFile:a(19550),JSONFile:a(518),MultiAtlasFile:a(59327),MultiScriptFile:a(99297),OBJFile:a(41846),PackFile:a(58610),PluginFile:a(48988),SceneFile:a(88423),ScenePluginFile:a(56812),ScriptFile:a(34328),SpriteSheetFile:a(85035),SVGFile:a(67397),TextFile:a(78776),TilemapCSVFile:a(49477),TilemapImpactFile:a(40807),TilemapJSONFile:a(56775),UnityAtlasFile:a(25771),VideoFile:a(33720),XMLFile:a(57318)}},57777:(S,k,a)=>{var b=a(23906),T=a(79291),g={Events:a(54899),FileTypes:a(64589),File:a(41299),FileTypesManager:a(74099),GetURL:a(98356),LoaderPlugin:a(74261),MergeXHRSettings:a(3374),MultiFile:a(26430),XHRLoader:a(84376),XHRSettings:a(92638)};g=T(!1,g,b),S.exports=g},53307:S=>{S.exports=function(a){for(var b=0,T=0;T{var b=a(6411);S.exports=function(g,f){return b(g)/b(f)/b(g-f)}},30976:S=>{S.exports=function(a,b){return Math.floor(Math.random()*(b-a+1)+a)}},87842:S=>{S.exports=function(a,b,T,g,f){var h=.5*(g-b),c=.5*(f-T),u=a*a;return(2*T-2*g+h+c)*(a*u)+(-3*T+3*g-2*h-c)*u+h*a+T}},26302:S=>{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=10);var g=Math.pow(T,-b);return Math.ceil(a*g)/g}},45319:S=>{S.exports=function(a,b,T){return Math.max(b,Math.min(T,a))}},39506:(S,k,a)=>{var b=a(36383);S.exports=function(g){return g*b.DEG_TO_RAD}},61241:S=>{S.exports=function(a,b){return Math.abs(a-b)}},38857:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(37867),f=a(29747),h=new g,c=new T({initialize:function u(m,d,p,v){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=u.DefaultOrder),this._x=m,this._y=d,this._z=p,this._order=v,this.onChangeCallback=f},x:{get:function(){return this._x},set:function(u){this._x=u,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(u){this._y=u,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(u){this._z=u,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(u){this._order=u,this.onChangeCallback(this)}},set:function(u,m,d,p){return void 0===p&&(p=this._order),this._x=u,this._y=m,this._z=d,this._order=p,this.onChangeCallback(this),this},copy:function(u){return this.set(u.x,u.y,u.z,u.order)},setFromQuaternion:function(u,m,d){return void 0===m&&(m=this._order),void 0===d&&(d=!1),h.fromQuat(u),this.setFromRotationMatrix(h,m,d)},setFromRotationMatrix:function(u,m,d){void 0===m&&(m=this._order),void 0===d&&(d=!1);var p=u.val,v=p[0],x=p[4],y=p[8],_=p[1],E=p[5],A=p[9],D=p[2],I=p[6],R=p[10],F=0,N=0,V=0,B=.99999;switch(m){case"XYZ":N=Math.asin(b(y,-1,1)),Math.abs(y){S.exports=function(a){if(0===a)return 1;for(var b=a;--a;)b*=a;return b}},99472:S=>{S.exports=function(a,b){return Math.random()*(b-a)+a}},77623:S=>{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=10);var g=Math.pow(T,-b);return Math.floor(a*g)/g}},62945:(S,k,a)=>{var b=a(45319);S.exports=function(g,f,h){return(h-f)*(g=b(g,0,1))+f}},38265:S=>{S.exports=function(a,b){return a/b/1e3}},78702:S=>{S.exports=function(a){return a==parseFloat(a)?!(a%2):void 0}},94883:S=>{S.exports=function(a){return a===parseFloat(a)?!(a%2):void 0}},28915:S=>{S.exports=function(a,b,T){return(b-a)*T+a}},94908:S=>{S.exports=function(a,b,T){return void 0===T&&(T=0),a.clone().lerp(b,T)}},94434:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){this.val=new Float32Array(9),f?this.copy(f):this.identity()},clone:function(){return new T(this)},set:function(g){return this.copy(g)},copy:function(g){var f=this.val,h=g.val;return f[0]=h[0],f[1]=h[1],f[2]=h[2],f[3]=h[3],f[4]=h[4],f[5]=h[5],f[6]=h[6],f[7]=h[7],f[8]=h[8],this},fromMat4:function(g){var f=g.val,h=this.val;return h[0]=f[0],h[1]=f[1],h[2]=f[2],h[3]=f[4],h[4]=f[5],h[5]=f[6],h[6]=f[8],h[7]=f[9],h[8]=f[10],this},fromArray:function(g){var f=this.val;return f[0]=g[0],f[1]=g[1],f[2]=g[2],f[3]=g[3],f[4]=g[4],f[5]=g[5],f[6]=g[6],f[7]=g[7],f[8]=g[8],this},identity:function(){var g=this.val;return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=1,g[5]=0,g[6]=0,g[7]=0,g[8]=1,this},transpose:function(){var g=this.val,f=g[1],h=g[2],c=g[5];return g[1]=g[3],g[2]=g[6],g[3]=f,g[5]=g[7],g[6]=h,g[7]=c,this},invert:function(){var g=this.val,f=g[0],h=g[1],c=g[2],u=g[3],m=g[4],d=g[5],p=g[6],v=g[7],x=g[8],y=x*m-d*v,_=-x*u+d*p,E=v*u-m*p,A=f*y+h*_+c*E;return A?(g[0]=y*(A=1/A),g[1]=(-x*h+c*v)*A,g[2]=(d*h-c*m)*A,g[3]=_*A,g[4]=(x*f-c*p)*A,g[5]=(-d*f+c*u)*A,g[6]=E*A,g[7]=(-v*f+h*p)*A,g[8]=(m*f-h*u)*A,this):null},adjoint:function(){var g=this.val,f=g[0],h=g[1],c=g[2],u=g[3],m=g[4],d=g[5],p=g[6],v=g[7],x=g[8];return g[0]=m*x-d*v,g[1]=c*v-h*x,g[2]=h*d-c*m,g[3]=d*p-u*x,g[4]=f*x-c*p,g[5]=c*u-f*d,g[6]=u*v-m*p,g[7]=h*p-f*v,g[8]=f*m-h*u,this},determinant:function(){var g=this.val,u=g[3],m=g[4],d=g[5],p=g[6],v=g[7],x=g[8];return g[0]*(x*m-d*v)+g[1]*(-x*u+d*p)+g[2]*(v*u-m*p)},multiply:function(g){var f=this.val,h=f[0],c=f[1],u=f[2],m=f[3],d=f[4],p=f[5],v=f[6],x=f[7],y=f[8],_=g.val,E=_[0],A=_[1],D=_[2],I=_[3],R=_[4],F=_[5],N=_[6],V=_[7],B=_[8];return f[0]=E*h+A*m+D*v,f[1]=E*c+A*d+D*x,f[2]=E*u+A*p+D*y,f[3]=I*h+R*m+F*v,f[4]=I*c+R*d+F*x,f[5]=I*u+R*p+F*y,f[6]=N*h+V*m+B*v,f[7]=N*c+V*d+B*x,f[8]=N*u+V*p+B*y,this},translate:function(g){var f=this.val,h=g.x,c=g.y;return f[6]=h*f[0]+c*f[3]+f[6],f[7]=h*f[1]+c*f[4]+f[7],f[8]=h*f[2]+c*f[5]+f[8],this},rotate:function(g){var f=this.val,h=f[0],c=f[1],u=f[2],m=f[3],d=f[4],p=f[5],v=Math.sin(g),x=Math.cos(g);return f[0]=x*h+v*m,f[1]=x*c+v*d,f[2]=x*u+v*p,f[3]=x*m-v*h,f[4]=x*d-v*c,f[5]=x*p-v*u,this},scale:function(g){var f=this.val,h=g.x,c=g.y;return f[0]=h*f[0],f[1]=h*f[1],f[2]=h*f[2],f[3]=c*f[3],f[4]=c*f[4],f[5]=c*f[5],this},fromQuat:function(g){var f=g.x,h=g.y,c=g.z,u=g.w,m=f+f,d=h+h,p=c+c,v=f*m,x=f*d,y=f*p,_=h*d,E=h*p,A=c*p,D=u*m,I=u*d,R=u*p,F=this.val;return F[0]=1-(_+A),F[3]=x+R,F[6]=y-I,F[1]=x-R,F[4]=1-(v+A),F[7]=E+D,F[2]=y+I,F[5]=E-D,F[8]=1-(v+_),this},normalFromMat4:function(g){var f=g.val,h=this.val,c=f[0],u=f[1],m=f[2],d=f[3],p=f[4],v=f[5],x=f[6],y=f[7],_=f[8],E=f[9],A=f[10],D=f[11],I=f[12],R=f[13],F=f[14],N=f[15],V=c*v-u*p,B=c*x-m*p,H=c*y-d*p,Q=u*x-m*v,G=u*y-d*v,K=m*y-d*x,q=_*R-E*I,at=_*F-A*I,ot=_*N-D*I,J=E*F-A*R,it=E*N-D*R,Y=A*N-D*F,j=V*Y-B*it+H*J+Q*ot-G*at+K*q;return j?(h[0]=(v*Y-x*it+y*J)*(j=1/j),h[1]=(x*ot-p*Y-y*at)*j,h[2]=(p*it-v*ot+y*q)*j,h[3]=(m*it-u*Y-d*J)*j,h[4]=(c*Y-m*ot+d*at)*j,h[5]=(u*ot-c*it-d*q)*j,h[6]=(R*K-F*G+N*Q)*j,h[7]=(F*H-I*K-N*B)*j,h[8]=(I*G-R*H+N*V)*j,this):null}});S.exports=T},37867:(S,k,a)=>{var b=a(83419),T=a(25836),g=1e-6,f=new b({initialize:function(v){this.val=new Float32Array(16),v?this.copy(v):this.identity()},clone:function(){return new f(this)},set:function(p){return this.copy(p)},setValues:function(p,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q){var G=this.val;return G[0]=p,G[1]=v,G[2]=x,G[3]=y,G[4]=_,G[5]=E,G[6]=A,G[7]=D,G[8]=I,G[9]=R,G[10]=F,G[11]=N,G[12]=V,G[13]=B,G[14]=H,G[15]=Q,this},copy:function(p){var v=p.val;return this.setValues(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15])},fromArray:function(p){return this.setValues(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(p,v,x){var _=h.fromQuat(x).val,E=v.x,A=v.y,D=v.z;return this.setValues(_[0]*E,_[1]*E,_[2]*E,0,_[4]*A,_[5]*A,_[6]*A,0,_[8]*D,_[9]*D,_[10]*D,0,p.x,p.y,p.z,1)},xyz:function(p,v,x){this.identity();var y=this.val;return y[12]=p,y[13]=v,y[14]=x,this},scaling:function(p,v,x){this.zero();var y=this.val;return y[0]=p,y[5]=v,y[10]=x,y[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var p=this.val,v=p[1],x=p[2],y=p[3],_=p[6],E=p[7],A=p[11];return p[1]=p[4],p[2]=p[8],p[3]=p[12],p[4]=v,p[6]=p[9],p[7]=p[13],p[8]=x,p[9]=_,p[11]=p[14],p[12]=y,p[13]=E,p[14]=A,this},getInverse:function(p){return this.copy(p),this.invert()},invert:function(){var p=this.val,v=p[0],x=p[1],y=p[2],_=p[3],E=p[4],A=p[5],D=p[6],I=p[7],R=p[8],F=p[9],N=p[10],V=p[11],B=p[12],H=p[13],Q=p[14],G=p[15],K=v*A-x*E,q=v*D-y*E,at=v*I-_*E,ot=x*D-y*A,J=x*I-_*A,it=y*I-_*D,Y=R*H-F*B,j=R*Q-N*B,nt=R*G-V*B,ht=F*Q-N*H,gt=F*G-V*H,wt=N*G-V*Q,St=K*wt-q*gt+at*ht+ot*nt-J*j+it*Y;return St?this.setValues((A*wt-D*gt+I*ht)*(St=1/St),(y*gt-x*wt-_*ht)*St,(H*it-Q*J+G*ot)*St,(N*J-F*it-V*ot)*St,(D*nt-E*wt-I*j)*St,(v*wt-y*nt+_*j)*St,(Q*at-B*it-G*q)*St,(R*it-N*at+V*q)*St,(E*gt-A*nt+I*Y)*St,(x*nt-v*gt-_*Y)*St,(B*J-H*at+G*K)*St,(F*at-R*J-V*K)*St,(A*j-E*ht-D*Y)*St,(v*ht-x*j+y*Y)*St,(H*q-B*ot-Q*K)*St,(R*ot-F*q+N*K)*St):this},adjoint:function(){var p=this.val,v=p[0],x=p[1],y=p[2],_=p[3],E=p[4],A=p[5],D=p[6],I=p[7],R=p[8],F=p[9],N=p[10],V=p[11],B=p[12],H=p[13],Q=p[14],G=p[15];return this.setValues(A*(N*G-V*Q)-F*(D*G-I*Q)+H*(D*V-I*N),-(x*(N*G-V*Q)-F*(y*G-_*Q)+H*(y*V-_*N)),x*(D*G-I*Q)-A*(y*G-_*Q)+H*(y*I-_*D),-(x*(D*V-I*N)-A*(y*V-_*N)+F*(y*I-_*D)),-(E*(N*G-V*Q)-R*(D*G-I*Q)+B*(D*V-I*N)),v*(N*G-V*Q)-R*(y*G-_*Q)+B*(y*V-_*N),-(v*(D*G-I*Q)-E*(y*G-_*Q)+B*(y*I-_*D)),v*(D*V-I*N)-E*(y*V-_*N)+R*(y*I-_*D),E*(F*G-V*H)-R*(A*G-I*H)+B*(A*V-I*F),-(v*(F*G-V*H)-R*(x*G-_*H)+B*(x*V-_*F)),v*(A*G-I*H)-E*(x*G-_*H)+B*(x*I-_*A),-(v*(A*V-I*F)-E*(x*V-_*F)+R*(x*I-_*A)),-(E*(F*Q-N*H)-R*(A*Q-D*H)+B*(A*N-D*F)),v*(F*Q-N*H)-R*(x*Q-y*H)+B*(x*N-y*F),-(v*(A*Q-D*H)-E*(x*Q-y*H)+B*(x*D-y*A)),v*(A*N-D*F)-E*(x*N-y*F)+R*(x*D-y*A))},determinant:function(){var p=this.val,v=p[0],x=p[1],y=p[2],_=p[3],E=p[4],A=p[5],D=p[6],I=p[7],R=p[8],F=p[9],N=p[10],V=p[11],B=p[12],H=p[13],Q=p[14],G=p[15];return(v*A-x*E)*(N*G-V*Q)-(v*D-y*E)*(F*G-V*H)+(v*I-_*E)*(F*Q-N*H)+(x*D-y*A)*(R*G-V*B)-(x*I-_*A)*(R*Q-N*B)+(y*I-_*D)*(R*H-F*B)},multiply:function(p){var v=this.val,x=v[0],y=v[1],_=v[2],E=v[3],A=v[4],D=v[5],I=v[6],R=v[7],F=v[8],N=v[9],V=v[10],B=v[11],H=v[12],Q=v[13],G=v[14],K=v[15],q=p.val,at=q[0],ot=q[1],J=q[2],it=q[3];return v[0]=at*x+ot*A+J*F+it*H,v[1]=at*y+ot*D+J*N+it*Q,v[2]=at*_+ot*I+J*V+it*G,v[3]=at*E+ot*R+J*B+it*K,v[4]=(at=q[4])*x+(ot=q[5])*A+(J=q[6])*F+(it=q[7])*H,v[5]=at*y+ot*D+J*N+it*Q,v[6]=at*_+ot*I+J*V+it*G,v[7]=at*E+ot*R+J*B+it*K,v[8]=(at=q[8])*x+(ot=q[9])*A+(J=q[10])*F+(it=q[11])*H,v[9]=at*y+ot*D+J*N+it*Q,v[10]=at*_+ot*I+J*V+it*G,v[11]=at*E+ot*R+J*B+it*K,v[12]=(at=q[12])*x+(ot=q[13])*A+(J=q[14])*F+(it=q[15])*H,v[13]=at*y+ot*D+J*N+it*Q,v[14]=at*_+ot*I+J*V+it*G,v[15]=at*E+ot*R+J*B+it*K,this},multiplyLocal:function(p){var v=this.val,x=p.val;return this.setValues(v[0]*x[0]+v[1]*x[4]+v[2]*x[8]+v[3]*x[12],v[0]*x[1]+v[1]*x[5]+v[2]*x[9]+v[3]*x[13],v[0]*x[2]+v[1]*x[6]+v[2]*x[10]+v[3]*x[14],v[0]*x[3]+v[1]*x[7]+v[2]*x[11]+v[3]*x[15],v[4]*x[0]+v[5]*x[4]+v[6]*x[8]+v[7]*x[12],v[4]*x[1]+v[5]*x[5]+v[6]*x[9]+v[7]*x[13],v[4]*x[2]+v[5]*x[6]+v[6]*x[10]+v[7]*x[14],v[4]*x[3]+v[5]*x[7]+v[6]*x[11]+v[7]*x[15],v[8]*x[0]+v[9]*x[4]+v[10]*x[8]+v[11]*x[12],v[8]*x[1]+v[9]*x[5]+v[10]*x[9]+v[11]*x[13],v[8]*x[2]+v[9]*x[6]+v[10]*x[10]+v[11]*x[14],v[8]*x[3]+v[9]*x[7]+v[10]*x[11]+v[11]*x[15],v[12]*x[0]+v[13]*x[4]+v[14]*x[8]+v[15]*x[12],v[12]*x[1]+v[13]*x[5]+v[14]*x[9]+v[15]*x[13],v[12]*x[2]+v[13]*x[6]+v[14]*x[10]+v[15]*x[14],v[12]*x[3]+v[13]*x[7]+v[14]*x[11]+v[15]*x[15])},premultiply:function(p){return this.multiplyMatrices(p,this)},multiplyMatrices:function(p,v){var x=p.val,y=v.val,_=x[0],E=x[4],A=x[8],D=x[12],I=x[1],R=x[5],F=x[9],N=x[13],V=x[2],B=x[6],H=x[10],Q=x[14],G=x[3],K=x[7],q=x[11],at=x[15],ot=y[0],J=y[4],it=y[8],Y=y[12],j=y[1],nt=y[5],ht=y[9],gt=y[13],wt=y[2],St=y[6],Bt=y[10],Yt=y[14],$t=y[3],qt=y[7],ne=y[11],le=y[15];return this.setValues(_*ot+E*j+A*wt+D*$t,I*ot+R*j+F*wt+N*$t,V*ot+B*j+H*wt+Q*$t,G*ot+K*j+q*wt+at*$t,_*J+E*nt+A*St+D*qt,I*J+R*nt+F*St+N*qt,V*J+B*nt+H*St+Q*qt,G*J+K*nt+q*St+at*qt,_*it+E*ht+A*Bt+D*ne,I*it+R*ht+F*Bt+N*ne,V*it+B*ht+H*Bt+Q*ne,G*it+K*ht+q*Bt+at*ne,_*Y+E*gt+A*Yt+D*le,I*Y+R*gt+F*Yt+N*le,V*Y+B*gt+H*Yt+Q*le,G*Y+K*gt+q*Yt+at*le)},translate:function(p){return this.translateXYZ(p.x,p.y,p.z)},translateXYZ:function(p,v,x){var y=this.val;return y[12]=y[0]*p+y[4]*v+y[8]*x+y[12],y[13]=y[1]*p+y[5]*v+y[9]*x+y[13],y[14]=y[2]*p+y[6]*v+y[10]*x+y[14],y[15]=y[3]*p+y[7]*v+y[11]*x+y[15],this},scale:function(p){return this.scaleXYZ(p.x,p.y,p.z)},scaleXYZ:function(p,v,x){var y=this.val;return y[0]=y[0]*p,y[1]=y[1]*p,y[2]=y[2]*p,y[3]=y[3]*p,y[4]=y[4]*v,y[5]=y[5]*v,y[6]=y[6]*v,y[7]=y[7]*v,y[8]=y[8]*x,y[9]=y[9]*x,y[10]=y[10]*x,y[11]=y[11]*x,this},makeRotationAxis:function(p,v){var x=Math.cos(v),y=Math.sin(v),_=1-x,E=p.x,A=p.y,D=p.z,I=_*E,R=_*A;return this.setValues(I*E+x,I*A-y*D,I*D+y*A,0,I*A+y*D,R*A+x,R*D-y*E,0,I*D-y*A,R*D+y*E,_*D*D+x,0,0,0,0,1)},rotate:function(p,v){var x=this.val,y=v.x,_=v.y,E=v.z,A=Math.sqrt(y*y+_*_+E*E);if(Math.abs(A){S.exports=function(a,b,T){return Math.min(a+b,T)}},50040:S=>{S.exports=function(a){var b=a.length;if(0===b)return 0;a.sort(function(g,f){return g-f});var T=Math.floor(b/2);return b%2==0?(a[T]+a[T-1])/2:a[T]}},37204:S=>{S.exports=function(a,b,T){return Math.max(a-b,T)}},65201:S=>{S.exports=function(a,b,T,g){void 0===T&&(T=b+1);var f=(a-b)/(T-b);return f>1?void 0!==g?(f=(g-a)/(g-T))<0&&(f=0):f=1:f<0&&(f=0),f}},15746:(S,k,a)=>{var b=a(83419),T=a(94434),g=a(29747),f=a(25836),h=1e-6,c=new Int8Array([1,2,0]),u=new Float32Array([0,0,0]),m=new f(1,0,0),d=new f(0,1,0),p=new f,v=new T,x=new b({initialize:function(_,E,A,D){this.onChangeCallback=g,this.set(_,E,A,D)},x:{get:function(){return this._x},set:function(y){this._x=y,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(y){this._y=y,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(y){this._z=y,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(y){this._w=y,this.onChangeCallback(this)}},copy:function(y){return this.set(y)},set:function(y,_,E,A,D){return void 0===D&&(D=!0),"object"==typeof y?(this._x=y.x||0,this._y=y.y||0,this._z=y.z||0,this._w=y.w||0):(this._x=y||0,this._y=_||0,this._z=E||0,this._w=A||0),D&&this.onChangeCallback(this),this},add:function(y){return this._x+=y.x,this._y+=y.y,this._z+=y.z,this._w+=y.w,this.onChangeCallback(this),this},subtract:function(y){return this._x-=y.x,this._y-=y.y,this._z-=y.z,this._w-=y.w,this.onChangeCallback(this),this},scale:function(y){return this._x*=y,this._y*=y,this._z*=y,this._w*=y,this.onChangeCallback(this),this},length:function(){var y=this.x,_=this.y,E=this.z,A=this.w;return Math.sqrt(y*y+_*_+E*E+A*A)},lengthSq:function(){var y=this.x,_=this.y,E=this.z,A=this.w;return y*y+_*_+E*E+A*A},normalize:function(){var y=this.x,_=this.y,E=this.z,A=this.w,D=y*y+_*_+E*E+A*A;return D>0&&(D=1/Math.sqrt(D),this._x=y*D,this._y=_*D,this._z=E*D,this._w=A*D),this.onChangeCallback(this),this},dot:function(y){return this.x*y.x+this.y*y.y+this.z*y.z+this.w*y.w},lerp:function(y,_){void 0===_&&(_=0);var E=this.x,A=this.y,D=this.z,I=this.w;return this.set(E+_*(y.x-E),A+_*(y.y-A),D+_*(y.z-D),I+_*(y.w-I))},rotationTo:function(y,_){var E=y.x*_.x+y.y*_.y+y.z*_.z;return E<-.999999?(p.copy(m).cross(y).length().999999?this.set(0,0,0,1):(p.copy(y).cross(_),this._x=p.x,this._y=p.y,this._z=p.z,this._w=1+E,this.normalize())},setAxes:function(y,_,E){var A=v.val;return A[0]=_.x,A[3]=_.y,A[6]=_.z,A[1]=E.x,A[4]=E.y,A[7]=E.z,A[2]=-y.x,A[5]=-y.y,A[8]=-y.z,this.fromMat3(v).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(y,_){_*=.5;var E=Math.sin(_);return this.set(E*y.x,E*y.y,E*y.z,Math.cos(_))},multiply:function(y){var _=this.x,E=this.y,A=this.z,D=this.w,I=y.x,R=y.y,F=y.z,N=y.w;return this.set(_*N+D*I+E*F-A*R,E*N+D*R+A*I-_*F,A*N+D*F+_*R-E*I,D*N-_*I-E*R-A*F)},slerp:function(y,_){var E=this.x,A=this.y,D=this.z,I=this.w,R=y.x,F=y.y,N=y.z,V=y.w,B=E*R+A*F+D*N+I*V;B<0&&(B=-B,R=-R,F=-F,N=-N,V=-V);var H=1-_,Q=_;if(1-B>h){var G=Math.acos(B),K=Math.sin(G);H=Math.sin((1-_)*G)/K,Q=Math.sin(_*G)/K}return this.set(H*E+Q*R,H*A+Q*F,H*D+Q*N,H*I+Q*V)},invert:function(){var y=this.x,_=this.y,E=this.z,A=this.w,D=y*y+_*_+E*E+A*A,I=D?1/D:0;return this.set(-y*I,-_*I,-E*I,A*I)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(y){y*=.5;var _=this.x,E=this.y,A=this.z,D=this.w,I=Math.sin(y),R=Math.cos(y);return this.set(_*R+D*I,E*R+A*I,A*R-E*I,D*R-_*I)},rotateY:function(y){y*=.5;var _=this.x,E=this.y,A=this.z,D=this.w,I=Math.sin(y),R=Math.cos(y);return this.set(_*R-A*I,E*R+D*I,A*R+_*I,D*R-E*I)},rotateZ:function(y){y*=.5;var _=this.x,E=this.y,A=this.z,D=this.w,I=Math.sin(y),R=Math.cos(y);return this.set(_*R+E*I,E*R-_*I,A*R+D*I,D*R-A*I)},calculateW:function(){var y=this.x,_=this.y,E=this.z;return this.w=-Math.sqrt(1-y*y-_*_-E*E),this},setFromEuler:function(y,_){var E=y.x/2,A=y.y/2,D=y.z/2,I=Math.cos(E),R=Math.cos(A),F=Math.cos(D),N=Math.sin(E),V=Math.sin(A),B=Math.sin(D);switch(y.order){case"XYZ":this.set(N*R*F+I*V*B,I*V*F-N*R*B,I*R*B+N*V*F,I*R*F-N*V*B,_);break;case"YXZ":this.set(N*R*F+I*V*B,I*V*F-N*R*B,I*R*B-N*V*F,I*R*F+N*V*B,_);break;case"ZXY":this.set(N*R*F-I*V*B,I*V*F+N*R*B,I*R*B+N*V*F,I*R*F-N*V*B,_);break;case"ZYX":this.set(N*R*F-I*V*B,I*V*F+N*R*B,I*R*B-N*V*F,I*R*F+N*V*B,_);break;case"YZX":this.set(N*R*F+I*V*B,I*V*F+N*R*B,I*R*B-N*V*F,I*R*F-N*V*B,_);break;case"XZY":this.set(N*R*F-I*V*B,I*V*F-N*R*B,I*R*B+N*V*F,I*R*F+N*V*B,_)}return this},setFromRotationMatrix:function(y){var Q,_=y.val,E=_[0],A=_[4],D=_[8],I=_[1],R=_[5],F=_[9],N=_[2],V=_[6],B=_[10],H=E+R+B;return H>0?(Q=.5/Math.sqrt(H+1),this.set((V-F)*Q,(D-N)*Q,(I-A)*Q,.25/Q)):E>R&&E>B?(Q=2*Math.sqrt(1+E-R-B),this.set(.25*Q,(A+I)/Q,(D+N)/Q,(V-F)/Q)):R>B?(Q=2*Math.sqrt(1+R-E-B),this.set((A+I)/Q,.25*Q,(F+V)/Q,(D-N)/Q)):(Q=2*Math.sqrt(1+B-E-R),this.set((D+N)/Q,(F+V)/Q,.25*Q,(I-A)/Q)),this},fromMat3:function(y){var A,_=y.val,E=_[0]+_[4]+_[8];if(E>0)A=Math.sqrt(E+1),this.w=.5*A,this._x=(_[7]-_[5])*(A=.5/A),this._y=(_[2]-_[6])*A,this._z=(_[3]-_[1])*A;else{var D=0;_[4]>_[0]&&(D=1),_[8]>_[3*D+D]&&(D=2);var I=c[D],R=c[I];A=Math.sqrt(_[3*D+D]-_[3*I+I]-_[3*R+R]+1),u[D]=.5*A,u[I]=(_[3*I+D]+_[3*D+I])*(A=.5/A),u[R]=(_[3*R+D]+_[3*D+R])*A,this._x=u[0],this._y=u[1],this._z=u[2],this._w=(_[3*R+I]-_[3*I+R])*A}return this.onChangeCallback(this),this}});S.exports=x},43396:(S,k,a)=>{var b=a(36383);S.exports=function(g){return g*b.RAD_TO_DEG}},74362:S=>{S.exports=function(a,b){void 0===b&&(b=1);var T=2*Math.random()*Math.PI;return a.x=Math.cos(T)*b,a.y=Math.sin(T)*b,a}},60706:S=>{S.exports=function(a,b){void 0===b&&(b=1);var T=2*Math.random()*Math.PI,g=2*Math.random()-1,f=Math.sqrt(1-g*g)*b;return a.x=Math.cos(T)*f,a.y=Math.sin(T)*f,a.z=g*b,a}},67421:S=>{S.exports=function(a,b){return void 0===b&&(b=1),a.x=(2*Math.random()-1)*b,a.y=(2*Math.random()-1)*b,a.z=(2*Math.random()-1)*b,a.w=(2*Math.random()-1)*b,a}},36305:S=>{S.exports=function(a,b){var T=a.x,g=a.y;return a.x=T*Math.cos(b)-g*Math.sin(b),a.y=T*Math.sin(b)+g*Math.cos(b),a}},11520:S=>{S.exports=function(a,b,T,g){var f=Math.cos(g),h=Math.sin(g),c=a.x-b,u=a.y-T;return a.x=c*f-u*h+b,a.y=c*h+u*f+T,a}},1163:S=>{S.exports=function(a,b,T,g,f){var h=g+Math.atan2(a.y-T,a.x-b);return a.x=b+f*Math.cos(h),a.y=T+f*Math.sin(h),a}},70336:S=>{S.exports=function(a,b,T,g,f){return a.x=b+f*Math.cos(g),a.y=T+f*Math.sin(g),a}},72678:(S,k,a)=>{var b=a(25836),T=a(37867),g=a(15746),f=new T,h=new g,c=new b;S.exports=function(m,d,p){return h.setAxisAngle(d,p),f.fromRotationTranslation(h,c.set(0,0,0)),m.transformMat4(f)}},2284:S=>{S.exports=function(a){return a>0?Math.ceil(a):Math.floor(a)}},41013:S=>{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=10);var g=Math.pow(T,-b);return Math.round(a*g)/g}},16922:S=>{S.exports=function(a,b,T,g){void 0===b&&(b=1),void 0===T&&(T=1),void 0===g&&(g=1),g*=Math.PI/a;for(var f=[],h=[],c=0;c{S.exports=function(a,b,T){return a<=b?0:a>=T?1:(a=(a-b)/(T-b))*a*(3-2*a)}},54261:S=>{S.exports=function(a,b,T){return(a=Math.max(0,Math.min(1,(a-b)/(T-b))))*a*a*(a*(6*a-15)+10)}},44408:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c){void 0===c&&(c=new b);var u=0,m=0;return g>0&&g<=f*h&&(u=g>f-1?g-(m=Math.floor(g/f))*f:g),c.set(u,m)}},85955:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m,d,p){void 0===p&&(p=new b);var v=Math.sin(u),x=Math.cos(u),y=x*m,_=v*m,E=-v*d,A=x*d,D=1/(y*A+E*-_);return p.x=A*D*g+-E*D*f+(c*E-h*A)*D,p.y=y*D*f+-_*D*g+(-c*y+h*_)*D,p}},26099:(S,k,a)=>{var b=a(83419),T=a(43855),g=new b({initialize:function(h,c){this.x=0,this.y=0,"object"==typeof h?(this.x=h.x||0,this.y=h.y||0):(void 0===c&&(c=h),this.x=h||0,this.y=c||0)},clone:function(){return new g(this.x,this.y)},copy:function(f){return this.x=f.x||0,this.y=f.y||0,this},setFromObject:function(f){return this.x=f.x||0,this.y=f.y||0,this},set:function(f,h){return void 0===h&&(h=f),this.x=f,this.y=h,this},setTo:function(f,h){return this.set(f,h)},setToPolar:function(f,h){return null==h&&(h=1),this.x=Math.cos(f)*h,this.y=Math.sin(f)*h,this},equals:function(f){return this.x===f.x&&this.y===f.y},fuzzyEquals:function(f,h){return T(this.x,f.x,h)&&T(this.y,f.y,h)},angle:function(){var f=Math.atan2(this.y,this.x);return f<0&&(f+=2*Math.PI),f},setAngle:function(f){return this.setToPolar(f,this.length())},add:function(f){return this.x+=f.x,this.y+=f.y,this},subtract:function(f){return this.x-=f.x,this.y-=f.y,this},multiply:function(f){return this.x*=f.x,this.y*=f.y,this},scale:function(f){return isFinite(f)?(this.x*=f,this.y*=f):(this.x=0,this.y=0),this},divide:function(f){return this.x/=f.x,this.y/=f.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(f){var h=f.x-this.x,c=f.y-this.y;return Math.sqrt(h*h+c*c)},distanceSq:function(f){var h=f.x-this.x,c=f.y-this.y;return h*h+c*c},length:function(){var f=this.x,h=this.y;return Math.sqrt(f*f+h*h)},setLength:function(f){return this.normalize().scale(f)},lengthSq:function(){var f=this.x,h=this.y;return f*f+h*h},normalize:function(){var f=this.x,h=this.y,c=f*f+h*h;return c>0&&(c=1/Math.sqrt(c),this.x=f*c,this.y=h*c),this},normalizeRightHand:function(){var f=this.x;return this.x=-1*this.y,this.y=f,this},normalizeLeftHand:function(){var f=this.x;return this.x=this.y,this.y=-1*f,this},dot:function(f){return this.x*f.x+this.y*f.y},cross:function(f){return this.x*f.y-this.y*f.x},lerp:function(f,h){void 0===h&&(h=0);var c=this.x,u=this.y;return this.x=c+h*(f.x-c),this.y=u+h*(f.y-u),this},transformMat3:function(f){var h=this.x,c=this.y,u=f.val;return this.x=u[0]*h+u[3]*c+u[6],this.y=u[1]*h+u[4]*c+u[7],this},transformMat4:function(f){var h=this.x,c=this.y,u=f.val;return this.x=u[0]*h+u[4]*c+u[12],this.y=u[1]*h+u[5]*c+u[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(f){var h=this.length();return h&&h>f&&this.scale(f/h),this},reflect:function(f){return f=f.clone().normalize(),this.subtract(f.scale(2*this.dot(f)))},mirror:function(f){return this.reflect(f).negate()},rotate:function(f){var h=Math.cos(f),c=Math.sin(f);return this.set(h*this.x-c*this.y,c*this.x+h*this.y)},project:function(f){var h=this.dot(f)/f.dot(f);return this.copy(f).scale(h)}});g.ZERO=new g,g.RIGHT=new g(1,0),g.LEFT=new g(-1,0),g.UP=new g(0,-1),g.DOWN=new g(0,1),g.ONE=new g(1,1),S.exports=g},25836:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c){this.x=0,this.y=0,this.z=0,"object"==typeof f?(this.x=f.x||0,this.y=f.y||0,this.z=f.z||0):(this.x=f||0,this.y=h||0,this.z=c||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(g){return this.x=Math.min(this.x,g.x),this.y=Math.min(this.y,g.y),this.z=Math.min(this.z,g.z),this},max:function(g){return this.x=Math.max(this.x,g.x),this.y=Math.max(this.y,g.y),this.z=Math.max(this.z,g.z),this},clone:function(){return new T(this.x,this.y,this.z)},addVectors:function(g,f){return this.x=g.x+f.x,this.y=g.y+f.y,this.z=g.z+f.z,this},subVectors:function(g,f){return this.x=g.x-f.x,this.y=g.y-f.y,this.z=g.z-f.z,this},crossVectors:function(g,f){var h=g.x,c=g.y,u=g.z,m=f.x,d=f.y,p=f.z;return this.x=c*p-u*d,this.y=u*m-h*p,this.z=h*d-c*m,this},equals:function(g){return this.x===g.x&&this.y===g.y&&this.z===g.z},copy:function(g){return this.x=g.x,this.y=g.y,this.z=g.z||0,this},set:function(g,f,h){return"object"==typeof g?(this.x=g.x||0,this.y=g.y||0,this.z=g.z||0):(this.x=g||0,this.y=f||0,this.z=h||0),this},setFromMatrixPosition:function(g){return this.fromArray(g.val,12)},setFromMatrixColumn:function(g,f){return this.fromArray(g.val,4*f)},fromArray:function(g,f){return void 0===f&&(f=0),this.x=g[f],this.y=g[f+1],this.z=g[f+2],this},add:function(g){return this.x+=g.x,this.y+=g.y,this.z+=g.z||0,this},addScalar:function(g){return this.x+=g,this.y+=g,this.z+=g,this},addScale:function(g,f){return this.x+=g.x*f,this.y+=g.y*f,this.z+=g.z*f||0,this},subtract:function(g){return this.x-=g.x,this.y-=g.y,this.z-=g.z||0,this},multiply:function(g){return this.x*=g.x,this.y*=g.y,this.z*=g.z||1,this},scale:function(g){return isFinite(g)?(this.x*=g,this.y*=g,this.z*=g):(this.x=0,this.y=0,this.z=0),this},divide:function(g){return this.x/=g.x,this.y/=g.y,this.z/=g.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0;return Math.sqrt(f*f+h*h+c*c)},distanceSq:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0;return f*f+h*h+c*c},length:function(){var g=this.x,f=this.y,h=this.z;return Math.sqrt(g*g+f*f+h*h)},lengthSq:function(){var g=this.x,f=this.y,h=this.z;return g*g+f*f+h*h},normalize:function(){var g=this.x,f=this.y,h=this.z,c=g*g+f*f+h*h;return c>0&&(c=1/Math.sqrt(c),this.x=g*c,this.y=f*c,this.z=h*c),this},dot:function(g){return this.x*g.x+this.y*g.y+this.z*g.z},cross:function(g){var f=this.x,h=this.y,c=this.z,u=g.x,m=g.y,d=g.z;return this.x=h*d-c*m,this.y=c*u-f*d,this.z=f*m-h*u,this},lerp:function(g,f){void 0===f&&(f=0);var h=this.x,c=this.y,u=this.z;return this.x=h+f*(g.x-h),this.y=c+f*(g.y-c),this.z=u+f*(g.z-u),this},applyMatrix3:function(g){var f=this.x,h=this.y,c=this.z,u=g.val;return this.x=u[0]*f+u[3]*h+u[6]*c,this.y=u[1]*f+u[4]*h+u[7]*c,this.z=u[2]*f+u[5]*h+u[8]*c,this},applyMatrix4:function(g){var f=this.x,h=this.y,c=this.z,u=g.val,m=1/(u[3]*f+u[7]*h+u[11]*c+u[15]);return this.x=(u[0]*f+u[4]*h+u[8]*c+u[12])*m,this.y=(u[1]*f+u[5]*h+u[9]*c+u[13])*m,this.z=(u[2]*f+u[6]*h+u[10]*c+u[14])*m,this},transformMat3:function(g){var f=this.x,h=this.y,c=this.z,u=g.val;return this.x=f*u[0]+h*u[3]+c*u[6],this.y=f*u[1]+h*u[4]+c*u[7],this.z=f*u[2]+h*u[5]+c*u[8],this},transformMat4:function(g){var f=this.x,h=this.y,c=this.z,u=g.val;return this.x=u[0]*f+u[4]*h+u[8]*c+u[12],this.y=u[1]*f+u[5]*h+u[9]*c+u[13],this.z=u[2]*f+u[6]*h+u[10]*c+u[14],this},transformCoordinates:function(g){var f=this.x,h=this.y,c=this.z,u=g.val,d=f*u[1]+h*u[5]+c*u[9]+u[13],p=f*u[2]+h*u[6]+c*u[10]+u[14],v=f*u[3]+h*u[7]+c*u[11]+u[15];return this.x=(f*u[0]+h*u[4]+c*u[8]+u[12])/v,this.y=d/v,this.z=p/v,this},transformQuat:function(g){var f=this.x,h=this.y,c=this.z,u=g.x,m=g.y,d=g.z,p=g.w,v=p*f+m*c-d*h,x=p*h+d*f-u*c,y=p*c+u*h-m*f,_=-u*f-m*h-d*c;return this.x=v*p+_*-u+x*-d-y*-m,this.y=x*p+_*-m+y*-u-v*-d,this.z=y*p+_*-d+v*-m-x*-u,this},project:function(g){var f=this.x,h=this.y,c=this.z,u=g.val,d=u[1],p=u[2],y=u[5],_=u[6],D=u[9],I=u[10],N=u[13],V=u[14],H=1/(f*u[3]+h*u[7]+c*u[11]+u[15]);return this.x=(f*u[0]+h*u[4]+c*u[8]+u[12])*H,this.y=(f*d+h*y+c*D+N)*H,this.z=(f*p+h*_+c*I+V)*H,this},projectViewMatrix:function(g,f){return this.applyMatrix4(g).applyMatrix4(f)},unprojectViewMatrix:function(g,f){return this.applyMatrix4(g).applyMatrix4(f)},unproject:function(g,f){var m=g.w,p=m-this.y-1-g.y,v=this.z;return this.x=2*(this.x-g.x)/g.z-1,this.y=2*p/m-1,this.z=2*v-1,this.project(f)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});T.ZERO=new T,T.RIGHT=new T(1,0,0),T.LEFT=new T(-1,0,0),T.UP=new T(0,-1,0),T.DOWN=new T(0,1,0),T.FORWARD=new T(0,0,1),T.BACK=new T(0,0,-1),T.ONE=new T(1,1,1),S.exports=T},61369:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof f?(this.x=f.x||0,this.y=f.y||0,this.z=f.z||0,this.w=f.w||0):(this.x=f||0,this.y=h||0,this.z=c||0,this.w=u||0)},clone:function(){return new T(this.x,this.y,this.z,this.w)},copy:function(g){return this.x=g.x,this.y=g.y,this.z=g.z||0,this.w=g.w||0,this},equals:function(g){return this.x===g.x&&this.y===g.y&&this.z===g.z&&this.w===g.w},set:function(g,f,h,c){return"object"==typeof g?(this.x=g.x||0,this.y=g.y||0,this.z=g.z||0,this.w=g.w||0):(this.x=g||0,this.y=f||0,this.z=h||0,this.w=c||0),this},add:function(g){return this.x+=g.x,this.y+=g.y,this.z+=g.z||0,this.w+=g.w||0,this},subtract:function(g){return this.x-=g.x,this.y-=g.y,this.z-=g.z||0,this.w-=g.w||0,this},scale:function(g){return this.x*=g,this.y*=g,this.z*=g,this.w*=g,this},length:function(){var g=this.x,f=this.y,h=this.z,c=this.w;return Math.sqrt(g*g+f*f+h*h+c*c)},lengthSq:function(){var g=this.x,f=this.y,h=this.z,c=this.w;return g*g+f*f+h*h+c*c},normalize:function(){var g=this.x,f=this.y,h=this.z,c=this.w,u=g*g+f*f+h*h+c*c;return u>0&&(u=1/Math.sqrt(u),this.x=g*u,this.y=f*u,this.z=h*u,this.w=c*u),this},dot:function(g){return this.x*g.x+this.y*g.y+this.z*g.z+this.w*g.w},lerp:function(g,f){void 0===f&&(f=0);var h=this.x,c=this.y,u=this.z,m=this.w;return this.x=h+f*(g.x-h),this.y=c+f*(g.y-c),this.z=u+f*(g.z-u),this.w=m+f*(g.w-m),this},multiply:function(g){return this.x*=g.x,this.y*=g.y,this.z*=g.z||1,this.w*=g.w||1,this},divide:function(g){return this.x/=g.x,this.y/=g.y,this.z/=g.z||1,this.w/=g.w||1,this},distance:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0,u=g.w-this.w||0;return Math.sqrt(f*f+h*h+c*c+u*u)},distanceSq:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0,u=g.w-this.w||0;return f*f+h*h+c*c+u*u},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(g){var f=this.x,h=this.y,c=this.z,u=this.w,m=g.val;return this.x=m[0]*f+m[4]*h+m[8]*c+m[12]*u,this.y=m[1]*f+m[5]*h+m[9]*c+m[13]*u,this.z=m[2]*f+m[6]*h+m[10]*c+m[14]*u,this.w=m[3]*f+m[7]*h+m[11]*c+m[15]*u,this},transformQuat:function(g){var f=this.x,h=this.y,c=this.z,u=g.x,m=g.y,d=g.z,p=g.w,v=p*f+m*c-d*h,x=p*h+d*f-u*c,y=p*c+u*h-m*f,_=-u*f-m*h-d*c;return this.x=v*p+_*-u+x*-d-y*-m,this.y=x*p+_*-m+y*-u-v*-d,this.z=y*p+_*-d+v*-m-x*-u,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});T.prototype.sub=T.prototype.subtract,T.prototype.mul=T.prototype.multiply,T.prototype.div=T.prototype.divide,T.prototype.dist=T.prototype.distance,T.prototype.distSq=T.prototype.distanceSq,T.prototype.len=T.prototype.length,T.prototype.lenSq=T.prototype.lengthSq,S.exports=T},60417:S=>{S.exports=function(a,b,T){return Math.abs(a-b)<=T}},15994:S=>{S.exports=function(a,b,T){var g=T-b;return b+((a-b)%g+g)%g}},31040:S=>{S.exports=function(a,b,T,g){return Math.atan2(g-b,T-a)}},55495:S=>{S.exports=function(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}},128:S=>{S.exports=function(a,b){return Math.atan2(b.x-a.x,b.y-a.y)}},41273:S=>{S.exports=function(a,b,T,g){return Math.atan2(T-a,g-b)}},1432:(S,k,a)=>{var b=a(36383);S.exports=function(g){return g>Math.PI&&(g-=b.PI2),Math.abs(((g+b.TAU)%b.PI2-b.PI2)%b.PI2)}},12407:S=>{S.exports=function(a){return(a%=2*Math.PI)>=0?a:a+2*Math.PI}},53993:(S,k,a)=>{var b=a(99472);S.exports=function(){return b(-Math.PI,Math.PI)}},86564:(S,k,a)=>{var b=a(99472);S.exports=function(){return b(-180,180)}},90154:(S,k,a)=>{var b=a(12407);S.exports=function(g){return b(g+Math.PI)}},48736:(S,k,a)=>{var b=a(36383);S.exports=function(g,f,h){return void 0===h&&(h=.05),g===f||(Math.abs(f-g)<=h||Math.abs(f-g)>=b.PI2-h?g=f:(Math.abs(f-g)>Math.PI&&(fg?g+=h:f{S.exports=function(a,b){var T=b-a;return 0===T?0:T-360*Math.floor((T- -180)/360)}},86554:(S,k,a)=>{var b=a(15994);S.exports=function(g){return b(g,-Math.PI,Math.PI)}},30954:(S,k,a)=>{var b=a(15994);S.exports=function(g){return b(g,-180,180)}},25588:(S,k,a)=>{S.exports={Between:a(31040),BetweenPoints:a(55495),BetweenPointsY:a(128),BetweenY:a(41273),CounterClockwise:a(1432),Normalize:a(12407),Random:a(53993),RandomDegrees:a(86564),Reverse:a(90154),RotateTo:a(48736),ShortestBetween:a(61430),Wrap:a(86554),WrapDegrees:a(30954)}},36383:S=>{var k={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};S.exports=k},20339:S=>{S.exports=function(a,b,T,g){var f=a-T,h=b-g;return Math.sqrt(f*f+h*h)}},52816:S=>{S.exports=function(a,b){var T=a.x-b.x,g=a.y-b.y;return Math.sqrt(T*T+g*g)}},64559:S=>{S.exports=function(a,b){var T=a.x-b.x,g=a.y-b.y;return T*T+g*g}},82340:S=>{S.exports=function(a,b,T,g){return Math.max(Math.abs(a-T),Math.abs(b-g))}},14390:S=>{S.exports=function(a,b,T,g,f){return void 0===f&&(f=2),Math.sqrt(Math.pow(T-a,f)+Math.pow(g-b,f))}},2243:S=>{S.exports=function(a,b,T,g){return Math.abs(a-T)+Math.abs(b-g)}},89774:S=>{S.exports=function(a,b,T,g){var f=a-T,h=b-g;return f*f+h*h}},50994:(S,k,a)=>{S.exports={Between:a(20339),BetweenPoints:a(52816),BetweenPointsSquared:a(64559),Chebyshev:a(82340),Power:a(14390),Snake:a(2243),Squared:a(89774)}},62640:(S,k,a)=>{var b=a(54178),T=a(41521),g=a(79980),f=a(85433),h=a(99140),c=a(48857),u=a(81596),m=a(59133),d=a(98516),p=a(35248),v=a(82500),x=a(49752);S.exports={Power0:u,Power1:m.Out,Power2:f.Out,Power3:d.Out,Power4:p.Out,Linear:u,Quad:m.Out,Cubic:f.Out,Quart:d.Out,Quint:p.Out,Sine:v.Out,Expo:c.Out,Circ:g.Out,Elastic:h.Out,Back:b.Out,Bounce:T.Out,Stepped:x,"Quad.easeIn":m.In,"Cubic.easeIn":f.In,"Quart.easeIn":d.In,"Quint.easeIn":p.In,"Sine.easeIn":v.In,"Expo.easeIn":c.In,"Circ.easeIn":g.In,"Elastic.easeIn":h.In,"Back.easeIn":b.In,"Bounce.easeIn":T.In,"Quad.easeOut":m.Out,"Cubic.easeOut":f.Out,"Quart.easeOut":d.Out,"Quint.easeOut":p.Out,"Sine.easeOut":v.Out,"Expo.easeOut":c.Out,"Circ.easeOut":g.Out,"Elastic.easeOut":h.Out,"Back.easeOut":b.Out,"Bounce.easeOut":T.Out,"Quad.easeInOut":m.InOut,"Cubic.easeInOut":f.InOut,"Quart.easeInOut":d.InOut,"Quint.easeInOut":p.InOut,"Sine.easeInOut":v.InOut,"Expo.easeInOut":c.InOut,"Circ.easeInOut":g.InOut,"Elastic.easeInOut":h.InOut,"Back.easeInOut":b.InOut,"Bounce.easeInOut":T.InOut}},1639:S=>{S.exports=function(a,b){return void 0===b&&(b=1.70158),a*a*((b+1)*a-b)}},50099:S=>{S.exports=function(a,b){void 0===b&&(b=1.70158);var T=1.525*b;return(a*=2)<1?a*a*((T+1)*a-T)*.5:.5*((a-=2)*a*((T+1)*a+T)+2)}},41286:S=>{S.exports=function(a,b){return void 0===b&&(b=1.70158),--a*a*((b+1)*a+b)+1}},54178:(S,k,a)=>{S.exports={In:a(1639),Out:a(41286),InOut:a(50099)}},59590:S=>{S.exports=function(a){return(a=1-a)<.36363636363636365?1-7.5625*a*a:a<.7272727272727273?1-(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?1-(7.5625*(a-=.8181818181818182)*a+.9375):1-(7.5625*(a-=.9545454545454546)*a+.984375)}},41788:S=>{S.exports=function(a){var b=!1;return a<.5?(a=1-2*a,b=!0):a=2*a-1,a<.36363636363636365?a*=7.5625*a:a=a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375,b?.5*(1-a):.5*a+.5}},69905:S=>{S.exports=function(a){return a<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375}},41521:(S,k,a)=>{S.exports={In:a(59590),Out:a(69905),InOut:a(41788)}},91861:S=>{S.exports=function(a){return 1-Math.sqrt(1-a*a)}},4177:S=>{S.exports=function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},57512:S=>{S.exports=function(a){return Math.sqrt(1- --a*a)}},79980:(S,k,a)=>{S.exports={In:a(91861),Out:a(57512),InOut:a(4177)}},51150:S=>{S.exports=function(a){return a*a*a}},82820:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a:.5*((a-=2)*a*a+2)}},35033:S=>{S.exports=function(a){return--a*a*a+1}},85433:(S,k,a)=>{S.exports={In:a(51150),Out:a(35033),InOut:a(82820)}},69965:S=>{S.exports=function(a,b,T){if(void 0===b&&(b=.1),void 0===T&&(T=.1),0===a)return 0;if(1===a)return 1;var g=T/4;return b<1?b=1:g=T*Math.asin(1/b)/(2*Math.PI),-b*Math.pow(2,10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/T)}},50665:S=>{S.exports=function(a,b,T){if(void 0===b&&(b=.1),void 0===T&&(T=.1),0===a)return 0;if(1===a)return 1;var g=T/4;return b<1?b=1:g=T*Math.asin(1/b)/(2*Math.PI),(a*=2)<1?b*Math.pow(2,10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/T)*-.5:b*Math.pow(2,-10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/T)*.5+1}},7744:S=>{S.exports=function(a,b,T){if(void 0===b&&(b=.1),void 0===T&&(T=.1),0===a)return 0;if(1===a)return 1;var g=T/4;return b<1?b=1:g=T*Math.asin(1/b)/(2*Math.PI),b*Math.pow(2,-10*a)*Math.sin((a-g)*(2*Math.PI)/T)+1}},99140:(S,k,a)=>{S.exports={In:a(69965),Out:a(7744),InOut:a(50665)}},24590:S=>{S.exports=function(a){return Math.pow(2,10*(a-1))-.001}},87844:S=>{S.exports=function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))}},89433:S=>{S.exports=function(a){return 1-Math.pow(2,-10*a)}},48857:(S,k,a)=>{S.exports={In:a(24590),Out:a(89433),InOut:a(87844)}},48820:(S,k,a)=>{S.exports={Back:a(54178),Bounce:a(41521),Circular:a(79980),Cubic:a(85433),Elastic:a(99140),Expo:a(48857),Linear:a(81596),Quadratic:a(59133),Quartic:a(98516),Quintic:a(35248),Sine:a(82500),Stepped:a(49752)}},7147:S=>{S.exports=function(a){return a}},81596:(S,k,a)=>{S.exports=a(7147)},34826:S=>{S.exports=function(a){return a*a}},20544:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a:-.5*(--a*(a-2)-1)}},92029:S=>{S.exports=function(a){return a*(2-a)}},59133:(S,k,a)=>{S.exports={In:a(34826),Out:a(92029),InOut:a(20544)}},64413:S=>{S.exports=function(a){return a*a*a*a}},78137:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},45840:S=>{S.exports=function(a){return 1- --a*a*a*a}},98516:(S,k,a)=>{S.exports={In:a(64413),Out:a(45840),InOut:a(78137)}},87745:S=>{S.exports=function(a){return a*a*a*a*a}},16509:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},17868:S=>{S.exports=function(a){return--a*a*a*a*a+1}},35248:(S,k,a)=>{S.exports={In:a(87745),Out:a(17868),InOut:a(16509)}},80461:S=>{S.exports=function(a){return 0===a?0:1===a?1:1-Math.cos(a*Math.PI/2)}},34025:S=>{S.exports=function(a){return 0===a?0:1===a?1:.5*(1-Math.cos(Math.PI*a))}},52768:S=>{S.exports=function(a){return 0===a?0:1===a?1:Math.sin(a*Math.PI/2)}},82500:(S,k,a)=>{S.exports={In:a(80461),Out:a(52768),InOut:a(34025)}},72251:S=>{S.exports=function(a,b){return void 0===b&&(b=1),a<=0?0:a>=1?1:1/b*(1+(b*a|0))}},49752:(S,k,a)=>{S.exports=a(72251)},75698:S=>{S.exports=function(a,b){return void 0===b&&(b=1e-4),Math.ceil(a-b)}},43855:S=>{S.exports=function(a,b,T){return void 0===T&&(T=1e-4),Math.abs(a-b){S.exports=function(a,b){return void 0===b&&(b=1e-4),Math.floor(a+b)}},5470:S=>{S.exports=function(a,b,T){return void 0===T&&(T=1e-4),a>b-T}},94977:S=>{S.exports=function(a,b,T){return void 0===T&&(T=1e-4),a{S.exports={Ceil:a(75698),Equal:a(43855),Floor:a(25777),GreaterThan:a(5470),LessThan:a(94977)}},75508:(S,k,a)=>{var b=a(36383),T=a(79291),g={Angle:a(25588),Distance:a(50994),Easing:a(48820),Fuzzy:a(48379),Interpolation:a(38289),Pow2:a(49001),Snap:a(73697),RandomDataGenerator:a(28453),Average:a(53307),Bernstein:a(85710),Between:a(30976),CatmullRom:a(87842),CeilTo:a(26302),Clamp:a(45319),DegToRad:a(39506),Difference:a(61241),Euler:a(38857),Factorial:a(6411),FloatBetween:a(99472),FloorTo:a(77623),FromPercent:a(62945),GetSpeed:a(38265),IsEven:a(78702),IsEvenStrict:a(94883),Linear:a(28915),LinearXY:a(94908),MaxAdd:a(86883),Median:a(50040),MinSub:a(37204),Percent:a(65201),RadToDeg:a(43396),RandomXY:a(74362),RandomXYZ:a(60706),RandomXYZW:a(67421),Rotate:a(36305),RotateAround:a(11520),RotateAroundDistance:a(1163),RotateTo:a(70336),RoundAwayFromZero:a(2284),RoundTo:a(41013),SinCosTableGenerator:a(16922),SmootherStep:a(54261),SmoothStep:a(7602),ToXY:a(44408),TransformXY:a(85955),Within:a(60417),Wrap:a(15994),Vector2:a(26099),Vector3:a(25836),Vector4:a(61369),Matrix3:a(94434),Matrix4:a(37867),Quaternion:a(15746),RotateVec3:a(72678)};g=T(!1,g,b),S.exports=g},89318:(S,k,a)=>{var b=a(85710);S.exports=function(g,f){for(var h=0,c=g.length-1,u=0;u<=c;u++)h+=Math.pow(1-f,c-u)*Math.pow(f,u)*g[u]*b(c,u);return h}},77259:(S,k,a)=>{var b=a(87842);S.exports=function(g,f){var h=g.length-1,c=h*f,u=Math.floor(c);return g[0]===g[h]?(f<0&&(u=Math.floor(c=h*(1+f))),b(c-u,g[(u-1+h)%h],g[u],g[(u+1)%h],g[(u+2)%h])):f<0?g[0]-(b(-c,g[0],g[0],g[1],g[1])-g[0]):f>1?g[h]-(b(c-h,g[h],g[h],g[h-1],g[h-1])-g[h]):b(c-u,g[u?u-1:0],g[u],g[h{S.exports=function(f,h,c,u,m){return function k(f,h){var c=1-f;return c*c*c*h}(f,h)+function a(f,h){var c=1-f;return 3*c*c*f*h}(f,c)+function b(f,h){return 3*(1-f)*f*f*h}(f,u)+function T(f,h){return f*f*f*h}(f,m)}},28392:(S,k,a)=>{var b=a(28915);S.exports=function(g,f){var h=g.length-1,c=h*f,u=Math.floor(c);return f<0?b(g[0],g[1],c):f>1?b(g[h],g[h-1],h-c):b(g[u],g[u+1>h?h:u+1],c-u)}},32112:S=>{S.exports=function(g,f,h,c){return function k(g,f){var h=1-g;return h*h*f}(g,f)+function a(g,f){return 2*(1-g)*g*f}(g,h)+function b(g,f){return g*g*f}(g,c)}},47235:(S,k,a)=>{var b=a(7602);S.exports=function(g,f,h){return f+(h-f)*b(g,0,1)}},50178:(S,k,a)=>{var b=a(54261);S.exports=function(g,f,h){return f+(h-f)*b(g,0,1)}},38289:(S,k,a)=>{S.exports={Bezier:a(89318),CatmullRom:a(77259),CubicBezier:a(36316),Linear:a(28392),QuadraticBezier:a(32112),SmoothStep:a(47235),SmootherStep:a(50178)}},98439:S=>{S.exports=function(a){var b=Math.log(a)/.6931471805599453;return 1<{S.exports=function(a,b){return a>0&&!(a&a-1)&&b>0&&!(b&b-1)}},81230:S=>{S.exports=function(a){return a>0&&!(a&a-1)}},49001:(S,k,a)=>{S.exports={GetNext:a(98439),IsSize:a(50030),IsValue:a(81230)}},28453:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){void 0===f&&(f=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],f&&this.init(f)},rnd:function(){var g=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|g,this.s0=this.s1,this.s1=this.s2,this.s2=g-this.c,this.s2},hash:function(g){var f,h=this.n;g=g.toString();for(var c=0;c>>0,h=(f*=h)>>>0,h+=4294967296*(f-=h);return this.n=h,2.3283064365386963e-10*(h>>>0)},init:function(g){"string"==typeof g?this.state(g):this.sow(g)},sow:function(g){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,g)for(var f=0;f0;h--){var c=Math.floor(this.frac()*(h+1)),u=g[c];g[c]=g[h],g[h]=u}return g}});S.exports=T},63448:S=>{S.exports=function(a,b,T,g){return void 0===T&&(T=0),0===b?a:(a-=T,a=b*Math.ceil(a/b),g?(T+a)/b:T+a)}},56583:S=>{S.exports=function(a,b,T,g){return void 0===T&&(T=0),0===b?a:(a-=T,a=b*Math.floor(a/b),g?(T+a)/b:T+a)}},77720:S=>{S.exports=function(a,b,T,g){return void 0===T&&(T=0),0===b?a:(a-=T,a=b*Math.round(a/b),g?(T+a)/b:T+a)}},73697:(S,k,a)=>{S.exports={Ceil:a(63448),Floor:a(56583),To:a(77720)}},85454:(S,k,a)=>{a(63595);var b=a(8054),T=a(79291),g={Actions:a(61061),Animations:a(60421),BlendModes:a(10312),Cache:a(83388),Cameras:a(26638),Core:a(42857),Class:a(83419),Create:a(15822),Curves:a(25410),Data:a(44965),Display:a(27460),DOM:a(84902),Events:a(93055),FX:a(66064),Game:a(50127),GameObjects:a(77856),Geom:a(55738),Input:a(14350),Loader:a(57777),Math:a(75508),Physics:a(44563),Plugins:a(18922),Renderer:a(36909),Scale:a(93364),ScaleModes:a(29795),Scene:a(97482),Scenes:a(62194),Structs:a(41392),Textures:a(27458),Tilemaps:a(62501),Time:a(90291),Tweens:a(43066),Utils:a(91799)};g.Sound=a(23717),g=T(!1,g,b),S.exports=g,a.g.Phaser=g},71289:(S,k,a)=>{var b=a(83419),T=a(92209),g=a(88571),f=new b({Extends:g,Mixins:[T.Acceleration,T.Angular,T.Bounce,T.Collision,T.Debug,T.Drag,T.Enable,T.Friction,T.Gravity,T.Immovable,T.Mass,T.Pushable,T.Size,T.Velocity],initialize:function(c,u,m,d,p){g.call(this,c,u,m,d,p),this.body=null}});S.exports=f},86689:(S,k,a)=>{var b=a(83419),T=a(39506),g=a(20339),f=a(89774),h=a(66022),c=a(95540),u=a(46975),m=a(72441),d=a(47956),p=a(37277),v=a(44594),x=a(26099),y=a(82248),_=new b({initialize:function(A){this.scene=A,this.systems=A.sys,this.config=this.getConfig(),this._category=1,A.sys.events.once(v.BOOT,this.boot,this),A.sys.events.on(v.START,this.start,this)},boot:function(){this.world=new y(this.scene,this.config),this.add=new h(this.world),this.systems.events.once(v.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new y(this.scene,this.config),this.add=new h(this.world));var E=this.systems.events;c(this.config,"customUpdate",!1)||E.on(v.UPDATE,this.world.update,this.world),E.on(v.POST_UPDATE,this.world.postUpdate,this.world),E.once(v.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(v.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(v.UPDATE,this.world.update,this.world)},getConfig:function(){var E=this.systems.game.config.physics;return u(c(this.systems.settings.physics,"arcade",{}),c(E,"arcade",{}))},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(E,A,D,I,R){return void 0===D&&(D=null),void 0===I&&(I=null),void 0===R&&(R=D),this.world.collideObjects(E,A,D,I,R,!0)},collide:function(E,A,D,I,R){return void 0===D&&(D=null),void 0===I&&(I=null),void 0===R&&(R=D),this.world.collideObjects(E,A,D,I,R,!1)},collideTiles:function(E,A,D,I,R){return this.world.collideTiles(E,A,D,I,R)},overlapTiles:function(E,A,D,I,R){return this.world.overlapTiles(E,A,D,I,R)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(E,A,D,I,R,F){void 0===I&&(I=60);var N=Math.atan2(D-E.y,A-E.x);return E.body.acceleration.setToPolar(N,I),void 0!==R&&void 0!==F&&E.body.maxVelocity.set(R,F),N},accelerateToObject:function(E,A,D,I,R){return this.accelerateTo(E,A.x,A.y,D,I,R)},closest:function(E,A){A||(A=this.world.bodies.entries);for(var D=Number.MAX_VALUE,I=null,R=E.x,F=E.y,N=A.length,V=0;VD&&(I=B,D=Q)}}return I},moveTo:function(E,A,D,I,R){void 0===I&&(I=60),void 0===R&&(R=0);var F=Math.atan2(D-E.y,A-E.x);return R>0&&(I=g(E.x,E.y,A,D)/(R/1e3)),E.body.velocity.setToPolar(F,I),F},moveToObject:function(E,A,D,I){return this.moveTo(E,A.x,A.y,D,I)},velocityFromAngle:function(E,A,D){return void 0===A&&(A=60),void 0===D&&(D=new x),D.setToPolar(T(E),A)},velocityFromRotation:function(E,A,D){return void 0===A&&(A=60),void 0===D&&(D=new x),D.setToPolar(E,A)},overlapRect:function(E,A,D,I,R,F){return d(this.world,E,A,D,I,R,F)},overlapCirc:function(E,A,D,I,R){return m(this.world,E,A,D,I,R)},shutdown:function(){if(this.world){var E=this.systems.events;E.off(v.UPDATE,this.world.update,this.world),E.off(v.POST_UPDATE,this.world.postUpdate,this.world),E.off(v.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(v.START,this.start,this),this.scene=null,this.systems=null}});p.register("ArcadePhysics",_,"arcadePhysics"),S.exports=_},13759:(S,k,a)=>{var b=a(83419),T=a(92209),g=a(68287),f=new b({Extends:g,Mixins:[T.Acceleration,T.Angular,T.Bounce,T.Collision,T.Debug,T.Drag,T.Enable,T.Friction,T.Gravity,T.Immovable,T.Mass,T.Pushable,T.Size,T.Velocity],initialize:function(c,u,m,d,p){g.call(this,c,u,m,d,p),this.body=null}});S.exports=f},37742:(S,k,a)=>{var b=a(83419),T=a(78389),g=a(37747),f=a(63012),h=a(43396),c=a(87841),u=a(37303),m=a(95829),d=a(26099),p=new b({Mixins:[T],initialize:function(x,y){var _=64,E=64,D=void 0!==y;D&&y.displayWidth&&(_=y.displayWidth,E=y.displayHeight),D||(y={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=x,this.gameObject=D?y:void 0,this.isBody=!0,this.transform={x:y.x,y:y.y,rotation:y.angle,scaleX:y.scaleX,scaleY:y.scaleY,displayOriginX:y.displayOriginX,displayOriginY:y.displayOriginY},this.debugShowBody=x.defaults.debugShowBody,this.debugShowVelocity=x.defaults.debugShowVelocity,this.debugBodyColor=x.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new d,this.position=new d(y.x-y.scaleX*y.displayOriginX,y.y-y.scaleY*y.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=y.angle,this.preRotation=y.angle,this.width=_,this.height=E,this.sourceWidth=_,this.sourceHeight=E,y.frame&&(this.sourceWidth=y.frame.realWidth,this.sourceHeight=y.frame.realHeight),this.halfWidth=Math.abs(_/2),this.halfHeight=Math.abs(E/2),this.center=new d(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new d,this.newVelocity=new d,this.deltaMax=new d,this.acceleration=new d,this.allowDrag=!0,this.drag=new d,this.allowGravity=!0,this.gravity=new d,this.bounce=new d,this.worldBounce=null,this.customBoundsRectangle=x.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new d(1e4,1e4),this.maxSpeed=-1,this.friction=new d(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=g.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new d(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=m(!1),this.touching=m(!0),this.wasTouching=m(!0),this.blocked=m(!0),this.syncBounds=!1,this.physicsType=g.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=y.scaleX,this._sy=y.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new c,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var v=this.gameObject,x=this.transform;if(v.parentContainer){var y=v.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);x.x=y.tx,x.y=y.ty,x.rotation=h(y.rotation),x.scaleX=y.scaleX,x.scaleY=y.scaleY,x.displayOriginX=v.displayOriginX,x.displayOriginY=v.displayOriginY}else x.x=v.x,x.y=v.y,x.rotation=v.angle,x.scaleX=v.scaleX,x.scaleY=v.scaleY,x.displayOriginX=v.displayOriginX,x.displayOriginY=v.displayOriginY;var _=!1;if(this.syncBounds){var E=v.getBounds(this._bounds);this.width=E.width,this.height=E.height,_=!0}else{var A=Math.abs(x.scaleX),D=Math.abs(x.scaleY);(this._sx!==A||this._sy!==D)&&(this.width=this.sourceWidth*A,this.height=this.sourceHeight*D,this._sx=A,this._sy=D,_=!0)}_&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var v=this.transform;this.position.x=v.x+v.scaleX*(this.offset.x-v.displayOriginX),this.position.y=v.y+v.scaleY*(this.offset.y-v.displayOriginY),this.updateCenter()},resetFlags:function(v){void 0===v&&(v=!1);var x=this.wasTouching,y=this.touching,_=this.blocked;v?m(!0,x):(x.none=y.none,x.up=y.up,x.down=y.down,x.left=y.left,x.right=y.right),m(!0,y),m(!0,_),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(v,x){if(v&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var y=this.position;this.prev.x=y.x,this.prev.y=y.y,this.prevFrame.x=y.x,this.prevFrame.y=y.y}v&&this.update(x)},update:function(v){var x=this.prev,y=this.position,_=this.velocity;if(x.set(y.x,y.y),!this.moves)return this._dx=y.x-x.x,void(this._dy=y.y-x.y);if(this.directControl){var E=this.autoFrame;_.set((y.x-E.x)/v,(y.y-E.y)/v),this.world.updateMotion(this,v),this._dx=y.x-E.x,this._dy=y.y-E.y}else this.world.updateMotion(this,v),this.newVelocity.set(_.x*v,_.y*v),y.add(this.newVelocity),this._dx=y.x-x.x,this._dy=y.y-x.y;var A=_.x,D=_.y;if(this.updateCenter(),this.angle=Math.atan2(D,A),this.speed=Math.sqrt(A*A+D*D),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var I=this.blocked;this.world.emit(f.WORLD_BOUNDS,this,I.up,I.down,I.left,I.right)}},postUpdate:function(){var v=this.position,x=v.x-this.prevFrame.x,y=v.y-this.prevFrame.y,_=this.gameObject;if(this.moves){var E=this.deltaMax.x,A=this.deltaMax.y;0!==E&&0!==x&&(x<0&&x<-E?x=-E:x>0&&x>E&&(x=E)),0!==A&&0!==y&&(y<0&&y<-A?y=-A:y>0&&y>A&&(y=A)),_&&(_.x+=x,_.y+=y)}x<0?this.facing=g.FACING_LEFT:x>0&&(this.facing=g.FACING_RIGHT),y<0?this.facing=g.FACING_UP:y>0&&(this.facing=g.FACING_DOWN),this.allowRotation&&_&&(_.angle+=this.deltaZ()),this._tx=x,this._ty=y,this.autoFrame.set(v.x,v.y)},setBoundsRectangle:function(v){return this.customBoundsRectangle=v||this.world.bounds,this},checkWorldBounds:function(){var v=this.position,x=this.velocity,y=this.blocked,_=this.customBoundsRectangle,E=this.world.checkCollision,A=this.worldBounce?-this.worldBounce.x:-this.bounce.x,D=this.worldBounce?-this.worldBounce.y:-this.bounce.y,I=!1;return v.x<_.x&&E.left?(v.x=_.x,x.x*=A,y.left=!0,I=!0):this.right>_.right&&E.right&&(v.x=_.right-this.width,x.x*=A,y.right=!0,I=!0),v.y<_.y&&E.up?(v.y=_.y,x.y*=D,y.up=!0,I=!0):this.bottom>_.bottom&&E.down&&(v.y=_.bottom-this.height,x.y*=D,y.down=!0,I=!0),I&&(this.blocked.none=!1,this.updateCenter()),I},setOffset:function(v,x){return void 0===x&&(x=v),this.offset.set(v,x),this},setGameObject:function(v,x){return void 0===x&&(x=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=v,v.body&&(v.body=this),this.setSize(),this.world.add(this),this.enable=x,this},setSize:function(v,x,y){void 0===y&&(y=!0);var _=this.gameObject;return _&&(!v&&_.frame&&(v=_.frame.realWidth),!x&&_.frame&&(x=_.frame.realHeight)),this.sourceWidth=v,this.sourceHeight=x,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),y&&_&&_.getCenter&&this.offset.set((_.width-v)/2,(_.height-x)/2),this.isCircle=!1,this.radius=0,this},setCircle:function(v,x,y){return void 0===x&&(x=this.offset.x),void 0===y&&(y=this.offset.y),v>0?(this.isCircle=!0,this.radius=v,this.sourceWidth=2*v,this.sourceHeight=2*v,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(x,y),this.updateCenter()):this.isCircle=!1,this},reset:function(v,x){this.stop();var y=this.gameObject;y&&(y.setPosition(v,x),this.rotation=y.angle,this.preRotation=y.angle);var _=this.position;y&&y.getTopLeft?y.getTopLeft(_):_.set(v,x),this.prev.copy(_),this.prevFrame.copy(_),this.autoFrame.copy(_),y&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(v){return v.x=this.x,v.y=this.y,v.right=this.right,v.bottom=this.bottom,v},hitTest:function(v,x){return this.isCircle?this.radius>0&&v>=this.left&&v<=this.right&&x>=this.top&&x<=this.bottom&&(this.center.x-v)*(this.center.x-v)+(this.center.y-x)*(this.center.y-x)<=this.radius*this.radius:u(this,v,x)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(v){var x=this.position,y=x.x+this.halfWidth,_=x.y+this.halfHeight;this.debugShowBody&&(v.lineStyle(v.defaultStrokeWidth,this.debugBodyColor),this.isCircle?v.strokeCircle(y,_,this.width/2):(this.checkCollision.up&&v.lineBetween(x.x,x.y,x.x+this.width,x.y),this.checkCollision.right&&v.lineBetween(x.x+this.width,x.y,x.x+this.width,x.y+this.height),this.checkCollision.down&&v.lineBetween(x.x,x.y+this.height,x.x+this.width,x.y+this.height),this.checkCollision.left&&v.lineBetween(x.x,x.y,x.x,x.y+this.height))),this.debugShowVelocity&&(v.lineStyle(v.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),v.lineBetween(y,_,y+this.velocity.x/2,_+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(v){return void 0===v&&(v=!0),this.directControl=v,this},setCollideWorldBounds:function(v,x,y,_){void 0===v&&(v=!0),this.collideWorldBounds=v;var E=void 0!==x,A=void 0!==y;return(E||A)&&(this.worldBounce||(this.worldBounce=new d),E&&(this.worldBounce.x=x),A&&(this.worldBounce.y=y)),void 0!==_&&(this.onWorldBounds=_),this},setVelocity:function(v,x){return this.velocity.set(v,x),v=this.velocity.x,x=this.velocity.y,this.speed=Math.sqrt(v*v+x*x),this},setVelocityX:function(v){return this.setVelocity(v,this.velocity.y)},setVelocityY:function(v){return this.setVelocity(this.velocity.x,v)},setMaxVelocity:function(v,x){return this.maxVelocity.set(v,x),this},setMaxVelocityX:function(v){return this.maxVelocity.x=v,this},setMaxVelocityY:function(v){return this.maxVelocity.y=v,this},setMaxSpeed:function(v){return this.maxSpeed=v,this},setSlideFactor:function(v,x){return this.slideFactor.set(v,x),this},setBounce:function(v,x){return this.bounce.set(v,x),this},setBounceX:function(v){return this.bounce.x=v,this},setBounceY:function(v){return this.bounce.y=v,this},setAcceleration:function(v,x){return this.acceleration.set(v,x),this},setAccelerationX:function(v){return this.acceleration.x=v,this},setAccelerationY:function(v){return this.acceleration.y=v,this},setAllowDrag:function(v){return void 0===v&&(v=!0),this.allowDrag=v,this},setAllowGravity:function(v){return void 0===v&&(v=!0),this.allowGravity=v,this},setAllowRotation:function(v){return void 0===v&&(v=!0),this.allowRotation=v,this},setDrag:function(v,x){return this.drag.set(v,x),this},setDamping:function(v){return this.useDamping=v,this},setDragX:function(v){return this.drag.x=v,this},setDragY:function(v){return this.drag.y=v,this},setGravity:function(v,x){return this.gravity.set(v,x),this},setGravityX:function(v){return this.gravity.x=v,this},setGravityY:function(v){return this.gravity.y=v,this},setFriction:function(v,x){return this.friction.set(v,x),this},setFrictionX:function(v){return this.friction.x=v,this},setFrictionY:function(v){return this.friction.y=v,this},setAngularVelocity:function(v){return this.angularVelocity=v,this},setAngularAcceleration:function(v){return this.angularAcceleration=v,this},setAngularDrag:function(v){return this.angularDrag=v,this},setMass:function(v){return this.mass=v,this},setImmovable:function(v){return void 0===v&&(v=!0),this.immovable=v,this},setEnable:function(v){return void 0===v&&(v=!0),this.enable=v,this},processX:function(v,x,y,_){this.x+=v,this.updateCenter(),null!==x&&(this.velocity.x=x*this.slideFactor.x);var E=this.blocked;y&&(E.left=!0,E.none=!1),_&&(E.right=!0,E.none=!1)},processY:function(v,x,y,_){this.y+=v,this.updateCenter(),null!==x&&(this.velocity.y=x*this.slideFactor.y);var E=this.blocked;y&&(E.up=!0,E.none=!1),_&&(E.down=!0,E.none=!1)},x:{get:function(){return this.position.x},set:function(v){this.position.x=v}},y:{get:function(){return this.position.y},set:function(v){this.position.y=v}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});S.exports=p},79342:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u,m,d,p){this.world=f,this.name="",this.active=!0,this.overlapOnly=h,this.object1=c,this.object2=u,this.collideCallback=m,this.processCallback=d,this.callbackContext=p},setName:function(g){return this.name=g,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});S.exports=T},66022:(S,k,a)=>{var b=a(71289),T=a(13759),g=a(37742),f=a(83419),h=a(37747),c=a(60758),u=a(72624),m=a(71464),d=new f({initialize:function(v){this.world=v,this.scene=v.scene,this.sys=v.scene.sys},collider:function(p,v,x,y,_){return this.world.addCollider(p,v,x,y,_)},overlap:function(p,v,x,y,_){return this.world.addOverlap(p,v,x,y,_)},existing:function(p,v){return this.world.enableBody(p,v?h.STATIC_BODY:h.DYNAMIC_BODY),p},staticImage:function(p,v,x,y){var _=new b(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.world.enableBody(_,h.STATIC_BODY),_},image:function(p,v,x,y){var _=new b(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.world.enableBody(_,h.DYNAMIC_BODY),_},staticSprite:function(p,v,x,y){var _=new T(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.sys.updateList.add(_),this.world.enableBody(_,h.STATIC_BODY),_},sprite:function(p,v,x,y){var _=new T(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.sys.updateList.add(_),this.world.enableBody(_,h.DYNAMIC_BODY),_},staticGroup:function(p,v){return this.sys.updateList.add(new m(this.world,this.world.scene,p,v))},group:function(p,v){return this.sys.updateList.add(new c(this.world,this.world.scene,p,v))},body:function(p,v,x,y){var _=new g(this.world);return _.position.set(p,v),x&&y&&_.setSize(x,y),this.world.add(_,h.DYNAMIC_BODY),_},staticBody:function(p,v,x,y){var _=new u(this.world);return _.position.set(p,v),x&&y&&_.setSize(x,y),this.world.add(_,h.STATIC_BODY),_},destroy:function(){this.world=null,this.scene=null,this.sys=null}});S.exports=d},79599:S=>{S.exports=function(a){var b=0;if(Array.isArray(a))for(var T=0;T{var b=a(37747);S.exports=function(g,f,h,c){var u=0,m=g.deltaAbsX()+f.deltaAbsX()+c;return 0===g._dx&&0===f._dx?(g.embedded=!0,f.embedded=!0):g._dx>f._dx?(u=g.right-f.x)>m&&!h||!1===g.checkCollision.right||!1===f.checkCollision.left?u=0:(g.touching.none=!1,g.touching.right=!0,f.touching.none=!1,f.touching.left=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.right=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.left=!0)):g._dxm&&!h||!1===g.checkCollision.left||!1===f.checkCollision.right?u=0:(g.touching.none=!1,g.touching.left=!0,f.touching.none=!1,f.touching.right=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.left=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.right=!0))),g.overlapX=u,f.overlapX=u,u}},45170:(S,k,a)=>{var b=a(37747);S.exports=function(g,f,h,c){var u=0,m=g.deltaAbsY()+f.deltaAbsY()+c;return 0===g._dy&&0===f._dy?(g.embedded=!0,f.embedded=!0):g._dy>f._dy?(u=g.bottom-f.y)>m&&!h||!1===g.checkCollision.down||!1===f.checkCollision.up?u=0:(g.touching.none=!1,g.touching.down=!0,f.touching.none=!1,f.touching.up=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.down=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.up=!0)):g._dym&&!h||!1===g.checkCollision.up||!1===f.checkCollision.down?u=0:(g.touching.none=!1,g.touching.up=!0,f.touching.none=!1,f.touching.down=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.up=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.down=!0))),g.overlapY=u,f.overlapY=u,u}},60758:(S,k,a)=>{var b=a(13759),T=a(83419),g=a(78389),f=a(37747),h=a(95540),c=a(26479),u=a(41212),m=new T({Extends:c,Mixins:[g],initialize:function(p,v,x,y){if(x||y)if(u(x))y=x,x=null,y.internalCreateCallback=this.createCallbackHandler,y.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(x)&&u(x[0])){var _=this;x.forEach(function(E){E.internalCreateCallback=_.createCallbackHandler,E.internalRemoveCallback=_.removeCallbackHandler,E.classType=h(E,"classType",b)}),y=null}else y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=p,y&&(y.classType=h(y,"classType",b)),this.physicsType=f.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:h(y,"collideWorldBounds",!1),setBoundsRectangle:h(y,"customBoundsRectangle",null),setAccelerationX:h(y,"accelerationX",0),setAccelerationY:h(y,"accelerationY",0),setAllowDrag:h(y,"allowDrag",!0),setAllowGravity:h(y,"allowGravity",!0),setAllowRotation:h(y,"allowRotation",!0),setDamping:h(y,"useDamping",!1),setBounceX:h(y,"bounceX",0),setBounceY:h(y,"bounceY",0),setDragX:h(y,"dragX",0),setDragY:h(y,"dragY",0),setEnable:h(y,"enable",!0),setGravityX:h(y,"gravityX",0),setGravityY:h(y,"gravityY",0),setFrictionX:h(y,"frictionX",0),setFrictionY:h(y,"frictionY",0),setMaxSpeed:h(y,"maxSpeed",-1),setMaxVelocityX:h(y,"maxVelocityX",1e4),setMaxVelocityY:h(y,"maxVelocityY",1e4),setVelocityX:h(y,"velocityX",0),setVelocityY:h(y,"velocityY",0),setAngularVelocity:h(y,"angularVelocity",0),setAngularAcceleration:h(y,"angularAcceleration",0),setAngularDrag:h(y,"angularDrag",0),setMass:h(y,"mass",1),setImmovable:h(y,"immovable",!1)},c.call(this,v,x,y),this.type="PhysicsGroup"},createCallbackHandler:function(d){d.body||this.world.enableBody(d,f.DYNAMIC_BODY);var p=d.body;for(var v in this.defaults)p[v](this.defaults[v])},removeCallbackHandler:function(d){d.body&&this.world.disableBody(d)},setVelocity:function(d,p,v){void 0===v&&(v=0);for(var x=this.getChildren(),y=0;y{var k,a,b,T,g,f,h,c,u,m,d,p,v,x,y,_,E,D=function(){return m&&y&&a.blocked.right?(k.processX(-E,h,!1,!0),1):u&&_&&a.blocked.left?(k.processX(E,h,!0),1):v&&_&&k.blocked.right?(a.processX(-E,c,!1,!0),2):p&&y&&k.blocked.left?(a.processX(E,c,!0),2):0},R=function(V){if(b&&T)E*=.5,0===V||3===V?(k.processX(E,g),a.processX(-E,f)):(k.processX(-E,g),a.processX(E,f));else if(b&&!T)0===V||3===V?k.processX(E,h,!0):k.processX(-E,h,!1,!0);else if(!b&&T)0===V||3===V?a.processX(-E,c,!1,!0):a.processX(E,c,!0);else{var B=.5*E;0===V?x?(k.processX(E,0,!0),a.processX(0,null,!1,!0)):v?(k.processX(B,0,!0),a.processX(-B,0,!1,!0)):(k.processX(B,a.velocity.x,!0),a.processX(-B,null,!1,!0)):1===V?d?(k.processX(0,null,!1,!0),a.processX(E,0,!0)):m?(k.processX(-B,0,!1,!0),a.processX(B,0,!0)):(k.processX(-B,null,!1,!0),a.processX(B,k.velocity.x,!0)):2===V?x?(k.processX(-E,0,!1,!0),a.processX(0,null,!0)):p?(k.processX(-B,0,!1,!0),a.processX(B,0,!0)):(k.processX(-B,a.velocity.x,!1,!0),a.processX(B,null,!0)):3===V&&(d?(k.processX(0,null,!0),a.processX(-E,0,!1,!0)):u?(k.processX(B,0,!0),a.processX(-B,0,!1,!0)):(k.processX(B,a.velocity.y,!0),a.processX(-B,null,!1,!0)))}return!0};S.exports={BlockCheck:D,Check:function(){var V=k.velocity.x,B=a.velocity.x,H=Math.sqrt(B*B*a.mass/k.mass)*(B>0?1:-1),Q=Math.sqrt(V*V*k.mass/a.mass)*(V>0?1:-1),G=.5*(H+Q);return g=G+(H-=G)*k.bounce.x,f=G+(Q-=G)*a.bounce.x,u&&_?R(0):p&&y?R(1):m&&y?R(2):!(!v||!_)&&R(3)},Set:function(V,B,H){var Q=(k=V).velocity.x,G=(a=B).velocity.x;return b=k.pushable,u=k._dx<0,m=k._dx>0,d=0===k._dx,y=Math.abs(k.right-a.x)<=Math.abs(a.right-k.x),h=G-Q*k.bounce.x,T=a.pushable,p=a._dx<0,v=a._dx>0,x=0===a._dx,_=!y,c=Q-G*a.bounce.x,E=Math.abs(H),D()},Run:R,RunImmovableBody1:function(V){1===V?a.velocity.x=0:y?a.processX(E,c,!0):a.processX(-E,c,!1,!0),k.moves&&(a.y+=(k.directControl?k.y-k.autoFrame.y:k.y-k.prev.y)*k.friction.y,a._dy=a.y-a.prev.y)},RunImmovableBody2:function(V){2===V?k.velocity.x=0:_?k.processX(E,h,!0):k.processX(-E,h,!1,!0),a.moves&&(k.y+=(a.directControl?a.y-a.autoFrame.y:a.y-a.prev.y)*a.friction.y,k._dy=k.y-k.prev.y)}}},47962:S=>{var k,a,b,T,g,f,h,c,u,m,d,p,v,x,y,_,E,D=function(){return m&&y&&a.blocked.down?(k.processY(-E,h,!1,!0),1):u&&_&&a.blocked.up?(k.processY(E,h,!0),1):v&&_&&k.blocked.down?(a.processY(-E,c,!1,!0),2):p&&y&&k.blocked.up?(a.processY(E,c,!0),2):0},R=function(V){if(b&&T)E*=.5,0===V||3===V?(k.processY(E,g),a.processY(-E,f)):(k.processY(-E,g),a.processY(E,f));else if(b&&!T)0===V||3===V?k.processY(E,h,!0):k.processY(-E,h,!1,!0);else if(!b&&T)0===V||3===V?a.processY(-E,c,!1,!0):a.processY(E,c,!0);else{var B=.5*E;0===V?x?(k.processY(E,0,!0),a.processY(0,null,!1,!0)):v?(k.processY(B,0,!0),a.processY(-B,0,!1,!0)):(k.processY(B,a.velocity.y,!0),a.processY(-B,null,!1,!0)):1===V?d?(k.processY(0,null,!1,!0),a.processY(E,0,!0)):m?(k.processY(-B,0,!1,!0),a.processY(B,0,!0)):(k.processY(-B,null,!1,!0),a.processY(B,k.velocity.y,!0)):2===V?x?(k.processY(-E,0,!1,!0),a.processY(0,null,!0)):p?(k.processY(-B,0,!1,!0),a.processY(B,0,!0)):(k.processY(-B,a.velocity.y,!1,!0),a.processY(B,null,!0)):3===V&&(d?(k.processY(0,null,!0),a.processY(-E,0,!1,!0)):u?(k.processY(B,0,!0),a.processY(-B,0,!1,!0)):(k.processY(B,a.velocity.y,!0),a.processY(-B,null,!1,!0)))}return!0};S.exports={BlockCheck:D,Check:function(){var V=k.velocity.y,B=a.velocity.y,H=Math.sqrt(B*B*a.mass/k.mass)*(B>0?1:-1),Q=Math.sqrt(V*V*k.mass/a.mass)*(V>0?1:-1),G=.5*(H+Q);return g=G+(H-=G)*k.bounce.y,f=G+(Q-=G)*a.bounce.y,u&&_?R(0):p&&y?R(1):m&&y?R(2):!(!v||!_)&&R(3)},Set:function(V,B,H){var Q=(k=V).velocity.y,G=(a=B).velocity.y;return b=k.pushable,u=k._dy<0,m=k._dy>0,d=0===k._dy,y=Math.abs(k.bottom-a.y)<=Math.abs(a.bottom-k.y),h=G-Q*k.bounce.y,T=a.pushable,p=a._dy<0,v=a._dy>0,x=0===a._dy,_=!y,c=Q-G*a.bounce.y,E=Math.abs(H),D()},Run:R,RunImmovableBody1:function(V){1===V?a.velocity.y=0:y?a.processY(E,c,!0):a.processY(-E,c,!1,!0),k.moves&&(a.x+=(k.directControl?k.x-k.autoFrame.x:k.x-k.prev.x)*k.friction.x,a._dx=a.x-a.prev.x)},RunImmovableBody2:function(V){2===V?k.velocity.y=0:_?k.processY(E,h,!0):k.processY(-E,h,!1,!0),a.moves&&(k.x+=(a.directControl?a.x-a.autoFrame.x:a.x-a.prev.x)*a.friction.x,k._dx=k.x-k.prev.x)}}},14087:(S,k,a)=>{var b=a(64897),T=a(3017);S.exports=function(f,h,c,u,m){void 0===m&&(m=b(f,h,c,u));var d=f.immovable,p=h.immovable;if(c||0===m||d&&p||f.customSeparateX||h.customSeparateX)return 0!==m||f.embedded&&h.embedded;var v=T.Set(f,h,m);return d||p?(d?T.RunImmovableBody1(v):p&&T.RunImmovableBody2(v),!0):v>0||T.Check()}},89936:(S,k,a)=>{var b=a(45170),T=a(47962);S.exports=function(f,h,c,u,m){void 0===m&&(m=b(f,h,c,u));var d=f.immovable,p=h.immovable;if(c||0===m||d&&p||f.customSeparateY||h.customSeparateY)return 0!==m||f.embedded&&h.embedded;var v=T.Set(f,h,m);return d||p?(d?T.RunImmovableBody1(v):p&&T.RunImmovableBody2(v),!0):v>0||T.Check()}},95829:S=>{S.exports=function(a,b){return void 0===b&&(b={}),b.none=a,b.up=!1,b.down=!1,b.left=!1,b.right=!1,a||(b.up=!0,b.down=!0,b.left=!0,b.right=!0),b}},72624:(S,k,a)=>{var b=a(87902),T=a(83419),g=a(78389),f=a(37747),h=a(37303),c=a(95829),u=a(26099),m=new T({Mixins:[g],initialize:function(p,v){var x=64,y=64,E=void 0!==v;E&&v.displayWidth&&(x=v.displayWidth,y=v.displayHeight),E||(v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=p,this.gameObject=E?v:void 0,this.isBody=!0,this.debugShowBody=p.defaults.debugShowStaticBody,this.debugBodyColor=p.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(v.x-x*v.originX,v.y-y*v.originY),this.width=x,this.height=y,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new u(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=u.ZERO,this.allowGravity=!1,this.gravity=u.ZERO,this.bounce=u.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=c(!1),this.touching=c(!0),this.wasTouching=c(!0),this.blocked=c(!0),this.physicsType=f.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(d,p){return d&&d!==this.gameObject&&(this.gameObject.body=null,d.body=this,this.gameObject=d),p&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var d=this.gameObject;return d.getTopLeft(this.position),this.width=d.displayWidth,this.height=d.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(d,p){return void 0===p&&(p=d),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(d,p),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(d,p,v){void 0===v&&(v=!0);var x=this.gameObject;if(x&&x.frame&&(d||(d=x.frame.realWidth),p||(p=x.frame.realHeight)),this.world.staticTree.remove(this),this.width=d,this.height=p,this.halfWidth=Math.floor(d/2),this.halfHeight=Math.floor(p/2),v&&x&&x.getCenter){var y=x.displayWidth/2,_=x.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(y-this.halfWidth,_-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(d,p,v){return void 0===p&&(p=this.offset.x),void 0===v&&(v=this.offset.y),d>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=d,this.width=2*d,this.height=2*d,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(p,v),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(d,p){var v=this.gameObject;void 0===d&&(d=v.x),void 0===p&&(p=v.y),this.world.staticTree.remove(this),v.setPosition(d,p),v.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(d){return d.x=this.x,d.y=this.y,d.right=this.right,d.bottom=this.bottom,d},hitTest:function(d,p){return this.isCircle?b(this,d,p):h(this,d,p)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(d){var p=this.position,v=p.x+this.halfWidth,x=p.y+this.halfHeight;this.debugShowBody&&(d.lineStyle(d.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?d.strokeCircle(v,x,this.width/2):d.strokeRect(p.x,p.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(d){return d<=0&&(d=.1),this.mass=d,this},x:{get:function(){return this.position.x},set:function(d){this.world.staticTree.remove(this),this.position.x=d,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(d){this.world.staticTree.remove(this),this.position.y=d,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});S.exports=m},71464:(S,k,a)=>{var b=a(13759),T=a(83419),g=a(78389),f=a(37747),h=a(95540),c=a(26479),u=a(41212),m=new T({Extends:c,Mixins:[g],initialize:function(p,v,x,y){x||y?u(x)?(y=x,x=null,y.internalCreateCallback=this.createCallbackHandler,y.internalRemoveCallback=this.removeCallbackHandler,y.createMultipleCallback=this.createMultipleCallbackHandler,y.classType=h(y,"classType",b)):Array.isArray(x)&&u(x[0])?(y=x,x=null,y.forEach(function(_){_.internalCreateCallback=this.createCallbackHandler,_.internalRemoveCallback=this.removeCallbackHandler,_.createMultipleCallback=this.createMultipleCallbackHandler,_.classType=h(_,"classType",b)})):y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:b},this.world=p,this.physicsType=f.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,c.call(this,v,x,y),this.type="StaticPhysicsGroup"},createCallbackHandler:function(d){d.body||this.world.enableBody(d,f.STATIC_BODY)},removeCallbackHandler:function(d){d.body&&this.world.disableBody(d)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var d=this.children.entries,p=0;p{var b=a(55495),T=a(37742),g=a(45319),f=a(83419),h=a(79342),c=a(37747),u=a(20339),m=a(52816),d=a(50792),p=a(63012),v=a(43855),x=a(5470),y=a(94977),_=a(64897),E=a(45170),A=a(96523),D=a(35154),I=a(36383),R=a(25774),F=a(96602),N=a(87841),V=a(59542),B=a(40012),H=a(14087),Q=a(89936),G=a(35072),K=a(72624),q=a(2483),at=a(61340),ot=a(26099),J=a(15994),it=new f({Extends:d,initialize:function(j,nt){d.call(this),this.scene=j,this.bodies=new G,this.staticBodies=new G,this.pendingDestroy=new G,this.colliders=new R,this.gravity=new ot(D(nt,"gravity.x",0),D(nt,"gravity.y",0)),this.bounds=new N(D(nt,"x",0),D(nt,"y",0),D(nt,"width",j.sys.scale.width),D(nt,"height",j.sys.scale.height)),this.checkCollision={up:D(nt,"checkCollision.up",!0),down:D(nt,"checkCollision.down",!0),left:D(nt,"checkCollision.left",!0),right:D(nt,"checkCollision.right",!0)},this.fps=D(nt,"fps",60),this.fixedStep=D(nt,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=D(nt,"timeScale",1),this.OVERLAP_BIAS=D(nt,"overlapBias",4),this.TILE_BIAS=D(nt,"tileBias",16),this.forceX=D(nt,"forceX",!1),this.isPaused=D(nt,"isPaused",!1),this._total=0,this.drawDebug=D(nt,"debug",!1),this.defaults={debugShowBody:D(nt,"debugShowBody",!0),debugShowStaticBody:D(nt,"debugShowStaticBody",!0),debugShowVelocity:D(nt,"debugShowVelocity",!0),bodyDebugColor:D(nt,"debugBodyColor",16711935),staticBodyDebugColor:D(nt,"debugStaticBodyColor",255),velocityDebugColor:D(nt,"debugVelocityColor",65280)},this.maxEntries=D(nt,"maxEntries",16),this.useTree=D(nt,"useTree",!0),this.tree=new V(this.maxEntries),this.staticTree=new V(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new at,this._tempMatrix2=new at,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(Y,j){void 0===j&&(j=c.DYNAMIC_BODY),Array.isArray(Y)||(Y=[Y]);for(var nt=0;nt=gt;for(this.fixedStep||(ht=.001*j,Bt=!0,this._elapsed=0),nt=0;nt=gt;)this._elapsed-=gt,this.step(ht)}},step:function(Y){var j,nt,ht=this.bodies.entries,gt=ht.length;for(j=0;j0){var Yt=this.tree,$t=this.staticTree;for(ht=(nt=Bt.entries).length,Y=0;Y-1&&Y.velocity.length()>ne&&(Y.velocity.normalize().scale(ne),qt=ne),Y.speed=qt},separate:function(Y,j,nt,ht,gt){var wt,St,Bt=!1,Yt=!0;if(!Y.enable||!j.enable||Y.checkCollision.none||j.checkCollision.none||!this.intersects(Y,j)||nt&&!1===nt.call(ht,Y.gameObject||Y,j.gameObject||j))return Bt;if(Y.isCircle||j.isCircle){var $t=this.separateCircle(Y,j,gt);$t.result?(Bt=!0,Yt=!1):(wt=$t.x,St=$t.y,Yt=!0)}if(Yt){var qt=!1,ne=!1,le=this.OVERLAP_BIAS;gt?(qt=H(Y,j,gt,le,wt),ne=Q(Y,j,gt,le,St)):this.forceX||Math.abs(this.gravity.y+Y.gravity.y)ni&&(ne=u(Me,pi,ni,be)-Ie):pi>Ke&&(Me<_i?ne=u(Me,pi,_i,Ke)-Ie:Me>ni&&(ne=u(Me,pi,ni,Ke)-Ie)),ne*=-1}else ne=Y.halfWidth+j.halfWidth-m(wt,St);Y.overlapR=ne,j.overlapR=ne;var zi=b(wt,St),Cn=(ne+I.EPSILON)*Math.cos(zi),sr=(ne+I.EPSILON)*Math.sin(zi),vn={overlap:ne,result:!1,x:Cn,y:sr};if(nt&&(!le||le&&0!==ne))return vn.result=!0,vn;if(!le&&0===ne||Bt&&Yt||Y.customSeparateX||j.customSeparateX)return vn.x=void 0,vn.y=void 0,vn;var bn=!Y.pushable&&!j.pushable;if(le){var cs=wt.y-St.y,Dn=Math.sqrt(Math.pow(wt.x-St.x,2)+Math.pow(cs,2)),xr=(St.x-wt.x)/Dn||0,ts=(St.y-wt.y)/Dn||0,Hs=2*($t.x*xr+$t.y*ts-qt.x*xr-qt.y*ts)/(Y.mass+j.mass);(Bt||Yt||!Y.pushable||!j.pushable)&&(Hs*=2),!Bt&&Y.pushable&&($t.x=$t.x-Hs/Y.mass*xr,$t.y=$t.y-Hs/Y.mass*ts,$t.multiply(Y.bounce)),!Yt&&j.pushable&&(qt.x=qt.x+Hs/j.mass*xr,qt.y=qt.y+Hs/j.mass*ts,qt.multiply(j.bounce)),!Bt&&!Yt&&(Cn*=.5,sr*=.5),!Bt||Y.pushable||bn?(Y.x-=Cn,Y.y-=sr,Y.updateCenter()):(!Yt||j.pushable||bn)&&(j.x+=Cn,j.y+=sr,j.updateCenter()),vn.result=!0}else!Bt||Y.pushable||bn?(Y.x-=Cn,Y.y-=sr,Y.updateCenter()):(!Yt||j.pushable||bn)&&(j.x+=Cn,j.y+=sr,j.updateCenter()),vn.x=void 0,vn.y=void 0;return vn},intersects:function(Y,j){return Y!==j&&(Y.isCircle||j.isCircle?Y.isCircle?j.isCircle?m(Y.center,j.center)<=Y.halfWidth+j.halfWidth:this.circleBodyIntersects(Y,j):this.circleBodyIntersects(j,Y):!(Y.right<=j.left||Y.bottom<=j.top||Y.left>=j.right||Y.top>=j.bottom))},circleBodyIntersects:function(Y,j){var nt=g(Y.center.x,j.left,j.right),ht=g(Y.center.y,j.top,j.bottom);return(Y.center.x-nt)*(Y.center.x-nt)+(Y.center.y-ht)*(Y.center.y-ht)<=Y.halfWidth*Y.halfWidth},overlap:function(Y,j,nt,ht,gt){return void 0===nt&&(nt=null),void 0===ht&&(ht=null),void 0===gt&&(gt=nt),this.collideObjects(Y,j,nt,ht,gt,!0)},collide:function(Y,j,nt,ht,gt){return void 0===nt&&(nt=null),void 0===ht&&(ht=null),void 0===gt&&(gt=nt),this.collideObjects(Y,j,nt,ht,gt,!1)},collideObjects:function(Y,j,nt,ht,gt,wt){var St,Bt;Y.isParent&&(void 0===Y.physicsType||void 0===j||Y===j)&&(Y=Y.children.entries),j&&j.isParent&&void 0===j.physicsType&&(j=j.children.entries);var Yt=Array.isArray(Y),$t=Array.isArray(j);if(this._total=0,Yt||$t)if(!Yt&&$t)for(St=0;St0},collideHandler:function(Y,j,nt,ht,gt,wt){if(void 0===j&&Y.isParent)return this.collideGroupVsGroup(Y,Y,nt,ht,gt,wt);if(!Y||!j)return!1;if(Y.body||Y.isBody){if(j.body||j.isBody)return this.collideSpriteVsSprite(Y,j,nt,ht,gt,wt);if(j.isParent)return this.collideSpriteVsGroup(Y,j,nt,ht,gt,wt);if(j.isTilemap)return this.collideSpriteVsTilemapLayer(Y,j,nt,ht,gt,wt)}else if(Y.isParent){if(j.body||j.isBody)return this.collideSpriteVsGroup(j,Y,nt,ht,gt,wt);if(j.isParent)return this.collideGroupVsGroup(Y,j,nt,ht,gt,wt);if(j.isTilemap)return this.collideGroupVsTilemapLayer(Y,j,nt,ht,gt,wt)}else if(Y.isTilemap){if(j.body||j.isBody)return this.collideSpriteVsTilemapLayer(j,Y,nt,ht,gt,wt);if(j.isParent)return this.collideGroupVsTilemapLayer(j,Y,nt,ht,gt,wt)}},canCollide:function(Y,j){return Y&&j&&!!(Y.collisionMask&j.collisionCategory)&&!!(j.collisionMask&Y.collisionCategory)},collideSpriteVsSprite:function(Y,j,nt,ht,gt,wt){var St=Y.isBody?Y:Y.body,Bt=j.isBody?j:j.body;return!!this.canCollide(St,Bt)&&(this.separate(St,Bt,ht,gt,wt)&&(nt&&nt.call(gt,Y,j),this._total++),!0)},collideSpriteVsGroup:function(Y,j,nt,ht,gt,wt){var Bt,Yt,$t,St=Y.isBody?Y:Y.body;if(0!==j.getLength()&&St&&St.enable&&!St.checkCollision.none&&this.canCollide(St,j))if(this.useTree||j.physicsType===c.STATIC_BODY){var qt=this.treeMinMax;qt.minX=St.left,qt.minY=St.top,qt.maxX=St.right,qt.maxY=St.bottom;var ne=j.physicsType===c.DYNAMIC_BODY?this.tree.search(qt):this.staticTree.search(qt);for(Yt=ne.length,Bt=0;Bt{S.exports={setAcceleration:function(a,b){return this.body.acceleration.set(a,b),this},setAccelerationX:function(a){return this.body.acceleration.x=a,this},setAccelerationY:function(a){return this.body.acceleration.y=a,this}}},59023:S=>{S.exports={setAngularVelocity:function(a){return this.body.angularVelocity=a,this},setAngularAcceleration:function(a){return this.body.angularAcceleration=a,this},setAngularDrag:function(a){return this.body.angularDrag=a,this}}},62069:S=>{S.exports={setBounce:function(a,b){return this.body.bounce.set(a,b),this},setBounceX:function(a){return this.body.bounce.x=a,this},setBounceY:function(a){return this.body.bounce.y=a,this},setCollideWorldBounds:function(a,b,T,g){return this.body.setCollideWorldBounds(a,b,T,g),this}}},78389:(S,k,a)=>{var b=a(79599);S.exports={setCollisionCategory:function(g){return(this.body?this.body:this).collisionCategory=g,this},willCollideWith:function(g){return!!((this.body?this.body:this).collisionMask&g)},addCollidesWith:function(g){var f=this.body?this.body:this;return f.collisionMask=f.collisionMask|g,this},removeCollidesWith:function(g){var f=this.body?this.body:this;return f.collisionMask=f.collisionMask&~g,this},setCollidesWith:function(g){return(this.body?this.body:this).collisionMask=b(g),this},resetCollisionCategory:function(){var g=this.body?this.body:this;return g.collisionCategory=1,g.collisionMask=2147483647,this}}},87118:S=>{S.exports={setDebug:function(a,b,T){return this.debugShowBody=a,this.debugShowVelocity=b,this.debugBodyColor=T,this},setDebugBodyColor:function(a){return this.body.debugBodyColor=a,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(a){this.body.debugShowBody=a}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(a){this.body.debugShowVelocity=a}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(a){this.body.debugBodyColor=a}}}},52819:S=>{S.exports={setDrag:function(a,b){return this.body.drag.set(a,b),this},setDragX:function(a){return this.body.drag.x=a,this},setDragY:function(a){return this.body.drag.y=a,this},setDamping:function(a){return this.body.useDamping=a,this}}},4074:S=>{S.exports={setDirectControl:function(a){return this.body.setDirectControl(a),this},enableBody:function(a,b,T,g,f){return a&&this.body.reset(b,T),g&&(this.body.gameObject.active=!0),f&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(a,b){return void 0===a&&(a=!1),void 0===b&&(b=!1),this.body.stop(),this.body.enable=!1,a&&(this.body.gameObject.active=!1),b&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}}},40831:S=>{S.exports={setFriction:function(a,b){return this.body.friction.set(a,b),this},setFrictionX:function(a){return this.body.friction.x=a,this},setFrictionY:function(a){return this.body.friction.y=a,this}}},26775:S=>{S.exports={setGravity:function(a,b){return this.body.gravity.set(a,b),this},setGravityX:function(a){return this.body.gravity.x=a,this},setGravityY:function(a){return this.body.gravity.y=a,this}}},9437:S=>{S.exports={setImmovable:function(a){return void 0===a&&(a=!0),this.body.immovable=a,this}}},30621:S=>{S.exports={setMass:function(a){return this.body.mass=a,this}}},72441:(S,k,a)=>{var b=a(47956),T=a(96503),g=a(2044),f=a(81491);S.exports=function(c,u,m,d,p,v){var x=b(c,u-d,m-d,2*d,2*d,p,v);if(0===x.length)return x;for(var y=new T(u,m,d),_=new T,E=[],A=0;A{S.exports=function(a,b,T,g,f,h,c){void 0===h&&(h=!0),void 0===c&&(c=!1);var u=[],m=[],d=a.treeMinMax;if(d.minX=b,d.minY=T,d.maxX=b+g,d.maxY=T+f,c&&(m=a.staticTree.search(d)),h&&a.useTree)u=a.tree.search(d);else if(h){var v={position:{x:b,y:T},left:b,top:T,right:b+g,bottom:T+f,isCircle:!1},x=a.intersects;a.bodies.iterate(function(y){x(y,v)&&u.push(y)})}return m.concat(u)}},62121:S=>{S.exports={setPushable:function(a){return void 0===a&&(a=!0),this.body.pushable=a,this}}},29384:S=>{S.exports={setOffset:function(a,b){return this.body.setOffset(a,b),this},setSize:function(a,b,T){return this.body.setSize(a,b,T),this},setBodySize:function(a,b,T){return this.body.setSize(a,b,T),this},setCircle:function(a,b,T){return this.body.setCircle(a,b,T),this}}},15098:S=>{S.exports={setVelocity:function(a,b){return this.body.setVelocity(a,b),this},setVelocityX:function(a){return this.body.setVelocityX(a),this},setVelocityY:function(a){return this.body.setVelocityY(a),this},setMaxVelocity:function(a,b){return this.body.maxVelocity.set(a,b),this}}},92209:(S,k,a)=>{S.exports={Acceleration:a(1093),Angular:a(59023),Bounce:a(62069),Collision:a(78389),Debug:a(87118),Drag:a(52819),Enable:a(4074),Friction:a(40831),Gravity:a(26775),Immovable:a(9437),Mass:a(30621),OverlapCirc:a(72441),OverlapRect:a(47956),Pushable:a(62121),Size:a(29384),Velocity:a(15098)}},37747:S=>{S.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},20009:S=>{S.exports="collide"},36768:S=>{S.exports="overlap"},60473:S=>{S.exports="pause"},89954:S=>{S.exports="resume"},61804:S=>{S.exports="tilecollide"},7161:S=>{S.exports="tileoverlap"},34689:S=>{S.exports="worldbounds"},16006:S=>{S.exports="worldstep"},63012:(S,k,a)=>{S.exports={COLLIDE:a(20009),OVERLAP:a(36768),PAUSE:a(60473),RESUME:a(89954),TILE_COLLIDE:a(61804),TILE_OVERLAP:a(7161),WORLD_BOUNDS:a(34689),WORLD_STEP:a(16006)}},27064:(S,k,a)=>{var b=a(37747),T=a(79291),g={ArcadePhysics:a(86689),Body:a(37742),Collider:a(79342),Components:a(92209),Events:a(63012),Factory:a(66022),GetCollidesWith:a(79599),GetOverlapX:a(64897),GetOverlapY:a(45170),SeparateX:a(14087),SeparateY:a(89936),Group:a(60758),Image:a(71289),Sprite:a(13759),StaticBody:a(72624),StaticGroup:a(71464),Tilemap:a(55173),World:a(82248)};g=T(!1,g,b),S.exports=g},96602:S=>{S.exports=function(a,b){return a.collisionCallback?!a.collisionCallback.call(a.collisionCallbackContext,b,a):!a.layer.callbacks[a.index]||!a.layer.callbacks[a.index].callback.call(a.layer.callbacks[a.index].callbackContext,b,a)}},36294:S=>{S.exports=function(a,b){b<0?(a.blocked.none=!1,a.blocked.left=!0):b>0&&(a.blocked.none=!1,a.blocked.right=!0),a.position.x-=b,a.updateCenter(),a.velocity.x=0===a.bounce.x?0:-a.velocity.x*a.bounce.x}},67013:S=>{S.exports=function(a,b){b<0?(a.blocked.none=!1,a.blocked.up=!0):b>0&&(a.blocked.none=!1,a.blocked.down=!0),a.position.y-=b,a.updateCenter(),a.velocity.y=0===a.bounce.y?0:-a.velocity.y*a.bounce.y}},40012:(S,k,a)=>{var b=a(21329),T=a(53442),g=a(2483);S.exports=function(h,c,u,m,d,p,v){var x=m.left,y=m.top,_=m.right,E=m.bottom,A=u.faceLeft||u.faceRight,D=u.faceTop||u.faceBottom;if(v||(A=!0,D=!0),!A&&!D)return!1;var I=0,R=0,F=0,N=1;if(c.deltaAbsX()>c.deltaAbsY()?F=-1:c.deltaAbsX(){var b=a(36294);S.exports=function(g,f,h,c,u,m){var d=0,p=f.faceLeft,v=f.faceRight,x=f.collideLeft,y=f.collideRight;return m||(p=!0,v=!0,x=!0,y=!0),g.deltaX()<0&&y&&g.checkCollision.left?v&&g.x0&&x&&g.checkCollision.right&&p&&g.right>h&&(d=g.right-h)>u&&(d=0),0!==d&&(g.customSeparateX?g.overlapX=d:b(g,d)),d}},53442:(S,k,a)=>{var b=a(67013);S.exports=function(g,f,h,c,u,m){var d=0,p=f.faceTop,v=f.faceBottom,x=f.collideUp,y=f.collideDown;return m||(p=!0,v=!0,x=!0,y=!0),g.deltaY()<0&&y&&g.checkCollision.up?v&&g.y0&&x&&g.checkCollision.down&&p&&g.bottom>h&&(d=g.bottom-h)>u&&(d=0),0!==d&&(g.customSeparateY?g.overlapY=d:b(g,d)),d}},2483:S=>{S.exports=function(a,b){return!(b.right<=a.left||b.bottom<=a.top||b.position.x>=a.right||b.position.y>=a.bottom)}},55173:(S,k,a)=>{var b={ProcessTileCallbacks:a(96602),ProcessTileSeparationX:a(36294),ProcessTileSeparationY:a(67013),SeparateTile:a(40012),TileCheckX:a(21329),TileCheckY:a(53442),TileIntersectsBody:a(2483)};S.exports=b},44563:(S,k,a)=>{S.exports={Arcade:a(27064),Matter:a(3875)}},68174:(S,k,a)=>{var b=a(83419),T=a(26099),g=new b({initialize:function(){this.boundsCenter=new T,this.centerDiff=new T},parseBody:function(f){if(!(f=f.hasOwnProperty("body")?f.body:f).hasOwnProperty("bounds")||!f.hasOwnProperty("centerOfMass"))return!1;var h=this.boundsCenter,c=this.centerDiff,u=f.bounds.max.x-f.bounds.min.x,m=f.bounds.max.y-f.bounds.min.y,d=u*f.centerOfMass.x,p=m*f.centerOfMass.y;return h.set(u/2,m/2),c.set(d-h.x,p-h.y),!0},getTopLeft:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h+u.x+m.x,c+u.y+m.y)}return!1},getTopCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h+m.x,c+this.boundsCenter.y+m.y)}return!1},getTopRight:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h-(u.x-m.x),c+u.y+m.y)}return!1},getLeftCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h+this.boundsCenter.x+m.x,c+m.y)}return!1},getCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.centerDiff;return new T(h+u.x,c+u.y)}return!1},getRightCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h-(this.boundsCenter.x-m.x),c+m.y)}return!1},getBottomLeft:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h+u.x+m.x,c-(u.y-m.y))}return!1},getBottomCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h+m.x,c-(this.boundsCenter.y-m.y))}return!1},getBottomRight:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h-(u.x-m.x),c-(u.y-m.y))}return!1}});S.exports=g},19933:(S,k,a)=>{var b=a(6790);b.Body=a(22562),b.Composite=a(69351),b.World=a(4372),b.Collision=a(52284),b.Detector=a(81388),b.Pairs=a(99561),b.Pair=a(4506),b.Query=a(73296),b.Resolver=a(66272),b.Constraint=a(48140),b.Common=a(53402),b.Engine=a(48413),b.Events=a(35810),b.Sleeping=a(53614),b.Plugin=a(73832),b.Bodies=a(66280),b.Composites=a(74116),b.Axes=a(66615),b.Bounds=a(15647),b.Svg=a(74058),b.Vector=a(31725),b.Vertices=a(41598),b.World.add=b.Composite.add,b.World.remove=b.Composite.remove,b.World.addComposite=b.Composite.addComposite,b.World.addBody=b.Composite.addBody,b.World.addConstraint=b.Composite.addConstraint,b.World.clear=b.Composite.clear,S.exports=b},28137:(S,k,a)=>{var b=a(66280),T=a(83419),g=a(74116),f=a(48140),h=a(74058),c=a(75803),u=a(23181),m=a(34803),d=a(73834),p=a(19496),v=a(85791),x=a(98713),y=a(41598),_=new T({initialize:function(A){this.world=A,this.scene=A.scene,this.sys=A.scene.sys},rectangle:function(E,A,D,I,R){var F=b.rectangle(E,A,D,I,R);return this.world.add(F),F},trapezoid:function(E,A,D,I,R,F){var N=b.trapezoid(E,A,D,I,R,F);return this.world.add(N),N},circle:function(E,A,D,I,R){var F=b.circle(E,A,D,I,R);return this.world.add(F),F},polygon:function(E,A,D,I,R){var F=b.polygon(E,A,D,I,R);return this.world.add(F),F},fromVertices:function(E,A,D,I,R,F,N){"string"==typeof D&&(D=y.fromPath(D));var V=b.fromVertices(E,A,D,I,R,F,N);return this.world.add(V),V},fromPhysicsEditor:function(E,A,D,I,R){void 0===R&&(R=!0);var F=p.parseBody(E,A,D,I);return R&&!this.world.has(F)&&this.world.add(F),F},fromSVG:function(E,A,D,I,R,F){void 0===I&&(I=1),void 0===R&&(R={}),void 0===F&&(F=!0);for(var N=D.getElementsByTagName("path"),V=[],B=0;B{var b=a(31884),T=a(95540),g=a(26099);function f(c){return!!c.get&&"function"==typeof c.get||!!c.set&&"function"==typeof c.set}S.exports=function(c,u,m,d){void 0===m&&(m={}),void 0===d&&(d=!0);var p=u.x,v=u.y;if(u.body={temp:!0,position:{x:p,y:v}},[b.Bounce,b.Collision,b.Force,b.Friction,b.Gravity,b.Mass,b.Sensor,b.SetBody,b.Sleep,b.Static,b.Transform,b.Velocity].forEach(function(_){for(var E in _)f(_[E])?Object.defineProperty(u,E,{get:_[E].get,set:_[E].set}):Object.defineProperty(u,E,{value:_[E]})}),u.world=c,u._tempVec2=new g(p,v),m.hasOwnProperty("type")&&"body"===m.type)u.setExistingBody(m,d);else{var y=T(m,"shape",null);y||(y="rectangle"),m.addToWorld=d,u.setBody(y,m)}return u}},23181:(S,k,a)=>{var b=a(83419),T=a(31884),g=a(95643),f=a(95540),h=a(88571),c=a(72699),u=a(26099),m=new b({Extends:h,Mixins:[T.Bounce,T.Collision,T.Force,T.Friction,T.Gravity,T.Mass,T.Sensor,T.SetBody,T.Sleep,T.Static,T.Transform,T.Velocity,c],initialize:function(p,v,x,y,_,E){g.call(this,p.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(y,_),this.setSizeToFrame(),this.setOrigin(),this.world=p,this._tempVec2=new u(v,x);var A=f(E,"shape",null);A?this.setBody(A,E):this.setRectangle(this.width,this.height,E),this.setPosition(v,x),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=m},42045:(S,k,a)=>{var b=a(60461),T=a(66615),g=a(66280),f=a(22562),h=a(68174),c=a(15647),u=a(83419),m=a(52284),d=a(53402),p=a(69351),v=a(74116),x=a(48140),y=a(81388),_=a(20339),E=a(28137),A=a(95540),D=a(35154),I=a(46975),R=a(4506),F=a(99561),N=a(37277),V=a(73296),B=a(66272),H=a(44594),Q=a(74058),G=a(31725),K=a(41598),q=a(68243);d.setDecomp(a(55973));var at=new u({initialize:function(J){this.scene=J,this.systems=J.sys,this.config=this.getConfig(),this.body=f,this.composite=p,this.collision=m,this.detector=y,this.pair=R,this.pairs=F,this.query=V,this.resolver=B,this.constraint=x,this.bodies=g,this.composites=v,this.axes=T,this.bounds=c,this.svg=Q,this.vector=G,this.vertices=K,this.verts=K,this._tempVec2=G.create(),B._restingThresh=D(this.config,"restingThresh",4),B._restingThreshTangent=D(this.config,"restingThreshTangent",6),B._positionDampen=D(this.config,"positionDampen",.9),B._positionWarming=D(this.config,"positionWarming",.8),B._frictionNormalMultiplier=D(this.config,"frictionNormalMultiplier",5),J.sys.events.once(H.BOOT,this.boot,this),J.sys.events.on(H.START,this.start,this)},boot:function(){this.world=new q(this.scene,this.config),this.add=new E(this.world),this.bodyBounds=new h,this.systems.events.once(H.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new q(this.scene,this.config),this.add=new E(this.world));var ot=this.systems.events;ot.on(H.UPDATE,this.world.update,this.world),ot.on(H.POST_UPDATE,this.world.postUpdate,this.world),ot.once(H.SHUTDOWN,this.shutdown,this)},getConfig:function(){var ot=this.systems.game.config.physics;return I(A(this.systems.settings.physics,"matter",{}),A(ot,"matter",{}))},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(ot,J){this.world.step(ot,J)},containsPoint:function(ot,J,it){ot=this.getMatterBodies(ot);var Y=G.create(J,it);return V.point(ot,Y).length>0},intersectPoint:function(ot,J,it){it=this.getMatterBodies(it);var Y=G.create(ot,J),j=[];return V.point(it,Y).forEach(function(ht){-1===j.indexOf(ht)&&j.push(ht)}),j},intersectRect:function(ot,J,it,Y,j,nt){void 0===j&&(j=!1),nt=this.getMatterBodies(nt);var gt=[];return V.region(nt,{min:{x:ot,y:J},max:{x:ot+it,y:J+Y}},j).forEach(function(St){-1===gt.indexOf(St)&>.push(St)}),gt},intersectRay:function(ot,J,it,Y,j,nt){void 0===j&&(j=1),nt=this.getMatterBodies(nt);for(var ht=[],gt=V.ray(nt,G.create(ot,J),G.create(it,Y),j),wt=0;wt{var b=a(9674),T=a(83419),g=a(31884),f=a(95643),h=a(95540),c=a(72699),u=a(68287),m=a(26099),d=new T({Extends:u,Mixins:[g.Bounce,g.Collision,g.Force,g.Friction,g.Gravity,g.Mass,g.Sensor,g.SetBody,g.Sleep,g.Static,g.Transform,g.Velocity,c],initialize:function(v,x,y,_,E,A){f.call(this,v.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new b(this),this.setTexture(_,E),this.setSizeToFrame(),this.setOrigin(),this.world=v,this._tempVec2=new m(x,y);var D=h(A,"shape",null);D?this.setBody(D,A):this.setRectangle(this.width,this.height,A),this.setPosition(x,y),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=d},73834:(S,k,a)=>{var b=a(66280),T=a(22562),g=a(83419),f=a(31884),h=a(62644),c=a(50792),u=a(95540),m=a(97022),d=a(41598),p=new g({Extends:c,Mixins:[f.Bounce,f.Collision,f.Friction,f.Gravity,f.Mass,f.Sensor,f.Sleep,f.Static],initialize:function(x,y,_){c.call(this),this.tile=y,this.world=x,y.physics.matterBody&&y.physics.matterBody.destroy(),y.physics.matterBody=this;var E=u(_,"body",null),A=u(_,"addToWorld",!0);if(E)this.setBody(E,A);else{var D=y.getCollisionGroup();u(D,"objects",[]).length>0?this.setFromTileCollision(_):this.setFromTileRectangle(_)}if(y.flipX||y.flipY){var R={x:y.getCenterX(),y:y.getCenterY()};T.scale(E,y.flipX?-1:1,y.flipY?-1:1,R)}},setFromTileRectangle:function(v){void 0===v&&(v={}),m(v,"isStatic")||(v.isStatic=!0),m(v,"addToWorld")||(v.addToWorld=!0);var x=this.tile.getBounds(),E=b.rectangle(x.x+x.width/2,x.y+x.height/2,x.width,x.height,v);return this.setBody(E,v.addToWorld),this},setFromTileCollision:function(v){void 0===v&&(v={}),m(v,"isStatic")||(v.isStatic=!0),m(v,"addToWorld")||(v.addToWorld=!0);for(var x=this.tile.tilemapLayer.scaleX,y=this.tile.tilemapLayer.scaleY,_=this.tile.getLeft(),E=this.tile.getTop(),A=this.tile.getCollisionGroup(),D=u(A,"objects",[]),I=[],R=0;R1){var ot=h(v);ot.parts=I,this.setBody(T.create(ot),ot.addToWorld)}return this},setBody:function(v,x){return void 0===x&&(x=!0),this.body&&this.removeBody(),this.body=v,this.body.gameObject=this,x&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});S.exports=p},19496:(S,k,a)=>{var b=a(66280),T=a(22562),g=a(53402),f=a(95540),h=a(41598);S.exports={parseBody:function(u,m,d,p){void 0===p&&(p={});for(var v=f(d,"fixtures",[]),x=[],y=0;y{var b=a(66280),T=a(22562);S.exports={parseBody:function(f,h,c,u){void 0===u&&(u={});var m,d=c.vertices;if(1===d.length)u.vertices=d[0],m=T.create(u),b.flagCoincidentParts(m.parts);else{for(var p=[],v=0;v{var b=a(15647),T=a(83419),g=a(69351),f=a(48140),h=a(81388),c=a(1121),u=a(8214),m=a(46975),d=a(53614),p=a(26099),v=a(41598),x=new T({initialize:function(_,E,A){void 0===A&&(A={}),this.scene=_,this.world=E,this.camera=null,this.pointer=null,this.active=!0,this.position=new p,this.body=null,this.part=null,this.constraint=f.create(m(A,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(c.BEFORE_UPDATE,this.update,this),_.sys.input.on(u.POINTER_DOWN,this.onDown,this),_.sys.input.on(u.POINTER_UP,this.onUp,this)},onDown:function(y){this.pointer||(this.pointer=y,this.camera=y.camera)},onUp:function(y){y===this.pointer&&(this.pointer=null)},getBody:function(y){var _=this.position,E=this.constraint;this.camera.getWorldPoint(y.x,y.y,_);for(var A=g.allBodies(this.world.localWorld),D=0;D1?1:0;I{var b=a(66280),T=a(22562),g=a(83419),f=a(53402),h=a(69351),c=a(48413),u=a(50792),m=a(1121),d=a(95540),p=a(35154),v=a(22562),x=a(35810),y=a(73834),_=a(4372),E=a(13037),A=a(31725),D=new g({Extends:u,initialize:function(R,F){u.call(this),this.scene=R,this.engine=c.create(F),this.localWorld=this.engine.world;var N=p(F,"gravity",null);N?this.setGravity(N.x,N.y,N.scale):!1===N&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=p(F,"enabled",!0),this.getDelta=p(F,"getDelta",this.update60Hz);var V=d(F,"runner",{}),B=d(V,"fps",!1),H=d(V,"fps",60),Q=d(V,"delta",1e3/H),G=d(V,"deltaMin",1e3/H),K=d(V,"deltaMax",1e3/(.5*H));B||(H=1e3/Q),this.runner={fps:H,deltaSampleSize:d(V,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,timeBuffer:0,isFixed:d(V,"isFixed",!1),delta:Q,deltaMin:G,deltaMax:K},this.autoUpdate=p(F,"autoUpdate",!0);var q=p(F,"debug",!1);if(this.drawDebug="object"==typeof q||q,this.debugConfig={showAxes:d(q,"showAxes",!1),showAngleIndicator:d(q,"showAngleIndicator",!1),angleColor:d(q,"angleColor",15208787),showBroadphase:d(q,"showBroadphase",!1),broadphaseColor:d(q,"broadphaseColor",16757760),showBounds:d(q,"showBounds",!1),boundsColor:d(q,"boundsColor",16777215),showVelocity:d(q,"showVelocity",!1),velocityColor:d(q,"velocityColor",44783),showCollisions:d(q,"showCollisions",!1),collisionColor:d(q,"collisionColor",16094476),showSeparations:d(q,"showSeparations",!1),separationColor:d(q,"separationColor",16753920),showBody:d(q,"showBody",!0),showStaticBody:d(q,"showStaticBody",!0),showInternalEdges:d(q,"showInternalEdges",!1),renderFill:d(q,"renderFill",!1),renderLine:d(q,"renderLine",!0),fillColor:d(q,"fillColor",1075465),fillOpacity:d(q,"fillOpacity",1),lineColor:d(q,"lineColor",2678297),lineOpacity:d(q,"lineOpacity",1),lineThickness:d(q,"lineThickness",1),staticFillColor:d(q,"staticFillColor",857979),staticLineColor:d(q,"staticLineColor",1255396),showSleeping:d(q,"showSleeping",!1),staticBodySleepOpacity:d(q,"staticBodySleepOpacity",.7),sleepFillColor:d(q,"sleepFillColor",4605510),sleepLineColor:d(q,"sleepLineColor",10066585),showSensors:d(q,"showSensors",!0),sensorFillColor:d(q,"sensorFillColor",857979),sensorLineColor:d(q,"sensorLineColor",1255396),showPositions:d(q,"showPositions",!0),positionSize:d(q,"positionSize",4),positionColor:d(q,"positionColor",14697178),showJoint:d(q,"showJoint",!0),jointColor:d(q,"jointColor",14737474),jointLineOpacity:d(q,"jointLineOpacity",1),jointLineThickness:d(q,"jointLineThickness",2),pinSize:d(q,"pinSize",4),pinColor:d(q,"pinColor",4382944),springColor:d(q,"springColor",14697184),anchorColor:d(q,"anchorColor",15724527),anchorSize:d(q,"anchorSize",4),showConvexHulls:d(q,"showConvexHulls",!1),hullColor:d(q,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),d(F,"setBounds",!1)){var at=F.setBounds;if("boolean"==typeof at)this.setBounds();else{var ot=d(at,"x",0),J=d(at,"y",0),it=d(at,"width",R.sys.scale.width),Y=d(at,"height",R.sys.scale.height),j=d(at,"thickness",64),nt=d(at,"left",!0),ht=d(at,"right",!0),gt=d(at,"top",!0),wt=d(at,"bottom",!0);this.setBounds(ot,J,it,Y,j,nt,ht,gt,wt)}}},setCompositeRenderStyle:function(I){var V,B,H,R=I.bodies,F=I.constraints,N=I.composites;for(V=0;V0&&V.map(function(Q){H=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collide",B,H,Q),H.gameObject&&H.gameObject.emit("collide",H,B,Q),x.trigger(B,"onCollide",{pair:Q}),x.trigger(H,"onCollide",{pair:Q}),B.onCollideCallback&&B.onCollideCallback(Q),H.onCollideCallback&&H.onCollideCallback(Q),B.onCollideWith[H.id]&&B.onCollideWith[H.id](H,Q),H.onCollideWith[B.id]&&H.onCollideWith[B.id](B,Q)}),I.emit(m.COLLISION_START,N,B,H)}),x.on(R,"collisionActive",function(N){var B,H,V=N.pairs;V.length>0&&V.map(function(Q){H=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collideActive",B,H,Q),H.gameObject&&H.gameObject.emit("collideActive",H,B,Q),x.trigger(B,"onCollideActive",{pair:Q}),x.trigger(H,"onCollideActive",{pair:Q}),B.onCollideActiveCallback&&B.onCollideActiveCallback(Q),H.onCollideActiveCallback&&H.onCollideActiveCallback(Q)}),I.emit(m.COLLISION_ACTIVE,N,B,H)}),x.on(R,"collisionEnd",function(N){var B,H,V=N.pairs;V.length>0&&V.map(function(Q){H=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collideEnd",B,H,Q),H.gameObject&&H.gameObject.emit("collideEnd",H,B,Q),x.trigger(B,"onCollideEnd",{pair:Q}),x.trigger(H,"onCollideEnd",{pair:Q}),B.onCollideEndCallback&&B.onCollideEndCallback(Q),H.onCollideEndCallback&&H.onCollideEndCallback(Q)}),I.emit(m.COLLISION_END,N,B,H)})},setBounds:function(I,R,F,N,V,B,H,Q,G){return void 0===I&&(I=0),void 0===R&&(R=0),void 0===F&&(F=this.scene.sys.scale.width),void 0===N&&(N=this.scene.sys.scale.height),void 0===V&&(V=64),void 0===B&&(B=!0),void 0===H&&(H=!0),void 0===Q&&(Q=!0),void 0===G&&(G=!0),this.updateWall(B,"left",I-V,R-V,V,N+2*V),this.updateWall(H,"right",I+F,R-V,V,N+2*V),this.updateWall(Q,"top",I,R-V,F,V),this.updateWall(G,"bottom",I,R+N,F,V),this},updateWall:function(I,R,F,N,V,B){var H=this.walls[R];I?(H&&_.remove(this.localWorld,H),this.walls[R]=this.create(F+=V/2,N+=B/2,V,B,{isStatic:!0,friction:0,frictionStatic:0})):(H&&_.remove(this.localWorld,H),this.walls[R]=null)},createDebugGraphic:function(){var I=this.scene.sys.add.graphics({x:0,y:0});return I.setDepth(Number.MAX_VALUE),this.debugGraphic=I,this.drawDebug=!0,I},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(I,R,F){return void 0===I&&(I=0),void 0===R&&(R=1),void 0===F&&(F=.001),this.localWorld.gravity.x=I,this.localWorld.gravity.y=R,this.localWorld.gravity.scale=F,this},create:function(I,R,F,N,V){var B=b.rectangle(I,R,F,N,V);return _.add(this.localWorld,B),B},add:function(I){return _.add(this.localWorld,I),this},remove:function(I,R){Array.isArray(I)||(I=[I]);for(var F=0;FMath.max(E._maxFrameDelta,F.maxFrameTime))&&(H=F.frameDelta||E._frameDeltaFallback),F.frameDeltaSmoothing){F.frameDeltaHistory.push(H),F.frameDeltaHistory=F.frameDeltaHistory.slice(-F.frameDeltaHistorySize);var Q=F.frameDeltaHistory.slice(0).sort(),G=F.frameDeltaHistory.slice(Q.length*E._smoothingLowerBound,Q.length*E._smoothingUpperBound);H=E._mean(G)||H}F.frameDeltaSnapping&&(H=1e3/Math.round(1e3/H)),F.frameDelta=H,F.timeLastTick=I,F.timeBuffer+=F.frameDelta,F.timeBuffer=f.clamp(F.timeBuffer,0,F.frameDelta+V*E._timeBufferMargin),F.lastUpdatesDeferred=0;for(var q=F.maxUpdates||Math.ceil(F.maxFrameTime/V),at=f.now();V>0&&F.timeBuffer>=V*E._timeBufferMargin;){c.update(R,V),F.timeBuffer-=V,B+=1;var ot=f.now()-N,J=f.now()-at;if(B>=q||ot+E._elapsedNextEstimate*J/B>F.maxFrameTime){F.lastUpdatesDeferred=Math.round(Math.max(0,F.timeBuffer/V-E._timeBufferMargin));break}}}},step:function(I){c.update(this.engine,I)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(I){var R=I.hasOwnProperty("body")?I.body:I;return null!==h.get(this.localWorld,R.id,R.type)},getAllBodies:function(){return h.allBodies(this.localWorld)},getAllConstraints:function(){return h.allConstraints(this.localWorld)},getAllComposites:function(){return h.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var I=this.debugConfig,R=this.engine,F=this.debugGraphic,N=h.allBodies(this.localWorld);this.debugGraphic.clear(),I.showBroadphase&&R.broadphase.controller&&this.renderGrid(R.broadphase,F,I.broadphaseColor,.5),I.showBounds&&this.renderBodyBounds(N,F,I.boundsColor,.5),(I.showBody||I.showStaticBody)&&this.renderBodies(N),I.showJoint&&this.renderJoints(),(I.showAxes||I.showAngleIndicator)&&this.renderBodyAxes(N,F,I.showAxes,I.angleColor,.5),I.showVelocity&&this.renderBodyVelocity(N,F,I.velocityColor,1,2),I.showSeparations&&this.renderSeparations(R.pairs.list,F,I.separationColor),I.showCollisions&&this.renderCollisions(R.pairs.list,F,I.collisionColor)}},renderGrid:function(I,R,F,N){R.lineStyle(1,F,N);for(var V=f.keys(I.buckets),B=0;B0){var q=K[0].vertex.x,at=K[0].vertex.y;2===V.contactCount&&(q=(K[0].vertex.x+K[1].vertex.x)/2,at=(K[0].vertex.y+K[1].vertex.y)/2),G.bodyB===G.supports[0].body||G.bodyA.isStatic?R.lineBetween(q-8*G.normal.x,at-8*G.normal.y,q,at):R.lineBetween(q+8*G.normal.x,at+8*G.normal.y,q,at)}}return this},renderBodyBounds:function(I,R,F,N){R.lineStyle(1,F,N);for(var V=0;V1?1:0;G1?1:0;K1?1:0;K1&&this.renderConvexHull(Y,R,J,ht)}}},renderBody:function(I,R,F,N,V,B,H,Q){void 0===N&&(N=null),void 0===V&&(V=null),void 0===B&&(B=1),void 0===H&&(H=null),void 0===Q&&(Q=null);for(var G=this.debugConfig,K=G.sensorFillColor,q=G.sensorLineColor,at=I.parts,ot=at.length,J=ot>1?1:0;J1){var H=I.vertices;R.lineStyle(N,F),R.beginPath(),R.moveTo(H[0].x,H[0].y);for(var Q=1;Q0&&(R.fillStyle(H),R.fillCircle(at.x,at.y,Q),R.fillCircle(ot.x,ot.y,Q)),this},resetCollisionIDs:function(){return T._nextCollidingGroupId=1,T._nextNonCollidingGroupId=-1,T._nextCategory=1,this},shutdown:function(){x.off(this.engine),this.removeAllListeners(),_.clear(this.localWorld,!1),c.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});S.exports=D},70410:S=>{S.exports={setBounce:function(a){return this.body.restitution=a,this}}},66968:S=>{S.exports={setCollisionCategory:function(a){return this.body.collisionFilter.category=a,this},setCollisionGroup:function(a){return this.body.collisionFilter.group=a,this},setCollidesWith:function(a){var b=0;if(Array.isArray(a))for(var T=0;T{var b=a(22562);S.exports={applyForce:function(g){return this._tempVec2.set(this.body.position.x,this.body.position.y),b.applyForce(this.body,this._tempVec2,g),this},applyForceFrom:function(g,f){return b.applyForce(this.body,g,f),this},thrust:function(g){var f=this.body.angle;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(g){var f=this.body.angle-Math.PI/2;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(g){var f=this.body.angle+Math.PI/2;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(g){var f=this.body.angle-Math.PI;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}}},5436:S=>{S.exports={setFriction:function(a,b,T){return this.body.friction=a,void 0!==b&&(this.body.frictionAir=b),void 0!==T&&(this.body.frictionStatic=T),this},setFrictionAir:function(a){return this.body.frictionAir=a,this},setFrictionStatic:function(a){return this.body.frictionStatic=a,this}}},39858:S=>{S.exports={setIgnoreGravity:function(a){return this.body.ignoreGravity=a,this}}},37302:(S,k,a)=>{var b=a(22562),T=a(26099);S.exports={setMass:function(f){return b.setMass(this.body,f),this},setDensity:function(f){return b.setDensity(this.body,f),this},centerOfMass:{get:function(){return new T(this.body.centerOfMass.x,this.body.centerOfMass.y)}}}},39132:S=>{S.exports={setSensor:function(a){return this.body.isSensor=a,this},isSensor:function(){return this.body.isSensor}}},57772:(S,k,a)=>{var b=a(66280),T=a(22562),g=a(43855),f=a(95540),h=a(19496),c=a(85791),u=a(41598);S.exports={setRectangle:function(d,p,v){return this.setBody({type:"rectangle",width:d,height:p},v)},setCircle:function(d,p){return this.setBody({type:"circle",radius:d},p)},setPolygon:function(d,p,v){return this.setBody({type:"polygon",sides:p,radius:d},v)},setTrapezoid:function(d,p,v,x){return this.setBody({type:"trapezoid",width:d,height:p,slope:v},x)},setExistingBody:function(d,p){void 0===p&&(p=!0),this.body&&this.world.remove(this.body,!0),this.body=d;for(var v=0;v{var b=a(1121),T=a(53614),g=a(35810);S.exports={setToSleep:function(){return T.set(this.body,!0),this},setAwake:function(){return T.set(this.body,!1),this},setSleepThreshold:function(h){return void 0===h&&(h=60),this.body.sleepThreshold=h,this},setSleepEvents:function(h,c){return this.setSleepStartEvent(h),this.setSleepEndEvent(c),this},setSleepStartEvent:function(h){if(h){var c=this.world;g.on(this.body,"sleepStart",function(u){c.emit(b.SLEEP_START,u,this)})}else g.off(this.body,"sleepStart");return this},setSleepEndEvent:function(h){if(h){var c=this.world;g.on(this.body,"sleepEnd",function(u){c.emit(b.SLEEP_END,u,this)})}else g.off(this.body,"sleepEnd");return this}}},90556:(S,k,a)=>{var b=a(22562);S.exports={setStatic:function(g){return b.setStatic(this.body,g),this},isStatic:function(){return this.body.isStatic}}},85436:(S,k,a)=>{var b=a(22562),T=a(36383),g=a(86554),f=a(30954);S.exports={x:{get:function(){return this.body.position.x},set:function(u){this._tempVec2.set(u,this.y),b.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(u){this._tempVec2.set(this.x,u),b.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(u){var m=1/this._scaleX,d=1/this._scaleY;this._scaleX=u,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,b.scale(this.body,m,d),b.scale(this.body,u,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(u){var m=1/this._scaleX,d=1/this._scaleY;this._scaleY=u,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,b.scale(this.body,m,d),b.scale(this.body,this._scaleX,u)}},angle:{get:function(){return f(this.body.angle*T.RAD_TO_DEG)},set:function(u){this.rotation=f(u)*T.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(u){this._rotation=g(u),b.setAngle(this.body,this._rotation)}},setPosition:function(u,m){return void 0===u&&(u=0),void 0===m&&(m=u),this._tempVec2.set(u,m),b.setPosition(this.body,this._tempVec2),this},setRotation:function(u){return void 0===u&&(u=0),this._rotation=g(u),b.setAngle(this.body,u),this},setFixedRotation:function(){return b.setInertia(this.body,1/0),this},setAngle:function(u){return void 0===u&&(u=0),this.angle=u,b.setAngle(this.body,this.rotation),this},setScale:function(u,m,d){void 0===u&&(u=1),void 0===m&&(m=u);var p=1/this._scaleX,v=1/this._scaleY;return this._scaleX=u,this._scaleY=m,b.scale(this.body,p,v,d),b.scale(this.body,u,m,d),this}}},42081:(S,k,a)=>{var b=a(22562);S.exports={setVelocityX:function(g){return this._tempVec2.set(g,this.body.velocity.y),b.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(g){return this._tempVec2.set(this.body.velocity.x,g),b.setVelocity(this.body,this._tempVec2),this},setVelocity:function(g,f){return this._tempVec2.set(g,f),b.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return b.getVelocity(this.body)},setAngularVelocity:function(g){return b.setAngularVelocity(this.body,g),this},getAngularVelocity:function(){return b.getAngularVelocity(this.body)},setAngularSpeed:function(g){return b.setAngularSpeed(this.body,g),this},getAngularSpeed:function(){return b.getAngularSpeed(this.body)}}},31884:(S,k,a)=>{S.exports={Bounce:a(70410),Collision:a(66968),Force:a(51607),Friction:a(5436),Gravity:a(39858),Mass:a(37302),Sensor:a(39132),SetBody:a(57772),Sleep:a(38083),Static:a(90556),Transform:a(85436),Velocity:a(42081)}},85608:S=>{S.exports="afteradd"},1213:S=>{S.exports="afterremove"},25968:S=>{S.exports="afterupdate"},67205:S=>{S.exports="beforeadd"},39438:S=>{S.exports="beforeremove"},44823:S=>{S.exports="beforeupdate"},92593:S=>{S.exports="collisionactive"},60128:S=>{S.exports="collisionend"},76861:S=>{S.exports="collisionstart"},92362:S=>{S.exports="dragend"},76408:S=>{S.exports="drag"},93971:S=>{S.exports="dragstart"},5656:S=>{S.exports="pause"},47861:S=>{S.exports="resume"},79099:S=>{S.exports="sleepend"},35906:S=>{S.exports="sleepstart"},1121:(S,k,a)=>{S.exports={AFTER_ADD:a(85608),AFTER_REMOVE:a(1213),AFTER_UPDATE:a(25968),BEFORE_ADD:a(67205),BEFORE_REMOVE:a(39438),BEFORE_UPDATE:a(44823),COLLISION_ACTIVE:a(92593),COLLISION_END:a(60128),COLLISION_START:a(76861),DRAG_END:a(92362),DRAG:a(76408),DRAG_START:a(93971),PAUSE:a(5656),RESUME:a(47861),SLEEP_END:a(79099),SLEEP_START:a(35906)}},3875:(S,k,a)=>{S.exports={BodyBounds:a(68174),Components:a(31884),Events:a(1121),Factory:a(28137),MatterGameObject:a(75803),Image:a(23181),Matter:a(19933),MatterPhysics:a(42045),PolyDecomp:a(55973),Sprite:a(34803),TileBody:a(73834),PhysicsEditorParser:a(19496),PhysicsJSONParser:a(85791),PointerConstraint:a(98713),World:a(68243)}},22562:(S,k,a)=>{var b={};S.exports=b;var T=a(41598),g=a(31725),f=a(53614),h=a(53402),c=a(15647),u=a(66615);!function(){b._timeCorrection=!0,b._inertiaScale=4,b._nextCollidingGroupId=1,b._nextNonCollidingGroupId=-1,b._nextCategory=1,b._baseDelta=16.666666666666668,b.create=function(d){var p={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:d.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!d.hasOwnProperty("position")&&d.hasOwnProperty("vertices")?d.position=T.centre(d.vertices):d.hasOwnProperty("vertices")||(p.vertices=T.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var v=h.extend(p,d);return m(v,d),v.setOnCollideWith=function(x,y){return y?this.onCollideWith[x.id]=y:delete this.onCollideWith[x.id],this},v},b.nextGroup=function(d){return d?b._nextNonCollidingGroupId--:b._nextCollidingGroupId++},b.nextCategory=function(){return b._nextCategory=b._nextCategory<<1,b._nextCategory};var m=function(d,p){if(p=p||{},b.set(d,{bounds:d.bounds||c.create(d.vertices),positionPrev:d.positionPrev||g.clone(d.position),anglePrev:d.anglePrev||d.angle,vertices:d.vertices,parts:d.parts||[d],isStatic:d.isStatic,isSleeping:d.isSleeping,parent:d.parent||d}),T.rotate(d.vertices,d.angle,d.position),u.rotate(d.axes,d.angle),c.update(d.bounds,d.vertices,d.velocity),b.set(d,{axes:p.axes||d.axes,area:p.area||d.area,mass:p.mass||d.mass,inertia:p.inertia||d.inertia}),1===d.parts.length){var v=d.bounds,x=d.centerOfMass,y=d.centerOffset,_=v.max.x-v.min.x,E=v.max.y-v.min.y;x.x=-(v.min.x-d.position.x)/_,x.y=-(v.min.y-d.position.y)/E,y.x=_*x.x,y.y=E*x.y}};b.set=function(d,p,v){var x;for(x in"string"==typeof p&&(x=p,(p={})[x]=v),p)if(Object.prototype.hasOwnProperty.call(p,x))switch(v=p[x],x){case"isStatic":b.setStatic(d,v);break;case"isSleeping":f.set(d,v);break;case"mass":b.setMass(d,v);break;case"density":b.setDensity(d,v);break;case"inertia":b.setInertia(d,v);break;case"vertices":b.setVertices(d,v);break;case"position":b.setPosition(d,v);break;case"angle":b.setAngle(d,v);break;case"velocity":b.setVelocity(d,v);break;case"angularVelocity":b.setAngularVelocity(d,v);break;case"speed":b.setSpeed(d,v);break;case"angularSpeed":b.setAngularSpeed(d,v);break;case"parts":b.setParts(d,v);break;case"centre":b.setCentre(d,v);break;default:d[x]=v}},b.setStatic=function(d,p){for(var v=0;v0&&g.rotateAbout(_.position,x,d.position,_.position)}},b.setVelocity=function(d,p){var v=d.deltaTime/b._baseDelta;d.positionPrev.x=d.position.x-p.x*v,d.positionPrev.y=d.position.y-p.y*v,d.velocity.x=(d.position.x-d.positionPrev.x)/v,d.velocity.y=(d.position.y-d.positionPrev.y)/v,d.speed=g.magnitude(d.velocity)},b.getVelocity=function(d){var p=b._baseDelta/d.deltaTime;return{x:(d.position.x-d.positionPrev.x)*p,y:(d.position.y-d.positionPrev.y)*p}},b.getSpeed=function(d){return g.magnitude(b.getVelocity(d))},b.setSpeed=function(d,p){b.setVelocity(d,g.mult(g.normalise(b.getVelocity(d)),p))},b.setAngularVelocity=function(d,p){var v=d.deltaTime/b._baseDelta;d.anglePrev=d.angle-p*v,d.angularVelocity=(d.angle-d.anglePrev)/v,d.angularSpeed=Math.abs(d.angularVelocity)},b.getAngularVelocity=function(d){return(d.angle-d.anglePrev)*b._baseDelta/d.deltaTime},b.getAngularSpeed=function(d){return Math.abs(b.getAngularVelocity(d))},b.setAngularSpeed=function(d,p){b.setAngularVelocity(d,h.sign(b.getAngularVelocity(d))*p)},b.translate=function(d,p,v){b.setPosition(d,g.add(d.position,p),v)},b.rotate=function(d,p,v,x){if(v){var y=Math.cos(p),_=Math.sin(p),E=d.position.x-v.x,A=d.position.y-v.y;b.setPosition(d,{x:v.x+(E*y-A*_),y:v.y+(E*_+A*y)},x),b.setAngle(d,d.angle+p,x)}else b.setAngle(d,d.angle+p,x)},b.scale=function(d,p,v,x){var y=0,_=0;x=x||d.position;for(var E=d.inertia===1/0,A=0;A0&&(y+=D.area,_+=D.inertia),D.position.x=x.x+(D.position.x-x.x)*p,D.position.y=x.y+(D.position.y-x.y)*v,c.update(D.bounds,D.vertices,d.velocity)}d.parts.length>1&&(d.area=y,d.isStatic||(b.setMass(d,d.density*y),b.setInertia(d,_))),d.circleRadius&&(p===v?d.circleRadius*=p:d.circleRadius=null),E&&b.setInertia(d,1/0)},b.update=function(d,p){var v=(p=(typeof p<"u"?p:16.666666666666668)*d.timeScale)*p,x=b._timeCorrection?p/(d.deltaTime||p):1,y=1-d.frictionAir*(p/h._baseDelta),E=(d.position.y-d.positionPrev.y)*x;d.velocity.x=(d.position.x-d.positionPrev.x)*x*y+d.force.x/d.mass*v,d.velocity.y=E*y+d.force.y/d.mass*v,d.positionPrev.x=d.position.x,d.positionPrev.y=d.position.y,d.position.x+=d.velocity.x,d.position.y+=d.velocity.y,d.deltaTime=p,d.angularVelocity=(d.angle-d.anglePrev)*y*x+d.torque/d.inertia*v,d.anglePrev=d.angle,d.angle+=d.angularVelocity,d.speed=g.magnitude(d.velocity),d.angularSpeed=Math.abs(d.angularVelocity);for(var A=0;A0&&(D.position.x+=d.velocity.x,D.position.y+=d.velocity.y),0!==d.angularVelocity&&(T.rotate(D.vertices,d.angularVelocity,d.position),u.rotate(D.axes,d.angularVelocity),A>0&&g.rotateAbout(D.position,d.angularVelocity,d.position,D.position)),c.update(D.bounds,D.vertices,d.velocity)}},b.updateVelocities=function(d){var p=b._baseDelta/d.deltaTime,v=d.velocity;v.x=(d.position.x-d.positionPrev.x)*p,v.y=(d.position.y-d.positionPrev.y)*p,d.speed=Math.sqrt(v.x*v.x+v.y*v.y),d.angularVelocity=(d.angle-d.anglePrev)*p,d.angularSpeed=Math.abs(d.angularVelocity)},b.applyForce=function(d,p,v){var x_x=p.x-d.position.x,x_y=p.y-d.position.y;d.force.x+=v.x,d.force.y+=v.y,d.torque+=x_x*v.y-x_y*v.x},b._totalProperties=function(d){for(var p={mass:0,area:0,inertia:0,centre:{x:0,y:0}},v=1===d.parts.length?0:1;v{var b={};S.exports=b;var T=a(35810),g=a(53402),f=a(15647),h=a(22562);b.create=function(c){return g.extend({id:g.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},c)},b.setModified=function(c,u,m,d){if(T.trigger(c,"compositeModified",c),c.isModified=u,u&&c.cache&&(c.cache.allBodies=null,c.cache.allConstraints=null,c.cache.allComposites=null),m&&c.parent&&b.setModified(c.parent,u,m,d),d)for(var p=0;p{var b={};S.exports=b;var T=a(69351);b.create=T.create,b.add=T.add,b.remove=T.remove,b.clear=T.clear,b.addComposite=T.addComposite,b.addBody=T.addBody,b.addConstraint=T.addConstraint},52284:(S,k,a)=>{var b={};S.exports=b;var f,h,c,T=a(41598),g=a(4506);f=[],h={overlap:0,axis:null},c={overlap:0,axis:null},b.create=function(u,m){return{pair:null,collided:!1,bodyA:u,bodyB:m,parentA:u.parent,parentB:m.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},b.collides=function(u,m,d){if(b._overlapAxes(h,u.vertices,m.vertices,u.axes),h.overlap<=0||(b._overlapAxes(c,m.vertices,u.vertices,m.axes),c.overlap<=0))return null;var v,x,p=d&&d.table[g.id(u,m)];p?v=p.collision:((v=b.create(u,m)).collided=!0,v.bodyA=u.id=0&&(R=-R,F=-F),y.x=R,y.y=F,_.x=-F,_.y=R,E.x=R*D,E.y=F*D,v.depth=D;var B=b._findSupports(u,m,y,1),H=0;if(T.contains(u.vertices,B[0])&&(A[H++]=B[0]),T.contains(u.vertices,B[1])&&(A[H++]=B[1]),H<2){var Q=b._findSupports(m,u,y,-1);T.contains(m.vertices,Q[0])&&(A[H++]=Q[0]),H<2&&T.contains(m.vertices,Q[1])&&(A[H++]=Q[1])}return 0===H&&(A[H++]=B[0]),v.supportCount=H,v},b._overlapAxes=function(u,m,d,p){var F,N,V,B,H,Q,v=m.length,x=d.length,y=m[0].x,_=m[0].y,E=d[0].x,A=d[0].y,D=p.length,I=Number.MAX_VALUE,R=0;for(H=0;HJ?J=B:Bit?it=B:B{var k={};S.exports=k,k.create=function(a){return{vertex:a,normalImpulse:0,tangentImpulse:0}}},81388:(S,k,a)=>{var b={};S.exports=b;var T=a(53402),g=a(52284);b.create=function(f){return T.extend({bodies:[],collisions:[],pairs:null},f)},b.setBodies=function(f,h){f.bodies=h.slice(0)},b.clear=function(f){f.bodies=[],f.collisions=[]},b.collisions=function(f){var x,y,h=f.pairs,c=f.bodies,u=c.length,m=b.canCollide,d=g.collides,p=f.collisions,v=0;for(c.sort(b._compareBoundsX),x=0;xA)break;if(!(DB.max.y)&&(!R||!V.isStatic&&!V.isSleeping)&&m(_.collisionFilter,V.collisionFilter)){var H=V.parts.length;if(N&&1===H)(Q=d(_,V,h))&&(p[v++]=Q);else for(var K=H>1?1:0,q=F>1?1:0;q(B=J.bounds).max.x||E.max.xB.max.y||(Q=d(at,J,h))&&(p[v++]=Q)}}}}return p.length!==v&&(p.length=v),p},b.canCollide=function(f,h){return f.group===h.group&&0!==f.group?f.group>0:!!(f.mask&h.category)&&!!(h.mask&f.category)},b._compareBoundsX=function(f,h){return f.bounds.min.x-h.bounds.min.x}},4506:(S,k,a)=>{var b={};S.exports=b;var T=a(43424);b.create=function(g,f){var h=g.bodyA,c=g.bodyB,u={id:b.id(h,c),bodyA:h,bodyB:c,collision:g,contacts:[T.create(),T.create()],contactCount:0,separation:0,isActive:!0,isSensor:h.isSensor||c.isSensor,timeCreated:f,timeUpdated:f,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return b.update(u,g,f),u},b.update=function(g,f,h){var c=f.supports,u=f.supportCount,m=g.contacts,d=f.parentA,p=f.parentB;g.isActive=!0,g.timeUpdated=h,g.collision=f,g.separation=f.depth,g.inverseMass=d.inverseMass+p.inverseMass,g.friction=d.frictionp.frictionStatic?d.frictionStatic:p.frictionStatic,g.restitution=d.restitution>p.restitution?d.restitution:p.restitution,g.slop=d.slop>p.slop?d.slop:p.slop,g.contactCount=u,f.pair=g;var v=c[0],x=m[0],y=c[1],_=m[1];(_.vertex===v||x.vertex===y)&&(m[1]=x,m[0]=x=_,_=m[1]),x.vertex=v,_.vertex=y},b.setActive=function(g,f,h){f?(g.isActive=!0,g.timeUpdated=h):(g.isActive=!1,g.contactCount=0)},b.id=function(g,f){return g.id{var b={};S.exports=b;var T=a(4506),g=a(53402);b.create=function(f){return g.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},f)},b.update=function(f,h,c){var N,V,B,u=T.update,m=T.create,d=T.setActive,p=f.table,v=f.list,x=v.length,y=x,_=f.collisionStart,E=f.collisionEnd,A=f.collisionActive,D=h.length,I=0,R=0,F=0;for(B=0;B=c?v[y++]=V:(d(V,!1,c),V.collision.bodyA.sleepCounter>0&&V.collision.bodyB.sleepCounter>0?v[y++]=V:(E[R++]=V,delete p[V.id]));v.length!==y&&(v.length=y),_.length!==I&&(_.length=I),E.length!==R&&(E.length=R),A.length!==F&&(A.length=F)},b.clear=function(f){return f.table={},f.list.length=0,f.collisionStart.length=0,f.collisionActive.length=0,f.collisionEnd.length=0,f}},73296:(S,k,a)=>{var b={};S.exports=b;var T=a(31725),g=a(52284),f=a(15647),h=a(66280),c=a(41598);b.collides=function(u,m){for(var d=[],p=m.length,v=u.bounds,x=g.collides,y=f.overlaps,_=0;_{var b={};S.exports=b;var T=a(41598),g=a(53402),f=a(15647);b._restingThresh=2,b._restingThreshTangent=Math.sqrt(6),b._positionDampen=.9,b._positionWarming=.8,b._frictionNormalMultiplier=5,b._frictionMaxStatic=Number.MAX_VALUE,b.preSolvePosition=function(h){var c,u,m,d=h.length;for(c=0;cCn?(E=R.friction*(ni>0?1:-1)*d)<-(A=ni>0?ni:-ni)?E=-A:E>A&&(E=A):(E=ni,A=y);var sr=Bt*H-Yt*B,vn=$t*H-qt*B,bn=J/(K+N.inverseInertia*sr*sr+V.inverseInertia*vn*vn),Fr=(1+R.restitution)*be*bn;if(E*=bn,be0&&(wt.normalImpulse=0),Fr=wt.normalImpulse-cs}if(ni<-v||ni>v)wt.tangentImpulse=0;else{var Dn=wt.tangentImpulse;wt.tangentImpulse+=E,wt.tangentImpulse<-A&&(wt.tangentImpulse=-A),wt.tangentImpulse>A&&(wt.tangentImpulse=A),E=wt.tangentImpulse-Dn}var xr=B*Fr+Q*E,ts=H*Fr+G*E;N.isStatic||N.isSleeping||(N.positionPrev.x+=xr*N.inverseMass,N.positionPrev.y+=ts*N.inverseMass,N.anglePrev+=(Bt*ts-Yt*xr)*N.inverseInertia),V.isStatic||V.isSleeping||(V.positionPrev.x-=xr*V.inverseMass,V.positionPrev.y-=ts*V.inverseMass,V.anglePrev-=($t*ts-qt*xr)*V.inverseInertia)}}}}},48140:(S,k,a)=>{var b={};S.exports=b;var T=a(41598),g=a(31725),f=a(53614),h=a(15647),c=a(66615),u=a(53402);b._warming=.4,b._torqueDampen=1,b._minLength=1e-6,b.create=function(m){var d=m;d.bodyA&&!d.pointA&&(d.pointA={x:0,y:0}),d.bodyB&&!d.pointB&&(d.pointB={x:0,y:0});var p=d.bodyA?g.add(d.bodyA.position,d.pointA):d.pointA,v=d.bodyB?g.add(d.bodyB.position,d.pointB):d.pointB,x=g.magnitude(g.sub(p,v));d.length=typeof d.length<"u"?d.length:x,d.id=d.id||u.nextId(),d.label=d.label||"Constraint",d.type="constraint",d.stiffness=d.stiffness||(d.length>0?1:.7),d.damping=d.damping||0,d.angularStiffness=d.angularStiffness||0,d.angleA=d.bodyA?d.bodyA.angle:d.angleA,d.angleB=d.bodyB?d.bodyB.angle:d.angleB,d.plugin={};var y={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===d.length&&d.stiffness>.1?(y.type="pin",y.anchors=!1):d.stiffness<.9&&(y.type="spring"),d.render=u.extend(y,d.render),d},b.preSolveAll=function(m){for(var d=0;d=1||0===m.length?m.stiffness*d:m.stiffness*d*d)),B=(p?p.inverseMass:0)+(v?v.inverseMass:0),Q=B+((p?p.inverseInertia:0)+(v?v.inverseInertia:0));if(N>0){var J=g.create();q=g.div(A,D),ot=g.sub(v&&g.sub(v.position,v.positionPrev)||J,p&&g.sub(p.position,p.positionPrev)||J),at=g.dot(q,ot)}p&&!p.isStatic&&(p.constraintImpulse.x-=V.x*(K=p.inverseMass/B),p.constraintImpulse.y-=V.y*K,p.position.x-=V.x*K,p.position.y-=V.y*K,N>0&&(p.positionPrev.x-=N*q.x*at*K,p.positionPrev.y-=N*q.y*at*K),G=g.cross(x,V)/Q*b._torqueDampen*p.inverseInertia*(1-m.angularStiffness),p.constraintImpulse.angle-=G,p.angle-=G),v&&!v.isStatic&&(v.constraintImpulse.x+=V.x*(K=v.inverseMass/B),v.constraintImpulse.y+=V.y*K,v.position.x+=V.x*K,v.position.y+=V.y*K,N>0&&(v.positionPrev.x+=N*q.x*at*K,v.positionPrev.y+=N*q.y*at*K),G=g.cross(y,V)/Q*b._torqueDampen*v.inverseInertia*(1-m.angularStiffness),v.constraintImpulse.angle+=G,v.angle+=G)}}},b.postSolveAll=function(m){for(var d=0;d0&&(y.position.x+=v.x,y.position.y+=v.y),0!==v.angle&&(T.rotate(y.vertices,v.angle,p.position),c.rotate(y.axes,v.angle),x>0&&g.rotateAbout(y.position,v.angle,p.position,y.position)),h.update(y.bounds,y.vertices,p.velocity)}v.angle*=b._warming,v.x*=b._warming,v.y*=b._warming}}},b.pointAWorld=function(m){return{x:(m.bodyA?m.bodyA.position.x:0)+(m.pointA?m.pointA.x:0),y:(m.bodyA?m.bodyA.position.y:0)+(m.pointA?m.pointA.y:0)}},b.pointBWorld=function(m){return{x:(m.bodyB?m.bodyB.position.x:0)+(m.pointB?m.pointB.x:0),y:(m.bodyB?m.bodyB.position.y:0)+(m.pointB?m.pointB.y:0)}},b.currentLength=function(m){var y=(m.bodyA?m.bodyA.position.x:0)+(m.pointA?m.pointA.x:0)-((m.bodyB?m.bodyB.position.x:0)+(m.pointB?m.pointB.x:0)),_=(m.bodyA?m.bodyA.position.y:0)+(m.pointA?m.pointA.y:0)-((m.bodyB?m.bodyB.position.y:0)+(m.pointB?m.pointB.y:0));return Math.sqrt(y*y+_*_)}},53402:(S,k,a)=>{var b={};S.exports=b,function(){b._baseDelta=16.666666666666668,b._nextId=0,b._seed=0,b._nowStartTime=+new Date,b._warnedOnce={},b._decomp=null,b.extend=function(g,f){var h,u;"boolean"==typeof f?(h=2,u=f):(h=1,u=!0);for(var m=h;m0;f--){var h=Math.floor(b.random()*(f+1)),c=g[f];g[f]=g[h],g[h]=c}return g},b.choose=function(g){return g[Math.floor(b.random()*g.length)]},b.isElement=function(g){return typeof HTMLElement<"u"?g instanceof HTMLElement:!!(g&&g.nodeType&&g.nodeName)},b.isArray=function(g){return"[object Array]"===Object.prototype.toString.call(g)},b.isFunction=function(g){return"function"==typeof g},b.isPlainObject=function(g){return"object"==typeof g&&g.constructor===Object},b.isString=function(g){return"[object String]"===toString.call(g)},b.clamp=function(g,f,h){return gh?h:g},b.sign=function(g){return g<0?-1:1},b.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-b._nowStartTime},b.random=function(g,f){return f=typeof f<"u"?f:1,(g=typeof g<"u"?g:0)+T()*(f-g)};var T=function(){return b._seed=(9301*b._seed+49297)%233280,b._seed/233280};b.colorToNumber=function(g){return 3==(g=g.replace("#","")).length&&(g=g.charAt(0)+g.charAt(0)+g.charAt(1)+g.charAt(1)+g.charAt(2)+g.charAt(2)),parseInt(g,16)},b.logLevel=1,b.log=function(){console&&b.logLevel>0&&b.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},b.info=function(){console&&b.logLevel>0&&b.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},b.warn=function(){console&&b.logLevel>0&&b.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},b.warnOnce=function(){var g=Array.prototype.slice.call(arguments).join(" ");b._warnedOnce[g]||(b.warn(g),b._warnedOnce[g]=!0)},b.deprecated=function(g,f,h){g[f]=b.chain(function(){b.warnOnce("\u{1f505} deprecated \u{1f505}",h)},g[f])},b.nextId=function(){return b._nextId++},b.indexOf=function(g,f){if(g.indexOf)return g.indexOf(f);for(var h=0;h{var b={};S.exports=b;var T=a(53614),g=a(66272),f=a(81388),h=a(99561),c=a(35810),u=a(69351),m=a(48140),d=a(53402),p=a(22562);b._deltaMax=16.666666666666668,b.create=function(v){var y=d.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},v=v||{});return y.world=v.world||u.create({label:"World"}),y.pairs=v.pairs||h.create(),y.detector=v.detector||f.create(),y.detector.pairs=y.pairs,y.grid={buckets:[]},y.world.gravity=y.gravity,y.broadphase=y.grid,y.metrics={},y},b.update=function(v,x){var R,y=d.now(),_=v.world,E=v.detector,A=v.pairs,D=v.timing,I=D.timestamp;x>b._deltaMax&&d.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",b._deltaMax.toFixed(3),"ms."),x=typeof x<"u"?x:d._baseDelta,D.timestamp+=x*=D.timeScale,D.lastDelta=x;var F={timestamp:D.timestamp,delta:x};c.trigger(v,"beforeUpdate",F);var N=u.allBodies(_),V=u.allConstraints(_),B=u.allComposites(_);for(_.isModified&&(f.setBodies(E,N),u.setModified(_,!1,!1,!0)),v.enableSleeping&&T.update(N,x),b._bodiesApplyGravity(N,v.gravity),b.wrap(N,B),b.attractors(N),x>0&&b._bodiesUpdate(N,x),c.trigger(v,"beforeSolve",F),m.preSolveAll(N),R=0;R0&&c.trigger(v,"collisionStart",{pairs:A.collisionStart,timestamp:D.timestamp,delta:x});var Q=d.clamp(20/v.positionIterations,0,1);for(g.preSolvePosition(A.list),R=0;R0&&c.trigger(v,"collisionActive",{pairs:A.collisionActive,timestamp:D.timestamp,delta:x}),A.collisionEnd.length>0&&c.trigger(v,"collisionEnd",{pairs:A.collisionEnd,timestamp:D.timestamp,delta:x}),b._bodiesClearForces(N),c.trigger(v,"afterUpdate",F),v.timing.lastElapsed=d.now()-y,v},b.merge=function(v,x){if(d.extend(v,x),x.world){v.world=x.world,b.clear(v);for(var y=u.allBodies(v.world),_=0;_0)for(var E=0;E{var b={};S.exports=b;var T=a(53402);b.on=function(g,f,h){for(var u,c=f.split(" "),m=0;m0){h||(h={}),c=f.split(" ");for(var v=0;v{var b={};S.exports=b;var T=a(73832),g=a(53402);b.name="matter-js",b.version="0.20.0",b.uses=[],b.used=[],b.use=function(){T.use(b,Array.prototype.slice.call(arguments))},b.before=function(f,h){return f=f.replace(/^Matter./,""),g.chainPathBefore(b,f,h)},b.after=function(f,h){return f=f.replace(/^Matter./,""),g.chainPathAfter(b,f,h)}},73832:(S,k,a)=>{var b={};S.exports=b;var T=a(53402);b._registry={},b.register=function(g){if(b.isPlugin(g)||T.warn("Plugin.register:",b.toString(g),"does not implement all required fields."),g.name in b._registry){var f=b._registry[g.name],h=b.versionParse(g.version).number,c=b.versionParse(f.version).number;h>c?(T.warn("Plugin.register:",b.toString(f),"was upgraded to",b.toString(g)),b._registry[g.name]=g):h-1},b.isFor=function(g,f){var h=g.for&&b.dependencyParse(g.for);return!g.for||f.name===h.name&&b.versionSatisfies(f.version,h.range)},b.use=function(g,f){if(g.uses=(g.uses||[]).concat(f||[]),0!==g.uses.length){for(var h=b.dependencies(g),c=T.topologicalSort(h),u=[],m=0;m0&&!d.silent&&T.info(u.join(" "))}else T.warn("Plugin.use:",b.toString(g),"does not specify any dependencies to install.")},b.dependencies=function(g,f){var h=b.dependencyParse(g),c=h.name;if(!(c in(f=f||{}))){g=b.resolve(g)||g,f[c]=T.map(g.uses||[],function(m){b.isPlugin(m)&&b.register(m);var d=b.dependencyParse(m),p=b.resolve(m);return p&&!b.versionSatisfies(p.version,d.range)?(T.warn("Plugin.dependencies:",b.toString(p),"does not satisfy",b.toString(d),"used by",b.toString(h)+"."),p._warned=!0,g._warned=!0):p||(T.warn("Plugin.dependencies:",b.toString(m),"used by",b.toString(h),"could not be resolved."),g._warned=!0),d.name});for(var u=0;u=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;f.test(g)||T.warn("Plugin.versionParse:",g,"is not a valid version or range.");var h=f.exec(g),c=Number(h[4]),u=Number(h[5]),m=Number(h[6]);return{isRange:!(!h[1]&&!h[2]),version:h[3],range:g,operator:h[1]||h[2]||"",major:c,minor:u,patch:m,parts:[c,u,m],prerelease:h[7],number:1e8*c+1e4*u+m}},b.versionSatisfies=function(g,f){var h=b.versionParse(f=f||"*"),c=b.versionParse(g);if(h.isRange){if("*"===h.operator||"*"===g)return!0;if(">"===h.operator)return c.number>h.number;if(">="===h.operator)return c.number>=h.number;if("~"===h.operator)return c.major===h.major&&c.minor===h.minor&&c.patch>=h.patch;if("^"===h.operator)return h.major>0?c.major===h.major&&c.number>=h.number:h.minor>0?c.minor===h.minor&&c.patch>=h.patch:c.patch===h.patch}return g===f||"*"===g}},13037:(S,k,a)=>{var b={};S.exports=b;var T=a(35810),g=a(48413),f=a(53402);!function(){b._maxFrameDelta=66.66666666666667,b._frameDeltaFallback=16.666666666666668,b._timeBufferMargin=1.5,b._elapsedNextEstimate=1,b._smoothingLowerBound=.1,b._smoothingUpperBound=.9,b.create=function(c){var m=f.extend({delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},c);return m.fps=0,m},b.run=function(c,u){return c.timeBuffer=b._frameDeltaFallback,function m(d){c.frameRequestId=b._onNextFrame(c,m),d&&c.enabled&&b.tick(c,u,d)}(),c},b.tick=function(c,u,m){var d=f.now(),p=c.delta,v=0,x=m-c.timeLastTick;if((!x||!c.timeLastTick||x>Math.max(b._maxFrameDelta,c.maxFrameTime))&&(x=c.frameDelta||b._frameDeltaFallback),c.frameDeltaSmoothing){c.frameDeltaHistory.push(x),c.frameDeltaHistory=c.frameDeltaHistory.slice(-c.frameDeltaHistorySize);var y=c.frameDeltaHistory.slice(0).sort(),_=c.frameDeltaHistory.slice(y.length*b._smoothingLowerBound,y.length*b._smoothingUpperBound);x=h(_)||x}c.frameDeltaSnapping&&(x=1e3/Math.round(1e3/x)),c.frameDelta=x,c.timeLastTick=m,c.timeBuffer+=c.frameDelta,c.timeBuffer=f.clamp(c.timeBuffer,0,c.frameDelta+p*b._timeBufferMargin),c.lastUpdatesDeferred=0;var A=c.maxUpdates||Math.ceil(c.maxFrameTime/p),D={timestamp:u.timing.timestamp};T.trigger(c,"beforeTick",D),T.trigger(c,"tick",D);for(var I=f.now();p>0&&c.timeBuffer>=p*b._timeBufferMargin;){T.trigger(c,"beforeUpdate",D),g.update(u,p),T.trigger(c,"afterUpdate",D),c.timeBuffer-=p,v+=1;var R=f.now()-d,F=f.now()-I;if(v>=A||R+b._elapsedNextEstimate*F/v>c.maxFrameTime){c.lastUpdatesDeferred=Math.round(Math.max(0,c.timeBuffer/p-b._timeBufferMargin));break}}u.timing.lastUpdatesPerFrame=v,T.trigger(c,"afterTick",D),c.frameDeltaHistory.length>=100&&(c.lastUpdatesDeferred&&Math.round(c.frameDelta/p)>A?f.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):c.lastUpdatesDeferred&&f.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof c.isFixed<"u"&&f.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(c.deltaMin||c.deltaMax)&&f.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==c.fps&&f.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},b.stop=function(c){b._cancelNextFrame(c)},b._onNextFrame=function(c,u){if(!(typeof window<"u"&&window.requestAnimationFrame))throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return c.frameRequestId=window.requestAnimationFrame(u),c.frameRequestId},b._cancelNextFrame=function(c){if(!(typeof window<"u"&&window.cancelAnimationFrame))throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.");window.cancelAnimationFrame(c.frameRequestId)};var h=function(c){for(var u=0,m=c.length,d=0;d{var b={};S.exports=b;var T=a(22562),g=a(35810),f=a(53402);b._motionWakeThreshold=.18,b._motionSleepThreshold=.08,b._minBias=.9,b.update=function(h,c){for(var u=c/f._baseDelta,m=b._motionSleepThreshold,d=0;d0&&p.motion=p.sleepThreshold/u&&b.set(p,!0)):p.sleepCounter>0&&(p.sleepCounter-=1)}else b.set(p,!1)}},b.afterCollisions=function(h){for(var c=b._motionSleepThreshold,u=0;uc&&b.set(x,!1)}}}},b.set=function(h,c){var u=h.isSleeping;c?(h.isSleeping=!0,h.sleepCounter=h.sleepThreshold,h.positionImpulse.x=0,h.positionImpulse.y=0,h.positionPrev.x=h.position.x,h.positionPrev.y=h.position.y,h.anglePrev=h.angle,h.speed=0,h.angularSpeed=0,h.motion=0,u||g.trigger(h,"sleepStart")):(h.isSleeping=!1,h.sleepCounter=0,u&&g.trigger(h,"sleepEnd"))}},66280:(S,k,a)=>{var b={};S.exports=b;var T=a(41598),g=a(53402),f=a(22562),h=a(15647),c=a(31725);b.rectangle=function(u,m,d,p,v){v=v||{};var x={label:"Rectangle Body",position:{x:u,y:m},vertices:T.fromPath("L 0 0 L "+d+" 0 L "+d+" "+p+" L 0 "+p)};if(v.chamfer){var y=v.chamfer;x.vertices=T.chamfer(x.vertices,y.radius,y.quality,y.qualityMin,y.qualityMax),delete v.chamfer}return f.create(g.extend({},x,v))},b.trapezoid=function(u,m,d,p,v,x){x=x||{},v>=1&&g.warn("Bodies.trapezoid: slope parameter must be < 1.");var _=d*(v*=.5),E=_+(1-2*v)*d,A=E+_,I={label:"Trapezoid Body",position:{x:u,y:m},vertices:T.fromPath(v<.5?"L 0 0 L "+_+" "+-p+" L "+E+" "+-p+" L "+A+" 0":"L 0 0 L "+E+" "+-p+" L "+A+" 0")};if(x.chamfer){var R=x.chamfer;I.vertices=T.chamfer(I.vertices,R.radius,R.quality,R.qualityMin,R.qualityMax),delete x.chamfer}return f.create(g.extend({},I,x))},b.circle=function(u,m,d,p,v){p=p||{};var x={label:"Circle Body",circleRadius:d};v=v||25;var y=Math.ceil(Math.max(10,Math.min(v,d)));return y%2==1&&(y+=1),b.polygon(u,m,y,d,g.extend({},x,p))},b.polygon=function(u,m,d,p,v){if(v=v||{},d<3)return b.circle(u,m,p,v);for(var x=2*Math.PI/d,y="",_=.5*x,E=0;E0&&T.area(ot)1?(D=f.create(g.extend({parts:I.slice(0)},p)),f.setPosition(D,{x:u,y:m}),D):I[0]},b.flagCoincidentParts=function(u,m){void 0===m&&(m=5);for(var d=0;d{var b={};S.exports=b;var T=a(69351),g=a(48140),f=a(53402),h=a(22562),c=a(66280);b.stack=function(u,m,d,p,v,x,y){for(var D,_=T.create({label:"Stack"}),E=u,A=m,I=0,R=0;RF&&(F=B),h.translate(V,{x:.5*(V.bounds.max.x-V.bounds.min.x),y:.5*B}),E=V.bounds.max.x+v,T.addBody(_,V),D=V,I+=1}else E+=v}A+=F+x,E=u}return _},b.chain=function(u,m,d,p,v,x){for(var y=u.bodies,_=1;_0)for(_=0;_0&&T.addConstraint(u,g.create(f.extend({bodyA:x[_-1+(y-1)*m],bodyB:A},v))),p&&_F||A<(D=F-D)||A>d-1-D))return 1===R&&h.translate(I,{x:(A+(d%2==1?1:-1))*N,y:0}),y(u+(I?A*N:0)+A*v,E,A,D,I,R)})},b.newtonsCradle=function(u,m,d,p,v){for(var x=T.create({label:"Newtons Cradle"}),y=0;y{var b={};S.exports=b;var T=a(31725),g=a(53402);b.fromVertices=function(f){for(var h={},c=0;c{var k={};S.exports=k,k.create=function(a){var b={min:{x:0,y:0},max:{x:0,y:0}};return a&&k.update(b,a),b},k.update=function(a,b,T){a.min.x=1/0,a.max.x=-1/0,a.min.y=1/0,a.max.y=-1/0;for(var g=0;ga.max.x&&(a.max.x=f.x),f.xa.max.y&&(a.max.y=f.y),f.y0?a.max.x+=T.x:a.min.x+=T.x,T.y>0?a.max.y+=T.y:a.min.y+=T.y)},k.contains=function(a,b){return b.x>=a.min.x&&b.x<=a.max.x&&b.y>=a.min.y&&b.y<=a.max.y},k.overlaps=function(a,b){return a.min.x<=b.max.x&&a.max.x>=b.min.x&&a.max.y>=b.min.y&&a.min.y<=b.max.y},k.translate=function(a,b){a.min.x+=b.x,a.max.x+=b.x,a.min.y+=b.y,a.max.y+=b.y},k.shift=function(a,b){var T=a.max.x-a.min.x,g=a.max.y-a.min.y;a.min.x=b.x,a.max.x=b.x+T,a.min.y=b.y,a.max.y=b.y+g},k.wrap=function(a,b,T){var g=null,f=null;if(typeof b.min.x<"u"&&typeof b.max.x<"u"&&(a.min.x>b.max.x?g=b.min.x-a.max.x:a.max.xb.max.y?f=b.min.y-a.max.y:a.max.y{var b={};S.exports=b,a(15647);var g=a(53402);b.pathToVertices=function(f,h){typeof window<"u"&&!("SVGPathSeg"in window)&&g.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var c,u,m,d,p,v,x,y,_,D,I,A=[],R=0,F=0,N=0;h=h||15;var V=function(H,Q,G){var K=G%2==1&&G>1;if(!_||H!=_.x||Q!=_.y){_&&K?(D=_.x,I=_.y):(D=0,I=0);var q={x:D+H,y:I+Q};(K||!_)&&(_=q),A.push(q),F=D+H,N=I+Q}},B=function(H){var Q=H.pathSegTypeAsLetter.toUpperCase();if("Z"!==Q){switch(Q){case"M":case"L":case"T":case"C":case"S":case"Q":F=H.x,N=H.y;break;case"H":F=H.x;break;case"V":N=H.y}V(F,N,H.pathSegType)}};for(b._svgPathToAbsolute(f),m=f.getTotalLength(),v=[],c=0;c{var k={};S.exports=k,k.create=function(a,b){return{x:a||0,y:b||0}},k.clone=function(a){return{x:a.x,y:a.y}},k.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},k.magnitudeSquared=function(a){return a.x*a.x+a.y*a.y},k.rotate=function(a,b,T){var g=Math.cos(b),f=Math.sin(b);T||(T={});var h=a.x*g-a.y*f;return T.y=a.x*f+a.y*g,T.x=h,T},k.rotateAbout=function(a,b,T,g){var f=Math.cos(b),h=Math.sin(b);g||(g={});var c=T.x+((a.x-T.x)*f-(a.y-T.y)*h);return g.y=T.y+((a.x-T.x)*h+(a.y-T.y)*f),g.x=c,g},k.normalise=function(a){var b=k.magnitude(a);return 0===b?{x:0,y:0}:{x:a.x/b,y:a.y/b}},k.dot=function(a,b){return a.x*b.x+a.y*b.y},k.cross=function(a,b){return a.x*b.y-a.y*b.x},k.cross3=function(a,b,T){return(b.x-a.x)*(T.y-a.y)-(b.y-a.y)*(T.x-a.x)},k.add=function(a,b,T){return T||(T={}),T.x=a.x+b.x,T.y=a.y+b.y,T},k.sub=function(a,b,T){return T||(T={}),T.x=a.x-b.x,T.y=a.y-b.y,T},k.mult=function(a,b){return{x:a.x*b,y:a.y*b}},k.div=function(a,b){return{x:a.x/b,y:a.y/b}},k.perp=function(a,b){return{x:(b=!0===b?-1:1)*-a.y,y:b*a.x}},k.neg=function(a){return{x:-a.x,y:-a.y}},k.angle=function(a,b){return Math.atan2(b.y-a.y,b.x-a.x)},k._temp=[k.create(),k.create(),k.create(),k.create(),k.create(),k.create()]},41598:(S,k,a)=>{var b={};S.exports=b;var T=a(31725),g=a(53402);b.create=function(f,h){for(var c=[],u=0;u0)return!1;d=p}return!0},b.scale=function(f,h,c,u){if(1===h&&1===c)return f;u=u||b.centre(f);for(var d,p=0;p=0?p-1:f.length-1],x=f[p],y=f[(p+1)%f.length],_=h[p0&&(h|=2),3===h)return!1;return 0!==h||null},b.hull=function(f){var u,m,h=[],c=[];for((f=f.slice(0)).sort(function(d,p){var v=d.x-p.x;return 0!==v?v:d.y-p.y}),m=0;m=2&&T.cross3(c[c.length-2],c[c.length-1],u)<=0;)c.pop();c.push(u)}for(m=f.length-1;m>=0;m-=1){for(u=f[m];h.length>=2&&T.cross3(h[h.length-2],h[h.length-1],u)<=0;)h.pop();h.push(u)}return h.pop(),c.pop(),h.concat(c)}},55973:S=>{function k(J,it,Y){var nt,ht,gt,wt,St,Bt,Yt,j=[0,0];return gt=(nt=J[1][1]-J[0][1])*J[0][0]+(ht=J[0][0]-J[1][0])*J[0][1],Bt=(wt=it[1][1]-it[0][1])*it[0][0]+(St=it[0][0]-it[1][0])*it[0][1],at(Yt=nt*St-wt*ht,0,Y=Y||0)||(j[0]=(St*gt-ht*Bt)/Yt,j[1]=(nt*Bt-wt*gt)/Yt),j}function a(J,it,Y,j){var nt=it[0]-J[0],ht=it[1]-J[1],gt=j[0]-Y[0],wt=j[1]-Y[1];if(gt*ht-wt*nt==0)return!1;var St=(nt*(Y[1]-J[1])+ht*(J[0]-Y[0]))/(gt*ht-wt*nt),Bt=(gt*(J[1]-Y[1])+wt*(Y[0]-J[0]))/(wt*nt-gt*ht);return St>=0&&St<=1&&Bt>=0&&Bt<=1}function b(J,it,Y){return(it[0]-J[0])*(Y[1]-J[1])-(Y[0]-J[0])*(it[1]-J[1])}function T(J,it,Y){return b(J,it,Y)>0}function g(J,it,Y){return b(J,it,Y)>=0}function f(J,it,Y){return b(J,it,Y)<0}function h(J,it,Y){return b(J,it,Y)<=0}S.exports={decomp:function V(J){var it=N(J);return it.length>0?B(J,it):[J]},quickDecomp:function G(J,it,Y,j,nt,ht,gt){gt=gt||0,nt=nt||25,it=typeof it<"u"?it:[],Y=Y||[],j=j||[];var wt=[0,0],St=[0,0],Bt=[0,0],Yt=0,$t=0,qt=0,ne=0,le=0,Me=0,pi=0,Ie=[],_i=[],be=J,ni=J;if(ni.length<3)return it;if(++gt>(ht=ht||100))return console.warn("quickDecomp: max level ("+ht+") reached."),it;for(var Ke=0;Kele&&(le+=J.length),ne=Number.MAX_VALUE,le3&&j>=0;--j)m(p(J,j-1),p(J,j),p(J,j+1),it)&&(J.splice(j%J.length,1),Y++);return Y},removeDuplicatePoints:function q(J,it){for(var Y=J.length-1;Y>=1;--Y)for(var j=J[Y],nt=Y-1;nt>=0;--nt)if(ot(j,J[nt],it)){J.splice(Y,1);continue}},makeCCW:function y(J){for(var it=0,Y=J,j=1;jY[it][0])&&(it=j);return!T(p(J,it-1),p(J,it),p(J,it+1))&&(function _(J){for(var it=[],Y=J.length,j=0;j!==Y;j++)it.push(J.pop());for(j=0;j!==Y;j++)J[j]=it[j]}(J),!0)}};var c=[],u=[];function m(J,it,Y,j){if(j){var nt=c,ht=u;nt[0]=it[0]-J[0],nt[1]=it[1]-J[1],ht[0]=Y[0]-it[0],ht[1]=Y[1]-it[1];var gt=nt[0]*ht[0]+nt[1]*ht[1],wt=Math.sqrt(nt[0]*nt[0]+nt[1]*nt[1]),St=Math.sqrt(ht[0]*ht[0]+ht[1]*ht[1]);return Math.acos(gt/(wt*St)){var T=new(a(83419))({initialize:function(f){this.pluginManager=f,this.game=f.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});S.exports=T},42363:S=>{S.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},37277:S=>{var k={},a={};S.exports={register:function(T,g,f,h){void 0===h&&(h=!1),k[T]={plugin:g,mapping:f,custom:h}},registerCustom:function(T,g,f,h){a[T]={plugin:g,mapping:f,data:h}},hasCore:function(T){return k.hasOwnProperty(T)},hasCustom:function(T){return a.hasOwnProperty(T)},getCore:function(T){return k[T]},getCustom:function(T){return a[T]},getCustomClass:function(T){return a.hasOwnProperty(T)?a[T].plugin:null},remove:function(T){k.hasOwnProperty(T)&&delete k[T]},removeCustom:function(T){a.hasOwnProperty(T)&&delete a[T]},destroyCorePlugins:function(){for(var T in k)k.hasOwnProperty(T)&&delete k[T]},destroyCustomPlugins:function(){for(var T in a)a.hasOwnProperty(T)&&delete a[T]}}},77332:(S,k,a)=>{var b=a(83419),T=a(8443),g=a(50792),f=a(74099),h=a(44603),c=a(39429),u=a(95540),m=a(37277),d=a(72905),p=new b({Extends:g,initialize:function(x){g.call(this),this.game=x,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],x.isBooted?this.boot():x.events.once(T.BOOT,this.boot,this)},boot:function(){var v,x,y,_,E,A,D,I=this.game.config,R=I.installGlobalPlugins;for(R=R.concat(this._pendingGlobal),v=0;v{var b=a(52018),T=a(83419),g=a(44594),f=new T({Extends:b,initialize:function(c,u,m){b.call(this,u),this.scene=c,this.systems=c.sys,this.pluginKey=m,c.sys.events.once(g.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});S.exports=f},18922:(S,k,a)=>{S.exports={BasePlugin:a(52018),DefaultPlugins:a(42363),PluginCache:a(37277),PluginManager:a(77332),ScenePlugin:a(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(S){const k=performance.now(),a=this.getVideoPlaybackQuality(),b=this.mozPresentedFrames||this.mozPaintedFrames||a.totalVideoFrames-a.droppedVideoFrames,T=(g,f)=>{const h=this.getVideoPlaybackQuality(),c=this.mozPresentedFrames||this.mozPaintedFrames||h.totalVideoFrames-h.droppedVideoFrames;if(c>b){const u=this.mozFrameDelay||h.totalFrameDelay-a.totalFrameDelay||0,m=f-g;S(f,{presentationTime:f+1e3*u,expectedDisplayTime:f+m,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+m/1e3,presentedFrames:c,processingDuration:u}),delete this._rvfcpolyfillmap[k]}else this._rvfcpolyfillmap[k]=requestAnimationFrame(u=>T(f,u))};return this._rvfcpolyfillmap[k]=requestAnimationFrame(g=>T(k,g)),k},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(S){cancelAnimationFrame(this._rvfcpolyfillmap[S]),delete this._rvfcpolyfillmap[S]})},10312:S=>{S.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:S=>{S.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},68627:(S,k,a)=>{var b=a(19715),T=a(32880),g=a(83419),f=a(8054),h=a(50792),c=a(92503),u=a(56373),m=a(97480),d=a(69442),p=a(61340),v=new g({Extends:h,initialize:function(y){h.call(this);var _=y.config;this.config={clearBeforeRender:_.clearBeforeRender,backgroundColor:_.backgroundColor,antialias:_.antialias,roundPixels:_.roundPixels},this.game=y,this.type=f.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=y.canvas,this.gameContext=_.context?_.context:this.gameCanvas.getContext("2d",{alpha:y.config.transparent,desynchronized:y.config.desynchronized,willReadFrequently:!1}),this.currentContext=this.gameContext,this.antialias=y.config.antialias,this.blendModes=u(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(d.READY,this.boot,this)},boot:function(){var x=this.game,y=x.scale.baseSize;this.width=y.width,this.height=y.height,this.isBooted=!0,x.scale.on(m.RESIZE,this.onResize,this),this.resize(y.width,y.height)},onResize:function(x,y){(y.width!==this.width||y.height!==this.height)&&this.resize(y.width,y.height)},resize:function(x,y){this.width=x,this.height=y,this.emit(c.RESIZE,x,y)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(x){return this.currentContext.globalCompositeOperation=x,this},setContext:function(x){return this.currentContext=x||this.gameContext,this},setAlpha:function(x){return this.currentContext.globalAlpha=x,this},preRender:function(){var x=this.gameContext,y=this.config,_=this.width,E=this.height;x.globalAlpha=1,x.globalCompositeOperation="source-over",x.setTransform(1,0,0,1,0,0),this.emit(c.PRE_RENDER_CLEAR),y.clearBeforeRender&&(x.clearRect(0,0,_,E),y.transparent||(x.fillStyle=y.backgroundColor.rgba,x.fillRect(0,0,_,E))),x.save(),this.drawCount=0,this.emit(c.PRE_RENDER)},render:function(x,y,_){var E=y.length;this.emit(c.RENDER,x,_);var A=_.x,D=_.y,I=_.width,R=_.height,F=_.renderToTexture?_.context:x.sys.context;F.save(),this.game.scene.customViewports&&(F.beginPath(),F.rect(A,D,I,R),F.clip()),_.emit(b.PRE_RENDER,_),this.currentContext=F;var N=_.mask;N&&N.preRenderCanvas(this,null,_._maskCamera),_.transparent||(F.fillStyle=_.backgroundColor.rgba,F.fillRect(A,D,I,R)),F.globalAlpha=_.alpha,F.globalCompositeOperation="source-over",this.drawCount+=E,_.renderToTexture&&_.emit(b.PRE_RENDER,_),_.matrix.copyToContext(F);for(var V=0;V=0?at=-(at+B):at<0&&(at=Math.abs(at)-B)),x.flipY&&(ot>=0?ot=-(ot+H):ot<0&&(ot=Math.abs(ot)-H))}var it=1,Y=1;x.flipX&&(Q||(at+=2*K-y.realWidth),it=-1),x.flipY&&(Q||(ot+=2*q-y.realHeight),Y=-1);var j=x.x,nt=x.y;if(_.roundPixels&&(j=Math.floor(j),nt=Math.floor(nt)),R.applyITRS(j,nt,x.rotation,x.scaleX*it,x.scaleY*Y),I.copyFrom(_.matrix),E?(I.multiplyWithOffset(E,-_.scrollX*x.scrollFactorX,-_.scrollY*x.scrollFactorY),R.e=j,R.f=nt):(R.e-=_.scrollX*x.scrollFactorX,R.f-=_.scrollY*x.scrollFactorY),I.multiply(R),_.renderRoundPixels&&(I.e=Math.floor(I.e+.5),I.f=Math.floor(I.f+.5)),D.save(),I.setToContext(D),D.globalCompositeOperation=this.blendModes[x.blendMode],D.globalAlpha=A,D.imageSmoothingEnabled=!y.source.scaleMode,x.mask&&x.mask.preRenderCanvas(this,x,_),B>0&&H>0){var ht=B/G,gt=H/G;_.roundPixels&&(at=Math.floor(at+.5),ot=Math.floor(ot+.5),ht+=.5,gt+=.5),D.drawImage(y.source.image,N,V,B,H,at,ot,ht,gt)}x.mask&&x.mask.postRenderCanvas(this,x,_),D.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});S.exports=v},55830:(S,k,a)=>{S.exports={CanvasRenderer:a(68627),GetBlendModes:a(56373),SetTransform:a(20926)}},56373:(S,k,a)=>{var b=a(10312),T=a(89289);S.exports=function(){var f=[],h=T.supportNewBlendModes,c="source-over";return f[b.NORMAL]=c,f[b.ADD]="lighter",f[b.MULTIPLY]=h?"multiply":c,f[b.SCREEN]=h?"screen":c,f[b.OVERLAY]=h?"overlay":c,f[b.DARKEN]=h?"darken":c,f[b.LIGHTEN]=h?"lighten":c,f[b.COLOR_DODGE]=h?"color-dodge":c,f[b.COLOR_BURN]=h?"color-burn":c,f[b.HARD_LIGHT]=h?"hard-light":c,f[b.SOFT_LIGHT]=h?"soft-light":c,f[b.DIFFERENCE]=h?"difference":c,f[b.EXCLUSION]=h?"exclusion":c,f[b.HUE]=h?"hue":c,f[b.SATURATION]=h?"saturation":c,f[b.COLOR]=h?"color":c,f[b.LUMINOSITY]=h?"luminosity":c,f[b.ERASE]="destination-out",f[b.SOURCE_IN]="source-in",f[b.SOURCE_OUT]="source-out",f[b.SOURCE_ATOP]="source-atop",f[b.DESTINATION_OVER]="destination-over",f[b.DESTINATION_IN]="destination-in",f[b.DESTINATION_OUT]="destination-out",f[b.DESTINATION_ATOP]="destination-atop",f[b.LIGHTER]="lighter",f[b.COPY]="copy",f[b.XOR]="xor",f}},20926:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c,u){var m=c.alpha*h.alpha;if(m<=0)return!1;var d=b(h,c,u).calc;return f.globalCompositeOperation=g.blendModes[h.blendMode],f.globalAlpha=m,f.save(),d.setToContext(f),f.imageSmoothingEnabled=h.frame?!h.frame.source.scaleMode:g.antialias,!0}},63899:S=>{S.exports="losewebgl"},6119:S=>{S.exports="postrender"},48070:S=>{S.exports="prerender"},15640:S=>{S.exports="render"},8912:S=>{S.exports="resize"},87124:S=>{S.exports="restorewebgl"},92503:(S,k,a)=>{S.exports={LOSE_WEBGL:a(63899),POST_RENDER:a(6119),PRE_RENDER:a(48070),RENDER:a(15640),RESIZE:a(8912),RESTORE_WEBGL:a(87124)}},36909:(S,k,a)=>{S.exports={Events:a(92503),Snapshot:a(89966)},S.exports.Canvas=a(55830),S.exports.WebGL=a(4159)},32880:(S,k,a)=>{var b=a(27919),T=a(40987),g=a(95540);S.exports=function(h,c){var u=g(c,"callback"),m=g(c,"type","image/png"),d=g(c,"encoder",.92),p=Math.abs(Math.round(g(c,"x",0))),v=Math.abs(Math.round(g(c,"y",0))),x=Math.floor(g(c,"width",h.width)),y=Math.floor(g(c,"height",h.height));if(g(c,"getPixel",!1)){var D=h.getContext("2d",{willReadFrequently:!1}).getImageData(p,v,1,1).data;u.call(null,new T(D[0],D[1],D[2],D[3]))}else if(0!==p||0!==v||x!==h.width||y!==h.height){var I=b.createWebGL(this,x,y),R=I.getContext("2d",{willReadFrequently:!0});x>0&&y>0&&R.drawImage(h,p,v,x,y,0,0,x,y);var F=new Image;F.onerror=function(){u.call(null),b.remove(I)},F.onload=function(){u.call(null,F),b.remove(I)},F.src=I.toDataURL(m,d)}else{var N=new Image;N.onerror=function(){u.call(null)},N.onload=function(){u.call(null,N)},N.src=h.toDataURL(m,d)}}},88815:(S,k,a)=>{var b=a(27919),T=a(40987),g=a(95540);S.exports=function(h,c){var u=h,m=g(c,"callback"),d=g(c,"type","image/png"),p=g(c,"encoder",.92),v=Math.abs(Math.round(g(c,"x",0))),x=Math.abs(Math.round(g(c,"y",0))),y=g(c,"getPixel",!1),_=g(c,"isFramebuffer",!1),E=_?g(c,"bufferWidth",1):u.drawingBufferWidth,A=_?g(c,"bufferHeight",1):u.drawingBufferHeight;if(y){var D=new Uint8Array(4);u.readPixels(v,_?x:A-x,1,1,u.RGBA,u.UNSIGNED_BYTE,D),m.call(null,new T(D[0],D[1],D[2],D[3]))}else{var R=Math.floor(g(c,"width",E)),F=Math.floor(g(c,"height",A)),N=R*F*4,V=new Uint8Array(N);u.readPixels(v,A-x-F,R,F,u.RGBA,u.UNSIGNED_BYTE,V);for(var B=b.createWebGL(this,R,F),H=B.getContext("2d",{willReadFrequently:!0}),Q=H.getImageData(0,0,R,F),G=Q.data,K=0;K{S.exports={Canvas:a(32880),WebGL:a(88815)}},7530:(S,k,a)=>{var b=a(83419),T=a(36060),g=a(90330),f=a(82264),h=a(95540),c=a(32302),u=a(63448),m=a(31302),d=a(58918),p=a(14811),v=a(92651),x=a(96569),y=a(56527),_=a(57516),E=a(43439),A=a(81041),D=a(12385),I=a(7589),R=a(95428),F=a(72905),N=new b({initialize:function(B){this.game=B.game,this.renderer=B,this.classes=new g([[T.UTILITY_PIPELINE,I],[T.MULTI_PIPELINE,_],[T.BITMAPMASK_PIPELINE,m],[T.SINGLE_PIPELINE,D],[T.ROPE_PIPELINE,A],[T.LIGHT_PIPELINE,x],[T.POINTLIGHT_PIPELINE,E],[T.MOBILE_PIPELINE,y]]),this.postPipelineClasses=new g,this.pipelines=new g,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(V,B,H){var Q=this.renderer,G=this.renderTargets;this.frameInc=Math.floor(h(V,"frameInc",32));var K=Q.width,q=Q.height,at=this.game.config.disablePreFX;if(this.game.config.disablePostFX||this.postPipelineClasses.setAll([[String(p.BARREL),d.Barrel],[String(p.BLOOM),d.Bloom],[String(p.BLUR),d.Blur],[String(p.BOKEH),d.Bokeh],[String(p.CIRCLE),d.Circle],[String(p.COLOR_MATRIX),d.ColorMatrix],[String(p.DISPLACEMENT),d.Displacement],[String(p.GLOW),d.Glow],[String(p.GRADIENT),d.Gradient],[String(p.PIXELATE),d.Pixelate],[String(p.SHADOW),d.Shadow],[String(p.SHINE),d.Shine],[String(p.VIGNETTE),d.Vignette],[String(p.WIPE),d.Wipe]]),!at){this.classes.set(T.FX_PIPELINE,v);for(var J=Math.min(K,q),it=Math.ceil(J/this.frameInc),Y=1;Y=0;H--){var Q=B[H];Q.active&&Q.preBatch(V)}}},postBatch:function(V){if(V.hasPostPipeline){this.flush();for(var B=V.postPipelines,H=0;H=0;H--){var Q=B[H];Q.active&&Q.preBatch(V)}}},postBatchCamera:function(V){if(V.hasPostPipeline){this.flush();for(var B=V.postPipelines,H=0;Hthis.maxDimension)return this.targetIndex=B.length-3,B[this.targetIndex];var Q=3*(u(V,this.frameInc,0,!0)-1);return this.targetIndex=Q,B[Q]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});S.exports=N},32302:(S,k,a)=>{var b=a(83419),T=a(92503),g=new b({initialize:function(h,c,u,m,d,p,v,x,y){void 0===m&&(m=1),void 0===d&&(d=0),void 0===p&&(p=!0),void 0===v&&(v=!1),void 0===x&&(x=!0),void 0===y&&(y=!0),this.renderer=h,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=m,this.minFilter=d,this.autoClear=p,this.autoResize=!0,this.hasDepthBuffer=x,this.forceClamp=y,this.init(c,u),v?this.renderer.on(T.RESIZE,this.resize,this):this.autoResize=!1},init:function(f,h){var c=this.renderer;this.texture=c.createTextureFromSource(null,f,h,this.minFilter,this.forceClamp),this.framebuffer=c.createFramebuffer(f,h,this.texture,this.hasDepthBuffer),this.width=f,this.height=h},setAutoResize:function(f){return f&&!this.autoResize?(this.renderer.on(T.RESIZE,this.resize,this),this.autoResize=!0):!f&&this.autoResize&&(this.renderer.off(T.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(f,h){if(this.autoResize&&this.willResize(f,h)){var c=this.renderer;c.deleteFramebuffer(this.framebuffer),c.deleteTexture(this.texture),this.texture=c.createTextureFromSource(null,f,h,this.minFilter,this.forceClamp),this.framebuffer=c.createFramebuffer(f,h,this.texture,this.hasDepthBuffer),this.width=f,this.height=h}return this},willResize:function(f,h){return"number"==typeof f&&"number"==typeof h&&(f=Math.round(f*this.scale),h=Math.round(h*this.scale),f=Math.max(f,1),h=Math.max(h,1),f!==this.width||h!==this.height)},bind:function(f,h,c){void 0===f&&(f=!1);var u=this.renderer;if(f&&u.flush(),h&&c&&this.resize(h,c),u.pushFramebuffer(this.framebuffer,!1,!1),f&&this.adjustViewport(),this.autoClear){var m=this.renderer.gl;m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT)}u.clearStencilMask()},adjustViewport:function(){var f=this.renderer.gl;f.viewport(0,0,this.width,this.height),f.disable(f.SCISSOR_TEST)},clear:function(f,h,c,u){var m=this.renderer,d=m.gl;m.pushFramebuffer(this.framebuffer),void 0!==f&&void 0!==h&&void 0!==c&&void 0!==u?(d.enable(d.SCISSOR_TEST),d.scissor(f,h,c,u)):d.disable(d.SCISSOR_TEST),d.clearColor(0,0,0,0),d.clear(d.COLOR_BUFFER_BIT),m.popFramebuffer(),m.resetScissor()},unbind:function(f){void 0===f&&(f=!1);var h=this.renderer;return f&&h.flush(),h.popFramebuffer()},destroy:function(){var f=this.renderer;f.off(T.RESIZE,this.resize,this),f.deleteFramebuffer(this.framebuffer),f.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});S.exports=g},70554:S=>{S.exports={getTintFromFloats:function(k,a,b,T){return((255*T&255)<<24|(255*k&255)<<16|(255*a&255)<<8|255*b&255)>>>0},getTintAppendFloatAlpha:function(k,a){return((255*a&255)<<24|k)>>>0},getTintAppendFloatAlphaAndSwap:function(k,a){return((255*a&255)<<24|(255&k)<<16|(k>>8&255)<<8|k>>16&255)>>>0},getFloatsFromUintRGB:function(k){return[(k>>16&255)/255,(k>>8&255)/255,(255&k)/255]},checkShaderMax:function(k,a){var b=Math.min(16,k.getParameter(k.MAX_TEXTURE_IMAGE_UNITS));return a&&-1!==a?Math.min(b,a):b},parseFragmentShaderMaxTextures:function(k,a){if(!k)return"";for(var b="",T=0;T0&&(b+="\n\telse "),T{var b=a(83419),T=a(62644),g=a(50792),f=a(77085),h=a(95540),c=a(37867),u=a(92503),m=a(32302),d=a(70554),p=a(38683),v=new b({Extends:g,initialize:function(y){g.call(this);var _=y.game,E=_.renderer,A=E.gl;this.name=h(y,"name","WebGLPipeline"),this.game=_,this.renderer=E,this.gl=A,this.view=_.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.topology=h(y,"topology",A.TRIANGLES),this.active=!0,this.forceZero=h(y,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.shaders=[],this.projectionWidth=0,this.projectionHeight=0,this.config=y,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=h(y,"resizeUniform","")},boot:function(){var x,y=this.gl,_=this.config,E=this.renderer;this.isPostFX||(this.projectionMatrix=(new c).identity());var A=this.renderTargets,D=h(_,"renderTarget",!1);"boolean"==typeof D&&D&&(D=1);var I=E.width,R=E.height;if("number"==typeof D)for(x=0;xK&&(K=G[x].vertexSize);var q=h(_,"batchSize",E.config.batchSize);this.vertexCapacity=6*q;var at=new ArrayBuffer(this.vertexCapacity*K);this.vertexData=at,this.bytes=new Uint8Array(at),this.vertexViewF32=new Float32Array(at),this.vertexViewU32=new Uint32Array(at);var ot=h(_,"vertices",null);for(ot?(this.vertexViewF32.set(ot),this.vertexBuffer=E.createVertexBuffer(at,y.STATIC_DRAW)):this.vertexBuffer=E.createVertexBuffer(at.byteLength,y.DYNAMIC_DRAW),this.setVertexBuffer(),x=G.length-1;x>=0;x--)G[x].rebind();this.hasBooted=!0,E.on(u.RESIZE,this.resize,this),E.on(u.PRE_RENDER,this.onPreRender,this),E.on(u.RENDER,this.onRender,this),E.on(u.POST_RENDER,this.onPostRender,this),this.emit(f.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(x,y,_){return x===this.currentShader&&this.renderer.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(_)&&!y&&(y=!0),x.bind(y,!1),this.currentShader=x),this},getShaderByName:function(x){for(var y=this.shaders,_=0;_-1&&(G=J.substring(20))}K&&q&&H.push(new p(this,G,K,q,T(at)))}this.shaders=H}return 0===this.shaders.length?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(x){return this.currentBatch={start:this.vertexCount,count:0,texture:[x],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=x,this.batch.push(this.currentBatch),0},addTextureToBatch:function(x){var y=this.currentBatch;y&&(y.texture.push(x),y.unit++,y.maxUnit++)},pushBatch:function(x){if(!this.currentBatch||this.forceZero&&x!==this.currentTexture)return this.createBatch(x);if(x===this.currentTexture)return this.currentUnit;var y=this.currentBatch,_=y.texture.indexOf(x);return-1===_?y.texture.length===this.renderer.maxTextures?this.createBatch(x):(y.unit++,y.maxUnit++,y.texture.push(x),this.currentUnit=y.unit,this.currentTexture=x,y.unit):(this.currentUnit=_,this.currentTexture=x,_)},setGameObject:function(x,y){return void 0===y&&(y=x.frame),this.pushBatch(y.source.glTexture)},shouldFlush:function(x){return void 0===x&&(x=0),this.vertexCount+x>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(x,y){(x!==this.width||y!==this.height)&&this.flush(),this.width=x,this.height=y;for(var _=this.renderTargets,E=0;E<_.length;E++)_[E].resize(x,y);return this.setProjectionMatrix(x,y),this.resizeUniform&&this.set2f(this.resizeUniform,x,y),this.emit(f.RESIZE,x,y,this),this.onResize(x,y),this},setProjectionMatrix:function(x,y){var _=this.projectionMatrix;if(!_)return this;this.projectionWidth=x,this.projectionHeight=y,_.ortho(0,x,y,0,-1e3,1e3);for(var E=this.shaders,A="uProjectionMatrix",D=0;D=0;_--){var E=y[_].rebind();(!x||E===x)&&(this.currentShader=E)}return this.activeTextures.length=0,this.emit(f.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var x=this.shaders,y=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,y&&this.setVertexBuffer();for(var _=0;_0){this.emit(f.BEFORE_FLUSH,this,x),this.onBeforeFlush(x);var y=this.gl,_=this.vertexCount,E=this.currentShader.vertexSize,A=this.topology;if(this.active){this.setVertexBuffer(),_===this.vertexCapacity?y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.DYNAMIC_DRAW):y.bufferSubData(y.ARRAY_BUFFER,0,this.bytes.subarray(0,_*E));var D,I,R,F=this.batch,N=this.activeTextures;if(this.forceZero)for(N[0]||y.activeTexture(y.TEXTURE0),D=0;D{var b=a(95428),T=a(72905),g=a(19715),f=a(83419),h=a(8054),c=a(50792),u=a(92503),m=a(50030),d=a(37867),p=a(29747),v=a(7530),x=a(32302),y=a(97480),_=a(69442),E=a(70554),A=a(88815),D=a(26128),I=a(1482),R=a(82751),F=a(84387),N=a(93567),V=a(57183),Q=new f({Extends:c,initialize:function(K){c.call(this);var q=K.config;this.config={clearBeforeRender:q.clearBeforeRender,antialias:q.antialias,backgroundColor:q.backgroundColor,contextCreation:{alpha:q.transparent,desynchronized:q.desynchronized,depth:!0,antialias:q.antialiasGL,premultipliedAlpha:q.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:q.failIfMajorPerformanceCaveat,powerPreference:q.powerPreference,preserveDrawingBuffer:q.preserveDrawingBuffer,willReadFrequently:!1},roundPixels:q.roundPixels,maxTextures:q.maxTextures,maxTextureSize:q.maxTextureSize,batchSize:q.batchSize,maxLights:q.maxLights,mipmapFilter:q.mipmapFilter},this.game=K,this.type=h.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=K.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=p,this.contextRestoredHandler=p,this.previousContextLostHandler=p,this.previousContextRestoredHandler=p,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(G){var K,q=this.game,at=this.canvas,ot=G.backgroundColor;if(!(K=q.config.context?q.config.context:at.getContext("webgl",G.contextCreation)||at.getContext("experimental-webgl",G.contextCreation))||K.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=K,this.setExtensions(),this.setContextHandlers(),q.context=K;for(var J=0;J<=27;J++)this.blendModes.push({func:[K.ONE,K.ONE_MINUS_SRC_ALPHA],equation:K.FUNC_ADD});return this.blendModes[1].func=[K.ONE,K.DST_ALPHA],this.blendModes[2].func=[K.DST_COLOR,K.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[K.ONE,K.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[K.ZERO,K.ONE_MINUS_SRC_ALPHA],equation:K.FUNC_REVERSE_SUBTRACT},this.glFormats=[K.BYTE,K.SHORT,K.UNSIGNED_BYTE,K.UNSIGNED_SHORT,K.FLOAT],this.glFuncMap={mat2:{func:K.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:K.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:K.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:K.uniform1f,length:1},"1fv":{func:K.uniform1fv,length:1},"1i":{func:K.uniform1i,length:1},"1iv":{func:K.uniform1iv,length:1},"2f":{func:K.uniform2f,length:2},"2fv":{func:K.uniform2fv,length:1},"2i":{func:K.uniform2i,length:2},"2iv":{func:K.uniform2iv,length:1},"3f":{func:K.uniform3f,length:3},"3fv":{func:K.uniform3fv,length:1},"3i":{func:K.uniform3i,length:3},"3iv":{func:K.uniform3iv,length:1},"4f":{func:K.uniform4f,length:4},"4fv":{func:K.uniform4fv,length:1},"4i":{func:K.uniform4i,length:4},"4iv":{func:K.uniform4iv,length:1}},(!G.maxTextures||-1===G.maxTextures)&&(G.maxTextures=K.getParameter(K.MAX_TEXTURE_IMAGE_UNITS)),G.maxTextureSize||(G.maxTextureSize=K.getParameter(K.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),K.disable(K.DEPTH_TEST),K.disable(K.CULL_FACE),K.enable(K.BLEND),K.clearColor(ot.redGL,ot.greenGL,ot.blueGL,ot.alphaGL),-1!==["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"].indexOf(G.mipmapFilter)&&(this.mipmapFilter=K[G.mipmapFilter]),this.maxTextures=E.checkShaderMax(K,G.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new v(this),this.setBlendMode(h.BlendModes.NORMAL),this.projectionMatrix=(new d).identity(),q.textures.once(_.READY,this.boot,this),this},boot:function(){var G=this.game,K=this.pipelines,q=G.scale.baseSize,at=q.width,ot=q.height;this.width=at,this.height=ot,this.isBooted=!0,this.renderTarget=new x(this,at,ot,1,0,!0,!0),this.maskTarget=new x(this,at,ot,1,0,!0,!0),this.maskSource=new x(this,at,ot,1,0,!0,!0);var J=G.config;K.boot(J.pipeline,J.defaultPipeline,J.autoMobilePipeline),this.blankTexture=G.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=G.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=G.textures.getFrame("__WHITE").glTexture;var it=this.gl;it.bindFramebuffer(it.FRAMEBUFFER,null),it.enable(it.SCISSOR_TEST),G.scale.on(y.RESIZE,this.onResize,this),this.resize(at,ot)},setExtensions:function(){var G=this.gl,K=G.getSupportedExtensions();this.supportedExtensions=K;var q="ANGLE_instanced_arrays";this.instancedArraysExtension=K.indexOf(q)>-1?G.getExtension(q):null;var at="OES_vertex_array_object";this.vaoExtension=K.indexOf(at)>-1?G.getExtension(at):null},setContextHandlers:function(G,K){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),this.contextLostHandler="function"==typeof G?G.bind(this):this.dispatchContextLost.bind(this),this.contextRestoredHandler="function"==typeof K?K.bind(this):this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(G){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(u.LOSE_WEBGL,this),G.preventDefault()},dispatchContextRestored:function(G){var K=this.gl;if(K.isContextLost())console&&console.log("WebGL Context restored, but context is still lost");else{this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(h.BlendModes.NORMAL),K.disable(K.BLEND),K.disable(K.DEPTH_TEST),K.enable(K.CULL_FACE),this.compression=this.getCompressedTextures();var q=function(at){at.createResource()};b(this.glTextureWrappers,q),b(this.glBufferWrappers,q),b(this.glFramebufferWrappers,q),b(this.glProgramWrappers,q),b(this.glAttribLocationWrappers,q),b(this.glUniformLocationWrappers,q),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(u.RESTORE_WEBGL,this),G.preventDefault()}},createTemporaryTextures:function(){for(var G=this.gl,K=0;K0&&at>0;it&&Y&&(Y=it[0]!==G||it[1]!==K||it[2]!==q||it[3]!==at),Y&&(this.flush(),J.scissor(G,ot-K-at,q,at))},resetScissor:function(){var G=this.gl;G.enable(G.SCISSOR_TEST);var K=this.currentScissor;if(K){var ot=K[2],J=K[3];ot>0&&J>0&&G.scissor(K[0],this.drawingBufferHeight-K[1]-J,ot,J)}},popScissor:function(){var G=this.scissorStack;G.pop();var K=G[G.length-1];K&&this.setScissor(K[0],K[1],K[2],K[3]),this.currentScissor=K},hasActiveStencilMask:function(){var G=this.currentMask.mask,K=this.currentCameraMask.mask;return G&&G.isStencil||K&&K.isStencil},resetViewport:function(){var G=this.gl;G.viewport(0,0,this.width,this.height),this.drawingBufferHeight=G.drawingBufferHeight},setBlendMode:function(G,K){void 0===K&&(K=!1);var q=this.gl,at=this.blendModes[G];return!!(K||G!==h.BlendModes.SKIP_CHECK&&this.currentBlendMode!==G)&&(this.flush(),q.enable(q.BLEND),q.blendEquation(at.equation),at.func.length>2?q.blendFuncSeparate(at.func[0],at.func[1],at.func[2],at.func[3]):q.blendFunc(at.func[0],at.func[1]),this.currentBlendMode=G,!0)},addBlendMode:function(G,K){return this.blendModes.push({func:G,equation:K})-1},updateBlendMode:function(G,K,q){return this.blendModes[G]&&(this.blendModes[G].func=K,q&&(this.blendModes[G].equation=q)),this},removeBlendMode:function(G){return G>17&&this.blendModes[G]&&this.blendModes.splice(G,1),this},pushFramebuffer:function(G,K,q,at,ot){return G===this.currentFramebuffer?this:(this.fboStack.push(G),this.setFramebuffer(G,K,q,at,ot))},setFramebuffer:function(G,K,q,at,ot){if(void 0===K&&(K=!1),void 0===q&&(q=!0),void 0===at&&(at=null),void 0===ot&&(ot=!1),G===this.currentFramebuffer)return this;var J=this.gl,it=this.width,Y=this.height;return G&&G.renderTexture&&q?(it=G.renderTexture.width,Y=G.renderTexture.height):this.flush(),J.bindFramebuffer(J.FRAMEBUFFER,G?G.webGLFramebuffer:null),q&&J.viewport(0,0,it,Y),at&&J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,at.webGLTexture,0),ot&&(J.clearColor(0,0,0,0),J.clear(J.COLOR_BUFFER_BIT)),K&&(G?(this.drawingBufferHeight=Y,this.pushScissor(0,0,it,Y)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=G,this},popFramebuffer:function(G,K){void 0===G&&(G=!1),void 0===K&&(K=!0);var q=this.fboStack;q.pop();var at=q[q.length-1];return at||(at=null),this.setFramebuffer(at,G,K),at},restoreFramebuffer:function(G,K){void 0===G&&(G=!1),void 0===K&&(K=!0);var q=this.fboStack,at=q[q.length-1];at||(at=null),this.currentFramebuffer=null,this.setFramebuffer(at,G,K)},setProgram:function(G){return G!==this.currentProgram&&(this.flush(),this.gl.useProgram(G.webGLProgram),this.currentProgram=G,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(G,K,q,at,ot){void 0===ot&&(ot=!1);var J=this.gl,it=J.NEAREST,Y=J.NEAREST,j=J.CLAMP_TO_EDGE,ht=m(K=G?G.width:K,q=G?G.height:q);if(ht&&!ot&&(j=J.REPEAT),at===h.ScaleModes.LINEAR&&this.config.antialias){var gt=G&&G.compressed;it=this.mipmapFilter&&(!gt&&ht||gt&&G.mipmaps.length>1)?this.mipmapFilter:J.LINEAR,Y=J.LINEAR}return G||"number"!=typeof K||"number"!=typeof q?this.createTexture2D(0,it,Y,j,j,J.RGBA,G):this.createTexture2D(0,it,Y,j,j,J.RGBA,null,K,q)},createTexture2D:function(G,K,q,at,ot,J,it,Y,j,nt,ht,gt){"number"!=typeof Y&&(Y=it?it.width:1),"number"!=typeof j&&(j=it?it.height:1);var wt=new R(this.gl,G,K,q,at,ot,J,it,Y,j,nt,ht,gt);return this.glTextureWrappers.push(wt),wt},createFramebuffer:function(G,K,q,at){this.currentFramebuffer=null;var ot=new F(this.gl,G,K,q,at);return this.glFramebufferWrappers.push(ot),ot},beginBitmapMask:function(G,K){this.gl&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==G&&(this.currentMask.mask=G,this.currentMask.camera=K))},drawBitmapMask:function(G,K,q){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),G.renderWebGL(this,G,K),this.maskSource.unbind(!0),this.maskTarget.unbind();var at=this.gl,ot=this.getCurrentStencilMask();ot?(at.enable(at.STENCIL_TEST),ot.mask.applyStencil(this,ot.camera,!0)):this.currentMask.mask=null,this.pipelines.set(q),at.activeTexture(at.TEXTURE0),at.bindTexture(at.TEXTURE_2D,this.maskTarget.texture.webGLTexture),at.activeTexture(at.TEXTURE1),at.bindTexture(at.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(G,K){var q=new I(this.gl,G,K);return this.glProgramWrappers.push(q),q},createVertexBuffer:function(G,K){var q=this.gl,at=new D(q,G,q.ARRAY_BUFFER,K);return this.glBufferWrappers.push(at),at},createAttribLocation:function(G,K){var q=new N(this.gl,G,K);return this.glAttribLocationWrappers.push(q),q},createUniformLocation:function(G,K){var q=new V(this.gl,G,K);return this.glUniformLocationWrappers.push(q),q},createIndexBuffer:function(G,K){var q=this.gl,at=new D(q,G,q.ELEMENT_ARRAY_BUFFER,K);return this.glBufferWrappers.push(at),at},deleteTexture:function(G){if(G)return T(this.glTextureWrappers,G),G.destroy(),this},deleteFramebuffer:function(G){return G?(T(this.fboStack,G),T(this.glFramebufferWrappers,G),G.destroy(),this):this},deleteProgram:function(G){return G&&(T(this.glProgramWrappers,G),G.destroy()),this},deleteAttribLocation:function(G){return G&&(T(this.glAttribLocationWrappers,G),G.destroy()),this},deleteUniformLocation:function(G){return G&&(T(this.glUniformLocationWrappers,G),G.destroy()),this},deleteBuffer:function(G){return G?(T(this.glBufferWrappers,G),G.destroy(),this):this},preRenderCamera:function(G){var K=G.x,q=G.y,at=G.width,ot=G.height,J=G.backgroundColor;G.emit(g.PRE_RENDER,G),this.pipelines.preBatchCamera(G),this.pushScissor(K,q,at,ot),G.mask&&(this.currentCameraMask.mask=G.mask,this.currentCameraMask.camera=G._maskCamera,G.mask.preRenderWebGL(this,G,G._maskCamera)),J.alphaGL>0&&this.pipelines.setMulti().drawFillRect(K,q,at,ot,E.getTintFromFloats(J.blueGL,J.greenGL,J.redGL,1),J.alphaGL)},getCurrentStencilMask:function(){var G=null,K=this.maskStack,q=this.currentCameraMask;return K.length>0?G=K[K.length-1]:q.mask&&q.mask.isStencil&&(G=q),G},postRenderCamera:function(G){var K=G.flashEffect,q=G.fadeEffect;if(K.isRunning||q.isRunning||q.isComplete){var at=this.pipelines.setMulti();K.postRenderWebGL(at,E.getTintFromFloats),q.postRenderWebGL(at,E.getTintFromFloats)}G.dirty=!1,this.popScissor(),G.mask&&(this.currentCameraMask.mask=null,G.mask.postRenderWebGL(this,G._maskCamera)),this.pipelines.postBatchCamera(G),G.emit(g.POST_RENDER,G)},preRender:function(){if(!this.contextLost){var G=this.gl;if(G.bindFramebuffer(G.FRAMEBUFFER,null),this.emit(u.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var K=this.config.backgroundColor;G.clearColor(K.redGL,K.greenGL,K.blueGL,K.alphaGL),G.clear(G.COLOR_BUFFER_BIT|G.DEPTH_BUFFER_BIT|G.STENCIL_BUFFER_BIT)}G.enable(G.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&G.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(u.PRE_RENDER)}},render:function(G,K,q){if(!this.contextLost){var at=K.length;if(this.emit(u.RENDER,G,q),this.preRenderCamera(q),0===at)return this.setBlendMode(h.BlendModes.NORMAL),void this.postRenderCamera(q);this.currentType="";for(var ot=this.currentMask,J=0;J{var b=a(83419),T=a(95428),g=a(95540),f=a(14500),h=new b({initialize:function(u,m,d,p,v){this.pipeline=u,this.name=m,this.renderer=u.renderer,this.gl=this.renderer.gl,this.fragSrc=p,this.vertSrc=d,this.program=this.renderer.createProgram(d,p),this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(v),this.createUniforms()},createAttributes:function(c){var u=0,m=0,d=[];this.vertexComponentCount=0;for(var p=0;p=0?(u.enableVertexAttribArray(F.webGLAttribLocation),u.vertexAttribPointer(F.webGLAttribLocation,_,E,R,d,A),y.enabled=!0,y.location=F):-1!==F.webGLAttribLocation&&u.disableVertexAttribArray(F.webGLAttribLocation)}else D?u.vertexAttribPointer(I.webGLAttribLocation,_,E,R,d,A):!D&&-1!==I&&I.webGLAttribLocation>-1&&(u.disableVertexAttribArray(I.webGLAttribLocation),y.location=-1)}return this},createUniforms:function(){var d,p,v,c=this.gl,u=this.program,m=this.uniforms,x=c.getProgramParameter(u.webGLProgram,c.ACTIVE_UNIFORMS);for(d=0;d0&&(p=p.substr(0,_),m.hasOwnProperty(p)||null!==(v=this.renderer.createUniformLocation(u,p))&&(m[p]={name:p,location:v,setter:null,value1:null,value2:null,value3:null,value4:null}))}}return this},syncUniforms:function(){var c=this.gl;for(var u in this.renderer.setProgram(this.program),this.uniforms){var m=this.uniforms[u];m.setter&&m.setter.call(c,m.location.webGLUniformLocation,m.value1,m.value2,m.value3,m.value4)}},hasUniform:function(c){return this.uniforms.hasOwnProperty(c)},resetUniform:function(c){var u=this.uniforms[c];return u&&(u.value1=null,u.value2=null,u.value3=null,u.value4=null),this},setUniform1:function(c,u,m,d){var p=this.uniforms[u];return p?((d||p.value1!==m)&&(p.setter||(p.setter=c),p.value1=m,this.renderer.setProgram(this.program),c.call(this.gl,p.location.webGLUniformLocation,m),this.pipeline.currentShader=this),this):this},setUniform2:function(c,u,m,d,p){var v=this.uniforms[u];return v?((p||v.value1!==m||v.value2!==d)&&(v.setter||(v.setter=c),v.value1=m,v.value2=d,this.renderer.setProgram(this.program),c.call(this.gl,v.location.webGLUniformLocation,m,d),this.pipeline.currentShader=this),this):this},setUniform3:function(c,u,m,d,p,v){var x=this.uniforms[u];return x?((v||x.value1!==m||x.value2!==d||x.value3!==p)&&(x.setter||(x.setter=c),x.value1=m,x.value2=d,x.value3=p,this.renderer.setProgram(this.program),c.call(this.gl,x.location.webGLUniformLocation,m,d,p),this.pipeline.currentShader=this),this):this},setUniform4:function(c,u,m,d,p,v,x){var y=this.uniforms[u];return y?((x||y.value1!==m||y.value2!==d||y.value3!==p||y.value4!==v)&&(y.setter||(y.setter=c),y.value1=m,y.value2=d,y.value3=p,y.value4=v,this.renderer.setProgram(this.program),c.call(this.gl,y.location.webGLUniformLocation,m,d,p,v),this.pipeline.currentShader=this),this):this},setBoolean:function(c,u){return this.setUniform1(this.gl.uniform1i,c,Number(u))},set1f:function(c,u){return this.setUniform1(this.gl.uniform1f,c,u)},set2f:function(c,u,m){return this.setUniform2(this.gl.uniform2f,c,u,m)},set3f:function(c,u,m,d){return this.setUniform3(this.gl.uniform3f,c,u,m,d)},set4f:function(c,u,m,d,p){return this.setUniform4(this.gl.uniform4f,c,u,m,d,p)},set1fv:function(c,u){return this.setUniform1(this.gl.uniform1fv,c,u,!0)},set2fv:function(c,u){return this.setUniform1(this.gl.uniform2fv,c,u,!0)},set3fv:function(c,u){return this.setUniform1(this.gl.uniform3fv,c,u,!0)},set4fv:function(c,u){return this.setUniform1(this.gl.uniform4fv,c,u,!0)},set1iv:function(c,u){return this.setUniform1(this.gl.uniform1iv,c,u,!0)},set2iv:function(c,u){return this.setUniform1(this.gl.uniform2iv,c,u,!0)},set3iv:function(c,u){return this.setUniform1(this.gl.uniform3iv,c,u,!0)},set4iv:function(c,u){return this.setUniform1(this.gl.uniform4iv,c,u,!0)},set1i:function(c,u){return this.setUniform1(this.gl.uniform1i,c,u)},set2i:function(c,u,m){return this.setUniform2(this.gl.uniform2i,c,u,m)},set3i:function(c,u,m,d){return this.setUniform3(this.gl.uniform3i,c,u,m,d)},set4i:function(c,u,m,d,p){return this.setUniform4(this.gl.uniform4i,c,u,m,d,p)},setMatrix2fv:function(c,u,m){return this.setUniform2(this.gl.uniformMatrix2fv,c,u,m,!0)},setMatrix3fv:function(c,u,m){return this.setUniform2(this.gl.uniformMatrix3fv,c,u,m,!0)},setMatrix4fv:function(c,u,m){return this.setUniform2(this.gl.uniformMatrix4fv,c,u,m,!0)},createProgram:function(c,u){return void 0===c&&(c=this.vertSrc),void 0===u&&(u=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=c,this.fragSrc=u,this.program=this.renderer.createProgram(c,u),this.createUniforms(),this.rebind()},destroy:function(){var c=this.renderer;T(this.uniforms,function(u){c.deleteUniformLocation(u.location)}),this.uniforms=null,T(this.attributes,function(u){c.deleteAttribLocation(u.location)}),this.attributes=null,c.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});S.exports=h},14500:S=>{S.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},4159:(S,k,a)=>{var b=a(14500),T=a(79291),g={PipelineManager:a(7530),Pipelines:a(96615),RenderTarget:a(32302),Utils:a(70554),WebGLPipeline:a(29100),WebGLRenderer:a(74797),WebGLShader:a(38683),Wrappers:a(9503)};g=T(!1,g,b),S.exports=g},31302:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(78908),f=a(85191),h=a(14500),c=a(29100),u=new b({Extends:c,initialize:function(d){d.fragShader=T(d,"fragShader",g),d.vertShader=T(d,"vertShader",f),d.batchSize=T(d,"batchSize",1),d.vertices=T(d,"vertices",[-1,1,-1,-7,7,1]),d.attributes=T(d,"attributes",[{name:"inPosition",size:2,type:h.FLOAT}]),c.call(this,d)},boot:function(){c.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(m,d){c.prototype.resize.call(this,m,d),this.set2f("uResolution",m,d)},beginMask:function(m,d,p){this.renderer.beginBitmapMask(m,p)},endMask:function(m,d,p){var v=this.gl,y=m.bitmapMask;y&&v&&(this.renderer.drawBitmapMask(y,d,this),p&&this.set2f("uResolution",p.width,p.height),this.set1i("uInvertMaskAlpha",m.invertAlpha),v.drawArrays(this.topology,0,3),p&&this.set2f("uResolution",this.width,this.height),v.bindTexture(v.TEXTURE_2D,null))}});S.exports=u},92651:(S,k,a)=>{var b=a(83419),T=a(58918),g=a(14811),f=a(95540),h=a(43558),c=a(89350),u=a(70554),m=new b({Extends:h,initialize:function(p){p.shaders=[u.setGlowQuality(c.FXGlowFrag,p.game),c.FXShadowFrag,c.FXPixelateFrag,c.FXVignetteFrag,c.FXShineFrag,c.FXBlurLowFrag,c.FXBlurMedFrag,c.FXBlurHighFrag,c.FXGradientFrag,c.FXBloomFrag,c.ColorMatrixFrag,c.FXCircleFrag,c.FXBarrelFrag,c.FXDisplacementFrag,c.FXWipeFrag,c.FXBokehFrag],h.call(this,p);var v=this.game;this.glow=new T.Glow(v),this.shadow=new T.Shadow(v),this.pixelate=new T.Pixelate(v),this.vignette=new T.Vignette(v),this.shine=new T.Shine(v),this.gradient=new T.Gradient(v),this.circle=new T.Circle(v),this.barrel=new T.Barrel(v),this.wipe=new T.Wipe(v),this.bokeh=new T.Bokeh(v);var x=[];x[g.GLOW]=this.onGlow,x[g.SHADOW]=this.onShadow,x[g.PIXELATE]=this.onPixelate,x[g.VIGNETTE]=this.onVignette,x[g.SHINE]=this.onShine,x[g.BLUR]=this.onBlur,x[g.GRADIENT]=this.onGradient,x[g.BLOOM]=this.onBloom,x[g.COLOR_MATRIX]=this.onColorMatrix,x[g.CIRCLE]=this.onCircle,x[g.BARREL]=this.onBarrel,x[g.DISPLACEMENT]=this.onDisplacement,x[g.WIPE]=this.onWipe,x[g.BOKEH]=this.onBokeh,this.fxHandlers=x},onDraw:function(d,p,v){this.source=d,this.target=p,this.swap=v;var x=d.width,y=d.height,_=this.tempSprite,E=this.fxHandlers;if(_&&_.preFX)for(var A=_.preFX.list,D=0;D{var b=a(83419),T=a(95540),g=a(31063),f=a(57516),h=a(61340),c=a(26099),u=a(29100),m=new b({Extends:f,initialize:function(p){var v=T(p,"fragShader",g);p.fragShader=v.replace("%LIGHT_COUNT%",p.game.renderer.config.maxLights),f.call(this,p),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.lightsActive=!0,this.tempVec2=new c,this._tempMatrix=new h,this._tempMatrix2=new h},boot:function(){u.prototype.boot.call(this)},onRender:function(d,p){var v=d.sys.lights;if(this.lightsActive=!1,v&&v.active){var x=v.getLights(p),y=x.length;this.lightsActive=!0;var _,A=this.renderer.height,D=p.matrix,I=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",p.x,p.y,p.rotation,p.zoom),this.set3f("uAmbientLightColor",v.ambientColor.r,v.ambientColor.g,v.ambientColor.b),this.set1i("uLightCount",y),_=0;_0&&this.flush();var p=this.inverseRotationMatrix;if(d){var v=-d,x=Math.cos(v),y=Math.sin(v);p[1]=y,p[3]=-y,p[0]=p[4]=x}else p[0]=p[4]=1,p[1]=p[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,p),this.currentNormalMapRotation=d}},setTexture2D:function(d,p){void 0===d&&(d=this.renderer.whiteTexture);var x=this.getNormalMap(p);this.isNewNormalMap(d,x)&&(this.flush(),this.createBatch(d),this.addTextureToBatch(x),this.currentNormalMap=x);var y=0;return p&&p.parentContainer?y=p.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:p&&(y=p.rotation),null===this.currentBatch&&(this.createBatch(d),this.addTextureToBatch(x)),this.setNormalMapRotation(y),0},setGameObject:function(d,p){void 0===p&&(p=d.frame);var v=p.glTexture,x=this.getNormalMap(d);if(this.isNewNormalMap(v,x)&&(this.flush(),this.createBatch(v),this.addTextureToBatch(x),this.currentNormalMap=x),d.parentContainer){var y=d.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(y.rotationNormalized)}else this.setNormalMapRotation(d.rotation);return null===this.currentBatch&&(this.createBatch(v),this.addTextureToBatch(x)),0},isNewNormalMap:function(d,p){return this.currentTexture!==d||this.currentNormalMap!==p},getNormalMap:function(d){var p;return d?(d.displayTexture?p=d.displayTexture.dataSource[d.displayFrame.sourceIndex]:d.texture?p=d.texture.dataSource[d.frame.sourceIndex]:d.tileset&&(p=Array.isArray(d.tileset)?d.tileset[0].image.dataSource[0]:d.tileset.image.dataSource[0]),p?p.glTexture:this.renderer.normalTexture):this.renderer.normalTexture},batchSprite:function(d,p,v){this.lightsActive&&f.prototype.batchSprite.call(this,d,p,v)},batchTexture:function(d,p,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it,Y,j,nt,ht,gt,wt,St,Bt){this.lightsActive&&f.prototype.batchTexture.call(this,d,p,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it,Y,j,nt,ht,gt,wt,St,Bt)},batchTextureFrame:function(d,p,v,x,y,_,E){this.lightsActive&&f.prototype.batchTextureFrame.call(this,d,p,v,x,y,_,E)}});S.exports=m},56527:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(57516),f=a(45561),h=a(60722),c=a(14500),u=a(29100),m=new b({Extends:g,initialize:function(p){p.fragShader=T(p,"fragShader",f),p.vertShader=T(p,"vertShader",h),p.attributes=T(p,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:c.UNSIGNED_BYTE,normalized:!0}]),p.forceZero=!0,p.resizeUniform="uResolution",g.call(this,p)},boot:function(){u.prototype.boot.call(this);var d=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",d.width,d.height)}});S.exports=m},57516:(S,k,a)=>{var b=a(83419),T=a(94811),g=a(95540),f=a(98840),h=a(44667),c=a(61340),u=a(70554),m=a(14500),d=a(29100),p=new b({Extends:d,initialize:function(x){var y=x.game.renderer,_=g(x,"fragShader",f);x.fragShader=u.parseFragmentShaderMaxTextures(_,y.maxTextures),x.vertShader=g(x,"vertShader",h),x.attributes=g(x,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:m.UNSIGNED_BYTE,normalized:!0}]),x.resizeUniform="uResolution",d.call(this,x),this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.calcMatrix=new c,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){d.prototype.boot.call(this);var v=this.renderer;this.set1iv("uMainSampler",v.textureIndexes),this.set2f("uResolution",v.width,v.height)},batchSprite:function(v,x,y){this.manager.set(this,v);var _=this._tempMatrix1,E=this._tempMatrix2,A=this._tempMatrix3,D=v.frame,I=D.glTexture,R=D.u0,F=D.v0,N=D.u1,V=D.v1,B=D.x,H=D.y,Q=D.cutWidth,G=D.cutHeight,K=D.customPivot,q=v.displayOriginX,at=v.displayOriginY,ot=-q+B,J=-at+H;if(v.isCropped){var it=v._crop;(it.flipX!==v.flipX||it.flipY!==v.flipY)&&D.updateCropUVs(it,v.flipX,v.flipY),R=it.u0,F=it.v0,N=it.u1,V=it.v1,Q=it.width,G=it.height,ot=-q+(B=it.x),J=-at+(H=it.y)}var Y=1,j=1;v.flipX&&(K||(ot+=2*q-D.realWidth),Y=-1),v.flipY&&(K||(J+=2*at-D.realHeight),j=-1);var nt=v.x,ht=v.y;x.roundPixels&&(nt=Math.floor(nt),ht=Math.floor(ht)),E.applyITRS(nt,ht,v.rotation,v.scaleX*Y,v.scaleY*j),_.copyFrom(x.matrix),y?(_.multiplyWithOffset(y,-x.scrollX*v.scrollFactorX,-x.scrollY*v.scrollFactorY),E.e=nt,E.f=ht):(E.e-=x.scrollX*v.scrollFactorX,E.f-=x.scrollY*v.scrollFactorY),_.multiply(E,A);var gt=A.setQuad(ot,J,ot+Q,J+G,x.renderRoundPixels),wt=u.getTintAppendFloatAlpha,St=x.alpha,Bt=wt(v.tintTopLeft,St*v._alphaTL),Yt=wt(v.tintTopRight,St*v._alphaTR),$t=wt(v.tintBottomLeft,St*v._alphaBL),qt=wt(v.tintBottomRight,St*v._alphaBR);this.shouldFlush(6)&&this.flush();var ne=this.setGameObject(v,D);this.manager.preBatch(v),this.batchQuad(v,gt[0],gt[1],gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],R,F,N,V,Bt,Yt,$t,qt,v.tintFill,I,ne),this.manager.postBatch(v)},batchTexture:function(v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it,Y,j,nt,ht,gt,wt,St,Bt,Yt,$t,qt){void 0===qt&&(qt=!1),this.manager.set(this,v);var ne=this._tempMatrix1,le=this._tempMatrix2,Me=this._tempMatrix3,pi=q/y+gt,Ie=at/_+wt,_i=(q+ot)/y+gt,be=(at+J)/_+wt,ni=D,Ke=I,zi=-G,Cn=-K;if(v.isCropped){var sr=v._crop,vn=sr.width,bn=sr.height;ni=vn,Ke=bn,D=vn,I=bn;var Fr=q=sr.x,cs=at=sr.y;V&&(Fr=ot-sr.x-vn),B&&(cs=J-sr.y-bn),pi=Fr/y+gt,Ie=cs/_+wt,_i=(Fr+vn)/y+gt,be=(cs+bn)/_+wt,zi=-G+q,Cn=-K+at}V&&(ni*=-1,zi+=D),(B^=!Yt&&x.isRenderTexture?1:0)&&(Ke*=-1,Cn+=I),St.roundPixels&&(E=Math.floor(E),A=Math.floor(A)),le.applyITRS(E,A,N,R,F),ne.copyFrom(St.matrix),Bt?(ne.multiplyWithOffset(Bt,-St.scrollX*H,-St.scrollY*Q),le.e=E,le.f=A):(le.e-=St.scrollX*H,le.f-=St.scrollY*Q),ne.multiply(le,Me);var Dn=Me.setQuad(zi,Cn,zi+ni,Cn+Ke,St.renderRoundPixels);null==$t&&($t=this.setTexture2D(x)),v&&!qt&&this.manager.preBatch(v),this.batchQuad(v,Dn[0],Dn[1],Dn[2],Dn[3],Dn[4],Dn[5],Dn[6],Dn[7],pi,Ie,_i,be,it,Y,j,nt,ht,x,$t),v&&!qt&&this.manager.postBatch(v)},batchTextureFrame:function(v,x,y,_,E,A,D){this.manager.set(this);var I=this._tempMatrix1.copyFrom(A),R=this._tempMatrix2;D?I.multiply(D,R):R=I;var F=R.setQuad(x,y,x+v.width,y+v.height),N=this.setTexture2D(v.source.glTexture);_=u.getTintAppendFloatAlpha(_,E),this.batchQuad(null,F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],v.u0,v.v0,v.u1,v.v1,_,_,_,_,0,v.glTexture,N)},batchFillRect:function(v,x,y,_,E,A){this.renderer.pipelines.set(this);var D=this.calcMatrix;A&&A.multiply(E,D);var I=D.setQuad(v,x,v+y,x+_),R=this.fillTint;this.batchQuad(null,I[0],I[1],I[2],I[3],I[4],I[5],I[6],I[7],0,0,1,1,R.TL,R.TR,R.BL,R.BR,2)},batchFillTriangle:function(v,x,y,_,E,A,D,I){this.renderer.pipelines.set(this);var R=this.calcMatrix;I&&I.multiply(D,R);var F=R.getX(v,x),N=R.getY(v,x),V=R.getX(y,_),B=R.getY(y,_),H=R.getX(E,A),Q=R.getY(E,A),G=this.fillTint;this.batchTri(null,F,N,V,B,H,Q,0,0,1,1,G.TL,G.TR,G.BL,2)},batchStrokeTriangle:function(v,x,y,_,E,A,D,I,R){var F=this.tempTriangle;F[0].x=v,F[0].y=x,F[0].width=D,F[1].x=y,F[1].y=_,F[1].width=D,F[2].x=E,F[2].y=A,F[2].width=D,F[3].x=v,F[3].y=x,F[3].width=D,this.batchStrokePath(F,D,!1,I,R)},batchFillPath:function(v,x,y){this.renderer.pipelines.set(this);var _=this.calcMatrix;y&&y.multiply(x,_);for(var D,I,E=v.length,A=this.polygonCache,R=this.fillTint.TL,F=this.fillTint.TR,N=this.fillTint.BL,V=0;V0&&ni[4]?this.batchQuad(null,ne,le,Bt,Yt,ni[0],ni[1],ni[2],ni[3],0,0,1,1,pi,Ie,_i,be,2):(Ke[0]=ne,Ke[1]=le,Ke[2]=Bt,Ke[3]=Yt,Ke[4]=1),R&&Ke[4]?this.batchQuad(null,wt,St,$t,qt,Ke[0],Ke[1],Ke[2],Ke[3],0,0,1,1,pi,Ie,_i,be,2):(ni[0]=wt,ni[1]=St,ni[2]=$t,ni[3]=qt,ni[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,d.prototype.destroy.call(this),this}});S.exports=p},43439:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(4127),f=a(89924),h=a(29100),c=new b({Extends:h,initialize:function(m){m.vertShader=T(m,"vertShader",f),m.fragShader=T(m,"fragShader",g),m.attributes=T(m,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),h.call(this,m)},onRender:function(u,m){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",m.zoom)},batchPointLight:function(u,m,d,p,v,x,y,_,E,A,D,I){var R=u.color,F=u.intensity,N=u.radius,V=u.attenuation,B=R.r*F,H=R.g*F,Q=R.b*F,G=m.alpha*u.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(d,p,D,I,N,V,B,H,Q,G),this.batchLightVert(v,x,D,I,N,V,B,H,Q,G),this.batchLightVert(y,_,D,I,N,V,B,H,Q,G),this.batchLightVert(d,p,D,I,N,V,B,H,Q,G),this.batchLightVert(y,_,D,I,N,V,B,H,Q,G),this.batchLightVert(E,A,D,I,N,V,B,H,Q,G),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(u,m,d,p,v,x,y,_,E,A){var D=this.vertexViewF32,I=this.vertexCount*this.currentShader.vertexComponentCount-1;D[++I]=u,D[++I]=m,D[++I]=d,D[++I]=p,D[++I]=v,D[++I]=x,D[++I]=y,D[++I]=_,D[++I]=E,D[++I]=A,this.vertexCount++}});S.exports=c},84057:(S,k,a)=>{var b=a(83419),T=a(89422),g=a(95540),f=a(27681),h=a(49627),c=a(29100),u=new b({Extends:c,initialize:function(d){d.renderTarget=g(d,"renderTarget",1),d.fragShader=g(d,"fragShader",f),d.vertShader=g(d,"vertShader",h),d.attributes=g(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),d.batchSize=1,d.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],c.call(this,d),this.isPostFX=!0,this.colorMatrix=new T,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){c.prototype.boot.call(this);var m=this.manager.UTILITY_PIPELINE;this.fullFrame1=m.fullFrame1,this.fullFrame2=m.fullFrame2,this.halfFrame1=m.halfFrame1,this.halfFrame2=m.halfFrame2;var d=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",d.width,d.height);for(var p=this.renderTargets,v=0;v{var b=a(10312),T=a(67502),g=a(83419),f=a(96293),h=a(95540),c=a(57516),u=a(27681),m=a(87841),d=a(32302),p=a(45561),v=a(60722),x=a(29100),y=new g({Extends:c,initialize:function(E){var A=h(E,"fragShader",u),D=h(E,"vertShader",v),I=h(E,"drawShader",u),R=[{name:"DrawSprite",fragShader:p,vertShader:v},{name:"CopySprite",fragShader:A,vertShader:D},{name:"DrawGame",fragShader:I,vertShader:v},{name:"ColorMatrix",fragShader:f}],F=h(E,"shaders",[]);E.shaders=R.concat(F),E.vertShader||(E.vertShader=D),E.batchSize=1,c.call(this,E),this.isPreFX=!0,this.customMainSampler=null,this.spriteBounds=new m,this.targetBounds=new m,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){x.prototype.boot.call(this);var _=this.shaders,E=this.renderer;this.drawSpriteShader=_[0],this.copyShader=_[1],this.gameShader=_[2],this.colorMatrixShader=_[3],this.fsTarget=new d(E,E.width,E.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var A=new ArrayBuffer(168);this.quadVertexData=A,this.quadVertexViewF32=new Float32Array(A),this.quadVertexBuffer=E.createVertexBuffer(A,this.gl.STATIC_DRAW),this.onResize(E.width,E.height),this.currentShader=this.copyShader,this.set2f("uResolution",E.width,E.height)},onResize:function(_,E){var A=this.quadVertexViewF32;A[1]=E,A[22]=E,A[14]=_,A[28]=_,A[35]=_,A[36]=E},batchQuad:function(_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it){var Y=Math.min(E,D,R,N),j=Math.min(A,I,F,V),gt=Math.max(E,D,R,N)-Y,wt=Math.max(A,I,F,V)-j,St=this.spriteBounds.setTo(Y,j,gt,wt),Bt=_?_.preFX.padding:0,qt=Math.abs(Math.max(gt+2*Bt,wt+2*Bt)),ne=this.manager.getRenderTarget(qt),le=this.targetBounds.setTo(0,0,ne.width,ne.height);T(le,Math.round(St.centerX),Math.round(St.centerY)),this.tempSprite=_;var Me=this.gl,pi=this.renderer;pi.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",pi.width,pi.height),this.flipProjectionMatrix(!0),_&&(this.onDrawSprite(_,ne),_.preFX.onFX(this));var Ie=this.fsTarget;return this.flush(),Me.viewport(0,0,pi.width,pi.height),Me.bindFramebuffer(Me.FRAMEBUFFER,Ie.framebuffer.webGLFramebuffer),Me.framebufferTexture2D(Me.FRAMEBUFFER,Me.COLOR_ATTACHMENT0,Me.TEXTURE_2D,Ie.texture.webGLTexture,0),Me.clearColor(0,0,0,0),Me.clear(Me.COLOR_BUFFER_BIT),this.setTexture2D(it),this.batchVert(E,A,B,H,0,J,K),this.batchVert(D,I,B,G,0,J,at),this.batchVert(R,F,Q,G,0,J,ot),this.batchVert(E,A,B,H,0,J,K),this.batchVert(R,F,Q,G,0,J,ot),this.batchVert(N,V,Q,H,0,J,q),this.flush(),this.flipProjectionMatrix(!1),Me.activeTexture(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,ne.texture.webGLTexture),Me.copyTexSubImage2D(Me.TEXTURE_2D,0,0,0,le.x,le.y,le.width,le.height),Me.bindFramebuffer(Me.FRAMEBUFFER,null),Me.bindTexture(Me.TEXTURE_2D,null),this.onBatch(_),this.currentShader=this.copyShader,this.onDraw(ne,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(_,E,A,D,I,R,F){void 0===A&&(A=!0),void 0===D&&(D=!0),void 0===I&&(I=!1),void 0===F&&(F=this.copyShader);var N=this.gl,V=this.tempSprite;R&&(F=this.colorMatrixShader),this.currentShader=F;var B=this.setVertexBuffer(this.quadVertexBuffer);F.bind(B,!1);var H=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",H.width,H.height),V.preFX.onFXCopy(this),this.onCopySprite(_,E,V),R&&(this.set1fv("uColorMatrix",R.getData()),this.set1f("uAlpha",R.alpha)),N.activeTexture(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,_.texture.webGLTexture),_.height>E.height?(N.viewport(0,0,_.width,_.height),this.setTargetUVs(_,E)):(N.viewport(0,E.height-_.height,_.width,_.height),this.resetUVs()),N.bindFramebuffer(N.FRAMEBUFFER,E.framebuffer.webGLFramebuffer),N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,E.texture.webGLTexture,0),A&&(N.clearColor(0,0,0,+!D),N.clear(N.COLOR_BUFFER_BIT)),I){var G=this.renderer.currentBlendMode;this.renderer.setBlendMode(b.ERASE)}N.bufferData(N.ARRAY_BUFFER,this.quadVertexData,N.STATIC_DRAW),N.drawArrays(N.TRIANGLES,0,6),I&&this.renderer.setBlendMode(G),N.bindFramebuffer(N.FRAMEBUFFER,null)},copy:function(_,E){var A=this.gl;this.set1i("uMainSampler",0),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,_.texture.webGLTexture),A.viewport(0,0,_.width,_.height),this.setUVs(0,0,0,1,1,1,1,0),A.bindFramebuffer(A.FRAMEBUFFER,E.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,E.texture.webGLTexture,0),A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.quadVertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null)},blendFrames:function(_,E,A,D,I){this.manager.blendFrames(_,E,A,D,I)},blendFramesAdditive:function(_,E,A,D,I){this.manager.blendFramesAdditive(_,E,A,D,I)},drawToGame:function(_){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(_)},copyToGame:function(_){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(_)},bindAndDraw:function(_){var E=this.gl,A=this.renderer;this.set1i("uMainSampler",0),this.setTexture2D(this.customMainSampler?this.customMainSampler:_.texture);var D=this._tempMatrix1.loadIdentity(),I=this.targetBounds.x,R=this.targetBounds.y,F=I+_.width,N=R+_.height,V=D.getX(I,R),B=D.getX(I,N),H=D.getX(F,N),Q=D.getX(F,R),G=D.getY(I,R),K=D.getY(I,N),q=D.getY(F,N),at=D.getY(F,R),ot=16777215;this.batchVert(V,G,0,0,0,0,ot),this.batchVert(B,K,0,1,0,0,ot),this.batchVert(H,q,1,1,0,0,ot),this.batchVert(V,G,0,0,0,0,ot),this.batchVert(H,q,1,1,0,0,ot),this.batchVert(Q,at,1,0,0,0,ot),A.restoreFramebuffer(!1,!0),A.currentFramebuffer||E.viewport(0,0,A.width,A.height),A.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(_){this.drawToGame(_)},setUVs:function(_,E,A,D,I,R,F,N){var V=this.quadVertexViewF32;V[2]=_,V[3]=E,V[9]=A,V[10]=D,V[16]=I,V[17]=R,V[23]=_,V[24]=E,V[30]=I,V[31]=R,V[37]=F,V[38]=N},setTargetUVs:function(_,E){var A=E.height/_.height;this.setUVs(0,A=A>.5?.5-(A-.5):.5-A+.5,0,1+A,1,1+A,1,A)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,c.prototype.destroy.call(this),this}});S.exports=y},81041:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(57516),f=new b({Extends:g,initialize:function(c){c.topology=5,c.batchSize=T(c,"batchSize",256),g.call(this,c)}});S.exports=f},12385:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(57516),f=a(45561),h=a(60722),c=a(29100),u=new b({Extends:g,initialize:function(d){d.fragShader=T(d,"fragShader",f),d.vertShader=T(d,"vertShader",h),d.forceZero=!0,g.call(this,d)},boot:function(){c.prototype.boot.call(this);var m=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",m.width,m.height)}});S.exports=u},7589:(S,k,a)=>{var b=a(35407),T=a(10312),g=a(83419),f=a(89422),h=a(96293),c=a(36682),u=a(95540),m=a(48247),d=a(49627),p=a(29100),v=new g({Extends:p,initialize:function(y){y.renderTarget=u(y,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),y.vertShader=u(y,"vertShader",d),y.shaders=u(y,"shaders",[{name:"Copy",fragShader:c},{name:"AddBlend",fragShader:b},{name:"LinearBlend",fragShader:m},{name:"ColorMatrix",fragShader:h}]),y.attributes=u(y,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),y.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],y.batchSize=1,p.call(this,y),this.colorMatrix=new f},boot:function(){p.prototype.boot.call(this);var x=this.shaders,y=this.renderTargets;this.copyShader=x[0],this.addShader=x[1],this.linearShader=x[2],this.colorMatrixShader=x[3],this.fullFrame1=y[0],this.fullFrame2=y[1],this.halfFrame1=y[2],this.halfFrame2=y[3]},copyFrame:function(x,y,_,E,A){void 0===_&&(_=1),void 0===E&&(E=!0),void 0===A&&(A=!0);var D=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",_),D.activeTexture(D.TEXTURE0),D.bindTexture(D.TEXTURE_2D,x.texture.webGLTexture),y?(D.viewport(0,0,y.width,y.height),D.bindFramebuffer(D.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_2D,y.texture.webGLTexture,0)):D.viewport(0,0,x.width,x.height),E&&(D.clearColor(0,0,0,A?0:1),D.clear(D.COLOR_BUFFER_BIT)),D.bufferData(D.ARRAY_BUFFER,this.vertexData,D.STATIC_DRAW),D.drawArrays(D.TRIANGLES,0,6),D.bindFramebuffer(D.FRAMEBUFFER,null),D.bindTexture(D.TEXTURE_2D,null)},blitFrame:function(x,y,_,E,A,D,I){void 0===_&&(_=1),void 0===E&&(E=!0),void 0===A&&(A=!0),void 0===D&&(D=!1),void 0===I&&(I=!1);var R=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",_),R.activeTexture(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,x.texture.webGLTexture),x.height>y.height?(R.viewport(0,0,x.width,x.height),this.setTargetUVs(x,y)):R.viewport(0,y.height-x.height,x.width,x.height),R.bindFramebuffer(R.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),R.framebufferTexture2D(R.FRAMEBUFFER,R.COLOR_ATTACHMENT0,R.TEXTURE_2D,y.texture.webGLTexture,0),E&&(R.clearColor(0,0,0,A?0:1),R.clear(R.COLOR_BUFFER_BIT)),D){var N=this.renderer.currentBlendMode;this.renderer.setBlendMode(T.ERASE)}I&&this.flipY(),R.bufferData(R.ARRAY_BUFFER,this.vertexData,R.STATIC_DRAW),R.drawArrays(R.TRIANGLES,0,6),D&&this.renderer.setBlendMode(N),R.bindFramebuffer(R.FRAMEBUFFER,null),R.bindTexture(R.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(x,y,_,E,A,D,I,R){void 0===I&&(I=!0),void 0===R&&(R=!0);var F=this.gl;F.bindFramebuffer(F.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_2D,x.texture.webGLTexture,0),I&&(F.clearColor(0,0,0,R?0:1),F.clear(F.COLOR_BUFFER_BIT)),F.activeTexture(F.TEXTURE0),F.bindTexture(F.TEXTURE_2D,y.texture.webGLTexture),F.copyTexSubImage2D(F.TEXTURE_2D,0,0,0,_,E,A,D),F.bindFramebuffer(F.FRAMEBUFFER,null),F.bindTexture(F.TEXTURE_2D,null)},copyToGame:function(x){var y=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,x.texture.webGLTexture),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6)},drawFrame:function(x,y,_,E){void 0===_&&(_=!0),void 0===E&&(E=this.colorMatrix);var A=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",E.getData()),this.set1f("uAlpha",E.alpha),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,x.texture.webGLTexture),y?(A.viewport(0,0,y.width,y.height),A.bindFramebuffer(A.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,y.texture.webGLTexture,0)):A.viewport(0,0,x.width,x.height),A.clearColor(0,0,0,_?0:1),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.vertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null),A.bindTexture(A.TEXTURE_2D,null)},blendFrames:function(x,y,_,E,A,D){void 0===E&&(E=1),void 0===A&&(A=!0),void 0===D&&(D=this.linearShader);var I=this.gl;this.setShader(D),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",E),I.activeTexture(I.TEXTURE0),I.bindTexture(I.TEXTURE_2D,x.texture.webGLTexture),I.activeTexture(I.TEXTURE1),I.bindTexture(I.TEXTURE_2D,y.texture.webGLTexture),_?(I.bindFramebuffer(I.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,_.texture.webGLTexture,0),I.viewport(0,0,_.width,_.height)):I.viewport(0,0,x.width,x.height),I.clearColor(0,0,0,A?0:1),I.clear(I.COLOR_BUFFER_BIT),I.bufferData(I.ARRAY_BUFFER,this.vertexData,I.STATIC_DRAW),I.drawArrays(I.TRIANGLES,0,6),I.bindFramebuffer(I.FRAMEBUFFER,null),I.bindTexture(I.TEXTURE_2D,null)},blendFramesAdditive:function(x,y,_,E,A){this.blendFrames(x,y,_,E,A,this.addShader)},clearFrame:function(x,y){void 0===y&&(y=!0);var _=this.gl;_.viewport(0,0,x.width,x.height),_.bindFramebuffer(_.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),_.clearColor(0,0,0,y?0:1),_.clear(_.COLOR_BUFFER_BIT),_.bindFramebuffer(_.FRAMEBUFFER,this.renderer.currentFramebuffer.webGLFramebuffer)},setUVs:function(x,y,_,E,A,D,I,R){var F=this.vertexViewF32;F[2]=x,F[3]=y,F[6]=_,F[7]=E,F[10]=A,F[11]=D,F[14]=x,F[15]=y,F[18]=A,F[19]=D,F[22]=I,F[23]=R},setTargetUVs:function(x,y){var _=y.height/x.height;this.setUVs(0,_=_>.5?.5-(_-.5):.5-_+.5,0,1+_,1,1+_,1,_)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});S.exports=v},36060:S=>{S.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"}},84817:S=>{S.exports="pipelineafterflush"},36712:S=>{S.exports="pipelinebeforeflush"},40285:S=>{S.exports="pipelinebind"},65918:S=>{S.exports="pipelineboot"},92852:S=>{S.exports="pipelinedestroy"},56072:S=>{S.exports="pipelinerebind"},57566:S=>{S.exports="pipelineresize"},77085:(S,k,a)=>{S.exports={AFTER_FLUSH:a(84817),BEFORE_FLUSH:a(36712),BIND:a(40285),BOOT:a(65918),DESTROY:a(92852),REBIND:a(56072),RESIZE:a(57566)}},54812:(S,k,a)=>{var b=a(83419),T=a(99155),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.amount=1},onPreRender:function(h,c){h=this.getController(h),this.set1f("amount",h.amount,c)}});S.exports=f},67329:(S,k,a)=>{var b=a(83419),T=a(24400),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(h){h=this.getController(h),this.set1f("strength",h.blurStrength),this.set3fv("color",h.glcolor)},onDraw:function(h){var c=this.getController(),u=this.fullFrame1,m=this.fullFrame2;this.copyFrame(h,m);for(var d=2/h.width*c.offsetX,p=2/h.height*c.offsetY,v=0;v{var b=a(83419),T=a(41514),g=a(51078),f=a(94328),h=a(84057),c=new b({Extends:h,initialize:function(m){h.call(this,{game:m,shaders:[{name:"Gaussian5",fragShader:T},{name:"Gaussian9",fragShader:g},{name:"Gaussian13",fragShader:f}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(u){var m=this.getController(),d=this.gl,p=this.fullFrame1,v=d.getParameter(d.FRAMEBUFFER_BINDING);this.bind(this.shaders[m.quality]),d.activeTexture(d.TEXTURE0),d.viewport(0,0,u.width,u.height),this.set1i("uMainSampler",0),this.set2f("resolution",u.width,u.height),this.set1f("strength",m.strength),this.set3fv("color",m.glcolor);for(var x=0;x{var b=a(83419),T=a(90610),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(h,c,u,m){h=this.getController(h),this.set1f("radius",h.radius,c),this.set1f("amount",h.amount,c),this.set1f("contrast",h.contrast,c),this.set1f("strength",h.strength,c),this.set2f("blur",h.blurX,h.blurY,c),this.setBoolean("isTiltShift",h.isTiltShift,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},89428:(S,k,a)=>{var b=a(83419),T=a(91899),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(h,c,u,m){h=this.getController(h),this.set1f("scale",h.scale,c),this.set1f("feather",h.feather,c),this.set1f("thickness",h.thickness,c),this.set3fv("color",h.glcolor,c),this.set4fv("backgroundColor",h.glcolor2,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},88904:(S,k,a)=>{var b=a(83419),T=a(84057),g=new b({Extends:T,initialize:function(h){T.call(this,{game:h})},onDraw:function(f){var h=this.fullFrame1;this.controller?this.manager.drawFrame(f,h,!0,this.controller):this.drawFrame(f,h),this.copyToGame(h)}});S.exports=g},63563:(S,k,a)=>{var b=a(83419),T=a(47838),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.x=.005,this.y=.005},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(h){var c=this.game.textures.getFrame(h);c&&(this.glTexture=c.glTexture)},onDraw:function(h){var c=this.getController(),u=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",c.x,c.y),this.bindTexture(c.glTexture,1),this.copySprite(h,u),this.copyToGame(u)}});S.exports=f},94045:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(98656),f=a(84057),h=a(70554),c=new b({Extends:f,initialize:function(m,d){var p=T(d,"quality",.1),v=T(d,"distance",10);f.call(this,{game:m,fragShader:h.setGlowQuality(g,m,p,v)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(u,m,d,p){u=this.getController(u),this.set1f("outerStrength",u.outerStrength,m),this.set1f("innerStrength",u.innerStrength,m),this.set4fv("glowColor",u.glcolor,m),this.setBoolean("knockout",u.knockout,m),d&&p&&this.set2f("resolution",d,p,m)},onDraw:function(u){this.set2f("resolution",u.width,u.height),this.bindAndDraw(u)}});S.exports=c},74088:(S,k,a)=>{var b=a(83419),T=a(70463),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(h,c){h=this.getController(h),this.set1f("alpha",h.alpha,c),this.set1i("size",h.size,c),this.set3fv("color1",h.glcolor1,c),this.set3fv("color2",h.glcolor2,c),this.set2f("positionFrom",h.fromX,h.fromY,c),this.set2f("positionTo",h.toX,h.toY,c)}});S.exports=f},99636:(S,k,a)=>{var b=a(83419),T=a(50831),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.amount=1},onPreRender:function(h,c,u,m){h=this.getController(h),this.set1f("amount",h.amount,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},34700:(S,k,a)=>{var b=a(83419),T=a(92595),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(h,c){var u=(h=this.getController(h)).samples;this.set1i("samples",u,c),this.set1f("intensity",h.intensity,c),this.set1f("decay",h.decay,c),this.set1f("power",h.power/u,c),this.set2f("lightPosition",h.x,h.y,c),this.set4fv("color",h.glcolor,c)}});S.exports=f},91157:(S,k,a)=>{var b=a(83419),T=a(72464),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(h,c,u,m){h=this.getController(h),this.setTime("time",c),this.set1f("speed",h.speed,c),this.set1f("lineWidth",h.lineWidth,c),this.set1f("gradient",h.gradient,c),this.setBoolean("reveal",h.reveal,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},27797:(S,k,a)=>{var b=a(83419),T=a(39249),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(h,c){h=this.getController(h),this.set1f("radius",h.radius,c),this.set1f("strength",h.strength,c),this.set2f("position",h.x,h.y,c)}});S.exports=f},67603:(S,k,a)=>{var b=a(83419),T=a(2878),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(h,c){h=this.getController(h),this.set4f("config",h.progress,h.wipeWidth,h.direction,h.axis,c),this.setBoolean("reveal",h.reveal,c)}});S.exports=f},58918:(S,k,a)=>{var b={Barrel:a(54812),Bloom:a(67329),Blur:a(8861),Bokeh:a(51051),Circle:a(89428),ColorMatrix:a(88904),Displacement:a(63563),Glow:a(94045),Gradient:a(74088),Pixelate:a(99636),Shadow:a(34700),Shine:a(91157),Vignette:a(27797),Wipe:a(67603)};S.exports=b},96615:(S,k,a)=>{var b=a(36060),T=a(79291),g={FX:a(58918),BitmapMaskPipeline:a(31302),Events:a(77085),FXPipeline:a(92651),LightPipeline:a(96569),MobilePipeline:a(56527),MultiPipeline:a(57516),PointLightPipeline:a(43439),PostFXPipeline:a(84057),PreFXPipeline:a(43558),RopePipeline:a(81041),SinglePipeline:a(12385),UtilityPipeline:a(7589)};g=T(!1,g,b),S.exports=g},35407:S=>{S.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join("\n")},78908:S=>{S.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join("\n")},85191:S=>{S.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join("\n")},96293:S=>{S.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join("\n")},36682:S=>{S.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join("\n")},99155:S=>{S.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join("\n")},24400:S=>{S.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join("\n")},94328:S=>{S.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},41514:S=>{S.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},51078:S=>{S.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},90610:S=>{S.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join("\n")},91899:S=>{S.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join("\n")},47838:S=>{S.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join("\n")},98656:S=>{S.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join("\n")},70463:S=>{S.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join("\n")},50831:S=>{S.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join("\n")},92595:S=>{S.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join("\n")},72464:S=>{S.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{","\tvec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join("\n")},39249:S=>{S.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," \tcol = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join("\n")},2878:S=>{S.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join("\n")},31063:S=>{S.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join("\n")},48247:S=>{S.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join("\n")},41214:S=>{S.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join("\n")},39653:S=>{S.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join("\n")},62143:S=>{S.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},47940:S=>{S.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},98840:S=>{S.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},44667:S=>{S.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},4127:S=>{S.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join("\n")},89924:S=>{S.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join("\n")},27681:S=>{S.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join("\n")},49627:S=>{S.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join("\n")},45561:S=>{S.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},60722:S=>{S.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},89350:(S,k,a)=>{S.exports={AddBlendFrag:a(35407),BitmapMaskFrag:a(78908),BitmapMaskVert:a(85191),ColorMatrixFrag:a(96293),CopyFrag:a(36682),FXBarrelFrag:a(99155),FXBloomFrag:a(24400),FXBlurHighFrag:a(94328),FXBlurLowFrag:a(41514),FXBlurMedFrag:a(51078),FXBokehFrag:a(90610),FXCircleFrag:a(91899),FXDisplacementFrag:a(47838),FXGlowFrag:a(98656),FXGradientFrag:a(70463),FXPixelateFrag:a(50831),FXShadowFrag:a(92595),FXShineFrag:a(72464),FXVignetteFrag:a(39249),FXWipeFrag:a(2878),LightFrag:a(31063),LinearBlendFrag:a(48247),MeshFrag:a(41214),MeshVert:a(39653),MobileFrag:a(62143),MobileVert:a(47940),MultiFrag:a(98840),MultiVert:a(44667),PointLightFrag:a(4127),PointLightVert:a(89924),PostFXFrag:a(27681),QuadVert:a(49627),SingleFrag:a(45561),SingleVert:a(60722)}},93567:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c){this.webGLAttribLocation=-1,this.gl=f,this.program=h,this.name=c,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var g=this.gl;g.isContextLost()||(this.webGLAttribLocation=g.getAttribLocation(this.program.webGLProgram,this.name))}else this.webGLAttribLocation=-1},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});S.exports=T},26128:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u){this.webGLBuffer=null,this.gl=f,this.initialDataOrSize=h,this.bufferType=c,this.bufferUsage=u,this.createResource()},createResource:function(){if(null!==this.initialDataOrSize){var g=this.gl;if(!g.isContextLost()){var f=this.bufferType,h=g.createBuffer();this.webGLBuffer=h,g.bindBuffer(f,this.webGLBuffer),g.bufferData(f,this.initialDataOrSize,this.bufferUsage),g.bindBuffer(f,null)}}},destroy:function(){var g=this.gl;g.isContextLost()||g.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});S.exports=T},84387:(S,k,a)=>{var b=a(83419),T={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},g=new b({initialize:function(h,c,u,m,d){this.webGLFramebuffer=null,this.gl=h,this.width=c,this.height=u,this.renderTexture=m,this.addDepthStencilBuffer=!!d,this.createResource()},createResource:function(){var f=this.gl;if(!f.isContextLost()){var c,h=this.renderTexture,u=f.createFramebuffer();if(this.webGLFramebuffer=u,f.bindFramebuffer(f.FRAMEBUFFER,u),h.isRenderTexture=!0,h.isAlphaPremultiplied=!1,f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,h.webGLTexture,0),(c=f.checkFramebufferStatus(f.FRAMEBUFFER))!==f.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(T[c]||c));if(this.addDepthStencilBuffer){var m=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,m),f.renderbufferStorage(f.RENDERBUFFER,f.DEPTH_STENCIL,this.width,this.height),f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,m)}f.bindFramebuffer(f.FRAMEBUFFER,null)}},destroy:function(){if(null!==this.webGLFramebuffer){var f=this.gl;if(!f.isContextLost()){f.bindFramebuffer(f.FRAMEBUFFER,this.webGLFramebuffer);var h=f.getFramebufferAttachmentParameter(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==h&&(f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,null,0),f.deleteTexture(h));var c=f.getFramebufferAttachmentParameter(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==c&&f.deleteRenderbuffer(c),f.bindFramebuffer(f.FRAMEBUFFER,null),f.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});S.exports=g},1482:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c){this.webGLProgram=null,this.gl=f,this.vertexSource=h,this.fragmentSource=c,this.createResource()},createResource:function(){var g=this.gl;if(!g.isContextLost()){var f=g.createProgram(),h=g.createShader(g.VERTEX_SHADER),c=g.createShader(g.FRAGMENT_SHADER);g.shaderSource(h,this.vertexSource),g.shaderSource(c,this.fragmentSource),g.compileShader(h),g.compileShader(c);var u="Shader failed:\n";if(!g.getShaderParameter(h,g.COMPILE_STATUS))throw new Error("Vertex "+u+g.getShaderInfoLog(h));if(!g.getShaderParameter(c,g.COMPILE_STATUS))throw new Error("Fragment "+u+g.getShaderInfoLog(c));if(g.attachShader(f,h),g.attachShader(f,c),g.linkProgram(f),!g.getProgramParameter(f,g.LINK_STATUS))throw new Error("Link "+u+g.getProgramInfoLog(f));g.useProgram(f),this.webGLProgram=f}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});S.exports=T},82751:(S,k,a)=>{var b=a(83419),T=a(50030),g=new b({initialize:function(h,c,u,m,d,p,v,x,y,_,E,A,D){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=h,this.mipLevel=c,this.minFilter=u,this.magFilter=m,this.wrapT=d,this.wrapS=p,this.format=v,this.pixels=x,this.width=y,this.height=_,this.pma=E??!0,this.forceSize=!!A,this.flipY=!!D,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var f=this.gl;if(!f.isContextLost()){if(this.pixels instanceof g)return void(this.webGLTexture=this.pixels.webGLTexture);var h=f.createTexture();h.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=h,this._processTexture()}},update:function(f,h,c,u,m,d,p,v,x){0!==h&&0!==c&&(this.pixels=f,this.width=h,this.height=c,this.flipY=u,this.wrapS=m,this.wrapT=d,this.minFilter=p,this.magFilter=v,this.format=x,this.gl.isContextLost()||this._processTexture())},_processTexture:function(){var f=this.gl;f.activeTexture(f.TEXTURE0);var h=f.getParameter(f.TEXTURE_BINDING_2D);f.bindTexture(f.TEXTURE_2D,this.webGLTexture),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,this.minFilter),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,this.magFilter),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,this.wrapS),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,this.wrapT),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,this.flipY);var c=this.pixels,u=this.mipLevel,m=this.width,d=this.height,p=this.format,v=!1;if(null==c)f.texImage2D(f.TEXTURE_2D,u,p,m,d,0,p,f.UNSIGNED_BYTE,null),v=T(m,d);else if(c.compressed){m=c.width,d=c.height,v=c.generateMipmap;for(var x=0;x{var T=new(a(83419))({initialize:function(f,h,c){this.webGLUniformLocation=null,this.gl=f,this.program=h,this.name=c,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var g=this.gl;g.isContextLost()||(this.webGLUniformLocation=g.getUniformLocation(this.program.webGLProgram,this.name))}else this.webGLUniformLocation=null},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});S.exports=T},9503:(S,k,a)=>{var b={WebGLAttribLocationWrapper:a(93567),WebGLBufferWrapper:a(26128),WebGLProgramWrapper:a(1482),WebGLTextureWrapper:a(82751),WebGLFramebufferWrapper:a(84387),WebGLUniformLocationWrapper:a(57183)};S.exports=b},76531:(S,k,a)=>{var b=a(13560),T=a(83419),g=a(50792),f=a(97480),h=a(8443),c=a(57811),u=a(74403),m=a(45818),d=a(29747),p=a(87841),v=a(86555),x=a(56583),y=a(26099),_=a(38058),E=new T({Extends:g,initialize:function(D){g.call(this),this.game=D,this.canvasBounds=new p,this.parent=null,this.parentIsWindow=!1,this.parentSize=new v,this.gameSize=new v,this.baseSize=new v,this.displaySize=new v,this.scaleMode=b.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new y(1,1),this.autoRound=!1,this.autoCenter=b.CENTER.NO_CENTER,this.orientation=b.ORIENTATION.LANDSCAPE,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:d,windowResize:d,fullScreenChange:d,fullScreenError:d}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(h.BOOT,this.boot,this)},boot:function(){var A=this.game;this.canvas=A.canvas,this.fullscreen=A.device.fullscreen;var D=this.scaleMode;D!==b.SCALE_MODE.RESIZE&&D!==b.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(D),D===b.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),A.events.on(h.PRE_STEP,this.step,this),A.events.once(h.READY,this.refresh,this),A.events.once(h.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(A){this.getParent(A),this.getParentBounds();var D=A.width,I=A.height,R=A.scaleMode,F=A.zoom,N=A.autoRound;if("string"==typeof D)if("%"!==D.substr(-1))D=parseInt(D,10);else{var V=this.parentSize.width;0===V&&(V=window.innerWidth);var B=parseInt(D,10)/100;D=Math.floor(V*B)}if("string"==typeof I)if("%"!==I.substr(-1))I=parseInt(I,10);else{var H=this.parentSize.height;0===H&&(H=window.innerHeight);var Q=parseInt(I,10)/100;I=Math.floor(H*Q)}this.scaleMode=R,this.autoRound=N,this.autoCenter=A.autoCenter,this.resizeInterval=A.resizeInterval,N&&(D=Math.floor(D),I=Math.floor(I)),this.gameSize.setSize(D,I),F===b.ZOOM.MAX_ZOOM&&(F=this.getMaxZoom()),this.zoom=F,1!==F&&(this._resetZoom=!0),this.baseSize.setSize(D,I),N&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),A.minWidth>0&&this.displaySize.setMin(A.minWidth*F,A.minHeight*F),A.maxWidth>0&&this.displaySize.setMax(A.maxWidth*F,A.maxHeight*F),this.displaySize.setSize(D,I),(A.snapWidth>0||A.snapHeight>0)&&this.displaySize.setSnap(A.snapWidth,A.snapHeight),this.orientation=m(D,I)},getParent:function(A){var D=A.parent;if(null!==D){if(this.parent=u(D),this.parentIsWindow=this.parent===document.body,A.expandParent&&A.scaleMode!==b.SCALE_MODE.NONE){var I=this.parent.getBoundingClientRect();(this.parentIsWindow||0===I.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",I=this.parent.getBoundingClientRect(),!this.parentIsWindow&&0===I.height&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}A.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=u(A.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var A=this.parentSize,D=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(D.height=c(!0));var I=D.width,R=D.height;if(A.width!==I||A.height!==R)return A.setSize(I,R),!0;if(this.canvas){var F=this.canvasBounds,N=this.canvas.getBoundingClientRect();if(N.x!==F.x||N.y!==F.y)return!0}return!1},lockOrientation:function(A){var D=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!D&&D.call(screen,A)},setParentSize:function(A,D){return this.parentSize.setSize(A,D),this.refresh()},setGameSize:function(A,D){var I=this.autoRound;I&&(A=Math.floor(A),D=Math.floor(D));var R=this.width,F=this.height;return this.gameSize.resize(A,D),this.baseSize.resize(A,D),I&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(A/D),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(R,F)},resize:function(A,D){var I=this.zoom,R=this.autoRound;R&&(A=Math.floor(A),D=Math.floor(D));var F=this.width,N=this.height;this.gameSize.resize(A,D),this.baseSize.resize(A,D),R&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(A*I,D*I),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var V=this.canvas.style,B=A*I,H=D*I;return R&&(B=Math.floor(B),H=Math.floor(H)),(B!==A||H!==D)&&(V.width=B+"px",V.height=H+"px"),this.refresh(F,N)},setZoom:function(A){return this.zoom=A,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(A,D){return void 0===A&&(A=0),void 0===D&&(D=A),this.displaySize.setSnap(A,D),this.refresh()},refresh:function(A,D){void 0===A&&(A=this.width),void 0===D&&(D=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var I=this.game.domContainer;if(I){this.baseSize.setCSS(I);var R=this.canvas.style,F=I.style;F.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",F.marginLeft=R.marginLeft,F.marginTop=R.marginTop}return this.emit(f.RESIZE,this.gameSize,this.baseSize,this.displaySize,A,D),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var A=m(this.width,this.height);A!==this.orientation&&(this.orientation=A,this.emit(f.ORIENTATION_CHANGE,A))}},updateScale:function(){var R,F,A=this.canvas.style,N=this.zoom,V=this.autoRound;if(this.scaleMode===b.SCALE_MODE.NONE)this.displaySize.setSize(this.gameSize.width*N,this.gameSize.height*N),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),this._resetZoom&&(A.width=R+"px",A.height=F+"px",this._resetZoom=!1);else if(this.scaleMode===b.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),this.canvas.width=R,this.canvas.height=F;else if(this.scaleMode===b.SCALE_MODE.EXPAND){var B=this.game.config.width,H=this.game.config.height;this.displaySize.setSize(this.parentSize.width,this.parentSize.height),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),A.width=R+"px",A.height=F+"px";var Q=this.parentSize.width/B,G=this.parentSize.height/H;Q=0?0:-F.x*N.x,F.y>=0?0:-F.y*N.y,R.width>=F.width?I.width:I.width-(F.width-R.width)*N.x,R.height>=F.height?I.height:I.height-(F.height-R.height)*N.y),A&&(D.width/=A.zoomX,D.height/=A.zoomY,D.centerX=A.centerX+A.scrollX,D.centerY=A.centerY+A.scrollY),D},step:function(A,D){this.parent&&(this._lastCheck+=D,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var A=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",A.orientationChange,!1):window.removeEventListener("orientationchange",A.orientationChange,!1),window.removeEventListener("resize",A.windowResize,!1),["webkit","moz",""].forEach(function(I){document.removeEventListener(I+"fullscreenchange",A.fullScreenChange,!1),document.removeEventListener(I+"fullscreenerror",A.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",A.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",A.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===b.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===b.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});S.exports=E},64743:S=>{S.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:S=>{S.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:S=>{S.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:S=>{S.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(S,k,a)=>{var b={CENTER:a(64743),ORIENTATION:a(39218),SCALE_MODE:a(81050),ZOOM:a(80805)};S.exports=b},56139:S=>{S.exports="enterfullscreen"},2336:S=>{S.exports="fullscreenfailed"},47412:S=>{S.exports="fullscreenunsupported"},51452:S=>{S.exports="leavefullscreen"},20666:S=>{S.exports="orientationchange"},47945:S=>{S.exports="resize"},97480:(S,k,a)=>{S.exports={ENTER_FULLSCREEN:a(56139),FULLSCREEN_FAILED:a(2336),FULLSCREEN_UNSUPPORTED:a(47412),LEAVE_FULLSCREEN:a(51452),ORIENTATION_CHANGE:a(20666),RESIZE:a(47945)}},93364:(S,k,a)=>{var b=a(79291),T=a(13560),g={Center:a(64743),Events:a(97480),Orientation:a(39218),ScaleManager:a(76531),ScaleModes:a(81050),Zoom:a(80805)};g=b(!1,g,T.CENTER),g=b(!1,g,T.ORIENTATION),g=b(!1,g,T.SCALE_MODE),g=b(!1,g,T.ZOOM),S.exports=g},27397:(S,k,a)=>{var b=a(95540),T=a(35355);S.exports=function(f){var h=f.game.config.defaultPhysicsSystem,c=b(f.settings,"physics",!1);if(h||c){var u=[];if(h&&u.push(T(h+"Physics")),c)for(var m in c)m=T(m.concat("Physics")),-1===u.indexOf(m)&&u.push(m);return u}}},52106:(S,k,a)=>{var b=a(95540);S.exports=function(g){var f=g.plugins.getDefaultScenePlugins(),h=b(g.settings,"plugins",!1);return Array.isArray(h)?h:f||[]}},87033:S=>{S.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},97482:(S,k,a)=>{var b=a(83419),T=a(2368),g=new b({initialize:function(h){this.sys=new T(this,h)},update:function(){}});S.exports=g},60903:(S,k,a)=>{var b=a(83419),T=a(89993),g=a(44594),f=a(8443),h=a(35154),c=a(54899),u=a(29747),m=a(97482),d=a(2368),p=new b({initialize:function(x,y){if(this.game=x,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,y){Array.isArray(y)||(y=[y]);for(var _=0;_-1&&(delete this.keys[_],this.scenes.splice(y,1),this._start.indexOf(_)>-1&&(y=this._start.indexOf(_),this._start.splice(y,1)),x.sys.destroy()),this},bootScene:function(v){var _,x=v.sys,y=x.settings;x.sceneUpdate=u,v.init&&(v.init.call(v,y.data),y.status=T.INIT,y.isTransition&&x.events.emit(g.TRANSITION_INIT,y.transitionFrom,y.transitionDuration)),x.load&&(_=x.load).reset(),_&&v.preload?(v.preload.call(v),y.status=T.LOADING,_.once(c.COMPLETE,this.loadComplete,this),_.start()):this.create(v)},loadComplete:function(v){this.create(v.scene)},payloadComplete:function(v){this.bootScene(v.scene)},update:function(v,x){this.processQueue(),this.isProcessing=!0;for(var y=this.scenes.length-1;y>=0;y--){var _=this.scenes[y].sys;_.settings.status>T.START&&_.settings.status<=T.RUNNING&&_.step(v,x),_.scenePlugin&&_.scenePlugin._target&&_.scenePlugin.step(v,x)}},render:function(v){for(var x=0;x=T.LOADING&&y.settings.status=T.START&&E<=T.CREATING)return this;if(E>=T.RUNNING&&E<=T.SLEEPING)_.shutdown(),_.sceneUpdate=u,_.start(x);else if(_.sceneUpdate=u,_.start(x),_.load&&(A=_.load),A&&_.settings.hasOwnProperty("pack")&&(A.reset(),A.addPack({payload:_.settings.pack})))return _.settings.status=T.LOADING,A.once(c.COMPLETE,this.payloadComplete,this),A.start(),this;return this.bootScene(y),this},stop:function(v,x){var y=this.getScene(v);if(y&&!y.sys.isTransitioning()&&y.sys.settings.status!==T.SHUTDOWN){var _=y.sys.load;_&&(_.off(c.COMPLETE,this.loadComplete,this),_.off(c.COMPLETE,this.payloadComplete,this)),y.sys.shutdown(x)}return this},switch:function(v,x,y){var _=this.getScene(v),E=this.getScene(x);return _&&E&&_!==E&&(this.sleep(v),this.isSleeping(x)?this.wake(x,y):this.start(x,y)),this},getAt:function(v){return this.scenes[v]},getIndex:function(v){var x=this.getScene(v);return this.scenes.indexOf(x)},bringToTop:function(v){if(this.isProcessing)return this.queueOp("bringToTop",v);var x=this.getIndex(v),y=this.scenes;if(-1!==x&&x0){var y=this.getScene(v);this.scenes.splice(x,1),this.scenes.unshift(y)}return this},moveDown:function(v){if(this.isProcessing)return this.queueOp("moveDown",v);var x=this.getIndex(v);if(x>0){var y=x-1,_=this.getScene(v),E=this.getAt(y);this.scenes[x]=E,this.scenes[y]=_}return this},moveUp:function(v){if(this.isProcessing)return this.queueOp("moveUp",v);var x=this.getIndex(v);if(xy),0,E)}return this},moveBelow:function(v,x){if(v===x)return this;if(this.isProcessing)return this.queueOp("moveBelow",v,x);var y=this.getIndex(v),_=this.getIndex(x);if(-1!==y&&-1!==_&&_>y){var E=this.getAt(_);this.scenes.splice(_,1),0===y?this.scenes.unshift(E):this.scenes.splice(y-(_{var b=a(45319),T=a(83419),g=a(44594),f=a(95540),h=a(37277),c=new T({initialize:function(m){this.scene=m,this.systems=m.sys,this.settings=m.sys.settings,this.key=m.sys.settings.key,this.manager=m.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._willSleep=!1,this._willRemove=!1,m.sys.events.once(g.BOOT,this.boot,this),m.sys.events.on(g.START,this.pluginStart,this)},boot:function(){this.systems.events.once(g.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(g.SHUTDOWN,this.shutdown,this)},start:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",u,m),this},restart:function(u){var m=this.key;return this.manager.queueOp("stop",m),this.manager.queueOp("start",m,u),this},transition:function(u){void 0===u&&(u={});var m=f(u,"target",!1),d=this.manager.getScene(m);if(!m||!this.checkValidTransition(d))return!1;var p=f(u,"duration",1e3);this._elapsed=0,this._target=d,this._duration=p,this._willSleep=f(u,"sleep",!1),this._willRemove=f(u,"remove",!1);var v=f(u,"onUpdate",null);v&&(this._onUpdate=v,this._onUpdateScope=f(u,"onUpdateScope",this.scene));var x=f(u,"allowInput",!1);this.settings.transitionAllowInput=x;var y=d.sys.settings;y.isTransition=!0,y.transitionFrom=this.scene,y.transitionDuration=p,y.transitionAllowInput=x,f(u,"moveAbove",!1)?this.manager.moveAbove(this.key,m):f(u,"moveBelow",!1)&&this.manager.moveBelow(this.key,m),d.sys.isSleeping()?d.sys.wake(f(u,"data")):this.manager.start(m,f(u,"data"));var _=f(u,"onStart",null),E=f(u,"onStartScope",this.scene);return _&&_.call(E,this.scene,d,p),this.systems.events.emit(g.TRANSITION_OUT,d,p),!0},checkValidTransition:function(u){return!(!u||u.sys.isActive()||u.sys.isTransitioning()||u===this.scene||this.systems.isTransitioning())},step:function(u,m){this._elapsed+=m,this.transitionProgress=b(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var m=this._target.sys.settings;this._target.sys.events.emit(g.TRANSITION_COMPLETE,this.scene),m.isTransition=!1,m.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(u,m,d,p){return this.manager.add(u,m,d,p)},launch:function(u,m){return u&&u!==this.key&&this.manager.queueOp("start",u,m),this},run:function(u,m){return u&&u!==this.key&&this.manager.queueOp("run",u,m),this},pause:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("pause",u,m),this},resume:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("resume",u,m),this},sleep:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("sleep",u,m),this},wake:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("wake",u,m),this},switch:function(u,m){return u!==this.key&&this.manager.queueOp("switch",this.key,u,m),this},stop:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("stop",u,m),this},setActive:function(u,m,d){void 0===m&&(m=this.key);var p=this.manager.getScene(m);return p&&p.sys.setActive(u,d),this},setVisible:function(u,m){void 0===m&&(m=this.key);var d=this.manager.getScene(m);return d&&d.sys.setVisible(u),this},isSleeping:function(u){return void 0===u&&(u=this.key),this.manager.isSleeping(u)},isActive:function(u){return void 0===u&&(u=this.key),this.manager.isActive(u)},isPaused:function(u){return void 0===u&&(u=this.key),this.manager.isPaused(u)},isVisible:function(u){return void 0===u&&(u=this.key),this.manager.isVisible(u)},swapPosition:function(u,m){return void 0===m&&(m=this.key),u!==m&&this.manager.swapPosition(u,m),this},moveAbove:function(u,m){return void 0===m&&(m=this.key),u!==m&&this.manager.moveAbove(u,m),this},moveBelow:function(u,m){return void 0===m&&(m=this.key),u!==m&&this.manager.moveBelow(u,m),this},remove:function(u){return void 0===u&&(u=this.key),this.manager.remove(u),this},moveUp:function(u){return void 0===u&&(u=this.key),this.manager.moveUp(u),this},moveDown:function(u){return void 0===u&&(u=this.key),this.manager.moveDown(u),this},bringToTop:function(u){return void 0===u&&(u=this.key),this.manager.bringToTop(u),this},sendToBack:function(u){return void 0===u&&(u=this.key),this.manager.sendToBack(u),this},get:function(u){return this.manager.getScene(u)},getStatus:function(u){var m=this.manager.getScene(u);if(m)return m.sys.getStatus()},getIndex:function(u){return void 0===u&&(u=this.key),this.manager.getIndex(u)},shutdown:function(){var u=this.systems.events;u.off(g.SHUTDOWN,this.shutdown,this),u.off(g.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});h.register("ScenePlugin",c,"scenePlugin"),S.exports=c},55681:(S,k,a)=>{var b=a(89993),T=a(35154),g=a(46975),f=a(87033);S.exports={create:function(c){return"string"==typeof c?c={key:c}:void 0===c&&(c={}),{status:b.PENDING,key:T(c,"key",""),active:T(c,"active",!1),visible:T(c,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:T(c,"pack",!1),cameras:T(c,"cameras",null),map:T(c,"map",g(f,T(c,"mapAdd",{}))),physics:T(c,"physics",{}),loader:T(c,"loader",{}),plugins:T(c,"plugins",!1),input:T(c,"input",{})}}}},2368:(S,k,a)=>{var b=a(83419),T=a(89993),g=a(42363),f=a(44594),h=a(27397),c=a(52106),u=a(29747),m=a(55681),d=new b({initialize:function(v,x){this.scene=v,this.config=x,this.settings=m.create(x),this.sceneUpdate=u},init:function(p){this.settings.status=T.INIT,this.sceneUpdate=u,this.game=p,this.renderer=p.renderer,this.canvas=p.canvas,this.context=p.context;var v=p.plugins;this.plugins=v,v.addToScene(this,g.Global,[g.CoreScene,c(this),h(this)]),this.events.emit(f.BOOT,this),this.settings.isBooted=!0},step:function(p,v){var x=this.events;x.emit(f.PRE_UPDATE,p,v),x.emit(f.UPDATE,p,v),this.sceneUpdate.call(this.scene,p,v),x.emit(f.POST_UPDATE,p,v)},render:function(p){var v=this.displayList;v.depthSort(),this.events.emit(f.PRE_RENDER,p),this.cameras.render(p,v),this.events.emit(f.RENDER,p)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(p){var v=this.settings,x=this.getStatus();return x!==T.CREATING&&x!==T.RUNNING?console.warn("Cannot pause non-running Scene",v.key):this.settings.active&&(v.status=T.PAUSED,v.active=!1,this.events.emit(f.PAUSE,this,p)),this},resume:function(p){var v=this.events,x=this.settings;return this.settings.active||(x.status=T.RUNNING,x.active=!0,v.emit(f.RESUME,this,p)),this},sleep:function(p){var v=this.settings,x=this.getStatus();return x!==T.CREATING&&x!==T.RUNNING?console.warn("Cannot sleep non-running Scene",v.key):(v.status=T.SLEEPING,v.active=!1,v.visible=!1,this.events.emit(f.SLEEP,this,p)),this},wake:function(p){var v=this.events,x=this.settings;return x.status=T.RUNNING,x.active=!0,x.visible=!0,v.emit(f.WAKE,this,p),x.isTransition&&v.emit(f.TRANSITION_WAKE,x.transitionFrom,x.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var p=this.settings.status;return p>T.PENDING&&p<=T.RUNNING},isSleeping:function(){return this.settings.status===T.SLEEPING},isActive:function(){return this.settings.status===T.RUNNING},isPaused:function(){return this.settings.status===T.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(p){return this.settings.visible=p,this},setActive:function(p,v){return p?this.resume(v):this.pause(v)},start:function(p){var v=this.events,x=this.settings;p&&(x.data=p),x.status=T.START,x.active=!0,x.visible=!0,v.emit(f.START,this),v.emit(f.READY,this,p)},shutdown:function(p){var v=this.events,x=this.settings;v.off(f.TRANSITION_INIT),v.off(f.TRANSITION_START),v.off(f.TRANSITION_COMPLETE),v.off(f.TRANSITION_OUT),x.status=T.SHUTDOWN,x.active=!1,x.visible=!1,v.emit(f.SHUTDOWN,this,p)},destroy:function(){var p=this.events,v=this.settings;v.status=T.DESTROYED,v.active=!1,v.visible=!1,p.emit(f.DESTROY,this),p.removeAllListeners();for(var x=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],y=0;y{S.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},69830:S=>{S.exports="addedtoscene"},7919:S=>{S.exports="boot"},46763:S=>{S.exports="create"},11763:S=>{S.exports="destroy"},71555:S=>{S.exports="pause"},36735:S=>{S.exports="postupdate"},3809:S=>{S.exports="prerender"},90716:S=>{S.exports="preupdate"},58262:S=>{S.exports="ready"},91633:S=>{S.exports="removedfromscene"},10319:S=>{S.exports="render"},87132:S=>{S.exports="resume"},81961:S=>{S.exports="shutdown"},90194:S=>{S.exports="sleep"},6265:S=>{S.exports="start"},33178:S=>{S.exports="transitioncomplete"},43063:S=>{S.exports="transitioninit"},11259:S=>{S.exports="transitionout"},61611:S=>{S.exports="transitionstart"},45209:S=>{S.exports="transitionwake"},22966:S=>{S.exports="update"},21747:S=>{S.exports="wake"},44594:(S,k,a)=>{S.exports={ADDED_TO_SCENE:a(69830),BOOT:a(7919),CREATE:a(46763),DESTROY:a(11763),PAUSE:a(71555),POST_UPDATE:a(36735),PRE_RENDER:a(3809),PRE_UPDATE:a(90716),READY:a(58262),REMOVED_FROM_SCENE:a(91633),RENDER:a(10319),RESUME:a(87132),SHUTDOWN:a(81961),SLEEP:a(90194),START:a(6265),TRANSITION_COMPLETE:a(33178),TRANSITION_INIT:a(43063),TRANSITION_OUT:a(11259),TRANSITION_START:a(61611),TRANSITION_WAKE:a(45209),UPDATE:a(22966),WAKE:a(21747)}},62194:(S,k,a)=>{var b=a(89993),T=a(79291),g={Events:a(44594),GetPhysicsPlugins:a(27397),GetScenePlugins:a(52106),SceneManager:a(60903),ScenePlugin:a(52209),Settings:a(55681),Systems:a(2368)};g=T(!1,g,b),S.exports=g},30341:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(14463),f=a(79291),h=a(29747),c=new b({Extends:T,initialize:function(m,d,p){T.call(this),this.manager=m,this.key=d,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=f(this.config,p),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(u){return!(!u||!u.name||"string"!=typeof u.name||(this.markers[u.name]?(console.error("addMarker "+u.name+" already exists in Sound"),1):(u=f(!0,{name:"",start:0,duration:this.totalDuration-(u.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},u),this.markers[u.name]=u,0)))},updateMarker:function(u){return!(!u||!u.name||"string"!=typeof u.name||(this.markers[u.name]?(this.markers[u.name]=f(!0,this.markers[u.name],u),0):(console.warn("Audio Marker: "+u.name+" missing in Sound: "+this.key),1)))},removeMarker:function(u){var m=this.markers[u];return m?(this.markers[u]=null,m):null},play:function(u,m){if(void 0===u&&(u=""),"object"==typeof u&&(m=u,u=""),"string"!=typeof u)return!1;if(u){if(!this.markers[u])return console.warn("Marker: "+u+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[u],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=f(this.currentConfig,m),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying||(this.isPlaying=!1,this.isPaused=!0,0))},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1,0))},stop:function(){return!(!this.isPaused&&!this.isPlaying||(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),0))},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:h,calculateRate:function(){var d=Math.pow(1.0005777895065548,this.currentConfig.detune+this.manager.detune);this.totalRate=this.currentConfig.rate*this.manager.rate*d},destroy:function(){this.pendingRemove||(this.stop(),this.emit(g.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});S.exports=c},85034:(S,k,a)=>{var b=a(83419),T=a(41786),g=a(50792),f=a(14463),h=a(8443),c=a(46710),u=a(58731),m=a(29747),d=a(26099),p=new b({Extends:g,initialize:function(x){g.call(this),this.game=x,this.jsonCache=x.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new d,x.events.on(h.BLUR,this.onGameBlur,this),x.events.on(h.FOCUS,this.onGameFocus,this),x.events.on(h.PRE_STEP,this.update,this),x.events.once(h.DESTROY,this.destroy,this)},add:m,addAudioSprite:function(v,x){void 0===x&&(x={});var y=this.add(v,x);for(var _ in y.spritemap=this.jsonCache.get(v).spritemap,y.spritemap)if(y.spritemap.hasOwnProperty(_)){var E=T(x),A=y.spritemap[_];E.loop=!!A.hasOwnProperty("loop")&&A.loop,y.addMarker({name:_,start:A.start,duration:A.end-A.start,config:E})}return y},get:function(v){return u(this.sounds,"key",v)},getAll:function(v){return v?c(this.sounds,"key",v):c(this.sounds)},getAllPlaying:function(){return c(this.sounds,"isPlaying",!0)},play:function(v,x){var y=this.add(v);return y.once(f.COMPLETE,y.destroy,y),x?x.name?(y.addMarker(x),y.play(x.name)):y.play(x):y.play()},playAudioSprite:function(v,x,y){var _=this.addAudioSprite(v);return _.once(f.COMPLETE,_.destroy,_),_.play(x,y)},remove:function(v){var x=this.sounds.indexOf(v);return-1!==x&&(v.destroy(),this.sounds.splice(x,1),!0)},removeAll:function(){this.sounds.forEach(function(v){v.destroy()}),this.sounds.length=0},removeByKey:function(v){for(var x=0,y=this.sounds.length-1;y>=0;y--){var _=this.sounds[y];_.key===v&&(_.destroy(),this.sounds.splice(y,1),x++)}return x},pauseAll:function(){this.forEachActiveSound(function(v){v.pause()}),this.emit(f.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(v){v.resume()}),this.emit(f.RESUME_ALL,this)},setListenerPosition:m,stopAll:function(){this.forEachActiveSound(function(v){v.stop()}),this.emit(f.STOP_ALL,this)},stopByKey:function(v){var x=0;return this.getAll(v).forEach(function(y){y.stop()&&x++}),x},isPlaying:function(v){var _,y=this.sounds.length-1;if(void 0===v){for(;y>=0;y--)if((_=this.sounds[y]).isPlaying)return!0}else for(;y>=0;y--)if((_=this.sounds[y]).key===v&&_.isPlaying)return!0;return!1},unlock:m,onBlur:m,onFocus:m,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(v,x){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(f.UNLOCKED,this));for(var y=this.sounds.length-1;y>=0;y--)this.sounds[y].pendingRemove&&this.sounds.splice(y,1);this.sounds.forEach(function(_){_.update(v,x)})},destroy:function(){this.game.events.off(h.BLUR,this.onGameBlur,this),this.game.events.off(h.FOCUS,this.onGameFocus,this),this.game.events.off(h.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(v,x){var y=this;this.sounds.forEach(function(_,E){_&&!_.pendingRemove&&v.call(x||y,_,E,y.sounds)})},setRate:function(v){return this.rate=v,this},rate:{get:function(){return this._rate},set:function(v){this._rate=v,this.forEachActiveSound(function(x){x.calculateRate()}),this.emit(f.GLOBAL_RATE,this,v)}},setDetune:function(v){return this.detune=v,this},detune:{get:function(){return this._detune},set:function(v){this._detune=v,this.forEachActiveSound(function(x){x.calculateRate()}),this.emit(f.GLOBAL_DETUNE,this,v)}}});S.exports=p},14747:(S,k,a)=>{var b=a(33684),T=a(25960),g=a(57490);S.exports={create:function(h){var c=h.config.audio,u=h.device.audio;return c.noAudio||!u.webAudio&&!u.audioData?new T(h):u.webAudio&&!c.disableWebAudio?new g(h):new b(h)}}},19723:S=>{S.exports="complete"},98882:S=>{S.exports="decodedall"},57506:S=>{S.exports="decoded"},73146:S=>{S.exports="destroy"},11305:S=>{S.exports="detune"},40577:S=>{S.exports="detune"},30333:S=>{S.exports="mute"},20394:S=>{S.exports="rate"},21802:S=>{S.exports="volume"},1299:S=>{S.exports="looped"},99190:S=>{S.exports="loop"},97125:S=>{S.exports="mute"},89259:S=>{S.exports="pan"},79986:S=>{S.exports="pauseall"},17586:S=>{S.exports="pause"},19618:S=>{S.exports="play"},42306:S=>{S.exports="rate"},10387:S=>{S.exports="resumeall"},48959:S=>{S.exports="resume"},9960:S=>{S.exports="seek"},19180:S=>{S.exports="stopall"},98328:S=>{S.exports="stop"},50401:S=>{S.exports="unlocked"},52498:S=>{S.exports="volume"},14463:(S,k,a)=>{S.exports={COMPLETE:a(19723),DECODED:a(57506),DECODED_ALL:a(98882),DESTROY:a(73146),DETUNE:a(11305),GLOBAL_DETUNE:a(40577),GLOBAL_MUTE:a(30333),GLOBAL_RATE:a(20394),GLOBAL_VOLUME:a(21802),LOOP:a(99190),LOOPED:a(1299),MUTE:a(97125),PAN:a(89259),PAUSE_ALL:a(79986),PAUSE:a(17586),PLAY:a(19618),RATE:a(42306),RESUME_ALL:a(10387),RESUME:a(48959),SEEK:a(9960),STOP_ALL:a(19180),STOP:a(98328),UNLOCKED:a(50401),VOLUME:a(52498)}},64895:(S,k,a)=>{var b=a(30341),T=a(83419),g=a(14463),f=a(45319),h=new T({Extends:b,initialize:function(u,m,d){if(void 0===d&&(d={}),this.tags=u.game.cache.audio.get(m),!this.tags)throw new Error('No cached audio asset with key "'+m);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,b.call(this,u,m,d)},play:function(c,u){return!(this.manager.isLocked(this,"play",[c,u])||!b.prototype.play.call(this,c,u)||!this.pickAndPlayAudioTag()||(this.emit(g.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||this.startTime>0||!b.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(g.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||this.startTime>0||!b.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(g.RESUME,this),0))},stop:function(){return!(this.manager.isLocked(this,"stop")||!b.prototype.stop.call(this)||(this.stopAndReleaseAudioTag(),this.emit(g.STOP,this),0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var u=this.currentConfig.delay,m=(this.currentMarker?this.currentMarker.start:0)+this.currentConfig.seek;return this.previousTime=m,this.audio.currentTime=m,this.applyConfig(),0===u?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*u,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var c=0;c0)return void(this.startTime=m-this.manager.loopEndOffset?(this.audio.currentTime=u+Math.max(0,d-m),d=this.audio.currentTime):d=m)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(g.COMPLETE,this);this.previousTime=d}},destroy:function(){b.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=f(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){b.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(c){this.currentConfig.mute=c,!this.manager.isLocked(this,"mute",c)&&(this.updateMute(),this.emit(g.MUTE,this,c))}},setMute:function(c){return this.mute=c,this},volume:{get:function(){return this.currentConfig.volume},set:function(c){this.currentConfig.volume=c,!this.manager.isLocked(this,"volume",c)&&(this.updateVolume(),this.emit(g.VOLUME,this,c))}},setVolume:function(c){return this.volume=c,this},rate:{get:function(){return this.currentConfig.rate},set:function(c){this.currentConfig.rate=c,!this.manager.isLocked(this,g.RATE,c)&&(this.calculateRate(),this.emit(g.RATE,this,c))}},setRate:function(c){return this.rate=c,this},detune:{get:function(){return this.currentConfig.detune},set:function(c){this.currentConfig.detune=c,!this.manager.isLocked(this,g.DETUNE,c)&&(this.calculateRate(),this.emit(g.DETUNE,this,c))}},setDetune:function(c){return this.detune=c,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(c){this.manager.isLocked(this,"seek",c)||this.startTime>0||(this.isPlaying||this.isPaused)&&(c=Math.min(Math.max(0,c),this.duration),this.isPlaying?(this.previousTime=c,this.audio.currentTime=c):this.isPaused&&(this.currentConfig.seek=c),this.emit(g.SEEK,this,c))}},setSeek:function(c){return this.seek=c,this},loop:{get:function(){return this.currentConfig.loop},set:function(c){this.currentConfig.loop=c,!this.manager.isLocked(this,"loop",c)&&(this.audio&&(this.audio.loop=c),this.emit(g.LOOP,this,c))}},setLoop:function(c){return this.loop=c,this},pan:{get:function(){return this.currentConfig.pan},set:function(c){this.currentConfig.pan=c,this.emit(g.PAN,this,c)}},setPan:function(c){return this.pan=c,this}});S.exports=h},33684:(S,k,a)=>{var b=a(85034),T=a(83419),g=a(14463),f=a(64895),h=new T({Extends:b,initialize:function(u){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,b.call(this,u)},add:function(c,u){var m=new f(this,c,u);return this.sounds.push(m),m},unlock:function(){this.locked=!1;var c=this;if(this.game.cache.audio.entries.each(function(p,v){for(var x=0;x{S.exports={SoundManagerCreator:a(14747),Events:a(14463),BaseSound:a(30341),BaseSoundManager:a(85034),WebAudioSound:a(71741),WebAudioSoundManager:a(57490),HTML5AudioSound:a(64895),HTML5AudioSoundManager:a(33684),NoAudioSound:a(4603),NoAudioSoundManager:a(25960)}},4603:(S,k,a)=>{var b=a(30341),T=a(83419),g=a(50792),f=a(79291),h=a(29747),c=function(){return!1},u=function(){return null},m=function(){return this},d=new T({Extends:g,initialize:function(v,x,y){void 0===y&&(y={}),g.call(this),this.manager=v,this.key=x,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=f({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},y),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:c,updateMarker:c,removeMarker:u,play:c,pause:c,resume:c,stop:c,setMute:m,setVolume:m,setRate:m,setDetune:m,setSeek:m,setLoop:m,setPan:m,applyConfig:u,resetConfig:u,update:h,calculateRate:u,destroy:function(){b.prototype.destroy.call(this)}});S.exports=d},25960:(S,k,a)=>{var b=a(85034),T=a(83419),g=a(50792),f=a(4603),h=a(29747),c=new T({Extends:g,initialize:function(m){g.call(this),this.game=m,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(u,m){var d=new f(this,u,m);return this.sounds.push(d),d},addAudioSprite:function(u,m){var d=this.add(u,m);return d.spritemap={},d},get:function(u){return b.prototype.get.call(this,u)},getAll:function(u){return b.prototype.getAll.call(this,u)},play:function(u,m){return!1},playAudioSprite:function(u,m,d){return!1},remove:function(u){return b.prototype.remove.call(this,u)},removeAll:function(){return b.prototype.removeAll.call(this)},removeByKey:function(u){return b.prototype.removeByKey.call(this,u)},stopByKey:function(u){return b.prototype.stopByKey.call(this,u)},onBlur:h,onFocus:h,onGameBlur:h,onGameFocus:h,pauseAll:h,resumeAll:h,stopAll:h,update:h,setRate:h,setDetune:h,setMute:h,setVolume:h,unlock:h,forEachActiveSound:function(u,m){b.prototype.forEachActiveSound.call(this,u,m)},destroy:function(){b.prototype.destroy.call(this)}});S.exports=c},71741:(S,k,a)=>{var b=a(30341),T=a(83419),g=a(14463),f=a(95540),h=new T({Extends:b,initialize:function(u,m,d){if(void 0===d&&(d={}),this.audioBuffer=u.game.cache.audio.get(m),!this.audioBuffer)throw new Error('Audio key "'+m+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=u.context.createGain(),this.volumeNode=u.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),u.context.createPanner&&(this.spatialNode=u.context.createPanner(),this.volumeNode.connect(this.spatialNode)),u.context.createStereoPanner?(this.pannerNode=u.context.createStereoPanner(),u.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(u.destination)):u.context.createPanner?this.spatialNode.connect(u.destination):this.volumeNode.connect(u.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,b.call(this,u,m,d)},play:function(c,u){return!!b.prototype.play.call(this,c,u)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(g.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var b=a(53134),T=a(85034),g=a(83419),f=a(14463),h=a(8443),c=a(71741),u=a(95540),m=new g({Extends:T,initialize:function(p){this.context=this.createAudioContext(p),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),T.call(this,p),this.locked&&p.isBooted?this.unlock():p.events.once(h.BOOT,this.unlock,this)},createAudioContext:function(d){var p=d.config.audio;return p.context?(p.context.resume(),p.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(d){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=d,this.masterMuteNode=d.createGain(),this.masterVolumeNode=d.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(d.destination),this.destination=this.masterMuteNode,this},add:function(d,p){var v=new c(this,d,p);return this.sounds.push(v),v},decodeAudio:function(d,p){var v;v=Array.isArray(d)?d:[{key:d,data:p}];for(var x=this.game.cache.audio,y=v.length,_=0;_{var b=a(37105),T=a(83419),g=a(29747),f=a(19186),h=new T({initialize:function(u){this.parent=u,this.list=[],this.position=0,this.addCallback=g,this.removeCallback=g,this._sortKey=""},add:function(c,u){return u?b.Add(this.list,c):b.Add(this.list,c,0,this.addCallback,this)},addAt:function(c,u,m){return m?b.AddAt(this.list,c,u):b.AddAt(this.list,c,u,0,this.addCallback,this)},getAt:function(c){return this.list[c]},getIndex:function(c){return this.list.indexOf(c)},sort:function(c,u){return c?(void 0===u&&(u=function(m,d){return m[c]-d[c]}),f(this.list,u),this):this},getByName:function(c){return b.GetFirst(this.list,"name",c)},getRandom:function(c,u){return b.GetRandom(this.list,c,u)},getFirst:function(c,u,m,d){return b.GetFirst(this.list,c,u,m,d)},getAll:function(c,u,m,d){return b.GetAll(this.list,c,u,m,d)},count:function(c,u){return b.CountAllMatching(this.list,c,u)},swap:function(c,u){b.Swap(this.list,c,u)},moveTo:function(c,u){return b.MoveTo(this.list,c,u)},moveAbove:function(c,u){return b.MoveAbove(this.list,c,u)},moveBelow:function(c,u){return b.MoveBelow(this.list,c,u)},remove:function(c,u){return u?b.Remove(this.list,c):b.Remove(this.list,c,this.removeCallback,this)},removeAt:function(c,u){return u?b.RemoveAt(this.list,c):b.RemoveAt(this.list,c,this.removeCallback,this)},removeBetween:function(c,u,m){return m?b.RemoveBetween(this.list,c,u):b.RemoveBetween(this.list,c,u,this.removeCallback,this)},removeAll:function(c){for(var u=this.list.length;u--;)this.remove(this.list[u],c);return this},bringToTop:function(c){return b.BringToTop(this.list,c)},sendToBack:function(c){return b.SendToBack(this.list,c)},moveUp:function(c){return b.MoveUp(this.list,c),c},moveDown:function(c){return b.MoveDown(this.list,c),c},reverse:function(){return this.list.reverse(),this},shuffle:function(){return b.Shuffle(this.list),this},replace:function(c,u){return b.Replace(this.list,c,u)},exists:function(c){return this.list.indexOf(c)>-1},setAll:function(c,u,m,d){return b.SetAll(this.list,c,u,m,d),this},each:function(c,u){for(var m=[null],d=2;d0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});S.exports=h},90330:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){this.entries={},this.size=0,this.setAll(f)},setAll:function(g){if(Array.isArray(g))for(var f=0;f{var b=a(83419),T=a(50792),g=a(82348),f=new b({Extends:T,initialize:function(){T.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(h){return this._active.indexOf(h)>-1},isPending:function(h){return this._toProcess>0&&this._pending.indexOf(h)>-1},isDestroying:function(h){return this._destroy.indexOf(h)>-1},add:function(h){return this.checkQueue&&this.isActive(h)&&!this.isDestroying(h)||this.isPending(h)||(this._pending.push(h),this._toProcess++),h},remove:function(h){if(this.isPending(h)){var c=this._pending,u=c.indexOf(h);-1!==u&&c.splice(u,1)}else this.isActive(h)&&(this._destroy.push(h),this._toProcess++);return h},removeAll:function(){for(var h=this._active,c=this._destroy,u=h.length;u--;)c.push(h[u]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var u,m,h=this._destroy,c=this._active;for(u=0;u{var b=a(43886);function T(D){if(!(this instanceof T))return new T(D,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,D||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function g(D,I,R){if(!R)return I.indexOf(D);for(var F=0;F=D.minX&&I.maxY>=D.minY}function E(D){return{children:D,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function A(D,I,R,F,N){for(var B,V=[I,R];V.length;)!((R=V.pop())-(I=V.pop())<=F)&&(B=I+Math.ceil((R-I)/F/2)*F,b(D,B,I,R,N),V.push(I,B,B,R))}T.prototype={all:function(){return this._all(this.data,[])},search:function(D){var I=this.data,R=[],F=this.toBBox;if(!_(D,I))return R;for(var V,B,H,Q,N=[];I;){for(V=0,B=I.children.length;V=0&&V[I].children.length>this._maxEntries;)this._split(V,I),I--;this._adjustParentBBoxes(N,V,I)},_split:function(D,I){var R=D[I],F=R.children.length,N=this._minEntries;this._chooseSplitAxis(R,N,F);var V=this._chooseSplitIndex(R,N,F),B=E(R.children.splice(V,R.children.length-V));B.height=R.height,B.leaf=R.leaf,f(R,this.toBBox),f(B,this.toBBox),I?D[I-1].children.push(B):this._splitRoot(R,B)},_splitRoot:function(D,I){this.data=E([D,I]),this.data.height=D.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(D,I,R){var F,N,V,B,H,Q,G,K;for(Q=G=1/0,F=I;F<=R-I;F++)B=x(N=h(D,0,F,this.toBBox),V=h(D,F,R,this.toBBox)),H=d(N)+d(V),B=I;Q--)G=D.children[Q],c(B,D.leaf?N(G):G),H+=p(B);return H},_adjustParentBBoxes:function(D,I,R){for(var F=R;F>=0;F--)c(I[F],D)},_condense:function(D){for(var R,I=D.length-1;I>=0;I--)0===D[I].children.length?I>0?(R=D[I-1].children).splice(R.indexOf(D[I]),1):this.clear():f(D[I],this.toBBox)},compareMinX:function(D,I){return D.left-I.left},compareMinY:function(D,I){return D.top-I.top},toBBox:function(D){return{minX:D.left,minY:D.top,maxX:D.right,maxY:D.bottom}}},S.exports=T},35072:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){if(this.entries=[],Array.isArray(f))for(var h=0;h-1&&this.entries.splice(f,1),this},dump:function(){console.group("Set");for(var g=0;g-1},union:function(g){var f=new T;return g.entries.forEach(function(h){f.set(h)}),this.entries.forEach(function(h){f.set(h)}),f},intersect:function(g){var f=new T;return this.entries.forEach(function(h){g.contains(h)&&f.set(h)}),f},difference:function(g){var f=new T;return this.entries.forEach(function(h){g.contains(h)||f.set(h)}),f},size:{get:function(){return this.entries.length},set:function(g){return g{var b=a(45319),T=a(83419),g=a(56583),f=a(26099),h=new T({initialize:function(u,m,d,p){void 0===u&&(u=0),void 0===m&&(m=u),void 0===d&&(d=0),void 0===p&&(p=null),this._width=u,this._height=m,this._parent=p,this.aspectMode=d,this.aspectRatio=0===m?1:u/m,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new f},setAspectMode:function(c){return void 0===c&&(c=0),this.aspectMode=c,this.setSize(this._width,this._height)},setSnap:function(c,u){return void 0===c&&(c=0),void 0===u&&(u=c),this.snapTo.set(c,u),this.setSize(this._width,this._height)},setParent:function(c){return this._parent=c,this.setSize(this._width,this._height)},setMin:function(c,u){return void 0===c&&(c=0),void 0===u&&(u=c),this.minWidth=b(c,0,this.maxWidth),this.minHeight=b(u,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(c,u){return void 0===c&&(c=Number.MAX_VALUE),void 0===u&&(u=c),this.maxWidth=b(c,this.minWidth,Number.MAX_VALUE),this.maxHeight=b(u,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(c,u){switch(void 0===c&&(c=0),void 0===u&&(u=c),this.aspectMode){case h.NONE:this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(g(u,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case h.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case h.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(g(u,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case h.FIT:this.constrain(c,u,!0);break;case h.ENVELOP:this.constrain(c,u,!1)}return this},setAspectRatio:function(c){return this.aspectRatio=c,this.setSize(this._width,this._height)},resize:function(c,u){return this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(g(u,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(c,u){return void 0===u&&(u=!0),c=b(c,this.minWidth,this.maxWidth),u&&this._parent&&c>this._parent.width&&(c=Math.max(this.minWidth,this._parent.width)),c},getNewHeight:function(c,u){return void 0===u&&(u=!0),c=b(c,this.minHeight,this.maxHeight),u&&this._parent&&c>this._parent.height&&(c=Math.max(this.minHeight,this._parent.height)),c},constrain:function(c,u,m){void 0===c&&(c=0),void 0===u&&(u=c),void 0===m&&(m=!0),c=this.getNewWidth(c),u=this.getNewHeight(u);var d=this.snapTo,p=0===u?1:c/u;return m&&this.aspectRatio>p||!m&&this.aspectRatio0&&(c=(u=g(u,d.y))*this.aspectRatio)):(m&&this.aspectRatiop)&&(c=(u=g(u,d.y))*this.aspectRatio,d.x>0&&(u=(c=g(c,d.x))*(1/this.aspectRatio))),this._width=c,this._height=u,this},fitTo:function(c,u){return this.constrain(c,u,!0)},envelop:function(c,u){return this.constrain(c,u,!1)},setWidth:function(c){return this.setSize(c,this._height)},setHeight:function(c){return this.setSize(this._width,c)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(c){c&&c.style&&(c.style.width=this._width+"px",c.style.height=this._height+"px")},copy:function(c){return c.setAspectMode(this.aspectMode),c.aspectRatio=this.aspectRatio,c.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(c){this.setSize(c,this._height)}},height:{get:function(){return this._height},set:function(c){this.setSize(this._width,c)}}});h.NONE=0,h.WIDTH_CONTROLS_HEIGHT=1,h.HEIGHT_CONTROLS_WIDTH=2,h.FIT=3,h.ENVELOP=4,S.exports=h},15238:S=>{S.exports="add"},56187:S=>{S.exports="remove"},82348:(S,k,a)=>{S.exports={PROCESS_QUEUE_ADD:a(15238),PROCESS_QUEUE_REMOVE:a(56187)}},41392:(S,k,a)=>{S.exports={Events:a(82348),List:a(73162),Map:a(90330),ProcessQueue:a(25774),RTree:a(59542),Set:a(35072),Size:a(86555)}},57382:(S,k,a)=>{var b=a(83419),T=a(45319),g=a(40987),f=a(8054),h=a(50030),c=a(79237),u=new b({Extends:c,initialize:function(d,p,v,x,y){c.call(this,d,p,v,x,y),this.add("__BASE",0,0,0,x,y),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=x,this.height=y,this.imageData=this.context.getImageData(0,0,x,y),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===f.WEBGL&&this.refresh(),this},draw:function(m,d,p,v){return void 0===v&&(v=!0),this.context.drawImage(p,m,d),v&&this.update(),this},drawFrame:function(m,d,p,v,x){void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=!0);var y=this.manager.getFrame(m,d);if(y){var _=y.canvasData,E=y.cutWidth,A=y.cutHeight,D=y.source.resolution;this.context.drawImage(y.source.image,_.x,_.y,E,A,p,v,E/D,A/D),x&&this.update()}return this},setPixel:function(m,d,p,v,x,y){if(void 0===y&&(y=255),m=Math.abs(Math.floor(m)),d=Math.abs(Math.floor(d)),this.getIndex(m,d)>-1){var E=this.context.getImageData(m,d,1,1);E.data[0]=p,E.data[1]=v,E.data[2]=x,E.data[3]=y,this.context.putImageData(E,m,d)}return this},putData:function(m,d,p,v,x,y,_){return void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=m.width),void 0===_&&(_=m.height),this.context.putImageData(m,d,p,v,x,y,_),this},getData:function(m,d,p,v){return m=T(Math.floor(m),0,this.width-1),d=T(Math.floor(d),0,this.height-1),p=T(p,1,this.width-m),v=T(v,1,this.height-d),this.context.getImageData(m,d,p,v)},getPixel:function(m,d,p){p||(p=new g);var v=this.getIndex(m,d);if(v>-1){var x=this.data;p.setTo(x[v+0],x[v+1],x[v+2],x[v+3])}return p},getPixels:function(m,d,p,v){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=this.width),void 0===v&&(v=p),m=Math.abs(Math.round(m)),d=Math.abs(Math.round(d));for(var x=T(m,0,this.width),y=T(m+p,0,this.width),_=T(d,0,this.height),E=T(d+v,0,this.height),A=new g,D=[],I=_;I{var b=a(10312),T=a(38058),g=a(27919),f=a(83419),h=a(8054),c=a(4327),u=a(95540),m=a(36060),d=a(32302),p=a(79237),v=a(70554),x=new f({Extends:p,initialize:function(_,E,A,D){void 0===A&&(A=256),void 0===D&&(D=256),this.type="DynamicTexture";var I=_.game.renderer,R=I&&I.type===h.CANVAS,F=R?g.create2D(this,A,D):[this];p.call(this,_,E,F,A,D),this.add("__BASE",0,0,0,A,D),this.renderer=I,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=R?F:null,this.context=R?F.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new T(0,0,A,D).setScene(_.game.scene.systemScene,!1),this.renderTarget=R?null:new d(I,A,D,1,0,!1,!1,!0,!1),this.pipeline=R?null:I.pipelines.get(m.SINGLE_PIPELINE),this.setSize(A,D)},setSize:function(y,_){void 0===_&&(_=y);var E=this.get(),A=E.source;if(y!==this.width||_!==this.height){this.canvas&&(this.canvas.width=y,this.canvas.height=_);var D=this.renderTarget;D&&(D.willResize(y,_)&&D.resize(y,_),D.texture!==A.glTexture&&this.renderer.deleteTexture(A.glTexture),this.setFromRenderTarget()),this.camera.setSize(y,_),A.width=y,A.height=_,E.setSize(y,_),this.width=y,this.height=_}else{var I=this.getSourceImage();E.cutX+y>I.width&&(y=I.width-E.cutX),E.cutY+_>I.height&&(_=I.height-E.cutY),E.setSize(y,_,E.cutX,E.cutY)}return this},setFromRenderTarget:function(){var _=this.get().source,E=this.renderTarget;return _.isRenderTexture=!0,_.isGLTexture=!0,_.glTexture=E.texture,this},setIsSpriteTexture:function(y){return this.isSpriteTexture=y,this},fill:function(y,_,E,A,D,I){var F=this.renderer;void 0===_&&(_=1),void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=this.width),void 0===I&&(I=this.height);var N=y>>16&255,V=y>>8&255,B=255&y,H=this.renderTarget;if(this.camera.preRender(),H){H.bind(!0);var Q=this.pipeline.manager.set(this.pipeline),G=F.width/H.width,K=F.height/H.height;Q.drawFillRect(E*G,(H.height-(A+I))*K,D*G,I*K,v.getTintFromFloats(B/255,V/255,N/255,1),_),H.unbind(!0)}else{var at=this.context;F.setContext(at),at.globalCompositeOperation="source-over",at.fillStyle="rgba("+N+","+V+","+B+","+_+")",at.fillRect(E,A,D,I),F.setContext()}return this.dirty=!0,this},clear:function(y,_,E,A){if(this.dirty){var D=this.context,I=this.renderTarget;I?I.clear(y,_,E,A):D&&(void 0!==y&&void 0!==_&&void 0!==E&&void 0!==A?D.clearRect(y,_,E,A):(D.save(),D.setTransform(1,0,0,1,0,0),D.clearRect(0,0,this.width,this.height),D.restore())),this.dirty=!1}return this},stamp:function(y,_,E,A,D){void 0===E&&(E=0),void 0===A&&(A=0);var I=u(D,"alpha",1),R=u(D,"tint",16777215),F=u(D,"angle",0),N=u(D,"rotation",0),V=u(D,"scale",1),B=u(D,"scaleX",V),H=u(D,"scaleY",V),Q=u(D,"originX",.5),G=u(D,"originY",.5),K=u(D,"blendMode",0),q=u(D,"erase",!1),at=u(D,"skipBatch",!1),ot=this.manager.resetStamp(I,R);return ot.setAngle(0),0!==F?ot.setAngle(F):0!==N&&ot.setRotation(N),ot.setScale(B,H),ot.setTexture(y,_),ot.setOrigin(Q,G),ot.setBlendMode(K),q&&(this._eraseMode=!0),at?this.batchGameObject(ot,E,A):this.draw(ot,E,A),q&&(this._eraseMode=!1),this},erase:function(y,_,E){return this._eraseMode=!0,this.draw(y,_,E),this._eraseMode=!1,this},draw:function(y,_,E,A,D){return this.beginDraw(),this.batchDraw(y,_,E,A,D),this.endDraw(),this},drawFrame:function(y,_,E,A,D,I){return this.beginDraw(),this.batchDrawFrame(y,_,E,A,D,I),this.endDraw(),this},repeat:function(y,_,E,A,D,I,R,F,N){if(void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=this.width),void 0===I&&(I=this.height),void 0===R&&(R=1),void 0===F&&(F=16777215),void 0===N&&(N=!1),!(_=y instanceof c?y:this.manager.getFrame(y,_)))return this;var V=this.manager.resetStamp(R,F);V.setFrame(_),V.setOrigin(0);var B=_.width,H=_.height;D=Math.floor(D),I=Math.floor(I);var Q=Math.ceil(D/B),G=Math.ceil(I/H),K=Q*B-D,q=G*H-I;K>0&&(K=B-K),q>0&&(q=H-q),E<0&&(Q+=Math.ceil(Math.abs(E)/B)),A<0&&(G+=Math.ceil(Math.abs(A)/H));var at=E,ot=A,J=!1,it=this.manager.stampCrop.setTo(0,0,B,H);N||this.beginDraw();for(var Y=0;Y0&&j===Q-1&&(J=!0,it.width=K),q>0&&Y===G-1&&(J=!0,it.height=q),J&&V.setCrop(it),this.batchGameObject(V,at,ot),V.isCropped=!1,it.setTo(0,0,B,H)),at+=B;at=E,ot+=H}return N||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var _=this.renderer,E=this.renderTarget;this.camera.preRender(),E?_.beginCapture(E.width,E.height):_.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(y,_,E,A,D){return Array.isArray(y)||(y=[y]),this.batchList(y,_,E,A,D),this},batchDrawFrame:function(y,_,E,A,D,I){void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=1),void 0===I&&(I=16777215);var R=this.manager.getFrame(y,_);return R&&(this.renderTarget?this.pipeline.batchTextureFrame(R,E,A,I,D,this.camera.matrix,null):this.batchTextureFrame(R,E,A,D,I)),this},endDraw:function(y){if(void 0===y&&(y=this._eraseMode),this.isDrawing){var _=this.renderer,E=this.renderTarget;if(E){var A=_.endCapture();_.pipelines.setUtility().blitFrame(A,E,1,!1,!1,y,this.isSpriteTexture),_.resetScissor(),_.resetViewport()}else _.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(y,_,E,A,D){var I=y.length;if(0!==I)for(var R=0;R0&&N.height>0&&F.drawImage(V,N.x,N.y,N.width,N.height,_,E,N.width,N.height),F.restore()}},snapshotArea:function(y,_,E,A,D,I,R){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,D,!1,y,_,E,A,I,R):this.renderer.snapshotCanvas(this.canvas,D,!1,y,_,E,A,I,R),this},snapshot:function(y,_,E){return this.snapshotArea(0,0,this.width,this.height,y,_,E)},snapshotPixel:function(y,_,E){return this.snapshotArea(y,_,1,1,E,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(y,_,E,A){var D=this.manager.resetStamp();D.setTexture(this),D.setOrigin(0),D.renderWebGL(y,D,E,A)},renderCanvas:function(){},destroy:function(){var y=this.manager.stamp;y&&y.texture===this&&this.manager.resetStamp(),p.prototype.destroy.call(this),g.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});S.exports=x},4327:(S,k,a)=>{var b=a(83419),T=a(45319),g=a(79291),f=new b({initialize:function(c,u,m,d,p,v,x){this.texture=c,this.name=u,this.source=c.source[m],this.sourceIndex=m,this.x=0,this.y=0,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(v,x,d,p)},setCutPosition:function(h,c){return void 0===h&&(h=0),void 0===c&&(c=0),this.cutX=h,this.cutY=c,this.updateUVs()},setCutSize:function(h,c){return this.cutWidth=h,this.cutHeight=c,this.updateUVs()},setSize:function(h,c,u,m){void 0===u&&(u=0),void 0===m&&(m=0),this.setCutPosition(u,m),this.setCutSize(h,c),this.width=h,this.height=c,this.halfWidth=Math.floor(.5*h),this.halfHeight=Math.floor(.5*c),this.centerX=Math.floor(h/2),this.centerY=Math.floor(c/2);var d=this.data,p=d.cut;p.x=u,p.y=m,p.w=h,p.h=c,p.r=u+h,p.b=m+c,d.sourceSize.w=h,d.sourceSize.h=c,d.spriteSourceSize.w=h,d.spriteSourceSize.h=c,d.radius=.5*Math.sqrt(h*h+c*c);var v=d.drawImage;return v.x=u,v.y=m,v.width=h,v.height=c,this.updateUVs()},setTrim:function(h,c,u,m,d,p){var v=this.data,x=v.spriteSourceSize;return v.trim=!0,v.sourceSize.w=h,v.sourceSize.h=c,x.x=u,x.y=m,x.w=d,x.h=p,x.r=u+d,x.b=m+p,this.x=u,this.y=m,this.width=d,this.height=p,this.halfWidth=.5*d,this.halfHeight=.5*p,this.centerX=Math.floor(d/2),this.centerY=Math.floor(p/2),this.updateUVs()},setScale9:function(h,c,u,m){var d=this.data;return d.scale9=!0,d.is3Slice=0===c&&m===this.height,d.scale9Borders.x=h,d.scale9Borders.y=c,d.scale9Borders.w=u,d.scale9Borders.h=m,this},setCropUVs:function(h,c,u,m,d,p,v){var x=this.cutX,y=this.cutY,_=this.cutWidth,E=this.cutHeight,A=this.realWidth,D=this.realHeight,I=x+(c=T(c,0,A)),R=y+(u=T(u,0,D)),F=m=T(m,0,A-c),N=d=T(d,0,D-u),V=this.data;if(V.trim){var B=V.spriteSourceSize,H=c+(m=T(m,0,_-c)),Q=u+(d=T(d,0,E-u));if(B.rH||B.y>Q)I=0,R=0,F=0,N=0;else{var K=Math.max(B.x,c),q=Math.max(B.y,u),at=Math.min(B.r,H)-K,ot=Math.min(B.b,Q)-q;F=at,N=ot,I=p?x+(_-(K-B.x)-at):x+(K-B.x),R=v?y+(E-(q-B.y)-ot):y+(q-B.y),c=K,u=q,m=at,d=ot}}else p&&(I=x+(_-c-m)),v&&(R=y+(E-u-d));var J=this.source.width,it=this.source.height;return h.u0=Math.max(0,I/J),h.v0=Math.max(0,R/it),h.u1=Math.min(1,(I+F)/J),h.v1=Math.min(1,(R+N)/it),h.x=c,h.y=u,h.cx=I,h.cy=R,h.cw=F,h.ch=N,h.width=m,h.height=d,h.flipX=p,h.flipY=v,h},updateCropUVs:function(h,c,u){return this.setCropUVs(h,h.x,h.y,h.width,h.height,c,u)},setUVs:function(h,c,u,m,d,p){var v=this.data.drawImage;return v.width=h,v.height=c,this.u0=u,this.v0=m,this.u1=d,this.v1=p,this},updateUVs:function(){var h=this.cutX,c=this.cutY,u=this.cutWidth,m=this.cutHeight,d=this.data.drawImage;d.width=u,d.height=m;var p=this.source.width,v=this.source.height;return this.u0=h/p,this.v0=c/v,this.u1=(h+u)/p,this.v1=(c+m)/v,this},updateUVsInverted:function(){var h=this.source.width,c=this.source.height;return this.u0=(this.cutX+this.cutHeight)/h,this.v0=this.cutY/c,this.u1=this.cutX/h,this.v1=(this.cutY+this.cutWidth)/c,this},clone:function(){var h=new f(this.texture,this.name,this.sourceIndex);return h.cutX=this.cutX,h.cutY=this.cutY,h.cutWidth=this.cutWidth,h.cutHeight=this.cutHeight,h.x=this.x,h.y=this.y,h.width=this.width,h.height=this.height,h.halfWidth=this.halfWidth,h.halfHeight=this.halfHeight,h.centerX=this.centerX,h.centerY=this.centerY,h.rotated=this.rotated,h.data=g(!0,h.data,this.data),h.updateUVs(),h},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});S.exports=f},79237:(S,k,a)=>{var b=a(83419),T=a(4327),g=a(11876),f='Texture "%s" has no frame "%s"',h=new b({initialize:function(u,m,d,p,v){Array.isArray(d)||(d=[d]),this.manager=u,this.key=m,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var x=0;xv&&(v=_.cutX+_.cutWidth),_.cutY+_.cutHeight>x&&(x=_.cutY+_.cutHeight)}return{x:d,y:p,width:v-d,height:x-p}},getFrameNames:function(c){void 0===c&&(c=!1);var u=Object.keys(this.frames);if(!c){var m=u.indexOf("__BASE");-1!==m&&u.splice(m,1)}return u},getSourceImage:function(c){(null==c||1===this.frameTotal)&&(c="__BASE");var u=this.frames[c];return u?u.source.image:(console.warn(f,this.key,c),this.frames.__BASE.source.image)},getDataSourceImage:function(c){(null==c||1===this.frameTotal)&&(c="__BASE");var m,u=this.frames[c];return u?m=u.sourceIndex:(console.warn(f,this.key,c),m=this.frames.__BASE.sourceIndex),this.dataSource[m].image},setDataSource:function(c){Array.isArray(c)||(c=[c]);for(var u=0;u{var b=a(27919),T=a(57382),g=a(83419),f=a(40987),h=a(8054),c=a(81320),u=a(50792),m=a(69442),d=a(4327),p=a(8443),v=a(99584),x=a(35154),y=a(88571),_=a(41212),E=a(61309),A=a(87841),D=a(79237),I=new g({Extends:u,initialize:function(F){u.call(this),this.game=F,this.name="TextureManager",this.list={},this._tempCanvas=b.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stampCrop=new A,this.silentWarnings=!1,F.events.once(p.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(m.LOAD,this.updatePending,this),this.on(m.ERROR,this.updatePending,this);var R=this.game.config;null!==R.defaultImage&&this.addBase64("__DEFAULT",R.defaultImage),null!==R.missingImage&&this.addBase64("__MISSING",R.missingImage),null!==R.whiteImage&&this.addBase64("__WHITE",R.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(p.DESTROY,this.destroy,this),this.game.events.once(p.SYSTEM_READY,function(F){this.stamp=new y(F).setOrigin(0)},this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(m.LOAD),this.off(m.ERROR),this.emit(m.READY))},checkKey:function(R){return!(!R||"string"!=typeof R||this.exists(R))||(this.silentWarnings||console.error("Texture key already in use: "+R),!1)},remove:function(R){if("string"==typeof R){if(!this.exists(R))return this.silentWarnings||console.warn("No texture found matching key: "+R),this;R=this.get(R)}var F=R.key;return this.list.hasOwnProperty(F)&&(R.destroy(),this.emit(m.REMOVE,F),this.emit(m.REMOVE_KEY+F)),this},removeKey:function(R){return this.list.hasOwnProperty(R)&&delete this.list[R],this},addBase64:function(R,F){if(this.checkKey(R)){var N=this,V=new Image;V.onerror=function(){N.emit(m.ERROR,R)},V.onload=function(){var B=N.create(R,V);E.Image(B,0),N.emit(m.ADD,R,B),N.emit(m.ADD_KEY+R,B),N.emit(m.LOAD,R,B)},V.src=F}return this},getBase64:function(R,F,N,V){void 0===N&&(N="image/png"),void 0===V&&(V=.92);var B="",H=this.getFrame(R,F);if(H&&(H.source.isRenderTexture||H.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(H){var Q=H.canvasData,G=b.create2D(this,Q.width,Q.height),K=G.getContext("2d",{willReadFrequently:!0});Q.width>0&&Q.height>0&&K.drawImage(H.source.image,Q.x,Q.y,Q.width,Q.height,0,0,Q.width,Q.height),B=G.toDataURL(N,V),b.remove(G)}return B},addImage:function(R,F,N){var V=null;return this.checkKey(R)&&(V=this.create(R,F),E.Image(V,0),N&&V.setDataSource(N),this.emit(m.ADD,R,V),this.emit(m.ADD_KEY+R,V)),V},addGLTexture:function(R,F){var N=null;if(this.checkKey(R)){var V=F.width,B=F.height;(N=this.create(R,F,V,B)).add("__BASE",0,0,0,V,B),this.emit(m.ADD,R,N),this.emit(m.ADD_KEY+R,N)}return N},addCompressedTexture:function(R,F,N){var V=null;if(this.checkKey(R)){if((V=this.create(R,F)).add("__BASE",0,0,0,F.width,F.height),N){var B=function(Q,G,K){Array.isArray(K.textures)||Array.isArray(K.frames)?E.JSONArray(Q,G,K):E.JSONHash(Q,G,K)};if(Array.isArray(N))for(var H=0;H=H.x&&R=H.y&&F=H.x&&R=H.y&&F{var b=a(27919),T=a(83419),g=a(50030),f=a(29795),h=a(82751),c=new T({initialize:function(m,d,p,v,x){void 0===x&&(x=!1);var y=m.manager.game;this.renderer=y.renderer,this.texture=m,this.source=d,this.image=d.compressed?null:d,this.compressionAlgorithm=d.compressed?d.format:null,this.resolution=1,this.width=p||d.naturalWidth||d.videoWidth||d.width||0,this.height=v||d.naturalHeight||d.videoHeight||d.height||0,this.scaleMode=f.DEFAULT,this.isCanvas=d instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&d instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===d.type||"DynamicTexture"===d.type,this.isGLTexture=d instanceof h,this.isPowerOf2=g(this.width,this.height),this.glTexture=null,this.flipY=x,this.init(y)},init:function(u){var m=this.renderer;if(m){var d=this.source;if(m.gl){var p=this.image,v=this.flipY,x=this.width,y=this.height,_=this.scaleMode;this.glTexture=this.isCanvas?m.createCanvasTexture(p,!1,v):this.isVideo?m.createVideoTexture(p,!1,v):this.isRenderTexture?m.createTextureFromSource(null,x,y,_):this.isGLTexture?d:this.compressionAlgorithm?m.createTextureFromSource(d,void 0,void 0,_):d instanceof Uint8Array?m.createUint8ArrayTexture(d,x,y,_):m.createTextureFromSource(p,x,y,_)}else this.isRenderTexture&&(this.image=d.canvas)}u.config.antialias||this.setFilter(1)},setFilter:function(u){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,u),this.scaleMode=u},setFlipY:function(u){return void 0===u&&(u=!0),u===this.flipY||(this.flipY=u,this.update()),this},update:function(){var u=this.renderer,m=this.image,d=this.flipY,p=u.gl;p&&this.isCanvas?u.updateCanvasTexture(m,this.glTexture,d):p&&this.isVideo&&u.updateVideoTexture(m,this.glTexture,d)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&b.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});S.exports=c},19673:S=>{S.exports={LINEAR:0,NEAREST:1}},44538:S=>{S.exports="addtexture"},63486:S=>{S.exports="addtexture-"},94851:S=>{S.exports="onerror"},29099:S=>{S.exports="onload"},8678:S=>{S.exports="ready"},86415:S=>{S.exports="removetexture"},30879:S=>{S.exports="removetexture-"},69442:(S,k,a)=>{S.exports={ADD:a(44538),ADD_KEY:a(63486),ERROR:a(94851),LOAD:a(29099),READY:a(8678),REMOVE:a(86415),REMOVE_KEY:a(30879)}},27458:(S,k,a)=>{var b=a(79291),T=a(19673),g={CanvasTexture:a(57382),DynamicTexture:a(81320),Events:a(69442),FilterMode:T,Frame:a(4327),Parsers:a(61309),Texture:a(79237),TextureManager:a(17130),TextureSource:a(11876)};g=b(!1,g,T),S.exports=g},89905:S=>{S.exports=function(a,b,T){if(T.getElementsByTagName("TextureAtlas")){var g=a.source[b];a.add("__BASE",b,0,0,g.width,g.height);for(var h,f=T.getElementsByTagName("SubTexture"),c=0;c{S.exports=function(a,b){var T=a.source[b];return a.add("__BASE",b,0,0,T.width,T.height),a}},4832:S=>{S.exports=function(a,b){var T=a.source[b];return a.add("__BASE",b,0,0,T.width,T.height),a}},78566:(S,k,a)=>{var b=a(41786);S.exports=function(g,f,h){if(h.frames||h.textures){var c=g.source[f];g.add("__BASE",f,0,0,c.width,c.height);for(var m,u=Array.isArray(h.textures)?h.textures[f].frames:h.frames,d=0;d{var b=a(41786);S.exports=function(g,f,h){if(h.frames){var c=g.source[f];g.add("__BASE",f,0,0,c.width,c.height);var m,u=h.frames;for(var d in u)if(u.hasOwnProperty(d)){var p=u[d];if(!(m=g.add(d,f,p.frame.x,p.frame.y,p.frame.w,p.frame.h))){console.warn("Invalid atlas json, frame already exists: "+d);continue}p.trimmed&&m.setTrim(p.sourceSize.w,p.sourceSize.h,p.spriteSourceSize.x,p.spriteSourceSize.y,p.spriteSourceSize.w,p.spriteSourceSize.h),p.rotated&&(m.rotated=!0,m.updateUVsInverted());var v=p.anchor||p.pivot;v&&(m.customPivot=!0,m.pivotX=v.x,m.pivotY=v.y),p.scale9Borders&&m.setScale9(p.scale9Borders.x,p.scale9Borders.y,p.scale9Borders.w,p.scale9Borders.h),m.customData=b(p)}for(var x in h)"frames"!==x&&(g.customData[x]=Array.isArray(h[x])?h[x].slice(0):h[x]);return g}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},31403:S=>{S.exports=function(a){var T,b=[171,75,84,88,32,49,49,187,13,10,26,10],g=new Uint8Array(a,0,12);for(T=0;T>1),A=Math.max(1,A>>1),_+=D}return{mipmaps:y,width:d,height:p,internalFormat:m,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},82038:S=>{function k(F,N,V,B,H,Q,G){return void 0===G&&(G=16),Math.floor((F+V)/H)*Math.floor((N+B)/Q)*G}function a(F,N){return(F=Math.max(F,16))*(N=Math.max(N,8))/4}function b(F,N){return(F=Math.max(F,8))*(N=Math.max(N,8))/2}function T(F,N){return Math.ceil(F/4)*Math.ceil(N/4)*16}function g(F,N){return k(F,N,3,3,4,4,8)}function f(F,N){return k(F,N,3,3,4,4)}var I={0:{sizeFunc:a,glFormat:[35841]},1:{sizeFunc:a,glFormat:[35843]},2:{sizeFunc:b,glFormat:[35840]},3:{sizeFunc:b,glFormat:[35842]},6:{sizeFunc:g,glFormat:[36196]},7:{sizeFunc:g,glFormat:[33776,35916]},8:{sizeFunc:f,glFormat:[33777,35917]},9:{sizeFunc:f,glFormat:[33778,35918]},11:{sizeFunc:f,glFormat:[33779,35919]},14:{sizeFunc:T,glFormat:[36494,36495]},15:{sizeFunc:T,glFormat:[36492,36493]},22:{sizeFunc:g,glFormat:[37492,37493]},23:{sizeFunc:f,glFormat:[37496,37497]},24:{sizeFunc:g,glFormat:[37494,37495]},25:{sizeFunc:g,glFormat:[37488]},26:{sizeFunc:f,glFormat:[37490]},27:{sizeFunc:f,glFormat:[37808,37840]},28:{sizeFunc:function h(F,N){return k(F,N,4,3,5,4)},glFormat:[37809,37841]},29:{sizeFunc:function c(F,N){return k(F,N,4,4,5,5)},glFormat:[37810,37842]},30:{sizeFunc:function u(F,N){return k(F,N,5,4,6,5)},glFormat:[37811,37843]},31:{sizeFunc:function m(F,N){return k(F,N,5,5,6,6)},glFormat:[37812,37844]},32:{sizeFunc:function d(F,N){return k(F,N,7,4,8,5)},glFormat:[37813,37845]},33:{sizeFunc:function p(F,N){return k(F,N,7,5,8,6)},glFormat:[37814,37846]},34:{sizeFunc:function v(F,N){return k(F,N,7,7,8,8)},glFormat:[37815,37847]},35:{sizeFunc:function x(F,N){return k(F,N,9,4,10,5)},glFormat:[37816,37848]},36:{sizeFunc:function y(F,N){return k(F,N,9,5,10,6)},glFormat:[37817,37849]},37:{sizeFunc:function _(F,N){return k(F,N,9,7,10,8)},glFormat:[37818,37850]},38:{sizeFunc:function E(F,N){return k(F,N,9,9,10,10)},glFormat:[37819,37851]},39:{sizeFunc:function A(F,N){return k(F,N,11,9,12,10)},glFormat:[37820,37852]},40:{sizeFunc:function D(F,N){return k(F,N,11,11,12,12)},glFormat:[37821,37853]}};S.exports=function(F){for(var N=new Uint32Array(F,0,13),H=55727696===N[0]?N[2]:N[3],G=I[H].glFormat[N[4]],K=I[H].sizeFunc,q=N[11],at=N[7],ot=N[6],it=new Uint8Array(F,52+N[12]),Y=new Array(q),j=0,nt=at,ht=ot,gt=0;gt>1),ht=Math.max(1,ht>>1),j+=wt}return{mipmaps:Y,width:at,height:ot,internalFormat:G,compressed:!0,generateMipmap:!1}}},75549:(S,k,a)=>{var b=a(95540);S.exports=function(g,f,h,c,u,m,d){var p=b(d,"frameWidth",null),v=b(d,"frameHeight",p);if(null===p)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var x=g.source[f];g.add("__BASE",f,0,0,x.width,x.height);var y=b(d,"startFrame",0),_=b(d,"endFrame",-1),E=b(d,"margin",0),A=b(d,"spacing",0),R=Math.floor((u-E+A)/(p+A))*Math.floor((m-E+A)/(v+A));0===R&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",g.key),(y>R||y<-R)&&(y=0),y<0&&(y=R+y),(-1===_||_>R||_u&&(V=G-u),K>m&&(B=K-m),Q>=y&&Q<=_&&(g.add(H,f,h+F,c+N,p-V,v-B),H++),(F+=p+A)+p>u&&(F=E,N+=v+A)}return g}},47534:(S,k,a)=>{var b=a(95540);S.exports=function(g,f,h){var c=b(h,"frameWidth",null),u=b(h,"frameHeight",c);if(!c)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var m=g.source[0];g.add("__BASE",0,0,0,m.width,m.height);var d=b(h,"startFrame",0),p=b(h,"endFrame",-1),v=b(h,"margin",0),x=b(h,"spacing",0),y=f.cutX,_=f.cutY,E=f.cutWidth,A=f.cutHeight,D=f.realWidth,I=f.realHeight,R=Math.floor((D-v+x)/(c+x)),F=Math.floor((I-v+x)/(u+x)),N=R*F,V=f.x,B=c-V,H=c-(D-E-V),Q=f.y,G=u-Q,K=u-(I-A-Q);(d>N||d<-N)&&(d=0),d<0&&(d=N+d),-1!==p&&(N=d+(p+1));for(var q,at=v,ot=v,J=0,Y=0;Y{var k=0,a=function(T,g,f,h){T.add(f,g,h.x,k-h.y-h.height,h.width,h.height)};S.exports=function(T,g,f){var h=T.source[g];T.add("__BASE",g,0,0,h.width,h.height),k=h.height;for(var c=f.split("\n"),u=/^[ ]*(- )*(\w+)+[: ]+(.*)/,m="",d="",p={x:0,y:0,width:0,height:0},v=0;v{var b=a(50030);function g(m){for(var d=m.mipmaps,p=0;p{S.exports={AtlasXML:a(89905),Canvas:a(72893),Image:a(4832),JSONArray:a(78566),JSONHash:a(39711),KTXParser:a(31403),PVRParser:a(82038),SpriteSheet:a(75549),SpriteSheetFromAtlas:a(47534),UnityYAML:a(86147)}},80341:S=>{S.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u,m,d,p){(void 0===c||c<=0)&&(c=32),(void 0===u||u<=0)&&(u=32),void 0===m&&(m=0),void 0===d&&(d=0),this.name=f,this.firstgid=0|h,this.imageWidth=0|c,this.imageHeight=0|u,this.imageMargin=0|m,this.imageSpacing=0|d,this.properties=p||{},this.images=[],this.total=0},containsImageIndex:function(g){return g>=this.firstgid&&g{var T=new(a(83419))({initialize:function(f){if(this.gids=[],void 0!==f)for(var h=0;h{var b=a(80341),T=a(87010),g=a(46177),f=a(49075);S.exports=function(c,u,m,d,p,v,x,y){void 0===m&&(m=32),void 0===d&&(d=32),void 0===p&&(p=10),void 0===v&&(v=10),void 0===y&&(y=!1);var _=null;if(Array.isArray(x))_=g(void 0!==u?u:"map",b.ARRAY_2D,x,m,d,y);else if(void 0!==u){var A=c.cache.tilemap.get(u);A?_=g(u,A.format,A.data,m,d,y):console.warn("No map data found for key "+u)}return null===_&&(_=new T({tileWidth:m,tileHeight:d,width:p,height:v})),new f(c,_)}},23029:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(91907),f=a(62644),h=a(93232),c=new b({Mixins:[T.AlphaSingle,T.Flip,T.Visible],initialize:function(m,d,p,v,x,y,_,E){this.layer=m,this.index=d,this.x=p,this.y=v,this.width=x,this.height=y,this.baseWidth=void 0!==_?_:x,this.baseHeight=void 0!==E?E:y,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(u,m){return!(uthis.right||m>this.bottom)},copy:function(u){return this.index=u.index,this.alpha=u.alpha,this.properties=f(u.properties),this.visible=u.visible,this.setFlip(u.flipX,u.flipY),this.tint=u.tint,this.rotation=u.rotation,this.collideUp=u.collideUp,this.collideDown=u.collideDown,this.collideLeft=u.collideLeft,this.collideRight=u.collideRight,this.collisionCallback=u.collisionCallback,this.collisionCallbackContext=u.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(u){var m=this.tilemapLayer;return m?m.tileToWorldXY(this.x,this.y,void 0,u).x:this.x*this.baseWidth},getRight:function(u){var m=this.tilemapLayer;return m?this.getLeft(u)+this.width*m.scaleX:this.getLeft(u)+this.width},getTop:function(u){var m=this.tilemapLayer;return m?m.tileToWorldXY(this.x,this.y,void 0,u).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(u){var m=this.tilemapLayer;return m?this.getTop(u)+this.height*m.scaleY:this.getTop(u)+this.height},getBounds:function(u,m){return void 0===m&&(m=new h),m.x=this.getLeft(u),m.y=this.getTop(u),m.width=this.getRight(u)-m.x,m.height=this.getBottom(u)-m.y,m},getCenterX:function(u){return(this.getLeft(u)+this.getRight(u))/2},getCenterY:function(u){return(this.getTop(u)+this.getBottom(u))/2},intersects:function(u,m,d,p){return!(d<=this.pixelX||p<=this.pixelY||u>=this.right||m>=this.bottom)},isInteresting:function(u,m){return u&&m?this.canCollide||this.hasInterestingFace:u?this.collides:!!m&&this.hasInterestingFace},resetCollision:function(u){return void 0===u&&(u=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,u&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(u,m,d,p,v){return void 0===m&&(m=u),void 0===d&&(d=u),void 0===p&&(p=u),void 0===v&&(v=!0),this.collideLeft=u,this.collideRight=m,this.collideUp=d,this.collideDown=p,this.faceLeft=u,this.faceRight=m,this.faceTop=d,this.faceBottom=p,v&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(u,m){return null===u?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=u,this.collisionCallbackContext=m),this},setSize:function(u,m,d,p){return void 0!==u&&(this.width=u),void 0!==m&&(this.height=m),void 0!==d&&(this.baseWidth=d),void 0!==p&&(this.baseHeight=p),this.updatePixelXY(),this},updatePixelXY:function(){var u=this.layer.orientation;if(u===g.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(u===g.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(u===g.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(u===g.HEXAGONAL){var x,m=this.layer.staggerAxis,d=this.layer.staggerIndex,p=this.layer.hexSideLength;"y"===m?(x=(this.baseHeight-p)/2+p,this.pixelX="odd"===d?this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*x):"x"===m&&(this.pixelX=this.x*((this.baseWidth-p)/2+p),this.pixelY="odd"===d?this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var u=this.layer.tilemapLayer;if(u){var m=u.gidMap[this.index];if(m)return m}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var u=this.tilemapLayer;return u?u.tilemap:null}}});S.exports=c},49075:(S,k,a)=>{var b=a(84101),T=a(83419),g=a(39506),f=a(80341),h=a(95540),c=a(14977),u=a(27462),m=a(91907),d=a(36305),p=a(19133),v=a(68287),x=a(23029),y=a(81086),_=a(20442),E=a(33629),A=new T({initialize:function(I,R){this.scene=I,this.tileWidth=R.tileWidth,this.tileHeight=R.tileHeight,this.width=R.width,this.height=R.height,this.orientation=R.orientation,this.renderOrder=R.renderOrder,this.format=R.format,this.version=R.version,this.properties=R.properties,this.widthInPixels=R.widthInPixels,this.heightInPixels=R.heightInPixels,this.imageCollections=R.imageCollections,this.images=R.images,this.layers=R.layers,this.tiles=R.tiles,this.tilesets=R.tilesets,this.objects=R.objects,this.currentLayerIndex=0,this.hexSideLength=R.hexSideLength;var F=this.orientation;this._convert={WorldToTileXY:y.GetWorldToTileXYFunction(F),WorldToTileX:y.GetWorldToTileXFunction(F),WorldToTileY:y.GetWorldToTileYFunction(F),TileToWorldXY:y.GetTileToWorldXYFunction(F),TileToWorldX:y.GetTileToWorldXFunction(F),TileToWorldY:y.GetTileToWorldYFunction(F),GetTileCorners:y.GetTileCornersFunction(F)}},setRenderOrder:function(D){var I=["right-down","left-down","right-up","left-up"];return"number"==typeof D&&(D=I[D]),I.indexOf(D)>-1&&(this.renderOrder=D),this},addTilesetImage:function(D,I,R,F,N,V,B,H){if(void 0===D)return null;null==I&&(I=D);var Q=this.scene.sys.textures;if(!Q.exists(I))return console.warn('Texture key "%s" not found',I),null;var G=Q.get(I),K=this.getTilesetIndex(D);if(null===K&&this.format===f.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',D,this.tilesets),null;var q=this.tilesets[K];return q?((R||F)&&q.setTileSize(R,F),(N||V)&&q.setSpacing(N,V),q.setImage(G),q):(void 0===R&&(R=this.tileWidth),void 0===F&&(F=this.tileHeight),void 0===N&&(N=0),void 0===V&&(V=0),void 0===B&&(B=0),void 0===H&&(H={x:0,y:0}),(q=new E(D,B,R,F,N,V,void 0,void 0,H)).setImage(G),this.tilesets.push(q),this.tiles=b(this),q)},copy:function(D,I,R,F,N,V,B,H){return null!==(H=this.getLayer(H))?(y.Copy(D,I,R,F,N,V,B,H),this):null},createBlankLayer:function(D,I,R,F,N,V,B,H){if(void 0===R&&(R=0),void 0===F&&(F=0),void 0===N&&(N=this.width),void 0===V&&(V=this.height),void 0===B&&(B=this.tileWidth),void 0===H&&(H=this.tileHeight),null!==this.getLayerIndex(D))return console.warn("Invalid Tilemap Layer ID: "+D),null;for(var K,G=new c({name:D,tileWidth:B,tileHeight:H,width:N,height:V,orientation:this.orientation}),q=0;q-1&&this.putTileAt(I,V.x,V.y,R,V.tilemapLayer)}return F},removeTileAt:function(D,I,R,F,N){return void 0===R&&(R=!0),void 0===F&&(F=!0),null===(N=this.getLayer(N))?null:y.RemoveTileAt(D,I,R,F,N)},removeTileAtWorldXY:function(D,I,R,F,N,V){return void 0===R&&(R=!0),void 0===F&&(F=!0),null===(V=this.getLayer(V))?null:y.RemoveTileAtWorldXY(D,I,R,F,N,V)},renderDebug:function(D,I,R){return null===(R=this.getLayer(R))?null:(this.orientation===m.ORTHOGONAL&&y.RenderDebug(D,I,R),this)},renderDebugFull:function(D,I){for(var R=this.layers,F=0;F{var b=a(44603),T=a(31989);b.register("tilemap",function(g){var f=void 0!==g?g:{};return T(this.scene,f.key,f.tileWidth,f.tileHeight,f.width,f.height,f.data,f.insertNull)})},46029:(S,k,a)=>{var b=a(39429),T=a(31989);b.register("tilemap",function(g,f,h,c,u,m,d){return null===g&&(g=void 0),null===f&&(f=void 0),null===h&&(h=void 0),null===c&&(c=void 0),null===u&&(u=void 0),T(this.scene,g,f,h,c,u,m,d)})},20442:(S,k,a)=>{var b=a(83419),T=a(78389),g=a(31401),f=a(95643),h=a(81086),c=a(19218),u=a(26099),m=new b({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.Transform,g.Visible,g.ScrollFactor,T,c],initialize:function(p,v,x,y,_,E){f.call(this,p,"TilemapLayer"),this.isTilemap=!0,this.tilemap=v,this.layerIndex=x,this.layer=v.layers[x],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new u,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(y),this.setAlpha(this.layer.alpha),this.setPosition(_,E),this.setOrigin(0,0),this.setSize(v.tileWidth*this.layer.width,v.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(d){var p=[],v=[],x=this.tilemap;Array.isArray(d)||(d=[d]);for(var y=0;y=0&&d<4&&(this._renderOrder=d),this},calculateFacesAt:function(d,p){return h.CalculateFacesAt(d,p,this.layer),this},calculateFacesWithin:function(d,p,v,x){return h.CalculateFacesWithin(d,p,v,x,this.layer),this},createFromTiles:function(d,p,v,x,y){return h.CreateFromTiles(d,p,v,x,y,this.layer)},cull:function(d){return this.cullCallback(this.layer,d,this.culledTiles,this._renderOrder)},copy:function(d,p,v,x,y,_,E){return h.Copy(d,p,v,x,y,_,E,this.layer),this},fill:function(d,p,v,x,y,_){return h.Fill(d,p,v,x,y,_,this.layer),this},filterTiles:function(d,p,v,x,y,_,E){return h.FilterTiles(d,p,v,x,y,_,E,this.layer)},findByIndex:function(d,p,v){return h.FindByIndex(d,p,v,this.layer)},findTile:function(d,p,v,x,y,_,E){return h.FindTile(d,p,v,x,y,_,E,this.layer)},forEachTile:function(d,p,v,x,y,_,E){return h.ForEachTile(d,p,v,x,y,_,E,this.layer),this},setTint:function(d,p,v,x,y,_){return void 0===d&&(d=16777215),this.forEachTile(function(A){A.tint=d,A.tintFill=!1},this,p,v,x,y,_)},setTintFill:function(d,p,v,x,y,_){return void 0===d&&(d=16777215),this.forEachTile(function(A){A.tint=d,A.tintFill=!0},this,p,v,x,y,_)},getTileAt:function(d,p,v){return h.GetTileAt(d,p,v,this.layer)},getTileAtWorldXY:function(d,p,v,x){return h.GetTileAtWorldXY(d,p,v,x,this.layer)},getIsoTileAtWorldXY:function(d,p,v,x,y){void 0===v&&(v=!0);var _=this.tempVec;return h.IsometricWorldToTileXY(d,p,!0,_,y,this.layer,v),this.getTileAt(_.x,_.y,x)},getTilesWithin:function(d,p,v,x,y){return h.GetTilesWithin(d,p,v,x,y,this.layer)},getTilesWithinShape:function(d,p,v){return h.GetTilesWithinShape(d,p,v,this.layer)},getTilesWithinWorldXY:function(d,p,v,x,y,_){return h.GetTilesWithinWorldXY(d,p,v,x,y,_,this.layer)},hasTileAt:function(d,p){return h.HasTileAt(d,p,this.layer)},hasTileAtWorldXY:function(d,p,v){return h.HasTileAtWorldXY(d,p,v,this.layer)},putTileAt:function(d,p,v,x){return h.PutTileAt(d,p,v,x,this.layer)},putTileAtWorldXY:function(d,p,v,x,y){return h.PutTileAtWorldXY(d,p,v,x,y,this.layer)},putTilesAt:function(d,p,v,x){return h.PutTilesAt(d,p,v,x,this.layer),this},randomize:function(d,p,v,x,y){return h.Randomize(d,p,v,x,y,this.layer),this},removeTileAt:function(d,p,v,x){return h.RemoveTileAt(d,p,v,x,this.layer)},removeTileAtWorldXY:function(d,p,v,x,y){return h.RemoveTileAtWorldXY(d,p,v,x,y,this.layer)},renderDebug:function(d,p){return h.RenderDebug(d,p,this.layer),this},replaceByIndex:function(d,p,v,x,y,_){return h.ReplaceByIndex(d,p,v,x,y,_,this.layer),this},setSkipCull:function(d){return void 0===d&&(d=!0),this.skipCull=d,this},setCullPadding:function(d,p){return void 0===d&&(d=1),void 0===p&&(p=1),this.cullPaddingX=d,this.cullPaddingY=p,this},setCollision:function(d,p,v,x){return h.SetCollision(d,p,v,this.layer,x),this},setCollisionBetween:function(d,p,v,x){return h.SetCollisionBetween(d,p,v,x,this.layer),this},setCollisionByProperty:function(d,p,v){return h.SetCollisionByProperty(d,p,v,this.layer),this},setCollisionByExclusion:function(d,p,v){return h.SetCollisionByExclusion(d,p,v,this.layer),this},setCollisionFromCollisionGroup:function(d,p){return h.SetCollisionFromCollisionGroup(d,p,this.layer),this},setTileIndexCallback:function(d,p,v){return h.SetTileIndexCallback(d,p,v,this.layer),this},setTileLocationCallback:function(d,p,v,x,y,_){return h.SetTileLocationCallback(d,p,v,x,y,_,this.layer),this},shuffle:function(d,p,v,x){return h.Shuffle(d,p,v,x,this.layer),this},swapByIndex:function(d,p,v,x,y,_){return h.SwapByIndex(d,p,v,x,y,_,this.layer),this},tileToWorldX:function(d,p){return this.tilemap.tileToWorldX(d,p,this)},tileToWorldY:function(d,p){return this.tilemap.tileToWorldY(d,p,this)},tileToWorldXY:function(d,p,v,x){return this.tilemap.tileToWorldXY(d,p,v,x,this)},getTileCorners:function(d,p,v){return this.tilemap.getTileCorners(d,p,v,this)},weightedRandomize:function(d,p,v,x,y){return h.WeightedRandomize(p,v,x,y,d,this.layer),this},worldToTileX:function(d,p,v){return this.tilemap.worldToTileX(d,p,v,this)},worldToTileY:function(d,p,v){return this.tilemap.worldToTileY(d,p,v,this)},worldToTileXY:function(d,p,v,x,y){return this.tilemap.worldToTileXY(d,p,v,x,y,this)},destroy:function(d){void 0===d&&(d=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),d&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],f.prototype.destroy.call(this))}});S.exports=m},16153:(S,k,a)=>{var b=a(61340),T=new b,g=new b,f=new b;S.exports=function(c,u,m,d){var p=u.cull(m),v=p.length,x=m.alpha*u.alpha;if(!(0===v||x<=0)){var y=T,_=g,E=f;_.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),y.copyFrom(m.matrix);var A=c.currentContext,D=u.gidMap;A.save(),d?(y.multiplyWithOffset(d,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),_.e=u.x,_.f=u.y,y.multiply(_,E),E.copyToContext(A)):(_.e-=m.scrollX*u.scrollFactorX,_.f-=m.scrollY*u.scrollFactorY,_.copyToContext(A)),(!c.antialias||u.scaleX>1||u.scaleY>1)&&(A.imageSmoothingEnabled=!1);for(var I=0;I{var T,g;a(29747),T=a(99558),g=a(16153),S.exports={renderWebGL:T,renderCanvas:g}},99558:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h){var c=f.cull(h),u=c.length,m=h.alpha*f.alpha;if(!(0===u||m<=0)){var d=f.gidMap,p=g.pipelines.set(f.pipeline,f),v=b.getTintAppendFloatAlpha,x=f.scrollFactorX,y=f.scrollFactorY,_=f.x,E=f.y,A=f.scaleX,D=f.scaleY;g.pipelines.preBatch(f);for(var I=0;I{var b=a(83419),T=a(26099),g=new b({initialize:function(h,c,u,m,d,p,v,x,y){(void 0===u||u<=0)&&(u=32),(void 0===m||m<=0)&&(m=32),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v={}),void 0===x&&(x={}),this.name=h,this.firstgid=c,this.tileWidth=u,this.tileHeight=m,this.tileMargin=d,this.tileSpacing=p,this.tileProperties=v,this.tileData=x,this.tileOffset=new T,void 0!==y&&this.tileOffset.set(y.x,y.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(f){return this.containsTileIndex(f)?this.tileProperties[f-this.firstgid]:null},getTileData:function(f){return this.containsTileIndex(f)?this.tileData[f-this.firstgid]:null},getTileCollisionGroup:function(f){var h=this.getTileData(f);return h&&h.objectgroup?h.objectgroup:null},containsTileIndex:function(f){return f>=this.firstgid&&fc.width||h.height>c.height?this.updateTileData(h.width,h.height):this.updateTileData(c.width,c.height,c.x,c.y),this},setTileSize:function(f,h){return void 0!==f&&(this.tileWidth=f),void 0!==h&&(this.tileHeight=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(f,h){return void 0!==f&&(this.tileMargin=f),void 0!==h&&(this.tileSpacing=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=0);var m=(h-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),d=(f-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(m%1!=0||d%1!=0)&&console.warn("Image tile area not tile size multiple in: "+this.name),m=Math.floor(m),d=Math.floor(d),this.rows=m,this.columns=d,this.total=m*d,this.texCoordinates.length=0;for(var p=this.tileMargin+c,v=this.tileMargin+u,x=0;x{var b=a(7423);S.exports=function(g,f,h){var c=b(g,f,!0,h),u=b(g,f-1,!0,h),m=b(g,f+1,!0,h),d=b(g-1,f,!0,h),p=b(g+1,f,!0,h),v=c&&c.collides;return v&&(c.faceTop=!0,c.faceBottom=!0,c.faceLeft=!0,c.faceRight=!0),u&&u.collides&&(v&&(c.faceTop=!1),u.faceBottom=!v),m&&m.collides&&(v&&(c.faceBottom=!1),m.faceTop=!v),d&&d.collides&&(v&&(c.faceLeft=!1),d.faceRight=!v),p&&p.collides&&(v&&(c.faceRight=!1),p.faceLeft=!v),c&&!c.collides&&c.resetFaces(),c}},42573:(S,k,a)=>{var b=a(7423),T=a(7386);S.exports=function(f,h,c,u,m){for(var d=null,p=null,v=null,x=null,y=T(f,h,c,u,null,m),_=0;_{var T=new(a(26099));S.exports=function(f,h,c,u){var m=c.tilemapLayer,d=m.cullPaddingX,p=m.cullPaddingY,v=m.tilemap.tileToWorldXY(f,h,T,u,m);return v.x>u.worldView.x+m.scaleX*c.tileWidth*(-d-.5)&&v.xu.worldView.y+m.scaleY*c.tileHeight*(-p-1)&&v.y{var b=a(42573),T=a(7386),g=a(62991),f=a(23029);S.exports=function(c,u,m,d,p,v,x,y){void 0===x&&(x=!0);var _=T(c,u,m,d,null,y),E=[];_.forEach(function(V){var B=new f(V.layer,V.index,V.x,V.y,V.width,V.height,V.baseWidth,V.baseHeight);B.copy(V),E.push(B)});for(var A=p-c,D=v-u,I=0;I{var b=a(62644),T=a(7386),g=a(27987);S.exports=function(h,c,u,m,d,p){u||(u={}),Array.isArray(h)||(h=[h]);var v=p.tilemapLayer;m||(m=v.scene),d||(d=m.cameras.main);var A,x=p.width,y=p.height,_=T(0,0,x,y,null,p),E=[],D=function(N,V,B){for(var H=0;H{var b=a(87841),T=a(63448),g=a(56583),f=new b;S.exports=function(c,u){var m=c.tilemapLayer.tilemap,d=c.tilemapLayer,p=Math.floor(m.tileWidth*d.scaleX),v=Math.floor(m.tileHeight*d.scaleY),x=g(u.worldView.x-d.x,p,0,!0)-d.cullPaddingX,y=T(u.worldView.right-d.x,p,0,!0)+d.cullPaddingX,_=g(u.worldView.y-d.y,v,0,!0)-d.cullPaddingY,E=T(u.worldView.bottom-d.y,v,0,!0)+d.cullPaddingY;return f.setTo(x,_,y-x,E-_)}},30003:(S,k,a)=>{var b=a(19545),T=a(32483);S.exports=function(f,h,c,u){void 0===c&&(c=[]),void 0===u&&(u=0),c.length=0;var m=f.tilemapLayer,d=b(f,h);return(m.skipCull||1!==m.scrollFactorX||1!==m.scrollFactorY)&&(d.left=0,d.right=f.width,d.top=0,d.bottom=f.height),T(f,d,u,c),c}},35137:(S,k,a)=>{var b=a(7386),T=a(42573),g=a(20576);S.exports=function(h,c,u,m,d,p,v){for(var x=-1!==v.collideIndexes.indexOf(h),y=b(c,u,m,d,null,v),_=0;_{var b=a(7386);S.exports=function(g,f,h,c,u,m,d,p){return b(h,c,u,m,d,p).filter(g,f)}},52692:S=>{S.exports=function(a,b,T,g){void 0===b&&(b=0),void 0===T&&(T=!1);var h,c,u,f=0;if(T){for(c=g.height-1;c>=0;c--)for(h=g.width-1;h>=0;h--)if((u=g.data[c][h])&&u.index===a){if(f===b)return u;f+=1}}else for(c=0;c{var b=a(7386);S.exports=function(g,f,h,c,u,m,d,p){return b(h,c,u,m,d,p).find(g,f)||null}},97560:(S,k,a)=>{var b=a(7386);S.exports=function(g,f,h,c,u,m,d,p){b(h,c,u,m,d,p).forEach(g,f)}},43305:(S,k,a)=>{var b=a(91907),T=a(30003),g=a(9474),f=a(14018),h=a(29747),c=a(54503);S.exports=function(m){return m===b.ORTHOGONAL?T:m===b.HEXAGONAL?g:m===b.STAGGERED?c:m===b.ISOMETRIC?f:h}},7423:(S,k,a)=>{var b=a(62991);S.exports=function(g,f,h,c){if(b(g,f,c)){var u=c.data[f][g]||null;return u?-1===u.index?h?u:null:u:null}return null}},60540:(S,k,a)=>{var b=a(7423),g=new(a(26099));S.exports=function(h,c,u,m,d){return d.tilemapLayer.worldToTileXY(h,c,!0,g,m),b(g.x,g.y,u,d)}},55826:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c){var u=c.baseTileWidth,m=c.baseTileHeight,d=c.tilemapLayer,p=0,v=0;d&&(h||(h=d.scene.cameras.main),p=d.x+h.scrollX*(1-d.scrollFactorX),v=d.y+h.scrollY*(1-d.scrollFactorY),u*=d.scaleX,m*=d.scaleY);var x=p+g*u,y=v+f*m;return[new b(x,y),new b(x+u,y),new b(x+u,y+m),new b(x,y+m)]}},11758:(S,k,a)=>{var b=a(91907),T=a(27229),g=a(29747),f=a(55826);S.exports=function(c){return c===b.ORTHOGONAL?f:c===b.ISOMETRIC?g:c===b.HEXAGONAL?T:g}},39167:(S,k,a)=>{var b=a(91907),T=a(29747),g=a(97281);S.exports=function(h){return h===b.ORTHOGONAL?g:T}},62e3:(S,k,a)=>{var b=a(91907),T=a(19951),g=a(14127),f=a(29747),h=a(97202),c=a(70326);S.exports=function(m){return m===b.ORTHOGONAL?c:m===b.ISOMETRIC?g:m===b.HEXAGONAL?T:m===b.STAGGERED?h:f}},5984:(S,k,a)=>{var b=a(91907),T=a(29747),g=a(28054),f=a(29650);S.exports=function(c){return c===b.ORTHOGONAL?f:c===b.STAGGERED?g:T}},7386:(S,k,a)=>{var b=a(95540);S.exports=function(g,f,h,c,u,m){void 0===g&&(g=0),void 0===f&&(f=0),void 0===h&&(h=m.width),void 0===c&&(c=m.height),u||(u={});var d=b(u,"isNotEmpty",!1),p=b(u,"isColliding",!1),v=b(u,"hasInterestingFace",!1);g<0&&(h+=g,g=0),f<0&&(c+=f,f=0),g+h>m.width&&(h=Math.max(m.width-g,0)),f+c>m.height&&(c=Math.max(m.height-f,0));for(var x=[],y=f;y{var b=a(55738),T=a(7386),g=a(91865),f=a(29747),h=a(26099),c=function(v,x){return g.RectangleToTriangle(x,v)},u=new h,m=new h,d=new h;S.exports=function(v,x,y,_){if(void 0===v)return[];var E=f;v instanceof b.Circle?E=g.CircleToRectangle:v instanceof b.Rectangle?E=g.RectangleToRectangle:v instanceof b.Triangle?E=c:v instanceof b.Line&&(E=g.LineToRectangle),_.tilemapLayer.worldToTileXY(v.left,v.top,!0,m,y);var A=m.x,D=m.y;_.tilemapLayer.worldToTileXY(v.right,v.bottom,!1,d,y);var I=Math.ceil(d.x),R=Math.ceil(d.y),F=Math.max(I-A,1),N=Math.max(R-D,1),V=T(A,D,F,N,x,_),B=_.tileWidth,H=_.tileHeight;_.tilemapLayer&&(B*=_.tilemapLayer.scaleX,H*=_.tilemapLayer.scaleY);for(var Q=[],G=new b.Rectangle(0,0,B,H),K=0;K{var b=a(7386),T=a(26099),g=new T,f=new T;S.exports=function(c,u,m,d,p,v,x){var y=x.tilemapLayer.tilemap._convert.WorldToTileXY;y(c,u,!0,g,v,x);var _=g.x,E=g.y;y(c+m,u+d,!1,f,v,x);var A=Math.ceil(f.x),D=Math.ceil(f.y);return b(_,E,A-_,D-E,p,x)}},96113:(S,k,a)=>{var b=a(91907),T=a(20242),g=a(10095);S.exports=function(h){return h===b.ORTHOGONAL?g:T}},16926:(S,k,a)=>{var b=a(91907),T=a(86625),g=a(96897),f=a(29747),h=a(15108),c=a(85896);S.exports=function(m){return m===b.ORTHOGONAL?c:m===b.ISOMETRIC?g:m===b.HEXAGONAL?T:m===b.STAGGERED?h:f}},55762:(S,k,a)=>{var b=a(91907),T=a(20242),g=a(51900),f=a(63288);S.exports=function(c){return c===b.ORTHOGONAL?f:c===b.STAGGERED?g:T}},45091:(S,k,a)=>{var b=a(62991);S.exports=function(g,f,h){if(b(g,f,h)){var c=h.data[f][g];return null!==c&&c.index>-1}return!1}},24152:(S,k,a)=>{var b=a(45091),g=new(a(26099));S.exports=function(h,c,u,m){return m.tilemapLayer.worldToTileXY(h,c,!0,g,u),b(g.x,g.y,m)}},90454:(S,k,a)=>{var b=a(63448),T=a(56583);S.exports=function(f,h){var v,x,y,_,c=f.tilemapLayer.tilemap,u=f.tilemapLayer,m=Math.floor(c.tileWidth*u.scaleX),d=Math.floor(c.tileHeight*u.scaleY),p=f.hexSideLength;if("y"===f.staggerAxis){var E=(d-p)/2+p;v=T(h.worldView.x-u.x,m,0,!0)-u.cullPaddingX,x=b(h.worldView.right-u.x,m,0,!0)+u.cullPaddingX,y=T(h.worldView.y-u.y,E,0,!0)-u.cullPaddingY,_=b(h.worldView.bottom-u.y,E,0,!0)+u.cullPaddingY}else{var A=(m-p)/2+p;v=T(h.worldView.x-u.x,A,0,!0)-u.cullPaddingX,x=b(h.worldView.right-u.x,A,0,!0)+u.cullPaddingX,y=T(h.worldView.y-u.y,d,0,!0)-u.cullPaddingY,_=b(h.worldView.bottom-u.y,d,0,!0)+u.cullPaddingY}return{left:v,right:x,top:y,bottom:_}}},9474:(S,k,a)=>{var b=a(90454),T=a(32483);S.exports=function(f,h,c,u){void 0===c&&(c=[]),void 0===u&&(u=0),c.length=0;var m=f.tilemapLayer,d=b(f,h);return m.skipCull&&1===m.scrollFactorX&&1===m.scrollFactorY&&(d.left=0,d.right=f.width,d.top=0,d.bottom=f.height),T(f,d,u,c),c}},27229:(S,k,a)=>{var b=a(19951),T=a(26099),g=new T;S.exports=function(h,c,u,m){var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(d*=v.scaleX,p*=v.scaleY);var E,A,x=b(h,c,g,u,m),y=[],_=.5773502691896257;"y"===m.staggerAxis?(E=_*d,A=p/2):(E=d/2,A=_*p);for(var D=0;D<6;D++){var I=2*Math.PI*(.5-D)/6;y.push(new T(x.x+E*Math.cos(I),x.y+A*Math.sin(I)))}return y}},19951:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){h||(h=new b);var m=u.baseTileWidth,d=u.baseTileHeight,p=u.tilemapLayer,v=0,x=0;p&&(c||(c=p.scene.cameras.main),v=p.x+c.scrollX*(1-p.scrollFactorX),x=p.y+c.scrollY*(1-p.scrollFactorY),m*=p.scaleX,d*=p.scaleY);var E,A,y=m/2,_=d/2,D=u.staggerAxis,I=u.staggerIndex;return"y"===D?(E=v+m*g+m,A=x+1.5*f*_+_,f%2==0&&("odd"===I?E-=y:E+=y)):"x"===D&&"odd"===I&&(E=v+1.5*g*y+y,A=x+d*g+d,g%2==0&&("odd"===I?A-=_:A+=_)),h.set(E,A)}},86625:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m){c||(c=new b);var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(u||(u=v.scene.cameras.main),g-=v.x+u.scrollX*(1-v.scrollFactorX),f-=v.y+u.scrollY*(1-v.scrollFactorY),d*=v.scaleX,p*=v.scaleY);var I,R,F,N,V,x=.5773502691896257,y=-.3333333333333333,E=.6666666666666666,A=d/2,D=p/2;"y"===m.staggerAxis?(F=x*(I=(g-A)/(x*d))+y*(R=(f-D)/D),N=0*I+E*R):(F=y*(I=(g-A)/A)+x*(R=(f-D)/(x*p)),N=E*I+0*R),V=-F-N;var B=Math.round(F),H=Math.round(N),Q=Math.round(V),G=Math.abs(B-F),K=Math.abs(H-N),q=Math.abs(Q-V);return G>K&&G>q?B=-H-Q:K>q&&(H=-B-Q),c.set("odd"===m.staggerIndex?H%2==0?H/2+B:H/2+B-.5:H%2==0?H/2+B:H/2+B+.5,H)}},62991:S=>{S.exports=function(a,b,T){return a>=0&&a=0&&b{var b=a(33528);S.exports=function(g,f,h,c){void 0===h&&(h=[]),void 0===c&&(c=0),h.length=0;var A,D,I,u=g.tilemapLayer,m=g.data,d=g.width,p=g.height,v=u.skipCull,y=d,E=p;if(0===c)for(D=0;D=0;A--)(I=m[D][A])&&-1!==I.index&&I.visible&&0!==I.alpha&&(!v&&!b(A,D,g,f)||h.push(I));else if(2===c)for(D=E;D>=0;D--)for(A=0;A=0;D--)for(A=y;A>=0;A--)(I=m[D][A])&&-1!==I.index&&I.visible&&0!==I.alpha&&(!v&&!b(A,D,g,f)||h.push(I));return u.tilesDrawn=h.length,u.tilesTotal=d*p,h}},14127:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){h||(h=new b);var m=u.baseTileWidth,d=u.baseTileHeight,p=u.tilemapLayer,v=0,x=0;return p&&(c||(c=p.scene.cameras.main),v=p.x+c.scrollX*(1-p.scrollFactorX),m*=p.scaleX,x=p.y+c.scrollY*(1-p.scrollFactorY),d*=p.scaleY),h.set(v+m/2*(g-f),x+(g+f)*(d/2))}},96897:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m,d){c||(c=new b);var p=m.baseTileWidth,v=m.baseTileHeight,x=m.tilemapLayer;x&&(u||(u=x.scene.cameras.main),f-=x.y+u.scrollY*(1-x.scrollFactorY),v*=x.scaleY,g-=x.x+u.scrollX*(1-x.scrollFactorX),p*=x.scaleX);var y=p/2,_=v/2;d||(f-=v);var E=.5*((g-=y)/y+f/_),A=.5*(-g/y+f/_);return h&&(E=Math.floor(E),A=Math.floor(A)),c.set(E,A)}},71558:(S,k,a)=>{var b=a(23029),T=a(62991),g=a(72023),f=a(20576);S.exports=function(c,u,m,d,p){if(void 0===d&&(d=!0),!T(u,m,p))return null;var v,x=p.data[m][u],y=x&&x.collides;c instanceof b?(null===p.data[m][u]&&(p.data[m][u]=new b(p,c.index,u,m,p.tileWidth,p.tileHeight)),p.data[m][u].copy(c)):(v=c,null===p.data[m][u]?p.data[m][u]=new b(p,v,u,m,p.tileWidth,p.tileHeight):p.data[m][u].index=v);var _=p.data[m][u],E=-1!==p.collideIndexes.indexOf(_.index);if(-1===(v=c instanceof b?c.index:c))_.width=p.tileWidth,_.height=p.tileHeight;else{var A=p.tilemapLayer.tilemap,R=A.tilesets[A.tiles[v][2]];_.width=R.tileWidth,_.height=R.tileHeight}return f(_,E),d&&y!==_.collides&&g(u,m,p),_}},26303:(S,k,a)=>{var b=a(71558),g=new(a(26099));S.exports=function(h,c,u,m,d,p){return p.tilemapLayer.worldToTileXY(c,u,!0,g,d,p),b(h,g.x,g.y,m,p)}},14051:(S,k,a)=>{var b=a(42573),T=a(71558);S.exports=function(f,h,c,u,m){if(void 0===u&&(u=!0),!Array.isArray(f))return null;Array.isArray(f[0])||(f=[f]);for(var d=f.length,p=f[0].length,v=0;v{var b=a(7386),T=a(26546);S.exports=function(f,h,c,u,m,d){var p,v=b(f,h,c,u,{},d);if(!m)for(m=[],p=0;p{var b=a(23029),T=a(62991),g=a(72023);S.exports=function(h,c,u,m,d){if(void 0===u&&(u=!0),void 0===m&&(m=!0),!T(h,c,d))return null;var p=d.data[c][h];return p?(d.data[c][h]=u?null:new b(d,-1,h,c,d.tileWidth,d.tileHeight),m&&p&&p.collides&&g(h,c,d),p):null}},94178:(S,k,a)=>{var b=a(63557),g=new(a(26099));S.exports=function(h,c,u,m,d,p){return p.tilemapLayer.worldToTileXY(h,c,!0,g,d,p),b(g.x,g.y,u,m,p)}},15533:(S,k,a)=>{var b=a(7386),T=a(3956),g=new T(105,210,231,150),f=new T(243,134,48,200),h=new T(40,39,37,150);S.exports=function(u,m,d){void 0===m&&(m={});var p=void 0!==m.tileColor?m.tileColor:g,v=void 0!==m.collidingTileColor?m.collidingTileColor:f,x=void 0!==m.faceColor?m.faceColor:h,y=b(0,0,d.width,d.height,null,d);u.translateCanvas(d.tilemapLayer.x,d.tilemapLayer.y),u.scaleCanvas(d.tilemapLayer.scaleX,d.tilemapLayer.scaleY);for(var _=0;_{var b=a(7386);S.exports=function(g,f,h,c,u,m,d){for(var p=b(h,c,u,m,null,d),v=0;v{S.exports=function(a,b,T,g){var x,y,_,f=a.data,h=a.width,c=a.height,u=a.tilemapLayer,m=Math.max(0,b.left),d=Math.min(h,b.right),p=Math.max(0,b.top),v=Math.min(c,b.bottom);if(0===T)for(y=p;y=m;x--)(_=f[y][x])&&-1!==_.index&&_.visible&&0!==_.alpha&&g.push(_);else if(2===T)for(y=v;y>=p;y--)for(x=m;f[y]&&x=p;y--)for(x=d;f[y]&&x>=m;x--)(_=f[y][x])&&-1!==_.index&&_.visible&&0!==_.alpha&&g.push(_);return u.tilesDrawn=g.length,u.tilesTotal=h*c,g}},57068:(S,k,a)=>{var b=a(20576),T=a(42573),g=a(9589);S.exports=function(h,c,u,m,d){void 0===c&&(c=!0),void 0===u&&(u=!0),void 0===d&&(d=!0),Array.isArray(h)||(h=[h]);for(var p=0;p{var b=a(20576),T=a(42573),g=a(9589);S.exports=function(h,c,u,m,d,p){if(void 0===u&&(u=!0),void 0===m&&(m=!0),void 0===p&&(p=!0),!(h>c)){for(var v=h;v<=c;v++)g(v,u,d);if(p)for(var x=0;x=h&&_.index<=c&&b(_,u)}m&&T(0,0,d.width,d.height,d)}}},75661:(S,k,a)=>{var b=a(20576),T=a(42573),g=a(9589);S.exports=function(h,c,u,m){void 0===c&&(c=!0),void 0===u&&(u=!0),Array.isArray(h)||(h=[h]);for(var d=0;d{var b=a(20576),T=a(42573),g=a(97022);S.exports=function(h,c,u,m){void 0===c&&(c=!0),void 0===u&&(u=!0);for(var d=0;d{var b=a(20576),T=a(42573);S.exports=function(f,h,c){void 0===f&&(f=!0),void 0===h&&(h=!0);for(var u=0;u0&&b(d,f)}}h&&T(0,0,c.width,c.height,c)}},9589:S=>{S.exports=function(a,b,T){var g=T.collideIndexes.indexOf(a);b&&-1===g?T.collideIndexes.push(a):!b&&-1!==g&&T.collideIndexes.splice(g,1)}},20576:S=>{S.exports=function(a,b){b?a.setCollision(!0,!0,!0,!0,!1):a.resetCollision(!1)}},79583:S=>{S.exports=function(a,b,T,g){if("number"==typeof a)g.callbacks[a]=null!==b?{callback:b,callbackContext:T}:void 0;else for(var f=0,h=a.length;f{var b=a(7386);S.exports=function(g,f,h,c,u,m,d){for(var p=b(g,f,h,c,null,d),v=0;v{var b=a(7386),T=a(33680);S.exports=function(f,h,c,u,m){var d=b(f,h,c,u,null,m),p=d.map(function(x){return x.index});T(p);for(var v=0;v{var b=a(63448),T=a(56583);S.exports=function(f,h){var c=f.tilemapLayer.tilemap,u=f.tilemapLayer,m=Math.floor(c.tileWidth*u.scaleX),d=Math.floor(c.tileHeight*u.scaleY);return{left:T(h.worldView.x-u.x,m,0,!0)-u.cullPaddingX,right:b(h.worldView.right-u.x,m,0,!0)+u.cullPaddingX,top:T(h.worldView.y-u.y,d/2,0,!0)-u.cullPaddingY,bottom:b(h.worldView.bottom-u.y,d/2,0,!0)+u.cullPaddingY}}},54503:(S,k,a)=>{var b=a(61325),T=a(32483);S.exports=function(f,h,c,u){void 0===c&&(c=[]),void 0===u&&(u=0),c.length=0;var m=f.tilemapLayer,d=b(f,h);return m.skipCull&&1===m.scrollFactorX&&1===m.scrollFactorY&&(d.left=0,d.right=f.width,d.top=0,d.bottom=f.height),T(f,d,u,c),c}},97202:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){h||(h=new b);var m=u.baseTileWidth,d=u.baseTileHeight,p=u.tilemapLayer,v=0,x=0;return p&&(c||(c=p.scene.cameras.main),v=p.x+c.scrollX*(1-p.scrollFactorX),m*=p.scaleX,x=p.y+c.scrollY*(1-p.scrollFactorY),d*=p.scaleY),h.set(v+g*m+f%2*(m/2),x+f*(d/2))}},28054:S=>{S.exports=function(a,b,T){var g=T.baseTileHeight,f=T.tilemapLayer,h=0;return f&&(void 0===b&&(b=f.scene.cameras.main),h=f.y+b.scrollY*(1-f.scrollFactorY),g*=f.scaleY),h+a*(g/2)+g}},15108:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m){c||(c=new b);var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(u||(u=v.scene.cameras.main),f-=v.y+u.scrollY*(1-v.scrollFactorY),p*=v.scaleY,g-=v.x+u.scrollX*(1-v.scrollFactorX),d*=v.scaleX);var x=h?Math.floor(f/(p/2)):f/(p/2),y=h?Math.floor((g+x%2*.5*d)/d):(g+x%2*.5*d)/d;return c.set(y,x)}},51900:S=>{S.exports=function(a,b,T,g){var f=g.baseTileHeight,h=g.tilemapLayer;return h&&(T||(T=h.scene.cameras.main),a-=h.y+T.scrollY*(1-h.scrollFactorY),f*=h.scaleY),b?Math.floor(a/(f/2)):a/(f/2)}},86560:(S,k,a)=>{var b=a(7386);S.exports=function(g,f,h,c,u,m,d){for(var p=b(h,c,u,m,null,d),v=0;v{S.exports=function(a,b,T){var g=T.baseTileWidth,f=T.tilemapLayer,h=0;return f&&(b||(b=f.scene.cameras.main),h=f.x+b.scrollX*(1-f.scrollFactorX),g*=f.scaleX),h+a*g}},70326:(S,k,a)=>{var b=a(97281),T=a(29650),g=a(26099);S.exports=function(h,c,u,m,d){return u||(u=new g(0,0)),u.x=b(h,m,d),u.y=T(c,m,d),u}},29650:S=>{S.exports=function(a,b,T){var g=T.baseTileHeight,f=T.tilemapLayer,h=0;return f&&(b||(b=f.scene.cameras.main),h=f.y+b.scrollY*(1-f.scrollFactorY),g*=f.scaleY),h+a*g}},77366:(S,k,a)=>{var b=a(7386),T=a(75508);S.exports=function(f,h,c,u,m,d){if(m){var p,v=b(f,h,c,u,null,d),x=0;for(p=0;p{var b=a(85896),g=new(a(26099));S.exports=function(h,c,u,m){return b(h,0,c,g,u,m),g.x}},85896:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m){void 0===h&&(h=!0),c||(c=new b);var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(u||(u=v.scene.cameras.main),g-=v.x+u.scrollX*(1-v.scrollFactorX),f-=v.y+u.scrollY*(1-v.scrollFactorY),d*=v.scaleX,p*=v.scaleY);var x=g/d,y=f/p;return h&&(x=Math.floor(x),y=Math.floor(y)),c.set(x,y)}},63288:(S,k,a)=>{var b=a(85896),g=new(a(26099));S.exports=function(h,c,u,m){return b(0,h,c,g,u,m),g.y}},81086:(S,k,a)=>{S.exports={CalculateFacesAt:a(72023),CalculateFacesWithin:a(42573),CheckIsoBounds:a(33528),Copy:a(1785),CreateFromTiles:a(78419),CullBounds:a(19545),CullTiles:a(30003),Fill:a(35137),FilterTiles:a(40253),FindByIndex:a(52692),FindTile:a(66151),ForEachTile:a(97560),GetCullTilesFunction:a(43305),GetTileAt:a(7423),GetTileAtWorldXY:a(60540),GetTileCorners:a(55826),GetTileCornersFunction:a(11758),GetTilesWithin:a(7386),GetTilesWithinShape:a(91141),GetTilesWithinWorldXY:a(96523),GetTileToWorldXFunction:a(39167),GetTileToWorldXYFunction:a(62e3),GetTileToWorldYFunction:a(5984),GetWorldToTileXFunction:a(96113),GetWorldToTileXYFunction:a(16926),GetWorldToTileYFunction:a(55762),HasTileAt:a(45091),HasTileAtWorldXY:a(24152),HexagonalCullBounds:a(90454),HexagonalCullTiles:a(9474),HexagonalGetTileCorners:a(27229),HexagonalTileToWorldXY:a(19951),HexagonalWorldToTileXY:a(86625),IsInLayerBounds:a(62991),IsometricCullTiles:a(14018),IsometricTileToWorldXY:a(14127),IsometricWorldToTileXY:a(96897),PutTileAt:a(71558),PutTileAtWorldXY:a(26303),PutTilesAt:a(14051),Randomize:a(77389),RemoveTileAt:a(63557),RemoveTileAtWorldXY:a(94178),RenderDebug:a(15533),ReplaceByIndex:a(27987),RunCull:a(32483),SetCollision:a(57068),SetCollisionBetween:a(37266),SetCollisionByExclusion:a(75661),SetCollisionByProperty:a(64740),SetCollisionFromCollisionGroup:a(63307),SetLayerCollisionIndex:a(9589),SetTileCollision:a(20576),SetTileIndexCallback:a(79583),SetTileLocationCallback:a(93254),Shuffle:a(32903),StaggeredCullBounds:a(61325),StaggeredCullTiles:a(54503),StaggeredTileToWorldXY:a(97202),StaggeredTileToWorldY:a(28054),StaggeredWorldToTileXY:a(15108),StaggeredWorldToTileY:a(51900),SwapByIndex:a(86560),TileToWorldX:a(97281),TileToWorldXY:a(70326),TileToWorldY:a(29650),WeightedRandomize:a(77366),WorldToTileX:a(10095),WorldToTileXY:a(85896),WorldToTileY:a(63288)}},91907:S=>{S.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(S,k,a)=>{var b={ORIENTATION:a(91907)};S.exports=b},62501:(S,k,a)=>{var b=a(79291),T=a(21829),g={Components:a(81086),Parsers:a(57442),Formats:a(80341),ImageCollection:a(16536),ParseToTilemap:a(31989),Tile:a(23029),Tilemap:a(49075),TilemapCreator:a(45939),TilemapFactory:a(46029),Tileset:a(33629),TilemapLayer:a(20442),Orientation:a(91907),LayerData:a(14977),MapData:a(87010),ObjectLayer:a(48700)};g=b(!1,g,T.ORIENTATION),S.exports=g},14977:(S,k,a)=>{var b=a(83419),T=a(91907),g=a(95540),f=new b({initialize:function(c){void 0===c&&(c={}),this.name=g(c,"name","layer"),this.id=g(c,"id",0),this.x=g(c,"x",0),this.y=g(c,"y",0),this.width=g(c,"width",0),this.height=g(c,"height",0),this.tileWidth=g(c,"tileWidth",0),this.tileHeight=g(c,"tileHeight",0),this.baseTileWidth=g(c,"baseTileWidth",this.tileWidth),this.baseTileHeight=g(c,"baseTileHeight",this.tileHeight),this.orientation=g(c,"orientation",T.ORTHOGONAL),this.widthInPixels=g(c,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=g(c,"heightInPixels",this.height*this.baseTileHeight),this.alpha=g(c,"alpha",1),this.visible=g(c,"visible",!0),this.properties=g(c,"properties",[]),this.indexes=g(c,"indexes",[]),this.collideIndexes=g(c,"collideIndexes",[]),this.callbacks=g(c,"callbacks",[]),this.bodies=g(c,"bodies",[]),this.data=g(c,"data",[]),this.tilemapLayer=g(c,"tilemapLayer",null),this.hexSideLength=g(c,"hexSideLength",0),this.staggerAxis=g(c,"staggerAxis","y"),this.staggerIndex=g(c,"staggerIndex","odd")}});S.exports=f},87010:(S,k,a)=>{var b=a(83419),T=a(91907),g=a(95540),f=new b({initialize:function(c){void 0===c&&(c={}),this.name=g(c,"name","map"),this.width=g(c,"width",0),this.height=g(c,"height",0),this.infinite=g(c,"infinite",!1),this.tileWidth=g(c,"tileWidth",0),this.tileHeight=g(c,"tileHeight",0),this.widthInPixels=g(c,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=g(c,"heightInPixels",this.height*this.tileHeight),this.format=g(c,"format",null),this.orientation=g(c,"orientation",T.ORTHOGONAL),this.renderOrder=g(c,"renderOrder","right-down"),this.version=g(c,"version","1"),this.properties=g(c,"properties",{}),this.layers=g(c,"layers",[]),this.images=g(c,"images",[]),this.objects=g(c,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=g(c,"collision",{}),this.tilesets=g(c,"tilesets",[]),this.imageCollections=g(c,"imageCollections",[]),this.tiles=g(c,"tiles",[]),this.hexSideLength=g(c,"hexSideLength",0),this.staggerAxis=g(c,"staggerAxis","y"),this.staggerIndex=g(c,"staggerIndex","odd")}});S.exports=f},48700:(S,k,a)=>{var b=a(83419),T=a(95540),g=new b({initialize:function(h){void 0===h&&(h={}),this.name=T(h,"name","object layer"),this.id=T(h,"id",0),this.opacity=T(h,"opacity",1),this.properties=T(h,"properties",{}),this.propertyTypes=T(h,"propertytypes",{}),this.type=T(h,"type","objectgroup"),this.visible=T(h,"visible",!0),this.objects=T(h,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});S.exports=g},6641:(S,k,a)=>{var b=a(91907);S.exports=function(g){return"isometric"===(g=g.toLowerCase())?b.ISOMETRIC:"staggered"===g?b.STAGGERED:"hexagonal"===g?b.HEXAGONAL:b.ORTHOGONAL}},46177:(S,k,a)=>{var b=a(80341),T=a(2342),g=a(82593),f=a(46594),h=a(87021);S.exports=function(u,m,d,p,v,x){var y;switch(m){case b.ARRAY_2D:y=T(u,d,p,v,x);break;case b.CSV:y=g(u,d,p,v,x);break;case b.TILED_JSON:y=f(u,d,x);break;case b.WELTMEISTER:y=h(u,d,x);break;default:console.warn("Unrecognized tilemap data format: "+m),y=null}return y}},2342:(S,k,a)=>{var b=a(80341),T=a(14977),g=a(87010),f=a(23029);S.exports=function(c,u,m,d,p){for(var v=new T({tileWidth:m,tileHeight:d}),x=new g({name:c,tileWidth:m,tileHeight:d,format:b.ARRAY_2D,layers:[v]}),y=[],_=u.length,E=0,A=0;A{var b=a(80341),T=a(2342);S.exports=function(f,h,c,u,m){var d=h.trim().split("\n").map(function(v){return v.split(",")}),p=T(f,d,c,u,m);return p.format=b.CSV,p}},6656:(S,k,a)=>{var b=a(14977),T=a(23029);S.exports=function(f,h){for(var c=[],u=0;u-1?new T(d,_,y,x,m.tilesize,m.tilesize):h?null:new T(d,-1,y,x,m.tilesize,m.tilesize),p.push(E)}v.push(p),p=[]}d.data=v,c.push(d)}return c}},96483:(S,k,a)=>{var b=a(33629);S.exports=function(g){for(var f=[],h=[],c=0;c{var b=a(80341),T=a(87010),g=a(6656),f=a(96483);S.exports=function(c,u,m){if(0===u.layer.length)return console.warn("No layers found in the Weltmeister map: "+c),null;for(var d=0,p=0,v=0;vd&&(d=u.layer[v].width),u.layer[v].height>p&&(p=u.layer[v].height);var x=new T({width:d,height:p,name:c,tileWidth:u.layer[0].tilesize,tileHeight:u.layer[0].tilesize,format:b.WELTMEISTER});return x.layers=g(u,m),x.tilesets=f(u),x}},52833:(S,k,a)=>{S.exports={ParseTileLayers:a(6656),ParseTilesets:a(96483),ParseWeltmeister:a(87021)}},57442:(S,k,a)=>{S.exports={FromOrientationString:a(6641),Parse:a(46177),Parse2DArray:a(2342),ParseCSV:a(82593),Impact:a(52833),Tiled:a(96761)}},51233:(S,k,a)=>{var b=a(79291);S.exports=function(g){for(var f,h,u,m,d=0;d{S.exports=function(a){for(var b=window.atob(a),T=b.length,g=new Array(T/4),f=0;f>>0;return g}},84101:(S,k,a)=>{var b=a(33629);S.exports=function(g){var f,h,c=[];for(f=0;f{var b=a(95540);S.exports=function(g,f,h){if(!f)return{i:0,layers:g.layers,name:"",opacity:1,visible:!0,x:0,y:0};var c=f.x+b(f,"startx",0)*g.tilewidth+b(f,"offsetx",0),u=f.y+b(f,"starty",0)*g.tileheight+b(f,"offsety",0);return{i:0,layers:f.layers,name:h.name+f.name+"/",opacity:h.opacity*f.opacity,visible:h.visible&&f.visible,x:h.x+c,y:h.y+u}}},29920:S=>{var k=2147483648,a=1073741824,b=536870912;S.exports=function(g){var f=!!(g&k),h=!!(g&a),c=!!(g&b);g&=~(k|a|b);var u=0,m=!1;return f&&h&&c?(u=Math.PI/2,m=!0):f&&h&&!c?(u=Math.PI,m=!1):f&&!h&&c?(u=Math.PI/2,m=!1):!f||h||c?!f&&h&&c?(u=3*Math.PI/2,m=!1):f||!h||c?f||h||!c?!f&&!h&&!c&&(u=0,m=!1):(u=3*Math.PI/2,m=!0):(u=Math.PI,m=!0):(u=0,m=!0),{gid:g,flippedHorizontal:f,flippedVertical:h,flippedAntiDiagonal:c,rotation:u,flipped:m}}},12635:(S,k,a)=>{var b=a(95540),T=a(79677);S.exports=function(f){for(var h=[],c=[],u=T(f);u.i0;)if(u.i>=u.layers.length){if(c.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}u=c.pop()}else{var m=u.layers[u.i];if(u.i++,"imagelayer"===m.type){var p=b(m,"offsetx",0)+b(m,"startx",0),v=b(m,"offsety",0)+b(m,"starty",0);h.push({name:u.name+m.name,image:m.image,x:u.x+p+m.x,y:u.y+v+m.y,alpha:u.opacity*m.opacity,visible:u.visible&&m.visible,properties:b(m,"properties",{})})}else if("group"===m.type){var d=T(f,m,u);c.push(u),u=d}}return h}},46594:(S,k,a)=>{var b=a(51233),T=a(84101),g=a(91907),f=a(62644),h=a(80341),c=a(6641),u=a(87010),m=a(12635),d=a(22611),p=a(28200),v=a(24619);S.exports=function(y,_,E){var A=f(_),D=new u({width:A.width,height:A.height,name:y,tileWidth:A.tilewidth,tileHeight:A.tileheight,orientation:c(A.orientation),format:h.TILED_JSON,version:A.version,properties:A.properties,renderOrder:A.renderorder,infinite:A.infinite});D.orientation===g.HEXAGONAL&&(D.hexSideLength=A.hexsidelength,D.staggerAxis=A.staggeraxis,D.staggerIndex=A.staggerindex),D.layers=p(A,E),D.images=m(A);var I=v(A);return D.tilesets=I.tilesets,D.imageCollections=I.imageCollections,D.objects=d(A),D.tiles=T(D),b(D),D}},52205:(S,k,a)=>{var b=a(18254),T=a(29920),g=function(c){return{x:c.x,y:c.y}},f=["id","name","type","rotation","properties","visible","x","y","width","height"];S.exports=function(c,u,m){void 0===u&&(u=0),void 0===m&&(m=0);var d=b(c,f);if(d.x+=u,d.y+=m,c.gid){var p=T(c.gid);d.gid=p.gid,d.flippedHorizontal=p.flippedHorizontal,d.flippedVertical=p.flippedVertical,d.flippedAntiDiagonal=p.flippedAntiDiagonal}else c.polyline?d.polyline=c.polyline.map(g):c.polygon?d.polygon=c.polygon.map(g):c.ellipse?d.ellipse=c.ellipse:c.text?d.text=c.text:c.point?d.point=!0:d.rectangle=!0;return d}},22611:(S,k,a)=>{var b=a(95540),T=a(52205),g=a(48700),f=a(79677);S.exports=function(c){for(var u=[],m=[],d=f(c);d.i0;)if(d.i>=d.layers.length){if(m.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}d=m.pop()}else{var p=d.layers[d.i];if(d.i++,p.opacity*=d.opacity,p.visible=d.visible&&p.visible,"objectgroup"===p.type){p.name=d.name+p.name;for(var x=d.x+b(p,"startx",0)+b(p,"offsetx",0),y=d.y+b(p,"starty",0)+b(p,"offsety",0),_=[],E=0;E{var b=a(41868),T=a(91907),g=a(79677),f=a(6641),h=a(95540),c=a(14977),u=a(29920),m=a(23029);S.exports=function(p,v){for(var x=h(p,"infinite",!1),y=[],_=[],E=g(p);E.i0;)if(E.i>=E.layers.length){if(_.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}E=_.pop()}else{var A=E.layers[E.i];if(E.i++,"tilelayer"===A.type)if(A.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+A.name+"'");else{if(A.encoding&&"base64"===A.encoding){if(A.chunks)for(var I=0;I0?((N=new m(R,F.gid,nt,ht,p.tilewidth,p.tileheight)).rotation=F.rotation,N.flipX=F.flipped,B[ht][nt]=N):(V=v?null:new m(R,-1,nt,ht,p.tilewidth,p.tileheight),B[ht][nt]=V),++H===at.width&&(it++,H=0)}}else{(R=new c({name:E.name+A.name,id:A.id,x:E.x+h(A,"offsetx",0)+A.x,y:E.y+h(A,"offsety",0)+A.y,width:A.width,height:A.height,tileWidth:p.tilewidth,tileHeight:p.tileheight,alpha:E.opacity*A.opacity,visible:E.visible&&A.visible,properties:h(A,"properties",[]),orientation:f(p.orientation)})).orientation===T.HEXAGONAL&&(R.hexSideLength=p.hexsidelength,R.staggerAxis=p.staggeraxis,R.staggerIndex=p.staggerindex);for(var gt=[],wt=0,St=A.data.length;wt0?((N=new m(R,F.gid,H,B.length,p.tilewidth,p.tileheight)).rotation=F.rotation,N.flipX=F.flipped,gt.push(N)):(V=v?null:new m(R,-1,H,B.length,p.tilewidth,p.tileheight),gt.push(V)),++H===A.width&&(B.push(gt),H=0,gt=[])}R.data=B,y.push(R)}else if("group"===A.type){var D=g(p,A,E);_.push(E),E=D}}return y}},24619:(S,k,a)=>{var b=a(33629),T=a(16536),g=a(52205),f=a(57880);S.exports=function(c){for(var p,u=[],m=[],d=null,v=0;v1){var _=void 0,E=void 0;if(Array.isArray(x.tiles)){_=_||{},E=E||{};for(var A=0;A{S.exports=function(a,b){for(var T=0;T0){var u,m,d,h={},c={};if(Array.isArray(g.edgecolors))for(u=0;u{S.exports={AssignTileProperties:a(51233),Base64Decode:a(41868),BuildTilesetIndex:a(84101),CreateGroupLayer:a(79677),ParseGID:a(29920),ParseImageLayers:a(12635),ParseJSONTiled:a(46594),ParseObject:a(52205),ParseObjectLayers:a(22611),ParseTileLayers:a(28200),ParseTilesets:a(24619)}},33385:(S,k,a)=>{var b=a(83419),T=a(37277),g=a(44594),f=a(94880),h=a(72905),c=new b({initialize:function(m){this.scene=m,this.systems=m.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],m.sys.events.once(g.BOOT,this.boot,this),m.sys.events.on(g.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(g.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var u=this.systems.events;u.on(g.PRE_UPDATE,this.preUpdate,this),u.on(g.UPDATE,this.update,this),u.once(g.SHUTDOWN,this.shutdown,this)},addEvent:function(u){var m;return u instanceof f?(this.removeEvent(m=u),m.elapsed=m.startAt,m.hasDispatched=!1,m.repeatCount=-1===m.repeat||m.loop?999999999999:m.repeat):m=new f(u),this._pendingInsertion.push(m),m},delayedCall:function(u,m,d,p){return this.addEvent({delay:u,callback:m,args:d,callbackScope:p})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(u){Array.isArray(u)||(u=[u]);for(var m=0;m-1&&this._active.splice(v,1),p.destroy()}for(d=0;d=p.delay)){var v=p.elapsed-p.delay;if(p.elapsed=p.delay,!p.hasDispatched&&p.callback&&(p.hasDispatched=!0,p.callback.apply(p.callbackScope,p.args)),p.repeatCount>0){if(p.repeatCount--,v>=p.delay)for(;v>=p.delay&&p.repeatCount>0;)p.callback&&p.callback.apply(p.callbackScope,p.args),v-=p.delay,p.repeatCount--;p.elapsed=v,p.hasDispatched=!1}else p.hasDispatched&&this._pendingRemoval.push(p)}}}},shutdown:function(){var u;for(u=0;u{var b=a(83419),T=a(50792),g=a(39429),f=a(95540),h=a(44594),c=a(89809),u=new b({Extends:T,initialize:function(d,p){T.call(this),this.scene=d,this.systems=d.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var v=this.systems.events;v.on(h.PRE_UPDATE,this.preUpdate,this),v.on(h.UPDATE,this.update,this),v.once(h.SHUTDOWN,this.destroy,this),p&&this.add(p)},preUpdate:function(m,d){this.paused||(this.elapsed+=d*this.timeScale)},update:function(){if(!this.paused&&!this.complete){var m,x,d=this.events,p=!1,v=this.systems;for(m=0;m=d.length&&(0!==this.loop&&(-1===this.loop||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(c.COMPLETE,this)}},play:function(m){return void 0===m&&(m=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,m&&this.reset(),this},pause:function(){this.paused=!0;for(var m=this.events,d=0;d0&&(p=d[d.length-1].time);for(var v=0;v{var b=a(83419),T=a(95540),g=new b({initialize:function(h){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(h)},reset:function(f){if(this.delay=T(f,"delay",0),this.repeat=T(f,"repeat",0),this.loop=T(f,"loop",!1),this.callback=T(f,"callback",void 0),this.callbackScope=T(f,"callbackScope",this),this.args=T(f,"args",[]),this.timeScale=T(f,"timeScale",1),this.startAt=T(f,"startAt",0),this.paused=T(f,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){return this.repeat>0?(this.elapsed+this.delay*(this.repeat-this.repeatCount))/(this.delay+this.delay*this.repeat):this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(f){void 0===f&&(f=!1),this.elapsed=this.delay,this.hasDispatched=!f,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});S.exports=g},35945:S=>{S.exports="complete"},89809:(S,k,a)=>{S.exports={COMPLETE:a(35945)}},90291:(S,k,a)=>{S.exports={Clock:a(33385),Events:a(89809),Timeline:a(96120),TimerEvent:a(94880)}},40382:(S,k,a)=>{var b=a(72905),T=a(83419),g=a(43491),f=a(88032),h=a(37277),c=a(44594),u=a(93109),m=a(86081),d=a(8357),p=a(43960),v=a(26012),x=new T({initialize:function(_){this.scene=_,this.events=_.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(c.BOOT,this.boot,this),this.events.on(c.START,this.start,this)},boot:function(){this.events.once(c.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(c.UPDATE,this.update,this),this.events.once(c.SHUTDOWN,this.shutdown,this)},create:function(y){Array.isArray(y)||(y=[y]);for(var _=[],E=0;E-1},existing:function(y){return this.has(y)||this.tweens.push(y.reset()),this},addCounter:function(y){var _=f(this,y);return this.tweens.push(_.reset()),_},stagger:function(y,_){return u(y,_)},setLagSmooth:function(y,_){return void 0===y&&(y=1/1e-8),void 0===_&&(_=0),this.maxLag=y,this.lagSkip=Math.min(_,this.maxLag),this},setFps:function(y){return void 0===y&&(y=240),this.gap=1e3/y,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(y){var _=Date.now()-this.prevTime;_>this.maxLag&&(this.startTime+=_-this.lagSkip),this.prevTime+=_;var E=this.prevTime-this.startTime,A=E-this.nextTime,D=E-1e3*this.time;return A>0||y?(this.time=E/=1e3,this.nextTime+=A+(A>=this.gap?4:this.gap-A)):D=0,D},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(y){void 0===y&&(y=!1);var _=this.getDelta(y);if(!(_<=0)){this.processing=!0;var E,A,D=[],I=this.tweens;for(E=0;E0){for(E=0;E-1&&(A.isPendingRemove()||A.isDestroyed())&&(I.splice(F,1),A.destroy())}D.length=0}this.processing=!1}},remove:function(y){return this.processing?y.setPendingRemoveState():(b(this.tweens,y),y.setRemovedState()),this},reset:function(y){return this.existing(y),y.seek(),y.setActiveState(),this},makeActive:function(y){return this.existing(y),y.setActiveState(),this},each:function(y,_){var E,A=[null];for(E=1;E{S.exports=function(a,b,T){return a&&a.hasOwnProperty(b)?a[b]:T}},6113:(S,k,a)=>{var b=a(62640),T=a(35355);S.exports=function(f,h){var c=b.Power0;if("string"==typeof f)if(b.hasOwnProperty(f))c=b[f];else{var u="";if(f.indexOf(".")){var m=(u=f.substring(f.indexOf(".")+1)).toLowerCase();"in"===m?u="easeIn":"out"===m?u="easeOut":"inout"===m&&(u="easeInOut")}f=T(f.substring(0,f.indexOf(".")+1)+u),b.hasOwnProperty(f)&&(c=b[f])}else"function"==typeof f&&(c=f);if(!h)return c;var d=h.slice(0);return d.unshift(0),function(p){return d[0]=p,c.apply(this,d)}}},91389:(S,k,a)=>{var b=a(89318),T=a(77259),f={bezier:b,catmull:T,catmullrom:T,linear:a(28392)};S.exports=function(c){if(null===c)return null;var u=f.linear;return"string"==typeof c?f.hasOwnProperty(c)&&(u=f[c]):"function"==typeof c&&(u=c),u}},55292:S=>{S.exports=function(a,b,T){return a.hasOwnProperty(b)?"function"==typeof a[b]?function(h,c,u,m,d,p){return a[b](h,c,u,m,d,p)}:function(){return a[b]}:"function"==typeof T?T:function(){return T}}},82985:(S,k,a)=>{var b=a(81076);S.exports=function(g){var f,h=[];if(g.hasOwnProperty("props"))for(f in g.props)"_"!==f.substring(0,1)&&h.push({key:f,value:g.props[f]});else for(f in g)-1===b.indexOf(f)&&"_"!==f.substring(0,1)&&h.push({key:f,value:g[f]});return h}},62329:(S,k,a)=>{var b=a(35154);S.exports=function(g){var f=b(g,"targets",null);return null===f||("function"==typeof f&&(f=f.call()),Array.isArray(f)||(f=[f])),f}},17777:(S,k,a)=>{var b=a(30976),T=a(99472);function g(m){return!!m.getActive&&"function"==typeof m.getActive}function f(m){return!!m.getStart&&"function"==typeof m.getStart}function h(m){return!!m.getEnd&&"function"==typeof m.getEnd}var u=function(m,d){var p,v=function(at,ot,J){return J},x=function(at,ot,J){return J},y=null,_=typeof d;if("number"===_)v=function(){return d};else if(Array.isArray(d))x=function(){return d[0]},v=function(){return d[d.length-1]};else if("string"===_){var E=d.toLowerCase(),A="random"===E.substring(0,6),D="int"===E.substring(0,3);if(A||D){var I=E.indexOf("("),R=E.indexOf(")"),F=E.indexOf(",");if(!(I&&R&&F))throw new Error("invalid random() format");var N=parseFloat(E.substring(I+1,F)),V=parseFloat(E.substring(F+1,R));v=A?function(){return T(N,V)}:function(){return b(N,V)}}else{E=E[0];var B=parseFloat(d.substr(2));switch(E){case"+":v=function(at,ot,J){return J+B};break;case"-":v=function(at,ot,J){return J-B};break;case"*":v=function(at,ot,J){return J*B};break;case"/":v=function(at,ot,J){return J/B};break;default:v=function(){return parseFloat(d)}}}}else if("function"===_)v=d;else if("object"===_)if(function c(m){return f(m)||h(m)||g(m)}(d))g(d)&&(y=d.getActive),h(d)&&(v=d.getEnd),f(d)&&(x=d.getStart);else if(d.hasOwnProperty("value"))p=u(m,d.value);else{var H=d.hasOwnProperty("to"),Q=d.hasOwnProperty("from"),G=d.hasOwnProperty("start");if(H&&(Q||G)){if(p=u(m,d.to),G){var K=u(m,d.start);p.getActive=K.getEnd}if(Q){var q=u(m,d.from);p.getStart=q.getEnd}}}return p||(p={getActive:y,getEnd:v,getStart:x}),p};S.exports=u},88032:(S,k,a)=>{var b=a(70402),T=a(69902),g=a(23568),f=a(57355),h=a(6113),c=a(55292),u=a(35154),m=a(17777),d=a(269),p=a(86081);S.exports=function(x,y,_){if(y instanceof p)return y.parent=x,y;_=void 0===_?T:d(T,_);var E=u(y,"from",0),A=u(y,"to",1),D=[{value:E}],I=u(y,"delay",_.delay),R=u(y,"easeParams",_.easeParams),F=u(y,"ease",_.ease),N=m("value",A),V=new p(x,D),B=V.add(0,"value",N.getEnd,N.getStart,N.getActive,h(u(y,"ease",F),u(y,"easeParams",R)),c(y,"delay",I),u(y,"duration",_.duration),f(y,"yoyo",_.yoyo),u(y,"hold",_.hold),u(y,"repeat",_.repeat),u(y,"repeatDelay",_.repeatDelay),!1,!1);B.start=E,B.current=E,V.completeDelay=g(y,"completeDelay",0),V.loop=Math.round(g(y,"loop",0)),V.loopDelay=Math.round(g(y,"loopDelay",0)),V.paused=f(y,"paused",!1),V.persist=f(y,"persist",!1),V.callbackScope=u(y,"callbackScope",V);for(var H=b.TYPES,Q=0;Q{var b=a(6113),T=a(35154),g=a(36383);S.exports=function(h,c){void 0===c&&(c={});var m=T(c,"start",0),d=T(c,"ease",null),p=T(c,"grid",null),v=T(c,"from",0),x="first"===v,y="center"===v,_="last"===v,E="number"==typeof v,A=Array.isArray(h),D=parseFloat(A?h[0]:h),I=A?parseFloat(h[1]):0,R=Math.max(D,I);if(A&&(m+=D),p){var F=p[0],N=p[1],V=0,B=0,H=0,Q=0,G=[];_?(V=F-1,B=N-1):E?(V=v%F,B=Math.floor(v/F)):y&&(V=(F-1)/2,B=(N-1)/2);for(var K=g.MIN_SAFE_INTEGER,q=0;qK&&(K=ot),G[q][at]=ot}}}var J=d?b(d):null;return p?function(it,Y,j,nt){var St,ht=0,gt=nt%F,wt=Math.floor(nt/F);if(gt>=0&>=0&&wt{var b=a(70402),T=a(69902),g=a(23568),f=a(57355),h=a(6113),c=a(91389),u=a(55292),m=a(82985),d=a(62329),p=a(35154),v=a(17777),x=a(269),y=a(86081);S.exports=function(E,A,D){if(A instanceof y)return A.parent=E,A;D=void 0===D?T:x(T,D);var I=d(A);!I&&D.targets&&(I=D.targets);for(var R=m(A),F=p(A,"delay",D.delay),N=p(A,"duration",D.duration),V=p(A,"easeParams",D.easeParams),B=p(A,"ease",D.ease),H=p(A,"hold",D.hold),Q=p(A,"repeat",D.repeat),G=p(A,"repeatDelay",D.repeatDelay),K=f(A,"yoyo",D.yoyo),q=f(A,"flipX",D.flipX),at=f(A,"flipY",D.flipY),ot=p(A,"interpolation",D.interpolation),J=function($t,qt,ne,le){if("texture"===ne){var Me=le,pi=void 0;Array.isArray(le)?(Me=le[0],pi=le[1]):le.hasOwnProperty("value")?(Me=le.value,Array.isArray(le.value)?(Me=le.value[0],pi=le.value[1]):"string"==typeof le.value&&(Me=le.value)):"string"==typeof le&&(Me=le),$t.addFrame(qt,Me,pi,u(le,"delay",F),p(le,"duration",N),p(le,"hold",H),p(le,"repeat",Q),p(le,"repeatDelay",G),f(le,"flipX",q),f(le,"flipY",at))}else{var Ie=v(ne,le),_i=c(p(le,"interpolation",ot));$t.add(qt,ne,Ie.getEnd,Ie.getStart,Ie.getActive,h(p(le,"ease",B),p(le,"easeParams",V)),u(le,"delay",F),p(le,"duration",N),f(le,"yoyo",K),p(le,"hold",H),p(le,"repeat",Q),p(le,"repeatDelay",G),f(le,"flipX",q),f(le,"flipY",at),_i,_i?le:null)}},it=new y(E,I),Y=0;Y{var b=a(70402),T=a(23568),g=a(57355),f=a(62329),h=a(35154),c=a(8357),u=a(43960);S.exports=function(d,p){if(p instanceof u)return p.parent=d,p;var v=new u(d);v.startDelay=h(p,"delay",0),v.completeDelay=T(p,"completeDelay",0),v.loop=Math.round(T(p,"loop",h(p,"repeat",0))),v.loopDelay=Math.round(T(p,"loopDelay",h(p,"repeatDelay",0))),v.paused=g(p,"paused",!1),v.persist=g(p,"persist",!1),v.callbackScope=h(p,"callbackScope",v);var x,y=b.TYPES;for(x=0;x{S.exports={GetBoolean:a(57355),GetEaseFunction:a(6113),GetInterpolationFunction:a(91389),GetNewValue:a(55292),GetProps:a(82985),GetTargets:a(62329),GetValueOp:a(17777),NumberTweenBuilder:a(88032),StaggerBuilder:a(93109),TweenBuilder:a(8357)}},73685:S=>{S.exports="active"},98540:S=>{S.exports="complete"},67233:S=>{S.exports="loop"},2859:S=>{S.exports="pause"},98336:S=>{S.exports="repeat"},25764:S=>{S.exports="resume"},32193:S=>{S.exports="start"},84371:S=>{S.exports="stop"},70766:S=>{S.exports="update"},55659:S=>{S.exports="yoyo"},842:(S,k,a)=>{S.exports={TWEEN_ACTIVE:a(73685),TWEEN_COMPLETE:a(98540),TWEEN_LOOP:a(67233),TWEEN_PAUSE:a(2859),TWEEN_RESUME:a(25764),TWEEN_REPEAT:a(98336),TWEEN_START:a(32193),TWEEN_STOP:a(84371),TWEEN_UPDATE:a(70766),TWEEN_YOYO:a(55659)}},43066:(S,k,a)=>{var b={States:a(86353),Builders:a(30231),Events:a(842),TweenManager:a(40382),Tween:a(86081),TweenData:a(48177),TweenFrameData:a(42220),BaseTween:a(70402),TweenChain:a(43960)};S.exports=b},70402:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(842),f=a(86353),h=new b({Extends:T,initialize:function(u){T.call(this),this.parent=u,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=f.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.persist=!1},setTimeScale:function(c){return this.timeScale=c,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(g.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(g.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(g.TWEEN_COMPLETE,"onComplete")},complete:function(c){return void 0===c&&(c=0),c?(this.setCompleteDelayState(),this.countdown=c):this.onCompleteHandler(),this},completeAfterLoop:function(c){return void 0===c&&(c=0),this.loopCounter>c&&(this.loopCounter=c),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(g.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(c){this.countdown-=c,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(g.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(c){return this.countdown-=c,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(g.TWEEN_START,"onStart"),c=0),c},updateCompleteDelay:function(c){this.countdown-=c,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(c,u,m){return void 0===m&&(m=[]),this.callbacks.hasOwnProperty(c)&&(this.callbacks[c]={func:u,params:m}),this},setPendingState:function(){this.state=f.PENDING},setActiveState:function(){this.state=f.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=f.LOOP_DELAY},setCompleteDelayState:function(){this.state=f.COMPLETE_DELAY},setStartDelayState:function(){this.state=f.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=f.PENDING_REMOVE},setRemovedState:function(){this.state=f.REMOVED},setFinishedState:function(){this.state=f.FINISHED},setDestroyedState:function(){this.state=f.DESTROYED},isPending:function(){return this.state===f.PENDING},isActive:function(){return this.state===f.ACTIVE},isLoopDelayed:function(){return this.state===f.LOOP_DELAY},isCompleteDelayed:function(){return this.state===f.COMPLETE_DELAY},isStartDelayed:function(){return this.state===f.START_DELAY},isPendingRemove:function(){return this.state===f.PENDING_REMOVE},isRemoved:function(){return this.state===f.REMOVED},isFinished:function(){return this.state===f.FINISHED},isDestroyed:function(){return this.state===f.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(c){c.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});h.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],S.exports=h},95042:(S,k,a)=>{var b=a(83419),T=a(842),g=a(86353),f=new b({initialize:function(c,u,m,d,p,v,x,y,_,E){this.tween=c,this.targetIndex=u,this.duration=d,this.totalDuration=0,this.delay=0,this.getDelay=m,this.yoyo=p,this.hold=v,this.repeat=x,this.repeatDelay=y,this.repeatCounter=0,this.flipX=_,this.flipY=E,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(h){void 0===h&&(h=this.current),this.tween.targets[this.targetIndex][this.key]=h},setCreatedState:function(){this.state=g.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=g.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=g.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=g.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=g.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=g.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=g.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=g.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===g.CREATED},isDelayed:function(){return this.state===g.DELAY},isPendingRender:function(){return this.state===g.PENDING_RENDER},isPlayingForward:function(){return this.state===g.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===g.PLAYING_BACKWARD},isHolding:function(){return this.state===g.HOLD_DELAY},isRepeating:function(){return this.state===g.REPEAT_DELAY},isComplete:function(){return this.state===g.COMPLETE},setStateFromEnd:function(h){this.yoyo?this.onRepeat(h,!0,!0):this.repeatCounter>0?this.onRepeat(h,!0,!1):this.setCompleteState()},setStateFromStart:function(h){this.repeatCounter>0?this.onRepeat(h,!1):this.setCompleteState()},reset:function(){var h=this.tween,c=h.totalTargets,u=this.targetIndex,m=h.targets[u],d=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(m,d,0,u,c,h),this.repeatCounter=-1===this.repeat?g.MAX:this.repeat,this.setPendingRenderState();var p=this.duration+this.hold;this.yoyo&&(p+=this.duration);var v=p+this.repeatDelay;this.totalDuration=this.delay+p,-1===this.repeat?(this.totalDuration+=v*g.MAX,h.isInfinite=!0):this.repeat>0&&(this.totalDuration+=v*this.repeat),this.totalDuration>h.duration&&(h.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(h,c,u){var m=this.tween,d=m.totalTargets,p=this.targetIndex,v=m.targets[p],x=this.key,y="texture"!==x;if(this.elapsed=h,this.progress=h/this.duration,this.flipX&&v.toggleFlipX(),this.flipY&&v.toggleFlipY(),y&&(c||u)&&(this.start=this.getStartValue(v,x,this.start,p,d,m)),u)return this.setPlayingBackwardState(),void this.dispatchEvent(T.TWEEN_YOYO,"onYoyo");this.repeatCounter--,y&&(this.end=this.getEndValue(v,x,this.start,p,d,m)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-h,y&&(this.current=this.start,v[x]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(T.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});S.exports=f},69902:S=>{S.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},81076:S=>{S.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(S,k,a)=>{var b=a(70402),T=a(83419),g=a(842),f=a(44603),h=a(39429),c=a(36383),u=a(86353),m=a(48177),d=a(42220),p=new T({Extends:b,initialize:function(x,y){b.call(this,x),this.targets=y,this.totalTargets=y.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G){var K=new m(this,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G);return this.totalData=this.data.push(K),K},addFrame:function(v,x,y,_,E,A,D,I,R,F){var N=new d(this,v,x,y,_,E,A,D,I,R,F);return this.totalData=this.data.push(N),N},getValue:function(v){void 0===v&&(v=0);var x=null;return this.data&&(x=this.data[v].current),x},hasTarget:function(v){return this.targets&&-1!==this.targets.indexOf(v)},updateTo:function(v,x,y){if(void 0===y&&(y=!1),"texture"!==v)for(var _=0;_0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(g.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,b.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(v,x,y){if(void 0===v&&(v=0),void 0===x&&(x=16.6),void 0===y&&(y=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;y||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive");var _=this.paused;if(this.paused=!1,v>0){for(var E=Math.floor(v/x),A=v-E*x,D=0;D0&&this.update(A)}return this.paused=_,this.isSeeking=!1,this},initTweenData:function(v){void 0===v&&(v=!1),this.duration=0,this.startDelay=c.MAX_SAFE_INTEGER;for(var x=this.data,y=0;y0?_+E+(_+this.loopDelay)*A:_+E},reset:function(v){return void 0===v&&(v=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=u.MAX),v||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive")),this},update:function(v){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(v*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(v),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(v),!1;this.hasStarted||(this.startDelay-=v,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(g.TWEEN_START,"onStart"),v=0));var x=!1;if(this.isActive())for(var y=this.data,_=0;_{var b=a(72905),T=a(70402),g=a(83419),f=a(842),h=a(44603),c=a(39429),u=a(86353),m=new g({Extends:T,initialize:function(p){T.call(this,p),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?u.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(d){var p=this.parent.create(d);Array.isArray(p)||(p=[p]);for(var v=this.data,x=0;x0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(f.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var d=this.data,p=this.totalData,v=0;v{var b=a(95042),T=a(45319),g=a(83419),f=a(842),h=new g({Extends:b,initialize:function(u,m,d,p,v,x,y,_,E,A,D,I,R,F,N,V,B){b.call(this,u,m,_,E,A,D,I,R,F,N),this.key=d,this.getActiveValue=x,this.getEndValue=p,this.getStartValue=v,this.ease=y,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=V,this.interpolationData=B},reset:function(c){b.prototype.reset.call(this);var u=this.tween.targets[this.targetIndex],m=this.key;c&&(u[m]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(u[m]=this.getActiveValue(u,m,0))},update:function(c){var u=this.tween,m=u.totalTargets,d=this.targetIndex,p=u.targets[d],v=this.key;if(!p)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=c,this.elapsed<=0&&(this.elapsed=0,c=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(f.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(p,v,p[v],d,m,u),this.end=this.getEndValue(p,v,this.start,d,m,u),this.current=this.start,p[v]=this.start,this.setPlayingForwardState(),!0;var x=this.isPlayingForward(),y=this.isPlayingBackward();if(x||y){var _=this.elapsed,E=this.duration,A=0,D=!1;(_+=c)>=E?(A=_-E,_=E,D=!0):_<0&&(_=0);var I=T(_/E,0,1);this.elapsed=_,this.progress=I,this.previous=this.current,x||(I=1-I);var R=this.ease(I);this.current=this.interpolation?this.interpolation(this.interpolationData,R):this.start+(this.end-this.start)*R,p[v]=this.current,D&&(x?this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(A):this.setStateFromStart(A)),this.dispatchEvent(f.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(c,u){var m=this.tween;if(!m.isSeeking){var d=m.targets[this.targetIndex],p=this.key,v=this.current,x=this.previous;m.emit(c,m,p,d,v,x);var y=m.callbacks[u];y&&y.func.apply(m.callbackScope,[m,d,p,v,x].concat(y.params))}},destroy:function(){b.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});S.exports=h},42220:(S,k,a)=>{var b=a(95042),T=a(45319),g=a(83419),f=a(842),h=new g({Extends:b,initialize:function(u,m,d,p,v,x,y,_,E,A,D){b.call(this,u,m,v,x,!1,y,_,E,A,D),this.key="texture",this.startTexture=null,this.endTexture=d,this.startFrame=null,this.endFrame=p,this.yoyo=0!==_},reset:function(c){b.prototype.reset.call(this);var u=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=u.texture.key,this.startFrame=u.frame.name),c&&u.setTexture(this.startTexture,this.startFrame)},update:function(c){var d=this.tween.targets[this.targetIndex];if(!d)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=c,this.elapsed<=0&&(this.elapsed=0,c=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(f.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&d.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var p=this.isPlayingForward(),v=this.isPlayingBackward();if(p||v){var x=this.elapsed,y=this.duration,_=0,E=!1;(x+=c)>=y?(_=x-y,x=y,E=!0):x<0&&(x=0);var A=T(x/y,0,1);this.elapsed=x,this.progress=A,E&&(p?(d.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(_)):(d.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(_))),this.dispatchEvent(f.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(c,u){var m=this.tween;if(!m.isSeeking){var d=m.targets[this.targetIndex],p=this.key;m.emit(c,m,p,d);var v=m.callbacks[u];v&&v.func.apply(m.callbackScope,[m,d,p].concat(v.params))}},destroy:function(){b.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});S.exports=h},86353:S=>{S.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},83419:S=>{function a(h,c,u){var m=u?h[c]:Object.getOwnPropertyDescriptor(h,c);return!u&&m.value&&"object"==typeof m.value&&(m=m.value),!(!m||!function k(h){return!!h.get&&"function"==typeof h.get||!!h.set&&"function"==typeof h.set}(m))&&(typeof m.enumerable>"u"&&(m.enumerable=!0),typeof m.configurable>"u"&&(m.configurable=!0),m)}function b(h,c){var u=Object.getOwnPropertyDescriptor(h,c);return!!u&&(u.value&&"object"==typeof u.value&&(u=u.value),!1===u.configurable)}function T(h,c,u,m){for(var d in c)if(c.hasOwnProperty(d)){var p=a(c,d,u);if(!1!==p){if(b((m||h).prototype,d)){if(f.ignoreFinals)continue;throw new Error("cannot override final property '"+d+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(h.prototype,d,p)}else h.prototype[d]=c[d]}}function g(h,c){if(c){Array.isArray(c)||(c=[c]);for(var u=0;u{S.exports=function(){}},20242:S=>{S.exports=function(){return null}},71146:S=>{S.exports=function(a,b,T,g,f){if(void 0===f&&(f=a),T>0){var h=T-a.length;if(h<=0)return null}if(!Array.isArray(b))return-1===a.indexOf(b)?(a.push(b),g&&g.call(f,b),b):null;for(var c=b.length-1;c>=0;)-1!==a.indexOf(b[c])&&b.splice(c,1),c--;if(0===(c=b.length))return null;T>0&&c>h&&(b.splice(h),c=h);for(var u=0;u{S.exports=function(a,b,T,g,f,h){if(void 0===T&&(T=0),void 0===h&&(h=a),g>0){var c=g-a.length;if(c<=0)return null}if(!Array.isArray(b))return-1===a.indexOf(b)?(a.splice(T,0,b),f&&f.call(h,b),b):null;for(var u=b.length-1;u>=0;)-1!==a.indexOf(b[u])&&b.pop(),u--;if(0===(u=b.length))return null;g>0&&u>c&&(b.splice(c),u=c);for(var m=u-1;m>=0;m--){var d=b[m];a.splice(T,0,d),f&&f.call(h,d)}return b}},66905:S=>{S.exports=function(a,b){var T=a.indexOf(b);return-1!==T&&T{var b=a(82011);S.exports=function(g,f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=g.length);var m=0;if(b(g,c,u))for(var d=c;d{S.exports=function(a,b,T){var g,f=[null];for(g=3;g{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===c&&(c=0),void 0===u&&(u=g.length),b(g,c,u)){var m,d=[null];for(m=5;m{S.exports=function(a,b,T){if(!b.length)return NaN;if(1===b.length)return b[0];var f,h,g=1;if(T){if(ab.length&&(g=b.length),T?(h=b[g][T])-a<=a-(f=b[g-1][T])?b[g]:b[g-1]:(h=b[g])-a<=a-(f=b[g-1])?h:f}},43491:S=>{var k=function(a,b){void 0===b&&(b=[]);for(var T=0;T{var b=a(82011);S.exports=function(g,f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=g.length);var m=[];if(b(g,c,u))for(var d=c;d{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===c&&(c=0),void 0===u&&(u=g.length),b(g,c,u))for(var m=c;m{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=a.length);var g=b+Math.floor(Math.random()*T);return void 0===a[g]?null:a[g]}},85835:S=>{S.exports=function(a,b,T){if(b===T)return a;var g=a.indexOf(b),f=a.indexOf(T);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return g>f||(a.splice(g,1),f=a.indexOf(T),a.splice(f+1,0,b)),a}},83371:S=>{S.exports=function(a,b,T){if(b===T)return a;var g=a.indexOf(b),f=a.indexOf(T);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return g{S.exports=function(a,b){var T=a.indexOf(b);if(T>0){var g=a[T-1],f=a.indexOf(g);a[T]=g,a[f]=b}return a}},69693:S=>{S.exports=function(a,b,T){var g=a.indexOf(b);if(-1===g||T<0||T>=a.length)throw new Error("Supplied index out of bounds");return g!==T&&(a.splice(g,1),a.splice(T,0,b)),b}},40853:S=>{S.exports=function(a,b){var T=a.indexOf(b);if(-1!==T&&T{S.exports=function(a,b,T,g){var h,f=[],c=!1;if((T||g)&&(c=!0,T||(T=""),g||(g="")),b=b;h--)f.push(c?T+h.toString()+g:h);else for(h=a;h<=b;h++)f.push(c?T+h.toString()+g:h);return f}},593:(S,k,a)=>{var b=a(2284);S.exports=function(g,f,h){void 0===g&&(g=0),void 0===f&&(f=null),void 0===h&&(h=1),null===f&&(f=g,g=0);for(var c=[],u=Math.max(b((f-g)/(h||1)),0),m=0;m{function k(T,g,f){var h=T[g];T[g]=T[f],T[f]=h}function a(T,g){return Tg?1:0}var b=function(T,g,f,h,c){for(void 0===f&&(f=0),void 0===h&&(h=T.length-1),void 0===c&&(c=a);h>f;){if(h-f>600){var u=h-f+1,m=g-f+1,d=Math.log(u),p=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*p*(u-p)/u)*(m-u/2<0?-1:1),x=Math.max(f,Math.floor(g-m*p/u+v)),y=Math.min(h,Math.floor(g+(u-m)*p/u+v));b(T,g,x,y,c)}var _=T[g],E=f,A=h;for(k(T,f,g),c(T[h],_)>0&&k(T,f,h);E0;)A--}0===c(T[f],_)?k(T,f,A):k(T,++A,h),A<=g&&(f=A+1),g<=A&&(h=A-1)}};S.exports=b},88492:(S,k,a)=>{var b=a(35154),T=a(33680),g=function(h,c,u){for(var m=[],d=0;d{var b=a(19133);S.exports=function(g,f,h,c){var u;if(void 0===c&&(c=g),!Array.isArray(f))return-1!==(u=g.indexOf(f))?(b(g,u),h&&h.call(c,f),f):null;for(var m=f.length-1,d=[];m>=0;){var p=f[m];-1!==(u=g.indexOf(p))&&(b(g,u),d.push(p),h&&h.call(c,p)),m--}return d}},60248:(S,k,a)=>{var b=a(19133);S.exports=function(g,f,h,c){if(void 0===c&&(c=g),f<0||f>g.length-1)throw new Error("Index out of bounds");var u=b(g,f);return h&&h.call(c,u),u}},81409:(S,k,a)=>{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===f&&(f=0),void 0===h&&(h=g.length),void 0===u&&(u=g),b(g,f,h)){var d=g.splice(f,h-f);if(c)for(var p=0;p{var b=a(19133);S.exports=function(g,f,h){void 0===f&&(f=0),void 0===h&&(h=g.length);var c=f+Math.floor(Math.random()*h);return b(g,c)}},42169:S=>{S.exports=function(a,b,T){var g=a.indexOf(b),f=a.indexOf(T);return-1!==g&&-1===f&&(a[g]=T,!0)}},86003:S=>{S.exports=function(a,b){void 0===b&&(b=1);for(var T=null,g=0;g{S.exports=function(a,b){void 0===b&&(b=1);for(var T=null,g=0;g{S.exports=function(a,b,T,g){var f=a.length;if(b<0||b>f||b>=T||T>f){if(g)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},89545:S=>{S.exports=function(a,b){var T=a.indexOf(b);return-1!==T&&T>0&&(a.splice(T,1),a.unshift(b)),b}},17810:(S,k,a)=>{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===c&&(c=0),void 0===u&&(u=g.length),b(g,c,u))for(var m=c;m{S.exports=function(a){for(var b=a.length-1;b>0;b--){var T=Math.floor(Math.random()*(b+1)),g=a[b];a[b]=a[T],a[T]=g}return a}},90126:S=>{S.exports=function(a){var b=/\D/g;return a.sort(function(T,g){return parseInt(T.replace(b,""),10)-parseInt(g.replace(b,""),10)}),a}},19133:S=>{S.exports=function(a,b){if(!(b>=a.length)){for(var T=a.length-1,g=a[b],f=b;f{var b=a(82264);function T(c,u){return String(c).localeCompare(u)}function f(c,u,m,d){var y,_,E,A,D,p=c.length,v=0,x=2*m;for(y=0;yp&&(_=p),E>p&&(E=p),A=y,D=_;;)if(A<_&&D{S.exports=function(a,b,T){if(b===T)return a;var g=a.indexOf(b),f=a.indexOf(T);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return a[g]=T,a[f]=b,a}},37105:(S,k,a)=>{S.exports={Matrix:a(54915),Add:a(71146),AddAt:a(51067),BringToTop:a(66905),CountAllMatching:a(21612),Each:a(95428),EachInRange:a(36914),FindClosestInSorted:a(81957),Flatten:a(43491),GetAll:a(46710),GetFirst:a(58731),GetRandom:a(26546),MoveDown:a(70864),MoveTo:a(69693),MoveUp:a(40853),MoveAbove:a(85835),MoveBelow:a(83371),NumberArray:a(20283),NumberArrayStep:a(593),QuickSelect:a(43886),Range:a(88492),Remove:a(72905),RemoveAt:a(60248),RemoveBetween:a(81409),RemoveRandomElement:a(31856),Replace:a(42169),RotateLeft:a(86003),RotateRight:a(49498),SafeRange:a(82011),SendToBack:a(89545),SetAll:a(17810),Shuffle:a(33680),SortByDigits:a(90126),SpliceOne:a(19133),StableSort:a(19186),Swap:a(25630)}},86922:S=>{S.exports=function(a){if(!Array.isArray(a)||!Array.isArray(a[0]))return!1;for(var b=a[0].length,T=1;T{var b=a(41836),T=a(86922);S.exports=function(f){var h="";if(!T(f))return h;for(var c=0;c{S.exports=function(a){return a.reverse()}},21224:S=>{S.exports=function(a){for(var b=0;b{var b=a(37829);S.exports=function(g){return b(g,180)}},44657:(S,k,a)=>{var b=a(37829);S.exports=function(g,f){void 0===f&&(f=1);for(var h=0;h{var b=a(86922),T=a(2429);S.exports=function(f,h){if(void 0===h&&(h=90),!b(f))return null;if("string"!=typeof h&&(h=(h%360+360)%360),90===h||-270===h||"rotateLeft"===h)(f=T(f)).reverse();else if(-90===h||270===h||"rotateRight"===h)f.reverse(),f=T(f);else if(180===Math.abs(h)||"rotate180"===h){for(var c=0;c{var b=a(37829);S.exports=function(g,f){void 0===f&&(f=1);for(var h=0;h{var b=a(86003),T=a(49498);S.exports=function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),0!==c&&(c<0?b(f,Math.abs(c)):T(f,c)),0!==h)for(var u=0;u{S.exports=function(a){for(var b=a.length,T=a[0].length,g=new Array(T),f=0;f-1;h--)g[f][h]=a[h][f]}return g}},54915:(S,k,a)=>{S.exports={CheckMatrix:a(86922),MatrixToString:a(63362),ReverseColumns:a(92598),ReverseRows:a(21224),Rotate180:a(98717),RotateLeft:a(44657),RotateMatrix:a(37829),RotateRight:a(92632),Translate:a(69512),TransposeMatrix:a(2429)}},71334:S=>{var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";S.exports=function(b,T){for(var g=new Uint8Array(b),f=g.length,h=T?"data:"+T+";base64,":"",c=0;c>2],h+=k[(3&g[c])<<4|g[c+1]>>4],h+=k[(15&g[c+1])<<2|g[c+2]>>6],h+=k[63&g[c+2]];return f%3==2?h=h.substring(0,h.length-1)+"=":f%3==1&&(h=h.substring(0,h.length-2)+"=="),h}},53134:S=>{for(var a=new Uint8Array(256),b=0;b<64;b++)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(b)]=b;S.exports=function(g){var u,m,d,p,f=(g=g.substr(g.indexOf(",")+1)).length,h=.75*f,c=0;"="===g[f-1]&&(h--,"="===g[f-2]&&h--);for(var v=new ArrayBuffer(h),x=new Uint8Array(v),y=0;y>4,x[c++]=(15&m)<<4|d>>2,x[c++]=(3&d)<<6|63&p;return v}},65839:(S,k,a)=>{S.exports={ArrayBufferToBase64:a(71334),Base64ToArrayBuffer:a(53134)}},91799:(S,k,a)=>{S.exports={Array:a(37105),Base64:a(65839),Objects:a(1183),String:a(31749),NOOP:a(29747),NULL:a(20242)}},41786:S=>{S.exports=function(a){var b={};for(var T in a)b[T]=Array.isArray(a[T])?a[T].slice(0):a[T];return b}},62644:S=>{var k=function(a){var b,g;if("object"!=typeof a||null===a)return a;for(g in b=Array.isArray(a)?[]:{},a)b[g]=k(a[g]);return b};S.exports=k},79291:(S,k,a)=>{var b=a(41212),T=function(){var g,f,h,c,u,m,d=arguments[0]||{},p=1,v=arguments.length,x=!1;for("boolean"==typeof d&&(x=d,d=arguments[1]||{},p=2),v===p&&(d=this,--p);p{var b=a(75508),T=a(35154);S.exports=function(f,h,c){var u=T(f,h,null);if(null===u)return c;if(Array.isArray(u))return b.RND.pick(u);if("object"==typeof u){if(u.hasOwnProperty("randInt"))return b.RND.integerInRange(u.randInt[0],u.randInt[1]);if(u.hasOwnProperty("randFloat"))return b.RND.realInRange(u.randFloat[0],u.randFloat[1])}else if("function"==typeof u)return u(h);return u}},95540:S=>{S.exports=function(a,b,T){var g=typeof a;return a&&"number"!==g&&"string"!==g&&a.hasOwnProperty(b)&&void 0!==a[b]?a[b]:T}},82840:(S,k,a)=>{var b=a(35154),T=a(45319);S.exports=function(f,h,c,u,m){void 0===m&&(m=c);var d=b(f,h,m);return T(d,c,u)}},35154:S=>{S.exports=function(a,b,T,g){if(!a&&!g||"number"==typeof a)return T;if(a&&a.hasOwnProperty(b))return a[b];if(g&&g.hasOwnProperty(b))return g[b];if(-1!==b.indexOf(".")){for(var f=b.split("."),h=a,c=g,u=T,m=T,d=!0,p=!0,v=0;v{S.exports=function(a,b){for(var T=0;T{S.exports=function(a,b){for(var T=0;T{S.exports=function(a,b){return a.hasOwnProperty(b)}},41212:S=>{S.exports=function(a){if(!a||"object"!=typeof a||a.nodeType||a===a.window)return!1;try{if(a.constructor&&!{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0}},46975:(S,k,a)=>{var b=a(41786);S.exports=function(g,f){var h=b(g);for(var c in f)h.hasOwnProperty(c)||(h[c]=f[c]);return h}},269:(S,k,a)=>{var b=a(41786);S.exports=function(g,f){var h=b(g);for(var c in f)h.hasOwnProperty(c)&&(h[c]=f[c]);return h}},18254:(S,k,a)=>{var b=a(97022);S.exports=function(g,f){for(var h={},c=0;c{S.exports=function(a,b,T){if(!a||"number"==typeof a)return!1;if(a.hasOwnProperty(b))return a[b]=T,!0;if(-1!==b.indexOf(".")){for(var g=b.split("."),f=a,h=a,c=0;c{S.exports={Clone:a(41786),DeepCopy:a(62644),Extend:a(79291),GetAdvancedValue:a(23568),GetFastValue:a(95540),GetMinMaxValue:a(82840),GetValue:a(35154),HasAll:a(69036),HasAny:a(1985),HasValue:a(97022),IsPlainObject:a(41212),Merge:a(46975),MergeRight:a(269),Pick:a(18254),SetValue:a(61622)}},27902:S=>{S.exports=function(a,b){return a.replace(/%([0-9]+)/g,function(T,g){return b[Number(g)-1]})}},41836:S=>{S.exports=function(a,b,T,g){void 0===b&&(b=0),void 0===T&&(T=" "),void 0===g&&(g=3);var f=0;if(b+1>=(a=a.toString()).length)switch(g){case 1:a=new Array(b+1-a.length).join(T)+a;break;case 3:var h=Math.ceil((f=b-a.length)/2);a=new Array(f-h+1).join(T)+a+new Array(h+1).join(T);break;default:a+=new Array(b+1-a.length).join(T)}return a}},33628:S=>{S.exports=function(a,b){return 0===b?a.slice(1):a.slice(0,b)+a.slice(b+1)}},27671:S=>{S.exports=function(a){return a.split("").reverse().join("")}},45650:S=>{S.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)})}},35355:S=>{S.exports=function(a){return a&&a[0].toUpperCase()+a.slice(1)}},31749:(S,k,a)=>{S.exports={Format:a(27902),Pad:a(41836),RemoveAt:a(33628),Reverse:a(27671),UppercaseFirst:a(35355),UUID:a(45650)}}},ps={};function Do(S){var k=ps[S];if(void 0!==k)return k.exports;var a=ps[S]={exports:{}};return kd[S](a,a.exports,Do),a.exports}return Do.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),Do(85454)})(),Gs.exports=Do()},293:Gs=>{"use strict";Gs.exports=JSON.parse('{"a":["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"]}')}},Gs=>{Gs(Gs.s=951)}]); \ No newline at end of file +(self.webpackChunksct_implementation_demonstrator=self.webpackChunksct_implementation_demonstrator||[]).push([[792],{951:(Gs,kd,ps)=>{"use strict";function Do(e,i,t,n,r,s,o){try{var l=e[s](o),w=l.value}catch(C){return void t(C)}l.done?i(w):Promise.resolve(w).then(n,r)}function de(e){return function(){var i=this,t=arguments;return new Promise(function(n,r){var s=e.apply(i,t);function o(w){Do(s,n,r,o,l,"next",w)}function l(w){Do(s,n,r,o,l,"throw",w)}o(void 0)})}}let k=null,a=!1,b=1;const T=Symbol("SIGNAL");function g(e){const i=k;return k=e,i}const u={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 p(e){if((!F(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==b)){if(!e.producerMustRecompute(e)&&!A(e))return e.dirty=!1,void(e.lastCleanEpoch=b);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=b}}function y(e){e.dirty=!0,function v(e){if(void 0===e.liveConsumerNode)return;const i=a;a=!0;try{for(const t of e.liveConsumerNode)t.dirty||y(t)}finally{a=i}}(e),e.consumerMarkedDirty?.(e)}function _(e){return e&&(e.nextProducerIndex=0),g(e)}function E(e,i){if(g(i),e&&void 0!==e.producerNode&&void 0!==e.producerIndexOfThis&&void 0!==e.producerLastReadVersion){if(F(e))for(let t=e.nextProducerIndex;te.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function A(e){N(e);for(let i=0;i0}function N(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}let at=null;const Yt=()=>{},$t={...u,consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:e=>{null!==e.schedule&&e.schedule(e.ref)},hasRun:!1,cleanupFn:Yt};function ne(e){return"function"==typeof e}function le(e){const t=e(n=>{Error.call(n),n.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const Me=le(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function pi(e,i){if(e){const t=e.indexOf(i);0<=t&&e.splice(t,1)}}class Ie{constructor(i){this.initialTeardown=i,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let i;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const s of t)s.remove(this);else t.remove(this);const{initialTeardown:n}=this;if(ne(n))try{n()}catch(s){i=s instanceof Me?s.errors:[s]}const{_finalizers:r}=this;if(r){this._finalizers=null;for(const s of r)try{ri(s)}catch(o){i=i??[],o instanceof Me?i=[...i,...o.errors]:i.push(o)}}if(i)throw new Me(i)}}add(i){var t;if(i&&i!==this)if(this.closed)ri(i);else{if(i instanceof Ie){if(i.closed||i._hasParent(this))return;i._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(i)}}_hasParent(i){const{_parentage:t}=this;return t===i||Array.isArray(t)&&t.includes(i)}_addParent(i){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(i),t):t?[t,i]:i}_removeParent(i){const{_parentage:t}=this;t===i?this._parentage=null:Array.isArray(t)&&pi(t,i)}remove(i){const{_finalizers:t}=this;t&&pi(t,i),i instanceof Ie&&i._removeParent(this)}}Ie.EMPTY=(()=>{const e=new Ie;return e.closed=!0,e})();const _i=Ie.EMPTY;function be(e){return e instanceof Ie||e&&"closed"in e&&ne(e.remove)&&ne(e.add)&&ne(e.unsubscribe)}function ri(e){ne(e)?e():e.unsubscribe()}const Ke={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},zi={setTimeout(e,i,...t){const{delegate:n}=zi;return n?.setTimeout?n.setTimeout(e,i,...t):setTimeout(e,i,...t)},clearTimeout(e){const{delegate:i}=zi;return(i?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Cn(e){zi.setTimeout(()=>{const{onUnhandledError:i}=Ke;if(!i)throw e;i(e)})}function sr(){}const vn=cs("C",void 0,void 0);function cs(e,i,t){return{kind:e,value:i,error:t}}let Dn=null;function xr(e){if(Ke.useDeprecatedSynchronousErrorHandling){const i=!Dn;if(i&&(Dn={errorThrown:!1,error:null}),e(),i){const{errorThrown:t,error:n}=Dn;if(Dn=null,t)throw n}}else e()}class Hs extends Ie{constructor(i){super(),this.isStopped=!1,i?(this.destination=i,be(i)&&i.add(this)):this.destination=Nnt}static create(i,t,n){return new Ho(i,t,n)}next(i){this.isStopped?YA(function Fr(e){return cs("N",e,void 0)}(i),this):this._next(i)}error(i){this.isStopped?YA(function bn(e){return cs("E",void 0,e)}(i),this):(this.isStopped=!0,this._error(i))}complete(){this.isStopped?YA(vn,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(i){this.destination.next(i)}_error(i){try{this.destination.error(i)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const Pd=Function.prototype.bind;function lc(e,i){return Pd.call(e,i)}class Fd{constructor(i){this.partialObserver=i}next(i){const{partialObserver:t}=this;if(t.next)try{t.next(i)}catch(n){Fl(n)}}error(i){const{partialObserver:t}=this;if(t.error)try{t.error(i)}catch(n){Fl(n)}else Fl(i)}complete(){const{partialObserver:i}=this;if(i.complete)try{i.complete()}catch(t){Fl(t)}}}class Ho extends Hs{constructor(i,t,n){let r;if(super(),ne(i)||!i)r={next:i??void 0,error:t??void 0,complete:n??void 0};else{let s;this&&Ke.useDeprecatedNextContext?(s=Object.create(i),s.unsubscribe=()=>this.unsubscribe(),r={next:i.next&&lc(i.next,s),error:i.error&&lc(i.error,s),complete:i.complete&&lc(i.complete,s)}):r=i}this.destination=new Fd(r)}}function Fl(e){Ke.useDeprecatedSynchronousErrorHandling?function ts(e){Ke.useDeprecatedSynchronousErrorHandling&&Dn&&(Dn.errorThrown=!0,Dn.error=e)}(e):Cn(e)}function YA(e,i){const{onStoppedNotification:t}=Ke;t&&zi.setTimeout(()=>t(e,i))}const Nnt={closed:!0,next:sr,error:function Lnt(e){throw e},complete:sr},$A="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ju(e){return e}function N4(e){return 0===e.length?Ju:1===e.length?e[0]:function(t){return e.reduce((n,r)=>r(n),t)}}let ur=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const n=new e;return n.source=this,n.operator=t,n}subscribe(t,n,r){const s=function Unt(e){return e&&e instanceof Hs||function Vnt(e){return e&&ne(e.next)&&ne(e.error)&&ne(e.complete)}(e)&&be(e)}(t)?t:new Ho(t,n,r);return xr(()=>{const{operator:o,source:l}=this;s.add(o?o.call(s,l):l?this._subscribe(s):this._trySubscribe(s))}),s}_trySubscribe(t){try{return this._subscribe(t)}catch(n){t.error(n)}}forEach(t,n){return new(n=B4(n))((r,s)=>{const o=new Ho({next:l=>{try{t(l)}catch(w){s(w),o.unsubscribe()}},error:s,complete:r});this.subscribe(o)})}_subscribe(t){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(t)}[$A](){return this}pipe(...t){return N4(t)(this)}toPromise(t){return new(t=B4(t))((n,r)=>{let s;this.subscribe(o=>s=o,o=>r(o),()=>n(s))})}}return e.create=i=>new e(i),e})();function B4(e){var i;return null!==(i=e??Ke.Promise)&&void 0!==i?i:Promise}const znt=le(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Pe=(()=>{class e extends ur{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const n=new V4(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new znt}next(t){xr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const n of this.currentObservers)n.next(t)}})}error(t){xr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){xr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:n,isStopped:r,observers:s}=this;return n||r?_i:(this.currentObservers=null,s.push(t),new Ie(()=>{this.currentObservers=null,pi(s,t)}))}_checkFinalizedStatuses(t){const{hasError:n,thrownError:r,isStopped:s}=this;n?t.error(r):s&&t.complete()}asObservable(){const t=new ur;return t.source=this,t}}return e.create=(i,t)=>new V4(i,t),e})();class V4 extends Pe{constructor(i,t){super(),this.destination=i,this.source=t}next(i){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,i)}error(i){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,i)}complete(){var i,t;null===(t=null===(i=this.destination)||void 0===i?void 0:i.complete)||void 0===t||t.call(i)}_subscribe(i){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(i))&&void 0!==n?n:_i}}class Wr extends Pe{constructor(i){super(),this._value=i}get value(){return this.getValue()}_subscribe(i){const t=super._subscribe(i);return!t.closed&&i.next(this._value),t}getValue(){const{hasError:i,thrownError:t,_value:n}=this;if(i)throw t;return this._throwIfClosed(),n}next(i){super.next(this._value=i)}}function U4(e){return ne(e?.lift)}function ds(e){return i=>{if(U4(i))return i.lift(function(t){try{return e(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Xr(e,i,t,n,r){return new Gnt(e,i,t,n,r)}class Gnt extends Hs{constructor(i,t,n,r,s,o){super(i),this.onFinalize=s,this.shouldUnsubscribe=o,this._next=t?function(l){try{t(l)}catch(w){i.error(w)}}:super._next,this._error=r?function(l){try{r(l)}catch(w){i.error(w)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(l){i.error(l)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(i=this.onFinalize)||void 0===i||i.call(this))}}}function Di(e,i){return ds((t,n)=>{let r=0;t.subscribe(Xr(n,s=>{n.next(e.call(i,s,r++))}))})}const z4="https://g.co/ng/security#xss";class ue extends Error{constructor(i,t){super(function Ep(e,i){return`NG0${Math.abs(e)}${i?": "+i:""}`}(i,t)),this.code=i}}function Od(e){return{toString:e}.toString()}const Dp="__parameters__";function Ip(e,i,t){return Od(()=>{const n=function QA(e){return function(...t){if(e){const n=e(...t);for(const r in n)this[r]=n[r]}}}(i);function r(...s){if(this instanceof r)return n.apply(this,s),this;const o=new r(...s);return l.annotation=o,l;function l(w,C,M){const P=w.hasOwnProperty(Dp)?w[Dp]:Object.defineProperty(w,Dp,{value:[]})[Dp];for(;P.length<=M;)P.push(null);return(P[M]=P[M]||[]).push(o),w}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const hr=globalThis;function yr(e){for(let i in e)if(e[i]===yr)return i;throw Error("Could not find renamed property on target object.")}function Hnt(e,i){for(const t in i)i.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=i[t])}function qs(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(qs).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const i=e.toString();if(null==i)return""+i;const t=i.indexOf("\n");return-1===t?i:i.substring(0,t)}function KA(e,i){return null==e||""===e?null===i?"":i:null==i||""===i?e:e+" "+i}const Wnt=yr({__forward_ref__:yr});function Sn(e){return e.__forward_ref__=Sn,e.toString=function(){return qs(this())},e}function Hi(e){return uw(e)?e():e}function uw(e){return"function"==typeof e&&e.hasOwnProperty(Wnt)&&e.__forward_ref__===Sn}function Ae(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Pi(e){return{providers:e.providers||[],imports:e.imports||[]}}function hw(e){return X4(e,mw)||X4(e,j4)}function X4(e,i){return e.hasOwnProperty(i)?e[i]:null}function fw(e){return e&&(e.hasOwnProperty(ZA)||e.hasOwnProperty(Knt))?e[ZA]:null}const mw=yr({\u0275prov:yr}),ZA=yr({\u0275inj:yr}),j4=yr({ngInjectableDef:yr}),Knt=yr({ngInjectorDef:yr});class ee{constructor(i,t){this._desc=i,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Ae({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function iD(e){return e&&!!e.\u0275providers}const F0=yr({\u0275cmp:yr}),nD=yr({\u0275dir:yr}),rD=yr({\u0275pipe:yr}),$4=yr({\u0275mod:yr}),Ld=yr({\u0275fac:yr}),O0=yr({__NG_ELEMENT_ID__:yr}),Q4=yr({__NG_ENV_ID__:yr});function nn(e){return"string"==typeof e?e:null==e?"":String(e)}function sD(e,i){throw new ue(-201,!1)}var Ln=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ln||{});let aD;function K4(){return aD}function Wo(e){const i=aD;return aD=e,i}function Z4(e,i,t){const n=hw(e);return n&&"root"==n.providedIn?void 0===n.value?n.value=n.factory():n.value:t&Ln.Optional?null:void 0!==i?i:void sD()}const L0={},oD="__NG_DI_FLAG__",pw="ngTempTokenPath",irt=/\n/gm,J4="__source";let Rp;function th(e){const i=Rp;return Rp=e,i}function srt(e,i=Ln.Default){if(void 0===Rp)throw new ue(-203,!1);return null===Rp?Z4(e,void 0,i):Rp.get(e,i&Ln.Optional?null:void 0,i)}function Jt(e,i=Ln.Default){return(K4()||srt)(Hi(e),i)}function me(e,i=Ln.Default){return Jt(e,gw(i))}function gw(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function lD(e){const i=[];for(let t=0;tArray.isArray(t)?kp(t,i):i(t))}function t3(e,i,t){i>=e.length?e.push(t):e.splice(i,0,t)}function vw(e,i){return i>=e.length-1?e.pop():e.splice(i,1)[0]}function ll(e,i,t){let n=Pp(e,i);return n>=0?e[1|n]=t:(n=~n,function e3(e,i,t,n){let r=e.length;if(r==i)e.push(t,n);else if(1===r)e.push(n,e[0]),e[0]=t;else{for(r--,e.push(e[r-1],e[r]);r>i;)e[r]=e[r-2],r--;e[i]=t,e[i+1]=n}}(e,n,i,t)),n}function dD(e,i){const t=Pp(e,i);if(t>=0)return e[1|t]}function Pp(e,i){return function n3(e,i,t){let n=0,r=e.length>>t;for(;r!==n;){const s=n+(r-n>>1),o=e[s<i?r=s:n=s+1}return~(r<i){o=s-1;break}}}for(;s-1){let s;for(;++rs?"":r[M+1].toLowerCase(),2&n&&C!==P){if(dc(n))return!1;o=!0}}}}else{if(!o&&!dc(n)&&!dc(w))return!1;if(o&&dc(w))continue;o=!1,n=w|1&n}}return dc(n)||o}function dc(e){return!(1&e)}function vrt(e,i,t,n){if(null===i)return-1;let r=0;if(n||!t){let s=!1;for(;r-1)for(t++;t0?'="'+l+'"':"")+"]"}else 8&n?r+="."+o:4&n&&(r+=" "+o);else""!==r&&!dc(o)&&(i+=d3(s,r),r=""),n=o,s=s||!dc(n);t++}return""!==r&&(i+=d3(s,r)),i}function je(e){return Od(()=>{const i=h3(e),t={...i,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===bw.OnPush,directiveDefs:null,pipeDefs:null,dependencies:i.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||cc.Emulated,styles:e.styles||Qn,_:null,schemas:e.schemas||null,tView:null,id:""};f3(t);const n=e.dependencies;return t.directiveDefs=ww(n,!1),t.pipeDefs=ww(n,!0),t.id=function Drt(e){let i=0;const t=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const r of t)i=Math.imul(31,i)+r.charCodeAt(0)|0;return i+=2147483648,"c"+i}(t),t})}function Srt(e){return En(e)||ta(e)}function Ert(e){return null!==e}function Li(e){return Od(()=>({type:e.type,bootstrap:e.bootstrap||Qn,declarations:e.declarations||Qn,imports:e.imports||Qn,exports:e.exports||Qn,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function u3(e,i){if(null==e)return Lc;const t={};for(const n in e)if(e.hasOwnProperty(n)){const r=e[n];let s,o,l=Wt.None;Array.isArray(r)?(l=r[0],s=r[1],o=r[2]??s):(s=r,o=r),i?(t[s]=l!==Wt.None?[n,l]:n,i[s]=o):t[s]=n}return t}function ce(e){return Od(()=>{const i=h3(e);return f3(i),i})}function $a(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,standalone:!0===e.standalone,onDestroy:e.type.prototype.ngOnDestroy||null}}function En(e){return e[F0]||null}function ta(e){return e[nD]||null}function Fa(e){return e[rD]||null}function Qa(e,i){const t=e[$4]||null;if(!t&&!0===i)throw new Error(`Type ${qs(e)} does not have '\u0275mod' property.`);return t}function h3(e){const i={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:i,inputTransforms:null,inputConfig:e.inputs||Lc,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||Qn,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:u3(e.inputs,i),outputs:u3(e.outputs),debugInfo:null}}function f3(e){e.features?.forEach(i=>i(e))}function ww(e,i){if(!e)return null;const t=i?Fa:Srt;return()=>("function"==typeof e?e():e).map(n=>t(n)).filter(Ert)}function Mrt(...e){return{\u0275providers:mD(0,e),\u0275fromNgModule:!0}}function mD(e,...i){const t=[],n=new Set;let r;const s=o=>{t.push(o)};return kp(i,o=>{const l=o;_w(l,s,[],n)&&(r||=[],r.push(l))}),void 0!==r&&m3(r,s),t}function m3(e,i){for(let t=0;t{i(s,n)})}}function _w(e,i,t,n){if(!(e=Hi(e)))return!1;let r=null,s=fw(e);const o=!s&&En(e);if(s||o){if(o&&!o.standalone)return!1;r=e}else{const w=e.ngModule;if(s=fw(w),!s)return!1;r=w}const l=n.has(r);if(o){if(l)return!1;if(n.add(r),o.dependencies){const w="function"==typeof o.dependencies?o.dependencies():o.dependencies;for(const C of w)_w(C,i,t,n)}}else{if(!s)return!1;{if(null!=s.imports&&!l){let C;n.add(r);try{kp(s.imports,M=>{_w(M,i,t,n)&&(C||=[],C.push(M))})}finally{}void 0!==C&&m3(C,i)}if(!l){const C=Cf(r)||(()=>new r);i({provide:r,useFactory:C,deps:Qn},r),i({provide:uD,useValue:r,multi:!0},r),i({provide:Sf,useValue:()=>Jt(r),multi:!0},r)}const w=s.providers;if(null!=w&&!l){const C=e;pD(w,M=>{i(M,C)})}}}return r!==e&&void 0!==e.providers}function pD(e,i){for(let t of e)iD(t)&&(t=t.\u0275providers),Array.isArray(t)?pD(t,i):i(t)}const Irt=yr({provide:String,useValue:yr});function gD(e){return null!==e&&"object"==typeof e&&Irt in e}function Ef(e){return"function"==typeof e}const vD=new ee(""),Tw={},krt={};let xD;function Cw(){return void 0===xD&&(xD=new yw),xD}class jo{}class Fp extends jo{get destroyed(){return this._destroyed}constructor(i,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,bD(i,o=>this.processProvider(o)),this.records.set(r3,Op(void 0,this)),r.has("environment")&&this.records.set(jo,Op(void 0,this));const s=this.records.get(vD);null!=s&&"string"==typeof s.value&&this.scopes.add(s.value),this.injectorDefTypes=new Set(this.get(uD,Qn,Ln.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const i=g(null);try{for(const n of this._ngOnDestroyHooks)n.ngOnDestroy();const t=this._onDestroyHooks;this._onDestroyHooks=[];for(const n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),g(i)}}onDestroy(i){return this.assertNotDestroyed(),this._onDestroyHooks.push(i),()=>this.removeOnDestroy(i)}runInContext(i){this.assertNotDestroyed();const t=th(this),n=Wo(void 0);try{return i()}finally{th(t),Wo(n)}}get(i,t=L0,n=Ln.Default){if(this.assertNotDestroyed(),i.hasOwnProperty(Q4))return i[Q4](this);n=gw(n);const s=th(this),o=Wo(void 0);try{if(!(n&Ln.SkipSelf)){let w=this.records.get(i);if(void 0===w){const C=function Nrt(e){return"function"==typeof e||"object"==typeof e&&e instanceof ee}(i)&&hw(i);w=C&&this.injectableDefInScope(C)?Op(yD(i),Tw):null,this.records.set(i,w)}if(null!=w)return this.hydrate(i,w)}return(n&Ln.Self?Cw():this.parent).get(i,t=n&Ln.Optional&&t===L0?null:t)}catch(l){if("NullInjectorError"===l.name){if((l[pw]=l[pw]||[]).unshift(qs(i)),s)throw l;return function ort(e,i,t,n){const r=e[pw];throw i[J4]&&r.unshift(i[J4]),e.message=function lrt(e,i,t,n=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let r=qs(i);if(Array.isArray(i))r=i.map(qs).join(" -> ");else if("object"==typeof i){let s=[];for(let o in i)if(i.hasOwnProperty(o)){let l=i[o];s.push(o+":"+("string"==typeof l?JSON.stringify(l):qs(l)))}r=`{${s.join(", ")}}`}return`${t}${n?"("+n+")":""}[${r}]: ${e.replace(irt,"\n ")}`}("\n"+e.message,r,t,n),e.ngTokenPath=r,e[pw]=null,e}(l,i,"R3InjectorError",this.source)}throw l}finally{Wo(o),th(s)}}resolveInjectorInitializers(){const i=g(null),t=th(this),n=Wo(void 0);try{const s=this.get(Sf,Qn,Ln.Self);for(const o of s)o()}finally{th(t),Wo(n),g(i)}}toString(){const i=[],t=this.records;for(const n of t.keys())i.push(qs(n));return`R3Injector[${i.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new ue(205,!1)}processProvider(i){let t=Ef(i=Hi(i))?i:Hi(i&&i.provide);const n=function Frt(e){return gD(e)?Op(void 0,e.useValue):Op(v3(e),Tw)}(i);if(!Ef(i)&&!0===i.multi){let r=this.records.get(t);r||(r=Op(void 0,Tw,!0),r.factory=()=>lD(r.multi),this.records.set(t,r)),t=i,r.multi.push(i)}this.records.set(t,n)}hydrate(i,t){const n=g(null);try{return t.value===Tw&&(t.value=krt,t.value=t.factory()),"object"==typeof t.value&&t.value&&function Lrt(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{g(n)}}injectableDefInScope(i){if(!i.providedIn)return!1;const t=Hi(i.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(i){const t=this._onDestroyHooks.indexOf(i);-1!==t&&this._onDestroyHooks.splice(t,1)}}function yD(e){const i=hw(e),t=null!==i?i.factory:Cf(e);if(null!==t)return t;if(e instanceof ee)throw new ue(204,!1);if(e instanceof Function)return function Prt(e){if(e.length>0)throw new ue(204,!1);const t=function Qnt(e){return e&&(e[mw]||e[j4])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new ue(204,!1)}function v3(e,i,t){let n;if(Ef(e)){const r=Hi(e);return Cf(r)||yD(r)}if(gD(e))n=()=>Hi(e.useValue);else if(function g3(e){return!(!e||!e.useFactory)}(e))n=()=>e.useFactory(...lD(e.deps||[]));else if(function p3(e){return!(!e||!e.useExisting)}(e))n=()=>Jt(Hi(e.useExisting));else{const r=Hi(e&&(e.useClass||e.provide));if(!function Ort(e){return!!e.deps}(e))return Cf(r)||yD(r);n=()=>new r(...lD(e.deps))}return n}function Op(e,i,t=!1){return{factory:e,value:i,multi:t?[]:void 0}}function bD(e,i){for(const t of e)Array.isArray(t)?bD(t,i):t&&iD(t)?bD(t.\u0275providers,i):i(t)}function Nc(e,i){e instanceof Fp&&e.assertNotDestroyed();const n=th(e),r=Wo(void 0);try{return i()}finally{th(n),Wo(r)}}function x3(){return void 0!==K4()||null!=function rrt(){return Rp}()}function Sw(e){if(!x3())throw new ue(-203,!1)}const es=0,$e=1,Fi=2,Ts=3,uc=4,Ka=5,cl=6,Np=7,Or=8,Oa=9,hc=10,$i=11,z0=12,b3=13,Bp=14,us=15,G0=16,Vp=17,Bd=18,H0=19,w3=20,ih=21,Aw=22,Af=23,rn=25,_D=1,Bc=7,Up=9,Cs=10;var TD=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(TD||{});function Za(e){return Array.isArray(e)&&"object"==typeof e[_D]}function Ja(e){return Array.isArray(e)&&!0===e[_D]}function CD(e){return!!(4&e.flags)}function Df(e){return e.componentOffset>-1}function Mw(e){return!(1&~e.flags)}function fc(e){return!!e.template}function SD(e){return!!(512&e[Fi])}class Krt{constructor(i,t,n){this.previousValue=i,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}}function S3(e,i,t,n){null!==i?i.applyValueToInputSignal(i,n):e[t]=n}function tr(){return E3}function E3(e){return e.type.prototype.ngOnChanges&&(e.setInput=Jrt),Zrt}function Zrt(){const e=D3(this),i=e?.current;if(i){const t=e.previous;if(t===Lc)e.previous=i;else for(let n in i)t[n]=i[n];e.current=null,this.ngOnChanges(i)}}function Jrt(e,i,t,n,r){const s=this.declaredInputs[n],o=D3(e)||function qrt(e,i){return e[A3]=i}(e,{previous:Lc,current:null}),l=o.current||(o.current={}),w=o.previous,C=w[s];l[s]=new Krt(C&&C.currentValue,t,w===Lc),S3(e,i,r,t)}tr.ngInherit=!0;const A3="__ngSimpleChanges__";function D3(e){return e[A3]||null}const Vc=function(e,i,t){},M3="svg";let R3=!1;function Sr(e){for(;Array.isArray(e);)e=e[es];return e}function X0(e,i){return Sr(i[e])}function Mo(e,i){return Sr(i[e.index])}function j0(e,i){return e.data[i]}function zp(e,i){return e[i]}function dl(e,i){const t=i[e];return Za(t)?t:t[es]}function ID(e){return!(128&~e[Fi])}function Uc(e,i){return null==i?null:e[i]}function k3(e){e[Vp]=0}function sst(e){1024&e[Fi]||(e[Fi]|=1024,ID(e)&&Y0(e))}function RD(e){return!!(9216&e[Fi]||e[Af]?.dirty)}function kD(e){e[hc].changeDetectionScheduler?.notify(1),RD(e)?Y0(e):64&e[Fi]&&(function est(){return R3}()?(e[Fi]|=1024,Y0(e)):e[hc].changeDetectionScheduler?.notify())}function Y0(e){e[hc].changeDetectionScheduler?.notify();let i=Mf(e);for(;null!==i&&!(8192&i[Fi])&&(i[Fi]|=8192,ID(i));)i=Mf(i)}function Iw(e,i){if(!(256&~e[Fi]))throw new ue(911,!1);null===e[ih]&&(e[ih]=[]),e[ih].push(i)}function Mf(e){const i=e[Ts];return Ja(i)?i[Ts]:i}const Qi={lFrame:G3(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function O3(){return Qi.bindingsEnabled}function Gp(){return null!==Qi.skipHydrationRootTNode}function ye(){return Qi.lFrame.lView}function Nn(){return Qi.lFrame.tView}function Ut(e){return Qi.lFrame.contextLView=e,e[Or]}function zt(e){return Qi.lFrame.contextLView=null,e}function br(){let e=L3();for(;null!==e&&64===e.type;)e=e.parent;return e}function L3(){return Qi.lFrame.currentTNode}function zc(e,i){const t=Qi.lFrame;t.currentTNode=e,t.isParent=i}function FD(){return Qi.lFrame.isParent}function OD(){Qi.lFrame.isParent=!1}function Io(){const e=Qi.lFrame;let i=e.bindingRootIndex;return-1===i&&(i=e.bindingRootIndex=e.tView.bindingStartIndex),i}function Vd(){return Qi.lFrame.bindingIndex}function mc(){return Qi.lFrame.bindingIndex++}function Ud(e){const i=Qi.lFrame,t=i.bindingIndex;return i.bindingIndex=i.bindingIndex+e,t}function gst(e,i){const t=Qi.lFrame;t.bindingIndex=t.bindingRootIndex=e,LD(i)}function LD(e){Qi.lFrame.currentDirectiveIndex=e}function ND(e){const i=Qi.lFrame.currentDirectiveIndex;return-1===i?null:e[i]}function BD(){return Qi.lFrame.currentQueryIndex}function Rw(e){Qi.lFrame.currentQueryIndex=e}function xst(e){const i=e[$e];return 2===i.type?i.declTNode:1===i.type?e[Ka]:null}function U3(e,i,t){if(t&Ln.SkipSelf){let r=i,s=e;for(;!(r=r.parent,null!==r||t&Ln.Host||(r=xst(s),null===r||(s=s[Bp],10&r.type))););if(null===r)return!1;i=r,e=s}const n=Qi.lFrame=z3();return n.currentTNode=i,n.lView=e,!0}function VD(e){const i=z3(),t=e[$e];Qi.lFrame=i,i.currentTNode=t.firstChild,i.lView=e,i.tView=t,i.contextLView=e,i.bindingIndex=t.bindingStartIndex,i.inI18n=!1}function z3(){const e=Qi.lFrame,i=null===e?null:e.child;return null===i?G3(e):i}function G3(e){const i={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:e,child:null,inI18n:!1};return null!==e&&(e.child=i),i}function H3(){const e=Qi.lFrame;return Qi.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const W3=H3;function UD(){const e=H3();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function qa(){return Qi.lFrame.selectedIndex}function If(e){Qi.lFrame.selectedIndex=e}function Lr(){const e=Qi.lFrame;return j0(e.tView,e.selectedIndex)}function ul(){Qi.lFrame.currentNamespace=M3}function Q0(){!function wst(){Qi.lFrame.currentNamespace=null}()}let j3=!0;function K0(){return j3}function Gc(e){j3=e}function kw(e,i){for(let t=i.directiveStart,n=i.directiveEnd;t=n)break}else i[w]<0&&(e[Vp]+=65536),(l>14>16&&(3&e[Fi])===i&&(e[Fi]+=16384,$3(l,s)):$3(l,s)}const Hp=-1;class Z0{constructor(i,t,n){this.factory=i,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}}function HD(e){return e!==Hp}function J0(e){return 32767&e}function q0(e,i){let t=function Dst(e){return e>>16}(e),n=i;for(;t>0;)n=n[Bp],t--;return n}let WD=!0;function Ow(e){const i=WD;return WD=e,i}const Q3=255,K3=5;let Mst=0;const Hc={};function Lw(e,i){const t=Z3(e,i);if(-1!==t)return t;const n=i[$e];n.firstCreatePass&&(e.injectorIndex=i.length,XD(n.data,e),XD(i,null),XD(n.blueprint,null));const r=Nw(e,i),s=e.injectorIndex;if(HD(r)){const o=J0(r),l=q0(r,i),w=l[$e].data;for(let C=0;C<8;C++)i[s+C]=l[o+C]|w[o+C]}return i[s+8]=r,s}function XD(e,i){e.push(0,0,0,0,0,0,0,0,i)}function Z3(e,i){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===i[e.injectorIndex+8]?-1:e.injectorIndex}function Nw(e,i){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,n=null,r=i;for(;null!==r;){if(n=rB(r),null===n)return Hp;if(t++,r=r[Bp],-1!==n.injectorIndex)return n.injectorIndex|t<<16}return Hp}function jD(e,i,t){!function Ist(e,i,t){let n;"string"==typeof t?n=t.charCodeAt(0)||0:t.hasOwnProperty(O0)&&(n=t[O0]),null==n&&(n=t[O0]=Mst++);const r=n&Q3;i.data[e+(r>>K3)]|=1<=0?i&Q3:Fst:i}(t);if("function"==typeof s){if(!U3(i,e,n))return n&Ln.Host?J3(r,0,n):q3(i,t,n,r);try{let o;if(o=s(n),null!=o||n&Ln.Optional)return o;sD()}finally{W3()}}else if("number"==typeof s){let o=null,l=Z3(e,i),w=Hp,C=n&Ln.Host?i[us][Ka]:null;for((-1===l||n&Ln.SkipSelf)&&(w=-1===l?Nw(e,i):i[l+8],w!==Hp&&nB(n,!1)?(o=i[$e],l=J0(w),i=q0(w,i)):l=-1);-1!==l;){const M=i[$e];if(iB(s,l,M.data)){const P=kst(l,i,t,o,n,C);if(P!==Hc)return P}w=i[l+8],w!==Hp&&nB(n,i[$e].data[l+8]===C)&&iB(s,l,i)?(o=M,l=J0(w),i=q0(w,i)):l=-1}}return r}function kst(e,i,t,n,r,s){const o=i[$e],l=o.data[e+8],M=Bw(l,o,t,null==n?Df(l)&&WD:n!=o&&!!(3&l.type),r&Ln.Host&&s===l);return null!==M?Rf(i,o,M,l):Hc}function Bw(e,i,t,n,r){const s=e.providerIndexes,o=i.data,l=1048575&s,w=e.directiveStart,M=s>>20,O=r?l+M:e.directiveEnd;for(let L=n?l:l+M;L=w&&U.type===t)return L}if(r){const L=o[w];if(L&&fc(L)&&L.type===t)return w}return null}function Rf(e,i,t,n){let r=e[t];const s=i.data;if(function Cst(e){return e instanceof Z0}(r)){const o=r;o.resolving&&function qnt(e,i){throw i&&i.join(" > "),new ue(-200,e)}(function ar(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():nn(e)}(s[t]));const l=Ow(o.canSeeViewProviders);o.resolving=!0;const C=o.injectImpl?Wo(o.injectImpl):null;U3(e,n,Ln.Default);try{r=e[t]=o.factory(void 0,s,e,n),i.firstCreatePass&&t>=n.directiveStart&&function _st(e,i,t){const{ngOnChanges:n,ngOnInit:r,ngDoCheck:s}=i.type.prototype;if(n){const o=E3(i);(t.preOrderHooks??=[]).push(e,o),(t.preOrderCheckHooks??=[]).push(e,o)}r&&(t.preOrderHooks??=[]).push(0-e,r),s&&((t.preOrderHooks??=[]).push(e,s),(t.preOrderCheckHooks??=[]).push(e,s))}(t,s[t],i)}finally{null!==C&&Wo(C),Ow(l),o.resolving=!1,W3()}}return r}function iB(e,i,t){return!!(t[i+(e>>K3)]&1<{const i=e.prototype.constructor,t=i[Ld]||YD(i),n=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==n;){const s=r[Ld]||YD(r);if(s&&s!==t)return s;r=Object.getPrototypeOf(r)}return s=>new s})}function YD(e){return uw(e)?()=>{const i=YD(Hi(e));return i&&i()}:Cf(e)}function rB(e){const i=e[$e],t=i.type;return 2===t?i.declTNode:1===t?e[Ka]:null}function hl(e){return function Rst(e,i){if("class"===i)return e.classes;if("style"===i)return e.styles;const t=e.attrs;if(t){const n=t.length;let r=0;for(;r{class e{static#t=this.THROW_IF_NOT_FOUND=L0;static#e=this.NULL=new yw;static create(t,n){if(Array.isArray(t))return cB({name:""},n,t,"");{const r=t.name??"";return cB({name:r},t.parent,t.providers,r)}}static#i=this.\u0275prov=Ae({token:e,providedIn:"any",factory:()=>Jt(r3)});static#n=this.__NG_ELEMENT_ID__=-1}return e})();function QD(e){return e.ngOriginalError}class fl{constructor(){this._console=console}handleError(i){const t=this._findOriginalError(i);this._console.error("ERROR",i),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(i){let t=i&&QD(i);for(;t&&QD(t);)t=QD(t);return t||null}}const hB=new ee("",{providedIn:"root",factory:()=>me(fl).handleError.bind(void 0)});let jp=(()=>{class e{static#t=this.__NG_ELEMENT_ID__=Wst;static#e=this.__NG_ENV_ID__=t=>t}return e})();class Hst extends jp{constructor(i){super(),this._lView=i}onDestroy(i){return Iw(this._lView,i),()=>function PD(e,i){if(null===e[ih])return;const t=e[ih].indexOf(i);-1!==t&&e[ih].splice(t,1)}(this._lView,i)}}function Wst(){return new Hst(ye())}function Xst(){return Yp(br(),ye())}function Yp(e,i){return new si(Mo(e,i))}let si=(()=>{class e{constructor(t){this.nativeElement=t}static#t=this.__NG_ELEMENT_ID__=Xst}return e})();function mB(e){return e instanceof si?e.nativeElement:e}function KD(e){return i=>{setTimeout(e,void 0,i)}}const De=class jst extends Pe{constructor(i=!1){super(),this.destroyRef=void 0,this.__isAsync=i,x3()&&(this.destroyRef=me(jp,{optional:!0})??void 0)}emit(i){const t=g(null);try{super.next(i)}finally{g(t)}}subscribe(i,t,n){let r=i,s=t||(()=>null),o=n;if(i&&"object"==typeof i){const w=i;r=w.next?.bind(w),s=w.error?.bind(w),o=w.complete?.bind(w)}this.__isAsync&&(s=KD(s),r&&(r=KD(r)),o&&(o=KD(o)));const l=super.subscribe({next:r,error:s,complete:o});return i instanceof Ie&&i.add(l),l}};function Yst(){return this._results[Symbol.iterator]()}class nh{static#t=Symbol.iterator;get changes(){return this._changes??=new De}constructor(i=!1){this._emitDistinctChangesOnly=i,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 t=nh.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=Yst)}get(i){return this._results[i]}map(i){return this._results.map(i)}filter(i){return this._results.filter(i)}find(i){return this._results.find(i)}reduce(i,t){return this._results.reduce(i,t)}forEach(i){this._results.forEach(i)}some(i){return this._results.some(i)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(i,t){this.dirty=!1;const n=function Xo(e){return e.flat(Number.POSITIVE_INFINITY)}(i);(this._changesDetected=!function hrt(e,i,t){if(e.length!==i.length)return!1;for(let n=0;npat}),pat="ng",FB=new ee(""),zd=new ee("",{providedIn:"platform",factory:()=>"unknown"}),Nr=new ee(""),e2=new ee("",{providedIn:"root",factory:()=>rh().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let OB=()=>null;function d2(e,i,t=!1){return OB(e,i,t)}const UB=new ee("",{providedIn:"root",factory:()=>!1});let Qw,Kw;function Kp(e){return function m2(){if(void 0===Qw&&(Qw=null,hr.trustedTypes))try{Qw=hr.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Qw}()?.createHTML(e)||e}function GB(e){return function p2(){if(void 0===Kw&&(Kw=null,hr.trustedTypes))try{Kw=hr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Kw}()?.createHTML(e)||e}class kf{constructor(i){this.changingThisBreaksApplicationSecurity=i}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${z4})`}}class Mat extends kf{getTypeName(){return"HTML"}}class Iat extends kf{getTypeName(){return"Style"}}class Rat extends kf{getTypeName(){return"Script"}}class kat extends kf{getTypeName(){return"URL"}}class Pat extends kf{getTypeName(){return"ResourceURL"}}function ml(e){return e instanceof kf?e.changingThisBreaksApplicationSecurity:e}function Wc(e,i){const t=function Fat(e){return e instanceof kf&&e.getTypeName()||null}(e);if(null!=t&&t!==i){if("ResourceURL"===t&&"URL"===i)return!0;throw new Error(`Required a safe ${i}, got a ${t} (see ${z4})`)}return t===i}class Uat{constructor(i){this.inertDocumentHelper=i}getInertBodyElement(i){i=""+i;try{const t=(new window.DOMParser).parseFromString(Kp(i),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(i):(t.removeChild(t.firstChild),t)}catch{return null}}}class zat{constructor(i){this.defaultDoc=i,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(i){const t=this.inertDocument.createElement("template");return t.innerHTML=Kp(i),t}}const Hat=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Zw(e){return(e=String(e)).match(Hat)?e:"unsafe:"+e}function Gd(e){const i={};for(const t of e.split(","))i[t]=!0;return i}function ox(...e){const i={};for(const t of e)for(const n in t)t.hasOwnProperty(n)&&(i[n]=!0);return i}const jB=Gd("area,br,col,hr,img,wbr"),YB=Gd("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),$B=Gd("rp,rt"),g2=ox(jB,ox(YB,Gd("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")),ox($B,Gd("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")),ox($B,YB)),v2=Gd("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),QB=ox(v2,Gd("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"),Gd("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")),Wat=Gd("script,style,template");class Xat{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(i){let t=i.firstChild,n=!0,r=[];for(;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)r.push(t),t=$at(t);else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let s=Yat(t);if(s){t=s;break}t=r.pop()}return this.buf.join("")}startElement(i){const t=KB(i).toLowerCase();if(!g2.hasOwnProperty(t))return this.sanitizedSomething=!0,!Wat.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const n=i.attributes;for(let r=0;r"),!0}endElement(i){const t=KB(i).toLowerCase();g2.hasOwnProperty(t)&&!jB.hasOwnProperty(t)&&(this.buf.push(""))}chars(i){this.buf.push(JB(i))}}function Yat(e){const i=e.nextSibling;if(i&&e!==i.previousSibling)throw ZB(i);return i}function $at(e){const i=e.firstChild;if(i&&function jat(e,i){return(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,i))throw ZB(i);return i}function KB(e){const i=e.nodeName;return"string"==typeof i?i:"FORM"}function ZB(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}const Qat=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Kat=/([^\#-~ |!])/g;function JB(e){return e.replace(/&/g,"&").replace(Qat,function(i){return"&#"+(1024*(i.charCodeAt(0)-55296)+(i.charCodeAt(1)-56320)+65536)+";"}).replace(Kat,function(i){return"&#"+i.charCodeAt(0)+";"}).replace(//g,">")}let Jw;function qB(e,i){let t=null;try{Jw=Jw||function XB(e){const i=new zat(e);return function Gat(){try{return!!(new window.DOMParser).parseFromString(Kp(""),"text/html")}catch{return!1}}()?new Uat(i):i}(e);let n=i?String(i):"";t=Jw.getInertBodyElement(n);let r=5,s=n;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,n=s,s=t.innerHTML,t=Jw.getInertBodyElement(n)}while(n!==s);return Kp((new Xat).sanitizeChildren(x2(t)||t))}finally{if(t){const n=x2(t)||t;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function x2(e){return"content"in e&&function Zat(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var La=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(La||{});function Pf(e){const i=cx();return i?GB(i.sanitize(La.HTML,e)||""):Wc(e,"HTML")?GB(ml(e)):qB(rh(),nn(e))}function lx(e){const i=cx();return i?i.sanitize(La.URL,e)||"":Wc(e,"URL")?ml(e):Zw(nn(e))}function cx(){const e=ye();return e&&e[hc].sanitizer}const not=/^>|^->||--!>|)/g,sot="\u200b$1\u200b";function pl(e){return e instanceof Function?e():e}var ah=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(ah||{});let _2;function T2(e,i){return _2(e,i)}function Jp(e,i,t,n,r){if(null!=n){let s,o=!1;Ja(n)?s=n:Za(n)&&(o=!0,n=n[es]);const l=Sr(n);0===e&&null!==t?null==r?f5(i,t,l):Ff(i,t,l,r||null,!0):1===e&&null!==t?Ff(i,t,l,r||null,!0):2===e?function hx(e,i,t){const n=n_(e,i);n&&function Cot(e,i,t,n){e.removeChild(i,t,n)}(e,n,i,t)}(i,l,o):3===e&&i.destroyNode(l),null!=s&&function Aot(e,i,t,n,r){const s=t[Bc];s!==Sr(t)&&Jp(i,e,n,s,r);for(let l=Cs;li.replace(rot,sot))}(i))}function e_(e,i,t){return e.createElement(i,t)}function d5(e,i){i[hc].changeDetectionScheduler?.notify(1),s_(e,i,i[$i],2,null,null)}function u5(e,i){const t=e[Up],n=t.indexOf(i);t.splice(n,1)}function dx(e,i){if(e.length<=Cs)return;const t=Cs+i,n=e[t];if(n){const r=n[G0];null!==r&&r!==e&&u5(r,n),i>0&&(e[t-1][uc]=n[uc]);const s=vw(e,Cs+i);!function vot(e,i){d5(e,i),i[es]=null,i[Ka]=null}(n[$e],n);const o=s[Bd];null!==o&&o.detachView(s[$e]),n[Ts]=null,n[uc]=null,n[Fi]&=-129}return n}function i_(e,i){if(!(256&i[Fi])){const t=i[$i];t.destroyNode&&s_(e,i,t,3,null,null),function yot(e){let i=e[z0];if(!i)return E2(e[$e],e);for(;i;){let t=null;if(Za(i))t=i[z0];else{const n=i[Cs];n&&(t=n)}if(!t){for(;i&&!i[uc]&&i!==e;)Za(i)&&E2(i[$e],i),i=i[Ts];null===i&&(i=e),Za(i)&&E2(i[$e],i),t=i&&i[uc]}i=t}}(i)}}function E2(e,i){if(256&i[Fi])return;const t=g(null);try{i[Fi]&=-129,i[Fi]|=256,i[Af]&&D(i[Af]),function Tot(e,i){let t;if(null!=e&&null!=(t=e.destroyHooks))for(let n=0;n=0?n[o]():n[-o].unsubscribe(),s+=2}else t[s].call(n[t[s+1]]);null!==n&&(i[Np]=null);const r=i[ih];if(null!==r){i[ih]=null;for(let s=0;s-1){const{encapsulation:s}=e.data[n.directiveStart+r];if(s===cc.None||s===cc.Emulated)return null}return Mo(n,t)}}(e,i.parent,t)}function Ff(e,i,t,n,r){e.insertBefore(i,t,n,r)}function f5(e,i,t){e.appendChild(i,t)}function m5(e,i,t,n,r){null!==n?Ff(e,i,t,n,r):f5(e,i,t)}function n_(e,i){return e.parentNode(i)}function p5(e,i,t){return v5(e,i,t)}let D2,v5=function g5(e,i,t){return 40&e.type?Mo(e,t):null};function r_(e,i,t,n){const r=A2(e,n,i),s=i[$i],l=p5(n.parent||i[Ka],n,i);if(null!=r)if(Array.isArray(t))for(let w=0;wrn&&C5(e,i,rn,!1),Vc(o?2:0,r),t(n,r)}finally{If(s),Vc(o?3:1,r)}}function k2(e,i,t){if(CD(i)){const n=g(null);try{const s=i.directiveEnd;for(let o=i.directiveStart;onull;function M5(e,i,t,n,r){for(let s in i){if(!i.hasOwnProperty(s))continue;const o=i[s];if(void 0===o)continue;n??={};let l,w=Wt.None;Array.isArray(o)?(l=o[0],w=o[1]):l=o;let C=s;if(null!==r){if(!r.hasOwnProperty(s))continue;C=r[s]}0===e?I5(n,t,C,l,w):I5(n,t,C,l)}return n}function I5(e,i,t,n,r){let s;e.hasOwnProperty(t)?(s=e[t]).push(i,n):s=e[t]=[i,n],void 0!==r&&s.push(r)}function $o(e,i,t,n,r,s,o,l){const w=Mo(i,t);let M,C=i.inputs;!l&&null!=C&&(M=C[n])?(U2(e,t,M,n,r),Df(i)&&function Uot(e,i){const t=dl(i,e);16&t[Fi]||(t[Fi]|=64)}(t,i.index)):3&i.type&&(n=function Vot(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(n),r=null!=o?o(r,i.value||"",n):r,s.setProperty(w,n,r))}function L2(e,i,t,n){if(O3()){const r=null===n?null:{"":-1},s=function jot(e,i){const t=e.directiveRegistry;let n=null,r=null;if(t)for(let s=0;s0;){const t=e[--i];if("number"==typeof t&&t<0)return t}return 0})(o)!=l&&o.push(l),o.push(t,n,s)}}(e,i,n,fx(e,t,r.hostVars,an),r)}function Xc(e,i,t,n,r,s){const o=Mo(e,i);!function B2(e,i,t,n,r,s,o){if(null==s)e.removeAttribute(i,r,t);else{const l=null==o?nn(s):o(s,n||"",r);e.setAttribute(i,r,l,t)}}(i[$i],o,s,e.value,t,n,r)}function Jot(e,i,t,n,r,s){const o=s[i];if(null!==o)for(let l=0;l0&&(t[r-1][uc]=i),n{Y0(e.lView)},consumerOnSignalRead(){this.lView[Af]=this}},z5=100;function d_(e,i=!0,t=0){const n=e[hc],r=n.rendererFactory;r.begin?.();try{!function olt(e,i){H2(e,i);let t=0;for(;RD(e);){if(t===z5)throw new ue(103,!1);t++,H2(e,1)}}(e,t)}catch(o){throw i&&c_(e,o),o}finally{r.end?.(),n.inlineEffectRunner?.flush()}}function llt(e,i,t,n){const r=i[Fi];if(!(256&~r))return;i[hc].inlineEffectRunner?.flush(),VD(i);let o=null,l=null;(function clt(e){return 2!==e.type})(e)&&(l=function nlt(e){return e[Af]??function rlt(e){const i=U5.pop()??Object.create(alt);return i.lView=e,i}(e)}(i),o=_(l));try{k3(i),function B3(e){return Qi.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==t&&E5(e,i,t,2,n);const w=!(3&~r);if(w){const P=e.preOrderCheckHooks;null!==P&&Pw(i,P,null)}else{const P=e.preOrderHooks;null!==P&&Fw(i,P,0,null),zD(i,0)}if(function dlt(e){for(let i=CB(e);null!==i;i=SB(i)){if(!(i[Fi]&TD.HasTransplantedViews))continue;const t=i[Up];for(let n=0;n-1&&(dx(i,n),vw(t,n))}this._attachedToViewContainer=!1}i_(this._lView[$e],this._lView)}onDestroy(i){Iw(this._lView,i)}markForCheck(){vx(this._cdRefInjectingView||this._lView)}detach(){this._lView[Fi]&=-129}reattach(){kD(this._lView),this._lView[Fi]|=128}detectChanges(){this._lView[Fi]|=1024,d_(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ue(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,d5(this._lView[$e],this._lView)}attachToAppRef(i){if(this._attachedToViewContainer)throw new ue(902,!1);this._appRef=i,kD(this._lView)}}let fr=(()=>{class e{static#t=this.__NG_ELEMENT_ID__=mlt}return e})();const hlt=fr,flt=class extends hlt{constructor(i,t,n){super(),this._declarationLView=i,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(i,t){return this.createEmbeddedViewImpl(i,t)}createEmbeddedViewImpl(i,t,n){const r=mx(this._declarationLView,this._declarationTContainer,i,{embeddedViewInjector:t,dehydratedView:n});return new xx(r)}};function mlt(){return u_(br(),ye())}function u_(e,i){return 4&e.type?new flt(i,e,Yp(e,i)):null}let K5=()=>null;function eg(e,i){return K5(e,i)}class g_{}class Blt{}class Z5{}class Ult{resolveComponentFactory(i){throw function Vlt(e){const i=Error(`No component factory found for ${qs(e)}.`);return i.ngComponent=e,i}(i)}}let Of=(()=>{class e{static#t=this.NULL=new Ult}return e})();class Q2{}let Wd=(()=>{class e{constructor(){this.destroyNode=null}static#t=this.__NG_ELEMENT_ID__=()=>function zlt(){const e=ye(),t=dl(br().index,e);return(Za(t)?t:e)[$i]}()}return e})(),Glt=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>null})}return e})();const K2={},q5=new Set;function jc(e){q5.has(e)||(q5.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}function tV(...e){}class ii{constructor({enableLongStackTrace:i=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new De(!1),this.onMicrotaskEmpty=new De(!1),this.onStable=new De(!1),this.onError=new De(!1),typeof Zone>"u")throw new ue(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),i&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&t,r.shouldCoalesceRunChangeDetection=n,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function Hlt(){const e="function"==typeof hr.requestAnimationFrame;let i=hr[e?"requestAnimationFrame":"setTimeout"],t=hr[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&i&&t){const n=i[Zone.__symbol__("OriginalDelegate")];n&&(i=n);const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r)}return{nativeRequestAnimationFrame:i,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function jlt(e){const i=()=>{!function Xlt(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(hr,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,J2(e),e.isCheckStableRunning=!0,Z2(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),J2(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,n,r,s,o,l)=>{if(function Ylt(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(l))return t.invokeTask(r,s,o,l);try{return eV(e),t.invokeTask(r,s,o,l)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===s.type||e.shouldCoalesceRunChangeDetection)&&i(),iV(e)}},onInvoke:(t,n,r,s,o,l,w)=>{try{return eV(e),t.invoke(r,s,o,l,w)}finally{e.shouldCoalesceRunChangeDetection&&i(),iV(e)}},onHasTask:(t,n,r,s)=>{t.hasTask(r,s),n===r&&("microTask"==s.change?(e._hasPendingMicrotasks=s.microTask,J2(e),Z2(e)):"macroTask"==s.change&&(e.hasPendingMacrotasks=s.macroTask))},onHandleError:(t,n,r,s)=>(t.handleError(r,s),e.runOutsideAngular(()=>e.onError.emit(s)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ii.isInAngularZone())throw new ue(909,!1)}static assertNotInAngularZone(){if(ii.isInAngularZone())throw new ue(909,!1)}run(i,t,n){return this._inner.run(i,t,n)}runTask(i,t,n,r){const s=this._inner,o=s.scheduleEventTask("NgZoneEvent: "+r,i,Wlt,tV,tV);try{return s.runTask(o,t,n)}finally{s.cancelTask(o)}}runGuarded(i,t,n){return this._inner.runGuarded(i,t,n)}runOutsideAngular(i){return this._outer.run(i)}}const Wlt={};function Z2(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function J2(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function eV(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function iV(e){e._nesting--,Z2(e)}class nV{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new De,this.onMicrotaskEmpty=new De,this.onStable=new De,this.onError=new De}run(i,t,n){return i.apply(t,n)}runGuarded(i,t,n){return i.apply(t,n)}runOutsideAngular(i){return i()}runTask(i,t,n,r){return i.apply(t,n)}}var Lf=function(e){return e[e.EarlyRead=0]="EarlyRead",e[e.Write=1]="Write",e[e.MixedReadWrite=2]="MixedReadWrite",e[e.Read=3]="Read",e}(Lf||{});const rV={destroy(){}};function sV(e,i){!i&&Sw();const t=i?.injector??me(is);if(!function sh(e){return"browser"===(e??me(is)).get(zd)}(t))return rV;jc("NgAfterNextRender");const n=t.get(Tx),r=n.handler??=new oV,s=i?.phase??Lf.MixedReadWrite,o=()=>{r.unregister(w),l()},l=t.get(jp).onDestroy(o),w=Nc(t,()=>new aV(s,()=>{o(),e()}));return r.register(w),{destroy:o}}class aV{constructor(i,t){this.phase=i,this.callbackFn=t,this.zone=me(ii),this.errorHandler=me(fl,{optional:!0}),me(g_,{optional:!0})?.notify(1)}invoke(){try{this.zone.runOutsideAngular(this.callbackFn)}catch(i){this.errorHandler?.handleError(i)}}}class oV{constructor(){this.executingCallbacks=!1,this.buckets={[Lf.EarlyRead]:new Set,[Lf.Write]:new Set,[Lf.MixedReadWrite]:new Set,[Lf.Read]:new Set},this.deferredCallbacks=new Set}register(i){(this.executingCallbacks?this.deferredCallbacks:this.buckets[i.phase]).add(i)}unregister(i){this.buckets[i.phase].delete(i),this.deferredCallbacks.delete(i)}execute(){this.executingCallbacks=!0;for(const i of Object.values(this.buckets))for(const t of i)t.invoke();this.executingCallbacks=!1;for(const i of this.deferredCallbacks)this.buckets[i.phase].add(i);this.deferredCallbacks.clear()}destroy(){for(const i of Object.values(this.buckets))i.clear();this.deferredCallbacks.clear()}}let Tx=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const t=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const n of t)n()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>new e})}return e})();function x_(e,i,t){let n=t?e.styles:null,r=t?e.classes:null,s=0;if(null!==i)for(let o=0;o0&&_5(e,t,s.join(" "))}}(L,Mt,X,n),void 0!==t&&function sct(e,i,t){const n=e.projection=[];for(let r=0;r{class e{static#t=this.__NG_ELEMENT_ID__=oct}return e})();function oct(){return mV(br(),ye())}const lct=Ir,hV=class extends lct{constructor(i,t,n){super(),this._lContainer=i,this._hostTNode=t,this._hostLView=n}get element(){return Yp(this._hostTNode,this._hostLView)}get injector(){return new ia(this._hostTNode,this._hostLView)}get parentInjector(){const i=Nw(this._hostTNode,this._hostLView);if(HD(i)){const t=q0(i,this._hostLView),n=J0(i);return new ia(t[$e].data[n+8],t)}return new ia(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(i){const t=fV(this._lContainer);return null!==t&&t[i]||null}get length(){return this._lContainer.length-Cs}createEmbeddedView(i,t,n){let r,s;"number"==typeof n?r=n:null!=n&&(r=n.index,s=n.injector);const o=eg(this._lContainer,i.ssrId),l=i.createEmbeddedViewImpl(t||{},s,o);return this.insertImpl(l,r,tg(this._hostTNode,o)),l}createComponent(i,t,n,r,s){const o=i&&!function U0(e){return"function"==typeof e}(i);let l;if(o)l=t;else{const U=t||{};l=U.index,n=U.injector,r=U.projectableNodes,s=U.environmentInjector||U.ngModuleRef}const w=o?i:new Ex(En(i)),C=n||this.parentInjector;if(!s&&null==w.ngModule){const X=(o?C:this.parentInjector).get(jo,null);X&&(s=X)}const M=En(w.componentType??{}),P=eg(this._lContainer,M?.id??null),L=w.create(C,r,P?.firstChild??null,s);return this.insertImpl(L.hostView,l,tg(this._hostTNode,P)),L}insert(i,t){return this.insertImpl(i,t,!0)}insertImpl(i,t,n){const r=i._lView;if(function rst(e){return Ja(e[Ts])}(r)){const l=this.indexOf(i);if(-1!==l)this.detach(l);else{const w=r[Ts],C=new hV(w,w[Ka],w[Ts]);C.detach(C.indexOf(i))}}const s=this._adjustIndex(t),o=this._lContainer;return px(o,r,s,n),i.attachToViewContainerRef(),t3(iM(o),s,i),i}move(i,t){return this.insert(i,t)}indexOf(i){const t=fV(this._lContainer);return null!==t?t.indexOf(i):-1}remove(i){const t=this._adjustIndex(i,-1),n=dx(this._lContainer,t);n&&(vw(iM(this._lContainer),t),i_(n[$e],n))}detach(i){const t=this._adjustIndex(i,-1),n=dx(this._lContainer,t);return n&&null!=vw(iM(this._lContainer),t)?new xx(n):null}_adjustIndex(i,t=0){return i??this.length+t}};function fV(e){return e[8]}function iM(e){return e[8]||(e[8]=[])}function mV(e,i){let t;const n=i[e.index];return Ja(n)?t=n:(t=P5(n,i,null,e),i[e.index]=t,l_(i,t)),pV(t,i,e,n),new hV(t,e,i)}let pV=function vV(e,i,t,n){if(e[Bc])return;let r;r=8&t.type?Sr(n):function cct(e,i){const t=e[$i],n=t.createComment(""),r=Mo(i,e);return Ff(t,n_(t,r),n,function Sot(e,i){return e.nextSibling(i)}(t,r),!1),n}(i,t),e[Bc]=r},nM=()=>!1;class rM{constructor(i){this.queryList=i,this.matches=null}clone(){return new rM(this.queryList)}setDirty(){this.queryList.setDirty()}}class sM{constructor(i=[]){this.queries=i}createEmbeddedView(i){const t=i.queries;if(null!==t){const n=null!==i.contentQueries?i.contentQueries[0]:t.length,r=[];for(let s=0;si.trim())}(i):i}}class aM{constructor(i=[]){this.queries=i}elementStart(i,t){for(let n=0;n0)n.push(o[l/2]);else{const C=s[l+1],M=i[-w];for(let P=Cs;P=0;n--){const r=e[n];r.hostVars=i+=r.hostVars,r.hostAttrs=B0(r.hostAttrs,t=B0(t,r.hostAttrs))}}(n)}function Mct(e,i){for(const t in i.inputs){if(!i.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const n=i.inputs[t];if(void 0!==n&&(e.inputs[t]=n,e.declaredInputs[t]=i.declaredInputs[t],null!==i.inputTransforms)){const r=Array.isArray(n)?n[0]:n;if(!i.inputTransforms.hasOwnProperty(r))continue;e.inputTransforms??={},e.inputTransforms[r]=i.inputTransforms[r]}}}function __(e){return e===Lc?{}:e===Qn?[]:e}function Rct(e,i){const t=e.viewQuery;e.viewQuery=t?(n,r)=>{i(n,r),t(n,r)}:i}function kct(e,i){const t=e.contentQueries;e.contentQueries=t?(n,r,s)=>{i(n,r,s),t(n,r,s)}:i}function Pct(e,i){const t=e.hostBindings;e.hostBindings=t?(n,r)=>{i(n,r),t(n,r)}:i}function ln(e){const i=e.inputConfig,t={};for(const n in i)if(i.hasOwnProperty(n)){const r=i[n];Array.isArray(r)&&r[3]&&(t[n]=r[3])}e.inputTransforms=t}class Nf{}class zV{}class hM extends Nf{constructor(i,t,n){super(),this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new dV(this);const r=Qa(i);this._bootstrapComponents=pl(r.bootstrap),this._r3Injector=dB(i,t,[{provide:Nf,useValue:this},{provide:Of,useValue:this.componentFactoryResolver},...n],qs(i),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(i)}get injector(){return this._r3Injector}destroy(){const i=this._r3Injector;!i.destroyed&&i.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(i){this.destroyCbs.push(i)}}class fM extends zV{constructor(i){super(),this.moduleType=i}create(i){return new hM(this.moduleType,i,[])}}class GV extends Nf{constructor(i){super(),this.componentFactoryResolver=new dV(this),this.instance=null;const t=new Fp([...i.providers,{provide:Nf,useValue:this},{provide:Of,useValue:this.componentFactoryResolver}],i.parent||Cw(),i.debugName,new Set(["environment"]));this.injector=t,i.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(i){this.injector.onDestroy(i)}}function T_(e,i,t=null){return new GV({providers:e,parent:i,debugName:t,runEnvironmentInitializers:!0}).injector}let ch=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Wr(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function S_(e){return!!mM(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function mM(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function Yc(e,i,t){return e[i]=t}function Ss(e,i,t){return!Object.is(e[i],t)&&(e[i]=t,!0)}function Bf(e,i,t,n){const r=Ss(e,i,t);return Ss(e,i+1,n)||r}function Gt(e,i,t,n,r,s,o,l){const w=ye(),C=Nn(),M=e+rn,P=C.firstCreatePass?function jct(e,i,t,n,r,s,o,l,w){const C=i.consts,M=qp(i,e,4,o||null,Uc(C,l));L2(i,t,M,Uc(C,w)),kw(i,M);const P=M.tView=O2(2,M,n,r,s,i.directiveRegistry,i.pipeRegistry,null,i.schemas,C,null);return null!==i.queries&&(i.queries.template(i,M),P.queries=i.queries.embeddedTView(M)),M}(M,C,w,i,t,n,r,s,o):C.data[M];zc(P,!1);const O=HV(C,w,P,e);K0()&&r_(C,w,O,P),to(O,w);const L=P5(O,w,O,P);return w[M]=L,l_(w,L),function gV(e,i,t){return nM(e,i,t)}(L,P,w),Mw(P)&&P2(C,w,P),null!=o&&F2(w,P,l),Gt}let HV=function WV(e,i,t,n){return Gc(!0),i[$i].createComment("")};function Ti(e,i,t,n){const r=ye();return Ss(r,mc(),i)&&(Nn(),Xc(Lr(),r,e,i,t,n)),Ti}function dg(e,i,t,n){return Ss(e,mc(),t)?i+nn(t)+n:an}function hg(e,i,t,n,r,s,o,l){const C=function E_(e,i,t,n,r){const s=Bf(e,i,t,n);return Ss(e,i+2,r)||s}(e,Vd(),t,r,o);return Ud(3),C?i+nn(t)+n+nn(r)+s+nn(o)+l:an}function k_(e,i){return e<<17|i<<2}function uh(e){return e>>17&32767}function CM(e){return 2|e}function Uf(e){return(131068&e)>>2}function SM(e,i){return-131069&e|i<<2}function EM(e){return 1|e}function w8(e,i,t,n){const r=e[t+1],s=null===i;let o=n?uh(r):Uf(r),l=!1;for(;0!==o&&(!1===l||s);){const C=e[o+1];Rdt(e[o],i)&&(l=!0,e[o+1]=n?EM(C):CM(C)),o=n?uh(C):Uf(C)}l&&(e[t+1]=n?CM(r):EM(r))}function Rdt(e,i){return null===e||null==i||(Array.isArray(e)?e[1]:e)===i||!(!Array.isArray(e)||"string"!=typeof i)&&Pp(e,i)>=0}const na={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function _8(e){return e.substring(na.key,na.keyEnd)}function T8(e,i){const t=na.textEnd;return t===i?-1:(i=na.keyEnd=function Odt(e,i,t){for(;i32;)i++;return i}(e,na.key=i,t),xg(e,i,t))}function xg(e,i,t){for(;i=0;t=T8(i,t))ll(e,_8(i),!0)}function pc(e,i,t,n){const r=ye(),s=Nn(),o=Ud(2);s.firstUpdatePass&&M8(s,e,o,n),i!==an&&Ss(r,o,i)&&R8(s,s.data[qa()],r,r[$i],e,r[o+1]=function jdt(e,i){return null==e||""===e||("string"==typeof i?e+=i:"object"==typeof e&&(e=qs(ml(e)))),e}(i,t),n,o)}function gc(e,i,t,n){const r=Nn(),s=Ud(2);r.firstUpdatePass&&M8(r,null,s,n);const o=ye();if(t!==an&&Ss(o,s,t)){const l=r.data[qa()];if(P8(l,n)&&!D8(r,s)){let w=n?l.classesWithoutHost:l.stylesWithoutHost;null!==w&&(t=KA(w,t||"")),AM(r,l,o,t,n)}else!function Xdt(e,i,t,n,r,s,o,l){r===an&&(r=Qn);let w=0,C=0,M=0=e.expandoStartIndex}function M8(e,i,t,n){const r=e.data;if(null===r[t+1]){const s=r[qa()],o=D8(e,t);P8(s,n)&&null===i&&!o&&(i=!1),i=function Vdt(e,i,t,n){const r=ND(e);let s=n?i.residualClasses:i.residualStyles;if(null===r)0===(n?i.classBindings:i.styleBindings)&&(t=Px(t=DM(null,e,i,t,n),i.attrs,n),s=null);else{const o=i.directiveStylingLast;if(-1===o||e[o]!==r)if(t=DM(r,e,i,t,n),null===s){let w=function Udt(e,i,t){const n=t?i.classBindings:i.styleBindings;if(0!==Uf(n))return e[uh(n)]}(e,i,n);void 0!==w&&Array.isArray(w)&&(w=DM(null,e,i,w[1],n),w=Px(w,i.attrs,n),function zdt(e,i,t,n){e[uh(t?i.classBindings:i.styleBindings)]=n}(e,i,n,w))}else s=function Gdt(e,i,t){let n;const r=i.directiveEnd;for(let s=1+i.directiveStylingLast;s0)&&(C=!0)):M=t,r)if(0!==w){const O=uh(e[l+1]);e[n+1]=k_(O,l),0!==O&&(e[O+1]=SM(e[O+1],n)),e[l+1]=function Adt(e,i){return 131071&e|i<<17}(e[l+1],n)}else e[n+1]=k_(l,0),0!==l&&(e[l+1]=SM(e[l+1],n)),l=n;else e[n+1]=k_(w,0),0===l?l=n:e[w+1]=SM(e[w+1],n),w=n;C&&(e[n+1]=CM(e[n+1])),w8(e,M,n,!0),w8(e,M,n,!1),function Idt(e,i,t,n,r){const s=r?e.residualClasses:e.residualStyles;null!=s&&"string"==typeof i&&Pp(s,i)>=0&&(t[n+1]=EM(t[n+1]))}(i,M,e,n,s),o=k_(l,w),s?i.classBindings=o:i.styleBindings=o}(r,s,i,t,o,n)}}function DM(e,i,t,n,r){let s=null;const o=t.directiveEnd;let l=t.directiveStylingLast;for(-1===l?l=t.directiveStart:l++;l0;){const w=e[r],C=Array.isArray(w),M=C?w[1]:w,P=null===M;let O=t[r+1];O===an&&(O=P?Qn:void 0);let L=P?dD(O,n):M===n?O:void 0;if(C&&!P_(L)&&(L=dD(w,n)),P_(L)&&(l=L,o))return l;const U=e[r+1];r=o?uh(U):Uf(U)}if(null!==i){let w=s?i.residualClasses:i.residualStyles;null!=w&&(l=dD(w,n))}return l}function P_(e){return void 0!==e}function P8(e,i){return!!(e.flags&(i?8:16))}class iut{destroy(i){}updateValue(i,t){}swap(i,t){const n=Math.min(i,t),r=Math.max(i,t),s=this.detach(r);if(r-n>1){const o=this.detach(n);this.attach(n,s),this.attach(r,o)}else this.attach(n,s)}move(i,t){this.attach(t,this.detach(i))}}function MM(e,i,t,n,r){return e===t&&Object.is(i,n)?1:Object.is(r(e,i),r(t,n))?-1:0}function IM(e,i,t,n){return!(void 0===i||!i.has(n)||(e.attach(t,i.get(n)),i.delete(n),0))}function O8(e,i,t,n,r){if(IM(e,i,n,t(n,r)))e.updateValue(n,r);else{const s=e.create(n,r);e.attach(n,s)}}function L8(e,i,t,n){const r=new Set;for(let s=i;s<=t;s++)r.add(n(s,e.at(s)));return r}class N8{constructor(){this.kvMap=new Map,this._vMap=void 0}has(i){return this.kvMap.has(i)}delete(i){if(!this.has(i))return!1;const t=this.kvMap.get(i);return void 0!==this._vMap&&this._vMap.has(t)?(this.kvMap.set(i,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(i),!0}get(i){return this.kvMap.get(i)}set(i,t){if(this.kvMap.has(i)){let n=this.kvMap.get(i);void 0===this._vMap&&(this._vMap=new Map);const r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(i,t)}forEach(i){for(let[t,n]of this.kvMap)if(i(n,t),void 0!==this._vMap){const r=this._vMap;for(;r.has(n);)n=r.get(n),i(n,t)}}}function xn(e,i,t){jc("NgControlFlow");const n=ye(),r=mc(),s=RM(n,rn+e);if(Ss(n,r,i)){const l=g(null);try{if(G2(s,0),-1!==i){const w=kM(n[$e],rn+i),C=eg(s,w.tView.ssrId);px(s,mx(n,w,t,{dehydratedView:C}),0,tg(w,C))}}finally{g(l)}}else{const l=B5(s,0);void 0!==l&&(l[Or]=t)}}class rut{constructor(i,t,n){this.lContainer=i,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-Cs}}function F_(e,i){return i}class aut{constructor(i,t,n){this.hasEmptyBlock=i,this.trackByFn=t,this.liveCollection=n}}function O_(e,i,t,n,r,s,o,l,w,C,M,P,O){jc("NgControlFlow");const L=void 0!==w,U=ye(),X=l?o.bind(U[us][Or]):o,W=new aut(L,X);U[rn+e]=W,Gt(e+1,i,t,n,r,s),L&&Gt(e+2,w,C,M,P,O)}class out extends iut{constructor(i,t,n){super(),this.lContainer=i,this.hostLView=t,this.templateTNode=n,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-Cs}at(i){return this.getLView(i)[Or].$implicit}attach(i,t){const n=t[cl];this.needsIndexUpdate||=i!==this.length,px(this.lContainer,t,i,tg(this.templateTNode,n))}detach(i){return this.needsIndexUpdate||=i!==this.length-1,function lut(e,i){return dx(e,i)}(this.lContainer,i)}create(i,t){const n=eg(this.lContainer,this.templateTNode.tView.ssrId);return mx(this.hostLView,this.templateTNode,new rut(this.lContainer,t,i),{dehydratedView:n})}destroy(i){i_(i[$e],i)}updateValue(i,t){this.getLView(i)[Or].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let i=0;i{e.destroy(l)})}(o,e,s.trackByFn),o.updateIndexes(),s.hasEmptyBlock){const l=mc(),w=0===o.length;if(Ss(n,l,w)){const C=t+2,M=RM(n,C);if(w){const P=kM(r,C),O=eg(M,P.tView.ssrId);px(M,mx(n,P,void 0,{dehydratedView:O}),0,tg(P,O))}else G2(M,0)}}}finally{g(i)}}function RM(e,i){return e[i]}function kM(e,i){return j0(e,i)}function tt(e,i,t,n){const r=ye(),s=Nn(),o=rn+e,l=r[$i],w=s.firstCreatePass?function dut(e,i,t,n,r,s){const o=i.consts,w=qp(i,e,2,n,Uc(o,r));return L2(i,t,w,Uc(o,s)),null!==w.attrs&&x_(w,w.attrs,!1),null!==w.mergedAttrs&&x_(w,w.mergedAttrs,!0),null!==i.queries&&i.queries.elementStart(i,w),w}(o,s,r,i,t,n):s.data[o],C=B8(s,r,w,l,i,e);r[o]=C;const M=Mw(w);return zc(w,!0),T5(l,C,w),!function Mx(e){return!(32&~e.flags)}(w)&&K0()&&r_(s,r,C,w),0===function ast(){return Qi.lFrame.elementDepthCount}()&&to(C,r),function ost(){Qi.lFrame.elementDepthCount++}(),M&&(P2(s,r,w),k2(s,w,r)),null!==n&&F2(r,w),tt}function et(){let e=br();FD()?OD():(e=e.parent,zc(e,!1));const i=e;(function cst(e){return Qi.skipHydrationRootTNode===e})(i)&&function fst(){Qi.skipHydrationRootTNode=null}(),function lst(){Qi.lFrame.elementDepthCount--}();const t=Nn();return t.firstCreatePass&&(kw(t,e),CD(e)&&t.queries.elementEnd(e)),null!=i.classesWithoutHost&&function Est(e){return!!(8&e.flags)}(i)&&AM(t,i,ye(),i.classesWithoutHost,!0),null!=i.stylesWithoutHost&&function Ast(e){return!!(16&e.flags)}(i)&&AM(t,i,ye(),i.stylesWithoutHost,!1),et}function we(e,i,t,n){return tt(e,i,t,n),et(),we}let B8=(e,i,t,n,r,s)=>(Gc(!0),e_(n,r,function X3(){return Qi.lFrame.currentNamespace}()));function Wi(e,i,t){const n=ye(),r=Nn(),s=e+rn,o=r.firstCreatePass?function fut(e,i,t,n,r){const s=i.consts,o=Uc(s,n),l=qp(i,e,8,"ng-container",o);return null!==o&&x_(l,o,!0),L2(i,t,l,Uc(s,r)),null!==i.queries&&i.queries.elementStart(i,l),l}(s,r,n,i,t):r.data[s];zc(o,!0);const l=V8(r,n,o,e);return n[s]=l,K0()&&r_(r,n,l,o),to(l,n),Mw(o)&&(P2(r,n,o),k2(r,o,n)),null!=t&&F2(n,o),Wi}function Xi(){let e=br();const i=Nn();return FD()?OD():(e=e.parent,zc(e,!1)),i.firstCreatePass&&(kw(i,e),CD(e)&&i.queries.elementEnd(e)),Xi}function ra(e,i,t){return Wi(e,i,t),Xi(),ra}let V8=(e,i,t,n)=>(Gc(!0),S2(i[$i],""));function ve(){return ye()}function Kc(e,i,t){const n=ye();return Ss(n,mc(),i)&&$o(Nn(),Lr(),n,e,i,n[$i],t,!0),Kc}function N_(e,i,t){const n=ye();if(Ss(n,mc(),i)){const s=Nn(),o=Lr();$o(s,o,n,e,i,N5(ND(s.data),o,n),t,!0)}return N_}const zf=void 0;var vut=["en",[["a","p"],["AM","PM"],zf],[["AM","PM"],zf,zf],[["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"]],zf,[["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"]],zf,[["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}",zf,"{1} 'at' {0}",zf],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function gut(e){const t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];let yg={};function Ro(e){const i=function xut(e){return e.toLowerCase().replace(/_/g,"-")}(e);let t=z8(i);if(t)return t;const n=i.split("-")[0];if(t=z8(n),t)return t;if("en"===n)return vut;throw new ue(701,!1)}function z8(e){return e in yg||(yg[e]=hr.ng&&hr.ng.common&&hr.ng.common.locales&&hr.ng.common.locales[e]),yg[e]}var Br=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}(Br||{});const bg="en-US";let G8=bg;function Vt(e,i,t,n){const r=ye(),s=Nn(),o=br();return OM(s,r,r[$i],o,e,i,n),Vt}function G_(e,i){const t=br(),n=ye(),r=Nn();return OM(r,n,N5(ND(r.data),t,n),t,e,i),G_}function OM(e,i,t,n,r,s,o){const l=Mw(n),C=e.firstCreatePass&&L5(e),M=i[Or],P=O5(i);let O=!0;if(3&n.type||o){const X=Mo(n,i),W=o?o(X):X,Z=P.length,rt=o?vt=>o(Sr(vt[n.index])):n.index;let st=null;if(!o&&l&&(st=function mht(e,i,t,n){const r=e.cleanup;if(null!=r)for(let s=0;sw?l[w]:null}"string"==typeof o&&(s+=2)}return null}(e,i,r,n.index)),null!==st)(st.__ngLastListenerFn__||st).__ngNextListenerFn__=s,st.__ngLastListenerFn__=s,O=!1;else{s=p6(n,i,M,s,!1);const vt=t.listen(W,r,s);P.push(s,vt),C&&C.push(r,rt,Z,Z+1)}}else s=p6(n,i,M,s,!1);const L=n.outputs;let U;if(O&&null!==L&&(U=L[r])){const X=U.length;if(X)for(let W=0;W-1?dl(e.index,i):i);let w=m6(i,t,n,o),C=s.__ngNextListenerFn__;for(;C;)w=m6(i,t,C,o)&&w,C=C.__ngNextListenerFn__;return r&&!1===w&&o.preventDefault(),w}}function Ct(e=1){return function yst(e){return(Qi.lFrame.contextLView=function P3(e,i){for(;e>0;)i=i[Bp],e--;return i}(e,Qi.lFrame.contextLView))[Or]}(e)}function pht(e,i){let t=null;const n=function xrt(e){const i=e.attrs;if(null!=i){const t=i.indexOf(5);if(!(1&t))return i[t+1]}return null}(e);for(let r=0;r(Gc(!0),function C2(e,i){return e.createText(i)}(i[$i],n));function Ze(e){return Ye("",e,""),Ze}function Ye(e,i,t){const n=ye(),r=dg(n,e,i,t);return r!==an&&Hd(n,qa(),r),Ye}function Zc(e,i,t,n,r){const s=ye(),o=function ug(e,i,t,n,r,s){const l=Bf(e,Vd(),t,r);return Ud(2),l?i+nn(t)+n+nn(r)+s:an}(s,e,i,t,n,r);return o!==an&&Hd(s,qa(),o),Zc}function Ux(e,i,t,n,r,s,o){const l=ye(),w=hg(l,e,i,t,n,r,s,o);return w!==an&&Hd(l,qa(),w),Ux}function ba(e,i,t){EV(i)&&(i=i());const n=ye();return Ss(n,mc(),i)&&$o(Nn(),Lr(),n,e,i,n[$i],t,!1),ba}function Na(e,i){const t=EV(e);return t&&e.set(i),t}function wa(e,i){const t=ye(),n=Nn(),r=br();return OM(n,t,t[$i],r,e,i),wa}function LM(e,i,t,n,r){if(e=Hi(e),Array.isArray(e))for(let s=0;s>20;if(Ef(e)||!e.multi){const L=new Z0(C,r,mt),U=BM(w,i,r?M:M+O,P);-1===U?(jD(Lw(l,o),s,w),NM(s,e,i.length),i.push(w),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),t.push(L),o.push(L)):(t[U]=L,o[U]=L)}else{const L=BM(w,i,M+O,P),U=BM(w,i,M,M+O),W=U>=0&&t[U];if(r&&!W||!r&&!(L>=0&&t[L])){jD(Lw(l,o),s,w);const Z=function Fht(e,i,t,n,r){const s=new Z0(e,t,mt);return s.multi=[],s.index=i,s.componentProviders=0,U6(s,r,n&&!t),s}(r?Pht:kht,t.length,r,n,C);!r&&W&&(t[U].providerFactory=Z),NM(s,e,i.length,0),i.push(w),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),t.push(Z),o.push(Z)}else NM(s,e,L>-1?L:U,U6(t[r?U:L],C,!r&&n));!r&&n&&W&&t[U].componentProviders++}}}function NM(e,i,t,n){const r=Ef(i),s=function Rrt(e){return!!e.useClass}(i);if(r||s){const w=(s?Hi(i.useClass):i).prototype.ngOnDestroy;if(w){const C=e.destroyHooks||(e.destroyHooks=[]);if(!r&&i.multi){const M=C.indexOf(t);-1===M?C.push(t,[n,w]):C[M+1].push(n,w)}else C.push(t,w)}}}function U6(e,i,t){return t&&e.componentProviders++,e.multi.push(i)-1}function BM(e,i,t,n){for(let r=t;r{t.providersResolver=(n,r)=>function Rht(e,i,t){const n=Nn();if(n.firstCreatePass){const r=fc(e);LM(t,n.data,n.blueprint,r,!0),LM(i,n.data,n.blueprint,r,!1)}}(n,r?r(e):e,i)}}let Oht=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const n=mD(0,t.type),r=n.length>0?T_([n],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static#t=this.\u0275prov=Ae({token:e,providedIn:"environment",factory:()=>new e(Jt(jo))})}return e})();function Vi(e){jc("NgStandalone"),e.getStandaloneInjector=i=>i.get(Oht).getOrCreateStandaloneInjector(e)}function Ko(e,i,t){const n=Io()+e,r=ye();return r[n]===an?Yc(r,n,t?i.call(t):i()):function Dx(e,i){return e[i]}(r,n)}function vc(e,i,t,n){return G6(ye(),Io(),e,i,t,n)}function UM(e,i,t,n,r){return H6(ye(),Io(),e,i,t,n,r)}function zx(e,i){const t=e[i];return t===an?void 0:t}function G6(e,i,t,n,r,s){const o=i+t;return Ss(e,o,r)?Yc(e,o+1,s?n.call(s,r):n(r)):zx(e,o+1)}function H6(e,i,t,n,r,s,o){const l=i+t;return Bf(e,l,r,s)?Yc(e,l+2,o?n.call(o,r,s):n(r,s)):zx(e,l+2)}function sa(e,i){const t=Nn();let n;const r=e+rn;t.firstCreatePass?(n=function Xht(e,i){if(i)for(let t=i.length-1;t>=0;t--){const n=i[t];if(e===n.name)return n}}(i,t.pipeRegistry),t.data[r]=n,n.onDestroy&&(t.destroyHooks??=[]).push(r,n.onDestroy)):n=t.data[r];const s=n.factory||(n.factory=Cf(n.type)),l=Wo(mt);try{const w=Ow(!1),C=s();return Ow(w),function yht(e,i,t,n){t>=e.data.length&&(e.data[t]=null,e.blueprint[t]=null),i[t]=n}(t,ye(),r,C),C}finally{Wo(l)}}function xc(e,i,t){const n=e+rn,r=ye(),s=zp(r,n);return Gx(r,n)?G6(r,Io(),i,s.transform,t,s):s.transform(t)}function Xd(e,i,t,n){const r=e+rn,s=ye(),o=zp(s,r);return Gx(s,r)?H6(s,Io(),i,o.transform,t,n,o):o.transform(t,n)}function Gx(e,i){return e[$e].data[i].pure}function wg(e,i){return u_(e,i)}let l9=(()=>{class e{log(t){console.log(t)}warn(t){console.warn(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();const f9=new ee(""),Y_=new ee("");let $M,jM=(()=>{class e{constructor(t,n,r){this._ngZone=t,this.registry=n,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,$M||(function zft(e){$M=e}(r),r.addToWindow(n)),this._watchAngularEvents(),t.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:()=>{ii.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb()}});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(n=>!n.updateCb||!n.updateCb(t)||(clearTimeout(n.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,n,r){let s=-1;n&&n>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(o=>o.timeoutId!==s),t()},n)),this._callbacks.push({doneCb:t,timeoutId:s,updateCb:r})}whenStable(t,n,r){if(r&&!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(t,n,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(t){this.registry.registerApplication(t,this)}unregisterApplication(t){this.registry.unregisterApplication(t)}findProviders(t,n,r){return[]}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ii),Jt(YM),Jt(Y_))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})(),YM=(()=>{class e{constructor(){this._applications=new Map}registerApplication(t,n){this._applications.set(t,n)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,n=!0){return $M?.findTestabilityInTree(this,t,n)??null}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})();function Xx(e){return!!e&&"function"==typeof e.then}function m9(e){return!!e&&"function"==typeof e.subscribe}const QM=new ee("");let KM=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,n)=>{this.resolve=t,this.reject=n}),this.appInits=me(QM,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const r of this.appInits){const s=r();if(Xx(s))t.push(s);else if(m9(s)){const o=new Promise((l,w)=>{s.subscribe({complete:l,error:w})});t.push(o)}}const n=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{n()}).catch(r=>{this.reject(r)}),0===t.length&&n(),this.initialized=!0}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const ZM=new ee("");function v9(e,i){return Array.isArray(i)?i.reduce(v9,e):{...e,...i}}let jd=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=me(hB),this.afterRenderEffectManager=me(Tx),this.externalTestViews=new Set,this.beforeRender=new Pe,this.afterTick=new Pe,this.componentTypes=[],this.components=[],this.isStable=me(ch).hasPendingTasks.pipe(Di(t=>!t)),this._injector=me(jo)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(t,n){const r=t instanceof Z5;if(!this._injector.get(KM).done)throw!r&&function eh(e){const i=En(e)||ta(e)||Fa(e);return null!==i&&i.standalone}(t),new ue(405,!1);let o;o=r?t:this._injector.get(Of).resolveComponentFactory(t),this.componentTypes.push(o.componentType);const l=function Gft(e){return e.isBoundToModule}(o)?void 0:this._injector.get(Nf),C=o.create(is.NULL,[],n||o.selector,l),M=C.location.nativeElement,P=C.injector.get(f9,null);return P?.registerApplication(M),C.onDestroy(()=>{this.detachView(C.hostView),$_(this.components,C),P?.unregisterApplication(M)}),this._loadComponent(C),C}tick(){this._tick(!0)}_tick(t){if(this._runningTick)throw new ue(101,!1);const n=g(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(t)}catch(r){this.internalErrorHandler(r)}finally{this.afterTick.next(),this._runningTick=!1,g(n)}}detectChangesInAttachedViews(t){let n=0;const r=this.afterRenderEffectManager;for(;;){if(n===z5)throw new ue(103,!1);if(t){const s=0===n;this.beforeRender.next(s);for(let{_lView:o,notifyErrorHandler:l}of this._views)Wft(o,s,l)}if(n++,r.executeInternalCallbacks(),![...this.externalTestViews.keys(),...this._views].some(({_lView:s})=>JM(s))&&(r.execute(),![...this.externalTestViews.keys(),...this._views].some(({_lView:s})=>JM(s))))break}}attachView(t){const n=t;this._views.push(n),n.attachToAppRef(this)}detachView(t){const n=t;$_(this._views,n),n.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const n=this._injector.get(ZM,[]);[...this._bootstrapListeners,...n].forEach(r=>r(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>$_(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new ue(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function $_(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}function Wft(e,i,t){!i&&!JM(e)||function Xft(e,i,t){let n;t?(n=0,e[Fi]|=1024):n=64&e[Fi]?0:1,d_(e,i,n)}(e,t,i)}function JM(e){return RD(e)}class jft{constructor(i,t){this.ngModuleFactory=i,this.componentFactories=t}}let x9=(()=>{class e{compileModuleSync(t){return new fM(t)}compileModuleAsync(t){return Promise.resolve(this.compileModuleSync(t))}compileModuleAndAllComponentsSync(t){const n=this.compileModuleSync(t),s=pl(Qa(t).declarations).reduce((o,l)=>{const w=En(l);return w&&o.push(new Ex(w)),o},[]);return new jft(n,s)}compileModuleAndAllComponentsAsync(t){return Promise.resolve(this.compileModuleAndAllComponentsSync(t))}clearCache(){}clearCacheFor(t){}getModuleId(t){}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Qft=(()=>{class e{constructor(){this.zone=me(ii),this.applicationRef=me(jd)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Kft(){const e=me(ii),i=me(fl);return t=>e.runOutsideAngular(()=>i.handleError(t))}let Jft=(()=>{class e{constructor(){this.subscription=new Ie,this.initialized=!1,this.zone=me(ii),this.pendingTasks=me(ch)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ii.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ii.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Jc=new ee("",{providedIn:"root",factory:()=>me(Jc,Ln.Optional|Ln.SkipSelf)||function qft(){return typeof $localize<"u"&&$localize.locale||bg}()}),qM=new ee("");let _9=(()=>{class e{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,n){const r=function $lt(e="zone.js",i){return"noop"===e?new nV:"zone.js"===e?new ii(i):e}(n?.ngZone,function w9(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:n?.ngZoneEventCoalescing,runCoalescing:n?.ngZoneRunCoalescing}));return r.run(()=>{const s=function Uct(e,i,t){return new hM(e,i,t)}(t.moduleType,this.injector,function b9(e){return[{provide:ii,useFactory:e},{provide:Sf,multi:!0,useFactory:()=>{const i=me(Qft,{optional:!0});return()=>i.initialize()}},{provide:Sf,multi:!0,useFactory:()=>{const i=me(Jft);return()=>{i.initialize()}}},{provide:hB,useFactory:Kft}]}(()=>r)),o=s.injector.get(fl,null);return r.runOutsideAngular(()=>{const l=r.onError.subscribe({next:w=>{o.handleError(w)}});s.onDestroy(()=>{$_(this._modules,s),l.unsubscribe()})}),function g9(e,i,t){try{const n=t();return Xx(n)?n.catch(r=>{throw i.runOutsideAngular(()=>e.handleError(r)),r}):n}catch(n){throw i.runOutsideAngular(()=>e.handleError(n)),n}}(o,r,()=>{const l=s.injector.get(KM);return l.runInitializers(),l.donePromise.then(()=>(function H8(e){"string"==typeof e&&(G8=e.toLowerCase().replace(/_/g,"-"))}(s.injector.get(Jc,bg)||bg),this._moduleDoBootstrap(s),s))})})}bootstrapModule(t,n=[]){const r=v9({},n);return function $ft(e,i,t){const n=new fM(t);return Promise.resolve(n)}(0,0,t).then(s=>this.bootstrapModuleFactory(s,r))}_moduleDoBootstrap(t){const n=t.injector.get(jd);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(r=>n.bootstrap(r));else{if(!t.instance.ngDoBootstrap)throw new ue(-403,!1);t.instance.ngDoBootstrap(n)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new ue(404,!1);this._modules.slice().forEach(n=>n.destroy()),this._destroyListeners.forEach(n=>n());const t=this._injector.get(qM,null);t&&(t.forEach(n=>n()),t.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(is))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"platform"})}return e})(),fh=null;const T9=new ee("");function C9(e,i,t=[]){const n=`Platform: ${i}`,r=new ee(n);return(s=[])=>{let o=tI();if(!o||o.injector.get(T9,!1)){const l=[...t,...s,{provide:r,useValue:!0}];e?e(l):function imt(e){if(fh&&!fh.get(T9,!1))throw new ue(400,!1);(function p9(){!function J(e){at=e}(()=>{throw new ue(600,!1)})})(),fh=e;const i=e.get(_9);(function E9(e){e.get(FB,null)?.forEach(t=>t())})(e)}(function S9(e=[],i){return is.create({name:i,providers:[{provide:vD,useValue:"platform"},{provide:qM,useValue:new Set([()=>fh=null])},...e]})}(l,n))}return function nmt(e){const i=tI();if(!i)throw new ue(401,!1);return i}()}}function tI(){return fh?.get(_9)??null}let Mn=(()=>{class e{static#t=this.__NG_ELEMENT_ID__=smt}return e})();function smt(e){return function amt(e,i,t){if(Df(e)&&!t){const n=dl(e.index,i);return new xx(n,n)}return 47&e.type?new xx(i[us],i):null}(br(),ye(),!(16&~e))}class R9{constructor(){}supports(i){return S_(i)}create(i){return new umt(i)}}const dmt=(e,i)=>i;class umt{constructor(i){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=i||dmt}forEachItem(i){let t;for(t=this._itHead;null!==t;t=t._next)i(t)}forEachOperation(i){let t=this._itHead,n=this._removalsHead,r=0,s=null;for(;t||n;){const o=!n||t&&t.currentIndex{o=this._trackByFn(r,l),null!==t&&Object.is(t.trackById,o)?(n&&(t=this._verifyReinsertion(t,l,o,r)),Object.is(t.item,l)||this._addIdentityChange(t,l)):(t=this._mismatch(t,l,o,r),n=!0),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=i,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let i;for(i=this._previousItHead=this._itHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._additionsHead;null!==i;i=i._nextAdded)i.previousIndex=i.currentIndex;for(this._additionsHead=this._additionsTail=null,i=this._movesHead;null!==i;i=i._nextMoved)i.previousIndex=i.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(i,t,n,r){let s;return null===i?s=this._itTail:(s=i._prev,this._remove(i)),null!==(i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(i.item,t)||this._addIdentityChange(i,t),this._reinsertAfter(i,s,r)):null!==(i=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(Object.is(i.item,t)||this._addIdentityChange(i,t),this._moveAfter(i,s,r)):i=this._addAfter(new hmt(t,n),s,r),i}_verifyReinsertion(i,t,n,r){let s=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==s?i=this._reinsertAfter(s,i._prev,r):i.currentIndex!=r&&(i.currentIndex=r,this._addToMoves(i,r)),i}_truncate(i){for(;null!==i;){const t=i._next;this._addToRemovals(this._unlink(i)),i=t}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(i,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(i);const r=i._prevRemoved,s=i._nextRemoved;return null===r?this._removalsHead=s:r._nextRemoved=s,null===s?this._removalsTail=r:s._prevRemoved=r,this._insertAfter(i,t,n),this._addToMoves(i,n),i}_moveAfter(i,t,n){return this._unlink(i),this._insertAfter(i,t,n),this._addToMoves(i,n),i}_addAfter(i,t,n){return this._insertAfter(i,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=i:this._additionsTail._nextAdded=i,i}_insertAfter(i,t,n){const r=null===t?this._itHead:t._next;return i._next=r,i._prev=t,null===r?this._itTail=i:r._prev=i,null===t?this._itHead=i:t._next=i,null===this._linkedRecords&&(this._linkedRecords=new k9),this._linkedRecords.put(i),i.currentIndex=n,i}_remove(i){return this._addToRemovals(this._unlink(i))}_unlink(i){null!==this._linkedRecords&&this._linkedRecords.remove(i);const t=i._prev,n=i._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,i}_addToMoves(i,t){return i.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=i:this._movesTail._nextMoved=i),i}_addToRemovals(i){return null===this._unlinkedRecords&&(this._unlinkedRecords=new k9),this._unlinkedRecords.put(i),i.currentIndex=null,i._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=i,i._prevRemoved=null):(i._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=i),i}_addIdentityChange(i,t){return i.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=i:this._identityChangesTail._nextIdentityChange=i,i}}class hmt{constructor(i,t){this.item=i,this.trackById=t,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 fmt{constructor(){this._head=null,this._tail=null}add(i){null===this._head?(this._head=this._tail=i,i._nextDup=null,i._prevDup=null):(this._tail._nextDup=i,i._prevDup=this._tail,i._nextDup=null,this._tail=i)}get(i,t){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Object.is(n.trackById,i))return n;return null}remove(i){const t=i._prevDup,n=i._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}class k9{constructor(){this.map=new Map}put(i){const t=i.trackById;let n=this.map.get(t);n||(n=new fmt,this.map.set(t,n)),n.add(i)}get(i,t){const r=this.map.get(i);return r?r.get(i,t):null}remove(i){const t=i.trackById;return this.map.get(t).remove(i)&&this.map.delete(t),i}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function P9(e,i,t){const n=e.previousIndex;if(null===n)return n;let r=0;return t&&n{if(t&&t.key===r)this._maybeAddToChanges(t,n),this._appendAfter=t,t=t._next;else{const s=this._getOrCreateRecordForKey(r,n);t=this._insertBeforeOrAppend(t,s)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let n=t;null!==n;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(i,t){if(i){const n=i._prev;return t._next=i,t._prev=n,i._prev=t,n&&(n._next=t),i===this._mapHead&&(this._mapHead=t),this._appendAfter=i,i}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(i,t){if(this._records.has(i)){const r=this._records.get(i);this._maybeAddToChanges(r,t);const s=r._prev,o=r._next;return s&&(s._next=o),o&&(o._prev=s),r._next=null,r._prev=null,r}const n=new pmt(i);return this._records.set(i,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let i;for(this._previousMapHead=this._mapHead,i=this._previousMapHead;null!==i;i=i._next)i._nextPrevious=i._next;for(i=this._changesHead;null!==i;i=i._nextChanged)i.previousValue=i.currentValue;for(i=this._additionsHead;null!=i;i=i._nextAdded)i.previousValue=i.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(i,t){Object.is(t,i.currentValue)||(i.previousValue=i.currentValue,i.currentValue=t,this._addToChanges(i))}_addToAdditions(i){null===this._additionsHead?this._additionsHead=this._additionsTail=i:(this._additionsTail._nextAdded=i,this._additionsTail=i)}_addToChanges(i){null===this._changesHead?this._changesHead=this._changesTail=i:(this._changesTail._nextChanged=i,this._changesTail=i)}_forEach(i,t){i instanceof Map?i.forEach(t):Object.keys(i).forEach(n=>t(i[n],n))}}class pmt{constructor(i){this.key=i,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 O9(){return new mh([new R9])}let mh=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:O9});constructor(t){this.factories=t}static create(t,n){if(null!=n){const r=n.factories.slice();t=t.concat(r)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>e.create(t,n||O9()),deps:[[e,new Tf,new Nd]]}}find(t){const n=this.factories.find(r=>r.supports(t));if(null!=n)return n;throw new ue(901,!1)}}return e})();function L9(){return new J_([new F9])}let J_=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:L9});constructor(t){this.factories=t}static create(t,n){if(n){const r=n.factories.slice();t=t.concat(r)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>e.create(t,n||L9()),deps:[[e,new Tf,new Nd]]}}find(t){const n=this.factories.find(r=>r.supports(t));if(n)return n;throw new ue(901,!1)}}return e})();const xmt=C9(null,"core",[]);let ymt=(()=>{class e{constructor(t){}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(jd))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();function Je(e){return"boolean"==typeof e?e:null!=e&&"false"!==e}function jr(e,i=NaN){return isNaN(parseFloat(e))||isNaN(Number(e))?i:Number(e)}function rU(e){const i=g(null);try{return e()}finally{g(i)}}const Qmt=new ee("",{providedIn:"root",factory:()=>me(Kmt)});let Kmt=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>new Zmt})}return e})();class Zmt{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=me(ch),this.taskId=null}scheduleEffect(i){if(this.enqueue(i),null===this.taskId){const t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(i){const t=i.creationZone;this.queues.has(t)||this.queues.set(t,new Set);const n=this.queues.get(t);n.has(i)||(this.queuedEffectCount++,n.add(i))}flush(){for(;this.queuedEffectCount>0;)for(const[i,t]of this.queues)null===i?this.flushQueue(t):i.run(()=>this.flushQueue(t))}flushQueue(i){for(const t of i)i.delete(t),this.queuedEffectCount--,t.run()}}class Jmt{constructor(i,t,n,r,s,o){this.scheduler=i,this.effectFn=t,this.creationZone=n,this.injector=s,this.watcher=function Bt(e,i,t){const n=Object.create($t);t&&(n.consumerAllowSignalWrites=!0),n.fn=e,n.schedule=i;const r=w=>{n.cleanupFn=w};return n.ref={notify:()=>y(n),run:()=>{if(null===n.fn)return;if(function h(){return a}())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(n.dirty=!1,n.hasRun&&!A(n))return;n.hasRun=!0;const w=_(n);try{n.cleanupFn(),n.cleanupFn=Yt,n.fn(r)}finally{E(n,w)}},cleanup:()=>n.cleanupFn(),destroy:()=>function o(w){(function s(w){return null===w.fn&&null===w.schedule})(w)||(D(w),w.cleanupFn(),w.fn=null,w.schedule=null,w.cleanupFn=Yt)}(n),[T]:n},n.ref}(l=>this.runEffect(l),()=>this.schedule(),o),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(i){try{this.effectFn(i)}catch(t){this.injector.get(fl,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}}let aU=null;function ph(){return aU}class ept{}const Ni=new ee("");let oI=(()=>{class e{historyGo(t){throw new Error("")}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(npt),providedIn:"platform"})}return e})();const ipt=new ee("");let npt=(()=>{class e extends oI{constructor(){super(),this._doc=me(Ni),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ph().getBaseHref(this._doc)}onPopState(t){const n=ph().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",t,!1),()=>n.removeEventListener("popstate",t)}onHashChange(t){const n=ph().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",t,!1),()=>n.removeEventListener("hashchange",t)}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(t){this._location.pathname=t}pushState(t,n,r){this._history.pushState(t,n,r)}replaceState(t,n,r){this._history.replaceState(t,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>new e,providedIn:"platform"})}return e})();function lI(e,i){if(0==e.length)return i;if(0==i.length)return e;let t=0;return e.endsWith("/")&&t++,i.startsWith("/")&&t++,2==t?e+i.substring(1):1==t?e+i:e+"/"+i}function oU(e){const i=e.match(/#|\?|$/),t=i&&i.index||e.length;return e.slice(0,t-("/"===e[t-1]?1:0))+e.slice(t)}function Yd(e){return e&&"?"!==e[0]?"?"+e:e}let Wf=(()=>{class e{historyGo(t){throw new Error("")}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(cU),providedIn:"root"})}return e})();const lU=new ee("");let cU=(()=>{class e extends Wf{constructor(t,n){super(),this._platformLocation=t,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??me(Ni).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return lI(this._baseHref,t)}path(t=!1){const n=this._platformLocation.pathname+Yd(this._platformLocation.search),r=this._platformLocation.hash;return r&&t?`${n}${r}`:n}pushState(t,n,r,s){const o=this.prepareExternalUrl(r+Yd(s));this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){const o=this.prepareExternalUrl(r+Yd(s));this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(oI),Jt(lU,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),rpt=(()=>{class e extends Wf{constructor(t,n){super(),this._platformLocation=t,this._baseHref="",this._removeListenerFns=[],null!=n&&(this._baseHref=n)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(t){this._removeListenerFns.push(this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t))}getBaseHref(){return this._baseHref}path(t=!1){const n=this._platformLocation.hash??"#";return n.length>0?n.substring(1):n}prepareExternalUrl(t){const n=lI(this._baseHref,t);return n.length>0?"#"+n:n}pushState(t,n,r,s){let o=this.prepareExternalUrl(r+Yd(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,n,o)}replaceState(t,n,r,s){let o=this.prepareExternalUrl(r+Yd(s));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,n,o)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(t=0){this._platformLocation.historyGo?.(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(oI),Jt(lU,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})(),Xf=(()=>{class e{constructor(t){this._subject=new De,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=t;const n=this._locationStrategy.getBaseHref();this._basePath=function opt(e){if(new RegExp("^(https?:)?//").test(e)){const[,t]=e.split(/\/\/[^\/]+/);return t}return e}(oU(dU(n))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(t=!1){return this.normalize(this._locationStrategy.path(t))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(t,n=""){return this.path()==this.normalize(t+Yd(n))}normalize(t){return e.stripTrailingSlash(function apt(e,i){if(!e||!i.startsWith(e))return i;const t=i.substring(e.length);return""===t||["/",";","?","#"].includes(t[0])?t:i}(this._basePath,dU(t)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._locationStrategy.prepareExternalUrl(t)}go(t,n="",r=null){this._locationStrategy.pushState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Yd(n)),r)}replaceState(t,n="",r=null){this._locationStrategy.replaceState(r,"",t,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Yd(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(t=0){this._locationStrategy.historyGo?.(t)}onUrlChange(t){return this._urlChangeListeners.push(t),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{const n=this._urlChangeListeners.indexOf(t);this._urlChangeListeners.splice(n,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(t="",n){this._urlChangeListeners.forEach(r=>r(t,n))}subscribe(t,n,r){return this._subject.subscribe({next:t,error:n,complete:r})}static#t=this.normalizeQueryParams=Yd;static#e=this.joinWithSlash=lI;static#i=this.stripTrailingSlash=oU;static#n=this.\u0275fac=function(n){return new(n||e)(Jt(Wf))};static#r=this.\u0275prov=Ae({token:e,factory:()=>function spt(){return new Xf(Jt(Wf))}(),providedIn:"root"})}return e})();function dU(e){return e.replace(/\/index.html$/,"")}var rT=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(rT||{}),Po=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Po||{}),Rr=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(Rr||{}),vl=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(vl||{});const Ws={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};function sT(e,i){return Bl(Ro(e)[Br.DateFormat],i)}function aT(e,i){return Bl(Ro(e)[Br.TimeFormat],i)}function oT(e,i){return Bl(Ro(e)[Br.DateTimeFormat],i)}function Nl(e,i){const t=Ro(e),n=t[Br.NumberSymbols][i];if(typeof n>"u"){if(i===Ws.CurrencyDecimal)return t[Br.NumberSymbols][Ws.Decimal];if(i===Ws.CurrencyGroup)return t[Br.NumberSymbols][Ws.Group]}return n}function hU(e){if(!e[Br.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[Br.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Bl(e,i){for(let t=i;t>-1;t--)if(typeof e[t]<"u")return e[t];throw new Error("Locale data API: locale data undefined")}function dI(e){const[i,t]=e.split(":");return{hours:+i,minutes:+t}}const wpt=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,lT={},_pt=/((?:[^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 $d=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}($d||{}),or=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}(or||{}),lr=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(lr||{});function Tpt(e,i,t,n){let r=function kpt(e){if(pU(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){if(e=e.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(e)){const[r,s=1,o=1]=e.split("-").map(l=>+l);return cT(r,s-1,o)}const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);let n;if(n=e.match(wpt))return function Ppt(e){const i=new Date(0);let t=0,n=0;const r=e[8]?i.setUTCFullYear:i.setFullYear,s=e[8]?i.setUTCHours:i.setHours;e[9]&&(t=Number(e[9]+e[10]),n=Number(e[9]+e[11])),r.call(i,Number(e[1]),Number(e[2])-1,Number(e[3]));const o=Number(e[4]||0)-t,l=Number(e[5]||0)-n,w=Number(e[6]||0),C=Math.floor(1e3*parseFloat("0."+(e[7]||0)));return s.call(i,o,l,w,C),i}(n)}const i=new Date(e);if(!pU(i))throw new Error(`Unable to convert "${e}" into a date`);return i}(e);i=Qd(t,i)||i;let l,o=[];for(;i;){if(l=_pt.exec(i),!l){o.push(i);break}{o=o.concat(l.slice(1));const M=o.pop();if(!M)break;i=M}}let w=r.getTimezoneOffset();n&&(w=mU(n,w),r=function Rpt(e,i,t){const n=t?-1:1,r=e.getTimezoneOffset();return function Ipt(e,i){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+i),e}(e,n*(mU(i,r)-r))}(r,n,!0));let C="";return o.forEach(M=>{const P=function Mpt(e){if(hI[e])return hI[e];let i;switch(e){case"G":case"GG":case"GGG":i=Vr(lr.Eras,Rr.Abbreviated);break;case"GGGG":i=Vr(lr.Eras,Rr.Wide);break;case"GGGGG":i=Vr(lr.Eras,Rr.Narrow);break;case"y":i=Xs(or.FullYear,1,0,!1,!0);break;case"yy":i=Xs(or.FullYear,2,0,!0,!0);break;case"yyy":i=Xs(or.FullYear,3,0,!1,!0);break;case"yyyy":i=Xs(or.FullYear,4,0,!1,!0);break;case"Y":i=fT(1);break;case"YY":i=fT(2,!0);break;case"YYY":i=fT(3);break;case"YYYY":i=fT(4);break;case"M":case"L":i=Xs(or.Month,1,1);break;case"MM":case"LL":i=Xs(or.Month,2,1);break;case"MMM":i=Vr(lr.Months,Rr.Abbreviated);break;case"MMMM":i=Vr(lr.Months,Rr.Wide);break;case"MMMMM":i=Vr(lr.Months,Rr.Narrow);break;case"LLL":i=Vr(lr.Months,Rr.Abbreviated,Po.Standalone);break;case"LLLL":i=Vr(lr.Months,Rr.Wide,Po.Standalone);break;case"LLLLL":i=Vr(lr.Months,Rr.Narrow,Po.Standalone);break;case"w":i=uI(1);break;case"ww":i=uI(2);break;case"W":i=uI(1,!0);break;case"d":i=Xs(or.Date,1);break;case"dd":i=Xs(or.Date,2);break;case"c":case"cc":i=Xs(or.Day,1);break;case"ccc":i=Vr(lr.Days,Rr.Abbreviated,Po.Standalone);break;case"cccc":i=Vr(lr.Days,Rr.Wide,Po.Standalone);break;case"ccccc":i=Vr(lr.Days,Rr.Narrow,Po.Standalone);break;case"cccccc":i=Vr(lr.Days,Rr.Short,Po.Standalone);break;case"E":case"EE":case"EEE":i=Vr(lr.Days,Rr.Abbreviated);break;case"EEEE":i=Vr(lr.Days,Rr.Wide);break;case"EEEEE":i=Vr(lr.Days,Rr.Narrow);break;case"EEEEEE":i=Vr(lr.Days,Rr.Short);break;case"a":case"aa":case"aaa":i=Vr(lr.DayPeriods,Rr.Abbreviated);break;case"aaaa":i=Vr(lr.DayPeriods,Rr.Wide);break;case"aaaaa":i=Vr(lr.DayPeriods,Rr.Narrow);break;case"b":case"bb":case"bbb":i=Vr(lr.DayPeriods,Rr.Abbreviated,Po.Standalone,!0);break;case"bbbb":i=Vr(lr.DayPeriods,Rr.Wide,Po.Standalone,!0);break;case"bbbbb":i=Vr(lr.DayPeriods,Rr.Narrow,Po.Standalone,!0);break;case"B":case"BB":case"BBB":i=Vr(lr.DayPeriods,Rr.Abbreviated,Po.Format,!0);break;case"BBBB":i=Vr(lr.DayPeriods,Rr.Wide,Po.Format,!0);break;case"BBBBB":i=Vr(lr.DayPeriods,Rr.Narrow,Po.Format,!0);break;case"h":i=Xs(or.Hours,1,-12);break;case"hh":i=Xs(or.Hours,2,-12);break;case"H":i=Xs(or.Hours,1);break;case"HH":i=Xs(or.Hours,2);break;case"m":i=Xs(or.Minutes,1);break;case"mm":i=Xs(or.Minutes,2);break;case"s":i=Xs(or.Seconds,1);break;case"ss":i=Xs(or.Seconds,2);break;case"S":i=Xs(or.FractionalSeconds,1);break;case"SS":i=Xs(or.FractionalSeconds,2);break;case"SSS":i=Xs(or.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":i=uT($d.Short);break;case"ZZZZZ":i=uT($d.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":i=uT($d.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":i=uT($d.Long);break;default:return null}return hI[e]=i,i}(M);C+=P?P(r,t,w):"''"===M?"'":M.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),C}function cT(e,i,t){const n=new Date(0);return n.setFullYear(e,i,t),n.setHours(0,0,0),n}function Qd(e,i){const t=function cpt(e){return Ro(e)[Br.LocaleId]}(e);if(lT[t]??={},lT[t][i])return lT[t][i];let n="";switch(i){case"shortDate":n=sT(e,vl.Short);break;case"mediumDate":n=sT(e,vl.Medium);break;case"longDate":n=sT(e,vl.Long);break;case"fullDate":n=sT(e,vl.Full);break;case"shortTime":n=aT(e,vl.Short);break;case"mediumTime":n=aT(e,vl.Medium);break;case"longTime":n=aT(e,vl.Long);break;case"fullTime":n=aT(e,vl.Full);break;case"short":const r=Qd(e,"shortTime"),s=Qd(e,"shortDate");n=dT(oT(e,vl.Short),[r,s]);break;case"medium":const o=Qd(e,"mediumTime"),l=Qd(e,"mediumDate");n=dT(oT(e,vl.Medium),[o,l]);break;case"long":const w=Qd(e,"longTime"),C=Qd(e,"longDate");n=dT(oT(e,vl.Long),[w,C]);break;case"full":const M=Qd(e,"fullTime"),P=Qd(e,"fullDate");n=dT(oT(e,vl.Full),[M,P])}return n&&(lT[t][i]=n),n}function dT(e,i){return i&&(e=e.replace(/\{([^}]+)}/g,function(t,n){return null!=i&&n in i?i[n]:t})),e}function yc(e,i,t="-",n,r){let s="";(e<0||r&&e<=0)&&(r?e=1-e:(e=-e,s=t));let o=String(e);for(;o.length0||l>-t)&&(l+=t),e===or.Hours)0===l&&-12===t&&(l=12);else if(e===or.FractionalSeconds)return function Cpt(e,i){return yc(e,3).substring(0,i)}(l,i);const w=Nl(o,Ws.MinusSign);return yc(l,i,w,n,r)}}function Vr(e,i,t=Po.Format,n=!1){return function(r,s){return function Ept(e,i,t,n,r,s){switch(t){case lr.Months:return function hpt(e,i,t){const n=Ro(e),s=Bl([n[Br.MonthsFormat],n[Br.MonthsStandalone]],i);return Bl(s,t)}(i,r,n)[e.getMonth()];case lr.Days:return function upt(e,i,t){const n=Ro(e),s=Bl([n[Br.DaysFormat],n[Br.DaysStandalone]],i);return Bl(s,t)}(i,r,n)[e.getDay()];case lr.DayPeriods:const o=e.getHours(),l=e.getMinutes();if(s){const C=function gpt(e){const i=Ro(e);return hU(i),(i[Br.ExtraData][2]||[]).map(n=>"string"==typeof n?dI(n):[dI(n[0]),dI(n[1])])}(i),M=function vpt(e,i,t){const n=Ro(e);hU(n);const s=Bl([n[Br.ExtraData][0],n[Br.ExtraData][1]],i)||[];return Bl(s,t)||[]}(i,r,n),P=C.findIndex(O=>{if(Array.isArray(O)){const[L,U]=O,X=o>=L.hours&&l>=L.minutes,W=o0?Math.floor(r/60):Math.ceil(r/60);switch(e){case $d.Short:return(r>=0?"+":"")+yc(o,2,s)+yc(Math.abs(r%60),2,s);case $d.ShortGMT:return"GMT"+(r>=0?"+":"")+yc(o,1,s);case $d.Long:return"GMT"+(r>=0?"+":"")+yc(o,2,s)+":"+yc(Math.abs(r%60),2,s);case $d.Extended:return 0===n?"Z":(r>=0?"+":"")+yc(o,2,s)+":"+yc(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}const Apt=0,hT=4;function fU(e){const i=e.getDay(),t=0===i?-3:hT-i;return cT(e.getFullYear(),e.getMonth(),e.getDate()+t)}function uI(e,i=!1){return function(t,n){let r;if(i){const s=new Date(t.getFullYear(),t.getMonth(),1).getDay()-1,o=t.getDate();r=1+Math.floor((o+s)/7)}else{const s=fU(t),o=function Dpt(e){const i=cT(e,Apt,1).getDay();return cT(e,0,1+(i<=hT?hT:hT+7)-i)}(s.getFullYear()),l=s.getTime()-o.getTime();r=1+Math.round(l/6048e5)}return yc(r,e,Nl(n,Ws.MinusSign))}}function fT(e,i=!1){return function(t,n){return yc(fU(t).getFullYear(),e,Nl(n,Ws.MinusSign),i)}}const hI={};function mU(e,i){e=e.replace(/:/g,"");const t=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(t)?i:t}function pU(e){return e instanceof Date&&!isNaN(e.valueOf())}const Fpt=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function gI(e){const i=parseInt(e);if(isNaN(i))throw new Error("Invalid integer literal when parsing "+e);return i}function yU(e,i){i=encodeURIComponent(i);for(const t of e.split(";")){const n=t.indexOf("="),[r,s]=-1==n?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===i)return decodeURIComponent(s)}return null}const xI=/\s+/,bU=[];let bc=(()=>{class e{constructor(t,n){this._ngEl=t,this._renderer=n,this.initialClasses=bU,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(xI):bU}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(xI):t}ngDoCheck(){for(const n of this.initialClasses)this._updateState(n,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const n of t)this._updateState(n,!0);else if(null!=t)for(const n of Object.keys(t))this._updateState(n,!!t[n]);this._applyStateDiff()}_updateState(t,n){const r=this.stateMap.get(t);void 0!==r?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(t,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const n=t[0],r=t[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(t,n){(t=t.trim()).length>0&&t.split(xI).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Wd))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngClass",""]],inputs:{klass:[Wt.None,"class","klass"],ngClass:"ngClass"},standalone:!0})}return e})();class jpt{constructor(i,t,n,r){this.$implicit=i,this.ngForOf=t,this.index=n,this.count=r}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}}let gs=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,n,r){this._viewContainer=t,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const n=this._viewContainer;t.forEachOperation((r,s,o)=>{if(null==r.previousIndex)n.createEmbeddedView(this._template,new jpt(r.item,this._ngForOf,-1,-1),null===o?void 0:o);else if(null==o)n.remove(null===s?void 0:s);else if(null!==s){const l=n.get(s);n.move(l,o),_U(l,r)}});for(let r=0,s=n.length;r{_U(n.get(r.currentIndex),r)})}static ngTemplateContextGuard(t,n){return!0}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(fr),mt(mh))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}return e})();function _U(e,i){e.context.$implicit=i.item}let Ms=(()=>{class e{constructor(t,n){this._viewContainer=t,this._context=new Ypt,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){TU("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){TU("ngIfElse",t),this._elseTemplateRef=t,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(t,n){return!0}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}return e})();class Ypt{constructor(){this.$implicit=null,this.ngIf=null}}function TU(e,i){if(i&&!i.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${qs(i)}'.`)}let pT=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,n,r)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,n,r),get:(t,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[tr]})}return e})();function wc(e,i){return new ue(2100,!1)}class qpt{createSubscription(i,t){return rU(()=>i.subscribe({next:t,error:n=>{throw n}}))}dispose(i){rU(()=>i.unsubscribe())}}class tgt{createSubscription(i,t){return i.then(t,n=>{throw n})}dispose(i){}}const egt=new tgt,igt=new qpt;let wI=(()=>{class e{constructor(t){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(t){if(!this._obj){if(t)try{this.markForCheckOnValueUpdate=!1,this._subscribe(t)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue}_subscribe(t){this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,n=>this._updateLatestValue(t,n))}_selectStrategy(t){if(Xx(t))return egt;if(m9(t))return igt;throw wc()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(t,n){t===this._obj&&(this._latestValue=n,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn,16))};static#e=this.\u0275pipe=$a({name:"async",type:e,pure:!1,standalone:!0})}return e})();const rgt=/(?:[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;let SU=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw wc();return t.replace(rgt,n=>n[0].toUpperCase()+n.slice(1).toLowerCase())}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"titlecase",type:e,pure:!0,standalone:!0})}return e})(),_I=(()=>{class e{transform(t){if(null==t)return null;if("string"!=typeof t)throw wc();return t.toUpperCase()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"uppercase",type:e,pure:!0,standalone:!0})}return e})();const agt=new ee(""),ogt=new ee("");let gh=(()=>{class e{constructor(t,n,r){this.locale=t,this.defaultTimezone=n,this.defaultOptions=r}transform(t,n,r,s){if(null==t||""===t||t!=t)return null;try{return Tpt(t,n??this.defaultOptions?.dateFormat??"mediumDate",s||this.locale,r??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(o){throw wc()}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Jc,16),mt(agt,24),mt(ogt,24))};static#e=this.\u0275pipe=$a({name:"date",type:e,pure:!0,standalone:!0})}return e})(),EU=(()=>{class e{constructor(t){this.differs=t,this.keyValues=[],this.compareFn=AU}transform(t,n=AU){if(!t||!(t instanceof Map)&&"object"!=typeof t)return null;this.differ??=this.differs.find(t).create();const r=this.differ.diff(t),s=n!==this.compareFn;return r&&(this.keyValues=[],r.forEachItem(o=>{this.keyValues.push(function hgt(e,i){return{key:e,value:i}}(o.key,o.currentValue))})),(r||s)&&(this.keyValues.sort(n),this.compareFn=n),this.keyValues}static#t=this.\u0275fac=function(n){return new(n||e)(mt(J_,16))};static#e=this.\u0275pipe=$a({name:"keyvalue",type:e,pure:!1,standalone:!0})}return e})();function AU(e,i){const t=e.key,n=i.key;if(t===n)return 0;if(void 0===t)return 1;if(void 0===n)return-1;if(null===t)return 1;if(null===n)return-1;if("string"==typeof t&&"string"==typeof n)return t{class e{constructor(t){this._locale=t}transform(t,n,r){if(!function TI(e){return!(null==e||""===e||e!=e)}(t))return null;r||=this._locale;try{return function Upt(e,i,t){return function mI(e,i,t,n,r,s,o=!1){let l="",w=!1;if(isFinite(e)){let C=function Gpt(e){let n,r,s,o,l,i=Math.abs(e)+"",t=0;for((r=i.indexOf("."))>-1&&(i=i.replace(".","")),(s=i.search(/e/i))>0?(r<0&&(r=s),r+=+i.slice(s+1),i=i.substring(0,s)):r<0&&(r=i.length),s=0;"0"===i.charAt(s);s++);if(s===(l=i.length))n=[0],r=1;else{for(l--;"0"===i.charAt(l);)l--;for(r-=s,n=[],o=0;s<=l;s++,o++)n[o]=Number(i.charAt(s))}return r>22&&(n=n.splice(0,21),t=r-1,r=1),{digits:n,exponent:t,integerLen:r}}(e);o&&(C=function zpt(e){if(0===e.digits[0])return e;const i=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===i?e.digits.push(0,0):1===i&&e.digits.push(0),e.integerLen+=2),e}(C));let M=i.minInt,P=i.minFrac,O=i.maxFrac;if(s){const rt=s.match(Fpt);if(null===rt)throw new Error(`${s} is not a valid digit info`);const st=rt[1],vt=rt[3],_t=rt[5];null!=st&&(M=gI(st)),null!=vt&&(P=gI(vt)),null!=_t?O=gI(_t):null!=vt&&P>O&&(O=P)}!function Hpt(e,i,t){if(i>t)throw new Error(`The minimum number of digits after fraction (${i}) is higher than the maximum (${t}).`);let n=e.digits,r=n.length-e.integerLen;const s=Math.min(Math.max(i,r),t);let o=s+e.integerLen,l=n[o];if(o>0){n.splice(Math.max(e.integerLen,o));for(let P=o;P=5)if(o-1<0){for(let P=0;P>o;P--)n.unshift(0),e.integerLen++;n.unshift(1),e.integerLen++}else n[o-1]++;for(;r=C?U.pop():w=!1),O>=10?1:0},0);M&&(n.unshift(M),e.integerLen++)}(C,P,O);let L=C.digits,U=C.integerLen;const X=C.exponent;let W=[];for(w=L.every(rt=>!rt);U0?W=L.splice(U,L.length):(W=L,L=[0]);const Z=[];for(L.length>=i.lgSize&&Z.unshift(L.splice(-i.lgSize,L.length).join(""));L.length>i.gSize;)Z.unshift(L.splice(-i.gSize,L.length).join(""));L.length&&Z.unshift(L.join("")),l=Z.join(Nl(t,n)),W.length&&(l+=Nl(t,r)+W.join("")),X&&(l+=Nl(t,Ws.Exponential)+"+"+X)}else l=Nl(t,Ws.Infinity);return l=e<0&&!w?i.negPre+l+i.negSuf:i.posPre+l+i.posSuf,l}(e,function pI(e,i="-"){const t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=e.split(";"),r=n[0],s=n[1],o=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],l=o[0],w=o[1]||"";t.posPre=l.substring(0,l.indexOf("#"));for(let M=0;M{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const MU="browser";function IU(e){return e===MU}function RU(e){return"server"===e}let xgt=(()=>{class e{static#t=this.\u0275prov=Ae({token:e,providedIn:"root",factory:()=>IU(me(zd))?new ygt(me(Ni),window):new wgt})}return e})();class ygt{constructor(i,t){this.document=i,this.window=t,this.offset=()=>[0,0]}setOffset(i){this.offset=Array.isArray(i)?()=>i:i}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(i){this.window.scrollTo(i[0],i[1])}scrollToAnchor(i){const t=function bgt(e,i){const t=e.getElementById(i)||e.getElementsByName(i)[0];if(t)return t;if("function"==typeof e.createTreeWalker&&e.body&&"function"==typeof e.body.attachShadow){const n=e.createTreeWalker(e.body,NodeFilter.SHOW_ELEMENT);let r=n.currentNode;for(;r;){const s=r.shadowRoot;if(s){const o=s.getElementById(i)||s.querySelector(`[name="${i}"]`);if(o)return o}r=n.nextNode()}}return null}(this.document,i);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(i){this.window.history.scrollRestoration=i}scrollToElement(i){const t=i.getBoundingClientRect(),n=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,s=this.offset();this.window.scrollTo(n-s[0],r-s[1])}}class wgt{setOffset(i){}getScrollPosition(){return[0,0]}scrollToPosition(i){}scrollToAnchor(i){}setHistoryScrollRestoration(i){}}class kU{}class Qgt extends ept{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class EI extends Qgt{static makeCurrent(){!function tpt(e){aU??=e}(new EI)}onAndCancel(i,t,n){return i.addEventListener(t,n),()=>{i.removeEventListener(t,n)}}dispatchEvent(i,t){i.dispatchEvent(t)}remove(i){i.parentNode&&i.parentNode.removeChild(i)}createElement(i,t){return(t=t||this.getDefaultDocument()).createElement(i)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(i){return i.nodeType===Node.ELEMENT_NODE}isShadowRoot(i){return i instanceof DocumentFragment}getGlobalEventTarget(i,t){return"window"===t?window:"document"===t?i:"body"===t?i.body:null}getBaseHref(i){const t=function Kgt(){return Zx=Zx||document.querySelector("base"),Zx?Zx.getAttribute("href"):null}();return null==t?null:function Zgt(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){Zx=null}getUserAgent(){return window.navigator.userAgent}getCookie(i){return yU(document.cookie,i)}}let Zx=null,qgt=(()=>{class e{build(){return new XMLHttpRequest}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const AI=new ee("");let zU=(()=>{class e{constructor(t,n){this._zone=n,this._eventNameToPlugin=new Map,t.forEach(r=>{r.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,n,r){return this._findPluginFor(n).addEventListener(t,n,r)}getZone(){return this._zone}_findPluginFor(t){let n=this._eventNameToPlugin.get(t);if(n)return n;if(n=this._plugins.find(s=>s.supports(t)),!n)throw new ue(5101,!1);return this._eventNameToPlugin.set(t,n),n}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(AI),Jt(ii))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();class GU{constructor(i){this._doc=i}}const DI="ng-app-id";let HU=(()=>{class e{constructor(t,n,r,s={}){this.doc=t,this.appId=n,this.nonce=r,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=RU(s),this.resetHostNodes()}addStyles(t){for(const n of t)1===this.changeUsageCount(n,1)&&this.onStyleAdded(n)}removeStyles(t){for(const n of t)this.changeUsageCount(n,-1)<=0&&this.onStyleRemoved(n)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(n=>n.remove()),t.clear());for(const n of this.getAllStyles())this.onStyleRemoved(n);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const n of this.getAllStyles())this.addStyleToHost(t,n)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const n of this.hostNodes)this.addStyleToHost(n,t)}onStyleRemoved(t){const n=this.styleRef;n.get(t)?.elements?.forEach(r=>r.remove()),n.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${DI}="${this.appId}"]`);if(t?.length){const n=new Map;return t.forEach(r=>{null!=r.textContent&&n.set(r.textContent,r)}),n}return null}changeUsageCount(t,n){const r=this.styleRef;if(r.has(t)){const s=r.get(t);return s.usage+=n,s.usage}return r.set(t,{usage:n,elements:[]}),n}getStyleElement(t,n){const r=this.styleNodesInDOM,s=r?.get(n);if(s?.parentNode===t)return r.delete(n),s.removeAttribute(DI),s;{const o=this.doc.createElement("style");return this.nonce&&o.setAttribute("nonce",this.nonce),o.textContent=n,this.platformIsServer&&o.setAttribute(DI,this.appId),t.appendChild(o),o}}addStyleToHost(t,n){const r=this.getStyleElement(t,n),s=this.styleRef,o=s.get(n)?.elements;o?o.push(r):s.set(n,{elements:[r],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ix),Jt(e2,8),Jt(zd))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const MI={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/MathML/"},II=/%COMP%/g,nvt=new ee("",{providedIn:"root",factory:()=>!0});function XU(e,i){return i.map(t=>t.replace(II,e))}let RI=(()=>{class e{constructor(t,n,r,s,o,l,w,C=null){this.eventManager=t,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=s,this.doc=o,this.platformId=l,this.ngZone=w,this.nonce=C,this.rendererByCompId=new Map,this.platformIsServer=RU(l),this.defaultRenderer=new kI(t,o,w,this.platformIsServer)}createRenderer(t,n){if(!t||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===cc.ShadowDom&&(n={...n,encapsulation:cc.Emulated});const r=this.getOrCreateRenderer(t,n);return r instanceof YU?r.applyToHost(t):r instanceof PI&&r.applyStyles(),r}getOrCreateRenderer(t,n){const r=this.rendererByCompId;let s=r.get(n.id);if(!s){const o=this.doc,l=this.ngZone,w=this.eventManager,C=this.sharedStylesHost,M=this.removeStylesOnCompDestroy,P=this.platformIsServer;switch(n.encapsulation){case cc.Emulated:s=new YU(w,C,n,this.appId,M,o,l,P);break;case cc.ShadowDom:return new ovt(w,C,t,n,o,l,this.nonce,P);default:s=new PI(w,C,n,M,o,l,P)}r.set(n.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(zU),Jt(HU),Jt(ix),Jt(nvt),Jt(Ni),Jt(zd),Jt(ii),Jt(e2))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();class kI{constructor(i,t,n,r){this.eventManager=i,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(i,t){return t?this.doc.createElementNS(MI[t]||t,i):this.doc.createElement(i)}createComment(i){return this.doc.createComment(i)}createText(i){return this.doc.createTextNode(i)}appendChild(i,t){(jU(i)?i.content:i).appendChild(t)}insertBefore(i,t,n){i&&(jU(i)?i.content:i).insertBefore(t,n)}removeChild(i,t){i&&i.removeChild(t)}selectRootElement(i,t){let n="string"==typeof i?this.doc.querySelector(i):i;if(!n)throw new ue(-5104,!1);return t||(n.textContent=""),n}parentNode(i){return i.parentNode}nextSibling(i){return i.nextSibling}setAttribute(i,t,n,r){if(r){t=r+":"+t;const s=MI[r];s?i.setAttributeNS(s,t,n):i.setAttribute(t,n)}else i.setAttribute(t,n)}removeAttribute(i,t,n){if(n){const r=MI[n];r?i.removeAttributeNS(r,t):i.removeAttribute(`${n}:${t}`)}else i.removeAttribute(t)}addClass(i,t){i.classList.add(t)}removeClass(i,t){i.classList.remove(t)}setStyle(i,t,n,r){r&(ah.DashCase|ah.Important)?i.style.setProperty(t,n,r&ah.Important?"important":""):i.style[t]=n}removeStyle(i,t,n){n&ah.DashCase?i.style.removeProperty(t):i.style[t]=""}setProperty(i,t,n){null!=i&&(i[t]=n)}setValue(i,t){i.nodeValue=t}listen(i,t,n){if("string"==typeof i&&!(i=ph().getGlobalEventTarget(this.doc,i)))throw new Error(`Unsupported event target ${i} for event ${t}`);return this.eventManager.addEventListener(i,t,this.decoratePreventDefault(n))}decoratePreventDefault(i){return t=>{if("__ngUnwrap__"===t)return i;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>i(t)):i(t))&&t.preventDefault()}}}function jU(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class ovt extends kI{constructor(i,t,n,r,s,o,l,w){super(i,s,o,w),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const C=XU(r.id,r.styles);for(const M of C){const P=document.createElement("style");l&&P.setAttribute("nonce",l),P.textContent=M,this.shadowRoot.appendChild(P)}}nodeOrShadowRoot(i){return i===this.hostEl?this.shadowRoot:i}appendChild(i,t){return super.appendChild(this.nodeOrShadowRoot(i),t)}insertBefore(i,t,n){return super.insertBefore(this.nodeOrShadowRoot(i),t,n)}removeChild(i,t){return super.removeChild(this.nodeOrShadowRoot(i),t)}parentNode(i){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(i)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class PI extends kI{constructor(i,t,n,r,s,o,l,w){super(i,s,o,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=w?XU(w,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class YU extends PI{constructor(i,t,n,r,s,o,l,w){const C=r+"-"+n.id;super(i,t,n,s,o,l,w,C),this.contentAttr=function rvt(e){return"_ngcontent-%COMP%".replace(II,e)}(C),this.hostAttr=function svt(e){return"_nghost-%COMP%".replace(II,e)}(C)}applyToHost(i){this.applyStyles(),this.setAttribute(i,this.hostAttr,"")}createElement(i,t){const n=super.createElement(i,t);return super.setAttribute(n,this.contentAttr,""),n}}let lvt=(()=>{class e extends GU{constructor(t){super(t)}supports(t){return!0}addEventListener(t,n,r){return t.addEventListener(n,r,!1),()=>this.removeEventListener(t,n,r)}removeEventListener(t,n,r){return t.removeEventListener(n,r)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const $U=["alt","control","meta","shift"],cvt={"\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"},dvt={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let uvt=(()=>{class e extends GU{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,n,r){const s=e.parseEventName(n),o=e.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ph().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;const s=e._normalizeKey(n.pop());let o="",l=n.indexOf("code");if(l>-1&&(n.splice(l,1),o="code."),$U.forEach(C=>{const M=n.indexOf(C);M>-1&&(n.splice(M,1),o+=C+".")}),o+=s,0!=n.length||0===s.length)return null;const w={};return w.domEventName=r,w.fullKey=o,w}static matchEventFullKeyCode(t,n){let r=cvt[t.key]||t.key,s="";return n.indexOf("code.")>-1&&(r=t.code,s="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),$U.forEach(o=>{o!==r&&(0,dvt[o])(t)&&(s+=o+".")}),s+=r,s===n)}static eventCallback(t,n,r){return s=>{e.matchEventFullKeyCode(s,t)&&r.runGuarded(()=>n(s))}}static _normalizeKey(t){return"esc"===t?"escape":t}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const pvt=C9(xmt,"browser",[{provide:zd,useValue:MU},{provide:FB,useValue:function hvt(){EI.makeCurrent()},multi:!0},{provide:Ni,useFactory:function mvt(){return function mat(e){t2=e}(document),document},deps:[]}]),gvt=new ee(""),ZU=[{provide:Y_,useClass:class Jgt{addToWindow(i){hr.getAngularTestability=(n,r=!0)=>{const s=i.findTestabilityInTree(n,r);if(null==s)throw new ue(5103,!1);return s},hr.getAllAngularTestabilities=()=>i.getAllTestabilities(),hr.getAllAngularRootElements=()=>i.getAllRootElements(),hr.frameworkStabilizers||(hr.frameworkStabilizers=[]),hr.frameworkStabilizers.push(n=>{const r=hr.getAllAngularTestabilities();let s=r.length;const o=function(){s--,0==s&&n()};r.forEach(l=>{l.whenStable(o)})})}findTestabilityInTree(i,t,n){return null==t?null:i.getTestability(t)??(n?ph().isShadowRoot(t)?this.findTestabilityInTree(i,t.host,!0):this.findTestabilityInTree(i,t.parentElement,!0):null)}},deps:[]},{provide:f9,useClass:jM,deps:[ii,YM,Y_]},{provide:jM,useClass:jM,deps:[ii,YM,Y_]}],JU=[{provide:vD,useValue:"root"},{provide:fl,useFactory:function fvt(){return new fl},deps:[]},{provide:AI,useClass:lvt,multi:!0,deps:[Ni,ii,zd]},{provide:AI,useClass:uvt,multi:!0,deps:[Ni]},RI,HU,zU,{provide:Q2,useExisting:RI},{provide:kU,useClass:qgt,deps:[]},[]];let qU=(()=>{class e{constructor(t){}static withServerTransition(t){return{ngModule:e,providers:[{provide:ix,useValue:t.appId}]}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(gvt,12))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[...JU,...ZU],imports:[qc,ymt]})}return e})(),vvt=(()=>{class e{constructor(t){this._doc=t}getTitle(){return this._doc.title}setTitle(t){this._doc.title=t||""}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),FI=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:function(n){let r=null;return r=n?new(n||e):Jt(wvt),r},providedIn:"root"})}return e})(),wvt=(()=>{class e extends FI{constructor(t){super(),this._doc=t}sanitize(t,n){if(null==n)return null;switch(t){case La.NONE:return n;case La.HTML:return Wc(n,"HTML")?ml(n):qB(this._doc,String(n)).toString();case La.STYLE:return Wc(n,"Style")?ml(n):n;case La.SCRIPT:if(Wc(n,"Script"))return ml(n);throw new ue(5200,!1);case La.URL:return Wc(n,"URL")?ml(n):Zw(String(n));case La.RESOURCE_URL:if(Wc(n,"ResourceURL"))return ml(n);throw new ue(5201,!1);default:throw new ue(5202,!1)}}bypassSecurityTrustHtml(t){return function Oat(e){return new Mat(e)}(t)}bypassSecurityTrustStyle(t){return function Lat(e){return new Iat(e)}(t)}bypassSecurityTrustScript(t){return function Nat(e){return new Rat(e)}(t)}bypassSecurityTrustUrl(t){return function Bat(e){return new kat(e)}(t)}bypassSecurityTrustResourceUrl(t){return function Vat(e){return new Pat(e)}(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function OI(e){return!!e&&(e instanceof ur||ne(e.lift)&&ne(e.subscribe))}function vh(e){return this instanceof vh?(this.v=e,this):new vh(e)}function az(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=function VI(e){var i="function"==typeof Symbol&&Symbol.iterator,t=i&&e[i],n=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=e[s]&&function(o){return new Promise(function(l,w){!function r(s,o,l,w){Promise.resolve(w).then(function(C){s({value:C,done:l})},o)}(l,w,(o=e[s](o)).done,o.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const UI=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function oz(e){return ne(e?.then)}function lz(e){return ne(e[$A])}function cz(e){return Symbol.asyncIterator&&ne(e?.[Symbol.asyncIterator])}function dz(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const uz=function Hvt(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function hz(e){return ne(e?.[uz])}function fz(e){return function sz(e,i,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=t.apply(e,i||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(O){n[O]&&(r[O]=function(L){return new Promise(function(U,X){s.push([O,L,U,X])>1||l(O,L)})})}function l(O,L){try{!function w(O){O.value instanceof vh?Promise.resolve(O.value.v).then(C,M):P(s[0][2],O)}(n[O](L))}catch(U){P(s[0][3],U)}}function C(O){l("next",O)}function M(O){l("throw",O)}function P(O,L){O(L),s.shift(),s.length&&l(s[0][0],s[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:n,done:r}=yield vh(t.read());if(r)return yield vh(void 0);yield yield vh(n)}}finally{t.releaseLock()}})}function mz(e){return ne(e?.getReader)}function eo(e){if(e instanceof ur)return e;if(null!=e){if(lz(e))return function Wvt(e){return new ur(i=>{const t=e[$A]();if(ne(t.subscribe))return t.subscribe(i);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(UI(e))return function Xvt(e){return new ur(i=>{for(let t=0;t{e.then(t=>{i.closed||(i.next(t),i.complete())},t=>i.error(t)).then(null,Cn)})}(e);if(cz(e))return pz(e);if(hz(e))return function Yvt(e){return new ur(i=>{for(const t of e)if(i.next(t),i.closed)return;i.complete()})}(e);if(mz(e))return function $vt(e){return pz(fz(e))}(e)}throw dz(e)}function pz(e){return new ur(i=>{(function Qvt(e,i){var t,n,r,s;return function nz(e,i,t,n){return new(t||(t=Promise))(function(s,o){function l(M){try{C(n.next(M))}catch(P){o(P)}}function w(M){try{C(n.throw(M))}catch(P){o(P)}}function C(M){M.done?s(M.value):function r(s){return s instanceof t?s:new t(function(o){o(s)})}(M.value).then(l,w)}C((n=n.apply(e,i||[])).next())})}(this,void 0,void 0,function*(){try{for(t=az(e);!(n=yield t.next()).done;)if(i.next(n.value),i.closed)return}catch(o){r={error:o}}finally{try{n&&!n.done&&(s=t.return)&&(yield s.call(t))}finally{if(r)throw r.error}}i.complete()})})(e,i).catch(t=>i.error(t))})}function Kd(e,i,t,n=0,r=!1){const s=i.schedule(function(){t(),r?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(s),!r)return s}function gz(e,i=0){return ds((t,n)=>{t.subscribe(Xr(n,r=>Kd(n,e,()=>n.next(r),i),()=>Kd(n,e,()=>n.complete(),i),r=>Kd(n,e,()=>n.error(r),i)))})}function vz(e,i=0){return ds((t,n)=>{n.add(e.schedule(()=>t.subscribe(n),i))})}function xz(e,i){if(!e)throw new Error("Iterable cannot be null");return new ur(t=>{Kd(t,i,()=>{const n=e[Symbol.asyncIterator]();Kd(t,i,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function Is(e,i){return i?function e0t(e,i){if(null!=e){if(lz(e))return function Kvt(e,i){return eo(e).pipe(vz(i),gz(i))}(e,i);if(UI(e))return function Jvt(e,i){return new ur(t=>{let n=0;return i.schedule(function(){n===e.length?t.complete():(t.next(e[n++]),t.closed||this.schedule())})})}(e,i);if(oz(e))return function Zvt(e,i){return eo(e).pipe(vz(i),gz(i))}(e,i);if(cz(e))return xz(e,i);if(hz(e))return function qvt(e,i){return new ur(t=>{let n;return Kd(t,i,()=>{n=e[uz](),Kd(t,i,()=>{let r,s;try{({value:r,done:s}=n.next())}catch(o){return void t.error(o)}s?t.complete():t.next(r)},0,!0)}),()=>ne(n?.return)&&n.return()})}(e,i);if(mz(e))return function t0t(e,i){return xz(fz(e),i)}(e,i)}throw dz(e)}(e,i):eo(e)}function yz(e){return e&&ne(e.schedule)}function zI(e){return e[e.length-1]}function bz(e){return ne(zI(e))?e.pop():void 0}function qx(e){return yz(zI(e))?e.pop():void 0}function vi(...e){return Is(e,qx(e))}const{isArray:n0t}=Array,{getPrototypeOf:r0t,prototype:s0t,keys:a0t}=Object;function wz(e){if(1===e.length){const i=e[0];if(n0t(i))return{args:i,keys:null};if(function o0t(e){return e&&"object"==typeof e&&r0t(e)===s0t}(i)){const t=a0t(i);return{args:t.map(n=>i[n]),keys:t}}}return{args:e,keys:null}}const{isArray:l0t}=Array;function GI(e){return Di(i=>function c0t(e,i){return l0t(i)?e(...i):e(i)}(e,i))}function _z(e,i){return e.reduce((t,n,r)=>(t[n]=i[r],t),{})}function Zd(...e){const i=qx(e),t=bz(e),{args:n,keys:r}=wz(e);if(0===n.length)return Is([],i);const s=new ur(function d0t(e,i,t=Ju){return n=>{Tz(i,()=>{const{length:r}=e,s=new Array(r);let o=r,l=r;for(let w=0;w{const C=Is(e[w],i);let M=!1;C.subscribe(Xr(n,P=>{s[w]=P,M||(M=!0,l--),l||n.next(t(s.slice()))},()=>{--o||n.complete()}))},n)},n)}}(n,i,r?o=>_z(r,o):Ju));return t?s.pipe(GI(t)):s}function Tz(e,i,t){e?Kd(t,e,i):i()}const Eg=le(e=>function(){e(this),this.name="EmptyError",this.message="no elements in sequence"});function _a(e,i,t=1/0){return ne(i)?_a((n,r)=>Di((s,o)=>i(n,s,r,o))(eo(e(n,r))),t):("number"==typeof i&&(t=i),ds((n,r)=>function u0t(e,i,t,n,r,s,o,l){const w=[];let C=0,M=0,P=!1;const O=()=>{P&&!w.length&&!C&&i.complete()},L=X=>C{s&&i.next(X),C++;let W=!1;eo(t(X,M++)).subscribe(Xr(i,Z=>{r?.(Z),s?L(Z):i.next(Z)},()=>{W=!0},void 0,()=>{if(W)try{for(C--;w.length&&CU(Z)):U(Z)}O()}catch(Z){i.error(Z)}}))};return e.subscribe(Xr(i,L,()=>{P=!0,O()})),()=>{l?.()}}(n,r,e,t)))}function Ag(e=1/0){return _a(Ju,e)}function ty(...e){return function h0t(){return Ag(1)}()(Is(e,qx(e)))}function Dg(e){return new ur(i=>{eo(e()).subscribe(i)})}function Mg(e,i){const t=ne(e)?e:()=>e,n=r=>r.error(t());return new ur(i?r=>i.schedule(n,0,r):n)}const Zo=new ur(e=>e.complete());function HI(){return ds((e,i)=>{let t=null;e._refCount++;const n=Xr(i,void 0,void 0,void 0,()=>{if(!e||e._refCount<=0||0<--e._refCount)return void(t=null);const r=e._connection,s=t;t=null,r&&(!s||r===s)&&r.unsubscribe(),i.unsubscribe()});e.subscribe(n),n.closed||(t=e.connect())})}class WI extends ur{constructor(i,t){super(),this.source=i,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,U4(i)&&(this.lift=i.lift)}_subscribe(i){return this.getSubject().subscribe(i)}getSubject(){const i=this._subject;return(!i||i.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;const{_connection:i}=this;this._subject=this._connection=null,i?.unsubscribe()}connect(){let i=this._connection;if(!i){i=this._connection=new Ie;const t=this.getSubject();i.add(this.source.subscribe(Xr(t,void 0,()=>{this._teardown(),t.complete()},n=>{this._teardown(),t.error(n)},()=>this._teardown()))),i.closed&&(this._connection=null,i=Ie.EMPTY)}return i}refCount(){return HI()(this)}}function Rs(e,i){return ds((t,n)=>{let r=null,s=0,o=!1;const l=()=>o&&!r&&n.complete();t.subscribe(Xr(n,w=>{r?.unsubscribe();let C=0;const M=s++;eo(e(w,M)).subscribe(r=Xr(n,P=>n.next(i?i(w,P,M,C++):P),()=>{r=null,l()}))},()=>{o=!0,l()}))})}function er(e){return e<=0?()=>Zo:ds((i,t)=>{let n=0;i.subscribe(Xr(t,r=>{++n<=e&&(t.next(r),e<=n&&t.complete())}))})}function Ta(...e){const i=qx(e);return ds((t,n)=>{(i?ty(e,t,i):ty(e,t)).subscribe(n)})}function In(e,i){return ds((t,n)=>{let r=0;t.subscribe(Xr(n,s=>e.call(i,s,r++)&&n.next(s)))})}function yT(e){return ds((i,t)=>{let n=!1;i.subscribe(Xr(t,r=>{n=!0,t.next(r)},()=>{n||t.next(e),t.complete()}))})}function Cz(e=m0t){return ds((i,t)=>{let n=!1;i.subscribe(Xr(t,r=>{n=!0,t.next(r)},()=>n?t.complete():t.error(e())))})}function m0t(){return new Eg}function Vl(e,i){const t=arguments.length>=2;return n=>n.pipe(e?In((r,s)=>e(r,s,n)):Ju,er(1),t?yT(i):Cz(()=>new Eg))}function Ig(e,i){return ne(i)?_a(e,i,1):_a(e,1)}function hs(e,i,t){const n=ne(e)||i||t?{next:e,error:i,complete:t}:e;return n?ds((r,s)=>{var o;null===(o=n.subscribe)||void 0===o||o.call(n);let l=!0;r.subscribe(Xr(s,w=>{var C;null===(C=n.next)||void 0===C||C.call(n,w),s.next(w)},()=>{var w;l=!1,null===(w=n.complete)||void 0===w||w.call(n),s.complete()},w=>{var C;l=!1,null===(C=n.error)||void 0===C||C.call(n,w),s.error(w)},()=>{var w,C;l&&(null===(w=n.unsubscribe)||void 0===w||w.call(n)),null===(C=n.finalize)||void 0===C||C.call(n)}))}):Ju}function oa(e){return ds((i,t)=>{let s,n=null,r=!1;n=i.subscribe(Xr(t,void 0,void 0,o=>{s=eo(e(o,oa(e)(i))),n?(n.unsubscribe(),n=null,s.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,s.subscribe(t))})}function XI(e){return e<=0?()=>Zo:ds((i,t)=>{let n=[];i.subscribe(Xr(t,r=>{n.push(r),e{for(const r of n)t.next(r);t.complete()},void 0,()=>{n=null}))})}function bT(e){return Di(()=>e)}function Rg(e){return ds((i,t)=>{try{i.subscribe(t)}finally{t.add(e)}})}function Ui(e){return ds((i,t)=>{eo(e).subscribe(Xr(t,()=>t.complete(),sr)),!t.closed&&i.subscribe(t)})}const yn="primary",ey=Symbol("RouteTitle");class x0t{constructor(i){this.params=i||{}}has(i){return Object.prototype.hasOwnProperty.call(this.params,i)}get(i){if(this.has(i)){const t=this.params[i];return Array.isArray(t)?t[0]:t}return null}getAll(i){if(this.has(i)){const t=this.params[i];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function kg(e){return new x0t(e)}function y0t(e,i,t){const n=t.path.split("/");if(n.length>e.length||"full"===t.pathMatch&&(i.hasChildren()||n.lengthn[s]===r)}return e===i}function Ez(e){return e.length>0?e[e.length-1]:null}function xh(e){return OI(e)?e:Xx(e)?Is(Promise.resolve(e)):vi(e)}const w0t={exact:function Mz(e,i,t){if(!jf(e.segments,i.segments)||!wT(e.segments,i.segments,t)||e.numberOfChildren!==i.numberOfChildren)return!1;for(const n in i.children)if(!e.children[n]||!Mz(e.children[n],i.children[n],t))return!1;return!0},subset:Iz},Az={exact:function _0t(e,i){return td(e,i)},subset:function T0t(e,i){return Object.keys(i).length<=Object.keys(e).length&&Object.keys(i).every(t=>Sz(e[t],i[t]))},ignored:()=>!0};function Dz(e,i,t){return w0t[t.paths](e.root,i.root,t.matrixParams)&&Az[t.queryParams](e.queryParams,i.queryParams)&&!("exact"===t.fragment&&e.fragment!==i.fragment)}function Iz(e,i,t){return Rz(e,i,i.segments,t)}function Rz(e,i,t,n){if(e.segments.length>t.length){const r=e.segments.slice(0,t.length);return!(!jf(r,t)||i.hasChildren()||!wT(r,t,n))}if(e.segments.length===t.length){if(!jf(e.segments,t)||!wT(e.segments,t,n))return!1;for(const r in i.children)if(!e.children[r]||!Iz(e.children[r],i.children[r],n))return!1;return!0}{const r=t.slice(0,e.segments.length),s=t.slice(e.segments.length);return!!(jf(e.segments,r)&&wT(e.segments,r,n)&&e.children[yn])&&Rz(e.children[yn],i,s,n)}}function wT(e,i,t){return i.every((n,r)=>Az[t](e[r].parameters,n.parameters))}class Pg{constructor(i=new Er([],{}),t={},n=null){this.root=i,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=kg(this.queryParams),this._queryParamMap}toString(){return E0t.serialize(this)}}class Er{constructor(i,t){this.segments=i,this.children=t,this.parent=null,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return _T(this)}}class iy{constructor(i,t){this.path=i,this.parameters=t}get parameterMap(){return this._parameterMap??=kg(this.parameters),this._parameterMap}toString(){return Fz(this)}}function jf(e,i){return e.length===i.length&&e.every((t,n)=>t.path===i[n].path)}let Fg=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>new YI,providedIn:"root"})}return e})();class YI{parse(i){const t=new N0t(i);return new Pg(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(i){const t=`/${ny(i.root,!0)}`,n=function M0t(e){const i=Object.entries(e).map(([t,n])=>Array.isArray(n)?n.map(r=>`${TT(t)}=${TT(r)}`).join("&"):`${TT(t)}=${TT(n)}`).filter(t=>t);return i.length?`?${i.join("&")}`:""}(i.queryParams);return`${t}${n}${"string"==typeof i.fragment?`#${function A0t(e){return encodeURI(e)}(i.fragment)}`:""}`}}const E0t=new YI;function _T(e){return e.segments.map(i=>Fz(i)).join("/")}function ny(e,i){if(!e.hasChildren())return _T(e);if(i){const t=e.children[yn]?ny(e.children[yn],!1):"",n=[];return Object.entries(e.children).forEach(([r,s])=>{r!==yn&&n.push(`${r}:${ny(s,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}{const t=function S0t(e,i){let t=[];return Object.entries(e.children).forEach(([n,r])=>{n===yn&&(t=t.concat(i(r,n)))}),Object.entries(e.children).forEach(([n,r])=>{n!==yn&&(t=t.concat(i(r,n)))}),t}(e,(n,r)=>r===yn?[ny(e.children[yn],!1)]:[`${r}:${ny(n,!1)}`]);return 1===Object.keys(e.children).length&&null!=e.children[yn]?`${_T(e)}/${t[0]}`:`${_T(e)}/(${t.join("//")})`}}function kz(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function TT(e){return kz(e).replace(/%3B/gi,";")}function $I(e){return kz(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function CT(e){return decodeURIComponent(e)}function Pz(e){return CT(e.replace(/\+/g,"%20"))}function Fz(e){return`${$I(e.path)}${function D0t(e){return Object.entries(e).map(([i,t])=>`;${$I(i)}=${$I(t)}`).join("")}(e.parameters)}`}const I0t=/^[^\/()?;#]+/;function QI(e){const i=e.match(I0t);return i?i[0]:""}const R0t=/^[^\/()?;=#]+/,P0t=/^[^=?&#]+/,O0t=/^[^&#]+/;class N0t{constructor(i){this.url=i,this.remaining=i}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Er([],{}):new Er([],this.parseChildren())}parseQueryParams(){const i={};if(this.consumeOptional("?"))do{this.parseQueryParam(i)}while(this.consumeOptional("&"));return i}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const i=[];for(this.peekStartsWith("(")||i.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),i.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(i.length>0||Object.keys(t).length>0)&&(n[yn]=new Er(i,t)),n}parseSegment(){const i=QI(this.remaining);if(""===i&&this.peekStartsWith(";"))throw new ue(4009,!1);return this.capture(i),new iy(CT(i),this.parseMatrixParams())}parseMatrixParams(){const i={};for(;this.consumeOptional(";");)this.parseParam(i);return i}parseParam(i){const t=function k0t(e){const i=e.match(R0t);return i?i[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const r=QI(this.remaining);r&&(n=r,this.capture(n))}i[CT(t)]=CT(n)}parseQueryParam(i){const t=function F0t(e){const i=e.match(P0t);return i?i[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const o=function L0t(e){const i=e.match(O0t);return i?i[0]:""}(this.remaining);o&&(n=o,this.capture(n))}const r=Pz(t),s=Pz(n);if(i.hasOwnProperty(r)){let o=i[r];Array.isArray(o)||(o=[o],i[r]=o),o.push(s)}else i[r]=s}parseParens(i){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=QI(this.remaining),r=this.remaining[n.length];if("/"!==r&&")"!==r&&";"!==r)throw new ue(4010,!1);let s;n.indexOf(":")>-1?(s=n.slice(0,n.indexOf(":")),this.capture(s),this.capture(":")):i&&(s=yn);const o=this.parseChildren();t[s]=1===Object.keys(o).length?o[yn]:new Er([],o),this.consumeOptional("//")}return t}peekStartsWith(i){return this.remaining.startsWith(i)}consumeOptional(i){return!!this.peekStartsWith(i)&&(this.remaining=this.remaining.substring(i.length),!0)}capture(i){if(!this.consumeOptional(i))throw new ue(4011,!1)}}function Oz(e){return e.segments.length>0?new Er([],{[yn]:e}):e}function Lz(e){const i={};for(const[n,r]of Object.entries(e.children)){const s=Lz(r);if(n===yn&&0===s.segments.length&&s.hasChildren())for(const[o,l]of Object.entries(s.children))i[o]=l;else(s.segments.length>0||s.hasChildren())&&(i[n]=s)}return function B0t(e){if(1===e.numberOfChildren&&e.children[yn]){const i=e.children[yn];return new Er(e.segments.concat(i.segments),i.children)}return e}(new Er(e.segments,i))}function Og(e){return e instanceof Pg}function Nz(e){let i;const r=Oz(function t(s){const o={};for(const w of s.children){const C=t(w);o[w.outlet]=C}const l=new Er(s.url,o);return s===e&&(i=l),l}(e.root));return i??r}function Bz(e,i,t,n){let r=e;for(;r.parent;)r=r.parent;if(0===i.length)return KI(r,r,r,t,n);const s=function U0t(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new Uz(!0,0,e);let i=0,t=!1;const n=e.reduce((r,s,o)=>{if("object"==typeof s&&null!=s){if(s.outlets){const l={};return Object.entries(s.outlets).forEach(([w,C])=>{l[w]="string"==typeof C?C.split("/"):C}),[...r,{outlets:l}]}if(s.segmentPath)return[...r,s.segmentPath]}return"string"!=typeof s?[...r,s]:0===o?(s.split("/").forEach((l,w)=>{0==w&&"."===l||(0==w&&""===l?t=!0:".."===l?i++:""!=l&&r.push(l))}),r):[...r,s]},[]);return new Uz(t,i,n)}(i);if(s.toRoot())return KI(r,r,new Er([],{}),t,n);const o=function z0t(e,i,t){if(e.isAbsolute)return new ET(i,!0,0);if(!t)return new ET(i,!1,NaN);if(null===t.parent)return new ET(t,!0,0);const n=ST(e.commands[0])?0:1;return function G0t(e,i,t){let n=e,r=i,s=t;for(;s>r;){if(s-=r,n=n.parent,!n)throw new ue(4005,!1);r=n.segments.length}return new ET(n,!1,r-s)}(t,t.segments.length-1+n,e.numberOfDoubleDots)}(s,r,e),l=o.processChildren?sy(o.segmentGroup,o.index,s.commands):zz(o.segmentGroup,o.index,s.commands);return KI(r,o.segmentGroup,l,t,n)}function ST(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function ry(e){return"object"==typeof e&&null!=e&&e.outlets}function KI(e,i,t,n,r){let o,s={};n&&Object.entries(n).forEach(([w,C])=>{s[w]=Array.isArray(C)?C.map(M=>`${M}`):`${C}`}),o=e===i?t:Vz(e,i,t);const l=Oz(Lz(o));return new Pg(l,s,r)}function Vz(e,i,t){const n={};return Object.entries(e.children).forEach(([r,s])=>{n[r]=s===i?t:Vz(s,i,t)}),new Er(e.segments,n)}class Uz{constructor(i,t,n){if(this.isAbsolute=i,this.numberOfDoubleDots=t,this.commands=n,i&&n.length>0&&ST(n[0]))throw new ue(4003,!1);const r=n.find(ry);if(r&&r!==Ez(n))throw new ue(4004,!1)}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class ET{constructor(i,t,n){this.segmentGroup=i,this.processChildren=t,this.index=n}}function zz(e,i,t){if(e??=new Er([],{}),0===e.segments.length&&e.hasChildren())return sy(e,i,t);const n=function W0t(e,i,t){let n=0,r=i;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return s;const o=e.segments[r],l=t[n];if(ry(l))break;const w=`${l}`,C=n0&&void 0===w)break;if(w&&C&&"object"==typeof C&&void 0===C.outlets){if(!Hz(w,C,o))return s;n+=2}else{if(!Hz(w,{},o))return s;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}(e,i,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndexs!==yn)&&e.children[yn]&&1===e.numberOfChildren&&0===e.children[yn].segments.length){const s=sy(e.children[yn],i,t);return new Er(e.segments,s.children)}return Object.entries(n).forEach(([s,o])=>{"string"==typeof o&&(o=[o]),null!==o&&(r[s]=zz(e.children[s],i,o))}),Object.entries(e.children).forEach(([s,o])=>{void 0===n[s]&&(r[s]=o)}),new Er(e.segments,r)}}function ZI(e,i,t){const n=e.segments.slice(0,i);let r=0;for(;r{"string"==typeof n&&(n=[n]),null!==n&&(i[t]=ZI(new Er([],{}),0,n))}),i}function Gz(e){const i={};return Object.entries(e).forEach(([t,n])=>i[t]=`${n}`),i}function Hz(e,i,t){return e==t.path&&td(i,t.parameters)}const ay="imperative";var Wn=function(e){return e[e.NavigationStart=0]="NavigationStart",e[e.NavigationEnd=1]="NavigationEnd",e[e.NavigationCancel=2]="NavigationCancel",e[e.NavigationError=3]="NavigationError",e[e.RoutesRecognized=4]="RoutesRecognized",e[e.ResolveStart=5]="ResolveStart",e[e.ResolveEnd=6]="ResolveEnd",e[e.GuardsCheckStart=7]="GuardsCheckStart",e[e.GuardsCheckEnd=8]="GuardsCheckEnd",e[e.RouteConfigLoadStart=9]="RouteConfigLoadStart",e[e.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",e[e.ChildActivationStart=11]="ChildActivationStart",e[e.ChildActivationEnd=12]="ChildActivationEnd",e[e.ActivationStart=13]="ActivationStart",e[e.ActivationEnd=14]="ActivationEnd",e[e.Scroll=15]="Scroll",e[e.NavigationSkipped=16]="NavigationSkipped",e}(Wn||{});class ed{constructor(i,t){this.id=i,this.url=t}}class AT extends ed{constructor(i,t,n="imperative",r=null){super(i,t),this.type=Wn.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class id extends ed{constructor(i,t,n){super(i,t),this.urlAfterRedirects=n,this.type=Wn.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}var xl=function(e){return e[e.Redirect=0]="Redirect",e[e.SupersededByNewNavigation=1]="SupersededByNewNavigation",e[e.NoDataFromResolver=2]="NoDataFromResolver",e[e.GuardRejected=3]="GuardRejected",e}(xl||{}),DT=function(e){return e[e.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",e[e.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",e}(DT||{});class Lg extends ed{constructor(i,t,n,r){super(i,t),this.reason=n,this.code=r,this.type=Wn.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Ng extends ed{constructor(i,t,n,r){super(i,t),this.reason=n,this.code=r,this.type=Wn.NavigationSkipped}}class MT extends ed{constructor(i,t,n,r){super(i,t),this.error=n,this.target=r,this.type=Wn.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Wz extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class j0t extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y0t extends ed{constructor(i,t,n,r,s){super(i,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=s,this.type=Wn.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class $0t extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Q0t extends ed{constructor(i,t,n,r){super(i,t),this.urlAfterRedirects=n,this.state=r,this.type=Wn.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class K0t{constructor(i){this.route=i,this.type=Wn.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class Z0t{constructor(i){this.route=i,this.type=Wn.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class J0t{constructor(i){this.snapshot=i,this.type=Wn.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q0t{constructor(i){this.snapshot=i,this.type=Wn.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class txt{constructor(i){this.snapshot=i,this.type=Wn.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ext{constructor(i){this.snapshot=i,this.type=Wn.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class Xz{constructor(i,t,n){this.routerEvent=i,this.position=t,this.anchor=n,this.type=Wn.Scroll}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}class JI{}class qI{constructor(i){this.url=i}}class ixt{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new oy,this.attachRef=null}}let oy=(()=>{class e{constructor(){this.contexts=new Map}onChildOutletCreated(t,n){const r=this.getOrCreateContext(t);r.outlet=n,this.contexts.set(t,r)}onChildOutletDestroyed(t){const n=this.getContext(t);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let n=this.getContext(t);return n||(n=new ixt,this.contexts.set(t,n)),n}getContext(t){return this.contexts.get(t)||null}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class jz{constructor(i){this._root=i}get root(){return this._root.value}parent(i){const t=this.pathFromRoot(i);return t.length>1?t[t.length-2]:null}children(i){const t=tR(i,this._root);return t?t.children.map(n=>n.value):[]}firstChild(i){const t=tR(i,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(i){const t=eR(i,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==i)}pathFromRoot(i){return eR(i,this._root).map(t=>t.value)}}function tR(e,i){if(e===i.value)return i;for(const t of i.children){const n=tR(e,t);if(n)return n}return null}function eR(e,i){if(e===i.value)return[i];for(const t of i.children){const n=eR(e,t);if(n.length)return n.unshift(i),n}return[]}class _c{constructor(i,t){this.value=i,this.children=t}toString(){return`TreeNode(${this.value})`}}function Bg(e){const i={};return e&&e.children.forEach(t=>i[t.value.outlet]=t),i}class Yz extends jz{constructor(i,t){super(i),this.snapshot=t,rR(this,i)}toString(){return this.snapshot.toString()}}function $z(e){const i=function nxt(e){const s=new nR([],{},{},"",{},yn,e,null,{});return new Qz("",new _c(s,[]))}(e),t=new Wr([new iy("",{})]),n=new Wr({}),r=new Wr({}),s=new Wr({}),o=new Wr(""),l=new Tc(t,n,s,o,r,yn,e,i.root);return l.snapshot=i.root,new Yz(new _c(l,[]),i)}class Tc{constructor(i,t,n,r,s,o,l,w){this.urlSubject=i,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=l,this._futureSnapshot=w,this.title=this.dataSubject?.pipe(Di(C=>C[ey]))??vi(void 0),this.url=i,this.params=t,this.queryParams=n,this.fragment=r,this.data=s}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(Di(i=>kg(i))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Di(i=>kg(i))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function iR(e,i,t="emptyOnly"){let n;const{routeConfig:r}=e;return n=null===i||"always"!==t&&""!==r?.path&&(i.component||i.routeConfig?.loadComponent)?{params:{...e.params},data:{...e.data},resolve:{...e.data,...e._resolvedData??{}}}:{params:{...i.params,...e.params},data:{...i.data,...e.data},resolve:{...e.data,...i.data,...r?.data,...e._resolvedData}},r&&Zz(r)&&(n.resolve[ey]=r.title),n}class nR{get title(){return this.data?.[ey]}constructor(i,t,n,r,s,o,l,w,C){this.url=i,this.params=t,this.queryParams=n,this.fragment=r,this.data=s,this.outlet=o,this.component=l,this.routeConfig=w,this._resolve=C}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??=kg(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=kg(this.queryParams),this._queryParamMap}toString(){return`Route(url:'${this.url.map(n=>n.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Qz extends jz{constructor(i,t){super(t),this.url=i,rR(this,t)}toString(){return Kz(this._root)}}function rR(e,i){i.value._routerState=e,i.children.forEach(t=>rR(e,t))}function Kz(e){const i=e.children.length>0?` { ${e.children.map(Kz).join(", ")} } `:"";return`${e.value}${i}`}function sR(e){if(e.snapshot){const i=e.snapshot,t=e._futureSnapshot;e.snapshot=t,td(i.queryParams,t.queryParams)||e.queryParamsSubject.next(t.queryParams),i.fragment!==t.fragment&&e.fragmentSubject.next(t.fragment),td(i.params,t.params)||e.paramsSubject.next(t.params),function b0t(e,i){if(e.length!==i.length)return!1;for(let t=0;ttd(t.parameters,i[n].parameters))}(e.url,i.url);return t&&!(!e.parent!=!i.parent)&&(!e.parent||aR(e.parent,i.parent))}function Zz(e){return"string"==typeof e.title||null===e.title}let oR=(()=>{class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=yn,this.activateEvents=new De,this.deactivateEvents=new De,this.attachEvents=new De,this.detachEvents=new De,this.parentContexts=me(oy),this.location=me(Ir),this.changeDetector=me(Mn),this.environmentInjector=me(jo),this.inputBinder=me(IT,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(t){if(t.name){const{firstChange:n,previousValue:r}=t.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(t){return this.parentContexts.getContext(t)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;const t=this.parentContexts.getContext(this.name);t?.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new ue(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new ue(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new ue(4012,!1);this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(t.instance),t}attach(t,n){this.activated=t,this._activatedRoute=n,this.location.insert(t.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(t.instance)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,n){if(this.isActivated)throw new ue(4013,!1);this._activatedRoute=t;const r=this.location,o=t.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,w=new rxt(t,l,r.injector);this.activated=r.createComponent(o,{index:r.length,injector:w,environmentInjector:n??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[tr]})}return e})();class rxt{constructor(i,t,n){this.route=i,this.childContexts=t,this.parent=n,this.__ngOutletInjector=!0}get(i,t){return i===Tc?this.route:i===oy?this.childContexts:this.parent.get(i,t)}}const IT=new ee("");let Jz=(()=>{class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(t){this.unsubscribeFromRouteData(t),this.subscribeToRouteData(t)}unsubscribeFromRouteData(t){this.outletDataSubscriptions.get(t)?.unsubscribe(),this.outletDataSubscriptions.delete(t)}subscribeToRouteData(t){const{activatedRoute:n}=t,r=Zd([n.queryParams,n.params,n.data]).pipe(Rs(([s,o,l],w)=>(l={...s,...o,...l},0===w?vi(l):Promise.resolve(l)))).subscribe(s=>{if(!t.isActivated||!t.activatedComponentRef||t.activatedRoute!==n||null===n.component)return void this.unsubscribeFromRouteData(t);const o=function qmt(e){const i=En(e);if(!i)return null;const t=new Ex(i);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return i.standalone},get isSignal(){return i.signals}}}(n.component);if(o)for(const{templateName:l}of o.inputs)t.activatedComponentRef.setInput(l,s[l]);else this.unsubscribeFromRouteData(t)});this.outletDataSubscriptions.set(t,r)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function ly(e,i,t){if(t&&e.shouldReuseRoute(i.value,t.value.snapshot)){const n=t.value;n._futureSnapshot=i.value;const r=function axt(e,i,t){return i.children.map(n=>{for(const r of t.children)if(e.shouldReuseRoute(n.value,r.value.snapshot))return ly(e,n,r);return ly(e,n)})}(e,i,t);return new _c(n,r)}{if(e.shouldAttach(i.value)){const s=e.retrieve(i.value);if(null!==s){const o=s.route;return o.value._futureSnapshot=i.value,o.children=i.children.map(l=>ly(e,l)),o}}const n=function oxt(e){return new Tc(new Wr(e.url),new Wr(e.params),new Wr(e.queryParams),new Wr(e.fragment),new Wr(e.data),e.outlet,e.component,e)}(i.value),r=i.children.map(s=>ly(e,s));return new _c(n,r)}}const qz="ngNavigationCancelingError";function tG(e,i){const{redirectTo:t,navigationBehaviorOptions:n}=Og(i)?{redirectTo:i,navigationBehaviorOptions:void 0}:i,r=eG(!1,xl.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function eG(e,i){const t=new Error(`NavigationCancelingError: ${e||""}`);return t[qz]=!0,t.cancellationCode=i,t}function iG(e){return!!e&&e[qz]}let nG=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["ng-component"]],standalone:!0,features:[Vi],decls:1,vars:0,template:function(n,r){1&n&&we(0,"router-outlet")},dependencies:[oR],encapsulation:2})}return e})();function lR(e){const i=e.children&&e.children.map(lR),t=i?{...e,children:i}:{...e};return!t.component&&!t.loadComponent&&(i||t.loadChildren)&&t.outlet&&t.outlet!==yn&&(t.component=nG),t}function nd(e){return e.outlet||yn}function cy(e){if(!e)return null;if(e.routeConfig?._injector)return e.routeConfig._injector;for(let i=e.parent;i;i=i.parent){const t=i.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}class pxt{constructor(i,t,n,r,s){this.routeReuseStrategy=i,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=s}activate(i){const t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,i),sR(this.futureState.root),this.activateChildRoutes(t,n,i)}deactivateChildRoutes(i,t,n){const r=Bg(t);i.children.forEach(s=>{const o=s.value.outlet;this.deactivateRoutes(s,r[o],n),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,n)})}deactivateRoutes(i,t,n){const r=i.value,s=t?t.value:null;if(r===s)if(r.component){const o=n.getContext(r.outlet);o&&this.deactivateChildRoutes(i,t,o.children)}else this.deactivateChildRoutes(i,t,n);else s&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(i,t){i.value.component&&this.routeReuseStrategy.shouldDetach(i.value.snapshot)?this.detachAndStoreRouteSubtree(i,t):this.deactivateRouteAndOutlet(i,t)}detachAndStoreRouteSubtree(i,t){const n=t.getContext(i.value.outlet),r=n&&i.value.component?n.children:t,s=Bg(i);for(const o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(n&&n.outlet){const o=n.outlet.detach(),l=n.children.onOutletDeactivated();this.routeReuseStrategy.store(i.value.snapshot,{componentRef:o,route:i,contexts:l})}}deactivateRouteAndOutlet(i,t){const n=t.getContext(i.value.outlet),r=n&&i.value.component?n.children:t,s=Bg(i);for(const o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(i,t,n){const r=Bg(t);i.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],n),this.forwardEvent(new ext(s.value.snapshot))}),i.children.length&&this.forwardEvent(new q0t(i.value.snapshot))}activateRoutes(i,t,n){const r=i.value,s=t?t.value:null;if(sR(r),r===s)if(r.component){const o=n.getOrCreateContext(r.outlet);this.activateChildRoutes(i,t,o.children)}else this.activateChildRoutes(i,t,n);else if(r.component){const o=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){const l=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(l.contexts),o.attachRef=l.componentRef,o.route=l.route.value,o.outlet&&o.outlet.attach(l.componentRef,l.route.value),sR(l.route.value),this.activateChildRoutes(i,null,o.children)}else{const l=cy(r.snapshot);o.attachRef=null,o.route=r,o.injector=l,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(i,null,o.children)}}else this.activateChildRoutes(i,null,n)}}class rG{constructor(i){this.path=i,this.route=this.path[this.path.length-1]}}class RT{constructor(i,t){this.component=i,this.route=t}}function gxt(e,i,t){const n=e._root;return dy(n,i?i._root:null,t,[n.value])}function Vg(e,i){const t=Symbol(),n=i.get(e,t);return n===t?"function"!=typeof e||function $nt(e){return null!==hw(e)}(e)?i.get(e):e:n}function dy(e,i,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=Bg(i);return e.children.forEach(o=>{(function xxt(e,i,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=e.value,o=i?i.value:null,l=t?t.getContext(e.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const w=function yxt(e,i,t){if("function"==typeof t)return t(e,i);switch(t){case"pathParamsChange":return!jf(e.url,i.url);case"pathParamsOrQueryParamsChange":return!jf(e.url,i.url)||!td(e.queryParams,i.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!aR(e,i)||!td(e.queryParams,i.queryParams);default:return!aR(e,i)}}(o,s,s.routeConfig.runGuardsAndResolvers);w?r.canActivateChecks.push(new rG(n)):(s.data=o.data,s._resolvedData=o._resolvedData),dy(e,i,s.component?l?l.children:null:t,n,r),w&&l&&l.outlet&&l.outlet.isActivated&&r.canDeactivateChecks.push(new RT(l.outlet.component,o))}else o&&uy(i,l,r),r.canActivateChecks.push(new rG(n)),dy(e,null,s.component?l?l.children:null:t,n,r)})(o,s[o.value.outlet],t,n.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,l])=>uy(l,t.getContext(o),r)),r}function uy(e,i,t){const n=Bg(e),r=e.value;Object.entries(n).forEach(([s,o])=>{uy(o,r.component?i?i.children.getContext(s):null:i,t)}),t.canDeactivateChecks.push(new RT(r.component&&i&&i.outlet&&i.outlet.isActivated?i.outlet.component:null,r))}function hy(e){return"function"==typeof e}function sG(e){return e instanceof Eg||"EmptyError"===e?.name}const kT=Symbol("INITIAL_VALUE");function Ug(){return Rs(e=>Zd(e.map(i=>i.pipe(er(1),Ta(kT)))).pipe(Di(i=>{for(const t of i)if(!0!==t){if(t===kT)return kT;if(!1===t||t instanceof Pg)return t}return!0}),In(i=>i!==kT),er(1)))}function aG(e){return function Bnt(...e){return N4(e)}(hs(i=>{if(Og(i))throw tG(0,i)}),Di(i=>!0===i))}class cR{constructor(i){this.segmentGroup=i||null}}class dR extends Error{constructor(i){super(),this.urlTree=i}}function zg(e){return Mg(new cR(e))}class Bxt{constructor(i,t){this.urlSerializer=i,this.urlTree=t}lineralizeSegments(i,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),0===r.numberOfChildren)return vi(n);if(r.numberOfChildren>1||!r.children[yn])return Mg(new ue(4e3,!1));r=r.children[yn]}}applyRedirectCommands(i,t,n){const r=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),i,n);if(t.startsWith("/"))throw new dR(r);return r}applyRedirectCreateUrlTree(i,t,n,r){const s=this.createSegmentGroup(i,t.root,n,r);return new Pg(s,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(i,t){const n={};return Object.entries(i).forEach(([r,s])=>{if("string"==typeof s&&s.startsWith(":")){const l=s.substring(1);n[r]=t[l]}else n[r]=s}),n}createSegmentGroup(i,t,n,r){const s=this.createSegments(i,t.segments,n,r);let o={};return Object.entries(t.children).forEach(([l,w])=>{o[l]=this.createSegmentGroup(i,w,n,r)}),new Er(s,o)}createSegments(i,t,n,r){return t.map(s=>s.path.startsWith(":")?this.findPosParam(i,s,r):this.findOrReturn(s,n))}findPosParam(i,t,n){const r=n[t.path.substring(1)];if(!r)throw new ue(4001,!1);return r}findOrReturn(i,t){let n=0;for(const r of t){if(r.path===i.path)return t.splice(n),r;n++}return i}}const uR={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function Vxt(e,i,t,n,r){const s=hR(e,i,t);return s.matched?(n=function cxt(e,i){return e.providers&&!e._injector&&(e._injector=T_(e.providers,i,`Route: ${e.path}`)),e._injector??i}(i,n),function Oxt(e,i,t,n){const r=i.canMatch;return r&&0!==r.length?vi(r.map(o=>{const l=Vg(o,e);return xh(function Sxt(e){return e&&hy(e.canMatch)}(l)?l.canMatch(i,t):Nc(e,()=>l(i,t)))})).pipe(Ug(),aG()):vi(!0)}(n,i,t).pipe(Di(o=>!0===o?s:{...uR}))):vi(s)}function hR(e,i,t){if("**"===i.path)return function Uxt(e){return{matched:!0,parameters:e.length>0?Ez(e).parameters:{},consumedSegments:e,remainingSegments:[],positionalParamSegments:{}}}(t);if(""===i.path)return"full"===i.pathMatch&&(e.hasChildren()||t.length>0)?{...uR}:{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};const r=(i.matcher||y0t)(t,e,i);if(!r)return{...uR};const s={};Object.entries(r.posParams??{}).forEach(([l,w])=>{s[l]=w.path});const o=r.consumed.length>0?{...s,...r.consumed[r.consumed.length-1].parameters}:s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function oG(e,i,t,n){return t.length>0&&function Hxt(e,i,t){return t.some(n=>PT(e,i,n)&&nd(n)!==yn)}(e,t,n)?{segmentGroup:new Er(i,Gxt(n,new Er(t,e.children))),slicedSegments:[]}:0===t.length&&function Wxt(e,i,t){return t.some(n=>PT(e,i,n))}(e,t,n)?{segmentGroup:new Er(e.segments,zxt(e,t,n,e.children)),slicedSegments:t}:{segmentGroup:new Er(e.segments,e.children),slicedSegments:t}}function zxt(e,i,t,n){const r={};for(const s of t)if(PT(e,i,s)&&!n[nd(s)]){const o=new Er([],{});r[nd(s)]=o}return{...n,...r}}function Gxt(e,i){const t={};t[yn]=i;for(const n of e)if(""===n.path&&nd(n)!==yn){const r=new Er([],{});t[nd(n)]=r}return t}function PT(e,i,t){return(!(e.hasChildren()||i.length>0)||"full"!==t.pathMatch)&&""===t.path}class Yxt{}class Kxt{constructor(i,t,n,r,s,o,l){this.injector=i,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=l,this.applyRedirects=new Bxt(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(i){return new ue(4002,`'${i.segmentGroup}'`)}recognize(){const i=oG(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(i).pipe(Di(t=>{const n=new nR([],Object.freeze({}),Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,{},yn,this.rootComponentType,null,{}),r=new _c(n,t),s=new Qz("",r),o=function V0t(e,i,t=null,n=null){return Bz(Nz(e),i,t,n)}(n,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),this.inheritParamsAndData(s._root,null),{state:s,tree:o}}))}match(i){return this.processSegmentGroup(this.injector,this.config,i,yn).pipe(oa(n=>{if(n instanceof dR)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof cR?this.noMatchError(n):n}))}inheritParamsAndData(i,t){const n=i.value,r=iR(n,t,this.paramsInheritanceStrategy);n.params=Object.freeze(r.params),n.data=Object.freeze(r.data),i.children.forEach(s=>this.inheritParamsAndData(s,n))}processSegmentGroup(i,t,n,r){return 0===n.segments.length&&n.hasChildren()?this.processChildren(i,t,n):this.processSegment(i,t,n,n.segments,r,!0).pipe(Di(s=>s instanceof _c?[s]:[]))}processChildren(i,t,n){const r=[];for(const s of Object.keys(n.children))"primary"===s?r.unshift(s):r.push(s);return Is(r).pipe(Ig(s=>{const o=n.children[s],l=function fxt(e,i){const t=e.filter(n=>nd(n)===i);return t.push(...e.filter(n=>nd(n)!==i)),t}(t,s);return this.processSegmentGroup(i,l,o,s)}),function g0t(e,i){return ds(function p0t(e,i,t,n,r){return(s,o)=>{let l=t,w=i,C=0;s.subscribe(Xr(o,M=>{const P=C++;w=l?e(w,M,P):(l=!0,M),n&&o.next(w)},r&&(()=>{l&&o.next(w),o.complete()})))}}(e,i,arguments.length>=2,!0))}((s,o)=>(s.push(...o),s)),yT(null),function v0t(e,i){const t=arguments.length>=2;return n=>n.pipe(e?In((r,s)=>e(r,s,n)):Ju,XI(1),t?yT(i):Cz(()=>new Eg))}(),_a(s=>{if(null===s)return zg(n);const o=lG(s);return function Zxt(e){e.sort((i,t)=>i.value.outlet===yn?-1:t.value.outlet===yn?1:i.value.outlet.localeCompare(t.value.outlet))}(o),vi(o)}))}processSegment(i,t,n,r,s,o){return Is(t).pipe(Ig(l=>this.processSegmentAgainstRoute(l._injector??i,t,l,n,r,s,o).pipe(oa(w=>{if(w instanceof cR)return vi(null);throw w}))),Vl(l=>!!l),oa(l=>{if(sG(l))return function jxt(e,i,t){return 0===i.length&&!e.children[t]}(n,r,s)?vi(new Yxt):zg(n);throw l}))}processSegmentAgainstRoute(i,t,n,r,s,o,l){return function Xxt(e,i,t,n){return!!(nd(e)===n||n!==yn&&PT(i,t,e))&&hR(i,e,t).matched}(n,r,s,o)?void 0===n.redirectTo?this.matchSegmentAgainstRoute(i,r,n,s,o):this.allowRedirects&&l?this.expandSegmentAgainstRouteUsingRedirect(i,r,t,n,s,o):zg(r):zg(r)}expandSegmentAgainstRouteUsingRedirect(i,t,n,r,s,o){const{matched:l,consumedSegments:w,positionalParamSegments:C,remainingSegments:M}=hR(t,r,s);if(!l)return zg(t);r.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>31&&(this.allowRedirects=!1));const P=this.applyRedirects.applyRedirectCommands(w,r.redirectTo,C);return this.applyRedirects.lineralizeSegments(r,P).pipe(_a(O=>this.processSegment(i,n,t,O.concat(M),o,!1)))}matchSegmentAgainstRoute(i,t,n,r,s){const o=Vxt(t,n,r,i);return"**"===n.path&&(t.children={}),o.pipe(Rs(l=>l.matched?this.getChildConfig(i=n._injector??i,n,r).pipe(Rs(({routes:w})=>{const C=n._loadedInjector??i,{consumedSegments:M,remainingSegments:P,parameters:O}=l,L=new nR(M,O,Object.freeze({...this.urlTree.queryParams}),this.urlTree.fragment,function qxt(e){return e.data||{}}(n),nd(n),n.component??n._loadedComponent??null,n,function tyt(e){return e.resolve||{}}(n)),{segmentGroup:U,slicedSegments:X}=oG(t,M,P,w);if(0===X.length&&U.hasChildren())return this.processChildren(C,w,U).pipe(Di(Z=>null===Z?null:new _c(L,Z)));if(0===w.length&&0===X.length)return vi(new _c(L,[]));const W=nd(n)===s;return this.processSegment(C,w,U,X,W?yn:s,!0).pipe(Di(Z=>new _c(L,Z instanceof _c?[Z]:[])))})):zg(t)))}getChildConfig(i,t,n){return t.children?vi({routes:t.children,injector:i}):t.loadChildren?void 0!==t._loadedRoutes?vi({routes:t._loadedRoutes,injector:t._loadedInjector}):function Fxt(e,i,t,n){const r=i.canLoad;return void 0===r||0===r.length?vi(!0):vi(r.map(o=>{const l=Vg(o,e);return xh(function wxt(e){return e&&hy(e.canLoad)}(l)?l.canLoad(i,t):Nc(e,()=>l(i,t)))})).pipe(Ug(),aG())}(i,t,n).pipe(_a(r=>r?this.configLoader.loadChildren(i,t).pipe(hs(s=>{t._loadedRoutes=s.routes,t._loadedInjector=s.injector})):function Nxt(e){return Mg(eG(!1,xl.GuardRejected))}())):vi({routes:[],injector:i})}}function Jxt(e){const i=e.value.routeConfig;return i&&""===i.path}function lG(e){const i=[],t=new Set;for(const n of e){if(!Jxt(n)){i.push(n);continue}const r=i.find(s=>n.value.routeConfig===s.value.routeConfig);void 0!==r?(r.children.push(...n.children),t.add(r)):i.push(n)}for(const n of t){const r=lG(n.children);i.push(new _c(n.value,r))}return i.filter(n=>!t.has(n))}function cG(e){const i=e.children.map(t=>cG(t)).flat();return[e,...i]}function fR(e){return Rs(i=>{const t=e(i);return t?Is(t).pipe(Di(()=>i)):vi(i)})}let dG=(()=>{class e{buildTitle(t){let n,r=t.root;for(;void 0!==r;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(s=>s.outlet===yn);return n}getResolvedTitleForRoute(t){return t.data[ey]}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(ayt),providedIn:"root"})}return e})(),ayt=(()=>{class e extends dG{constructor(t){super(),this.title=t}updateTitle(t){const n=this.buildTitle(t);void 0!==n&&this.title.setTitle(n)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(vvt))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Gg=new ee("",{providedIn:"root",factory:()=>({})}),Hg=new ee("");let mR=(()=>{class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=me(x9)}loadComponent(t){if(this.componentLoaders.get(t))return this.componentLoaders.get(t);if(t._loadedComponent)return vi(t._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(t);const n=xh(t.loadComponent()).pipe(Di(uG),hs(s=>{this.onLoadEndListener&&this.onLoadEndListener(t),t._loadedComponent=s}),Rg(()=>{this.componentLoaders.delete(t)})),r=new WI(n,()=>new Pe).pipe(HI());return this.componentLoaders.set(t,r),r}loadChildren(t,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return vi({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);const s=function oyt(e,i,t,n){return xh(e.loadChildren()).pipe(Di(uG),_a(r=>r instanceof zV||Array.isArray(r)?vi(r):Is(i.compileModuleAsync(r))),Di(r=>{n&&n(e);let s,o,l=!1;return Array.isArray(r)?(o=r,!0):(s=r.create(t).injector,o=s.get(Hg,[],{optional:!0,self:!0}).flat()),{routes:o.map(lR),injector:s}}))}(n,this.compiler,t,this.onLoadEndListener).pipe(Rg(()=>{this.childrenLoaders.delete(n)})),o=new WI(s,()=>new Pe).pipe(HI());return this.childrenLoaders.set(n,o),o}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uG(e){return function lyt(e){return e&&"object"==typeof e&&"default"in e}(e)?e.default:e}let pR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(cyt),providedIn:"root"})}return e})(),cyt=(()=>{class e{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,n){return t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const hG=new ee(""),fG=new ee("");function dyt(e,i,t){const n=e.get(fG),r=e.get(Ni);return e.get(ii).runOutsideAngular(()=>{if(!r.startViewTransition||n.skipNextTransition)return n.skipNextTransition=!1,Promise.resolve();let s;const o=new Promise(C=>{s=C}),l=r.startViewTransition(()=>(s(),function uyt(e){return new Promise(i=>{sV(i,{injector:e})})}(e))),{onViewTransitionCreated:w}=n;return w&&Nc(e,()=>w({transition:l,from:i,to:t})),o})}let FT=(()=>{class e{get hasRequestedNavigation(){return 0!==this.navigationId}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Pe,this.transitionAbortSubject=new Pe,this.configLoader=me(mR),this.environmentInjector=me(jo),this.urlSerializer=me(Fg),this.rootContexts=me(oy),this.location=me(Xf),this.inputBindingEnabled=null!==me(IT,{optional:!0}),this.titleStrategy=me(dG),this.options=me(Gg,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=me(pR),this.createViewTransition=me(hG,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>vi(void 0),this.rootComponentType=null,this.configLoader.onLoadEndListener=r=>this.events.next(new Z0t(r)),this.configLoader.onLoadStartListener=r=>this.events.next(new K0t(r))}complete(){this.transitions?.complete()}handleNavigationRequest(t){const n=++this.navigationId;this.transitions?.next({...this.transitions.value,...t,id:n})}setupNavigations(t,n,r){return this.transitions=new Wr({id:0,currentUrlTree:n,currentRawUrl:n,extractedUrl:this.urlHandlingStrategy.extract(n),urlAfterRedirects:this.urlHandlingStrategy.extract(n),rawUrl:n,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:ay,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(In(s=>0!==s.id),Di(s=>({...s,extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Rs(s=>{let o=!1,l=!1;return vi(s).pipe(Rs(w=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",xl.SupersededByNewNavigation),Zo;this.currentTransition=s,this.currentNavigation={id:w.id,initialUrl:w.rawUrl,extractedUrl:w.extractedUrl,trigger:w.source,extras:w.extras,previousNavigation:this.lastSuccessfulNavigation?{...this.lastSuccessfulNavigation,previousNavigation:null}:null};const C=!t.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl();if(!C&&"reload"!==(w.extras.onSameUrlNavigation??t.onSameUrlNavigation)){const P="";return this.events.next(new Ng(w.id,this.urlSerializer.serialize(w.rawUrl),P,DT.IgnoredSameUrlNavigation)),w.resolve(null),Zo}if(this.urlHandlingStrategy.shouldProcessUrl(w.rawUrl))return vi(w).pipe(Rs(P=>{const O=this.transitions?.getValue();return this.events.next(new AT(P.id,this.urlSerializer.serialize(P.extractedUrl),P.source,P.restoredState)),O!==this.transitions?.getValue()?Zo:Promise.resolve(P)}),function eyt(e,i,t,n,r,s){return _a(o=>function $xt(e,i,t,n,r,s,o="emptyOnly"){return new Kxt(e,i,t,n,r,o,s).recognize()}(e,i,t,n,o.extractedUrl,r,s).pipe(Di(({state:l,tree:w})=>({...o,targetSnapshot:l,urlAfterRedirects:w}))))}(this.environmentInjector,this.configLoader,this.rootComponentType,t.config,this.urlSerializer,this.paramsInheritanceStrategy),hs(P=>{s.targetSnapshot=P.targetSnapshot,s.urlAfterRedirects=P.urlAfterRedirects,this.currentNavigation={...this.currentNavigation,finalUrl:P.urlAfterRedirects};const O=new Wz(P.id,this.urlSerializer.serialize(P.extractedUrl),this.urlSerializer.serialize(P.urlAfterRedirects),P.targetSnapshot);this.events.next(O)}));if(C&&this.urlHandlingStrategy.shouldProcessUrl(w.currentRawUrl)){const{id:P,extractedUrl:O,source:L,restoredState:U,extras:X}=w,W=new AT(P,this.urlSerializer.serialize(O),L,U);this.events.next(W);const Z=$z(this.rootComponentType).snapshot;return this.currentTransition=s={...w,targetSnapshot:Z,urlAfterRedirects:O,extras:{...X,skipLocationChange:!1,replaceUrl:!1}},this.currentNavigation.finalUrl=O,vi(s)}{const P="";return this.events.next(new Ng(w.id,this.urlSerializer.serialize(w.extractedUrl),P,DT.IgnoredByUrlHandlingStrategy)),w.resolve(null),Zo}}),hs(w=>{const C=new j0t(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects),w.targetSnapshot);this.events.next(C)}),Di(w=>(this.currentTransition=s={...w,guards:gxt(w.targetSnapshot,w.currentSnapshot,this.rootContexts)},s)),function Ext(e,i){return _a(t=>{const{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=t;return 0===o.length&&0===s.length?vi({...t,guardsResult:!0}):function Axt(e,i,t,n){return Is(e).pipe(_a(r=>function Pxt(e,i,t,n,r){const s=i&&i.routeConfig?i.routeConfig.canDeactivate:null;return s&&0!==s.length?vi(s.map(l=>{const w=cy(i)??r,C=Vg(l,w);return xh(function Cxt(e){return e&&hy(e.canDeactivate)}(C)?C.canDeactivate(e,i,t,n):Nc(w,()=>C(e,i,t,n))).pipe(Vl())})).pipe(Ug()):vi(!0)}(r.component,r.route,t,i,n)),Vl(r=>!0!==r,!0))}(o,n,r,e).pipe(_a(l=>l&&function bxt(e){return"boolean"==typeof e}(l)?function Dxt(e,i,t,n){return Is(i).pipe(Ig(r=>ty(function Ixt(e,i){return null!==e&&i&&i(new J0t(e)),vi(!0)}(r.route.parent,n),function Mxt(e,i){return null!==e&&i&&i(new txt(e)),vi(!0)}(r.route,n),function kxt(e,i,t){const n=i[i.length-1],s=i.slice(0,i.length-1).reverse().map(o=>function vxt(e){const i=e.routeConfig?e.routeConfig.canActivateChild:null;return i&&0!==i.length?{node:e,guards:i}:null}(o)).filter(o=>null!==o).map(o=>Dg(()=>vi(o.guards.map(w=>{const C=cy(o.node)??t,M=Vg(w,C);return xh(function Txt(e){return e&&hy(e.canActivateChild)}(M)?M.canActivateChild(n,e):Nc(C,()=>M(n,e))).pipe(Vl())})).pipe(Ug())));return vi(s).pipe(Ug())}(e,r.path,t),function Rxt(e,i,t){const n=i.routeConfig?i.routeConfig.canActivate:null;if(!n||0===n.length)return vi(!0);const r=n.map(s=>Dg(()=>{const o=cy(i)??t,l=Vg(s,o);return xh(function _xt(e){return e&&hy(e.canActivate)}(l)?l.canActivate(i,e):Nc(o,()=>l(i,e))).pipe(Vl())}));return vi(r).pipe(Ug())}(e,r.route,t))),Vl(r=>!0!==r,!0))}(n,s,e,i):vi(l)),Di(l=>({...t,guardsResult:l})))})}(this.environmentInjector,w=>this.events.next(w)),hs(w=>{if(s.guardsResult=w.guardsResult,Og(w.guardsResult))throw tG(0,w.guardsResult);const C=new Y0t(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects),w.targetSnapshot,!!w.guardsResult);this.events.next(C)}),In(w=>!!w.guardsResult||(this.cancelNavigationTransition(w,"",xl.GuardRejected),!1)),fR(w=>{if(w.guards.canActivateChecks.length)return vi(w).pipe(hs(C=>{const M=new $0t(C.id,this.urlSerializer.serialize(C.extractedUrl),this.urlSerializer.serialize(C.urlAfterRedirects),C.targetSnapshot);this.events.next(M)}),Rs(C=>{let M=!1;return vi(C).pipe(function iyt(e,i){return _a(t=>{const{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return vi(t);const s=new Set(r.map(w=>w.route)),o=new Set;for(const w of s)if(!o.has(w))for(const C of cG(w))o.add(C);let l=0;return Is(o).pipe(Ig(w=>s.has(w)?function nyt(e,i,t,n){const r=e.routeConfig,s=e._resolve;return void 0!==r?.title&&!Zz(r)&&(s[ey]=r.title),function ryt(e,i,t,n){const r=jI(e);if(0===r.length)return vi({});const s={};return Is(r).pipe(_a(o=>function syt(e,i,t,n){const r=cy(i)??n,s=Vg(e,r);return xh(s.resolve?s.resolve(i,t):Nc(r,()=>s(i,t)))}(e[o],i,t,n).pipe(Vl(),hs(l=>{s[o]=l}))),XI(1),bT(s),oa(o=>sG(o)?Zo:Mg(o)))}(s,e,i,n).pipe(Di(o=>(e._resolvedData=o,e.data=iR(e,e.parent,t).resolve,null)))}(w,n,e,i):(w.data=iR(w,w.parent,e).resolve,vi(void 0))),hs(()=>l++),XI(1),_a(w=>l===o.size?vi(t):Zo))})}(this.paramsInheritanceStrategy,this.environmentInjector),hs({next:()=>M=!0,complete:()=>{M||this.cancelNavigationTransition(C,"",xl.NoDataFromResolver)}}))}),hs(C=>{const M=new Q0t(C.id,this.urlSerializer.serialize(C.extractedUrl),this.urlSerializer.serialize(C.urlAfterRedirects),C.targetSnapshot);this.events.next(M)}))}),fR(w=>{const C=M=>{const P=[];M.routeConfig?.loadComponent&&!M.routeConfig._loadedComponent&&P.push(this.configLoader.loadComponent(M.routeConfig).pipe(hs(O=>{M.component=O}),Di(()=>{})));for(const O of M.children)P.push(...C(O));return P};return Zd(C(w.targetSnapshot.root)).pipe(yT(null),er(1))}),fR(()=>this.afterPreactivation()),Rs(()=>{const{currentSnapshot:w,targetSnapshot:C}=s,M=this.createViewTransition?.(this.environmentInjector,w.root,C.root);return M?Is(M).pipe(Di(()=>s)):vi(s)}),Di(w=>{const C=function sxt(e,i,t){const n=ly(e,i._root,t?t._root:void 0);return new Yz(n,i)}(t.routeReuseStrategy,w.targetSnapshot,w.currentRouterState);return this.currentTransition=s={...w,targetRouterState:C},this.currentNavigation.targetRouterState=C,s}),hs(()=>{this.events.next(new JI)}),((e,i,t,n)=>Di(r=>(new pxt(i,r.targetRouterState,r.currentRouterState,t,n).activate(e),r)))(this.rootContexts,t.routeReuseStrategy,w=>this.events.next(w),this.inputBindingEnabled),er(1),hs({next:w=>{o=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new id(w.id,this.urlSerializer.serialize(w.extractedUrl),this.urlSerializer.serialize(w.urlAfterRedirects))),this.titleStrategy?.updateTitle(w.targetRouterState.snapshot),w.resolve(!0)},complete:()=>{o=!0}}),Ui(this.transitionAbortSubject.pipe(hs(w=>{throw w}))),Rg(()=>{!o&&!l&&this.cancelNavigationTransition(s,"",xl.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),oa(w=>{if(l=!0,iG(w))this.events.next(new Lg(s.id,this.urlSerializer.serialize(s.extractedUrl),w.message,w.cancellationCode)),function lxt(e){return iG(e)&&Og(e.url)}(w)?this.events.next(new qI(w.url)):s.resolve(!1);else{this.events.next(new MT(s.id,this.urlSerializer.serialize(s.extractedUrl),w,s.targetSnapshot??void 0));try{s.resolve(t.errorHandler(w))}catch(C){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(C)}}return Zo}))}))}cancelNavigationTransition(t,n,r){const s=new Lg(t.id,this.urlSerializer.serialize(t.extractedUrl),n,r);this.events.next(s),t.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hyt(e){return e!==ay}let fyt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(pyt),providedIn:"root"})}return e})();class myt{shouldDetach(i){return!1}store(i,t){}shouldAttach(i){return!1}retrieve(i){return null}shouldReuseRoute(i,t){return i.routeConfig===t.routeConfig}}let pyt=(()=>{class e extends myt{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),mG=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:()=>me(gyt),providedIn:"root"})}return e})(),gyt=(()=>{class e extends mG{constructor(){super(...arguments),this.location=me(Xf),this.urlSerializer=me(Fg),this.options=me(Gg,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=me(pR),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Pg,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=$z(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(t){return this.location.subscribe(n=>{"popstate"===n.type&&t(n.url,n.state)})}handleRouterEvent(t,n){if(t instanceof AT)this.stateMemento=this.createStateMemento();else if(t instanceof Ng)this.rawUrlTree=n.initialUrl;else if(t instanceof Wz){if("eager"===this.urlUpdateStrategy&&!n.extras.skipLocationChange){const r=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl);this.setBrowserUrl(r,n)}}else t instanceof JI?(this.currentUrlTree=n.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl),this.routerState=n.targetRouterState,"deferred"===this.urlUpdateStrategy&&(n.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,n))):t instanceof Lg&&(t.code===xl.GuardRejected||t.code===xl.NoDataFromResolver)?this.restoreHistory(n):t instanceof MT?this.restoreHistory(n,!0):t instanceof id&&(this.lastSuccessfulId=t.id,this.currentPageId=this.browserPageId)}setBrowserUrl(t,n){const r=this.urlSerializer.serialize(t);if(this.location.isCurrentPathEqualTo(r)||n.extras.replaceUrl){const o={...n.extras.state,...this.generateNgRouterState(n.id,this.browserPageId)};this.location.replaceState(r,"",o)}else{const s={...n.extras.state,...this.generateNgRouterState(n.id,this.browserPageId+1)};this.location.go(r,"",s)}}restoreHistory(t,n=!1){if("computed"===this.canceledNavigationResolution){const s=this.currentPageId-this.browserPageId;0!==s?this.location.historyGo(s):this.currentUrlTree===t.finalUrl&&0===s&&(this.resetState(t),this.resetUrlToCurrentUrlTree())}else"replace"===this.canceledNavigationResolution&&(n&&this.resetState(t),this.resetUrlToCurrentUrlTree())}resetState(t){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(t,n){return"computed"===this.canceledNavigationResolution?{navigationId:t,\u0275routerPageId:n}:{navigationId:t}}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var fy=function(e){return e[e.COMPLETE=0]="COMPLETE",e[e.FAILED=1]="FAILED",e[e.REDIRECTING=2]="REDIRECTING",e}(fy||{});function pG(e,i){e.events.pipe(In(t=>t instanceof id||t instanceof Lg||t instanceof MT||t instanceof Ng),Di(t=>t instanceof id||t instanceof Ng?fy.COMPLETE:t instanceof Lg&&(t.code===xl.Redirect||t.code===xl.SupersededByNewNavigation)?fy.REDIRECTING:fy.FAILED),In(t=>t!==fy.REDIRECTING),er(1)).subscribe(()=>{i()})}function vyt(e){throw e}const xyt={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},yyt={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"};let Fo=(()=>{class e{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.isNgZoneEnabled=!1,this.console=me(l9),this.stateManager=me(mG),this.options=me(Gg,{optional:!0})||{},this.pendingTasks=me(ch),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=me(FT),this.urlSerializer=me(Fg),this.location=me(Xf),this.urlHandlingStrategy=me(pR),this._events=new Pe,this.errorHandler=this.options.errorHandler||vyt,this.navigated=!1,this.routeReuseStrategy=me(fyt),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=me(Hg,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!me(IT,{optional:!0}),this.eventsSubscription=new Ie,this.isNgZoneEnabled=me(ii)instanceof ii&&ii.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:t=>{this.console.warn(t)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){const t=this.navigationTransitions.events.subscribe(n=>{try{const r=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(null!==r&&null!==s)if(this.stateManager.handleRouterEvent(n,s),n instanceof Lg&&n.code!==xl.Redirect&&n.code!==xl.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof id)this.navigated=!0;else if(n instanceof qI){const o=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),l={info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy||hyt(r.source)};this.scheduleNavigation(o,ay,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}(function wyt(e){return!(e instanceof JI||e instanceof qI)})(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(t)}resetRootComponentType(t){this.routerState.root.component=t,this.navigationTransitions.rootComponentType=t}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),ay,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((t,n)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(t,"popstate",n)},0)})}navigateToSyncWithBrowser(t,n,r){const s={replaceUrl:!0},o=r?.navigationId?r:null;if(r){const w={...r};delete w.navigationId,delete w.\u0275routerPageId,0!==Object.keys(w).length&&(s.state=w)}const l=this.parseUrl(t);this.scheduleNavigation(l,n,o,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(t){this.config=t.map(lR),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(t,n={}){const{relativeTo:r,queryParams:s,fragment:o,queryParamsHandling:l,preserveFragment:w}=n,C=w?this.currentUrlTree.fragment:o;let P,M=null;switch(l){case"merge":M={...this.currentUrlTree.queryParams,...s};break;case"preserve":M=this.currentUrlTree.queryParams;break;default:M=s||null}null!==M&&(M=this.removeEmptyProps(M));try{P=Nz(r?r.snapshot:this.routerState.snapshot.root)}catch{("string"!=typeof t[0]||!t[0].startsWith("/"))&&(t=[]),P=this.currentUrlTree.root}return Bz(P,t,M,C??null)}navigateByUrl(t,n={skipLocationChange:!1}){const r=Og(t)?t:this.parseUrl(t),s=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(s,ay,null,n)}navigate(t,n={skipLocationChange:!1}){return function byt(e){for(let i=0;i(null!=s&&(n[r]=s),n),{})}scheduleNavigation(t,n,r,s,o){if(this.disposed)return Promise.resolve(!1);let l,w,C;o?(l=o.resolve,w=o.reject,C=o.promise):C=new Promise((P,O)=>{l=P,w=O});const M=this.pendingTasks.add();return pG(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(M))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:t,extras:s,resolve:l,reject:w,promise:C,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),C.catch(P=>Promise.reject(P))}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class gG{}let Cyt=(()=>{class e{constructor(t,n,r,s,o){this.router=t,this.injector=r,this.preloadingStrategy=s,this.loader=o}setUpPreloading(){this.subscription=this.router.events.pipe(In(t=>t instanceof id),Ig(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,n){const r=[];for(const s of n){s.providers&&!s._injector&&(s._injector=T_(s.providers,t,`Route: ${s.path}`));const o=s._injector??t,l=s._loadedInjector??o;(s.loadChildren&&!s._loadedRoutes&&void 0===s.canLoad||s.loadComponent&&!s._loadedComponent)&&r.push(this.preloadConfig(o,s)),(s.children||s._loadedRoutes)&&r.push(this.processRoutes(l,s.children??s._loadedRoutes))}return Is(r).pipe(Ag())}preloadConfig(t,n){return this.preloadingStrategy.preload(n,()=>{let r;r=n.loadChildren&&void 0===n.canLoad?this.loader.loadChildren(t,n):vi(null);const s=r.pipe(_a(o=>null===o?vi(void 0):(n._loadedRoutes=o.routes,n._loadedInjector=o.injector,this.processRoutes(o.injector??t,o.routes))));return n.loadComponent&&!n._loadedComponent?Is([s,this.loader.loadComponent(n)]).pipe(Ag()):s})}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Fo),Jt(x9),Jt(jo),Jt(gG),Jt(mR))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const vR=new ee("");let vG=(()=>{class e{constructor(t,n,r,s,o={}){this.urlSerializer=t,this.transitions=n,this.viewportScroller=r,this.zone=s,this.options=o,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},o.scrollPositionRestoration||="disabled",o.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(t=>{t instanceof AT?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof id?(this.lastId=t.id,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.urlAfterRedirects).fragment)):t instanceof Ng&&t.code===DT.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(t,this.urlSerializer.parse(t.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(t=>{t instanceof Xz&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,n){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new Xz(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,n))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}static#t=this.\u0275fac=function(n){a_()};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function rd(e,i){return{\u0275kind:e,\u0275providers:i}}function yG(){const e=me(is);return i=>{const t=e.get(jd);if(i!==t.components[0])return;const n=e.get(Fo),r=e.get(bG);1===e.get(xR)&&n.initialNavigation(),e.get(wG,null,Ln.Optional)?.setUpPreloading(),e.get(vR,null,Ln.Optional)?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}const bG=new ee("",{factory:()=>new Pe}),xR=new ee("",{providedIn:"root",factory:()=>1}),wG=new ee("");function Dyt(e){return rd(0,[{provide:wG,useExisting:Cyt},{provide:gG,useExisting:e}])}function Iyt(e){return rd(9,[{provide:hG,useValue:dyt},{provide:fG,useValue:{skipNextTransition:!!e?.skipInitialTransition,...e}}])}const _G=new ee("ROUTER_FORROOT_GUARD"),Ryt=[Xf,{provide:Fg,useClass:YI},Fo,oy,{provide:Tc,useFactory:function xG(e){return e.routerState.root},deps:[Fo]},mR,[]];let TG=(()=>{class e{constructor(t){}static forRoot(t,n){return{ngModule:e,providers:[Ryt,[],{provide:Hg,multi:!0,useValue:t},{provide:_G,useFactory:Oyt,deps:[[Fo,new Nd,new Tf]]},{provide:Gg,useValue:n||{}},n?.useHash?{provide:Wf,useClass:rpt}:{provide:Wf,useClass:cU},{provide:vR,useFactory:()=>{const e=me(xgt),i=me(ii),t=me(Gg),n=me(FT),r=me(Fg);return t.scrollOffset&&e.setOffset(t.scrollOffset),new vG(r,n,e,i,t)}},n?.preloadingStrategy?Dyt(n.preloadingStrategy).\u0275providers:[],n?.initialNavigation?Lyt(n):[],n?.bindToComponentInputs?rd(8,[Jz,{provide:IT,useExisting:Jz}]).\u0275providers:[],n?.enableViewTransitions?Iyt().\u0275providers:[],[{provide:CG,useFactory:yG},{provide:ZM,multi:!0,useExisting:CG}]]}}static forChild(t){return{ngModule:e,providers:[{provide:Hg,multi:!0,useValue:t}]}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(_G,8))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();function Oyt(e){return"guarded"}function Lyt(e){return["disabled"===e.initialNavigation?rd(3,[{provide:QM,multi:!0,useFactory:()=>{const i=me(Fo);return()=>{i.setUpLocationChangeListener()}}},{provide:xR,useValue:2}]).\u0275providers:[],"enabledBlocking"===e.initialNavigation?rd(2,[{provide:xR,useValue:0},{provide:QM,multi:!0,deps:[is],useFactory:i=>{const t=i.get(ipt,Promise.resolve());return()=>t.then(()=>new Promise(n=>{const r=i.get(Fo),s=i.get(bG);pG(r,()=>{n(!0)}),i.get(FT).afterPreactivation=()=>(n(!0),s.closed?vi(void 0):s),r.initialNavigation()}))}}]).\u0275providers:[]]}const CG=new ee("");class OT{}function yR(e){return e&&"function"==typeof e.connect&&!(e instanceof WI)}var Jd=function(e){return e[e.REPLACED=0]="REPLACED",e[e.INSERTED=1]="INSERTED",e[e.MOVED=2]="MOVED",e[e.REMOVED=3]="REMOVED",e}(Jd||{});const my=new ee("_ViewRepeater");class SG{applyChanges(i,t,n,r,s){i.forEachOperation((o,l,w)=>{let C,M;if(null==o.previousIndex){const P=n(o,l,w);C=t.createEmbeddedView(P.templateRef,P.context,P.index),M=Jd.INSERTED}else null==w?(t.remove(l),M=Jd.REMOVED):(C=t.get(l),t.move(C,w),M=Jd.MOVED);s&&s({context:C?.context,operation:M,record:o})})}detach(){}}class bR{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(i=!1,t,n=!0,r){this._multiple=i,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Pe,t&&t.length&&(i?t.forEach(s=>this._markSelected(s)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...i){this._verifyValueAssignment(i),i.forEach(n=>this._markSelected(n));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...i){this._verifyValueAssignment(i),i.forEach(n=>this._unmarkSelected(n));const t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...i){this._verifyValueAssignment(i);const t=this.selected,n=new Set(i);i.forEach(s=>this._markSelected(s)),t.filter(s=>!n.has(this._getConcreteValue(s,n))).forEach(s=>this._unmarkSelected(s));const r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(i){return this.isSelected(i)?this.deselect(i):this.select(i)}clear(i=!0){this._unmarkAll();const t=this._hasQueuedChanges();return i&&this._emitChangeEvent(),t}isSelected(i){return this._selection.has(this._getConcreteValue(i))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(i){this._multiple&&this.selected&&this._selected.sort(i)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(i){i=this._getConcreteValue(i),this.isSelected(i)||(this._multiple||this._unmarkAll(),this.isSelected(i)||this._selection.add(i),this._emitChanges&&this._selectedToEmit.push(i))}_unmarkSelected(i){i=this._getConcreteValue(i),this.isSelected(i)&&(this._selection.delete(i),this._emitChanges&&this._deselectedToEmit.push(i))}_unmarkAll(){this.isEmpty()||this._selection.forEach(i=>this._unmarkSelected(i))}_verifyValueAssignment(i){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(i,t){if(this.compareWith){t=t??this._selection;for(let n of t)if(this.compareWith(i,n))return n;return i}return i}}let wR=(()=>{class e{constructor(){this._listeners=[]}notify(t,n){for(let r of this._listeners)r(t,n)}listen(t){return this._listeners.push(t),()=>{this._listeners=this._listeners.filter(n=>t!==n)}}ngOnDestroy(){this._listeners=[]}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Ca(e,i){const t="object"==typeof i;return new Promise((n,r)=>{let o,s=!1;e.subscribe({next:l=>{o=l,s=!0},error:r,complete:()=>{s?n(o):t?n(i.defaultValue):r(new Eg)}})})}const _R={now:()=>(_R.delegate||Date).now(),delegate:void 0};class py extends Pe{constructor(i=1/0,t=1/0,n=_R){super(),this._bufferSize=i,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,i),this._windowTime=Math.max(1,t)}next(i){const{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:s,_windowTime:o}=this;t||(n.push(i),!r&&n.push(s.now()+o)),this._trimBuffer(),super.next(i)}_subscribe(i){this._throwIfClosed(),this._trimBuffer();const t=this._innerSubscribe(i),{_infiniteTimeWindow:n,_buffer:r}=this,s=r.slice();for(let o=0;o{this.headers=new Map,i.split("\n").forEach(t=>{const n=t.indexOf(":");if(n>0){const r=t.slice(0,n),s=r.toLowerCase(),o=t.slice(n+1).trim();this.maybeSetNormalizedName(r,s),this.headers.has(s)?this.headers.get(s).push(o):this.headers.set(s,[o])}})}:typeof Headers<"u"&&i instanceof Headers?(this.headers=new Map,i.forEach((t,n)=>{this.setHeaderEntries(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(i).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}:this.headers=new Map}has(i){return this.init(),this.headers.has(i.toLowerCase())}get(i){this.init();const t=this.headers.get(i.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(i){return this.init(),this.headers.get(i.toLowerCase())||null}append(i,t){return this.clone({name:i,value:t,op:"a"})}set(i,t){return this.clone({name:i,value:t,op:"s"})}delete(i,t){return this.clone({name:i,value:t,op:"d"})}maybeSetNormalizedName(i,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,i)}init(){this.lazyInit&&(this.lazyInit instanceof Jo?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(i=>this.applyUpdate(i)),this.lazyUpdate=null))}copyFrom(i){i.init(),Array.from(i.headers.keys()).forEach(t=>{this.headers.set(t,i.headers.get(t)),this.normalizedNames.set(t,i.normalizedNames.get(t))})}clone(i){const t=new Jo;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof Jo?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([i]),t}applyUpdate(i){const t=i.name.toLowerCase();switch(i.op){case"a":case"s":let n=i.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(i.name,t);const r=("a"===i.op?this.headers.get(t):void 0)||[];r.push(...n),this.headers.set(t,r);break;case"d":const s=i.value;if(s){let o=this.headers.get(t);if(!o)return;o=o.filter(l=>-1===s.indexOf(l)),0===o.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(i,t){const n=(Array.isArray(t)?t:[t]).map(s=>s.toString()),r=i.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(i,r)}forEach(i){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>i(this.normalizedNames.get(t),this.headers.get(t)))}}class Byt{encodeKey(i){return AG(i)}encodeValue(i){return AG(i)}decodeKey(i){return decodeURIComponent(i)}decodeValue(i){return decodeURIComponent(i)}}const Uyt=/%(\d[a-f0-9])/gi,zyt={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function AG(e){return encodeURIComponent(e).replace(Uyt,(i,t)=>zyt[t]??i)}function BT(e){return`${e}`}class yh{constructor(i={}){if(this.updates=null,this.cloneFrom=null,this.encoder=i.encoder||new Byt,i.fromString){if(i.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function Vyt(e,i){const t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(r=>{const s=r.indexOf("="),[o,l]=-1==s?[i.decodeKey(r),""]:[i.decodeKey(r.slice(0,s)),i.decodeValue(r.slice(s+1))],w=t.get(o)||[];w.push(l),t.set(o,w)}),t}(i.fromString,this.encoder)}else i.fromObject?(this.map=new Map,Object.keys(i.fromObject).forEach(t=>{const n=i.fromObject[t],r=Array.isArray(n)?n.map(BT):[BT(n)];this.map.set(t,r)})):this.map=null}has(i){return this.init(),this.map.has(i)}get(i){this.init();const t=this.map.get(i);return t?t[0]:null}getAll(i){return this.init(),this.map.get(i)||null}keys(){return this.init(),Array.from(this.map.keys())}append(i,t){return this.clone({param:i,value:t,op:"a"})}appendAll(i){const t=[];return Object.keys(i).forEach(n=>{const r=i[n];Array.isArray(r)?r.forEach(s=>{t.push({param:n,value:s,op:"a"})}):t.push({param:n,value:r,op:"a"})}),this.clone(t)}set(i,t){return this.clone({param:i,value:t,op:"s"})}delete(i,t){return this.clone({param:i,value:t,op:"d"})}toString(){return this.init(),this.keys().map(i=>{const t=this.encoder.encodeKey(i);return this.map.get(i).map(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(i=>""!==i).join("&")}clone(i){const t=new yh({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(i),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(i=>this.map.set(i,this.cloneFrom.map.get(i))),this.updates.forEach(i=>{switch(i.op){case"a":case"s":const t=("a"===i.op?this.map.get(i.param):void 0)||[];t.push(BT(i.value)),this.map.set(i.param,t);break;case"d":if(void 0===i.value){this.map.delete(i.param);break}{let n=this.map.get(i.param)||[];const r=n.indexOf(BT(i.value));-1!==r&&n.splice(r,1),n.length>0?this.map.set(i.param,n):this.map.delete(i.param)}}}),this.cloneFrom=this.updates=null)}}class Gyt{constructor(){this.map=new Map}set(i,t){return this.map.set(i,t),this}get(i){return this.map.has(i)||this.map.set(i,i.defaultValue()),this.map.get(i)}delete(i){return this.map.delete(i),this}has(i){return this.map.has(i)}keys(){return this.map.keys()}}function DG(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function MG(e){return typeof Blob<"u"&&e instanceof Blob}function IG(e){return typeof FormData<"u"&&e instanceof FormData}class gy{constructor(i,t,n,r){let s;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=i.toUpperCase(),function Hyt(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,s=r):s=n,s&&(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),this.transferCache=s.transferCache),this.headers??=new Jo,this.context??=new Gyt,this.params){const o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{const l=t.indexOf("?");this.urlWithParams=t+(-1===l?"?":lO.set(L,i.setHeaders[L]),C)),i.setParams&&(M=Object.keys(i.setParams).reduce((O,L)=>O.set(L,i.setParams[L]),M)),new gy(t,n,o,{params:M,headers:C,context:P,reportProgress:w,responseType:r,withCredentials:l,transferCache:s})}}var bh=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(bh||{});class TR{constructor(i,t=vy.Ok,n="OK"){this.headers=i.headers||new Jo,this.status=void 0!==i.status?i.status:t,this.statusText=i.statusText||n,this.url=i.url||null,this.ok=this.status>=200&&this.status<300}}class VT extends TR{constructor(i={}){super(i),this.type=bh.ResponseHeader}clone(i={}){return new VT({headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class Yf extends TR{constructor(i={}){super(i),this.type=bh.Response,this.body=void 0!==i.body?i.body:null}clone(i={}){return new Yf({body:void 0!==i.body?i.body:this.body,headers:i.headers||this.headers,status:void 0!==i.status?i.status:this.status,statusText:i.statusText||this.statusText,url:i.url||this.url||void 0})}}class Wg extends TR{constructor(i){super(i,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${i.url||"(unknown url)"}`:`Http failure response for ${i.url||"(unknown url)"}: ${i.status} ${i.statusText}`,this.error=i.error||null}}var vy=function(e){return e[e.Continue=100]="Continue",e[e.SwitchingProtocols=101]="SwitchingProtocols",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints",e[e.Ok=200]="Ok",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.ImUsed=226]="ImUsed",e[e.MultipleChoices=300]="MultipleChoices",e[e.MovedPermanently=301]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.UseProxy=305]="UseProxy",e[e.Unused=306]="Unused",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.UriTooLong=414]="UriTooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.ImATeapot=418]="ImATeapot",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.TooEarly=425]="TooEarly",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HttpVersionNotSupported=505]="HttpVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired",e}(vy||{});function CR(e,i){return{body:i,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let sd=(()=>{class e{constructor(t){this.handler=t}request(t,n,r={}){let s;if(t instanceof gy)s=t;else{let w,C;w=r.headers instanceof Jo?r.headers:new Jo(r.headers),r.params&&(C=r.params instanceof yh?r.params:new yh({fromObject:r.params})),s=new gy(t,n,void 0!==r.body?r.body:null,{headers:w,context:r.context,params:C,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache})}const o=vi(s).pipe(Ig(w=>this.handler.handle(w)));if(t instanceof gy||"events"===r.observe)return o;const l=o.pipe(In(w=>w instanceof Yf));switch(r.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(Di(w=>{if(null!==w.body&&!(w.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return w.body}));case"blob":return l.pipe(Di(w=>{if(null!==w.body&&!(w.body instanceof Blob))throw new Error("Response is not a Blob.");return w.body}));case"text":return l.pipe(Di(w=>{if(null!==w.body&&"string"!=typeof w.body)throw new Error("Response is not a string.");return w.body}));default:return l.pipe(Di(w=>w.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(t,n={}){return this.request("DELETE",t,n)}get(t,n={}){return this.request("GET",t,n)}head(t,n={}){return this.request("HEAD",t,n)}jsonp(t,n){return this.request("JSONP",t,{params:(new yh).append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,n={}){return this.request("OPTIONS",t,n)}patch(t,n,r={}){return this.request("PATCH",t,CR(r,n))}post(t,n,r={}){return this.request("POST",t,CR(r,n))}put(t,n,r={}){return this.request("PUT",t,CR(r,n))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(LT))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function kG(e,i){return i(e)}function Qyt(e,i){return(t,n)=>i.intercept(t,{handle:r=>e(r,n)})}const Zyt=new ee(""),xy=new ee(""),PG=new ee(""),FG=new ee("");function Jyt(){let e=null;return(i,t)=>{null===e&&(e=(me(Zyt,{optional:!0})??[]).reduceRight(Qyt,kG));const n=me(ch),r=n.add();return e(i,t).pipe(Rg(()=>n.remove(r)))}}let OG=(()=>{class e extends LT{constructor(t,n){super(),this.backend=t,this.injector=n,this.chain=null,this.pendingTasks=me(ch);const r=me(FG,{optional:!0});this.backend=r??t}handle(t){if(null===this.chain){const r=Array.from(new Set([...this.injector.get(xy),...this.injector.get(PG,[])]));this.chain=r.reduceRight((s,o)=>function Kyt(e,i,t){return(n,r)=>Nc(t,()=>i(n,s=>e(s,r)))}(s,o,this.injector),kG)}const n=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(Rg(()=>this.pendingTasks.remove(n)))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(NT),Jt(jo))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const nbt=/^\)\]\}',?\n/;let NG=(()=>{class e{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new ue(-2800,!1);const n=this.xhrFactory;return(n.\u0275loadImpl?Is(n.\u0275loadImpl()):vi(null)).pipe(Rs(()=>new ur(s=>{const o=n.build();if(o.open(t.method,t.urlWithParams),t.withCredentials&&(o.withCredentials=!0),t.headers.forEach((X,W)=>o.setRequestHeader(X,W.join(","))),t.headers.has("Accept")||o.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const X=t.detectContentTypeHeader();null!==X&&o.setRequestHeader("Content-Type",X)}if(t.responseType){const X=t.responseType.toLowerCase();o.responseType="json"!==X?X:"text"}const l=t.serializeBody();let w=null;const C=()=>{if(null!==w)return w;const X=o.statusText||"OK",W=new Jo(o.getAllResponseHeaders()),Z=function rbt(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(o)||t.url;return w=new VT({headers:W,status:o.status,statusText:X,url:Z}),w},M=()=>{let{headers:X,status:W,statusText:Z,url:rt}=C(),st=null;W!==vy.NoContent&&(st=typeof o.response>"u"?o.responseText:o.response),0===W&&(W=st?vy.Ok:0);let vt=W>=200&&W<300;if("json"===t.responseType&&"string"==typeof st){const _t=st;st=st.replace(nbt,"");try{st=""!==st?JSON.parse(st):null}catch(Mt){st=_t,vt&&(vt=!1,st={error:Mt,text:st})}}vt?(s.next(new Yf({body:st,headers:X,status:W,statusText:Z,url:rt||void 0})),s.complete()):s.error(new Wg({error:st,headers:X,status:W,statusText:Z,url:rt||void 0}))},P=X=>{const{url:W}=C(),Z=new Wg({error:X,status:o.status||0,statusText:o.statusText||"Unknown Error",url:W||void 0});s.error(Z)};let O=!1;const L=X=>{O||(s.next(C()),O=!0);let W={type:bh.DownloadProgress,loaded:X.loaded};X.lengthComputable&&(W.total=X.total),"text"===t.responseType&&o.responseText&&(W.partialText=o.responseText),s.next(W)},U=X=>{let W={type:bh.UploadProgress,loaded:X.loaded};X.lengthComputable&&(W.total=X.total),s.next(W)};return o.addEventListener("load",M),o.addEventListener("error",P),o.addEventListener("timeout",P),o.addEventListener("abort",P),t.reportProgress&&(o.addEventListener("progress",L),null!==l&&o.upload&&o.upload.addEventListener("progress",U)),o.send(l),s.next({type:bh.Sent}),()=>{o.removeEventListener("error",P),o.removeEventListener("abort",P),o.removeEventListener("load",M),o.removeEventListener("timeout",P),t.reportProgress&&(o.removeEventListener("progress",L),null!==l&&o.upload&&o.upload.removeEventListener("progress",U)),o.readyState!==o.DONE&&o.abort()}})))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(kU))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();const AR=new ee(""),BG=new ee("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),VG=new ee("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class UG{}let obt=(()=>{class e{constructor(t,n,r){this.doc=t,this.platform=n,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=yU(t,this.cookieName),this.lastCookieString=t),this.lastToken}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(zd),Jt(BG))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();function lbt(e,i){const t=e.url.toLowerCase();if(!me(AR)||"GET"===e.method||"HEAD"===e.method||t.startsWith("http://")||t.startsWith("https://"))return i(e);const n=me(UG).getToken(),r=me(VG);return null!=n&&!e.headers.has(r)&&(e=e.clone({headers:e.headers.set(r,n)})),i(e)}var wh=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(wh||{});function cbt(...e){const i=[sd,NG,OG,{provide:LT,useExisting:OG},{provide:NT,useExisting:NG},{provide:xy,useValue:lbt,multi:!0},{provide:AR,useValue:!0},{provide:UG,useClass:obt}];for(const t of e)i.push(...t.\u0275providers);return function V0(e){return{\u0275providers:e}}(i)}const zG=new ee("");function dbt(){return function $f(e,i){return{\u0275kind:e,\u0275providers:i}}(wh.LegacyInterceptors,[{provide:zG,useFactory:Jyt},{provide:xy,useExisting:zG,multi:!0}])}let DR,ubt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[cbt(dbt())]})}return e})();try{DR=typeof Intl<"u"&&Intl.v8BreakIterator}catch{DR=!1}let Xg,ir=(()=>{class e{constructor(t){this._platformId=t,this.isBrowser=this._platformId?IU(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!DR)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(zd))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const QG=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function KG(){if(Xg)return Xg;if("object"!=typeof document||!document)return Xg=new Set(QG),Xg;let e=document.createElement("input");return Xg=new Set(QG.filter(i=>(e.setAttribute("type",i),e.type===i))),Xg}let yy;function Cc(e){return function vbt(){if(null==yy&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>yy=!0}))}finally{yy=yy||!1}return yy}()?e:!!e.capture}var ad=function(e){return e[e.NORMAL=0]="NORMAL",e[e.NEGATED=1]="NEGATED",e[e.INVERTED=2]="INVERTED",e}(ad||{});let zT,Qf,MR;function ZG(){if(null==Qf){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return Qf=!1,Qf;if("scrollBehavior"in document.documentElement.style)Qf=!0;else{const e=Element.prototype.scrollTo;Qf=!!e&&!/\{\s*\[native code\]\s*\}/.test(e.toString())}}return Qf}function by(){if("object"!=typeof document||!document)return ad.NORMAL;if(null==zT){const e=document.createElement("div"),i=e.style;e.dir="rtl",i.width="1px",i.overflow="auto",i.visibility="hidden",i.pointerEvents="none",i.position="absolute";const t=document.createElement("div"),n=t.style;n.width="2px",n.height="1px",e.appendChild(t),document.body.appendChild(e),zT=ad.NORMAL,0===e.scrollLeft&&(e.scrollLeft=1,zT=0===e.scrollLeft?ad.NEGATED:ad.INVERTED),e.remove()}return zT}function IR(e){if(function xbt(){if(null==MR){const e=typeof document<"u"?document.head:null;MR=!(!e||!e.createShadowRoot&&!e.attachShadow)}return MR}()){const i=e.getRootNode?e.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&i instanceof ShadowRoot)return i}return null}function GT(){let e=typeof document<"u"&&document?document.activeElement:null;for(;e&&e.shadowRoot;){const i=e.shadowRoot.activeElement;if(i===e)break;e=i}return e}function yl(e){return e.composedPath?e.composedPath()[0]:e.target}function RR(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function io(e,...i){return i.length?i.some(t=>e[t]):e.altKey||e.shiftKey||e.ctrlKey||e.metaKey}class Rbt extends Ie{constructor(i,t){super()}schedule(i,t=0){return this}}const XT={setInterval(e,i,...t){const{delegate:n}=XT;return n?.setInterval?n.setInterval(e,i,...t):setInterval(e,i,...t)},clearInterval(e){const{delegate:i}=XT;return(i?.clearInterval||clearInterval)(e)},delegate:void 0};class PR extends Rbt{constructor(i,t){super(i,t),this.scheduler=i,this.work=t,this.pending=!1}schedule(i,t=0){var n;if(this.closed)return this;this.state=i;const r=this.id,s=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(s,r,t)),this.pending=!0,this.delay=t,this.id=null!==(n=this.id)&&void 0!==n?n:this.requestAsyncId(s,this.id,t),this}requestAsyncId(i,t,n=0){return XT.setInterval(i.flush.bind(i,this),n)}recycleAsyncId(i,t,n=0){if(null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&XT.clearInterval(t)}execute(i,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(i,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(i,t){let r,n=!1;try{this.work(i)}catch(s){n=!0,r=s||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){const{id:i,scheduler:t}=this,{actions:n}=t;this.work=this.state=this.scheduler=null,this.pending=!1,pi(n,this),null!=i&&(this.id=this.recycleAsyncId(t,i,null)),this.delay=null,super.unsubscribe()}}}class _y{constructor(i,t=_y.now){this.schedulerActionCtor=i,this.now=t}schedule(i,t=0,n){return new this.schedulerActionCtor(this,i).schedule(n,t)}}_y.now=_R.now;class FR extends _y{constructor(i,t=_y.now){super(i,t),this.actions=[],this._active=!1}flush(i){const{actions:t}=this;if(this._active)return void t.push(i);let n;this._active=!0;do{if(n=i.execute(i.state,i.delay))break}while(i=t.shift());if(this._active=!1,n){for(;i=t.shift();)i.unsubscribe();throw n}}}const Ty=new FR(PR),kbt=Ty;function tu(e,i=Ty){return ds((t,n)=>{let r=null,s=null,o=null;const l=()=>{if(r){r.unsubscribe(),r=null;const C=s;s=null,n.next(C)}};function w(){const C=o+e,M=i.now();if(M{s=C,o=i.now(),r||(r=i.schedule(w,e),n.add(r))},()=>{l(),n.complete()},void 0,()=>{s=r=null}))})}function OR(e){return In((i,t)=>e<=t)}function eu(e,i=Ju){return e=e??Pbt,ds((t,n)=>{let r,s=!0;t.subscribe(Xr(n,o=>{const l=i(o);(s||!e(r,l))&&(s=!1,r=l,n.next(o))}))})}function Pbt(e,i){return e===i}function la(e){return null!=e&&"false"!=`${e}`}function Ch(e,i=0){return qG(e)?Number(e):i}function qG(e){return!isNaN(parseFloat(e))&&!isNaN(Number(e))}function Cy(e){return Array.isArray(e)?e:[e]}function js(e){return null==e?"":"string"==typeof e?e:`${e}px`}function vs(e){return e instanceof si?e.nativeElement:e}let tH=(()=>{class e{create(t){return typeof MutationObserver>"u"?null:new MutationObserver(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Obt=(()=>{class e{constructor(t){this._mutationObserverFactory=t,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((t,n)=>this._cleanupObserver(n))}observe(t){const n=vs(t);return new ur(r=>{const o=this._observeElement(n).subscribe(r);return()=>{o.unsubscribe(),this._unobserveElement(n)}})}_observeElement(t){if(this._observedElements.has(t))this._observedElements.get(t).count++;else{const n=new Pe,r=this._mutationObserverFactory.create(s=>n.next(s));r&&r.observe(t,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(t,{observer:r,stream:n,count:1})}return this._observedElements.get(t).stream}_unobserveElement(t){this._observedElements.has(t)&&(this._observedElements.get(t).count--,this._observedElements.get(t).count||this._cleanupObserver(t))}_cleanupObserver(t){if(this._observedElements.has(t)){const{observer:n,stream:r}=this._observedElements.get(t);n&&n.disconnect(),r.complete(),this._observedElements.delete(t)}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(tH))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),eH=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(t){this._debounce=Ch(t),this._subscribe()}constructor(t,n,r){this._contentObserver=t,this._elementRef=n,this._ngZone=r,this.event=new De,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();const t=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?t.pipe(tu(this.debounce)):t).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Obt),mt(si),mt(ii))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkObserveContent",""]],inputs:{disabled:[Wt.HasDecoratorInputTransform,"cdkObserveContentDisabled","disabled",Je],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"],standalone:!0,features:[ln]})}return e})(),LR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[tH]})}return e})();const iH=new Set;let Kf,Lbt=(()=>{class e{constructor(t,n){this._platform=t,this._nonce=n,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):Bbt}matchMedia(t){return(this._platform.WEBKIT||this._platform.BLINK)&&function Nbt(e,i){if(!iH.has(e))try{Kf||(Kf=document.createElement("style"),i&&Kf.setAttribute("nonce",i),Kf.setAttribute("type","text/css"),document.head.appendChild(Kf)),Kf.sheet&&(Kf.sheet.insertRule(`@media ${e} {body{ }}`,0),iH.add(e))}catch(t){console.error(t)}}(t,this._nonce),this._matchMedia(t)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(e2,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function Bbt(e){return{matches:"all"===e||""===e,media:e,addListener:()=>{},removeListener:()=>{}}}let nH=(()=>{class e{constructor(t,n){this._mediaMatcher=t,this._zone=n,this._queries=new Map,this._destroySubject=new Pe}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return rH(Cy(t)).some(r=>this._registerQuery(r).mql.matches)}observe(t){let s=Zd(rH(Cy(t)).map(o=>this._registerQuery(o).observable));return s=ty(s.pipe(er(1)),s.pipe(OR(1),tu(0))),s.pipe(Di(o=>{const l={matches:!1,breakpoints:{}};return o.forEach(({matches:w,query:C})=>{l.matches=l.matches||w,l.breakpoints[C]=w}),l}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const n=this._mediaMatcher.matchMedia(t),s={observable:new ur(o=>{const l=w=>this._zone.run(()=>o.next(w));return n.addListener(l),()=>{n.removeListener(l)}}).pipe(Ta(n),Di(({matches:o})=>({query:t,matches:o})),Ui(this._destroySubject)),mql:n};return this._queries.set(t,s),s}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Lbt),Jt(ii))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function rH(e){return e.map(i=>i.split(",")).reduce((i,t)=>i.concat(t)).map(i=>i.trim())}function jT(e,i,t){const n=YT(e,i);t=t.trim(),!n.some(r=>r.trim()===t)&&(n.push(t),e.setAttribute(i,n.join(" ")))}function Yg(e,i,t){const n=YT(e,i);t=t.trim();const r=n.filter(s=>s!==t);r.length?e.setAttribute(i,r.join(" ")):e.removeAttribute(i)}function YT(e,i){return e.getAttribute(i)?.match(/\S+/g)??[]}const aH="cdk-describedby-message",$T="cdk-describedby-host";let NR=0,oH=(()=>{class e{constructor(t,n){this._platform=n,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+NR++,this._document=t,this._id=me(ix)+"-"+NR++}describe(t,n,r){if(!this._canBeDescribed(t,n))return;const s=BR(n,r);"string"!=typeof n?(lH(n,this._id),this._messageRegistry.set(s,{messageElement:n,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(n,r),this._isElementDescribedByMessage(t,s)||this._addMessageReference(t,s)}removeDescription(t,n,r){if(!n||!this._isElementNode(t))return;const s=BR(n,r);if(this._isElementDescribedByMessage(t,s)&&this._removeMessageReference(t,s),"string"==typeof n){const o=this._messageRegistry.get(s);o&&0===o.referenceCount&&this._deleteMessageElement(s)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){const t=this._document.querySelectorAll(`[${$T}="${this._id}"]`);for(let n=0;n0!=r.indexOf(aH));t.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(t,n){const r=this._messageRegistry.get(n);jT(t,"aria-describedby",r.messageElement.id),t.setAttribute($T,this._id),r.referenceCount++}_removeMessageReference(t,n){const r=this._messageRegistry.get(n);r.referenceCount--,Yg(t,"aria-describedby",r.messageElement.id),t.removeAttribute($T)}_isElementDescribedByMessage(t,n){const r=YT(t,"aria-describedby"),s=this._messageRegistry.get(n),o=s&&s.messageElement.id;return!!o&&-1!=r.indexOf(o)}_canBeDescribed(t,n){if(!this._isElementNode(t))return!1;if(n&&"object"==typeof n)return!0;const r=null==n?"":`${n}`.trim(),s=t.getAttribute("aria-label");return!(!r||s&&s.trim()===r)}_isElementNode(t){return t.nodeType===this._document.ELEMENT_NODE}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ir))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function BR(e,i){return"string"==typeof e?`${i||""}/${e}`:e}function lH(e,i){e.id||(e.id=`${aH}-${i}-${NR++}`)}class cH{constructor(i,t){this._items=i,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Pe,this._typeaheadSubscription=Ie.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=n=>n.disabled,this._pressedLetters=[],this.tabOut=new Pe,this.change=new Pe,i instanceof nh?this._itemChangesSubscription=i.changes.subscribe(n=>this._itemsChanged(n.toArray())):b_(i)&&(this._effectRef=function sU(e,i){jc("NgSignals"),!i?.injector&&Sw();const t=i?.injector??me(is),n=!0!==i?.manualCleanup?t.get(jp):null,r=new Jmt(t.get(Qmt),e,typeof Zone>"u"?null:Zone.current,n,t,i?.allowSignalWrites??!1),s=t.get(Mn,null,{optional:!0});return s&&8&s._lView[Fi]?(s._lView[Aw]??=[]).push(r.watcher.notify):r.watcher.notify(),r}(()=>this._itemsChanged(i()),{injector:t}))}skipPredicate(i){return this._skipPredicateFn=i,this}withWrap(i=!0){return this._wrap=i,this}withVerticalOrientation(i=!0){return this._vertical=i,this}withHorizontalOrientation(i){return this._horizontal=i,this}withAllowedModifierKeys(i){return this._allowedModifierKeys=i,this}withTypeAhead(i=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(hs(t=>this._pressedLetters.push(t)),tu(i),In(()=>this._pressedLetters.length>0),Di(()=>this._pressedLetters.join(""))).subscribe(t=>{const n=this._getItemsArray();for(let r=1;r!i[s]||this._allowedModifierKeys.indexOf(s)>-1);switch(t){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(s>0?s:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const s=this._activeItemIndex+this._pageUpAndDown.delta,o=this._getItemsArray().length;this._setActiveItemByIndex(s=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))))}this._pressedLetters=[],i.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(i){const t=this._getItemsArray(),n="number"==typeof i?i:t.indexOf(i);this._activeItem=t[n]??null,this._activeItemIndex=n}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(i){this._wrap?this._setActiveInWrapMode(i):this._setActiveInDefaultMode(i)}_setActiveInWrapMode(i){const t=this._getItemsArray();for(let n=1;n<=t.length;n++){const r=(this._activeItemIndex+i*n+t.length)%t.length;if(!this._skipPredicateFn(t[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(i){this._setActiveItemByIndex(this._activeItemIndex+i,i)}_setActiveItemByIndex(i,t){const n=this._getItemsArray();if(n[i]){for(;this._skipPredicateFn(n[i]);)if(!n[i+=t])return;this.setActiveItem(i)}}_getItemsArray(){return b_(this._items)?this._items():this._items instanceof nh?this._items.toArray():this._items}_itemsChanged(i){if(this._activeItem){const t=i.indexOf(this._activeItem);t>-1&&t!==this._activeItemIndex&&(this._activeItemIndex=t)}}}class dH extends cH{setActiveItem(i){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(i),this.activeItem&&this.activeItem.setActiveStyles()}}class VR extends cH{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(i){return this._origin=i,this}setActiveItem(i){super.setActiveItem(i),this.activeItem&&this.activeItem.focus(this._origin)}}let QT=(()=>{class e{constructor(t){this._platform=t}isDisabled(t){return t.hasAttribute("disabled")}isVisible(t){return function zbt(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)}(t)&&"visible"===getComputedStyle(t).visibility}isTabbable(t){if(!this._platform.isBrowser)return!1;const n=function Ubt(e){try{return e.frameElement}catch{return null}}(function Qbt(e){return e.ownerDocument&&e.ownerDocument.defaultView||window}(t));if(n&&(-1===hH(n)||!this.isVisible(n)))return!1;let r=t.nodeName.toLowerCase(),s=hH(t);return t.hasAttribute("contenteditable")?-1!==s:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function Ybt(e){let i=e.nodeName.toLowerCase(),t="input"===i&&e.type;return"text"===t||"password"===t||"select"===i||"textarea"===i}(t))&&("audio"===r?!!t.hasAttribute("controls")&&-1!==s:"video"===r?-1!==s&&(null!==s||this._platform.FIREFOX||t.hasAttribute("controls")):t.tabIndex>=0)}isFocusable(t,n){return function $bt(e){return!function Hbt(e){return function Xbt(e){return"input"==e.nodeName.toLowerCase()}(e)&&"hidden"==e.type}(e)&&(function Gbt(e){let i=e.nodeName.toLowerCase();return"input"===i||"select"===i||"button"===i||"textarea"===i}(e)||function Wbt(e){return function jbt(e){return"a"==e.nodeName.toLowerCase()}(e)&&e.hasAttribute("href")}(e)||e.hasAttribute("contenteditable")||uH(e))}(t)&&!this.isDisabled(t)&&(n?.ignoreVisibility||this.isVisible(t))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function uH(e){if(!e.hasAttribute("tabindex")||void 0===e.tabIndex)return!1;let i=e.getAttribute("tabindex");return!(!i||isNaN(parseInt(i,10)))}function hH(e){if(!uH(e))return null;const i=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(i)?-1:i}class fH{get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}constructor(i,t,n,r,s=!1){this._element=i,this._checker=t,this._ngZone=n,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,s||this.attachAnchors()}destroy(){const i=this._startAnchor,t=this._endAnchor;i&&(i.removeEventListener("focus",this.startAnchorListener),i.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(i)))})}focusFirstTabbableElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(i)))})}focusLastTabbableElementWhenReady(i){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(i)))})}_getRegionBoundary(i){const t=this._element.querySelectorAll(`[cdk-focus-region-${i}], [cdkFocusRegion${i}], [cdk-focus-${i}]`);return"start"==i?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(i){const t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){const n=this._getFirstTabbableElement(t);return n?.focus(i),!!n}return t.focus(i),!0}return this.focusFirstTabbableElement(i)}focusFirstTabbableElement(i){const t=this._getRegionBoundary("start");return t&&t.focus(i),!!t}focusLastTabbableElement(i){const t=this._getRegionBoundary("end");return t&&t.focus(i),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(i){if(this._checker.isFocusable(i)&&this._checker.isTabbable(i))return i;const t=i.children;for(let n=0;n=0;n--){const r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){const i=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,i),i.classList.add("cdk-visually-hidden"),i.classList.add("cdk-focus-trap-anchor"),i.setAttribute("aria-hidden","true"),i}_toggleAnchorTabIndex(i,t){i?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(i){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(i,this._startAnchor),this._toggleAnchorTabIndex(i,this._endAnchor))}_executeOnStable(i){this._ngZone.isStable?i():this._ngZone.onStable.pipe(er(1)).subscribe(i)}}let UR=(()=>{class e{constructor(t,n,r){this._checker=t,this._ngZone=n,this._document=r}create(t,n=!1){return new fH(t,this._checker,this._ngZone,this._document,n)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(QT),Jt(ii),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function KT(e){return 0===e.buttons||0===e.detail}function ZT(e){const i=e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0];return!(!i||-1!==i.identifier||null!=i.radiusX&&1!==i.radiusX||null!=i.radiusY&&1!==i.radiusY)}const Kbt=new ee("cdk-input-modality-detector-options"),Zbt={ignoreKeys:[18,17,224,91,16]},$g=Cc({passive:!0,capture:!0});let Jbt=(()=>{class e{get mostRecentModality(){return this._modality.value}constructor(t,n,r,s){this._platform=t,this._mostRecentTarget=null,this._modality=new Wr(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(l=>l===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=yl(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs<650||(this._modality.next(KT(o)?"keyboard":"mouse"),this._mostRecentTarget=yl(o))},this._onTouchstart=o=>{ZT(o)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=yl(o))},this._options={...Zbt,...s},this.modalityDetected=this._modality.pipe(OR(1)),this.modalityChanged=this.modalityDetected.pipe(eu()),t.isBrowser&&n.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,$g),r.addEventListener("mousedown",this._onMousedown,$g),r.addEventListener("touchstart",this._onTouchstart,$g)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,$g),document.removeEventListener("mousedown",this._onMousedown,$g),document.removeEventListener("touchstart",this._onTouchstart,$g))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(ii),Jt(Ni),Jt(Kbt,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const qbt=new ee("liveAnnouncerElement",{providedIn:"root",factory:function t1t(){return null}}),e1t=new ee("LIVE_ANNOUNCER_DEFAULT_OPTIONS");let i1t=0,pH=(()=>{class e{constructor(t,n,r,s){this._ngZone=n,this._defaultOptions=s,this._document=r,this._liveElement=t||this._createLiveElement()}announce(t,...n){const r=this._defaultOptions;let s,o;return 1===n.length&&"number"==typeof n[0]?o=n[0]:[s,o]=n,this.clear(),clearTimeout(this._previousTimeout),s||(s=r&&r.politeness?r.politeness:"polite"),null==o&&r&&(o=r.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(l=>this._currentResolve=l)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=t,"number"==typeof o&&(this._previousTimeout=setTimeout(()=>this.clear(),o)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){const t="cdk-live-announcer-element",n=this._document.getElementsByClassName(t),r=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class e{constructor(t,n,r,s,o){this._ngZone=t,this._platform=n,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Pe,this._rootNodeFocusAndBlurListener=l=>{for(let C=yl(l);C;C=C.parentElement)"focus"===l.type?this._onFocus(l,C):this._onBlur(l,C)},this._document=s,this._detectionMode=o?.detectionMode||JT.IMMEDIATE}monitor(t,n=!1){const r=vs(t);if(!this._platform.isBrowser||1!==r.nodeType)return vi();const s=IR(r)||this._getDocument(),o=this._elementInfo.get(r);if(o)return n&&(o.checkChildren=!0),o.subject;const l={checkChildren:n,subject:new Pe,rootNode:s};return this._elementInfo.set(r,l),this._registerGlobalListeners(l),l.subject}stopMonitoring(t){const n=vs(t),r=this._elementInfo.get(n);r&&(r.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(r))}focusVia(t,n,r){const s=vs(t);s===this._getDocument().activeElement?this._getClosestElementsInfo(s).forEach(([l,w])=>this._originChanged(l,n,w)):(this._setOrigin(n),"function"==typeof s.focus&&s.focus(r))}ngOnDestroy(){this._elementInfo.forEach((t,n)=>this.stopMonitoring(n))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(t){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(t)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:t&&this._isLastInteractionFromInputLabel(t)?"mouse":"program"}_shouldBeAttributedToTouch(t){return this._detectionMode===JT.EVENTUAL||!!t?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(t,n){t.classList.toggle("cdk-focused",!!n),t.classList.toggle("cdk-touch-focused","touch"===n),t.classList.toggle("cdk-keyboard-focused","keyboard"===n),t.classList.toggle("cdk-mouse-focused","mouse"===n),t.classList.toggle("cdk-program-focused","program"===n)}_setOrigin(t,n=!1){this._ngZone.runOutsideAngular(()=>{this._origin=t,this._originFromTouchInteraction="touch"===t&&n,this._detectionMode===JT.IMMEDIATE&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(t,n){const r=this._elementInfo.get(n),s=yl(t);!r||!r.checkChildren&&n!==s||this._originChanged(n,this._getFocusOrigin(s),r)}_onBlur(t,n){const r=this._elementInfo.get(n);!r||r.checkChildren&&t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(this._setClasses(n),this._emitOrigin(r,null))}_emitOrigin(t,n){t.subject.observers.length&&this._ngZone.run(()=>t.subject.next(n))}_registerGlobalListeners(t){if(!this._platform.isBrowser)return;const n=t.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,qT),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,qT)}),this._rootNodeFocusListenerCount.set(n,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ui(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(t){const n=t.rootNode;if(this._rootNodeFocusListenerCount.has(n)){const r=this._rootNodeFocusListenerCount.get(n);r>1?this._rootNodeFocusListenerCount.set(n,r-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,qT),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,qT),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(t,n,r){this._setClasses(t,n),this._emitOrigin(r,n),this._lastFocusOrigin=n}_getClosestElementsInfo(t){const n=[];return this._elementInfo.forEach((r,s)=>{(s===t||r.checkChildren&&s.contains(t))&&n.push([s,r])}),n}_isLastInteractionFromInputLabel(t){const{_mostRecentTarget:n,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!n||n===t||"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName||t.disabled)return!1;const s=t.labels;if(s)for(let o=0;o{class e{constructor(t,n){this._elementRef=t,this._focusMonitor=n,this._focusOrigin=null,this.cdkFocusChange=new De}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){const t=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(t,1===t.nodeType&&t.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(n=>{this._focusOrigin=n,this.cdkFocusChange.emit(n)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Ul))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"],standalone:!0})}return e})();var Zf=function(e){return e[e.NONE=0]="NONE",e[e.BLACK_ON_WHITE=1]="BLACK_ON_WHITE",e[e.WHITE_ON_BLACK=2]="WHITE_ON_BLACK",e}(Zf||{});const gH="cdk-high-contrast-black-on-white",vH="cdk-high-contrast-white-on-black",zR="cdk-high-contrast-active";let xH=(()=>{class e{constructor(t,n){this._platform=t,this._document=n,this._breakpointSubscription=me(nH).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Zf.NONE;const t=this._document.createElement("div");t.style.backgroundColor="rgb(1,2,3)",t.style.position="absolute",this._document.body.appendChild(t);const n=this._document.defaultView||window,r=n&&n.getComputedStyle?n.getComputedStyle(t):null,s=(r&&r.backgroundColor||"").replace(/ /g,"");switch(t.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Zf.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Zf.BLACK_ON_WHITE}return Zf.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){const t=this._document.body.classList;t.remove(zR,gH,vH),this._hasCheckedHighContrastMode=!0;const n=this.getHighContrastMode();n===Zf.BLACK_ON_WHITE?t.add(zR,gH):n===Zf.WHITE_ON_BLACK&&t.add(zR,vH)}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),yH=(()=>{class e{constructor(t){t._applyBodyHighContrastModeCssClasses()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xH))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[LR]})}return e})();const s1t=new ee("cdk-dir-doc",{providedIn:"root",factory:function a1t(){return me(Ni)}}),o1t=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let Ba=(()=>{class e{constructor(t){this.value="ltr",this.change=new De,t&&(this.value=function l1t(e){const i=e?.toLowerCase()||"";return"auto"===i&&typeof navigator<"u"&&navigator?.language?o1t.test(navigator.language)?"rtl":"ltr":"rtl"===i?"rtl":"ltr"}((t.body?t.body.dir:null)||(t.documentElement?t.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(s1t,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Sy=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const c1t=["text"],d1t=[[["mat-icon"]],"*"],u1t=["mat-icon","*"];function h1t(e,i){if(1&e&&we(0,"mat-pseudo-checkbox",1),2&e){const t=Ct();yt("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function f1t(e,i){1&e&&we(0,"mat-pseudo-checkbox",3),2&e&&yt("disabled",Ct().disabled)}function m1t(e,i){if(1&e&&(tt(0,"span",4),ut(1),et()),2&e){const t=Ct();lt(),Ye("(",t.group.label,")")}}const p1t=["mat-internal-form-field",""],g1t=["*"];let v1t=(()=>{class e{static#t=this.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)";static#e=this.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)";static#i=this.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)";static#n=this.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)"}return e})(),x1t=(()=>{class e{static#t=this.COMPLEX="375ms";static#e=this.ENTERING="225ms";static#i=this.EXITING="195ms"}return e})();const b1t=new ee("mat-sanity-checks",{providedIn:"root",factory:function y1t(){return!0}});let Ki=(()=>{class e{constructor(t,n,r){this._sanityChecks=n,this._document=r,this._hasDoneGlobalChecks=!1,t._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(t){return!RR()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[t])}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xH),Jt(b1t,8),Jt(Ni))};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Sy,Sy]})}return e})();class GR{constructor(i,t,n,r,s){this._defaultMatcher=i,this.ngControl=t,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=s,this.errorState=!1}updateErrorState(){const i=this.errorState,t=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,s=n?.isErrorState(r,t)??!1;s!==i&&(this.errorState=s,this._stateChanges.next())}}let _H=(()=>{class e{isErrorState(t,n){return!!(t&&t.invalid&&(t.touched||n&&n.submitted))}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var zl=function(e){return e[e.FADING_IN=0]="FADING_IN",e[e.VISIBLE=1]="VISIBLE",e[e.FADING_OUT=2]="FADING_OUT",e[e.HIDDEN=3]="HIDDEN",e}(zl||{});class E1t{constructor(i,t,n,r=!1){this._renderer=i,this.element=t,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=zl.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}}const TH=Cc({passive:!0,capture:!0});class A1t{constructor(){this._events=new Map,this._delegateEventHandler=i=>{const t=yl(i);t&&this._events.get(i.type)?.forEach((n,r)=>{(r===t||r.contains(t))&&n.forEach(s=>s.handleEvent(i))})}}addHandler(i,t,n,r){const s=this._events.get(t);if(s){const o=s.get(n);o?o.add(r):s.set(n,new Set([r]))}else this._events.set(t,new Map([[n,new Set([r])]])),i.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,TH)})}removeHandler(i,t,n){const r=this._events.get(i);if(!r)return;const s=r.get(t);s&&(s.delete(n),0===s.size&&r.delete(t),0===r.size&&(this._events.delete(i),document.removeEventListener(i,this._delegateEventHandler,TH)))}}const CH={enterDuration:225,exitDuration:150},SH=Cc({passive:!0,capture:!0}),EH=["mousedown","touchstart"],AH=["mouseup","mouseleave","touchend","touchcancel"];class Ay{static#t=this._eventManager=new A1t;constructor(i,t,n,r){this._target=i,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=vs(n))}fadeInRipple(i,t,n={}){const r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),s={...CH,...n.animation};n.centered&&(i=r.left+r.width/2,t=r.top+r.height/2);const o=n.radius||function M1t(e,i,t){const n=Math.max(Math.abs(e-t.left),Math.abs(e-t.right)),r=Math.max(Math.abs(i-t.top),Math.abs(i-t.bottom));return Math.sqrt(n*n+r*r)}(i,t,r),l=i-r.left,w=t-r.top,C=s.enterDuration,M=document.createElement("div");M.classList.add("mat-ripple-element"),M.style.left=l-o+"px",M.style.top=w-o+"px",M.style.height=2*o+"px",M.style.width=2*o+"px",null!=n.color&&(M.style.backgroundColor=n.color),M.style.transitionDuration=`${C}ms`,this._containerElement.appendChild(M);const P=window.getComputedStyle(M),L=P.transitionDuration,U="none"===P.transitionProperty||"0s"===L||"0s, 0s"===L||0===r.width&&0===r.height,X=new E1t(this,M,n,U);M.style.transform="scale3d(1, 1, 1)",X.state=zl.FADING_IN,n.persistent||(this._mostRecentTransientRipple=X);let W=null;return!U&&(C||s.exitDuration)&&this._ngZone.runOutsideAngular(()=>{const Z=()=>this._finishRippleTransition(X),rt=()=>this._destroyRipple(X);M.addEventListener("transitionend",Z),M.addEventListener("transitioncancel",rt),W={onTransitionEnd:Z,onTransitionCancel:rt}}),this._activeRipples.set(X,W),(U||!C)&&this._finishRippleTransition(X),X}fadeOutRipple(i){if(i.state===zl.FADING_OUT||i.state===zl.HIDDEN)return;const t=i.element,n={...CH,...i.config.animation};t.style.transitionDuration=`${n.exitDuration}ms`,t.style.opacity="0",i.state=zl.FADING_OUT,(i._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(i)}fadeOutAll(){this._getActiveRipples().forEach(i=>i.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(i=>{i.config.persistent||i.fadeOut()})}setupTriggerEvents(i){const t=vs(i);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,EH.forEach(n=>{Ay._eventManager.addHandler(this._ngZone,n,t,this)}))}handleEvent(i){"mousedown"===i.type?this._onMousedown(i):"touchstart"===i.type?this._onTouchStart(i):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{AH.forEach(t=>{this._triggerElement.addEventListener(t,this,SH)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(i){i.state===zl.FADING_IN?this._startFadeOutTransition(i):i.state===zl.FADING_OUT&&this._destroyRipple(i)}_startFadeOutTransition(i){const t=i===this._mostRecentTransientRipple,{persistent:n}=i.config;i.state=zl.VISIBLE,!n&&(!t||!this._isPointerDown)&&i.fadeOut()}_destroyRipple(i){const t=this._activeRipples.get(i)??null;this._activeRipples.delete(i),this._activeRipples.size||(this._containerRect=null),i===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),i.state=zl.HIDDEN,null!==t&&(i.element.removeEventListener("transitionend",t.onTransitionEnd),i.element.removeEventListener("transitioncancel",t.onTransitionCancel)),i.element.remove()}_onMousedown(i){const t=KT(i),n=this._lastTouchStartEvent&&Date.now(){!i.config.persistent&&(i.state===zl.VISIBLE||i.config.terminateOnPointerUp&&i.state===zl.FADING_IN)&&i.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){const i=this._triggerElement;i&&(EH.forEach(t=>Ay._eventManager.removeHandler(t,i,this)),this._pointerUpEventsRegistered&&AH.forEach(t=>i.removeEventListener(t,this,SH)))}}const tC=new ee("mat-ripple-global-options");let iu=(()=>{class e{get disabled(){return this._disabled}set disabled(t){t&&this.fadeOutAllNonPersistent(),this._disabled=t,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(t){this._trigger=t,this._setupTriggerEventsIfEnabled()}constructor(t,n,r,s,o){this._elementRef=t,this._animationMode=o,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new Ay(this,n,t,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(t,n=0,r){return"number"==typeof t?this._rippleRenderer.fadeInRipple(t,n,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...t})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ii),mt(ir),mt(tC,8),mt(Nr,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-ripple-unbounded",r.unbounded)},inputs:{color:[Wt.None,"matRippleColor","color"],unbounded:[Wt.None,"matRippleUnbounded","unbounded"],centered:[Wt.None,"matRippleCentered","centered"],radius:[Wt.None,"matRippleRadius","radius"],animation:[Wt.None,"matRippleAnimation","animation"],disabled:[Wt.None,"matRippleDisabled","disabled"],trigger:[Wt.None,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}return e})(),Qg=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})(),I1t=(()=>{class e{constructor(t){this._animationMode=t,this.state="unchecked",this.disabled=!1,this.appearance="full"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(n,r){2&n&&bi("mat-pseudo-checkbox-indeterminate","indeterminate"===r.state)("mat-pseudo-checkbox-checked","checked"===r.state)("mat-pseudo-checkbox-disabled",r.disabled)("mat-pseudo-checkbox-minimal","minimal"===r.appearance)("mat-pseudo-checkbox-full","full"===r.appearance)("_mat-animation-noopable","NoopAnimations"===r._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[Vi],decls:0,vars:0,template:function(n,r){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}return e})(),DH=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki]})}return e})();const HR=new ee("MAT_OPTION_PARENT_COMPONENT"),WR=new ee("MatOptgroup");let R1t=0;class MH{constructor(i,t=!1){this.source=i,this.isUserInput=t}}let nu=(()=>{class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=t}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(t,n,r,s){this._element=t,this._changeDetectorRef=n,this._parent=r,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+R1t++,this.onSelectionChange=new De,this._stateChanges=new Pe}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(t=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}deselect(t=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}focus(t,n){const r=this._getHostElement();"function"==typeof r.focus&&r.focus(n)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(13===t.keyCode||32===t.keyCode)&&!io(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){const t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new MH(this,t))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Mn),mt(HR,8),mt(WR,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-option"]],viewQuery:function(n,r){if(1&n&&Mi(c1t,7),2&n){let s;Be(s=Ve())&&(r._text=s.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(n,r){1&n&&Vt("click",function(){return r._selectViaInteraction()})("keydown",function(o){return r._handleKeydown(o)}),2&n&&(Kc("id",r.id),Ti("aria-selected",r.selected)("aria-disabled",r.disabled.toString()),bi("mdc-list-item--selected",r.selected)("mat-mdc-option-multiple",r.multiple)("mat-mdc-option-active",r.active)("mdc-list-item--disabled",r.disabled))},inputs:{value:"value",id:"id",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[ln,Vi],ngContentSelectors:u1t,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(n,r){1&n&&(Kn(d1t),Gt(0,h1t,1,2,"mat-pseudo-checkbox",1),xi(1),tt(2,"span",2,0),xi(4,1),et(),Gt(5,f1t,1,1,"mat-pseudo-checkbox",3)(6,m1t,2,1,"span",4),we(7,"div",5)),2&n&&(xn(0,r.multiple?0:-1),lt(5),xn(5,r.multiple||!r.selected||r.hideSingleSelectionIndicator?-1:5),lt(),xn(6,r.group&&r.group._inert?6:-1),lt(),yt("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disabled||r.disableRipple))},dependencies:[I1t,iu],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color);font-family:var(--mat-option-label-text-font);line-height:var(--mat-option-label-text-line-height);font-size:var(--mat-option-label-text-size);letter-spacing:var(--mat-option-label-text-tracking);font-weight:var(--mat-option-label-text-weight);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color)}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return e})();function IH(e,i,t){if(t.length){let n=i.toArray(),r=t.toArray(),s=0;for(let o=0;ot+n?Math.max(0,e-n+i):t}let eC=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Qg,Ki,DH]})}return e})();const kH={capture:!0},PH=["focus","click","mouseenter","touchstart"],XR="mat-ripple-loader-uninitialized",jR="mat-ripple-loader-class-name",FH="mat-ripple-loader-centered",iC="mat-ripple-loader-disabled";let k1t=(()=>{class e{constructor(){this._document=me(Ni,{optional:!0}),this._animationMode=me(Nr,{optional:!0}),this._globalRippleOptions=me(tC,{optional:!0}),this._platform=me(ir),this._ngZone=me(ii),this._hosts=new Map,this._onInteraction=t=>{if(!(t.target instanceof HTMLElement))return;const r=t.target.closest(`[${XR}]`);r&&this._createRipple(r)},this._ngZone.runOutsideAngular(()=>{for(const t of PH)this._document?.addEventListener(t,this._onInteraction,kH)})}ngOnDestroy(){const t=this._hosts.keys();for(const n of t)this.destroyRipple(n);for(const n of PH)this._document?.removeEventListener(n,this._onInteraction,kH)}configureRipple(t,n){t.setAttribute(XR,""),(n.className||!t.hasAttribute(jR))&&t.setAttribute(jR,n.className||""),n.centered&&t.setAttribute(FH,""),n.disabled&&t.setAttribute(iC,"")}getRipple(t){return this._hosts.get(t)||this._createRipple(t)}setDisabled(t,n){const r=this._hosts.get(t);r?r.disabled=n:n?t.setAttribute(iC,""):t.removeAttribute(iC)}_createRipple(t){if(!this._document)return;const n=this._hosts.get(t);if(n)return n;t.querySelector(".mat-ripple")?.remove();const r=this._document.createElement("span");r.classList.add("mat-ripple",t.getAttribute(jR)),t.append(r);const s=new iu(new si(r),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return s._isInitialized=!0,s.trigger=t,s.centered=t.hasAttribute(FH),s.disabled=t.hasAttribute(iC),this.attachRipple(t,s),s}attachRipple(t,n){t.removeAttribute(XR),this._hosts.set(t,n)}destroyRipple(t){const n=this._hosts.get(t);n&&(n.ngOnDestroy(),this._hosts.delete(t))}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),YR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-form-field--align-end","before"===r.labelPosition)},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[Vi],attrs:p1t,ngContentSelectors:g1t,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},styles:[".mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-form-field{font-family:var(--mdc-form-field-label-text-font);line-height:var(--mdc-form-field-label-text-line-height);font-size:var(--mdc-form-field-label-text-size);font-weight:var(--mdc-form-field-label-text-weight);letter-spacing:var(--mdc-form-field-label-text-tracking);color:var(--mdc-form-field-label-text-color)}.mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}"],encapsulation:2,changeDetection:0})}return e})();const OH=["mat-button",""],LH=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],NH=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],BH=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",F1t=["mat-icon-button",""],O1t=["*"],L1t=new ee("MAT_BUTTON_CONFIG"),N1t=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}];let $R=(()=>{class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(t){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,t)}get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=t,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._updateRippleDisabled()}constructor(t,n,r,s){this._elementRef=t,this._platform=n,this._ngZone=r,this._animationMode=s,this._focusMonitor=me(Ul),this._rippleLoader=me(k1t),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;const o=me(L1t,{optional:!0}),l=t.nativeElement,w=l.classList;this.disabledInteractive=o?.disabledInteractive??!1,this._rippleLoader?.configureRipple(l,{className:"mat-mdc-button-ripple"});for(const{attribute:C,mdcClasses:M}of N1t)l.hasAttribute(C)&&w.add(...M)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(t="program",n){t?this._focusMonitor.focusVia(this._elementRef.nativeElement,t,n):this._elementRef.nativeElement.focus(n)}_getAriaDisabled(){return null!=this.ariaDisabled?this.ariaDisabled:!(!this.disabled||!this.disabledInteractive)||null}_getDisabledAttribute(){return!(this.disabledInteractive||!this.disabled)||null}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static#t=this.\u0275fac=function(n){a_()};static#e=this.\u0275dir=ce({type:e,inputs:{color:"color",disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],ariaDisabled:[Wt.HasDecoratorInputTransform,"aria-disabled","ariaDisabled",Je],disabledInteractive:[Wt.HasDecoratorInputTransform,"disabledInteractive","disabledInteractive",Je]},features:[ln]})}return e})(),B1t=(()=>{class e extends $R{constructor(t,n,r,s){super(t,n,r,s),this._haltDisabledEvents=o=>{this.disabled&&(o.preventDefault(),o.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}_getAriaDisabled(){return null==this.ariaDisabled?this.disabled:this.ariaDisabled}static#t=this.\u0275fac=function(n){a_()};static#e=this.\u0275dir=ce({type:e,inputs:{tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?void 0:jr(t)]},features:[ln,hi]})}return e})(),Sa=(()=>{class e extends $R{constructor(t,n,r,s){super(t,n,r,s)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ir),mt(ii),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(n,r){2&n&&(Ti("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[hi,Vi],attrs:OH,ngContentSelectors:NH,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(Kn(LH),we(0,"span",0),xi(1),tt(2,"span",1),xi(3,1),et(),xi(4,2),we(5,"span",2)(6,"span",3)),2&n&&bi("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px);display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);font-weight:var(--mdc-text-button-label-text-weight);text-transform:var(--mdc-text-button-label-text-transform);height:var(--mdc-text-button-container-height);border-radius:var(--mdc-text-button-container-shape);padding:0 var(--mat-text-button-horizontal-padding, 8px)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);font-weight:var(--mdc-filled-button-label-text-weight);text-transform:var(--mdc-filled-button-label-text-transform);height:var(--mdc-filled-button-container-height);border-radius:var(--mdc-filled-button-container-shape);padding:0 var(--mat-filled-button-horizontal-padding, 16px)}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color)}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);font-weight:var(--mdc-protected-button-label-text-weight);text-transform:var(--mdc-protected-button-label-text-transform);height:var(--mdc-protected-button-container-height);border-radius:var(--mdc-protected-button-container-shape);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow)}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color)}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);font-weight:var(--mdc-outlined-button-label-text-weight);text-transform:var(--mdc-outlined-button-label-text-transform);height:var(--mdc-outlined-button-container-height);border-radius:var(--mdc-outlined-button-container-shape);padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width);padding:0 var(--mat-outlined-button-horizontal-padding, 15px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color)}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape)}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width))}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button-base{text-decoration:none}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),V1t=(()=>{class e extends B1t{constructor(t,n,r,s){super(t,n,r,s)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ir),mt(ii),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:15,hostBindings:function(n,r){2&n&&(Ti("disabled",r._getDisabledAttribute())("tabindex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("aria-disabled",r._getDisabledAttribute()),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton","matAnchor"],standalone:!0,features:[hi,Vi],attrs:OH,ngContentSelectors:NH,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(Kn(LH),we(0,"span",0),xi(1),tt(2,"span",1),xi(3,1),et(),xi(4,2),we(5,"span",2)(6,"span",3)),2&n&&bi("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px);display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);font-weight:var(--mdc-text-button-label-text-weight);text-transform:var(--mdc-text-button-label-text-transform);height:var(--mdc-text-button-container-height);border-radius:var(--mdc-text-button-container-shape);padding:0 var(--mat-text-button-horizontal-padding, 8px)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);font-weight:var(--mdc-filled-button-label-text-weight);text-transform:var(--mdc-filled-button-label-text-transform);height:var(--mdc-filled-button-container-height);border-radius:var(--mdc-filled-button-container-shape);padding:0 var(--mat-filled-button-horizontal-padding, 16px)}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color)}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);font-weight:var(--mdc-protected-button-label-text-weight);text-transform:var(--mdc-protected-button-label-text-transform);height:var(--mdc-protected-button-container-height);border-radius:var(--mdc-protected-button-container-shape);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow)}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color)}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);font-weight:var(--mdc-outlined-button-label-text-weight);text-transform:var(--mdc-outlined-button-label-text-transform);height:var(--mdc-outlined-button-container-height);border-radius:var(--mdc-outlined-button-container-shape);padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width);padding:0 var(--mat-outlined-button-horizontal-padding, 15px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color)}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape)}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width))}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button-base{text-decoration:none}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',BH],encapsulation:2,changeDetection:0})}return e})(),Oo=(()=>{class e extends $R{constructor(t,n,r,s){super(t,n,r,s),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ir),mt(ii),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(n,r){2&n&&(Ti("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[hi,Vi],attrs:F1t,ngContentSelectors:O1t,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){1&n&&(Kn(),we(0,"span",0),xi(1),we(2,"span",1)(3,"span",2))},styles:['.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{color:var(--mdc-icon-button-icon-color)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button{border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',BH],encapsulation:2,changeDetection:0})}return e})(),QR=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Qg,Ki]})}return e})();var Zi=function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e}(Zi||{});const ru="*";function mr(e,i){return{type:Zi.Trigger,name:e,definitions:i,options:{}}}function sn(e,i=null){return{type:Zi.Animate,styles:i,timings:e}}function KR(e,i=null){return{type:Zi.Group,steps:e,options:i}}function qe(e){return{type:Zi.Style,styles:e,offset:null}}function Rn(e,i,t){return{type:Zi.State,name:e,styles:i,options:t}}function Kg(e){return{type:Zi.Keyframes,steps:e}}function on(e,i,t=null){return{type:Zi.Transition,expr:e,animation:i,options:t}}function nC(e=null){return{type:Zi.AnimateChild,options:e}}function rC(e,i,t=null){return{type:Zi.Query,selector:e,animation:i,options:t}}class Dy{constructor(i=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=i+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(i=>i()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(i){this._position=this.totalTime?i*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(i){const t="start"==i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class VH{constructor(i){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=i;let t=0,n=0,r=0;const s=this.players.length;0==s?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==s&&this._onFinish()}),o.onDestroy(()=>{++n==s&&this._onDestroy()}),o.onStart(()=>{++r==s&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this.players.forEach(i=>i.init())}onStart(i){this._onStartFns.push(i)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(i=>i()),this._onStartFns=[])}onDone(i){this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(i=>i.play())}pause(){this.players.forEach(i=>i.pause())}restart(){this.players.forEach(i=>i.restart())}finish(){this._onFinish(),this.players.forEach(i=>i.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(i=>i.destroy()),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}reset(){this.players.forEach(i=>i.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(i){const t=i*this.totalTime;this.players.forEach(n=>{const r=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(r)})}getPosition(){const i=this.players.reduce((t,n)=>null===t||n.totalTime>t.totalTime?n:t,null);return null!=i?i.getPosition():0}beforeDestroy(){this.players.forEach(i=>{i.beforeDestroy&&i.beforeDestroy()})}triggerCallback(i){const t="start"==i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class JR{attach(i){return this._attachedHost=i,i.attach(this)}detach(){let i=this._attachedHost;null!=i&&(this._attachedHost=null,i.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(i){this._attachedHost=i}}class Zg extends JR{constructor(i,t,n,r,s){super(),this.component=i,this.viewContainerRef=t,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=s}}class su extends JR{constructor(i,t,n,r){super(),this.templateRef=i,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(i,t=this.context){return this.context=t,super.attach(i)}detach(){return this.context=void 0,super.detach()}}class j1t extends JR{constructor(i){super(),this.element=i instanceof si?i.nativeElement:i}}class sC{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(i){return i instanceof Zg?(this._attachedPortal=i,this.attachComponentPortal(i)):i instanceof su?(this._attachedPortal=i,this.attachTemplatePortal(i)):this.attachDomPortal&&i instanceof j1t?(this._attachedPortal=i,this.attachDomPortal(i)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(i){this._disposeFn=i}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}}class Y1t extends sC{constructor(i,t,n,r,s){super(),this.outletElement=i,this._componentFactoryResolver=t,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=o=>{const l=o.element,w=this._document.createComment("dom-portal");l.parentNode.insertBefore(w,l),this.outletElement.appendChild(l),this._attachedPortal=o,super.setDisposeFn(()=>{w.parentNode&&w.parentNode.replaceChild(l,w)})},this._document=s}attachComponentPortal(i){const n=(i.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(i.component);let r;return i.viewContainerRef?(r=i.viewContainerRef.createComponent(n,i.viewContainerRef.length,i.injector||i.viewContainerRef.injector,i.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=n.create(i.injector||this._defaultInjector||is.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=i,r}attachTemplatePortal(i){let t=i.viewContainerRef,n=t.createEmbeddedView(i.templateRef,i.context,{injector:i.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);-1!==r&&t.remove(r)}),this._attachedPortal=i,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(i){return i.hostView.rootNodes[0]}}let $1t=(()=>{class e extends su{constructor(t,n){super(t,n)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(Ir))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],standalone:!0,features:[hi]})}return e})(),au=(()=>{class e extends sC{constructor(t,n,r){super(),this._componentFactoryResolver=t,this._viewContainerRef=n,this._isInitialized=!1,this.attached=new De,this.attachDomPortal=s=>{const o=s.element,l=this._document.createComment("dom-portal");s.setAttachedHost(this),o.parentNode.insertBefore(l,o),this._getRootNode().appendChild(o),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(o,l)})},this._document=r}get portal(){return this._attachedPortal}set portal(t){this.hasAttached()&&!t&&!this._isInitialized||(this.hasAttached()&&super.detach(),t&&super.attach(t),this._attachedPortal=t||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(t){t.setAttachedHost(this);const n=null!=t.viewContainerRef?t.viewContainerRef:this._viewContainerRef,s=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component),o=n.createComponent(s,n.length,t.injector||n.injector,t.projectableNodes||void 0);return n!==this._viewContainerRef&&this._getRootNode().appendChild(o.hostView.rootNodes[0]),super.setDisposeFn(()=>o.destroy()),this._attachedPortal=t,this._attachedRef=o,this.attached.emit(o),o}attachTemplatePortal(t){t.setAttachedHost(this);const n=this._viewContainerRef.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=t,this._attachedRef=n,this.attached.emit(n),n}_getRootNode(){const t=this._viewContainerRef.element.nativeElement;return t.nodeType===t.ELEMENT_NODE?t:t.parentNode}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Of),mt(Ir),mt(Ni))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[Wt.None,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[hi]})}return e})(),Jg=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const Q1t=["addListener","removeListener"],K1t=["addEventListener","removeEventListener"],Z1t=["on","off"];function Sc(e,i,t,n){if(ne(t)&&(n=t,t=void 0),n)return Sc(e,i,t).pipe(GI(n));const[r,s]=function twt(e){return ne(e.addEventListener)&&ne(e.removeEventListener)}(e)?K1t.map(o=>l=>e[o](i,l,t)):function J1t(e){return ne(e.addListener)&&ne(e.removeListener)}(e)?Q1t.map(UH(e,i)):function q1t(e){return ne(e.on)&&ne(e.off)}(e)?Z1t.map(UH(e,i)):[];if(!r&&UI(e))return _a(o=>Sc(o,i,t))(eo(e));if(!r)throw new TypeError("Invalid event target");return new ur(o=>{const l=(...w)=>o.next(1s(l)})}function UH(e,i){return t=>n=>e[t](i,n)}const My={schedule(e){let i=requestAnimationFrame,t=cancelAnimationFrame;const{delegate:n}=My;n&&(i=n.requestAnimationFrame,t=n.cancelAnimationFrame);const r=i(s=>{t=void 0,e(s)});return new Ie(()=>t?.(r))},requestAnimationFrame(...e){const{delegate:i}=My;return(i?.requestAnimationFrame||requestAnimationFrame)(...e)},cancelAnimationFrame(...e){const{delegate:i}=My;return(i?.cancelAnimationFrame||cancelAnimationFrame)(...e)},delegate:void 0},zH=new class iwt extends FR{flush(i){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;i=i||n.shift();do{if(r=i.execute(i.state,i.delay))break}while((i=n[0])&&i.id===t&&n.shift());if(this._active=!1,r){for(;(i=n[0])&&i.id===t&&n.shift();)i.unsubscribe();throw r}}}(class ewt extends PR{constructor(i,t){super(i,t),this.scheduler=i,this.work=t}requestAsyncId(i,t,n=0){return null!==n&&n>0?super.requestAsyncId(i,t,n):(i.actions.push(this),i._scheduled||(i._scheduled=My.requestAnimationFrame(()=>i.flush(void 0))))}recycleAsyncId(i,t,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(i,t,n);const{actions:s}=i;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(My.cancelAnimationFrame(t),i._scheduled=void 0)}});let qR,nwt=1;const aC={};function GH(e){return e in aC&&(delete aC[e],!0)}const rwt={setImmediate(e){const i=nwt++;return aC[i]=!0,qR||(qR=Promise.resolve()),qR.then(()=>GH(i)&&e()),i},clearImmediate(e){GH(e)}},{setImmediate:swt,clearImmediate:awt}=rwt,oC={setImmediate(...e){const{delegate:i}=oC;return(i?.setImmediate||swt)(...e)},clearImmediate(e){const{delegate:i}=oC;return(i?.clearImmediate||awt)(e)},delegate:void 0},tk=new class lwt extends FR{flush(i){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let r;i=i||n.shift();do{if(r=i.execute(i.state,i.delay))break}while((i=n[0])&&i.id===t&&n.shift());if(this._active=!1,r){for(;(i=n[0])&&i.id===t&&n.shift();)i.unsubscribe();throw r}}}(class owt extends PR{constructor(i,t){super(i,t),this.scheduler=i,this.work=t}requestAsyncId(i,t,n=0){return null!==n&&n>0?super.requestAsyncId(i,t,n):(i.actions.push(this),i._scheduled||(i._scheduled=oC.setImmediate(i.flush.bind(i,void 0))))}recycleAsyncId(i,t,n=0){var r;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(i,t,n);const{actions:s}=i;null!=t&&(null===(r=s[s.length-1])||void 0===r?void 0:r.id)!==t&&(oC.clearImmediate(t),i._scheduled===t&&(i._scheduled=void 0))}});function Iy(e=0,i,t=kbt){let n=-1;return null!=i&&(yz(i)?t=i:n=i),new ur(r=>{let s=function dwt(e){return e instanceof Date&&!isNaN(e)}(e)?+e-t.now():e;s<0&&(s=0);let o=0;return t.schedule(function(){r.closed||(r.next(o++),0<=n?this.schedule(void 0,n):r.complete())},s)})}function HH(e,i=Ty){return function cwt(e){return ds((i,t)=>{let n=!1,r=null,s=null,o=!1;const l=()=>{if(s?.unsubscribe(),s=null,n){n=!1;const C=r;r=null,t.next(C)}o&&t.complete()},w=()=>{s=null,o&&t.complete()};i.subscribe(Xr(t,C=>{n=!0,r=C,s||eo(e(C)).subscribe(s=Xr(t,l,w))},()=>{o=!0,(!n||!s||s.closed)&&t.complete()}))})}(()=>Iy(e,i))}let Ry=(()=>{class e{constructor(t,n,r){this._ngZone=t,this._platform=n,this._scrolled=new Pe,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const n=this.scrollContainers.get(t);n&&(n.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new ur(n=>{this._globalSubscription||this._addGlobalListener();const r=t>0?this._scrolled.pipe(HH(t)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):vi()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((t,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(t,n){const r=this.getAncestorScrollContainers(t);return this.scrolled(n).pipe(In(s=>!s||r.indexOf(s)>-1))}getAncestorScrollContainers(t){const n=[];return this.scrollContainers.forEach((r,s)=>{this._scrollableContainsElement(s,t)&&n.push(s)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(t,n){let r=vs(n),s=t.getElementRef().nativeElement;do{if(r==s)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>Sc(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ii),Jt(ir),Jt(Ni,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),lC=(()=>{class e{constructor(t,n,r,s){this.elementRef=t,this.scrollDispatcher=n,this.ngZone=r,this.dir=s,this._destroyed=new Pe,this._elementScrolled=new ur(o=>this.ngZone.runOutsideAngular(()=>Sc(this.elementRef.nativeElement,"scroll").pipe(Ui(this._destroyed)).subscribe(o)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(t){const n=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==t.left&&(t.left=r?t.end:t.start),null==t.right&&(t.right=r?t.start:t.end),null!=t.bottom&&(t.top=n.scrollHeight-n.clientHeight-t.bottom),r&&by()!=ad.NORMAL?(null!=t.left&&(t.right=n.scrollWidth-n.clientWidth-t.left),by()==ad.INVERTED?t.left=t.right:by()==ad.NEGATED&&(t.left=t.right?-t.right:t.right)):null!=t.right&&(t.left=n.scrollWidth-n.clientWidth-t.right),this._applyScrollToOptions(t)}_applyScrollToOptions(t){const n=this.elementRef.nativeElement;ZG()?n.scrollTo(t):(null!=t.top&&(n.scrollTop=t.top),null!=t.left&&(n.scrollLeft=t.left))}measureScrollOffset(t){const n="left",r="right",s=this.elementRef.nativeElement;if("top"==t)return s.scrollTop;if("bottom"==t)return s.scrollHeight-s.clientHeight-s.scrollTop;const o=this.dir&&"rtl"==this.dir.value;return"start"==t?t=o?r:n:"end"==t&&(t=o?n:r),o&&by()==ad.INVERTED?t==n?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:o&&by()==ad.NEGATED?t==n?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:t==n?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Ry),mt(ii),mt(Ba,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0})}return e})(),ou=(()=>{class e{constructor(t,n,r){this._platform=t,this._change=new Pe,this._changeListener=s=>{this._change.next(s)},this._document=r,n.runOutsideAngular(()=>{if(t.isBrowser){const s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){const t=this._getWindow();t.removeEventListener("resize",this._changeListener),t.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:n,height:r}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+r,right:t.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,n=this._getWindow(),r=t.documentElement,s=r.getBoundingClientRect();return{top:-s.top||t.body.scrollTop||n.scrollY||r.scrollTop||0,left:-s.left||t.body.scrollLeft||n.scrollX||r.scrollLeft||0}}change(t=20){return t>0?this._change.pipe(HH(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(ii),Jt(Ni,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),lu=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})(),ek=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Sy,lu,Sy,lu]})}return e})();function WH(e,i=!1){return ds((t,n)=>{let r=0;t.subscribe(Xr(n,s=>{const o=e(s,r++);(o||i)&&n.next(s),!o&&n.complete()}))})}function Yr(...e){const i=qx(e),t=function i0t(e,i){return"number"==typeof zI(e)?e.pop():i}(e,1/0),n=e;return n.length?1===n.length?eo(n[0]):Ag(t)(Is(n,i)):Zo}const XH=ZG();class fwt{constructor(i,t){this._viewportRuler=i,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){const i=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=i.style.left||"",this._previousHTMLStyles.top=i.style.top||"",i.style.left=js(-this._previousScrollPosition.left),i.style.top=js(-this._previousScrollPosition.top),i.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const i=this._document.documentElement,n=i.style,r=this._document.body.style,s=n.scrollBehavior||"",o=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,i.classList.remove("cdk-global-scrollblock"),XH&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),XH&&(n.scrollBehavior=s,r.scrollBehavior=o)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}}class mwt{constructor(i,t,n,r){this._scrollDispatcher=i,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(i){this._overlayRef=i}enable(){if(this._scrollSubscription)return;const i=this._scrollDispatcher.scrolled(0).pipe(In(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=i.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=i.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class jH{enable(){}disable(){}attach(){}}function ik(e,i){return i.some(t=>e.bottomt.bottom||e.rightt.right)}function YH(e,i){return i.some(t=>e.topt.bottom||e.leftt.right)}class pwt{constructor(i,t,n,r){this._scrollDispatcher=i,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(i){this._overlayRef=i}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();ik(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let gwt=(()=>{class e{constructor(t,n,r,s){this._scrollDispatcher=t,this._viewportRuler=n,this._ngZone=r,this.noop=()=>new jH,this.close=o=>new mwt(this._scrollDispatcher,this._ngZone,this._viewportRuler,o),this.block=()=>new fwt(this._viewportRuler,this._document),this.reposition=o=>new pwt(this._scrollDispatcher,this._viewportRuler,this._ngZone,o),this._document=s}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ry),Jt(ou),Jt(ii),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();class qg{constructor(i){if(this.scrollStrategy=new jH,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,i){const t=Object.keys(i);for(const n of t)void 0!==i[n]&&(this[n]=i[n])}}}class vwt{constructor(i,t){this.connectionPair=i,this.scrollableViewProperties=t}}let $H=(()=>{class e{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const n=this._attachedOverlays.indexOf(t);n>-1&&this._attachedOverlays.splice(n,1),0===this._attachedOverlays.length&&this.detach()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),xwt=(()=>{class e extends $H{constructor(t,n){super(t),this._ngZone=n,this._keydownListener=r=>{const s=this._attachedOverlays;for(let o=s.length-1;o>-1;o--)if(s[o]._keydownEvents.observers.length>0){const l=s[o]._keydownEvents;this._ngZone?this._ngZone.run(()=>l.next(r)):l.next(r);break}}}add(t){super.add(t),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ii,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),ywt=(()=>{class e extends $H{constructor(t,n,r){super(t),this._platform=n,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=yl(s)},this._clickListener=s=>{const o=yl(s),l="click"===s.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:o;this._pointerDownEventTarget=null;const w=this._attachedOverlays.slice();for(let C=w.length-1;C>-1;C--){const M=w[C];if(M._outsidePointerEvents.observers.length<1||!M.hasAttached())continue;if(M.overlayElement.contains(o)||M.overlayElement.contains(l))break;const P=M._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>P.next(s)):P.next(s)}}}add(t){if(super.add(t),!this._isAttached){const n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("pointerdown",this._pointerDownListener,!0),t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(t){t.addEventListener("pointerdown",this._pointerDownListener,!0),t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ir),Jt(ii,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),cC=(()=>{class e{constructor(t,n){this._platform=n,this._document=t}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||RR()){const r=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let s=0;sthis._backdropClick.next(P),this._backdropTransitionendHandler=P=>{this._disposeBackdrop(P.target)},this._keydownEvents=new Pe,this._outsidePointerEvents=new Pe,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(i){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);const t=this._portalOutlet.attach(i);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(er(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof t?.onDestroy&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const i=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),i}dispose(){const i=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,i&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(i){i!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=i,this.hasAttached()&&(i.attach(this),this.updatePosition()))}updateSize(i){this._config={...this._config,...i},this._updateElementSize()}setDirection(i){this._config={...this._config,direction:i},this._updateElementDirection()}addPanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!0)}removePanelClass(i){this._pane&&this._toggleClasses(this._pane,i,!1)}getDirection(){const i=this._config.direction;return i?"string"==typeof i?i:i.value:"ltr"}updateScrollStrategy(i){i!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=i,this.hasAttached()&&(i.attach(this),i.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const i=this._pane.style;i.width=js(this._config.width),i.height=js(this._config.height),i.minWidth=js(this._config.minWidth),i.minHeight=js(this._config.minHeight),i.maxWidth=js(this._config.maxWidth),i.maxHeight=js(this._config.maxHeight)}_togglePointerEvents(i){this._pane.style.pointerEvents=i?"":"none"}_attachBackdrop(){const i="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(i)})}):this._backdropElement.classList.add(i)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){const i=this._backdropElement;if(i){if(this._animationsDisabled)return void this._disposeBackdrop(i);i.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{i.addEventListener("transitionend",this._backdropTransitionendHandler)}),i.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(i)},500))}}_toggleClasses(i,t,n){const r=Cy(t||[]).filter(s=>!!s);r.length&&(n?i.classList.add(...r):i.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const i=this._ngZone.onStable.pipe(Ui(Yr(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),i.unsubscribe())})})}_disposeScrollStrategy(){const i=this._scrollStrategy;i&&(i.disable(),i.detach&&i.detach())}_disposeBackdrop(i){i&&(i.removeEventListener("click",this._backdropClickHandler),i.removeEventListener("transitionend",this._backdropTransitionendHandler),i.remove(),this._backdropElement===i&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}}const QH="cdk-overlay-connected-position-bounding-box",bwt=/([A-Za-z%]+)$/;class wwt{get positions(){return this._preferredPositions}constructor(i,t,n,r,s){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=s,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Pe,this._resizeSubscription=Ie.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(i)}attach(i){this._validatePositions(),i.hostElement.classList.add(QH),this._overlayRef=i,this._boundingBox=i.hostElement,this._pane=i.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const i=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,s=[];let o;for(let l of this._preferredPositions){let w=this._getOriginPoint(i,r,l),C=this._getOverlayPoint(w,t,l),M=this._getOverlayFit(C,t,n,l);if(M.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(l,w);this._canFitWithFlexibleDimensions(M,C,n)?s.push({position:l,origin:w,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(w,l)}):(!o||o.overlayFit.visibleAreaw&&(w=M,l=C)}return this._isPushed=!1,void this._applyPosition(l.position,l.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(o.position,o.originPoint);this._applyPosition(o.position,o.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Jf(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(QH),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;const i=this._lastPosition;if(i){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();const t=this._getOriginPoint(this._originRect,this._containerRect,i);this._applyPosition(i,t)}else this.apply()}withScrollableContainers(i){return this._scrollables=i,this}withPositions(i){return this._preferredPositions=i,-1===i.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(i){return this._viewportMargin=i,this}withFlexibleDimensions(i=!0){return this._hasFlexibleDimensions=i,this}withGrowAfterOpen(i=!0){return this._growAfterOpen=i,this}withPush(i=!0){return this._canPush=i,this}withLockedPosition(i=!0){return this._positionLocked=i,this}setOrigin(i){return this._origin=i,this}withDefaultOffsetX(i){return this._offsetX=i,this}withDefaultOffsetY(i){return this._offsetY=i,this}withTransformOriginOn(i){return this._transformOriginSelector=i,this}_getOriginPoint(i,t,n){let r,s;if("center"==n.originX)r=i.left+i.width/2;else{const o=this._isRtl()?i.right:i.left,l=this._isRtl()?i.left:i.right;r="start"==n.originX?o:l}return t.left<0&&(r-=t.left),s="center"==n.originY?i.top+i.height/2:"top"==n.originY?i.top:i.bottom,t.top<0&&(s-=t.top),{x:r,y:s}}_getOverlayPoint(i,t,n){let r,s;return r="center"==n.overlayX?-t.width/2:"start"===n.overlayX?this._isRtl()?-t.width:0:this._isRtl()?0:-t.width,s="center"==n.overlayY?-t.height/2:"top"==n.overlayY?0:-t.height,{x:i.x+r,y:i.y+s}}_getOverlayFit(i,t,n,r){const s=ZH(t);let{x:o,y:l}=i,w=this._getOffset(r,"x"),C=this._getOffset(r,"y");w&&(o+=w),C&&(l+=C);let O=0-l,L=l+s.height-n.height,U=this._subtractOverflows(s.width,0-o,o+s.width-n.width),X=this._subtractOverflows(s.height,O,L),W=U*X;return{visibleArea:W,isCompletelyWithinViewport:s.width*s.height===W,fitsInViewportVertically:X===s.height,fitsInViewportHorizontally:U==s.width}}_canFitWithFlexibleDimensions(i,t,n){if(this._hasFlexibleDimensions){const r=n.bottom-t.y,s=n.right-t.x,o=KH(this._overlayRef.getConfig().minHeight),l=KH(this._overlayRef.getConfig().minWidth);return(i.fitsInViewportVertically||null!=o&&o<=r)&&(i.fitsInViewportHorizontally||null!=l&&l<=s)}return!1}_pushOverlayOnScreen(i,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:i.x+this._previousPushAmount.x,y:i.y+this._previousPushAmount.y};const r=ZH(t),s=this._viewportRect,o=Math.max(i.x+r.width-s.width,0),l=Math.max(i.y+r.height-s.height,0),w=Math.max(s.top-n.top-i.y,0),C=Math.max(s.left-n.left-i.x,0);let M=0,P=0;return M=r.width<=s.width?C||-o:i.xU&&!this._isInitialRender&&!this._growAfterOpen&&(o=i.y-U/2)}if("end"===t.overlayX&&!r||"start"===t.overlayX&&r)O=n.width-i.x+2*this._viewportMargin,M=i.x-this._viewportMargin;else if("start"===t.overlayX&&!r||"end"===t.overlayX&&r)P=i.x,M=n.right-i.x;else{const L=Math.min(n.right-i.x+n.left,i.x),U=this._lastBoundingBoxSize.width;M=2*L,P=i.x-L,M>U&&!this._isInitialRender&&!this._growAfterOpen&&(P=i.x-U/2)}return{top:o,left:P,bottom:l,right:O,width:M,height:s}}_setBoundingBoxStyles(i,t){const n=this._calculateBoundingBoxRect(i,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));const r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{const s=this._overlayRef.getConfig().maxHeight,o=this._overlayRef.getConfig().maxWidth;r.height=js(n.height),r.top=js(n.top),r.bottom=js(n.bottom),r.width=js(n.width),r.left=js(n.left),r.right=js(n.right),r.alignItems="center"===t.overlayX?"center":"end"===t.overlayX?"flex-end":"flex-start",r.justifyContent="center"===t.overlayY?"center":"bottom"===t.overlayY?"flex-end":"flex-start",s&&(r.maxHeight=js(s)),o&&(r.maxWidth=js(o))}this._lastBoundingBoxSize=n,Jf(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Jf(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Jf(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(i,t){const n={},r=this._hasExactPosition(),s=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(r){const M=this._viewportRuler.getViewportScrollPosition();Jf(n,this._getExactOverlayY(t,i,M)),Jf(n,this._getExactOverlayX(t,i,M))}else n.position="static";let l="",w=this._getOffset(t,"x"),C=this._getOffset(t,"y");w&&(l+=`translateX(${w}px) `),C&&(l+=`translateY(${C}px)`),n.transform=l.trim(),o.maxHeight&&(r?n.maxHeight=js(o.maxHeight):s&&(n.maxHeight="")),o.maxWidth&&(r?n.maxWidth=js(o.maxWidth):s&&(n.maxWidth="")),Jf(this._pane.style,n)}_getExactOverlayY(i,t,n){let r={top:"",bottom:""},s=this._getOverlayPoint(t,this._overlayRect,i);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),"bottom"===i.overlayY?r.bottom=this._document.documentElement.clientHeight-(s.y+this._overlayRect.height)+"px":r.top=js(s.y),r}_getExactOverlayX(i,t,n){let o,r={left:"",right:""},s=this._getOverlayPoint(t,this._overlayRect,i);return this._isPushed&&(s=this._pushOverlayOnScreen(s,this._overlayRect,n)),o=this._isRtl()?"end"===i.overlayX?"left":"right":"end"===i.overlayX?"right":"left","right"===o?r.right=this._document.documentElement.clientWidth-(s.x+this._overlayRect.width)+"px":r.left=js(s.x),r}_getScrollVisibility(){const i=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:YH(i,n),isOriginOutsideView:ik(i,n),isOverlayClipped:YH(t,n),isOverlayOutsideView:ik(t,n)}}_subtractOverflows(i,...t){return t.reduce((n,r)=>n-Math.max(r,0),i)}_getNarrowedViewportRect(){const i=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+i-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:i-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(i,t){return"x"===t?null==i.offsetX?this._offsetX:i.offsetX:null==i.offsetY?this._offsetY:i.offsetY}_validatePositions(){}_addPanelClasses(i){this._pane&&Cy(i).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(i=>{this._pane.classList.remove(i)}),this._appliedPanelClasses=[])}_getOriginRect(){const i=this._origin;if(i instanceof si)return i.nativeElement.getBoundingClientRect();if(i instanceof Element)return i.getBoundingClientRect();const t=i.width||0,n=i.height||0;return{top:i.y,bottom:i.y+n,left:i.x,right:i.x+t,height:n,width:t}}}function Jf(e,i){for(let t in i)i.hasOwnProperty(t)&&(e[t]=i[t]);return e}function KH(e){if("number"!=typeof e&&null!=e){const[i,t]=e.split(bwt);return t&&"px"!==t?null:parseFloat(i)}return e||null}function ZH(e){return{top:Math.floor(e.top),right:Math.floor(e.right),bottom:Math.floor(e.bottom),left:Math.floor(e.left),width:Math.floor(e.width),height:Math.floor(e.height)}}const JH="cdk-global-overlay-wrapper";class Twt{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(i){const t=i.getConfig();this._overlayRef=i,this._width&&!t.width&&i.updateSize({width:this._width}),this._height&&!t.height&&i.updateSize({height:this._height}),i.hostElement.classList.add(JH),this._isDisposed=!1}top(i=""){return this._bottomOffset="",this._topOffset=i,this._alignItems="flex-start",this}left(i=""){return this._xOffset=i,this._xPosition="left",this}bottom(i=""){return this._topOffset="",this._bottomOffset=i,this._alignItems="flex-end",this}right(i=""){return this._xOffset=i,this._xPosition="right",this}start(i=""){return this._xOffset=i,this._xPosition="start",this}end(i=""){return this._xOffset=i,this._xPosition="end",this}width(i=""){return this._overlayRef?this._overlayRef.updateSize({width:i}):this._width=i,this}height(i=""){return this._overlayRef?this._overlayRef.updateSize({height:i}):this._height=i,this}centerHorizontally(i=""){return this.left(i),this._xPosition="center",this}centerVertically(i=""){return this.top(i),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const i=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:s,maxWidth:o,maxHeight:l}=n,w=!("100%"!==r&&"100vw"!==r||o&&"100%"!==o&&"100vw"!==o),C=!("100%"!==s&&"100vh"!==s||l&&"100%"!==l&&"100vh"!==l),M=this._xPosition,P=this._xOffset,O="rtl"===this._overlayRef.getConfig().direction;let L="",U="",X="";w?X="flex-start":"center"===M?(X="center",O?U=P:L=P):O?"left"===M||"end"===M?(X="flex-end",L=P):("right"===M||"start"===M)&&(X="flex-start",U=P):"left"===M||"start"===M?(X="flex-start",L=P):("right"===M||"end"===M)&&(X="flex-end",U=P),i.position=this._cssPosition,i.marginLeft=w?"0":L,i.marginTop=C?"0":this._topOffset,i.marginBottom=this._bottomOffset,i.marginRight=w?"0":U,t.justifyContent=X,t.alignItems=C?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const i=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(JH),n.justifyContent=n.alignItems=i.marginTop=i.marginBottom=i.marginLeft=i.marginRight=i.position="",this._overlayRef=null,this._isDisposed=!0}}let Cwt=(()=>{class e{constructor(t,n,r,s){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=s}global(){return new Twt}flexibleConnectedTo(t){return new wwt(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ou),Jt(Ni),Jt(ir),Jt(cC))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Swt=0,xs=(()=>{class e{constructor(t,n,r,s,o,l,w,C,M,P,O,L){this.scrollStrategies=t,this._overlayContainer=n,this._componentFactoryResolver=r,this._positionBuilder=s,this._keyboardDispatcher=o,this._injector=l,this._ngZone=w,this._document=C,this._directionality=M,this._location=P,this._outsideClickDispatcher=O,this._animationsModuleType=L}create(t){const n=this._createHostElement(),r=this._createPaneElement(n),s=this._createPortalOutlet(r),o=new qg(t);return o.direction=o.direction||this._directionality.value,new dC(s,n,r,o,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(t){const n=this._document.createElement("div");return n.id="cdk-overlay-"+Swt++,n.classList.add("cdk-overlay-pane"),t.appendChild(n),n}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(jd)),new Y1t(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(gwt),Jt(cC),Jt(Of),Jt(Cwt),Jt(xwt),Jt(is),Jt(ii),Jt(Ni),Jt(Ba),Jt(Xf),Jt(ywt),Jt(Nr,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Ewt=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],qH=new ee("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}});let nk=(()=>{class e{constructor(t){this.elementRef=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0})}return e})(),t7=(()=>{class e{get offsetX(){return this._offsetX}set offsetX(t){this._offsetX=t,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(t){this._offsetY=t,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(t){this._disposeOnNavigation=t}constructor(t,n,r,s,o){this._overlay=t,this._dir=o,this._backdropSubscription=Ie.EMPTY,this._attachSubscription=Ie.EMPTY,this._detachSubscription=Ie.EMPTY,this._positionSubscription=Ie.EMPTY,this._disposeOnNavigation=!1,this._ngZone=me(ii),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new De,this.positionChange=new De,this.attach=new De,this.detach=new De,this.overlayKeydown=new De,this.overlayOutsideClick=new De,this._templatePortal=new su(n,r),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(t){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),t.origin&&this.open&&this._position.apply()),t.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Ewt);const t=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=t.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=t.detachments().subscribe(()=>this.detach.emit()),t.keydownEvents().subscribe(n=>{this.overlayKeydown.next(n),27===n.keyCode&&!this.disableClose&&!io(n)&&(n.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(n=>{this.overlayOutsideClick.next(n)})}_buildConfig(){const t=this._position=this.positionStrategy||this._createPositionStrategy(),n=new qg({direction:this._dir,positionStrategy:t,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||0===this.width)&&(n.width=this.width),(this.height||0===this.height)&&(n.height=this.height),(this.minWidth||0===this.minWidth)&&(n.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(n.minHeight=this.minHeight),this.backdropClass&&(n.backdropClass=this.backdropClass),this.panelClass&&(n.panelClass=this.panelClass),n}_updatePositionStrategy(t){const n=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return t.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){const t=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(t),t}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof nk?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(t=>{this.backdropClick.emit(t)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(WH(()=>this.positionChange.observers.length>0)).subscribe(t=>{this._ngZone.run(()=>this.positionChange.emit(t)),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(xs),mt(fr),mt(Ir),mt(qH),mt(Ba,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[Wt.None,"cdkConnectedOverlayOrigin","origin"],positions:[Wt.None,"cdkConnectedOverlayPositions","positions"],positionStrategy:[Wt.None,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[Wt.None,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[Wt.None,"cdkConnectedOverlayOffsetY","offsetY"],width:[Wt.None,"cdkConnectedOverlayWidth","width"],height:[Wt.None,"cdkConnectedOverlayHeight","height"],minWidth:[Wt.None,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[Wt.None,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[Wt.None,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[Wt.None,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[Wt.None,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[Wt.None,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[Wt.None,"cdkConnectedOverlayOpen","open"],disableClose:[Wt.None,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[Wt.None,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayHasBackdrop","hasBackdrop",Je],lockPosition:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayLockPosition","lockPosition",Je],flexibleDimensions:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",Je],growAfterOpen:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",Je],push:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayPush","push",Je],disposeOnNavigation:[Wt.HasDecoratorInputTransform,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",Je]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[ln,tr]})}return e})();const Dwt={provide:qH,deps:[xs],useFactory:function Awt(e){return()=>e.scrollStrategies.reposition()}};let qf=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[xs,Dwt],imports:[Sy,Jg,ek,ek]})}return e})();function Mwt(e,i){if(1&e){const t=ve();tt(0,"div",1)(1,"button",2),Vt("click",function(){return Ut(t),zt(Ct().action())}),ut(2),et()()}if(2&e){const t=Ct();lt(2),Ye(" ",t.data.action," ")}}const Iwt=["label"];function Rwt(e,i){}const kwt=Math.pow(2,31)-1;class uC{constructor(i,t){this._overlayRef=t,this._afterDismissed=new Pe,this._afterOpened=new Pe,this._onAction=new Pe,this._dismissedByAction=!1,this.containerInstance=i,i._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(i){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(i,kwt))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}const rk=new ee("MatSnackBarData");class hC{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}let e7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0})}return e})(),i7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0})}return e})(),n7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0})}return e})(),r7=(()=>{class e{constructor(t,n){this.snackBarRef=t,this.data=n}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static#t=this.\u0275fac=function(n){return new(n||e)(mt(uC),mt(rk))};static#e=this.\u0275cmp=je({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[Vi],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(n,r){1&n&&(tt(0,"div",0),ut(1),et(),Gt(2,Mwt,3,1,"div",1)),2&n&&(lt(),Ye(" ",r.data.message,"\n"),lt(),xn(2,r.hasAction?2:-1))},dependencies:[Sa,e7,i7,n7],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0})}return e})();const Pwt={snackBarState:mr("state",[Rn("void, hidden",qe({transform:"scale(0.8)",opacity:0})),Rn("visible",qe({transform:"scale(1)",opacity:1})),on("* => visible",sn("150ms cubic-bezier(0, 0, 0.2, 1)")),on("* => void, * => hidden",sn("75ms cubic-bezier(0.4, 0.0, 1, 1)",qe({opacity:0})))])};let Fwt=0,s7=(()=>{class e extends sC{constructor(t,n,r,s,o){super(),this._ngZone=t,this._elementRef=n,this._changeDetectorRef=r,this._platform=s,this.snackBarConfig=o,this._document=me(Ni),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Pe,this._onExit=new Pe,this._onEnter=new Pe,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+Fwt++,this.attachDomPortal=l=>{this._assertNotAttached();const w=this._portalOutlet.attachDomPortal(l);return this._afterPortalAttached(),w},this._live="assertive"!==o.politeness||o.announcementMessage?"off"===o.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){this._assertNotAttached();const n=this._portalOutlet.attachComponentPortal(t);return this._afterPortalAttached(),n}attachTemplatePortal(t){this._assertNotAttached();const n=this._portalOutlet.attachTemplatePortal(t);return this._afterPortalAttached(),n}onAnimationEnd(t){const{fromState:n,toState:r}=t;if(("void"===r&&"void"!==n||"hidden"===r)&&this._completeExit(),"visible"===r){const s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){const t=this._elementRef.nativeElement,n=this.snackBarConfig.panelClass;n&&(Array.isArray(n)?n.forEach(o=>t.classList.add(o)):t.classList.add(n)),this._exposeToModals();const r=this._label.nativeElement,s="mdc-snackbar__label";r.classList.toggle(s,!r.querySelector(`.${s}`))}_exposeToModals(){const t=this._liveElementId,n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{const n=t.getAttribute("aria-owns");if(n){const r=n.replace(this._liveElementId,"").trim();r.length>0?t.setAttribute("aria-owns",r):t.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),n=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&n){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(r=document.activeElement),t.removeAttribute("aria-hidden"),n.appendChild(t),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ii),mt(si),mt(Mn),mt(ir),mt(hC))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(n,r){if(1&n&&(Mi(au,7),Mi(Iwt,7)),2&n){let s;Be(s=Ve())&&(r._portalOutlet=s.first),Be(s=Ve())&&(r._label=s.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(n,r){1&n&&G_("@state.done",function(o){return r.onAnimationEnd(o)}),2&n&&N_("@state",r._animationState)},standalone:!0,features:[hi,Vi],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(n,r){1&n&&(tt(0,"div",1)(1,"div",2,0)(3,"div",3),Gt(4,Rwt,0,0,"ng-template",4),et(),we(5,"div"),et()()),2&n&&(lt(5),Ti("aria-live",r._live)("role",r._role)("id",r._liveElementId))},dependencies:[au],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape)}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size);font-family:var(--mdc-snackbar-supporting-text-font);font-weight:var(--mdc-snackbar-supporting-text-weight);line-height:var(--mdc-snackbar-supporting-text-line-height)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color);--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[Pwt.snackBarState]}})}return e})();const Lwt=new ee("mat-snack-bar-default-options",{providedIn:"root",factory:function Owt(){return new hC}});let Sh=(()=>{class e{get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}constructor(t,n,r,s,o,l){this._overlay=t,this._live=n,this._injector=r,this._breakpointObserver=s,this._parentSnackBar=o,this._defaultConfig=l,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=r7,this.snackBarContainerComponent=s7,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(t,n){return this._attach(t,n)}openFromTemplate(t,n){return this._attach(t,n)}open(t,n="",r){const s={...this._defaultConfig,...r};return s.data={message:t,action:n},s.announcementMessage===t&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,n){const s=is.create({parent:n&&n.viewContainerRef&&n.viewContainerRef.injector||this._injector,providers:[{provide:hC,useValue:n}]}),o=new Zg(this.snackBarContainerComponent,n.viewContainerRef,s),l=t.attach(o);return l.instance.snackBarConfig=n,l.instance}_attach(t,n){const r={...new hC,...this._defaultConfig,...n},s=this._createOverlay(r),o=this._attachSnackBarContainer(s,r),l=new uC(o,s);if(t instanceof fr){const w=new su(t,null,{$implicit:r.data,snackBarRef:l});l.instance=o.attachTemplatePortal(w)}else{const w=this._createInjector(r,l),C=new Zg(t,void 0,w),M=o.attachComponentPortal(C);l.instance=M.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(Ui(s.detachments())).subscribe(w=>{s.overlayElement.classList.toggle(this.handsetCssClass,w.matches)}),r.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(l,r),this._openedSnackBarRef=l,this._openedSnackBarRef}_animateSnackBar(t,n){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),n.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),n.duration&&n.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(n.duration))}_createOverlay(t){const n=new qg;n.direction=t.direction;let r=this._overlay.position().global();const s="rtl"===t.direction,o="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!s||"end"===t.horizontalPosition&&s,l=!o&&"center"!==t.horizontalPosition;return o?r.left("0"):l?r.right("0"):r.centerHorizontally(),"top"===t.verticalPosition?r.top("0"):r.bottom("0"),n.positionStrategy=r,this._overlay.create(n)}_createInjector(t,n){return is.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:uC,useValue:n},{provide:rk,useValue:t.data}]})}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xs),Jt(pH),Jt(is),Jt(nH),Jt(e,12),Jt(Lwt))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Nwt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[Sh],imports:[qf,Jg,QR,Ki,r7,Ki]})}return e})(),Ar=(()=>{class e{constructor(t,n){this.sbRef=t,this.data=n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(uC),mt(rk))};static#e=this.\u0275cmp=je({type:e,selectors:[["snack-alert"]],decls:2,vars:1,consts:[[1,"example-alert"]],template:function(n,r){1&n&&(tt(0,"span",0),ut(1),et()),2&n&&(lt(),Ze(r.data))},styles:[".example-alert[_ngcontent-%COMP%]{color:#fff}"]})}return e})(),ca=(()=>{class e{constructor(t,n){this.http=t,this._snackBar=n,this.snowstormFhirBase="https://snowstorm.ihtsdotools.org/fhir",this.defaultFhirUrlParam="http://snomed.info/sct",this.fhirUrlParam=this.defaultFhirUrlParam,this.lang="en",this.snowstormFhirBaseSubject=new Wr(this.snowstormFhirBase),this.fhirUrlParamSubject=new Wr(this.fhirUrlParam),this.langSubject=new Wr(this.lang),this.snowstormFhirBase$=this.snowstormFhirBaseSubject.asObservable(),this.fhirUrlParam$=this.fhirUrlParamSubject.asObservable(),this.lang$=this.langSubject.asObservable(),this.conceptCache=new Map}setSnowstormFhirBase(t){this.snowstormFhirBase=t,this.snowstormFhirBaseSubject.next(t)}setFhirUrlParam(t){this.fhirUrlParam=t,this.fhirUrlParamSubject.next(t)}setLang(t){this.lang=t,this.langSubject.next(t)}getSnowstormFhirBase(){return this.snowstormFhirBase}getFhirUrlParam(){return this.fhirUrlParam}getLang(){return this.lang}getCodeSystems(){return this.http.get(`${this.snowstormFhirBase}/CodeSystem`).pipe(oa(this.handleError("getCodeSystems",{})))}getCodeSystem(t){return this.http.get(`${this.snowstormFhirBase}/CodeSystem?version=${t}`).pipe(oa(this.handleError("getCodeSystem",{})))}getValueSetExpansionUrl(t,n,r,s){return r||(r=0),s||(s=20),"string"!=typeof n&&(n=""),`${this.snowstormFhirBase}/ValueSet/$expand?url=${this.fhirUrlParam}?fhir_vs=ecl/${encodeURIComponent(t)}&count=${s}&offset=${r}&filter=${n}&language=${this.lang}&displayLanguage=${this.lang}`}expandValueSet(t,n,r,s){let o=this.getValueSetExpansionUrl(t,n,r,s);return this.http.get(o).pipe(oa(this.handleError("expandValueSet",{})))}translate(t,n,r){return r||(r=this.defaultFhirUrlParam),this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?url=http://snomed.info/sct?fhir_cm=${t}&code=${n}&system=${r}`).pipe(oa(this.handleError("translate",{})))}expandValueSetFromServer(t,n,r,s,o,l){o||(o=0),l||(l=20),t||(t=this.snowstormFhirBase),n||(n=this.fhirUrlParam),"string"!=typeof s&&(s="");let w=`${t}/ValueSet/$expand?url=${n}?fhir_vs=ecl/${encodeURIComponent(r)}&count=${l}&offset=${o}&filter=${s}&language=${this.lang}&displayLanguage=${this.lang}`;return this.http.get(w).pipe(oa(this.handleError("expandValueSet",{})))}handleError(t="operation",n){return r=>(console.error("There was an error!"),console.error(r),this._snackBar.openFromComponent(Ar,{duration:5e3,data:r.message,panelClass:["red-snackbar"]}),vi(n))}lookupConcept(t,n){n||(n=this.fhirUrlParam);const r=`${n}:${t}`,s=this.conceptCache.get(r);if(s)return vi(s);let o=`${this.snowstormFhirBase}/CodeSystem/$lookup?system=http://snomed.info/sct&code=${t}&property=normalForm`;"http://snomed.info/sct"!=n&&(o+=`&version=${n}`);const l={headers:new Jo({"Accept-Language":"en"})};return this.http.get(o,l).pipe(hs(w=>{this.conceptCache.set(r,w)}),oa(this.handleError("lookupConcept",{})))}getMRCMAttributes(t){let n=`${this.snowstormFhirBase.replace("fhir","snowstorm/snomed-ct")}mrcm/MAIN/domain-attributes?parentIds=${t}&proximalPrimitiveModeling=false&contentType=POSTCOORDINATED`;return this.http.get(n).pipe(oa(this.handleError("getMRCMAttributes",{})))}addPostcoordinatedExpression(t){let n=`${this.snowstormFhirBase}/CodeSystem/sct_11000003104_EXP`;const r={headers:new Jo({"Content-Type":"application/fhir+json"})};return this.http.patch(n,{resourceType:"CodeSystem",concept:[{code:t}]},r).pipe(oa(this.handleError("addPostcoordinatedExpression",{})))}runEclLegacy(t){let n=`https://browser.ihtsdotools.org/snowstorm/snomed-ct/MAIN/SNOMEDCT-ES/2022-10-31/concepts?offset=0&limit=100&termActive=true&ecl=${encodeURIComponent(t)}`;return this.http.get(n).pipe(oa(this.handleError("expandValueSet",{})))}getIcd10MapTargets(t){return this.http.get(`${this.snowstormFhirBase}/ConceptMap/$translate?code=${t}&system=http://snomed.info/sct&source=http://snomed.info/sct?fhir_vs&target=http://hl7.org/fhir/sid/icd-10&url=http://snomed.info/sct/900000000000207008/version/20200131?fhir_cm=447562003`).pipe(oa(this.handleError("translate",{})))}lookupOtherCodeSystems(t,n){return this.http.get(`${this.snowstormFhirBase}/CodeSystem/$lookup?system=${t}&code=${n}`).pipe(oa(this.handleError("lookup",{})))}getNormalForm(t){if(t.parameter)for(let n of t.parameter){let r=!1;if("property"==n.name){for(let s of n.part)"code"==s.name&&"normalForm"==s.valueString&&(r=!0);if(r)for(let s of n.part)if("valueString"==s.name)return s.valueString}}return""}parseNormmalForm(t){const n=[];return t.split("} {").forEach(s=>{const o=s.match(/\d+\|[^\|]+\|\s*=\s*\d+\|[^\|]+\|/g);if(!o)return;const l=o.map(w=>{const[C,M]=w.split("=").map(X=>X.trim()),[P,O]=C.split("|").map(X=>X.trim()),[L,U]=M.split("|").map(X=>X.trim());return{type:{code:P,display:O.replace(/\(.*\)/,"").trim()},target:{code:L,display:U}}});n.push(l)}),{groups:n}}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(sd),Jt(Sh))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function a7(...e){const i=bz(e),{args:t,keys:n}=wz(e),r=new ur(s=>{const{length:o}=t;if(!o)return void s.complete();const l=new Array(o);let w=o,C=o;for(let M=0;M{P||(P=!0,C--),l[M]=O},()=>w--,void 0,()=>{(!w||!P)&&(C||s.next(n?_z(n,l):l),s.complete())}))}});return i?r.pipe(GI(i)):r}function o7(e={}){const{connector:i=(()=>new Pe),resetOnError:t=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=e;return s=>{let o,l,w,C=0,M=!1,P=!1;const O=()=>{l?.unsubscribe(),l=void 0},L=()=>{O(),o=w=void 0,M=P=!1},U=()=>{const X=o;L(),X?.unsubscribe()};return ds((X,W)=>{C++,!P&&!M&&O();const Z=w=w??i();W.add(()=>{C--,0===C&&!P&&!M&&(l=sk(U,r))}),Z.subscribe(W),!o&&C>0&&(o=new Ho({next:rt=>Z.next(rt),error:rt=>{P=!0,O(),l=sk(L,t,rt),Z.error(rt)},complete:()=>{M=!0,O(),l=sk(L,n),Z.complete()}}),eo(X).subscribe(o))})(s)}}function sk(e,i,...t){if(!0===i)return void e();if(!1===i)return;const n=new Ho({next:()=>{n.unsubscribe(),e()}});return eo(i(...t)).subscribe(n)}const Bwt=["*"];let fC;function ky(e){return function Vwt(){if(void 0===fC&&(fC=null,typeof window<"u")){const e=window;void 0!==e.trustedTypes&&(fC=e.trustedTypes.createPolicy("angular#components",{createHTML:i=>i}))}return fC}()?.createHTML(e)||e}function l7(e){return Error(`Unable to find icon with the name "${e}"`)}function c7(e){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${e}".`)}function d7(e){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${e}".`)}class tm{constructor(i,t,n){this.url=i,this.svgText=t,this.options=n}}let mC=(()=>{class e{constructor(t,n,r,s){this._httpClient=t,this._sanitizer=n,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(t,n,r){return this.addSvgIconInNamespace("",t,n,r)}addSvgIconLiteral(t,n,r){return this.addSvgIconLiteralInNamespace("",t,n,r)}addSvgIconInNamespace(t,n,r,s){return this._addSvgIconConfig(t,n,new tm(r,null,s))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,n,r,s){const o=this._sanitizer.sanitize(La.HTML,r);if(!o)throw d7(r);const l=ky(o);return this._addSvgIconConfig(t,n,new tm("",l,s))}addSvgIconSet(t,n){return this.addSvgIconSetInNamespace("",t,n)}addSvgIconSetLiteral(t,n){return this.addSvgIconSetLiteralInNamespace("",t,n)}addSvgIconSetInNamespace(t,n,r){return this._addSvgIconSetConfig(t,new tm(n,null,r))}addSvgIconSetLiteralInNamespace(t,n,r){const s=this._sanitizer.sanitize(La.HTML,n);if(!s)throw d7(n);const o=ky(s);return this._addSvgIconSetConfig(t,new tm("",o,r))}registerFontClassAlias(t,n=t){return this._fontCssClassesByAlias.set(t,n),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){const n=this._sanitizer.sanitize(La.RESOURCE_URL,t);if(!n)throw c7(t);const r=this._cachedIconsByUrl.get(n);return r?vi(pC(r)):this._loadSvgIconFromConfig(new tm(t,null)).pipe(hs(s=>this._cachedIconsByUrl.set(n,s)),Di(s=>pC(s)))}getNamedSvgIcon(t,n=""){const r=u7(n,t);let s=this._svgIconConfigs.get(r);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(n,t),s)return this._svgIconConfigs.set(r,s),this._getSvgFromConfig(s);const o=this._iconSetConfigs.get(n);return o?this._getSvgFromIconSetConfigs(t,o):Mg(l7(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?vi(pC(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(Di(n=>pC(n)))}_getSvgFromIconSetConfigs(t,n){const r=this._extractIconWithNameFromAnySet(t,n);return r?vi(r):a7(n.filter(o=>!o.svgText).map(o=>this._loadSvgIconSetFromConfig(o).pipe(oa(l=>{const C=`Loading icon set URL: ${this._sanitizer.sanitize(La.RESOURCE_URL,o.url)} failed: ${l.message}`;return this._errorHandler.handleError(new Error(C)),vi(null)})))).pipe(Di(()=>{const o=this._extractIconWithNameFromAnySet(t,n);if(!o)throw l7(t);return o}))}_extractIconWithNameFromAnySet(t,n){for(let r=n.length-1;r>=0;r--){const s=n[r];if(s.svgText&&s.svgText.toString().indexOf(t)>-1){const o=this._svgElementFromConfig(s),l=this._extractSvgIconFromSet(o,t,s.options);if(l)return l}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(hs(n=>t.svgText=n),Di(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?vi(null):this._fetchIcon(t).pipe(hs(n=>t.svgText=n))}_extractSvgIconFromSet(t,n,r){const s=t.querySelector(`[id="${n}"]`);if(!s)return null;const o=s.cloneNode(!0);if(o.removeAttribute("id"),"svg"===o.nodeName.toLowerCase())return this._setSvgAttributes(o,r);if("symbol"===o.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(o),r);const l=this._svgElementFromString(ky(""));return l.appendChild(o),this._setSvgAttributes(l,r)}_svgElementFromString(t){const n=this._document.createElement("DIV");n.innerHTML=t;const r=n.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(t){const n=this._svgElementFromString(ky("")),r=t.attributes;for(let s=0;sky(C)),Rg(()=>this._inProgressUrlFetches.delete(o)),o7());return this._inProgressUrlFetches.set(o,w),w}_addSvgIconConfig(t,n,r){return this._svgIconConfigs.set(u7(t,n),r),this}_addSvgIconSetConfig(t,n){const r=this._iconSetConfigs.get(t);return r?r.push(n):this._iconSetConfigs.set(t,[n]),this}_svgElementFromConfig(t){if(!t.svgElement){const n=this._svgElementFromString(t.svgText);this._setSvgAttributes(n,t.options),t.svgElement=n}return t.svgElement}_getIconConfigFromResolvers(t,n){for(let r=0;ri?i.pathname+i.search:""}}}),h7=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],jwt=h7.map(e=>`[${e}]`).join(", "),Ywt=/^url\(['"]?#(.*?)['"]?\)$/;let da=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}get fontSet(){return this._fontSet}set fontSet(t){const n=this._cleanupFontValue(t);n!==this._fontSet&&(this._fontSet=n,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(t){const n=this._cleanupFontValue(t);n!==this._fontIcon&&(this._fontIcon=n,this._updateFontIconClasses())}constructor(t,n,r,s,o,l){this._elementRef=t,this._iconRegistry=n,this._location=s,this._errorHandler=o,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Ie.EMPTY,l&&(l.color&&(this.color=this._defaultColor=l.color),l.fontSet&&(this.fontSet=l.fontSet)),r||t.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];const n=t.split(":");switch(n.length){case 1:return["",n[0]];case 2:return n;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){const t=this._elementsWithExternalReferences;if(t&&t.size){const n=this._location.getPathname();n!==this._previousPath&&(this._previousPath=n,this._prependPathToReferences(n))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();const n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){const t=this._elementRef.nativeElement;let n=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();n--;){const r=t.childNodes[n];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;const t=this._elementRef.nativeElement,n=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>t.classList.remove(r)),n.forEach(r=>t.classList.add(r)),this._previousFontSetClass=n,this.fontIcon!==this._previousFontIconClass&&!n.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return"string"==typeof t?t.trim().split(" ")[0]:t}_prependPathToReferences(t){const n=this._elementsWithExternalReferences;n&&n.forEach((r,s)=>{r.forEach(o=>{s.setAttribute(o.name,`url('${t}#${o.value}')`)})})}_cacheChildrenWithExternalReferences(t){const n=t.querySelectorAll(jwt),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{const l=n[s],w=l.getAttribute(o),C=w?w.match(Ywt):null;if(C){let M=r.get(l);M||(M=[],r.set(l,M)),M.push({name:o,value:C[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){const[n,r]=this._splitIconName(t);n&&(this._svgNamespace=n),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,n).pipe(er(1)).subscribe(s=>this._setSvgElement(s),s=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${n}:${r}! ${s.message}`))})}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(mC),hl("aria-hidden"),mt(Wwt),mt(fl),mt(Hwt,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(n,r){2&n&&(Ti("data-mat-icon-type",r._usingFontIcon()?"font":"svg")("data-mat-icon-name",r._svgName||r.fontIcon)("data-mat-icon-namespace",r._svgNamespace||r.fontSet)("fontIcon",r._usingFontIcon()?r.fontIcon:null),Ll(r.color?"mat-"+r.color:""),bi("mat-icon-inline",r.inline)("mat-icon-no-color","primary"!==r.color&&"accent"!==r.color&&"warn"!==r.color))},inputs:{color:"color",inline:[Wt.HasDecoratorInputTransform,"inline","inline",Je],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[ln,Vi],ngContentSelectors:Bwt,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0})}return e})(),$wt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})();function f7(e,i){return i?t=>ty(i.pipe(er(1),function Qwt(){return ds((e,i)=>{e.subscribe(Xr(i,sr))})}()),t.pipe(f7(e))):_a((t,n)=>eo(e(t,n)).pipe(er(1),bT(t)))}function ak(e,i=Ty){const t=Iy(e,i);return f7(()=>t)}const Kwt=["mat-menu-item",""],Zwt=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Jwt=["mat-icon, [matMenuItemIcon]","*"];function qwt(e,i){1&e&&(ul(),tt(0,"svg",2),we(1,"polygon",3),et())}const t_t=["*"];function e_t(e,i){if(1&e){const t=ve();tt(0,"div",0),Vt("keydown",function(r){return Ut(t),zt(Ct()._handleKeydown(r))})("click",function(){return Ut(t),zt(Ct().closed.emit("click"))})("@transformMenu.start",function(r){return Ut(t),zt(Ct()._onAnimationStart(r))})("@transformMenu.done",function(r){return Ut(t),zt(Ct()._onAnimationDone(r))}),tt(1,"div",1),xi(2),et()()}if(2&e){const t=Ct();yt("id",t.panelId)("ngClass",t._classList)("@transformMenu",t._panelAnimationState),Ti("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}const ok=new ee("MAT_MENU_PANEL");let Gl=(()=>{class e{constructor(t,n,r,s,o){this._elementRef=t,this._document=n,this._focusMonitor=r,this._parentMenu=s,this._changeDetectorRef=o,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new Pe,this._focused=new Pe,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(t,n){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,n):this._getHostElement().focus(n),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){const t=this._elementRef.nativeElement.cloneNode(!0),n=t.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",sn("120ms cubic-bezier(0, 0, 0.2, 1)",qe({opacity:1,transform:"scale(1)"}))),on("* => void",sn("100ms 25ms linear",qe({opacity:0})))]),fadeInItems:mr("fadeInItems",[Rn("showing",qe({opacity:1})),on("void => *",[qe({opacity:0}),sn("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let n_t=0;const r_t=new ee("mat-menu-default-options",{providedIn:"root",factory:function s_t(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}});let bl=(()=>{class e{get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}set panelClass(t){const n=this._previousPanelClass;n&&n.length&&n.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(t){this.panelClass=t}constructor(t,n,r,s){this._elementRef=t,this._ngZone=n,this._changeDetectorRef=s,this._elevationPrefix="mat-elevation-z",this._baseElevation=8,this._directDescendantItems=new nh,this._classList={},this._panelAnimationState="void",this._animationDone=new Pe,this.closed=new De,this.close=this.closed,this.panelId="mat-menu-panel-"+n_t++,this.overlayPanelClass=r.overlayPanelClass||"",this._xPosition=r.xPosition,this._yPosition=r.yPosition,this.backdropClass=r.backdropClass,this.overlapTrigger=r.overlapTrigger,this.hasBackdrop=r.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new VR(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(Ta(this._directDescendantItems),Rs(t=>Yr(...t.map(n=>n._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t)),this._directDescendantItems.changes.subscribe(t=>{const n=this._keyManager;if("enter"===this._panelAnimationState&&n.activeItem?._hasFocus()){const r=t.toArray(),s=Math.max(0,Math.min(r.length-1,n.activeItemIndex||0));r[s]&&!r[s].disabled?n.setActiveItem(s):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(Ta(this._directDescendantItems),Rs(n=>Yr(...n.map(r=>r._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){const n=t.keyCode,r=this._keyManager;switch(n){case 27:io(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===n||40===n)&&r.setFocusOrigin("keyboard"),void r.onKeydown(t)}t.stopPropagation()}focusFirstItem(t="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(er(1)).subscribe(()=>{let n=null;if(this._directDescendantItems.length&&(n=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!n||!n.contains(document.activeElement)){const r=this._keyManager;r.setFocusOrigin(t).setFirstItemActive(),!r.activeItem&&n&&n.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){const n=Math.min(this._baseElevation+t,24),r=`${this._elevationPrefix}${n}`,s=Object.keys(this._classList).find(o=>o.startsWith(this._elevationPrefix));(!s||s===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(t=this.xPosition,n=this.yPosition){const r=this._classList;r["mat-menu-before"]="before"===t,r["mat-menu-after"]="after"===t,r["mat-menu-above"]="above"===n,r["mat-menu-below"]="below"===n,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(t){this._animationDone.next(t),this._isAnimating=!1}_onAnimationStart(t){this._isAnimating=!0,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(Ta(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(n=>n._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ii),mt(r_t),mt(Mn))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-menu"]],contentQueries:function(n,r,s){if(1&n&&(An(s,i_t,5),An(s,Gl,5),An(s,Gl,4)),2&n){let o;Be(o=Ve())&&(r.lazyContent=o.first),Be(o=Ve())&&(r._allItems=o),Be(o=Ve())&&(r.items=o)}},viewQuery:function(n,r){if(1&n&&Mi(fr,5),2&n){let s;Be(s=Ve())&&(r.templateRef=s.first)}},hostVars:3,hostBindings:function(n,r){2&n&&Ti("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[Wt.HasDecoratorInputTransform,"overlapTrigger","overlapTrigger",Je],hasBackdrop:[Wt.HasDecoratorInputTransform,"hasBackdrop","hasBackdrop",t=>null==t?null:Je(t)],panelClass:[Wt.None,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[fi([{provide:ok,useExisting:e}]),ln,Vi],ngContentSelectors:t_t,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id","ngClass"],[1,"mat-mdc-menu-content"]],template:function(n,r){1&n&&(Kn(),Gt(0,e_t,3,6,"ng-template"))},dependencies:[bc],styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font);line-height:var(--mat-menu-item-label-text-line-height);font-size:var(--mat-menu-item-label-text-size);letter-spacing:var(--mat-menu-item-label-text-tracking);font-weight:var(--mat-menu-item-label-text-weight)}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape);background-color:var(--mat-menu-container-color);will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-divider{color:var(--mat-menu-divider-color);margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;align-items:center;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:var(--mat-menu-item-trailing-spacing);padding-right:var(--mat-menu-item-leading-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]),.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon])[dir=rtl]{padding-left:var(--mat-menu-item-with-icon-trailing-spacing);padding-right:var(--mat-menu-item-with-icon-leading-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color)}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color)}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;padding-right:var(--mat-menu-item-spacing);padding-left:0}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[gC.transformMenu,gC.fadeInItems]},changeDetection:0})}return e})();const m7=new ee("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}}),o_t={provide:m7,deps:[xs],useFactory:function a_t(e){return()=>e.scrollStrategies.reposition()}},p7=Cc({passive:!0});let cu=(()=>{class e{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){t!==this._menu&&(this._menu=t,this._menuCloseSubscription.unsubscribe(),t&&(this._menuCloseSubscription=t.close.subscribe(n=>{this._destroyMenu(n),("click"===n||"tab"===n)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(t,n,r,s,o,l,w,C,M){this._overlay=t,this._element=n,this._viewContainerRef=r,this._menuItemInstance=l,this._dir=w,this._focusMonitor=C,this._ngZone=M,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Ie.EMPTY,this._hoverSubscription=Ie.EMPTY,this._menuCloseSubscription=Ie.EMPTY,this._changeDetectorRef=me(Mn),this._handleTouchStart=P=>{ZT(P)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new De,this.onMenuOpen=this.menuOpened,this.menuClosed=new De,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=o instanceof bl?o:void 0,n.nativeElement.addEventListener("touchstart",this._handleTouchStart,p7)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,p7),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){const t=this.menu;if(this._menuOpen||!t)return;const n=this._createOverlay(t),r=n.getConfig(),s=r.positionStrategy;this._setPosition(t,s),r.hasBackdrop=null==t.hasBackdrop?!this.triggersSubmenu():t.hasBackdrop,n.attach(this._getPortal(t)),t.lazyContent&&t.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(t),t instanceof bl&&(t._startAnimation(),t._directDescendantItems.changes.pipe(Ui(t.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(t,n){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,n):this._element.nativeElement.focus(n)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(t){if(!this._overlayRef||!this.menuOpen)return;const n=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===t||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,n instanceof bl?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(In(r=>"void"===r.toState),er(1),Ui(n.lazyContent._attached)).subscribe({next:()=>n.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),n?.lazyContent?.detach())}_initMenu(t){t.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,this._setMenuElevation(t),t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(t){if(t.setElevation){let n=0,r=t.parentMenu;for(;r;)n++,r=r.parentMenu;t.setElevation(n)}}_setIsMenuOpen(t){t!==this._menuOpen&&(this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(t),this._changeDetectorRef.markForCheck())}_createOverlay(t){if(!this._overlayRef){const n=this._getOverlayConfig(t);this._subscribeToPositions(t,n.positionStrategy),this._overlayRef=this._overlay.create(n),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(t){return new qg({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:t.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:t.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(t,n){t.setPositionClasses&&n.positionChanges.subscribe(r=>{const s="start"===r.connectionPair.overlayX?"after":"before",o="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>t.setPositionClasses(s,o)):t.setPositionClasses(s,o)})}_setPosition(t,n){let[r,s]="before"===t.xPosition?["end","start"]:["start","end"],[o,l]="above"===t.yPosition?["bottom","top"]:["top","bottom"],[w,C]=[o,l],[M,P]=[r,s],O=0;if(this.triggersSubmenu()){if(P=r="before"===t.xPosition?"start":"end",s=M="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){const L=this._parentMaterialMenu.items.first;this._parentInnerPadding=L?L._getHostElement().offsetTop:0}O="bottom"===o?this._parentInnerPadding:-this._parentInnerPadding}}else t.overlapTrigger||(w="top"===o?"bottom":"top",C="top"===l?"bottom":"top");n.withPositions([{originX:r,originY:w,overlayX:M,overlayY:o,offsetY:O},{originX:s,originY:w,overlayX:P,overlayY:o,offsetY:O},{originX:r,originY:C,overlayX:M,overlayY:l,offsetY:-O},{originX:s,originY:C,overlayX:P,overlayY:l,offsetY:-O}])}_menuClosingActions(){const t=this._overlayRef.backdropClick(),n=this._overlayRef.detachments();return Yr(t,this._parentMaterialMenu?this._parentMaterialMenu.closed:vi(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(In(o=>o!==this._menuItemInstance),In(()=>this._menuOpen)):vi(),n)}_handleMousedown(t){KT(t)||(this._openedBy=0===t.button?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){const n=t.keyCode;(13===n||32===n)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===n&&"ltr"===this.dir||37===n&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(In(t=>t===this._menuItemInstance&&!t.disabled),ak(0,tk)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof bl&&this.menu._isAnimating?this.menu._animationDone.pipe(er(1),ak(0,tk),Ui(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(t){return(!this._portal||this._portal.templateRef!==t.templateRef)&&(this._portal=new su(t.templateRef,this._viewContainerRef)),this._portal}static#t=this.\u0275fac=function(n){return new(n||e)(mt(xs),mt(si),mt(Ir),mt(m7),mt(ok,8),mt(Gl,10),mt(Ba,8),mt(Ul),mt(ii))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(n,r){1&n&&Vt("click",function(o){return r._handleClick(o)})("mousedown",function(o){return r._handleMousedown(o)})("keydown",function(o){return r._handleKeydown(o)}),2&n&&Ti("aria-haspopup",r.menu?"menu":null)("aria-expanded",r.menuOpen)("aria-controls",r.menuOpen?r.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[Wt.None,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[Wt.None,"matMenuTriggerFor","menu"],menuData:[Wt.None,"matMenuTriggerData","menuData"],restoreFocus:[Wt.None,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0})}return e})(),l_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[o_t],imports:[qc,Qg,Ki,qf,lu,Ki]})}return e})();const c_t=["determinateSpinner"];function d_t(e,i){if(1&e&&(ul(),tt(0,"svg",11),we(1,"circle",12),et()),2&e){const t=Ct();Ti("viewBox",t._viewBox()),lt(),Ds("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Ti("r",t._circleRadius())}}const u_t=new ee("mat-progress-spinner-default-options",{providedIn:"root",factory:function h_t(){return{diameter:g7}}}),g7=100;let Eh=(()=>{class e{get color(){return this._color||this._defaultColor}set color(t){this._color=t}constructor(t,n,r){this._elementRef=t,this._defaultColor="primary",this._value=0,this._diameter=g7,this._noopAnimations="NoopAnimations"===n&&!!r&&!r._forceAnimations,this.mode="mat-spinner"===t.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",r&&(r.color&&(this.color=this._defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0))}get diameter(){return this._diameter}set diameter(t){this._diameter=t||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const t=2*this._circleRadius()+this.strokeWidth;return`0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Nr,8),mt(u_t))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(1&n&&Mi(c_t,5),2&n){let s;Be(s=Ve())&&(r._determinateCircle=s.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){2&n&&(Ti("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===r.mode?r.value:null)("mode",r.mode),Ll("mat-"+r.color),Ds("width",r.diameter,"px")("height",r.diameter,"px")("--mdc-circular-progress-size",r.diameter+"px")("--mdc-circular-progress-active-indicator-width",r.diameter+"px"),bi("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===r.mode))},inputs:{color:"color",mode:"mode",value:[Wt.HasDecoratorInputTransform,"value","value",jr],diameter:[Wt.HasDecoratorInputTransform,"diameter","diameter",jr],strokeWidth:[Wt.HasDecoratorInputTransform,"strokeWidth","strokeWidth",jr]},exportAs:["matProgressSpinner"],standalone:!0,features:[ln,Vi],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,r){if(1&n&&(Gt(0,d_t,2,8,"ng-template",null,0,wg),tt(2,"div",2,1),ul(),tt(4,"svg",3),we(5,"circle",4),et()(),Q0(),tt(6,"div",5)(7,"div",6)(8,"div",7),ra(9,8),et(),tt(10,"div",9),ra(11,8),et(),tt(12,"div",10),ra(13,8),et()()()),2&n){const s=qi(1);lt(4),Ti("viewBox",r._viewBox()),lt(),Ds("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),Ti("r",r._circleRadius()),lt(4),yt("ngTemplateOutlet",s),lt(2),yt("ngTemplateOutlet",s),lt(2),yt("ngTemplateOutlet",s)}},dependencies:[pT],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner .mdc-circular-progress{width:var(--mdc-circular-progress-size) !important;height:var(--mdc-circular-progress-size) !important}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0})}return e})(),m_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[qc,Ki]})}return e})();const p_t=["*"],x_t=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],y_t=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],b_t=new ee("MAT_CARD_CONFIG");let vC=(()=>{class e{constructor(t){this.appearance=t?.appearance||"raised"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(b_t,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(n,r){2&n&&bi("mat-mdc-card-outlined","outlined"===r.appearance)("mdc-card--outlined","outlined"===r.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],standalone:!0,features:[Vi],ngContentSelectors:p_t,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{color:rgba(0, 0, 0, 0.6);flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mdc-card__action--icon:not(:disabled){color:rgba(0, 0, 0, 0.6)}.mat-mdc-card{border-radius:var(--mdc-elevated-card-container-shape);background-color:var(--mdc-elevated-card-container-color);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color);box-shadow:var(--mdc-elevated-card-container-elevation)}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape)}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width);border-style:solid;border-color:var(--mdc-outlined-card-outline-color);border-radius:var(--mdc-outlined-card-container-shape);background-color:var(--mdc-outlined-card-container-color);box-shadow:var(--mdc-outlined-card-container-elevation)}.mat-mdc-card-outlined .mdc-card::after{border-radius:var(--mdc-outlined-card-container-shape)}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font);line-height:var(--mat-card-title-text-line-height);font-size:var(--mat-card-title-text-size);letter-spacing:var(--mat-card-title-text-tracking);font-weight:var(--mat-card-title-text-weight)}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color);font-family:var(--mat-card-subtitle-text-font);line-height:var(--mat-card-subtitle-text-line-height);font-size:var(--mat-card-subtitle-text-size);letter-spacing:var(--mat-card-subtitle-text-tracking);font-weight:var(--mat-card-subtitle-text-weight)}.mat-mdc-card{position:relative}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0})}return e})(),v7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"],standalone:!0})}return e})(),x7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"],standalone:!0})}return e})(),y7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-mdc-card-subtitle"],standalone:!0})}return e})(),b7=(()=>{class e{constructor(){this.align="start"}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-mdc-card-actions-align-end","end"===r.align)},inputs:{align:"align"},exportAs:["matCardActions"],standalone:!0})}return e})(),w7=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],standalone:!0,features:[Vi],ngContentSelectors:y_t,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(n,r){1&n&&(Kn(x_t),xi(0),tt(1,"div",0),xi(2,1),et(),xi(3,2))},encapsulation:2,changeDetection:0})}return e})(),__t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,qc,Ki]})}return e})();const T_t=[[["caption"]],[["colgroup"],["col"]],"*"],C_t=["caption","colgroup, col","*"];function S_t(e,i){1&e&&xi(0,2)}function E_t(e,i){1&e&&(tt(0,"thead",0),ra(1,1),et(),tt(2,"tbody",0),ra(3,2)(4,3),et(),tt(5,"tfoot",0),ra(6,4),et())}function A_t(e,i){1&e&&ra(0,1)(1,2)(2,3)(3,4)}const od=new ee("CDK_TABLE");let tv=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkCellDef",""]],standalone:!0})}return e})(),ev=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkHeaderCellDef",""]],standalone:!0})}return e})(),xC=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkFooterCellDef",""]],standalone:!0})}return e})(),du=(()=>{class e{get name(){return this._name}set name(t){this._setNameInput(t)}get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}get stickyEnd(){return this._stickyEnd}set stickyEnd(t){t!==this._stickyEnd&&(this._stickyEnd=t,this._hasStickyChanged=!0)}constructor(t){this._table=t,this._hasStickyChanged=!1,this._sticky=!1,this._stickyEnd=!1}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}_updateColumnCssClassName(){this._columnCssClassName=[`cdk-column-${this.cssClassFriendlyName}`]}_setNameInput(t){t&&(this._name=t,this.cssClassFriendlyName=t.replace(/[^a-z0-9_-]/gi,"-"),this._updateColumnCssClassName())}static#t=this.\u0275fac=function(n){return new(n||e)(mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkColumnDef",""]],contentQueries:function(n,r,s){if(1&n&&(An(s,tv,5),An(s,ev,5),An(s,xC,5)),2&n){let o;Be(o=Ve())&&(r.cell=o.first),Be(o=Ve())&&(r.headerCell=o.first),Be(o=Ve())&&(r.footerCell=o.first)}},inputs:{name:[Wt.None,"cdkColumnDef","name"],sticky:[Wt.HasDecoratorInputTransform,"sticky","sticky",Je],stickyEnd:[Wt.HasDecoratorInputTransform,"stickyEnd","stickyEnd",Je]},standalone:!0,features:[fi([{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),ln]})}return e})();class lk{constructor(i,t){t.nativeElement.classList.add(...i._columnCssClassName)}}let ck=(()=>{class e extends lk{constructor(t,n){super(t,n)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(du),mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["cdk-header-cell"],["th","cdk-header-cell",""]],hostAttrs:["role","columnheader",1,"cdk-header-cell"],standalone:!0,features:[hi]})}return e})(),dk=(()=>{class e extends lk{constructor(t,n){super(t,n);const r=t._table?._getCellRole();r&&n.nativeElement.setAttribute("role",r)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(du),mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["cdk-cell"],["td","cdk-cell",""]],hostAttrs:[1,"cdk-cell"],standalone:!0,features:[hi]})}return e})();class T7{constructor(){this.tasks=[],this.endTasks=[]}}const uk=new ee("_COALESCED_STYLE_SCHEDULER");let C7=(()=>{class e{constructor(t){this._ngZone=t,this._currentSchedule=null,this._destroyed=new Pe}schedule(t){this._createScheduleIfNeeded(),this._currentSchedule.tasks.push(t)}scheduleEnd(t){this._createScheduleIfNeeded(),this._currentSchedule.endTasks.push(t)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_createScheduleIfNeeded(){this._currentSchedule||(this._currentSchedule=new T7,this._getScheduleObservable().pipe(Ui(this._destroyed)).subscribe(()=>{for(;this._currentSchedule.tasks.length||this._currentSchedule.endTasks.length;){const t=this._currentSchedule;this._currentSchedule=new T7;for(const n of t.tasks)n();for(const n of t.endTasks)n()}this._currentSchedule=null}))}_getScheduleObservable(){return this._ngZone.isStable?Is(Promise.resolve(void 0)):this._ngZone.onStable.pipe(er(1))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ii))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})(),hk=(()=>{class e{constructor(t,n){this.template=t,this._differs=n}ngOnChanges(t){if(!this._columnsDiffer){const n=t.columns&&t.columns.currentValue||[];this._columnsDiffer=this._differs.find(n).create(),this._columnsDiffer.diff(n)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(t){return this instanceof Py?t.headerCell.template:this instanceof Fy?t.footerCell.template:t.cell.template}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh))};static#e=this.\u0275dir=ce({type:e,features:[tr]})}return e})(),Py=(()=>{class e extends hk{get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}constructor(t,n,r){super(t,n),this._table=r,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh),mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:[Wt.None,"cdkHeaderRowDef","columns"],sticky:[Wt.HasDecoratorInputTransform,"cdkHeaderRowDefSticky","sticky",Je]},standalone:!0,features:[ln,hi,tr]})}return e})(),Fy=(()=>{class e extends hk{get sticky(){return this._sticky}set sticky(t){t!==this._sticky&&(this._sticky=t,this._hasStickyChanged=!0)}constructor(t,n,r){super(t,n),this._table=r,this._hasStickyChanged=!1,this._sticky=!1}ngOnChanges(t){super.ngOnChanges(t)}hasStickyChanged(){const t=this._hasStickyChanged;return this.resetStickyChanged(),t}resetStickyChanged(){this._hasStickyChanged=!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh),mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:[Wt.None,"cdkFooterRowDef","columns"],sticky:[Wt.HasDecoratorInputTransform,"cdkFooterRowDefSticky","sticky",Je]},standalone:!0,features:[ln,hi,tr]})}return e})(),yC=(()=>{class e extends hk{constructor(t,n,r){super(t,n),this._table=r}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(mh),mt(od,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkRowDef",""]],inputs:{columns:[Wt.None,"cdkRowDefColumns","columns"],when:[Wt.None,"cdkRowDefWhen","when"]},standalone:!0,features:[hi]})}return e})(),uu=(()=>{class e{static#t=this.mostRecentCellOutlet=null;constructor(t){this._viewContainer=t,e.mostRecentCellOutlet=this}ngOnDestroy(){e.mostRecentCellOutlet===this&&(e.mostRecentCellOutlet=null)}static#e=this.\u0275fac=function(n){return new(n||e)(mt(Ir))};static#i=this.\u0275dir=ce({type:e,selectors:[["","cdkCellOutlet",""]],standalone:!0})}return e})(),fk=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-header-row"],["tr","cdk-header-row",""]],hostAttrs:["role","row",1,"cdk-header-row"],standalone:!0,features:[Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),pk=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-row"],["tr","cdk-row",""]],hostAttrs:["role","row",1,"cdk-row"],standalone:!0,features:[Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),bC=(()=>{class e{constructor(t){this.templateRef=t,this._contentClassName="cdk-no-data-row"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["ng-template","cdkNoDataRow",""]],standalone:!0})}return e})();const S7=["top","bottom","left","right"];class R_t{constructor(i,t,n,r,s=!0,o=!0,l){this._isNativeHtmlTable=i,this._stickCellCss=t,this.direction=n,this._coalescedStyleScheduler=r,this._isBrowser=s,this._needsPositionStickyOnElement=o,this._positionListener=l,this._cachedCellWidths=[],this._borderCellCss={top:`${t}-border-elem-top`,bottom:`${t}-border-elem-bottom`,left:`${t}-border-elem-left`,right:`${t}-border-elem-right`}}clearStickyPositioning(i,t){const n=[];for(const r of i)if(r.nodeType===r.ELEMENT_NODE){n.push(r);for(let s=0;s{for(const r of n)this._removeStickyStyle(r,t)})}updateStickyColumns(i,t,n,r=!0){i.length&&this._isBrowser&&(t.some(s=>s)||n.some(s=>s))?this._coalescedStyleScheduler.schedule(()=>{const s=i[0],o=s.children.length,l=this._getCellWidths(s,r),w=this._getStickyStartColumnPositions(l,t),C=this._getStickyEndColumnPositions(l,n),M=t.lastIndexOf(!0),P=n.indexOf(!0),O="rtl"===this.direction,L=O?"right":"left",U=O?"left":"right";for(const X of i)for(let W=0;Wt[W]?X:null)}),this._positionListener.stickyEndColumnsUpdated({sizes:-1===P?[]:l.slice(P).map((X,W)=>n[W+P]?X:null).reverse()}))}):this._positionListener&&(this._positionListener.stickyColumnsUpdated({sizes:[]}),this._positionListener.stickyEndColumnsUpdated({sizes:[]}))}stickRows(i,t,n){this._isBrowser&&this._coalescedStyleScheduler.schedule(()=>{const r="bottom"===n?i.slice().reverse():i,s="bottom"===n?t.slice().reverse():t,o=[],l=[],w=[];for(let M=0,P=0;M{const n=i.querySelector("tfoot");n&&(t.some(r=>!r)?this._removeStickyStyle(n,["bottom"]):this._addStickyStyle(n,"bottom",0,!1))})}_removeStickyStyle(i,t){for(const r of t)i.style[r]="",i.classList.remove(this._borderCellCss[r]);S7.some(r=>-1===t.indexOf(r)&&i.style[r])?i.style.zIndex=this._getCalculatedZIndex(i):(i.style.zIndex="",this._needsPositionStickyOnElement&&(i.style.position=""),i.classList.remove(this._stickCellCss))}_addStickyStyle(i,t,n,r){i.classList.add(this._stickCellCss),r&&i.classList.add(this._borderCellCss[t]),i.style[t]=`${n}px`,i.style.zIndex=this._getCalculatedZIndex(i),this._needsPositionStickyOnElement&&(i.style.cssText+="position: -webkit-sticky; position: sticky; ")}_getCalculatedZIndex(i){const t={top:100,bottom:10,left:1,right:1};let n=0;for(const r of S7)i.style[r]&&(n+=t[r]);return n?`${n}`:""}_getCellWidths(i,t=!0){if(!t&&this._cachedCellWidths.length)return this._cachedCellWidths;const n=[],r=i.children;for(let s=0;s0;s--)t[s]&&(n[s]=r,r+=i[s]);return n}}const gk=new ee("CDK_SPL");let vk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._rowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["","rowOutlet",""]],standalone:!0})}return e})(),xk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._headerRowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["","headerRowOutlet",""]],standalone:!0})}return e})(),yk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._footerRowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["","footerRowOutlet",""]],standalone:!0})}return e})(),bk=(()=>{class e{constructor(t,n){this.viewContainer=t,this.elementRef=n;const r=me(od);r._noDataRowOutlet=this,r._outletAssigned()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["","noDataRowOutlet",""]],standalone:!0})}return e})(),wC=(()=>{class e{_getCellRole(){if(void 0===this._cellRoleInternal){const t=this._elementRef.nativeElement.getAttribute("role"),n="grid"===t||"treegrid"===t?"gridcell":"cell";this._cellRoleInternal=this._isNativeHtmlTable&&"cell"===n?null:n}return this._cellRoleInternal}get trackBy(){return this._trackByFn}set trackBy(t){this._trackByFn=t}get dataSource(){return this._dataSource}set dataSource(t){this._dataSource!==t&&this._switchDataSource(t)}get multiTemplateDataRows(){return this._multiTemplateDataRows}set multiTemplateDataRows(t){this._multiTemplateDataRows=t,this._rowOutlet&&this._rowOutlet.viewContainer.length&&(this._forceRenderDataRows(),this.updateStickyColumnStyles())}get fixedLayout(){return this._fixedLayout}set fixedLayout(t){this._fixedLayout=t,this._forceRecalculateCellWidths=!0,this._stickyColumnStylesNeedReset=!0}constructor(t,n,r,s,o,l,w,C,M,P,O,L){this._differs=t,this._changeDetectorRef=n,this._elementRef=r,this._dir=o,this._platform=w,this._viewRepeater=C,this._coalescedStyleScheduler=M,this._viewportRuler=P,this._stickyPositioningListener=O,this._ngZone=L,this._onDestroy=new Pe,this._columnDefsByName=new Map,this._customColumnDefs=new Set,this._customRowDefs=new Set,this._customHeaderRowDefs=new Set,this._customFooterRowDefs=new Set,this._headerRowDefChanged=!0,this._footerRowDefChanged=!0,this._stickyColumnStylesNeedReset=!0,this._forceRecalculateCellWidths=!0,this._cachedRenderRowsMap=new Map,this.stickyCssClass="cdk-table-sticky",this.needsPositionStickyOnElement=!0,this._isShowingNoDataRow=!1,this._hasAllOutlets=!1,this._hasInitialized=!1,this._cellRoleInternal=void 0,this._multiTemplateDataRows=!1,this._fixedLayout=!1,this.contentChanged=new De,this.viewChange=new Wr({start:0,end:Number.MAX_VALUE}),s||r.nativeElement.setAttribute("role","table"),this._document=l,this._isServer=!w.isBrowser,this._isNativeHtmlTable="TABLE"===r.nativeElement.nodeName}ngOnInit(){this._setupStickyStyler(),this._dataDiffer=this._differs.find([]).create((t,n)=>this.trackBy?this.trackBy(n.dataIndex,n.data):n),this._viewportRuler.change().pipe(Ui(this._onDestroy)).subscribe(()=>{this._forceRecalculateCellWidths=!0})}ngAfterContentInit(){this._hasInitialized=!0}ngAfterContentChecked(){this._canRender()&&this._render()}ngOnDestroy(){[this._rowOutlet?.viewContainer,this._headerRowOutlet?.viewContainer,this._footerRowOutlet?.viewContainer,this._cachedRenderRowsMap,this._customColumnDefs,this._customRowDefs,this._customHeaderRowDefs,this._customFooterRowDefs,this._columnDefsByName].forEach(t=>{t?.clear()}),this._headerRowDefs=[],this._footerRowDefs=[],this._defaultRowDef=null,this._onDestroy.next(),this._onDestroy.complete(),yR(this.dataSource)&&this.dataSource.disconnect(this)}renderRows(){this._renderRows=this._getAllRenderRows();const t=this._dataDiffer.diff(this._renderRows);if(!t)return this._updateNoDataRow(),void this.contentChanged.next();const n=this._rowOutlet.viewContainer;this._viewRepeater.applyChanges(t,n,(r,s,o)=>this._getEmbeddedViewArgs(r.item,o),r=>r.item.data,r=>{r.operation===Jd.INSERTED&&r.context&&this._renderCellTemplateForItem(r.record.item.rowDef,r.context)}),this._updateRowIndexContext(),t.forEachIdentityChange(r=>{n.get(r.currentIndex).context.$implicit=r.item.data}),this._updateNoDataRow(),this._ngZone&&ii.isInAngularZone()?this._ngZone.onStable.pipe(er(1),Ui(this._onDestroy)).subscribe(()=>{this.updateStickyColumnStyles()}):this.updateStickyColumnStyles(),this.contentChanged.next()}addColumnDef(t){this._customColumnDefs.add(t)}removeColumnDef(t){this._customColumnDefs.delete(t)}addRowDef(t){this._customRowDefs.add(t)}removeRowDef(t){this._customRowDefs.delete(t)}addHeaderRowDef(t){this._customHeaderRowDefs.add(t),this._headerRowDefChanged=!0}removeHeaderRowDef(t){this._customHeaderRowDefs.delete(t),this._headerRowDefChanged=!0}addFooterRowDef(t){this._customFooterRowDefs.add(t),this._footerRowDefChanged=!0}removeFooterRowDef(t){this._customFooterRowDefs.delete(t),this._footerRowDefChanged=!0}setNoDataRow(t){this._customNoDataRow=t}updateStickyHeaderRowStyles(){const t=this._getRenderedRows(this._headerRowOutlet);if(this._isNativeHtmlTable){const r=E7(this._headerRowOutlet,"thead");r&&(r.style.display=t.length?"":"none")}const n=this._headerRowDefs.map(r=>r.sticky);this._stickyStyler.clearStickyPositioning(t,["top"]),this._stickyStyler.stickRows(t,n,"top"),this._headerRowDefs.forEach(r=>r.resetStickyChanged())}updateStickyFooterRowStyles(){const t=this._getRenderedRows(this._footerRowOutlet);if(this._isNativeHtmlTable){const r=E7(this._footerRowOutlet,"tfoot");r&&(r.style.display=t.length?"":"none")}const n=this._footerRowDefs.map(r=>r.sticky);this._stickyStyler.clearStickyPositioning(t,["bottom"]),this._stickyStyler.stickRows(t,n,"bottom"),this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement,n),this._footerRowDefs.forEach(r=>r.resetStickyChanged())}updateStickyColumnStyles(){const t=this._getRenderedRows(this._headerRowOutlet),n=this._getRenderedRows(this._rowOutlet),r=this._getRenderedRows(this._footerRowOutlet);(this._isNativeHtmlTable&&!this._fixedLayout||this._stickyColumnStylesNeedReset)&&(this._stickyStyler.clearStickyPositioning([...t,...n,...r],["left","right"]),this._stickyColumnStylesNeedReset=!1),t.forEach((s,o)=>{this._addStickyColumnStyles([s],this._headerRowDefs[o])}),this._rowDefs.forEach(s=>{const o=[];for(let l=0;l{this._addStickyColumnStyles([s],this._footerRowDefs[o])}),Array.from(this._columnDefsByName.values()).forEach(s=>s.resetStickyChanged())}_outletAssigned(){!this._hasAllOutlets&&this._rowOutlet&&this._headerRowOutlet&&this._footerRowOutlet&&this._noDataRowOutlet&&(this._hasAllOutlets=!0,this._canRender()&&this._render())}_canRender(){return this._hasAllOutlets&&this._hasInitialized}_render(){this._cacheRowDefs(),this._cacheColumnDefs();const n=this._renderUpdatedColumns()||this._headerRowDefChanged||this._footerRowDefChanged;this._stickyColumnStylesNeedReset=this._stickyColumnStylesNeedReset||n,this._forceRecalculateCellWidths=n,this._headerRowDefChanged&&(this._forceRenderHeaderRows(),this._headerRowDefChanged=!1),this._footerRowDefChanged&&(this._forceRenderFooterRows(),this._footerRowDefChanged=!1),this.dataSource&&this._rowDefs.length>0&&!this._renderChangeSubscription?this._observeRenderChanges():this._stickyColumnStylesNeedReset&&this.updateStickyColumnStyles(),this._checkStickyStates()}_getAllRenderRows(){const t=[],n=this._cachedRenderRowsMap;this._cachedRenderRowsMap=new Map;for(let r=0;r{const l=r&&r.has(o)?r.get(o):[];if(l.length){const w=l.shift();return w.dataIndex=n,w}return{data:t,rowDef:o,dataIndex:n}})}_cacheColumnDefs(){this._columnDefsByName.clear(),_C(this._getOwnDefs(this._contentColumnDefs),this._customColumnDefs).forEach(n=>{this._columnDefsByName.has(n.name),this._columnDefsByName.set(n.name,n)})}_cacheRowDefs(){this._headerRowDefs=_C(this._getOwnDefs(this._contentHeaderRowDefs),this._customHeaderRowDefs),this._footerRowDefs=_C(this._getOwnDefs(this._contentFooterRowDefs),this._customFooterRowDefs),this._rowDefs=_C(this._getOwnDefs(this._contentRowDefs),this._customRowDefs);const t=this._rowDefs.filter(n=>!n.when);this._defaultRowDef=t[0]}_renderUpdatedColumns(){const t=(o,l)=>o||!!l.getColumnsDiff(),n=this._rowDefs.reduce(t,!1);n&&this._forceRenderDataRows();const r=this._headerRowDefs.reduce(t,!1);r&&this._forceRenderHeaderRows();const s=this._footerRowDefs.reduce(t,!1);return s&&this._forceRenderFooterRows(),n||r||s}_switchDataSource(t){this._data=[],yR(this.dataSource)&&this.dataSource.disconnect(this),this._renderChangeSubscription&&(this._renderChangeSubscription.unsubscribe(),this._renderChangeSubscription=null),t||(this._dataDiffer&&this._dataDiffer.diff([]),this._rowOutlet&&this._rowOutlet.viewContainer.clear()),this._dataSource=t}_observeRenderChanges(){if(!this.dataSource)return;let t;yR(this.dataSource)?t=this.dataSource.connect(this):OI(this.dataSource)?t=this.dataSource:Array.isArray(this.dataSource)&&(t=vi(this.dataSource)),this._renderChangeSubscription=t.pipe(Ui(this._onDestroy)).subscribe(n=>{this._data=n||[],this.renderRows()})}_forceRenderHeaderRows(){this._headerRowOutlet.viewContainer.length>0&&this._headerRowOutlet.viewContainer.clear(),this._headerRowDefs.forEach((t,n)=>this._renderRow(this._headerRowOutlet,t,n)),this.updateStickyHeaderRowStyles()}_forceRenderFooterRows(){this._footerRowOutlet.viewContainer.length>0&&this._footerRowOutlet.viewContainer.clear(),this._footerRowDefs.forEach((t,n)=>this._renderRow(this._footerRowOutlet,t,n)),this.updateStickyFooterRowStyles()}_addStickyColumnStyles(t,n){const r=Array.from(n.columns||[]).map(l=>this._columnDefsByName.get(l)),s=r.map(l=>l.sticky),o=r.map(l=>l.stickyEnd);this._stickyStyler.updateStickyColumns(t,s,o,!this._fixedLayout||this._forceRecalculateCellWidths)}_getRenderedRows(t){const n=[];for(let r=0;r!s.when||s.when(n,t));else{let s=this._rowDefs.find(o=>o.when&&o.when(n,t))||this._defaultRowDef;s&&r.push(s)}return r}_getEmbeddedViewArgs(t,n){return{templateRef:t.rowDef.template,context:{$implicit:t.data},index:n}}_renderRow(t,n,r,s={}){const o=t.viewContainer.createEmbeddedView(n.template,s,r);return this._renderCellTemplateForItem(n,s),o}_renderCellTemplateForItem(t,n){for(let r of this._getCellTemplates(t))uu.mostRecentCellOutlet&&uu.mostRecentCellOutlet._viewContainer.createEmbeddedView(r,n);this._changeDetectorRef.markForCheck()}_updateRowIndexContext(){const t=this._rowOutlet.viewContainer;for(let n=0,r=t.length;n{const r=this._columnDefsByName.get(n);return t.extractCellTemplate(r)}):[]}_forceRenderDataRows(){this._dataDiffer.diff([]),this._rowOutlet.viewContainer.clear(),this.renderRows()}_checkStickyStates(){const t=(n,r)=>n||r.hasStickyChanged();this._headerRowDefs.reduce(t,!1)&&this.updateStickyHeaderRowStyles(),this._footerRowDefs.reduce(t,!1)&&this.updateStickyFooterRowStyles(),Array.from(this._columnDefsByName.values()).reduce(t,!1)&&(this._stickyColumnStylesNeedReset=!0,this.updateStickyColumnStyles())}_setupStickyStyler(){this._stickyStyler=new R_t(this._isNativeHtmlTable,this.stickyCssClass,this._dir?this._dir.value:"ltr",this._coalescedStyleScheduler,this._platform.isBrowser,this.needsPositionStickyOnElement,this._stickyPositioningListener),(this._dir?this._dir.change:vi()).pipe(Ui(this._onDestroy)).subscribe(n=>{this._stickyStyler.direction=n,this.updateStickyColumnStyles()})}_getOwnDefs(t){return t.filter(n=>!n._table||n._table===this)}_updateNoDataRow(){const t=this._customNoDataRow||this._noDataRow;if(!t)return;const n=0===this._rowOutlet.viewContainer.length;if(n===this._isShowingNoDataRow)return;const r=this._noDataRowOutlet.viewContainer;if(n){const s=r.createEmbeddedView(t.templateRef),o=s.rootNodes[0];1===s.rootNodes.length&&o?.nodeType===this._document.ELEMENT_NODE&&(o.setAttribute("role","row"),o.classList.add(t._contentClassName))}else r.clear();this._isShowingNoDataRow=n,this._changeDetectorRef.markForCheck()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(mh),mt(Mn),mt(si),hl("role"),mt(Ba,8),mt(Ni),mt(ir),mt(my),mt(uk),mt(ou),mt(gk,12),mt(ii,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-table"],["table","cdk-table",""]],contentQueries:function(n,r,s){if(1&n&&(An(s,bC,5),An(s,du,5),An(s,yC,5),An(s,Py,5),An(s,Fy,5)),2&n){let o;Be(o=Ve())&&(r._noDataRow=o.first),Be(o=Ve())&&(r._contentColumnDefs=o),Be(o=Ve())&&(r._contentRowDefs=o),Be(o=Ve())&&(r._contentHeaderRowDefs=o),Be(o=Ve())&&(r._contentFooterRowDefs=o)}},hostAttrs:[1,"cdk-table"],hostVars:2,hostBindings:function(n,r){2&n&&bi("cdk-table-fixed-layout",r.fixedLayout)},inputs:{trackBy:"trackBy",dataSource:"dataSource",multiTemplateDataRows:[Wt.HasDecoratorInputTransform,"multiTemplateDataRows","multiTemplateDataRows",Je],fixedLayout:[Wt.HasDecoratorInputTransform,"fixedLayout","fixedLayout",Je]},outputs:{contentChanged:"contentChanged"},exportAs:["cdkTable"],standalone:!0,features:[fi([{provide:od,useExisting:e},{provide:my,useClass:SG},{provide:uk,useClass:C7},{provide:gk,useValue:null}]),ln,Vi],ngContentSelectors:C_t,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,r){1&n&&(Kn(T_t),xi(0),xi(1,1),Gt(2,S_t,1,0)(3,E_t,7,0)(4,A_t,4,0)),2&n&&(lt(2),xn(2,r._isServer?2:-1),lt(),xn(3,r._isNativeHtmlTable?3:4))},dependencies:[xk,vk,bk,yk],styles:[".cdk-table-fixed-layout{table-layout:fixed}"],encapsulation:2})}return e})();function _C(e,i){return e.concat(Array.from(i))}function E7(e,i){const t=i.toUpperCase();let n=e.viewContainer.element.nativeElement;for(;n;){const r=1===n.nodeType?n.nodeName:null;if(r===t)return n;if("TABLE"===r)break;n=n.parentNode}return null}let P_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[ek]})}return e})();const F_t=[[["caption"]],[["colgroup"],["col"]],"*"],O_t=["caption","colgroup, col","*"];function L_t(e,i){1&e&&xi(0,2)}function N_t(e,i){1&e&&(tt(0,"thead",0),ra(1,1),et(),tt(2,"tbody",2),ra(3,3)(4,4),et(),tt(5,"tfoot",0),ra(6,5),et())}function B_t(e,i){1&e&&ra(0,1)(1,3)(2,4)(3,5)}let Ah=(()=>{class e extends wC{constructor(){super(...arguments),this.stickyCssClass="mat-mdc-table-sticky",this.needsPositionStickyOnElement=!1}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275cmp=je({type:e,selectors:[["mat-table"],["table","mat-table",""]],hostAttrs:[1,"mat-mdc-table","mdc-data-table__table"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-table-fixed-layout",r.fixedLayout)},exportAs:["matTable"],standalone:!0,features:[fi([{provide:wC,useExisting:e},{provide:od,useExisting:e},{provide:uk,useClass:C7},{provide:my,useClass:SG},{provide:gk,useValue:null}]),hi,Vi],ngContentSelectors:O_t,decls:5,vars:2,consts:[["role","rowgroup"],["headerRowOutlet",""],["role","rowgroup",1,"mdc-data-table__content"],["rowOutlet",""],["noDataRowOutlet",""],["footerRowOutlet",""]],template:function(n,r){1&n&&(Kn(F_t),xi(0),xi(1,1),Gt(2,L_t,1,0)(3,N_t,7,0)(4,B_t,4,0)),2&n&&(lt(2),xn(2,r._isServer?2:-1),lt(),xn(3,r._isNativeHtmlTable?3:4))},dependencies:[xk,vk,bk,yk],styles:[".mat-mdc-table-sticky{position:sticky !important}.mdc-data-table{-webkit-overflow-scrolling:touch;display:inline-flex;flex-direction:column;box-sizing:border-box;position:relative}.mdc-data-table__table-container{-webkit-overflow-scrolling:touch;overflow-x:auto;width:100%}.mdc-data-table__table{min-width:100%;border:0;white-space:nowrap;border-spacing:0;table-layout:fixed}.mdc-data-table__cell{box-sizing:border-box;overflow:hidden;text-align:left;text-overflow:ellipsis}[dir=rtl] .mdc-data-table__cell,.mdc-data-table__cell[dir=rtl]{text-align:right}.mdc-data-table__cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__cell--numeric,.mdc-data-table__cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__header-cell{box-sizing:border-box;text-overflow:ellipsis;overflow:hidden;outline:none;text-align:left}[dir=rtl] .mdc-data-table__header-cell,.mdc-data-table__header-cell[dir=rtl]{text-align:right}.mdc-data-table__header-cell--numeric{text-align:right}[dir=rtl] .mdc-data-table__header-cell--numeric,.mdc-data-table__header-cell--numeric[dir=rtl]{text-align:left}.mdc-data-table__header-cell-wrapper{align-items:center;display:inline-flex;vertical-align:middle}.mdc-data-table__cell,.mdc-data-table__header-cell{padding:0 16px 0 16px}.mdc-data-table__header-cell--checkbox,.mdc-data-table__cell--checkbox{padding-left:4px;padding-right:0}[dir=rtl] .mdc-data-table__header-cell--checkbox,[dir=rtl] .mdc-data-table__cell--checkbox,.mdc-data-table__header-cell--checkbox[dir=rtl],.mdc-data-table__cell--checkbox[dir=rtl]{padding-left:0;padding-right:4px}mat-table{display:block}mat-header-row{min-height:56px}mat-row,mat-footer-row{min-height:48px}mat-row,mat-header-row,mat-footer-row{display:flex;border-width:0;border-bottom-width:1px;border-style:solid;align-items:center;box-sizing:border-box}mat-cell:first-of-type,mat-header-cell:first-of-type,mat-footer-cell:first-of-type{padding-left:24px}[dir=rtl] mat-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:first-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:first-of-type:not(:only-of-type){padding-left:0;padding-right:24px}mat-cell:last-of-type,mat-header-cell:last-of-type,mat-footer-cell:last-of-type{padding-right:24px}[dir=rtl] mat-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-header-cell:last-of-type:not(:only-of-type),[dir=rtl] mat-footer-cell:last-of-type:not(:only-of-type){padding-right:0;padding-left:24px}mat-cell,mat-header-cell,mat-footer-cell{flex:1;display:flex;align-items:center;overflow:hidden;word-wrap:break-word;min-height:inherit}.mat-mdc-table{table-layout:auto;white-space:normal;background-color:var(--mat-table-background-color)}.mat-mdc-header-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-header-container-height, 56px);color:var(--mat-table-header-headline-color, rgba(0, 0, 0, 0.87));font-family:var(--mat-table-header-headline-font, Roboto, sans-serif);line-height:var(--mat-table-header-headline-line-height);font-size:var(--mat-table-header-headline-size, 14px);font-weight:var(--mat-table-header-headline-weight, 500)}.mat-mdc-row{height:var(--mat-table-row-item-container-height, 52px);color:var(--mat-table-row-item-label-text-color, rgba(0, 0, 0, 0.87))}.mat-mdc-row,.mdc-data-table__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-table-row-item-label-text-font, Roboto, sans-serif);line-height:var(--mat-table-row-item-label-text-line-height);font-size:var(--mat-table-row-item-label-text-size, 14px);font-weight:var(--mat-table-row-item-label-text-weight)}.mat-mdc-footer-row{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;height:var(--mat-table-footer-container-height, 52px);color:var(--mat-table-row-item-label-text-color, rgba(0, 0, 0, 0.87));font-family:var(--mat-table-footer-supporting-text-font, Roboto, sans-serif);line-height:var(--mat-table-footer-supporting-text-line-height);font-size:var(--mat-table-footer-supporting-text-size, 14px);font-weight:var(--mat-table-footer-supporting-text-weight);letter-spacing:var(--mat-table-footer-supporting-text-tracking)}.mat-mdc-header-cell{border-bottom-color:var(--mat-table-row-item-outline-color, rgba(0, 0, 0, 0.12));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-header-headline-tracking);font-weight:inherit;line-height:inherit}.mat-mdc-cell{border-bottom-color:var(--mat-table-row-item-outline-color, rgba(0, 0, 0, 0.12));border-bottom-width:var(--mat-table-row-item-outline-width, 1px);border-bottom-style:solid;letter-spacing:var(--mat-table-row-item-label-text-tracking);line-height:inherit}.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.mat-mdc-footer-cell{letter-spacing:var(--mat-table-row-item-label-text-tracking)}mat-row.mat-mdc-row,mat-header-row.mat-mdc-header-row,mat-footer-row.mat-mdc-footer-row{border-bottom:none}.mat-mdc-table tbody,.mat-mdc-table tfoot,.mat-mdc-table thead,.mat-mdc-cell,.mat-mdc-footer-cell,.mat-mdc-header-row,.mat-mdc-row,.mat-mdc-footer-row,.mat-mdc-table .mat-mdc-header-cell{background:inherit}.mat-mdc-table mat-header-row.mat-mdc-header-row,.mat-mdc-table mat-row.mat-mdc-row,.mat-mdc-table mat-footer-row.mat-mdc-footer-cell{height:unset}mat-header-cell.mat-mdc-header-cell,mat-cell.mat-mdc-cell,mat-footer-cell.mat-mdc-footer-cell{align-self:stretch}"],encapsulation:2})}return e})(),hu=(()=>{class e extends tv{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matCellDef",""]],standalone:!0,features:[fi([{provide:tv,useExisting:e}]),hi]})}return e})(),fu=(()=>{class e extends ev{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matHeaderCellDef",""]],standalone:!0,features:[fi([{provide:ev,useExisting:e}]),hi]})}return e})(),mu=(()=>{class e extends du{get name(){return this._name}set name(t){this._setNameInput(t)}_updateColumnCssClassName(){super._updateColumnCssClassName(),this._columnCssClassName.push(`mat-column-${this.cssClassFriendlyName}`)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matColumnDef",""]],inputs:{name:[Wt.None,"matColumnDef","name"]},standalone:!0,features:[fi([{provide:du,useExisting:e},{provide:"MAT_SORT_HEADER_COLUMN_DEF",useExisting:e}]),hi]})}return e})(),pu=(()=>{class e extends ck{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["mat-header-cell"],["th","mat-header-cell",""]],hostAttrs:["role","columnheader",1,"mat-mdc-header-cell","mdc-data-table__header-cell"],standalone:!0,features:[hi]})}return e})(),gu=(()=>{class e extends dk{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["mat-cell"],["td","mat-cell",""]],hostAttrs:[1,"mat-mdc-cell","mdc-data-table__cell"],standalone:!0,features:[hi]})}return e})(),Dh=(()=>{class e extends Py{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matHeaderRowDef",""]],inputs:{columns:[Wt.None,"matHeaderRowDef","columns"],sticky:[Wt.HasDecoratorInputTransform,"matHeaderRowDefSticky","sticky",Je]},standalone:!0,features:[fi([{provide:Py,useExisting:e}]),ln,hi]})}return e})(),Mh=(()=>{class e extends yC{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","matRowDef",""]],inputs:{columns:[Wt.None,"matRowDefColumns","columns"],when:[Wt.None,"matRowDefWhen","when"]},standalone:!0,features:[fi([{provide:yC,useExisting:e}]),hi]})}return e})(),Ih=(()=>{class e extends fk{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275cmp=je({type:e,selectors:[["mat-header-row"],["tr","mat-header-row",""]],hostAttrs:["role","row",1,"mat-mdc-header-row","mdc-data-table__header-row"],exportAs:["matHeaderRow"],standalone:!0,features:[fi([{provide:fk,useExisting:e}]),hi,Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),Rh=(()=>{class e extends pk{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275cmp=je({type:e,selectors:[["mat-row"],["tr","mat-row",""]],hostAttrs:["role","row",1,"mat-mdc-row","mdc-data-table__row"],exportAs:["matRow"],standalone:!0,features:[fi([{provide:pk,useExisting:e}]),hi,Vi],decls:1,vars:0,consts:[["cdkCellOutlet",""]],template:function(n,r){1&n&&ra(0,0)},dependencies:[uu],encapsulation:2})}return e})(),j_t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,P_t,Ki]})}return e})();class em extends OT{get data(){return this._data.value}set data(i){i=Array.isArray(i)?i:[],this._data.next(i),this._renderChangesSubscription||this._filterData(i)}get filter(){return this._filter.value}set filter(i){this._filter.next(i),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(i){this._sort=i,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(i){this._paginator=i,this._updateChangeSubscription()}constructor(i=[]){super(),this._renderData=new Wr([]),this._filter=new Wr(""),this._internalPageChanges=new Pe,this._renderChangesSubscription=null,this.sortingDataAccessor=(t,n)=>{const r=t[n];if(qG(r)){const s=Number(r);return s<9007199254740991?s:r}return r},this.sortData=(t,n)=>{const r=n.active,s=n.direction;return r&&""!=s?t.sort((o,l)=>{let w=this.sortingDataAccessor(o,r),C=this.sortingDataAccessor(l,r);const M=typeof w,P=typeof C;M!==P&&("number"===M&&(w+=""),"number"===P&&(C+=""));let O=0;return null!=w&&null!=C?w>C?O=1:w{const r=Object.keys(t).reduce((o,l)=>o+t[l]+"\u25ec","").toLowerCase(),s=n.trim().toLowerCase();return-1!=r.indexOf(s)},this._data=new Wr(i),this._updateChangeSubscription()}_updateChangeSubscription(){const i=this._sort?Yr(this._sort.sortChange,this._sort.initialized):vi(null),t=this._paginator?Yr(this._paginator.page,this._internalPageChanges,this._paginator.initialized):vi(null),r=Zd([this._data,this._filter]).pipe(Di(([l])=>this._filterData(l))),s=Zd([r,i]).pipe(Di(([l])=>this._orderData(l))),o=Zd([s,t]).pipe(Di(([l])=>this._pageData(l)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=o.subscribe(l=>this._renderData.next(l))}_filterData(i){return this.filteredData=null==this.filter||""===this.filter?i:i.filter(t=>this.filterPredicate(t,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(i){return this.sort?this.sortData(i.slice(),this.sort):i}_pageData(i){if(!this.paginator)return i;const t=this.paginator.pageIndex*this.paginator.pageSize;return i.slice(t,t+this.paginator.pageSize)}_updatePaginator(i){Promise.resolve().then(()=>{const t=this.paginator;if(t&&(t.length=i,t.pageIndex>0)){const n=Math.ceil(t.length/t.pageSize)-1||0,r=Math.min(t.pageIndex,n);r!==t.pageIndex&&(t.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}}let D7=(()=>{class e{constructor(t,n){this._renderer=t,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Wd),mt(si))};static#e=this.\u0275dir=ce({type:e})}return e})(),im=(()=>{class e extends D7{static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,features:[hi]})}return e})();const ua=new ee(""),Q_t={provide:ua,useExisting:Sn(()=>Hl),multi:!0},Z_t=new ee("");let Hl=(()=>{class e extends D7{constructor(t,n,r){super(t,n),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function K_t(){const e=ph()?ph().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Wd),mt(si),mt(Z_t,8))};static#e=this.\u0275dir=ce({type:e,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(n,r){1&n&&Vt("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},features:[fi([Q_t]),hi]})}return e})();function kh(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function I7(e){return null!=e&&"number"==typeof e.length}const Ys=new ee(""),Ph=new ee(""),J_t=/^(?=.{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])?)*$/;class vu{static min(i){return function R7(e){return i=>{if(kh(i.value)||kh(e))return null;const t=parseFloat(i.value);return!isNaN(t)&&t{if(kh(i.value)||kh(e))return null;const t=parseFloat(i.value);return!isNaN(t)&&t>e?{max:{max:e,actual:i.value}}:null}}(i)}static required(i){return P7(i)}static requiredTrue(i){return function F7(e){return!0===e.value?null:{required:!0}}(i)}static email(i){return function O7(e){return kh(e.value)||J_t.test(e.value)?null:{email:!0}}(i)}static minLength(i){return L7(i)}static maxLength(i){return function N7(e){return i=>I7(i.value)&&i.value.length>e?{maxlength:{requiredLength:e,actualLength:i.value.length}}:null}(i)}static pattern(i){return B7(i)}static nullValidator(i){return null}static compose(i){return W7(i)}static composeAsync(i){return X7(i)}}function P7(e){return kh(e.value)?{required:!0}:null}function L7(e){return i=>kh(i.value)||!I7(i.value)?null:i.value.length{if(kh(n.value))return null;const r=n.value;return i.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function TC(e){return null}function V7(e){return null!=e}function U7(e){return Xx(e)?Is(e):e}function z7(e){let i={};return e.forEach(t=>{i=null!=t?{...i,...t}:i}),0===Object.keys(i).length?null:i}function G7(e,i){return i.map(t=>t(e))}function H7(e){return e.map(i=>function q_t(e){return!e.validate}(i)?i:t=>i.validate(t))}function W7(e){if(!e)return null;const i=e.filter(V7);return 0==i.length?null:function(t){return z7(G7(t,i))}}function wk(e){return null!=e?W7(H7(e)):null}function X7(e){if(!e)return null;const i=e.filter(V7);return 0==i.length?null:function(t){return a7(G7(t,i).map(U7)).pipe(Di(z7))}}function _k(e){return null!=e?X7(H7(e)):null}function j7(e,i){return null===e?[i]:Array.isArray(e)?[...e,i]:[e,i]}function Y7(e){return e._rawValidators}function $7(e){return e._rawAsyncValidators}function Tk(e){return e?Array.isArray(e)?e:[e]:[]}function CC(e,i){return Array.isArray(e)?e.includes(i):e===i}function Q7(e,i){const t=Tk(i);return Tk(e).forEach(r=>{CC(t,r)||t.push(r)}),t}function K7(e,i){return Tk(i).filter(t=>!CC(e,t))}class Z7{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(i){this._rawValidators=i||[],this._composedValidatorFn=wk(this._rawValidators)}_setAsyncValidators(i){this._rawAsyncValidators=i||[],this._composedAsyncValidatorFn=_k(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(i){this._onDestroyCallbacks.push(i)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(i=>i()),this._onDestroyCallbacks=[]}reset(i=void 0){this.control&&this.control.reset(i)}hasError(i,t){return!!this.control&&this.control.hasError(i,t)}getError(i,t){return this.control?this.control.getError(i,t):null}}class Lo extends Z7{get formDirective(){return null}get path(){return null}}class ld extends Z7{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class J7{constructor(i){this._cd=i}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let No=(()=>{class e extends J7{constructor(t){super(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ld,2))};static#e=this.\u0275dir=ce({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){2&n&&bi("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[hi]})}return e})(),nm=(()=>{class e extends J7{constructor(t){super(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Lo,10))};static#e=this.\u0275dir=ce({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,r){2&n&&bi("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},features:[hi]})}return e})();const Oy="VALID",EC="INVALID",iv="PENDING",Ly="DISABLED";function Ek(e){return(AC(e)?e.validators:e)||null}function Ak(e,i){return(AC(i)?i.asyncValidators:e)||null}function AC(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function tW(e,i,t){const n=e.controls;if(!(i?Object.keys(n):n).length)throw new ue(1e3,"");if(!n[t])throw new ue(1001,"")}function eW(e,i,t){e._forEachChild((n,r)=>{if(void 0===t[r])throw new ue(1002,"")})}class DC{constructor(i,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(i),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(i){this._rawValidators=this._composedValidatorFn=i}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(i){this._rawAsyncValidators=this._composedAsyncValidatorFn=i}get parent(){return this._parent}get valid(){return this.status===Oy}get invalid(){return this.status===EC}get pending(){return this.status==iv}get disabled(){return this.status===Ly}get enabled(){return this.status!==Ly}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(i){this._assignValidators(i)}setAsyncValidators(i){this._assignAsyncValidators(i)}addValidators(i){this.setValidators(Q7(i,this._rawValidators))}addAsyncValidators(i){this.setAsyncValidators(Q7(i,this._rawAsyncValidators))}removeValidators(i){this.setValidators(K7(i,this._rawValidators))}removeAsyncValidators(i){this.setAsyncValidators(K7(i,this._rawAsyncValidators))}hasValidator(i){return CC(this._rawValidators,i)}hasAsyncValidator(i){return CC(this._rawAsyncValidators,i)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(i={}){this.touched=!0,this._parent&&!i.onlySelf&&this._parent.markAsTouched(i)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(i=>i.markAllAsTouched())}markAsUntouched(i={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}markAsDirty(i={}){this.pristine=!1,this._parent&&!i.onlySelf&&this._parent.markAsDirty(i)}markAsPristine(i={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}markAsPending(i={}){this.status=iv,!1!==i.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!i.onlySelf&&this._parent.markAsPending(i)}disable(i={}){const t=this._parentMarkedDirty(i.onlySelf);this.status=Ly,this.errors=null,this._forEachChild(n=>{n.disable({...i,onlySelf:!0})}),this._updateValue(),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...i,skipPristineCheck:t}),this._onDisabledChange.forEach(n=>n(!0))}enable(i={}){const t=this._parentMarkedDirty(i.onlySelf);this.status=Oy,this._forEachChild(n=>{n.enable({...i,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent}),this._updateAncestors({...i,skipPristineCheck:t}),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(i){this._parent&&!i.onlySelf&&(this._parent.updateValueAndValidity(i),i.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(i){this._parent=i}getRawValue(){return this.value}updateValueAndValidity(i={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Oy||this.status===iv)&&this._runAsyncValidator(i.emitEvent)),!1!==i.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!i.onlySelf&&this._parent.updateValueAndValidity(i)}_updateTreeValidity(i={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(i)),this.updateValueAndValidity({onlySelf:!0,emitEvent:i.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ly:Oy}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(i){if(this.asyncValidator){this.status=iv,this._hasOwnPendingAsyncValidator=!0;const t=U7(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(n=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(n,{emitEvent:i})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(i,t={}){this.errors=i,this._updateControlsErrors(!1!==t.emitEvent)}get(i){let t=i;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((n,r)=>n&&n._find(r),this)}getError(i,t){const n=t?this.get(t):this;return n&&n.errors?n.errors[i]:null}hasError(i,t){return!!this.getError(i,t)}get root(){let i=this;for(;i._parent;)i=i._parent;return i}_updateControlsErrors(i){this.status=this._calculateStatus(),i&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(i)}_initObservables(){this.valueChanges=new De,this.statusChanges=new De}_calculateStatus(){return this._allControlsDisabled()?Ly:this.errors?EC:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(iv)?iv:this._anyControlsHaveStatus(EC)?EC:Oy}_anyControlsHaveStatus(i){return this._anyControls(t=>t.status===i)}_anyControlsDirty(){return this._anyControls(i=>i.dirty)}_anyControlsTouched(){return this._anyControls(i=>i.touched)}_updatePristine(i={}){this.pristine=!this._anyControlsDirty(),this._parent&&!i.onlySelf&&this._parent._updatePristine(i)}_updateTouched(i={}){this.touched=this._anyControlsTouched(),this._parent&&!i.onlySelf&&this._parent._updateTouched(i)}_registerOnCollectionChange(i){this._onCollectionChange=i}_setUpdateStrategy(i){AC(i)&&null!=i.updateOn&&(this._updateOn=i.updateOn)}_parentMarkedDirty(i){return!i&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(i){return null}_assignValidators(i){this._rawValidators=Array.isArray(i)?i.slice():i,this._composedValidatorFn=function nTt(e){return Array.isArray(e)?wk(e):e||null}(this._rawValidators)}_assignAsyncValidators(i){this._rawAsyncValidators=Array.isArray(i)?i.slice():i,this._composedAsyncValidatorFn=function rTt(e){return Array.isArray(e)?_k(e):e||null}(this._rawAsyncValidators)}}class nv extends DC{constructor(i,t,n){super(Ek(t),Ak(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(i,t){return this.controls[i]?this.controls[i]:(this.controls[i]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(i,t,n={}){this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(i,t={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(i,t,n={}){this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),delete this.controls[i],t&&this.registerControl(i,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(i){return this.controls.hasOwnProperty(i)&&this.controls[i].enabled}setValue(i,t={}){eW(this,0,i),Object.keys(i).forEach(n=>{tW(this,!0,n),this.controls[n].setValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){null!=i&&(Object.keys(i).forEach(n=>{const r=this.controls[n];r&&r.patchValue(i[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i={},t={}){this._forEachChild((n,r)=>{n.reset(i?i[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(i,t,n)=>(i[n]=t.getRawValue(),i))}_syncPendingControls(){let i=this._reduceChildren(!1,(t,n)=>!!n._syncPendingControls()||t);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){Object.keys(this.controls).forEach(t=>{const n=this.controls[t];n&&i(n,t)})}_setUpControls(){this._forEachChild(i=>{i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(i){for(const[t,n]of Object.entries(this.controls))if(this.contains(t)&&i(n))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(i,t){let n=i;return this._forEachChild((r,s)=>{n=t(n,r,s)}),n}_allControlsDisabled(){for(const i of Object.keys(this.controls))if(this.controls[i].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(i){return this.controls.hasOwnProperty(i)?this.controls[i]:null}}class iW extends nv{}const rm=new ee("CallSetDisabledState",{providedIn:"root",factory:()=>Ny}),Ny="always";function MC(e,i){return[...i.path,e]}function By(e,i,t=Ny){Dk(e,i),i.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&i.valueAccessor.setDisabledState?.(e.disabled),function aTt(e,i){i.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&nW(e,i)})}(e,i),function lTt(e,i){const t=(n,r)=>{i.valueAccessor.writeValue(n),r&&i.viewToModelUpdate(n)};e.registerOnChange(t),i._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,i),function oTt(e,i){i.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&nW(e,i),"submit"!==e.updateOn&&e.markAsTouched()})}(e,i),function sTt(e,i){if(i.valueAccessor.setDisabledState){const t=n=>{i.valueAccessor.setDisabledState(n)};e.registerOnDisabledChange(t),i._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,i)}function IC(e,i,t=!0){const n=()=>{};i.valueAccessor&&(i.valueAccessor.registerOnChange(n),i.valueAccessor.registerOnTouched(n)),kC(e,i),e&&(i._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function RC(e,i){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(i)})}function Dk(e,i){const t=Y7(e);null!==i.validator?e.setValidators(j7(t,i.validator)):"function"==typeof t&&e.setValidators([t]);const n=$7(e);null!==i.asyncValidator?e.setAsyncValidators(j7(n,i.asyncValidator)):"function"==typeof n&&e.setAsyncValidators([n]);const r=()=>e.updateValueAndValidity();RC(i._rawValidators,r),RC(i._rawAsyncValidators,r)}function kC(e,i){let t=!1;if(null!==e){if(null!==i.validator){const r=Y7(e);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==i.validator);s.length!==r.length&&(t=!0,e.setValidators(s))}}if(null!==i.asyncValidator){const r=$7(e);if(Array.isArray(r)&&r.length>0){const s=r.filter(o=>o!==i.asyncValidator);s.length!==r.length&&(t=!0,e.setAsyncValidators(s))}}}const n=()=>{};return RC(i._rawValidators,n),RC(i._rawAsyncValidators,n),t}function nW(e,i){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),i.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function rW(e,i){Dk(e,i)}function Ik(e,i){if(!e.hasOwnProperty("model"))return!1;const t=e.model;return!!t.isFirstChange()||!Object.is(i,t.currentValue)}function sW(e,i){e._syncPendingControls(),i.forEach(t=>{const n=t.control;"submit"===n.updateOn&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Rk(e,i){if(!i)return null;let t,n,r;return Array.isArray(i),i.forEach(s=>{s.constructor===Hl?t=s:function uTt(e){return Object.getPrototypeOf(e.constructor)===im}(s)?n=s:r=s}),r||n||t||null}const fTt={provide:Lo,useExisting:Sn(()=>sm)},Vy=Promise.resolve();let sm=(()=>{class e extends Lo{constructor(t,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new De,this.form=new nv({},wk(t),_k(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){Vy.then(()=>{const n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),By(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){Vy.then(()=>{const n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){Vy.then(()=>{const n=this._findContainer(t.path),r=new nv({});rW(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){Vy.then(()=>{const n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){Vy.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submitted=!0,sW(this.form,this._directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ys,10),mt(Ph,10),mt(rm,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){1&n&&Vt("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{options:[Wt.None,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[fi([fTt]),hi]})}return e})();function aW(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}function oW(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}const Va=class extends DC{constructor(i=null,t,n){super(Ek(t),Ak(n,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(i),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),AC(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=oW(i)?i.value:i)}setValue(i,t={}){this.value=this._pendingValue=i,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(n=>n(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(i,t={}){this.setValue(i,t)}reset(i=this.defaultValue,t={}){this._applyFormState(i),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(i){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(i){this._onChange.push(i)}_unregisterOnChange(i){aW(this._onChange,i)}registerOnDisabledChange(i){this._onDisabledChange.push(i)}_unregisterOnDisabledChange(i){aW(this._onDisabledChange,i)}_forEachChild(i){}_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(i){oW(i)?(this.value=this._pendingValue=i.value,i.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=i}},mTt=Va,vTt={provide:ld,useExisting:Sn(()=>Wl)},dW=Promise.resolve();let Wl=(()=>{class e extends ld{constructor(t,n,r,s,o,l){super(),this._changeDetectorRef=o,this.callSetDisabledState=l,this.control=new Va,this._registered=!1,this.name="",this.update=new De,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Rk(0,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){const n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Ik(t,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(t){this.viewModel=t,this.update.emit(t)}_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(){By(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()}_updateValue(t){dW.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){const n=t.isDisabled.currentValue,r=0!==n&&Je(n);dW.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?MC(t,this._parent):[t]}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Lo,9),mt(Ys,10),mt(Ph,10),mt(ua,10),mt(Mn,8),mt(rm,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[Wt.None,"disabled","isDisabled"],model:[Wt.None,"ngModel","model"],options:[Wt.None,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[fi([vTt]),hi,tr]})}return e})(),rv=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}return e})();const xTt={provide:ua,useExisting:Sn(()=>PC),multi:!0};let PC=(()=>{class e extends im{writeValue(t){this.setProperty("value",t??"")}registerOnChange(t){this.onChange=n=>{t(""==n?null:parseFloat(n))}}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,r){1&n&&Vt("input",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},features:[fi([xTt]),hi]})}return e})();const kk=new ee(""),_Tt={provide:ld,useExisting:Sn(()=>Uy)};let Uy=(()=>{class e extends ld{set isDisabled(t){}static#t=this._ngModelWarningSentOnce=!1;constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=o,this.update=new De,this._ngModelWarningSent=!1,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=Rk(0,r)}ngOnChanges(t){if(this._isControlChanged(t)){const n=t.form.previousValue;n&&IC(n,this,!1),By(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Ik(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&IC(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}static#e=this.\u0275fac=function(n){return new(n||e)(mt(Ys,10),mt(Ph,10),mt(ua,10),mt(kk,8),mt(rm,8))};static#i=this.\u0275dir=ce({type:e,selectors:[["","formControl",""]],inputs:{form:[Wt.None,"formControl","form"],isDisabled:[Wt.None,"disabled","isDisabled"],model:[Wt.None,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[fi([_Tt]),hi,tr]})}return e})();const TTt={provide:Lo,useExisting:Sn(()=>cd)};let cd=(()=>{class e extends Lo{constructor(t,n,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new De,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(kC(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const n=this.form.get(t.path);return By(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){IC(t.control||null,t,!1),function hTt(e,i){const t=e.indexOf(i);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this.submitted=!0,sW(this.form,this.directives),this.ngSubmit.emit(t),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const n=t.control,r=this.form.get(t.path);n!==r&&(IC(n||null,t),(e=>e instanceof Va)(r)&&(By(r,t,this.callSetDisabledState),t.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const n=this.form.get(t.path);rW(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const n=this.form.get(t.path);n&&function cTt(e,i){return kC(e,i)}(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Dk(this.form,this),this._oldForm&&kC(this._oldForm,this)}_checkFormPresent(){}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ys,10),mt(Ph,10),mt(rm,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","formGroup",""]],hostBindings:function(n,r){1&n&&Vt("submit",function(o){return r.onSubmit(o)})("reset",function(){return r.onReset()})},inputs:{form:[Wt.None,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[fi([TTt]),hi,tr]})}return e})();const ETt={provide:ld,useExisting:Sn(()=>sv)};let sv=(()=>{class e extends ld{set isDisabled(t){}static#t=this._ngModelWarningSentOnce=!1;constructor(t,n,r,s,o){super(),this._ngModelWarningConfig=o,this._added=!1,this.name=null,this.update=new De,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=Rk(0,s)}ngOnChanges(t){this._added||this._setUpControl(),Ik(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return MC(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#e=this.\u0275fac=function(n){return new(n||e)(mt(Lo,13),mt(Ys,10),mt(Ph,10),mt(ua,10),mt(kk,8))};static#i=this.\u0275dir=ce({type:e,selectors:[["","formControlName",""]],inputs:{name:[Wt.None,"formControlName","name"],isDisabled:[Wt.None,"disabled","isDisabled"],model:[Wt.None,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[fi([ETt]),hi,tr]})}return e})();let am=(()=>{class e{constructor(){this._validator=TC}ngOnChanges(t){if(this.inputName in t){const n=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(n),this._validator=this._enabled?this.createValidator(n):TC,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,features:[tr]})}return e})();const OTt={provide:Ys,useExisting:Sn(()=>FC),multi:!0};let FC=(()=>{class e extends am{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Je,this.createValidator=t=>P7}enabled(t){return t}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(n,r){2&n&&Ti("required",r._enabled?"":null)},inputs:{required:"required"},features:[fi([OTt]),hi]})}return e})();const BTt={provide:Ys,useExisting:Sn(()=>Nk),multi:!0};let Nk=(()=>{class e extends am{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=t=>function gW(e){return"number"==typeof e?e:parseInt(e,10)}(t),this.createValidator=t=>L7(t)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(n,r){2&n&&Ti("minlength",r._enabled?r.minlength:null)},inputs:{minlength:"minlength"},features:[fi([BTt]),hi]})}return e})();const UTt={provide:Ys,useExisting:Sn(()=>LC),multi:!0};let LC=(()=>{class e extends am{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>B7(t)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(n,r){2&n&&Ti("pattern",r._enabled?r.pattern:null)},inputs:{pattern:"pattern"},features:[fi([UTt]),hi]})}return e})(),_W=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();class TW extends DC{constructor(i,t,n){super(Ek(t),Ak(n,t)),this.controls=i,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(i){return this.controls[this._adjustIndex(i)]}push(i,t={}){this.controls.push(i),this._registerControl(i),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(i,t,n={}){this.controls.splice(i,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(i,t={}){let n=this._adjustIndex(i);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(i,t,n={}){let r=this._adjustIndex(i);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(i,t={}){eW(this,0,i),i.forEach((n,r)=>{tW(this,!1,r),this.at(r).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(i,t={}){null!=i&&(i.forEach((n,r)=>{this.at(r)&&this.at(r).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(i=[],t={}){this._forEachChild((n,r)=>{n.reset(i[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(i=>i.getRawValue())}clear(i={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:i.emitEvent}))}_adjustIndex(i){return i<0?i+this.length:i}_syncPendingControls(){let i=this.controls.reduce((t,n)=>!!n._syncPendingControls()||t,!1);return i&&this.updateValueAndValidity({onlySelf:!0}),i}_forEachChild(i){this.controls.forEach((t,n)=>{i(t,n)})}_updateValue(){this.value=this.controls.filter(i=>i.enabled||this.disabled).map(i=>i.value)}_anyControls(i){return this.controls.some(t=>t.enabled&&i(t))}_setUpControls(){this._forEachChild(i=>this._registerControl(i))}_allControlsDisabled(){for(const i of this.controls)if(i.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(i){i.setParent(this),i._registerOnCollectionChange(this._onCollectionChange)}_find(i){return this.at(i)??null}}function CW(e){return!!e&&(void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn)}let NC=(()=>{class e{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new e;return t.useNonNullable=!0,t}group(t,n=null){const r=this._reduceControls(t);let s={};return CW(n)?s=n:null!==n&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new nv(r,s)}record(t,n=null){const r=this._reduceControls(t);return new iW(r,n)}control(t,n,r){let s={};return this.useNonNullable?(CW(n)?s=n:(s.validators=n,s.asyncValidators=r),new Va(t,{...s,nonNullable:!0})):new Va(t,n,r)}array(t,n,r){const s=t.map(o=>this._createControl(o));return new TW(s,n,r)}_reduceControls(t){const n={};return Object.keys(t).forEach(r=>{n[r]=this._createControl(t[r])}),n}_createControl(t){return t instanceof Va||t instanceof DC?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Bk=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:rm,useValue:t.callSetDisabledState??Ny}]}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[_W]})}return e})(),zTt=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:kk,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:rm,useValue:t.callSetDisabledState??Ny}]}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[_W]})}return e})();class HTt{constructor(i){this._box=i,this._destroyed=new Pe,this._resizeSubject=new Pe,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(i){return this._elementObservables.has(i)||this._elementObservables.set(i,new ur(t=>{const n=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(i,{box:this._box}),()=>{this._resizeObserver?.unobserve(i),n.unsubscribe(),this._elementObservables.delete(i)}}).pipe(In(t=>t.some(n=>n.target===i)),function GTt(e,i,t){let n,r=!1;return e&&"object"==typeof e?({bufferSize:n=1/0,windowTime:i=1/0,refCount:r=!1,scheduler:t}=e):n=e??1/0,o7({connector:()=>new py(n,i,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}({bufferSize:1,refCount:!0}),Ui(this._destroyed))),this._elementObservables.get(i)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}}let WTt=(()=>{class e{constructor(){this._observers=new Map,this._ngZone=me(ii)}ngOnDestroy(){for(const[,t]of this._observers)t.destroy();this._observers.clear()}observe(t,n){const r=n?.box||"content-box";return this._observers.has(r)||this._observers.set(r,new HTt(r)),this._observers.get(r).observe(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const XTt=["notch"],jTt=["matFormFieldNotchedOutline",""],YTt=["*"],$Tt=["textField"],QTt=["iconPrefixContainer"],KTt=["textPrefixContainer"],ZTt=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],JTt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function qTt(e,i){1&e&&we(0,"span",17)}function tCt(e,i){if(1&e&&(tt(0,"label",16),xi(1,1),Gt(2,qTt,1,0,"span",17),et()),2&e){const t=Ct(2);yt("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),Ti("for",t._control.id),lt(2),xn(2,!t.hideRequiredMarker&&t._control.required?2:-1)}}function eCt(e,i){1&e&&Gt(0,tCt,3,5,"label",16),2&e&&xn(0,Ct()._hasFloatingLabel()?0:-1)}function iCt(e,i){1&e&&we(0,"div",5)}function nCt(e,i){}function rCt(e,i){1&e&&Gt(0,nCt,0,0,"ng-template",11),2&e&&(Ct(2),yt("ngTemplateOutlet",qi(1)))}function sCt(e,i){if(1&e&&(tt(0,"div",7),Gt(1,rCt,1,1,null,11),et()),2&e){const t=Ct();yt("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),lt(),xn(1,t._forceDisplayInfixLabel()?-1:1)}}function aCt(e,i){1&e&&(tt(0,"div",8,2),xi(2,2),et())}function oCt(e,i){1&e&&(tt(0,"div",9,3),xi(2,3),et())}function lCt(e,i){}function cCt(e,i){1&e&&Gt(0,lCt,0,0,"ng-template",11),2&e&&(Ct(),yt("ngTemplateOutlet",qi(1)))}function dCt(e,i){1&e&&(tt(0,"div",12),xi(1,4),et())}function uCt(e,i){1&e&&(tt(0,"div",13),xi(1,5),et())}function hCt(e,i){1&e&&we(0,"div",14)}function fCt(e,i){1&e&&(tt(0,"div",18),xi(1,6),et()),2&e&&yt("@transitionMessages",Ct()._subscriptAnimationState)}function mCt(e,i){if(1&e&&(tt(0,"mat-hint",20),ut(1),et()),2&e){const t=Ct(2);yt("id",t._hintLabelId),lt(),Ze(t.hintLabel)}}function pCt(e,i){if(1&e&&(tt(0,"div",19),Gt(1,mCt,2,2,"mat-hint",20),xi(2,7),we(3,"div",21),xi(4,8),et()),2&e){const t=Ct();yt("@transitionMessages",t._subscriptAnimationState),lt(),xn(1,t.hintLabel?1:-1)}}let wl=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-label"]],standalone:!0})}return e})(),gCt=0;const SW=new ee("MatError");let EW=(()=>{class e{constructor(t,n){this.id="mat-mdc-error-"+gCt++,t||n.nativeElement.setAttribute("aria-live","polite")}static#t=this.\u0275fac=function(n){return new(n||e)(hl("aria-live"),mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(n,r){2&n&&Kc("id",r.id)},inputs:{id:"id"},standalone:!0,features:[fi([{provide:SW,useExisting:e}])]})}return e})(),vCt=0,om=(()=>{class e{constructor(){this.align="start",this.id="mat-mdc-hint-"+vCt++}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(n,r){2&n&&(Kc("id",r.id),Ti("align",null),bi("mat-mdc-form-field-hint-end","end"===r.align))},inputs:{align:"align",id:"id"},standalone:!0})}return e})();const xCt=new ee("MatPrefix"),AW=new ee("MatSuffix");let DW=(()=>{class e{constructor(){this._isText=!1}set _isTextSelector(t){this._isText=!0}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[Wt.None,"matTextSuffix","_isTextSelector"]},standalone:!0,features:[fi([{provide:AW,useExisting:e}])]})}return e})();const MW=new ee("FloatingLabelParent");let IW=(()=>{class e{get floating(){return this._floating}set floating(t){this._floating=t,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(t){this._monitorResize=t,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(t){this._elementRef=t,this._floating=!1,this._monitorResize=!1,this._resizeObserver=me(WTt),this._ngZone=me(ii),this._parent=me(MW),this._resizeSubscription=new Ie}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return function yCt(e){if(null!==e.offsetParent)return e.scrollWidth;const t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);const n=t.scrollWidth;return t.remove(),n}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-floating-label--float-above",r.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0})}return e})();const RW="mdc-line-ripple--active",BC="mdc-line-ripple--deactivating";let kW=(()=>{class e{constructor(t,n){this._elementRef=t,this._handleTransitionEnd=r=>{const s=this._elementRef.nativeElement.classList,o=s.contains(BC);"opacity"===r.propertyName&&o&&s.remove(RW,BC)},n.runOutsideAngular(()=>{t.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){const t=this._elementRef.nativeElement.classList;t.remove(BC),t.add(RW)}deactivate(){this._elementRef.nativeElement.classList.add(BC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ii))};static#e=this.\u0275dir=ce({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0})}return e})(),PW=(()=>{class e{constructor(t,n){this._elementRef=t,this._ngZone=n,this.open=!1}ngAfterViewInit(){const t=this._elementRef.nativeElement.querySelector(".mdc-floating-label");t?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(t){this._notch.nativeElement.style.width=this.open&&t?`calc(${t}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:""}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ii))};static#e=this.\u0275cmp=je({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(n,r){if(1&n&&Mi(XTt,5),2&n){let s;Be(s=Ve())&&(r._notch=s.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mdc-notched-outline--notched",r.open)},inputs:{open:[Wt.None,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[Vi],attrs:jTt,ngContentSelectors:YTt,decls:5,vars:0,consts:[["notch",""],[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(n,r){1&n&&(Kn(),we(0,"div",1),tt(1,"div",2,0),xi(3),et(),we(4,"div",3))},encapsulation:2,changeDetection:0})}return e})();const bCt={transitionMessages:mr("transitionMessages",[Rn("enter",qe({opacity:1,transform:"translateY(0%)"})),on("void => enter",[qe({opacity:0,transform:"translateY(-5px)"}),sn("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])};let VC=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e})}return e})();const UC=new ee("MatFormField"),wCt=new ee("MAT_FORM_FIELD_DEFAULT_OPTIONS");let FW=0,Xl=(()=>{class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(t){this._hideRequiredMarker=la(t)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(t){t!==this._floatLabel&&(this._floatLabel=t,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(t){const n=this._appearance;this._appearance=t||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==n&&(this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(t){this._subscriptSizing=t||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(t){this._hintLabel=t,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(t){this._explicitFormFieldControl=t}constructor(t,n,r,s,o,l,w,C){this._elementRef=t,this._changeDetectorRef=n,this._ngZone=r,this._dir=s,this._platform=o,this._defaults=l,this._animationMode=w,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+FW++,this._hintLabelId="mat-mdc-hint-"+FW++,this._subscriptAnimationState="",this._destroyed=new Pe,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,l&&(l.appearance&&(this.appearance=l.appearance),this._hideRequiredMarker=!!l?.hideRequiredMarker,l.color&&(this.color=l.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){const t=this._control;t.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${t.controlType}`),t.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),t.ngControl&&t.ngControl.valueChanges&&t.ngControl.valueChanges.pipe(Ui(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(t=>!t._isText),this._hasTextPrefix=!!this._prefixChildren.find(t=>t._isText),this._hasIconSuffix=!!this._suffixChildren.find(t=>!t._isText),this._hasTextSuffix=!!this._suffixChildren.find(t=>t._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Yr(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(Ui(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(Ui(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(t){const n=this._control?this._control.ngControl:null;return n&&n[t]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){this._hasOutline()&&this._floatingLabel&&this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth()):this._notchedOutline?._setNotchWidth(0)}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let t=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&t.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){const n=this._hintChildren?this._hintChildren.find(s=>"start"===s.align):null,r=this._hintChildren?this._hintChildren.find(s=>"end"===s.align):null;n?t.push(n.id):this._hintLabel&&t.push(this._hintLabelId),r&&t.push(r.id)}else this._errorChildren&&t.push(...this._errorChildren.map(n=>n.id));this._control.setDescribedByIds(t)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;const t=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(t.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);const n=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,s=n?.getBoundingClientRect().width??0,o=r?.getBoundingClientRect().width??0;t.style.transform=`var(\n --mat-mdc-form-field-label-transform,\n translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${s+o}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n )`}_isAttachedToDom(){const t=this._elementRef.nativeElement;if(t.getRootNode){const n=t.getRootNode();return n&&n!==t}return document.documentElement.contains(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Mn),mt(ii),mt(Ba),mt(ir),mt(wCt,8),mt(Nr,8),mt(Ni))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-form-field"]],contentQueries:function(n,r,s){if(1&n&&(An(s,wl,5),An(s,wl,7),An(s,VC,5),An(s,xCt,5),An(s,AW,5),An(s,SW,5),An(s,om,5)),2&n){let o;Be(o=Ve())&&(r._labelChildNonStatic=o.first),Be(o=Ve())&&(r._labelChildStatic=o.first),Be(o=Ve())&&(r._formFieldControl=o.first),Be(o=Ve())&&(r._prefixChildren=o),Be(o=Ve())&&(r._suffixChildren=o),Be(o=Ve())&&(r._errorChildren=o),Be(o=Ve())&&(r._hintChildren=o)}},viewQuery:function(n,r){if(1&n&&(Mi($Tt,5),Mi(QTt,5),Mi(KTt,5),Mi(IW,5),Mi(PW,5),Mi(kW,5)),2&n){let s;Be(s=Ve())&&(r._textField=s.first),Be(s=Ve())&&(r._iconPrefixContainer=s.first),Be(s=Ve())&&(r._textPrefixContainer=s.first),Be(s=Ve())&&(r._floatingLabel=s.first),Be(s=Ve())&&(r._notchedOutline=s.first),Be(s=Ve())&&(r._lineRipple=s.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(n,r){2&n&&bi("mat-mdc-form-field-label-always-float",r._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",r._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",r._hasIconSuffix)("mat-form-field-invalid",r._control.errorState)("mat-form-field-disabled",r._control.disabled)("mat-form-field-autofilled",r._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===r._animationMode)("mat-form-field-appearance-fill","fill"==r.appearance)("mat-form-field-appearance-outline","outline"==r.appearance)("mat-form-field-hide-placeholder",r._hasFloatingLabel()&&!r._shouldLabelFloat())("mat-focused",r._control.focused)("mat-primary","accent"!==r.color&&"warn"!==r.color)("mat-accent","accent"===r.color)("mat-warn","warn"===r.color)("ng-untouched",r._shouldForward("untouched"))("ng-touched",r._shouldForward("touched"))("ng-pristine",r._shouldForward("pristine"))("ng-dirty",r._shouldForward("dirty"))("ng-valid",r._shouldForward("valid"))("ng-invalid",r._shouldForward("invalid"))("ng-pending",r._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[fi([{provide:UC,useExisting:e},{provide:MW,useExisting:e}]),Vi],ngContentSelectors:JTt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(n,r){if(1&n){const s=ve();Kn(ZTt),Gt(0,eCt,1,1,"ng-template",null,0,wg),tt(2,"div",4,1),Vt("click",function(l){return Ut(s),zt(r._control.onContainerClick(l))}),Gt(4,iCt,1,0,"div",5),tt(5,"div",6),Gt(6,sCt,2,2,"div",7)(7,aCt,3,0,"div",8)(8,oCt,3,0,"div",9),tt(9,"div",10),Gt(10,cCt,1,1,null,11),xi(11),et(),Gt(12,dCt,2,0,"div",12)(13,uCt,2,0,"div",13),et(),Gt(14,hCt,1,0,"div",14),et(),tt(15,"div",15),Gt(16,fCt,2,1)(17,pCt,5,2),et()}if(2&n){let s;lt(2),bi("mdc-text-field--filled",!r._hasOutline())("mdc-text-field--outlined",r._hasOutline())("mdc-text-field--no-label",!r._hasFloatingLabel())("mdc-text-field--disabled",r._control.disabled)("mdc-text-field--invalid",r._control.errorState),lt(2),xn(4,r._hasOutline()||r._control.disabled?-1:4),lt(2),xn(6,r._hasOutline()?6:-1),lt(),xn(7,r._hasIconPrefix?7:-1),lt(),xn(8,r._hasTextPrefix?8:-1),lt(2),xn(10,!r._hasOutline()||r._forceDisplayInfixLabel()?10:-1),lt(2),xn(12,r._hasTextSuffix?12:-1),lt(),xn(13,r._hasIconSuffix?13:-1),lt(),xn(14,r._hasOutline()?-1:14),lt(),bi("mat-mdc-form-field-subscript-dynamic-size","dynamic"===r.subscriptSizing),lt(),xn(16,"error"===(s=r._getDisplayedMessages())?16:"hint"===s?17:-1)}},dependencies:[IW,PW,pT,kW,om],styles:['.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 64px/0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 96px/0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;pointer-events:none}.mdc-notched-outline__trailing{flex-grow:1}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{border-top:1px solid;border-bottom:1px solid}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{max-width:calc(100% - 12px*2)}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-text-field--filled{border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-text-field--filled .mdc-line-ripple::before{border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label--float-above{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}@media all{.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(.75*var(--mdc-outlined-text-field-label-text-size))}.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mdc-outlined-text-field-label-text-size)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px,calc(var(--mdc-outlined-text-field-container-shape) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 10.25px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 24.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - 32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}100%{transform:translateX(calc(0% - -32px)) translateY(calc(0% - 34.75px)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}100%{transform:translateX(calc(0% - 0%)) translateY(calc(0% - 106%)) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[bCt.transitionMessages]},changeDetection:0})}return e})(),zC=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,qc,LR,Ki]})}return e})();const CCt=["panel"],SCt=["*"];function ECt(e,i){if(1&e){const t=ve();tt(0,"div",1,0),Vt("@panelAnimation.done",function(r){return Ut(t),zt(Ct()._animationDone.next(r))}),xi(2),et()}if(2&e){const t=i.id,n=Ct();yt("id",n.id)("ngClass",n._classList)("@panelAnimation",n.isOpen?"visible":"hidden"),Ti("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}const ACt=mr("panelAnimation",[Rn("void, hidden",qe({opacity:0,transform:"scaleY(0.8)"})),on(":enter, hidden => visible",[KR([sn("0.03s linear",qe({opacity:1})),sn("0.12s cubic-bezier(0, 0, 0.2, 1)",qe({transform:"scaleY(1)"}))])]),on(":leave, visible => hidden",[sn("0.075s linear",qe({opacity:0}))])]);let DCt=0;class MCt{constructor(i,t){this.source=i,this.option=t}}const NW=new ee("mat-autocomplete-default-options",{providedIn:"root",factory:function ICt(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}});let RCt=(()=>{class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(t){this._color=t,this._setThemeClasses(this._classList)}set classList(t){this._classList=t&&t.length?function Fbt(e,i=/\s+/){const t=[];if(null!=e){const n=Array.isArray(e)?e:`${e}`.split(i);for(const r of n){const s=`${r}`.trim();s&&t.push(s)}}return t}(t).reduce((n,r)=>(n[r]=!0,n),{}):{},this._setVisibilityClasses(this._classList),this._setThemeClasses(this._classList),this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}constructor(t,n,r,s){this._changeDetectorRef=t,this._elementRef=n,this._defaults=r,this._activeOptionChanges=Ie.EMPTY,this._visibleClass="mat-mdc-autocomplete-visible",this._hiddenClass="mat-mdc-autocomplete-hidden",this._animationDone=new De,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new De,this.opened=new De,this.closed=new De,this.optionActivated=new De,this._classList={},this.id="mat-autocomplete-"+DCt++,this.inertGroups=s?.SAFARI||!1,this.autoActiveFirstOption=!!r.autoActiveFirstOption,this.autoSelectActiveOption=!!r.autoSelectActiveOption,this.requireSelection=!!r.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new dH(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){const n=new MCt(this,t);this.optionSelected.emit(n)}_getPanelAriaLabelledby(t){return this.ariaLabel?null:this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_setVisibilityClasses(t){t[this._visibleClass]=this.showPanel,t[this._hiddenClass]=!this.showPanel}_setThemeClasses(t){t["mat-primary"]="primary"===this._color,t["mat-warn"]="warn"===this._color,t["mat-accent"]="accent"===this._color}_skipPredicate(){return!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn),mt(si),mt(NW),mt(ir))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(n,r,s){if(1&n&&(An(s,nu,5),An(s,WR,5)),2&n){let o;Be(o=Ve())&&(r.options=o),Be(o=Ve())&&(r.optionGroups=o)}},viewQuery:function(n,r){if(1&n&&(Mi(fr,7),Mi(CCt,5)),2&n){let s;Be(s=Ve())&&(r.template=s.first),Be(s=Ve())&&(r.panel=s.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[Wt.HasDecoratorInputTransform,"autoActiveFirstOption","autoActiveFirstOption",Je],autoSelectActiveOption:[Wt.HasDecoratorInputTransform,"autoSelectActiveOption","autoSelectActiveOption",Je],requireSelection:[Wt.HasDecoratorInputTransform,"requireSelection","requireSelection",Je],panelWidth:"panelWidth",disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],classList:[Wt.None,"class","classList"],hideSingleSelectionIndicator:[Wt.HasDecoratorInputTransform,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Je]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[fi([{provide:HR,useExisting:e}]),ln,Vi],ngContentSelectors:SCt,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id","ngClass"]],template:function(n,r){1&n&&(Kn(),Gt(0,ECt,3,5,"ng-template"))},dependencies:[bc],styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape);box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[ACt]},changeDetection:0})}return e})();const kCt={provide:ua,useExisting:Sn(()=>VW),multi:!0},BW=new ee("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}}),FCt={provide:BW,deps:[xs],useFactory:function PCt(e){return()=>e.scrollStrategies.reposition()}};let VW=(()=>{class e{constructor(t,n,r,s,o,l,w,C,M,P,O){this._element=t,this._overlay=n,this._viewContainerRef=r,this._zone=s,this._changeDetectorRef=o,this._dir=w,this._formField=C,this._document=M,this._viewportRuler=P,this._defaults=O,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Ie.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Pe,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=Dg(()=>{const L=this.autocomplete?this.autocomplete.options:null;return L?L.changes.pipe(Ta(L),Rs(()=>Yr(...L.map(U=>U.onSelectionChange)))):this._zone.onStable.pipe(er(1),Rs(()=>this.optionSelections))}),this._handlePanelKeydown=L=>{(27===L.keyCode&&!io(L)||38===L.keyCode&&io(L,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),L.stopPropagation(),L.preventDefault())},this._trackedModal=null,this._scrollStrategy=l}ngAfterViewInit(){const t=this._getWindow();typeof t<"u"&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){const t=this._getWindow();typeof t<"u"&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._isOpen=this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal)&&Yg(this._trackedModal,"aria-owns",this.autocomplete.id)}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Yr(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(In(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(In(()=>this._overlayAttached)):vi()).pipe(Di(t=>t instanceof MH?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Yr(Sc(this._document,"click"),Sc(this._document,"auxclick"),Sc(this._document,"touchend")).pipe(In(t=>{const n=yl(t),r=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,s=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&n!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(n))&&(!s||!s.contains(n))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(n)}))}writeValue(t){Promise.resolve(null).then(()=>this._assignOptionValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){const n=t.keyCode,r=io(t);if(27===n&&!r&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&13===n&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){const s=this.autocomplete._keyManager.activeItem,o=38===n||40===n;9===n||o&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):o&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(o||this.autocomplete._keyManager.activeItem!==s)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(t){let n=t.target,r=n.value;if("number"===n.type&&(r=""==r?null:parseFloat(r)),this._previousValue!==r){if(this._previousValue=r,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(r),r){if(this.panelOpen&&!this.autocomplete.requireSelection){const s=this.autocomplete.options?.find(o=>o.selected);s&&r!==this._getDisplayValue(s.value)&&s.deselect(!1)}}else this._clearPreviousSelectedOption(null,!1);if(this._canOpen()&&this._document.activeElement===t.target){const s=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(s)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(t=!1){this._formField&&"auto"===this._formField.floatLabel&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return Yr(this._zone.onStable.pipe(er(1)),this.autocomplete.options.changes.pipe(hs(()=>this._positionStrategy.reapplyLastPosition()),ak(0))).pipe(Rs(()=>(this._zone.run(()=>{const r=this.panelOpen;this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit())}),this.panelClosingActions)),er(1)).subscribe(r=>this._setValueAndClose(r))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(t){const n=this.autocomplete;return n&&n.displayWith?n.displayWith(t):t}_assignOptionValue(t){const n=this._getDisplayValue(t);null==t&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(n??"")}_updateNativeInputValue(t){this._formField?this._formField._control.value=t:this._element.nativeElement.value=t,this._previousValue=t}_setValueAndClose(t){const n=this.autocomplete,r=t?t.source:this._pendingAutoselectedOption;r?(this._clearPreviousSelectedOption(r),this._assignOptionValue(r.value),this._onChange(r.value),n._emitSelectEvent(r),this._element.nativeElement.focus()):n.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),n._animationDone?n._animationDone.pipe(er(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(t,n){this.autocomplete?.options?.forEach(r=>{r!==t&&r.selected&&r.deselect(n)})}_openPanelInternal(t=this._element.nativeElement.value){this._attachOverlay(t),this._floatLabel(),this._trackedModal&&jT(this._trackedModal,"aria-owns",this.autocomplete.id)}_attachOverlay(t){let n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new su(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&n&&n.updateSize({width:this._getPanelWidth()})})),n&&!n.hasAttached()&&(n.attach(this._portal),this._valueOnAttach=t,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());const r=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&r!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){const t=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=t.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=t.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new qg({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){const t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){const n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,s=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];let o;o="above"===this.position?s:"below"===this.position?n:[...n,...s],t.withPositions(o)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){const t=this.autocomplete;if(t.autoActiveFirstOption){let n=-1;for(let r=0;r .cdk-overlay-container [aria-modal="true"]');if(!t)return;const n=this.autocomplete.id;this._trackedModal&&Yg(this._trackedModal,"aria-owns",n),jT(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(Yg(this._trackedModal,"aria-owns",this.autocomplete.id),this._trackedModal=null)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(xs),mt(Ir),mt(ii),mt(Mn),mt(BW),mt(Ba,8),mt(UC,9),mt(Ni,8),mt(ou),mt(NW,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(n,r){1&n&&Vt("focusin",function(){return r._handleFocus()})("blur",function(){return r._onTouched()})("input",function(o){return r._handleInput(o)})("keydown",function(o){return r._handleKeydown(o)})("click",function(){return r._handleClick()}),2&n&&Ti("autocomplete",r.autocompleteAttribute)("role",r.autocompleteDisabled?null:"combobox")("aria-autocomplete",r.autocompleteDisabled?null:"list")("aria-activedescendant",r.panelOpen&&r.activeOption?r.activeOption.id:null)("aria-expanded",r.autocompleteDisabled?null:r.panelOpen.toString())("aria-controls",r.autocompleteDisabled||!r.panelOpen||null==r.autocomplete?null:r.autocomplete.id)("aria-haspopup",r.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[Wt.None,"matAutocomplete","autocomplete"],position:[Wt.None,"matAutocompletePosition","position"],connectedTo:[Wt.None,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[Wt.None,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[Wt.HasDecoratorInputTransform,"matAutocompleteDisabled","autocompleteDisabled",Je]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[fi([kCt]),ln,tr]})}return e})(),OCt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[FCt],imports:[qf,eC,Ki,qc,lu,eC,Ki]})}return e})();const UW=Cc({passive:!0});let LCt=(()=>{class e{constructor(t,n){this._platform=t,this._ngZone=n,this._monitoredElements=new Map}monitor(t){if(!this._platform.isBrowser)return Zo;const n=vs(t),r=this._monitoredElements.get(n);if(r)return r.subject;const s=new Pe,o="cdk-text-field-autofilled",l=w=>{"cdk-text-field-autofill-start"!==w.animationName||n.classList.contains(o)?"cdk-text-field-autofill-end"===w.animationName&&n.classList.contains(o)&&(n.classList.remove(o),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!1}))):(n.classList.add(o),this._ngZone.run(()=>s.next({target:w.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{n.addEventListener("animationstart",l,UW),n.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(n,{subject:s,unlisten:()=>{n.removeEventListener("animationstart",l,UW)}}),s}stopMonitoring(t){const n=vs(t),r=this._monitoredElements.get(n);r&&(r.unlisten(),r.subject.complete(),n.classList.remove("cdk-text-field-autofill-monitored"),n.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(n))}ngOnDestroy(){this._monitoredElements.forEach((t,n)=>this.stopMonitoring(n))}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ir),Jt(ii))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),NCt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const BCt=new ee("MAT_INPUT_VALUE_ACCESSOR"),VCt=["button","checkbox","file","hidden","image","radio","range","reset","submit"];let UCt=0,Fh=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=la(t),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(t){this._id=t||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(vu.required)??!1}set required(t){this._required=la(t)}get type(){return this._type}set type(t){this._type=t||"text",this._validateType(),!this._isTextarea&&KG().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get value(){return this._inputValueAccessor.value}set value(t){t!==this.value&&(this._inputValueAccessor.value=t,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(t){this._readonly=la(t)}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,n,r,s,o,l,w,C,M,P){this._elementRef=t,this._platform=n,this.ngControl=r,this._autofillMonitor=C,this._formField=P,this._uid="mat-input-"+UCt++,this.focused=!1,this.stateChanges=new Pe,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(U=>KG().has(U)),this._iOSKeyupListener=U=>{const X=U.target;!X.value&&0===X.selectionStart&&0===X.selectionEnd&&(X.setSelectionRange(1,1),X.setSelectionRange(0,0))};const O=this._elementRef.nativeElement,L=O.nodeName.toLowerCase();this._inputValueAccessor=w||O,this._previousNativeValue=this.value,this.id=this.id,n.IOS&&M.runOutsideAngular(()=>{t.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._errorStateTracker=new GR(l,r,o,s,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===L,this._isTextarea="textarea"===L,this._isInFormField=!!P,this._isNativeSelect&&(this.controlType=O.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(t=>{this.autofilled=t.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(t){this._elementRef.nativeElement.focus(t)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(t){t!==this.focused&&(this.focused=t,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){const t=this._elementRef.nativeElement.value;this._previousNativeValue!==t&&(this._previousNativeValue=t,this.stateChanges.next())}_dirtyCheckPlaceholder(){const t=this._getPlaceholder();if(t!==this._previousPlaceholder){const n=this._elementRef.nativeElement;this._previousPlaceholder=t,t?n.setAttribute("placeholder",t):n.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){VCt.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let t=this._elementRef.nativeElement.validity;return t&&t.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){const t=this._elementRef.nativeElement,n=t.options[0];return this.focused||t.multiple||!this.empty||!!(t.selectedIndex>-1&&n&&n.label)}return this.focused||!this.empty}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){const t=this._elementRef.nativeElement;return this._isNativeSelect&&(t.multiple||t.size>1)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ir),mt(ld,10),mt(sm,8),mt(cd,8),mt(_H),mt(BCt,10),mt(LCt),mt(ii),mt(UC,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(n,r){1&n&&Vt("focus",function(){return r._focusChanged(!0)})("blur",function(){return r._focusChanged(!1)})("input",function(){return r._onInput()}),2&n&&(Kc("id",r.id)("disabled",r.disabled)("required",r.required),Ti("name",r.name||null)("readonly",r.readonly&&!r._isNativeSelect||null)("aria-invalid",r.empty&&r.required?null:r.errorState)("aria-required",r.required)("id",r.id),bi("mat-input-server",r._isServer)("mat-mdc-form-field-textarea-control",r._isInFormField&&r._isTextarea)("mat-mdc-form-field-input-control",r._isInFormField)("mdc-text-field__input",r._isInFormField)("mat-mdc-native-select-inline",r._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[Wt.None,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],standalone:!0,features:[fi([{provide:VC,useExisting:e}]),tr]})}return e})(),zCt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,zC,zC,NCt,Ki]})}return e})();function GCt(e,i){if(1&e&&(tt(0,"mat-label"),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.binding.title)}}function HCt(e,i){if(1&e){const t=ve();tt(0,"button",7),Vt("click",function(){return Ut(t),zt(Ct().clearInput())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function WCt(e,i){1&e&&(tt(0,"mat-option",8),we(1,"mat-spinner",9),et())}function XCt(e,i){if(1&e&&(tt(0,"mat-option",10)(1,"span",11),ut(2),et(),ut(3),et()),2&e){const t=i.$implicit;yt("value",t),lt(2),Ze(t.code),lt(),Ye("",t.display," ")}}let av=(()=>{class e{static#t=this.nextId=0;constructor(t){this.terminologyService=t,this.term="",this.selectionChange=new De,this.formControl=new mTt,this.loading=!1,this.selectedConcept={},this.stateChanges=new Pe,this.focused=!1,this.ngControl=null,this.errorState=!1,this.controlType="app-autocomplete-binding",this.id="app-autocomplete-binding-"+e.nextId++,this.describedBy="",this.onChange=()=>{},this.onTouched=()=>{}}get empty(){return!this.formControl.value}setDescribedByIds(t){this.describedBy=t.join(" ")}onContainerClick(t){}writeValue(t){this.formControl.setValue(t&&"object"==typeof t&&t.display?t.display:t,{emitEvent:!1})}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}ngOnChanges(t){t.term&&(this.term=t.term.currentValue,this.formControl.setValue(this.term&&"object"==typeof this.term&&this.term.display?this.term.display:this.term))}ngOnInit(){this.autoFilter=this.formControl.valueChanges.pipe(tu(300),eu(),Rs(t=>t?.length>=3?(this.loading=!0,this.terminologyService.expandValueSet(this.binding.ecl,t,0,50)):vi([])),hs(t=>{this.loading=!1}))}onTermChange(){this.formControl.setValue(this.term)}optionSelected(t){this.selectedConcept=t,this.selectionChange.emit(t),this.onChange(t)}clearInput(){this.formControl.reset(),this.selectedConcept={code:"",display:""},this.selectionChange.emit(this.selectedConcept)}change(t){const n=t?.option?.value;n&&(this.optionSelected({code:n.code,display:n.display}),this.formControl.setValue(n.display))}static#e=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#i=this.\u0275cmp=je({type:e,selectors:[["app-autocomplete-binding"]],inputs:{binding:"binding",term:"term"},outputs:{selectionChange:"selectionChange"},features:[fi([{provide:ua,useExisting:Sn(()=>e),multi:!0},{provide:VC,useExisting:e}]),tr],decls:11,vars:10,consts:[["auto","matAutocomplete"],[4,"ngIf"],["type","text","matInput","",3,"placeholder","formControl","matAutocomplete"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["autoActiveFirstOption","",3,"optionSelected"],["disabled","","class","loading",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["disabled","",1,"loading"],["diameter","35"],[3,"value"],[1,"code"]],template:function(n,r){if(1&n){const s=ve();tt(0,"mat-form-field"),Gt(1,GCt,2,1,"mat-label",1),we(2,"input",2),tt(3,"mat-hint"),ut(4),et(),Gt(5,HCt,3,0,"button",3),tt(6,"mat-autocomplete",4,0),Vt("optionSelected",function(l){return Ut(s),zt(r.change(l))}),Gt(8,WCt,2,0,"mat-option",5)(9,XCt,4,3,"mat-option",6),sa(10,"async"),et()()}if(2&n){let s;const o=qi(7);lt(),yt("ngIf",r.binding.title),lt(),hh("placeholder",(null==r.formControl.value?null:r.formControl.value.display)||r.binding.title||"Search..."),yt("formControl",r.formControl)("matAutocomplete",o),lt(2),Ze(r.binding.note),lt(),yt("ngIf",r.formControl.value),lt(3),yt("ngIf",r.loading),lt(),yt("ngForOf",null==(s=xc(10,8,r.autoFilter))||null==s.expansion?null:s.expansion.contains)}},dependencies:[gs,Ms,Oo,da,Xl,wl,om,DW,RCt,nu,VW,Eh,Fh,Hl,No,Uy,wI],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}.id-icon[_ngcontent-%COMP%]{margin-left:10px;color:#2e8b57}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();function jCt(e,i){1&e&&we(0,"mat-spinner",20)}function YCt(e,i){1&e&&(tt(0,"th",21),ut(1," Date "),et())}function $Ct(e,i){if(1&e&&(tt(0,"td",22),ut(1),sa(2,"date"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",Xd(2,1,t.date,"yyyy-MM-dd")," ")}}function QCt(e,i){1&e&&(tt(0,"th",21),ut(1," ConceptId "),et())}function KCt(e,i){if(1&e&&(tt(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.code," ")}}function ZCt(e,i){1&e&&(tt(0,"th",21),ut(1," Term "),et())}function JCt(e,i){1&e&&(tt(0,"span",24),ut(1,"Allergy / Intolerance condition"),et())}function qCt(e,i){if(1&e&&(tt(0,"td",22),Gt(1,JCt,2,0,"span",23),ut(2),et()),2&e){const t=i.$implicit;lt(),yt("ngIf",t.allergy),lt(),Ye(" ",t.display," ")}}function tSt(e,i){1&e&&we(0,"tr",25)}function eSt(e,i){1&e&&we(0,"tr",26)}function iSt(e,i){1&e&&(tt(0,"th",21),ut(1," ConceptId "),et())}function nSt(e,i){if(1&e&&(tt(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.code," ")}}function rSt(e,i){1&e&&(tt(0,"th",21),ut(1," Term "),et())}function sSt(e,i){if(1&e&&(tt(0,"td",22),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.display," ")}}function aSt(e,i){1&e&&we(0,"tr",25)}function oSt(e,i){1&e&&we(0,"tr",26)}const lSt=[],cSt=[];let zW=(()=>{class e{constructor(t){this.terminologyService=t,this.problemBinding={ecl:"< 404684003 |Clinical finding|",title:"Search..."},this.eclProblem="< 404684003 |Clinical finding|",this.term="",this.displayedColumns=["date","code","display"],this.dataToDisplay=[...lSt],this.dataSource=new dSt(this.dataToDisplay),this.loading=!1,this.displayedColumns2=["code","display"],this.dataToDisplay2=[...cSt],this.dataSource2=new uSt(this.dataToDisplay2)}updateProblem(t){var n=this;return de(function*(){n.selectedProblemSct=t})()}addProblem(t){var n=this;return de(function*(){if(n.selectedProblemSct||t){let r=t||n.selectedProblemSct;if(n.loading=!0,n.term=r.display,r.date=new Date,r.code.indexOf(":")>-1){r.allergy=!0;let s=r.substance;n.dataToDisplay2.find(o=>o.code===s.code)||(n.dataToDisplay2=[...n.dataToDisplay2,s],n.dataSource2.setData(n.dataToDisplay2))}else(yield n.getAllergyData(r))?.expansion?.contains?.length>0&&(r.allergy=!0,n.addAllergySubstanceToList(r));n.dataToDisplay.find(s=>s.code===r.code)||(n.dataToDisplay=[...n.dataToDisplay,r],n.dataSource.setData(n.dataToDisplay)),n.loading=!1,n.term=""}})()}addAllergySubstanceToList(t){var n=this;return de(function*(){(yield n.getAllergySubstance(t))?.expansion?.contains?.forEach(s=>{n.dataToDisplay2.find(o=>o.code===s.code)||(n.dataToDisplay2=[...n.dataToDisplay2,s],n.dataSource2.setData(n.dataToDisplay2))})})()}getAllergyData(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet("<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",t.code,0,1)).pipe(Di(s=>s)))})()}getAllergySubstance(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . (246075003 |Causative agent (attribute)| OR 47429007 |Associated with (attribute)|)`,"")).pipe(Di(s=>s)))})()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies-problem-list"]],decls:60,vars:11,consts:[["substancePopoverMenu","matMenu"],["id","main-card"],[1,"container-space"],[1,"problem-list"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],[1,"container"],[1,"item"],[3,"selectionChange","binding","term"],["mat-flat-button","","color","primary",3,"click"],["diameter","35",4,"ngIf"],["mat-table","",3,"dataSource"],["matColumnDef","date"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","code"],["matColumnDef","display"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35"],["mat-header-cell",""],["mat-cell",""],["class","tag pill",4,"ngIf"],[1,"tag","pill"],["mat-header-row",""],["mat-row",""]],template:function(n,r){if(1&n){const s=ve();tt(0,"mat-card",1)(1,"div",2)(2,"div",3)(3,"h4"),ut(4,"Problem List "),tt(5,"button",4)(6,"mat-icon"),ut(7,"info"),et()(),tt(8,"mat-menu",null,0)(10,"span",5),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(11,"h4"),ut(12,"Problem list"),et(),tt(13,"p"),ut(14,"Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),et(),tt(15,"p"),ut(16,"For practical guidance using SNOMED CT to document hypersensitivity to specific substances in a problem list, it is suggested to map to the appropriate concepts under the 473011001 |Allergic condition (finding)|hierarchies. This is due to the lack of sufficient content under 609433001 |Hypersensitivity disposition (finding)|and 421961002 |Hypersensitivity reaction (disorder)| and that many of the concepts under 609328004 |Allergic disposition (finding)|and 419076005 |Allergic reaction (disorder)| have unclear mechanisms which may actually represent non-allergic hypersensitivity. Please note that SNOMED international does not plan to create new children concepts of hypersensitivity disposition to specific substances unless more than one Member country would submit a request for them to answer to an active use-case."),et(),tt(17,"p"),ut(18,"Almost all allergy concepts are modeled by substances in SNOMED CT. A very small number of allergy concepts are modeled by products but with explicit description for the specific intended meaning. Records of allergy to multiple substances or to multi-ingredient products should be recoded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),et(),tt(19,"p"),ut(20,"Vaccine allergy is an example where allergy concepts are modeled using a product concept. For example, \u2018Allergy to component of vaccine product (finding)\u2019 with a synonym \u2018vaccine allergy\u2019 has been modeled by vaccine product. The concept represents that allergy is caused by any substance in a vaccine product."),et(),tt(21,"p"),ut(22,"To record the level of certainty or verification status, it is recommended to use additional data elements in the EHR information model. Even though it is possible to utilize the SNOMED CT model for \u2018situation with explicit context\u2019 to express certainty, this is not recommended due to potential ambiguity. For example, \u201csuspected penicillin allergy\u201d can mean uncertainty with the condition (is it real allergy?) or with the causative agent (is it penicillin?). Even though SNOMED CT editorial guideline is clear that the first interpretation is correct, it is better to use other methods to represent the uncertainty to avoid confusion."),et(),tt(23,"p"),ut(24,"For more information check the "),tt(25,"a",6),ut(26,"Implementation Guide"),et(),ut(27," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),tt(28,"div",7)(29,"div",8)(30,"app-autocomplete-binding",9),Vt("selectionChange",function(l){return Ut(s),zt(r.updateProblem(l))}),et()(),tt(31,"div",8)(32,"button",10),Vt("click",function(){return Ut(s),zt(r.addProblem())}),ut(33,"Add problem"),et()(),tt(34,"div",8),Gt(35,jCt,1,0,"mat-spinner",11),et()(),tt(36,"table",12),Wi(37,13),Gt(38,YCt,2,0,"th",14)(39,$Ct,3,4,"td",15),Xi(),Wi(40,16),Gt(41,QCt,2,0,"th",14)(42,KCt,2,1,"td",15),Xi(),Wi(43,17),Gt(44,ZCt,2,0,"th",14)(45,qCt,3,2,"td",15),Xi(),Gt(46,tSt,1,0,"tr",18)(47,eSt,1,0,"tr",19),et()(),tt(48,"div",3)(49,"h4"),ut(50,"Substances the patient is allergic to:"),et(),tt(51,"table",12),Wi(52,16),Gt(53,iSt,2,0,"th",14)(54,nSt,2,1,"td",15),Xi(),Wi(55,17),Gt(56,rSt,2,0,"th",14)(57,sSt,2,1,"td",15),Xi(),Gt(58,aSt,1,0,"tr",18)(59,oSt,1,0,"tr",19),et()()()()}if(2&n){const s=qi(9);lt(5),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(20),yt("binding",r.problemBinding)("term",r.term),lt(5),yt("ngIf",r.loading),lt(),yt("dataSource",r.dataSource),lt(10),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(4),yt("dataSource",r.dataSource2),lt(7),yt("matHeaderRowDef",r.displayedColumns2),lt(),yt("matRowDefColumns",r.displayedColumns2)}},dependencies:[Ms,Sa,Oo,da,bl,Gl,cu,Eh,vC,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,av,gh],styles:["#main-card[_ngcontent-%COMP%]{padding:10px}app-autocomplete-binding[_ngcontent-%COMP%]{display:block;min-width:500px}.container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;margin:10px 0;gap:10px}.container-space[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start;margin:10px 0;gap:10px}.problem-list[_ngcontent-%COMP%]{width:60%}.tag[_ngcontent-%COMP%]{position:absolute;top:0;right:0;padding-left:10px;padding-right:10px;margin-top:5px}td[_ngcontent-%COMP%]{position:relative}.pill[_ngcontent-%COMP%]{display:inline-block;font-size:10px;background-color:orange;color:#fff;padding:4px 8px;border-radius:20px;position:absolute;top:0;right:0;margin-top:1rem}.mat-column-display[_ngcontent-%COMP%]{min-width:350px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return e})();class dSt extends OT{constructor(i){super(),this._dataStream=new py,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}}class uSt extends OT{constructor(i){super(),this._dataStream=new py,this.setData(i)}connect(){return this._dataStream}disconnect(){}setData(i){this._dataStream.next(i)}}const Vk=["*"];function hSt(e,i){1&e&&xi(0)}const fSt=["tabListContainer"],mSt=["tabList"],pSt=["tabListInner"],gSt=["nextPaginator"],vSt=["previousPaginator"],xSt=e=>({animationDuration:e}),ySt=(e,i)=>({value:e,params:i});function bSt(e,i){}const wSt=["tabBodyWrapper"],_St=["tabHeader"];function TSt(e,i){}function CSt(e,i){1&e&&Gt(0,TSt,0,0,"ng-template",12),2&e&&yt("cdkPortalOutlet",Ct().$implicit.templateLabel)}function SSt(e,i){1&e&&ut(0),2&e&&Ze(Ct().$implicit.textLabel)}function ESt(e,i){if(1&e){const t=ve();tt(0,"div",7,2),Vt("click",function(){const r=Ut(t),s=r.$implicit,o=r.$index,l=Ct(),w=qi(1);return zt(l._handleClick(s,w,o))})("cdkFocusChange",function(r){const s=Ut(t).$index;return zt(Ct()._tabFocusChanged(r,s))}),we(2,"span",8)(3,"div",9),tt(4,"span",10)(5,"span",11),Gt(6,CSt,1,1,null,12)(7,SSt,1,1),et()()()}if(2&e){const t=i.$implicit,n=i.$index,r=qi(1),s=Ct();bi("mdc-tab--active",s.selectedIndex===n),yt("id",s._getTabLabelId(n))("ngClass",t.labelClass)("disabled",t.disabled)("fitInkBarToContent",s.fitInkBarToContent),Ti("tabIndex",s._getTabIndex(n))("aria-posinset",n+1)("aria-setsize",s._tabs.length)("aria-controls",s._getTabContentId(n))("aria-selected",s.selectedIndex===n)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null),lt(3),yt("matRippleTrigger",r)("matRippleDisabled",t.disabled||s.disableRipple),lt(3),xn(6,t.templateLabel?6:7)}}function ASt(e,i){1&e&&xi(0)}function DSt(e,i){if(1&e){const t=ve();tt(0,"mat-tab-body",13),Vt("_onCentered",function(){return Ut(t),zt(Ct()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return Ut(t),zt(Ct()._setTabBodyWrapperHeight(r))}),et()}if(2&e){const t=i.$implicit,n=i.$index,r=Ct();bi("mat-mdc-tab-body-active",r.selectedIndex===n),yt("id",r._getTabContentId(n))("ngClass",t.bodyClass)("content",t.content)("position",t.position)("origin",t.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),Ti("tabindex",null!=r.contentTabIndex&&r.selectedIndex===n?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(n))("aria-hidden",r.selectedIndex!==n)}}const MSt=new ee("MatTabContent");let ISt=(()=>{class e{constructor(t){this.template=t}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTabContent",""]],standalone:!0,features:[fi([{provide:MSt,useExisting:e}])]})}return e})();const RSt=new ee("MatTabLabel"),GW=new ee("MAT_TAB");let kSt=(()=>{class e extends $1t{constructor(t,n,r){super(t,n),this._closestTab=r}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(Ir),mt(GW,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],standalone:!0,features:[fi([{provide:RSt,useExisting:e}]),hi]})}return e})();const HW=new ee("MAT_TAB_GROUP");let zy=(()=>{class e{get templateLabel(){return this._templateLabel}set templateLabel(t){this._setTemplateLabelInput(t)}get content(){return this._contentPortal}constructor(t,n){this._viewContainerRef=t,this._closestTabGroup=n,this.disabled=!1,this._explicitContent=void 0,this.textLabel="",this._contentPortal=null,this._stateChanges=new Pe,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new su(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(t){t&&t._closestTab===this&&(this._templateLabel=t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ir),mt(HW,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab"]],contentQueries:function(n,r,s){if(1&n&&(An(s,kSt,5),An(s,ISt,7,fr)),2&n){let o;Be(o=Ve())&&(r.templateLabel=o.first),Be(o=Ve())&&(r._explicitContent=o.first)}},viewQuery:function(n,r){if(1&n&&Mi(fr,7),2&n){let s;Be(s=Ve())&&(r._implicitContent=s.first)}},hostAttrs:["hidden",""],inputs:{disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],textLabel:[Wt.None,"label","textLabel"],ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},exportAs:["matTab"],standalone:!0,features:[fi([{provide:GW,useExisting:e}]),ln,tr,Vi],ngContentSelectors:Vk,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),Gt(0,hSt,1,0,"ng-template"))},encapsulation:2})}return e})();const Uk="mdc-tab-indicator--active",WW="mdc-tab-indicator--no-transition";class PSt{constructor(i){this._items=i}hide(){this._items.forEach(i=>i.deactivateInkBar())}alignToElement(i){const t=this._items.find(r=>r.elementRef.nativeElement===i),n=this._currentItem;if(t!==n&&(n?.deactivateInkBar(),t)){const r=n?.elementRef.nativeElement.getBoundingClientRect?.();t.activateInkBar(r),this._currentItem=t}}}let FSt=(()=>{class e{constructor(){this._elementRef=me(si),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){this._fitToContent!==t&&(this._fitToContent=t,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){const n=this._elementRef.nativeElement;if(!t||!n.getBoundingClientRect||!this._inkBarContentElement)return void n.classList.add(Uk);const r=n.getBoundingClientRect(),s=t.width/r.width,o=t.left-r.left;n.classList.add(WW),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${s})`),n.getBoundingClientRect(),n.classList.remove(WW),n.classList.add(Uk),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this._elementRef.nativeElement.classList.remove(Uk)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){const t=this._elementRef.nativeElement.ownerDocument||document,n=this._inkBarElement=t.createElement("span"),r=this._inkBarContentElement=t.createElement("span");n.className="mdc-tab-indicator",r.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",n.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){(this._fitToContent?this._elementRef.nativeElement.querySelector(".mdc-tab__content"):this._elementRef.nativeElement).appendChild(this._inkBarElement)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,inputs:{fitInkBarToContent:[Wt.HasDecoratorInputTransform,"fitInkBarToContent","fitInkBarToContent",Je]},features:[ln]})}return e})(),XW=(()=>{class e extends FSt{constructor(t){super(),this.elementRef=t,this.disabled=!1}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(n,r){2&n&&(Ti("aria-disabled",!!r.disabled),bi("mat-mdc-tab-disabled",r.disabled))},inputs:{disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},standalone:!0,features:[ln,hi]})}return e})();const jW=Cc({passive:!0});let BSt=(()=>{class e{get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const n=isNaN(t)?0:t;this._selectedIndex!=n&&(this._selectedIndexChanged=!0,this._selectedIndex=n,this._keyManager&&this._keyManager.updateActiveItem(n))}constructor(t,n,r,s,o,l,w){this._elementRef=t,this._changeDetectorRef=n,this._viewportRuler=r,this._dir=s,this._ngZone=o,this._platform=l,this._animationMode=w,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Pe,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Pe,this.disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new De,this.indexFocused=new De,o.runOutsideAngular(()=>{Sc(t.nativeElement,"mouseleave").pipe(Ui(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){Sc(this._previousPaginator.nativeElement,"touchstart",jW).pipe(Ui(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),Sc(this._nextPaginator.nativeElement,"touchstart",jW).pipe(Ui(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){const t=this._dir?this._dir.change:vi("ltr"),n=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new VR(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(er(1)).subscribe(r),Yr(t,n,this._items.changes,this._itemsResized()).pipe(Ui(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(s=>{this.indexFocused.emit(s),this._setTabFocus(s)})}_itemsResized(){return"function"!=typeof ResizeObserver?Zo:this._items.changes.pipe(Ta(this._items),Rs(t=>new ur(n=>this._ngZone.runOutsideAngular(()=>{const r=new ResizeObserver(s=>n.next(s));return t.forEach(s=>r.observe(s.elementRef.nativeElement)),()=>{r.disconnect()}}))),OR(1),In(t=>t.some(n=>n.contentRect.width>0&&n.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(t){if(!io(t))switch(t.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){const n=this._items.get(this.focusIndex);n&&!n.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t))}break;default:this._keyManager.onKeydown(t)}}_onContentChanges(){const t=this._elementRef.nativeElement.textContent;t!==this._currentTextContent&&(this._currentTextContent=t||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(t){!this._isValidIndex(t)||this.focusIndex===t||!this._keyManager||this._keyManager.setActiveItem(t)}_isValidIndex(t){return!this._items||!!this._items.toArray()[t]}_setTabFocus(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();const n=this._tabListContainer.nativeElement;n.scrollLeft="ltr"==this._getLayoutDirection()?0:n.scrollWidth-n.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;const t=this.scrollDistance,n="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform=`translateX(${Math.round(n)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(t){this._scrollTo(t)}_scrollHeader(t){return this._scrollTo(this._scrollDistance+("before"==t?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(t){this._stopInterval(),this._scrollHeader(t)}_scrollToLabel(t){if(this.disablePagination)return;const n=this._items?this._items.toArray()[t]:null;if(!n)return;const r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:s,offsetWidth:o}=n.elementRef.nativeElement;let l,w;"ltr"==this._getLayoutDirection()?(l=s,w=l+o):(w=this._tabListInner.nativeElement.offsetWidth-s,l=w-o);const C=this.scrollDistance,M=this.scrollDistance+r;lM&&(this.scrollDistance+=Math.min(w-M,l-C))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{const t=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){const t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,n=t?t.elementRef.nativeElement:null;n?this._inkBar.alignToElement(n):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(t,n){n&&null!=n.button&&0!==n.button||(this._stopInterval(),Iy(650,100).pipe(Ui(Yr(this._stopScrolling,this._destroyed))).subscribe(()=>{const{maxScrollDistance:r,distance:s}=this._scrollHeader(t);(0===s||s>=r)&&this._stopInterval()}))}_scrollTo(t){if(this.disablePagination)return{maxScrollDistance:0,distance:0};const n=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(n,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:n,distance:this._scrollDistance}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Mn),mt(ou),mt(Ba,8),mt(ii),mt(ir),mt(Nr,8))};static#e=this.\u0275dir=ce({type:e,inputs:{disablePagination:[Wt.HasDecoratorInputTransform,"disablePagination","disablePagination",Je],selectedIndex:[Wt.HasDecoratorInputTransform,"selectedIndex","selectedIndex",jr]},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[ln]})}return e})(),VSt=(()=>{class e extends BSt{constructor(t,n,r,s,o,l,w){super(t,n,r,s,o,l,w),this.disableRipple=!1}ngAfterContentInit(){this._inkBar=new PSt(this._items),super.ngAfterContentInit()}_itemSelected(t){t.preventDefault()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Mn),mt(ou),mt(Ba,8),mt(ii),mt(ir),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab-header"]],contentQueries:function(n,r,s){if(1&n&&An(s,XW,4),2&n){let o;Be(o=Ve())&&(r._items=o)}},viewQuery:function(n,r){if(1&n&&(Mi(fSt,7),Mi(mSt,7),Mi(pSt,7),Mi(gSt,5),Mi(vSt,5)),2&n){let s;Be(s=Ve())&&(r._tabListContainer=s.first),Be(s=Ve())&&(r._tabList=s.first),Be(s=Ve())&&(r._tabListInner=s.first),Be(s=Ve())&&(r._nextPaginator=s.first),Be(s=Ve())&&(r._previousPaginator=s.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(n,r){2&n&&bi("mat-mdc-tab-header-pagination-controls-enabled",r._showPaginationControls)("mat-mdc-tab-header-rtl","rtl"==r._getLayoutDirection())},inputs:{disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je]},standalone:!0,features:[ln,hi,Vi],ngContentSelectors:Vk,decls:13,vars:10,consts:[["previousPaginator",""],["tabListContainer",""],["tabList",""],["tabListInner",""],["nextPaginator",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"click","mousedown","touchend","matRippleDisabled","disabled"],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],[1,"mat-mdc-tab-labels"],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"mousedown","click","touchend","matRippleDisabled","disabled"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"button",5,0),Vt("click",function(){return Ut(s),zt(r._handlePaginatorClick("before"))})("mousedown",function(l){return Ut(s),zt(r._handlePaginatorPress("before",l))})("touchend",function(){return Ut(s),zt(r._stopInterval())}),we(2,"div",6),et(),tt(3,"div",7,1),Vt("keydown",function(l){return Ut(s),zt(r._handleKeydown(l))}),tt(5,"div",8,2),Vt("cdkObserveContent",function(){return Ut(s),zt(r._onContentChanges())}),tt(7,"div",9,3),xi(9),et()()(),tt(10,"button",10,4),Vt("mousedown",function(l){return Ut(s),zt(r._handlePaginatorPress("after",l))})("click",function(){return Ut(s),zt(r._handlePaginatorClick("after"))})("touchend",function(){return Ut(s),zt(r._stopInterval())}),we(12,"div",6),et()}2&n&&(bi("mat-mdc-tab-header-pagination-disabled",r._disableScrollBefore),yt("matRippleDisabled",r._disableScrollBefore||r.disableRipple)("disabled",r._disableScrollBefore||null),lt(3),bi("_mat-animation-noopable","NoopAnimations"===r._animationMode),lt(7),bi("mat-mdc-tab-header-pagination-disabled",r._disableScrollAfter),yt("matRippleDisabled",r._disableScrollAfter||r.disableRipple)("disabled",r._disableScrollAfter||null))},dependencies:[iu,eH],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color)}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color)}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height);border-top-color:var(--mat-tab-header-divider-color)}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2})}return e})();const USt=new ee("MAT_TABS_CONFIG"),zSt={translateTab:mr("translateTab",[Rn("center, void, left-origin-center, right-origin-center",qe({transform:"none"})),Rn("left",qe({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),Rn("right",qe({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),on("* => left, * => right, left => center, right => center",sn("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),on("void => left-origin-center",[qe({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),sn("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),on("void => right-origin-center",[qe({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),sn("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])};let GSt=(()=>{class e extends au{constructor(t,n,r,s){super(t,n,s),this._host=r,this._centeringSub=Ie.EMPTY,this._leavingSub=Ie.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(Ta(this._host._isCenterPosition(this._host._position))).subscribe(t=>{t&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Of),mt(Ir),mt(Sn(()=>YW)),mt(Ni))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTabBodyHost",""]],standalone:!0,features:[hi]})}return e})(),YW=(()=>{class e{set position(t){this._positionIndex=t,this._computePositionAnimationState()}constructor(t,n,r){this._elementRef=t,this._dir=n,this._dirChangeSubscription=Ie.EMPTY,this._translateTabComplete=new Pe,this._onCentering=new De,this._beforeCentering=new De,this._afterLeavingCenter=new De,this._onCentered=new De(!0),this.animationDuration="500ms",this.preserveContent=!1,n&&(this._dirChangeSubscription=n.change.subscribe(s=>{this._computePositionAnimationState(s),r.markForCheck()})),this._translateTabComplete.pipe(eu((s,o)=>s.fromState===o.fromState&&s.toState===o.toState)).subscribe(s=>{this._isCenterPosition(s.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(s.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(t){const n=this._isCenterPosition(t.toState);this._beforeCentering.emit(n),n&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t}_computePositionAnimationState(t=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==t?"left":"right":this._positionIndex>0?"ltr"==t?"right":"left":"center"}_computePositionFromOrigin(t){const n=this._getLayoutDirection();return"ltr"==n&&t<=0||"rtl"==n&&t>0?"left-origin-center":"right-origin-center"}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Ba,8),mt(Mn))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab-body"]],viewQuery:function(n,r){if(1&n&&Mi(au,5),2&n){let s;Be(s=Ve())&&(r._portalHost=s.first)}},hostAttrs:[1,"mat-mdc-tab-body"],inputs:{_content:[Wt.None,"content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"},standalone:!0,features:[Vi],decls:3,vars:6,consts:[["content",""],["cdkScrollable","",1,"mat-mdc-tab-body-content"],["matTabBodyHost",""]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1,0),Vt("@translateTab.start",function(l){return Ut(s),zt(r._onTranslateTabStarted(l))})("@translateTab.done",function(l){return Ut(s),zt(r._translateTabComplete.next(l))}),Gt(2,bSt,0,0,"ng-template",2),et()}2&n&&yt("@translateTab",UM(3,ySt,r._position,vc(1,xSt,r.animationDuration)))},dependencies:[GSt,lC],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[zSt.translateTab]}})}return e})(),HSt=0,ov=(()=>{class e{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(t){this._fitInkBarToContent=t,this._changeDetectorRef.markForCheck()}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){this._indexToSelect=isNaN(t)?null:t}get animationDuration(){return this._animationDuration}set animationDuration(t){const n=t+"";this._animationDuration=/^\d+$/.test(n)?t+"ms":n}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(t){this._contentTabIndex=isNaN(t)?null:t}get backgroundColor(){return this._backgroundColor}set backgroundColor(t){const n=this._elementRef.nativeElement.classList;n.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),t&&n.add("mat-tabs-with-background",`mat-background-${t}`),this._backgroundColor=t}constructor(t,n,r,s){this._elementRef=t,this._changeDetectorRef=n,this._animationMode=s,this._tabs=new nh,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=Ie.EMPTY,this._tabLabelSubscription=Ie.EMPTY,this._fitInkBarToContent=!1,this.stretchTabs=!0,this.dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this.disablePagination=!1,this.disableRipple=!1,this.preserveContent=!1,this.selectedIndexChange=new De,this.focusChange=new De,this.animationDone=new De,this.selectedTabChange=new De(!0),this._isServer=!me(ir).isBrowser,this._groupId=HSt++,this.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",this.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,this.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,null!=r?.contentTabIndex&&(this.contentTabIndex=r.contentTabIndex),this.preserveContent=!!r?.preserveContent,this.fitInkBarToContent=!(!r||null==r.fitInkBarToContent)&&r.fitInkBarToContent,this.stretchTabs=!r||null==r.stretchTabs||r.stretchTabs}ngAfterContentChecked(){const t=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=t){const n=null==this._selectedIndex;if(!n){this.selectedTabChange.emit(this._createChangeEvent(t));const r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,s)=>r.isActive=s===t),n||(this.selectedIndexChange.emit(t),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((n,r)=>{n.position=r-t,null!=this._selectedIndex&&0==n.position&&!n.origin&&(n.origin=t-this._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{const t=this._clampTabIndex(this._indexToSelect);if(t===this._selectedIndex){const n=this._tabs.toArray();let r;for(let s=0;s{n[t].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(t))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(Ta(this._allTabs)).subscribe(t=>{this._tabs.reset(t.filter(n=>n._closestTabGroup===this||!n._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(t){const n=this._tabHeader;n&&(n.focusIndex=t)}_focusChanged(t){this._lastFocusedTabIndex=t,this.focusChange.emit(this._createChangeEvent(t))}_createChangeEvent(t){const n=new XSt;return n.index=t,this._tabs&&this._tabs.length&&(n.tab=this._tabs.toArray()[t]),n}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=Yr(...this._tabs.map(t=>t._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))}_getTabLabelId(t){return`mat-tab-label-${this._groupId}-${t}`}_getTabContentId(t){return`mat-tab-content-${this._groupId}-${t}`}_setTabBodyWrapperHeight(t){if(!this.dynamicHeight||!this._tabBodyWrapperHeight)return;const n=this._tabBodyWrapper.nativeElement;n.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(n.style.height=t+"px")}_removeTabBodyWrapperHeight(){const t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this.animationDone.emit()}_handleClick(t,n,r){n.focusIndex=r,t.disabled||(this.selectedIndex=r)}_getTabIndex(t){return t===(this._lastFocusedTabIndex??this.selectedIndex)?0:-1}_tabFocusChanged(t,n){t&&"mouse"!==t&&"touch"!==t&&(this._tabHeader.focusIndex=n)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Mn),mt(USt,8),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tab-group"]],contentQueries:function(n,r,s){if(1&n&&An(s,zy,5),2&n){let o;Be(o=Ve())&&(r._allTabs=o)}},viewQuery:function(n,r){if(1&n&&(Mi(wSt,5),Mi(_St,5)),2&n){let s;Be(s=Ve())&&(r._tabBodyWrapper=s.first),Be(s=Ve())&&(r._tabHeader=s.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:10,hostBindings:function(n,r){2&n&&(Ll("mat-"+(r.color||"primary")),Ds("--mat-tab-animation-duration",r.animationDuration),bi("mat-mdc-tab-group-dynamic-height",r.dynamicHeight)("mat-mdc-tab-group-inverted-header","below"===r.headerPosition)("mat-mdc-tab-group-stretch-tabs",r.stretchTabs))},inputs:{color:"color",fitInkBarToContent:[Wt.HasDecoratorInputTransform,"fitInkBarToContent","fitInkBarToContent",Je],stretchTabs:[Wt.HasDecoratorInputTransform,"mat-stretch-tabs","stretchTabs",Je],dynamicHeight:[Wt.HasDecoratorInputTransform,"dynamicHeight","dynamicHeight",Je],selectedIndex:[Wt.HasDecoratorInputTransform,"selectedIndex","selectedIndex",jr],headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:[Wt.HasDecoratorInputTransform,"contentTabIndex","contentTabIndex",jr],disablePagination:[Wt.HasDecoratorInputTransform,"disablePagination","disablePagination",Je],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],preserveContent:[Wt.HasDecoratorInputTransform,"preserveContent","preserveContent",Je],backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},exportAs:["matTabGroup"],standalone:!0,features:[fi([{provide:HW,useExisting:e}]),ln,Vi],ngContentSelectors:Vk,decls:9,vars:6,consts:[["tabHeader",""],["tabBodyWrapper",""],["tabNode",""],[3,"indexFocused","selectFocusedIndex","selectedIndex","disableRipple","disablePagination"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","mdc-tab--active","ngClass","disabled","fitInkBarToContent"],[1,"mat-mdc-tab-body-wrapper"],["role","tabpanel",3,"id","mat-mdc-tab-body-active","ngClass","content","position","origin","animationDuration","preserveContent"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"click","cdkFocusChange","id","ngClass","disabled","fitInkBarToContent"],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"cdkPortalOutlet"],["role","tabpanel",3,"_onCentered","_onCentering","id","ngClass","content","position","origin","animationDuration","preserveContent"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"mat-tab-header",3,0),Vt("indexFocused",function(l){return Ut(s),zt(r._focusChanged(l))})("selectFocusedIndex",function(l){return Ut(s),zt(r.selectedIndex=l)}),O_(2,ESt,8,16,"div",4,F_),et(),Gt(4,ASt,1,0),tt(5,"div",5,1),O_(7,DSt,1,12,"mat-tab-body",6,F_),et()}2&n&&(yt("selectedIndex",r.selectedIndex||0)("disableRipple",r.disableRipple)("disablePagination",r.disablePagination),lt(2),L_(r._tabs),lt(2),xn(4,r._isServer?4:-1),lt(),bi("_mat-animation-noopable","NoopAnimations"===r._animationMode),lt(2),L_(r._tabs))},dependencies:[VSt,XW,r1t,bc,iu,au,YW],styles:['.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;font-family:var(--mat-tab-header-label-text-font);font-size:var(--mat-tab-header-label-text-size);letter-spacing:var(--mat-tab-header-label-text-tracking);line-height:var(--mat-tab-header-label-text-line-height);font-weight:var(--mat-tab-header-label-text-weight)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-top-width:var(--mdc-tab-indicator-active-indicator-height)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab:not(.mdc-tab--stacked){height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab:not(:disabled).mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color)}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color)}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color);display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2})}return e})();class XSt{}let jSt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})();var dd=ps(578);class YSt{constructor(i,t){this._document=t;const n=this._textarea=this._document.createElement("textarea"),r=n.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",n.setAttribute("aria-hidden","true"),n.value=i,n.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(n)}copy(){const i=this._textarea;let t=!1;try{if(i){const n=this._document.activeElement;i.select(),i.setSelectionRange(0,i.value.length),t=this._document.execCommand("copy"),n&&n.focus()}}catch{}return t}destroy(){const i=this._textarea;i&&(i.remove(),this._textarea=void 0)}}let zk=(()=>{class e{constructor(t){this._document=t}copy(t){const n=this.beginCopy(t),r=n.copy();return n.destroy(),r}beginCopy(t){return new YSt(t,this._document)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const $St=new ee("HighlightJs-Config");let GC=(()=>{class e{constructor(t,n,r,s,o){this.el=t,this.ngModel=n,this.doc=r,this.ngZone=o,this.lang="html",this.mode="simple",Object.assign(this,s)}escapeHTML(t){return(t||"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}init(){this.ngZone.runOutsideAngular(()=>{this.destroy();const t=this.el.nativeElement,n=this.code||""+t.innerHTML.trim();if(this.codeEl=this.doc.createElement("default"===this.mode?"div":"pre"),null==this.codeEl)return;const r="simple"===this.mode;r?(this.lang&&(this.codeEl.className=this.lang),this.parentEl=t.parentNode,this.parentEl.insertBefore(this.codeEl,t.nextSibling)):(this.parentEl=t,this.parentEl.innerHTML="",this.parentEl.appendChild(this.codeEl)),this.codeEl.innerHTML=n,hljs.configure({...this.options}),r?hljs.highlightElement(this.codeEl):this.codeEl.querySelectorAll("pre code").forEach(s=>{hljs.highlightElement(s)})})}destroy(){this.codeEl&&this.parentEl&&(this.parentEl.removeChild(this.codeEl),this.codeEl=void 0)}ngAfterViewInit(){this.init(),this.ngModel?this.modelValue$=this.ngModel.valueChanges?.subscribe(t=>{this.code=this.escapeHTML(t),this.init()}):this.initMutation()}ngOnDestroy(){this.destroy(),this.destroyMutation(),this.modelValue$&&this.modelValue$.unsubscribe()}initMutation(){typeof MutationObserver>"u"||this.ngZone.runOutsideAngular(()=>{this.observer=new MutationObserver(this.init.bind(this)),this.observer.observe(this.el.nativeElement,{characterData:!0,childList:!0,subtree:!0})})}destroyMutation(){this.observer&&this.observer.disconnect()}}return e.\u0275fac=function(t){return new(t||e)(mt(si),mt(Wl,8),mt(Ni),mt($St,8),mt(ii))},e.\u0275dir=ce({type:e,selectors:[["","highlight-js",""]],hostVars:2,hostBindings:function(t,n){2&t&&Ds("display","simple"===n.mode?"none":null)},inputs:{options:"options",lang:"lang",code:"code",mode:"mode"},exportAs:["highlightJs"],standalone:!0}),e})(),QSt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Li({type:e}),e.\u0275inj=Pi({imports:[Bk]}),e})();const KSt=["trigger"],ZSt=["panel"],JSt=[[["mat-select-trigger"]],"*"],qSt=["mat-select-trigger","*"];function tEt(e,i){if(1&e&&(tt(0,"span",4),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.placeholder)}}function eEt(e,i){1&e&&xi(0)}function iEt(e,i){if(1&e&&(tt(0,"span",11),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.triggerValue)}}function nEt(e,i){if(1&e&&(tt(0,"span",10),Gt(1,eEt,1,0)(2,iEt,2,1),et()),2&e){const t=Ct();lt(),xn(1,t.customTrigger?1:2)}}function rEt(e,i){if(1&e){const t=ve();tt(0,"div",12,1),Vt("@transformPanel.done",function(r){return Ut(t),zt(Ct()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return Ut(t),zt(Ct()._handleKeydown(r))}),xi(2,1),et()}if(2&e){const t=Ct();(function F8(e,i,t){gc(ll,Qc,dg(ye(),e,i,t),!0)})("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),yt("ngClass",t.panelClass)("@transformPanel","showing"),Ti("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}const sEt={transformPanelWrap:mr("transformPanelWrap",[on("* => void",rC("@transformPanel",[nC()],{optional:!0}))]),transformPanel:mr("transformPanel",[Rn("void",qe({opacity:0,transform:"scale(1, 0.8)"})),on("void => showing",sn("120ms cubic-bezier(0, 0, 0.2, 1)",qe({opacity:1,transform:"scale(1, 1)"}))),on("* => void",sn("100ms linear",qe({opacity:0})))])};let $W=0;const QW=new ee("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition()}}),oEt=new ee("MAT_SELECT_CONFIG"),lEt={provide:QW,deps:[xs],useFactory:function aEt(e){return()=>e.scrollStrategies.reposition()}},cEt=new ee("MatSelectTrigger");class dEt{constructor(i,t){this.source=i,this.value=t}}let lv=(()=>{class e{_scrollOptionIntoView(t){const n=this.options.toArray()[t];if(n){const r=this.panel.nativeElement,s=IH(t,this.options,this.optionGroups),o=n._getHostElement();r.scrollTop=0===t&&1===s?0:RH(o.offsetTop,o.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(t){return new dEt(this,t)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(t){this._placeholder=t,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(vu.required)??!1}set required(t){this._required=t,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(t){this._multiple=t}get compareWith(){return this._compareWith}set compareWith(t){this._compareWith=t,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(t){this._assignValue(t)&&this._onChange(t)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(t){this._errorStateTracker.matcher=t}get id(){return this._id}set id(t){this._id=t||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(t){this._errorStateTracker.errorState=t}constructor(t,n,r,s,o,l,w,C,M,P,O,L,U,X){this._viewportRuler=t,this._changeDetectorRef=n,this._elementRef=o,this._dir=l,this._parentFormField=M,this.ngControl=P,this._liveAnnouncer=U,this._defaultOptions=X,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(W,Z)=>W===Z,this._uid="mat-select-"+$W++,this._triggerAriaLabelledBy=null,this._destroy=new Pe,this.stateChanges=new Pe,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+$W++,this._panelDoneAnimatingStream=new Pe,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new Pe,this.optionSelectionChanges=Dg(()=>{const W=this.options;return W?W.changes.pipe(Ta(W),Rs(()=>Yr(...W.map(Z=>Z.onSelectionChange)))):this._initialized.pipe(Rs(()=>this.optionSelectionChanges))}),this.openedChange=new De,this._openedStream=this.openedChange.pipe(In(W=>W),Di(()=>{})),this._closedStream=this.openedChange.pipe(In(W=>!W),Di(()=>{})),this.selectionChange=new De,this.valueChange=new De,this._trackedModal=null,this._skipPredicate=W=>!this.panelOpen&&W.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),null!=X?.typeaheadDebounceInterval&&(this.typeaheadDebounceInterval=X.typeaheadDebounceInterval),this._errorStateTracker=new GR(s,P,C,w,this.stateChanges),this._scrollStrategyFactory=L,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(O)||0,this.id=this.id}ngOnInit(){this._selectionModel=new bR(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(eu(),Ui(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Ui(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Ui(this._destroy)).subscribe(t=>{t.added.forEach(n=>n.select()),t.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(Ta(null),Ui(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const t=this._getTriggerAriaLabelledby(),n=this.ngControl;if(t!==this._triggerAriaLabelledBy){const r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=t,t?r.setAttribute("aria-labelledby",t):r.removeAttribute("aria-labelledby")}n&&(this._previousControl!==n.control&&(void 0!==this._previousControl&&null!==n.disabled&&n.disabled!==this.disabled&&(this.disabled=n.disabled),this._previousControl=n.control),this.updateErrorState())}ngOnChanges(t){(t.disabled||t.userAriaDescribedBy)&&this.stateChanges.next(),t.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){const t=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!t)return;const n=`${this.id}-panel`;this._trackedModal&&Yg(this._trackedModal,"aria-owns",n),jT(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){this._trackedModal&&(Yg(this._trackedModal,"aria-owns",`${this.id}-panel`),this._trackedModal=null)}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(t){this._assignValue(t)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const t=this._selectionModel.selected.map(n=>n.viewValue);return this._isRtl()&&t.reverse(),t.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(t){this.disabled||(this.panelOpen?this._handleOpenKeydown(t):this._handleClosedKeydown(t))}_handleClosedKeydown(t){const n=t.keyCode,r=40===n||38===n||37===n||39===n,s=13===n||32===n,o=this._keyManager;if(!o.isTyping()&&s&&!io(t)||(this.multiple||t.altKey)&&r)t.preventDefault(),this.open();else if(!this.multiple){const l=this.selected;o.onKeydown(t);const w=this.selected;w&&l!==w&&this._liveAnnouncer.announce(w.viewValue,1e4)}}_handleOpenKeydown(t){const n=this._keyManager,r=t.keyCode,s=40===r||38===r,o=n.isTyping();if(s&&t.altKey)t.preventDefault(),this.close();else if(o||13!==r&&32!==r||!n.activeItem||io(t))if(!o&&this._multiple&&65===r&&t.ctrlKey){t.preventDefault();const l=this.options.some(w=>!w.disabled&&!w.selected);this.options.forEach(w=>{w.disabled||(l?w.select():w.deselect())})}else{const l=n.activeItemIndex;n.onKeydown(t),this._multiple&&s&&t.shiftKey&&n.activeItem&&n.activeItemIndex!==l&&n.activeItem._selectViaInteraction()}else t.preventDefault(),n.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(er(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(t){if(this.options.forEach(n=>n.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&t)Array.isArray(t),t.forEach(n=>this._selectOptionByValue(n)),this._sortValues();else{const n=this._selectOptionByValue(t);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(t){const n=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,t)}catch{return!1}});return n&&this._selectionModel.select(n),n}_assignValue(t){return!!(t!==this._value||this._multiple&&Array.isArray(t))&&(this.options&&this._setSelectionByValue(t),this._value=t,!0)}_getOverlayWidth(t){return"auto"===this.panelWidth?(t instanceof nk?t.elementRef:t||this._elementRef).nativeElement.getBoundingClientRect().width:null===this.panelWidth?"":this.panelWidth}_syncParentProperties(){if(this.options)for(const t of this.options)t._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new dH(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const t=Yr(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ui(t)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Yr(...this.options.map(n=>n._stateChanges)).pipe(Ui(t)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(t,n){const r=this._selectionModel.isSelected(t);null!=t.value||this._multiple?(r!==t.selected&&(t.selected?this._selectionModel.select(t):this._selectionModel.deselect(t)),n&&this._keyManager.setActiveItem(t),this.multiple&&(this._sortValues(),n&&this.focus())):(t.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(t.value)),r!==this._selectionModel.isSelected(t)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const t=this.options.toArray();this._selectionModel.sort((n,r)=>this.sortComparator?this.sortComparator(n,r,t):t.indexOf(n)-t.indexOf(r)),this.stateChanges.next()}}_propagateChanges(t){let n;n=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:t,this._value=n,this.valueChange.emit(n),this._onChange(n),this.selectionChange.emit(this._getChangeEvent(n)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let t=-1;for(let n=0;n0}focus(t){this._elementRef.nativeElement.focus(t)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();return this.ariaLabelledby?(t?t+" ":"")+this.ariaLabelledby:t}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const t=this._parentFormField?.getLabelId();let n=(t?t+" ":"")+this._valueId;return this.ariaLabelledby&&(n+=" "+this.ariaLabelledby),n}_panelDoneAnimating(t){this.openedChange.emit(t)}setDescribedByIds(t){t.length?this._elementRef.nativeElement.setAttribute("aria-describedby",t.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ou),mt(Mn),mt(ii),mt(_H),mt(si),mt(Ba,8),mt(sm,8),mt(cd,8),mt(UC,8),mt(ld,10),hl("tabindex"),mt(QW),mt(pH),mt(oEt,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-select"]],contentQueries:function(n,r,s){if(1&n&&(An(s,cEt,5),An(s,nu,5),An(s,WR,5)),2&n){let o;Be(o=Ve())&&(r.customTrigger=o.first),Be(o=Ve())&&(r.options=o),Be(o=Ve())&&(r.optionGroups=o)}},viewQuery:function(n,r){if(1&n&&(Mi(KSt,5),Mi(ZSt,5),Mi(t7,5)),2&n){let s;Be(s=Ve())&&(r.trigger=s.first),Be(s=Ve())&&(r.panel=s.first),Be(s=Ve())&&(r._overlayDir=s.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(n,r){1&n&&Vt("keydown",function(o){return r._handleKeydown(o)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),2&n&&(Ti("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),bi("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.multiple))},inputs:{userAriaDescribedBy:[Wt.None,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)],hideSingleSelectionIndicator:[Wt.HasDecoratorInputTransform,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Je],placeholder:"placeholder",required:[Wt.HasDecoratorInputTransform,"required","required",Je],multiple:[Wt.HasDecoratorInputTransform,"multiple","multiple",Je],disableOptionCentering:[Wt.HasDecoratorInputTransform,"disableOptionCentering","disableOptionCentering",Je],compareWith:"compareWith",value:"value",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[Wt.HasDecoratorInputTransform,"typeaheadDebounceInterval","typeaheadDebounceInterval",jr],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[fi([{provide:VC,useExisting:e},{provide:HR,useExisting:e}]),ln,tr,Vi],ngContentSelectors:qSt,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(n,r){if(1&n){const s=ve();Kn(JSt),tt(0,"div",2,0),Vt("click",function(){return Ut(s),zt(r.open())}),tt(3,"div",3),Gt(4,tEt,2,1,"span",4)(5,nEt,3,1),et(),tt(6,"div",5)(7,"div",6),ul(),tt(8,"svg",7),we(9,"path",8),et()()()(),Gt(10,rEt,3,9,"ng-template",9),Vt("backdropClick",function(){return Ut(s),zt(r.close())})("attach",function(){return Ut(s),zt(r._onAttached())})("detach",function(){return Ut(s),zt(r.close())})}if(2&n){const s=qi(1);lt(3),Ti("id",r._valueId),lt(),xn(4,r.empty?4:5),lt(6),yt("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",r.panelOpen)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)}},dependencies:[nk,t7,bc],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform)}'],encapsulation:2,data:{animation:[sEt.transformPanel]},changeDetection:0})}return e})(),KW=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[lEt],imports:[qc,qf,eC,Ki,lu,zC,eC,Ki]})}return e})();const uEt=["tooltip"],JW=new ee("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.reposition({scrollThrottle:20})}}),fEt={provide:JW,deps:[xs],useFactory:function hEt(e){return()=>e.scrollStrategies.reposition({scrollThrottle:20})}},pEt=new ee("mat-tooltip-default-options",{providedIn:"root",factory:function mEt(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),qW="tooltip-panel",tX=Cc({passive:!0});let xu=(()=>{class e{get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=la(t),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(t){this._disabled=la(t),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=Ch(t)}get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=Ch(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(t){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=t?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(t,n,r,s,o,l,w,C,M,P,O,L){this._overlay=t,this._elementRef=n,this._scrollDispatcher=r,this._viewContainerRef=s,this._ngZone=o,this._platform=l,this._ariaDescriber=w,this._focusMonitor=C,this._dir=P,this._defaultOptions=O,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=bEt,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Pe,this._scrollStrategy=M,this._document=L,O&&(this._showDelay=O.showDelay,this._hideDelay=O.hideDelay,O.position&&(this.position=O.position),O.positionAtOrigin&&(this.positionAtOrigin=O.positionAtOrigin),O.touchGestures&&(this.touchGestures=O.touchGestures)),P.change.pipe(Ui(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=8}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ui(this._destroyed)).subscribe(t=>{t?"keyboard"===t&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){const t=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([n,r])=>{t.removeEventListener(n,r,tX)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t)}show(t=this.showDelay,n){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();const r=this._createOverlay(n);this._detach(),this._portal=this._portal||new Zg(this._tooltipComponent,this._viewContainerRef);const s=this._tooltipInstance=r.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(Ui(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(t)}hide(t=this.hideDelay){const n=this._tooltipInstance;n&&(n.isVisible()?n.hide(t):(n._cancelPendingAnimations(),this._detach()))}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){const s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&s._origin instanceof si)return this._overlayRef;this._detach()}const n=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&t||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(n);return r.positionChanges.pipe(Ui(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${qW}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ui(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ui(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ui(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&27===s.keyCode&&!io(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(t){const n=t.getConfig().positionStrategy,r=this._getOrigin(),s=this._getOverlayPosition();n.withPositions([this._addOffset({...r.main,...s.main}),this._addOffset({...r.fallback,...s.fallback})])}_addOffset(t){const r=!this._dir||"ltr"==this._dir.value;return"top"===t.originY?t.offsetY=-8:"bottom"===t.originY?t.offsetY=8:"start"===t.originX?t.offsetX=r?-8:8:"end"===t.originX&&(t.offsetX=r?8:-8),t}_getOrigin(){const t=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n||"below"==n?r={originX:"center",originY:"above"==n?"top":"bottom"}:"before"==n||"left"==n&&t||"right"==n&&!t?r={originX:"start",originY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(r={originX:"end",originY:"center"});const{x:s,y:o}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:s,originY:o}}}_getOverlayPosition(){const t=!this._dir||"ltr"==this._dir.value,n=this.position;let r;"above"==n?r={overlayX:"center",overlayY:"bottom"}:"below"==n?r={overlayX:"center",overlayY:"top"}:"before"==n||"left"==n&&t||"right"==n&&!t?r={overlayX:"end",overlayY:"center"}:("after"==n||"right"==n&&t||"left"==n&&!t)&&(r={overlayX:"start",overlayY:"center"});const{x:s,y:o}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:s,overlayY:o}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(er(1),Ui(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t,this._tooltipInstance._markForCheck())}_invertPosition(t,n){return"above"===this.position||"below"===this.position?"top"===n?n="bottom":"bottom"===n&&(n="top"):"end"===t?t="start":"start"===t&&(t="end"),{x:t,y:n}}_updateCurrentPositionClass(t){const{overlayY:n,originX:r,originY:s}=t;let o;if(o="center"===n?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===n&&"top"===s?"above":"below",o!==this._currentPosition){const l=this._overlayRef;if(l){const w=`${this._cssClassPrefix}-${qW}-`;l.removePanelClass(w+this._currentPosition),l.addPanelClass(w+o)}this._currentPosition=o}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",t=>{let n;this._setupPointerExitEventsIfNeeded(),void 0!==t.x&&void 0!==t.y&&(n=t),this.show(void 0,n)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",t=>{const n=t.targetTouches?.[0],r=n?{x:n.clientX,y:n.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),this._defaultOptions.touchLongPressShowDelay??500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;const t=[];if(this._platformSupportsMouseEvents())t.push(["mouseleave",n=>{const r=n.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",n=>this._wheelListener(n)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();const n=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};t.push(["touchend",n],["touchcancel",n])}this._addListeners(t),this._passiveListeners.push(...t)}_addListeners(t){t.forEach(([n,r])=>{this._elementRef.nativeElement.addEventListener(n,r,tX)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(t){if(this._isTooltipVisible()){const n=this._document.elementFromPoint(t.clientX,t.clientY),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&this.hide()}}_disableNativeGesturesIfNecessary(){const t=this.touchGestures;if("off"!==t){const n=this._elementRef.nativeElement,r=n.style;("on"===t||"INPUT"!==n.nodeName&&"TEXTAREA"!==n.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===t||!n.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(xs),mt(si),mt(Ry),mt(Ir),mt(ii),mt(ir),mt(oH),mt(Ul),mt(JW),mt(Ba),mt(pEt,8),mt(Ni))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-mdc-tooltip-disabled",r.disabled)},inputs:{position:[Wt.None,"matTooltipPosition","position"],positionAtOrigin:[Wt.None,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[Wt.None,"matTooltipDisabled","disabled"],showDelay:[Wt.None,"matTooltipShowDelay","showDelay"],hideDelay:[Wt.None,"matTooltipHideDelay","hideDelay"],touchGestures:[Wt.None,"matTooltipTouchGestures","touchGestures"],message:[Wt.None,"matTooltip","message"],tooltipClass:[Wt.None,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0})}return e})(),bEt=(()=>{class e{constructor(t,n,r){this._changeDetectorRef=t,this._elementRef=n,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Pe,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled="NoopAnimations"===r}show(t){null!=this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},t)}hide(t){null!=this._showTimeoutId&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},t)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){const t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>24&&t.width>=200}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation)}_cancelPendingAnimations(){null!=this._showTimeoutId&&clearTimeout(this._showTimeoutId),null!=this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(t){t?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(t){const n=this._tooltip.nativeElement,r=this._showAnimation,s=this._hideAnimation;if(n.classList.remove(t?s:r),n.classList.add(t?r:s),this._isVisible=t,t&&!this._animationsDisabled&&"function"==typeof getComputedStyle){const o=getComputedStyle(n);("0s"===o.getPropertyValue("animation-duration")||"none"===o.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}t&&this._onShow(),this._animationsDisabled&&(n.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn),mt(si),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-tooltip-component"]],viewQuery:function(n,r){if(1&n&&Mi(uEt,7),2&n){let s;Be(s=Ve())&&(r._tooltip=s.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(n,r){1&n&&Vt("mouseleave",function(o){return r._handleMouseLeave(o)}),2&n&&Ds("zoom",r.isVisible()?1:null)},standalone:!0,features:[Vi],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1,0),Vt("animationend",function(l){return Ut(s),zt(r._handleAnimationEnd(l))}),tt(2,"div",2),ut(3),et()()}2&n&&(bi("mdc-tooltip--multiline",r._isMultiline),yt("ngClass",r.tooltipClass),lt(3),Ze(r.message))},dependencies:[bc],styles:['.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip--showing-transition .mdc-tooltip__surface-animation{transition:opacity 150ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-tooltip--hide-transition .mdc-tooltip__surface-animation{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - 2*8px);margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - 2*8px);align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mat-mdc-tooltip .mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color)}.mat-mdc-tooltip .mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape)}.mat-mdc-tooltip .mdc-tooltip__caret-surface-top,.mat-mdc-tooltip .mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape)}.mat-mdc-tooltip .mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color)}.mat-mdc-tooltip .mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font);line-height:var(--mdc-plain-tooltip-supporting-text-line-height);font-size:var(--mdc-plain-tooltip-supporting-text-size);font-weight:var(--mdc-plain-tooltip-supporting-text-weight);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0})}return e})(),eX=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[fEt],imports:[yH,qc,qf,Ki,Ki,lu]})}return e})();const wEt=["switch"],_Et=["*"];function TEt(e,i){1&e&&(tt(0,"div",10),ul(),tt(1,"svg",12),we(2,"path",13),et(),tt(3,"svg",14),we(4,"path",15),et()())}const CEt=new ee("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1})}),SEt={provide:ua,useExisting:Sn(()=>Gk),multi:!0};class iX{constructor(i,t){this.source=i,this.checked=t}}let EEt=0,Gk=(()=>{class e{_createChangeEvent(t){return new iX(this,t)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(t){this._checked=t,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l){this._elementRef=t,this._focusMonitor=n,this._changeDetectorRef=r,this.defaults=o,this._onChange=w=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new De,this.toggleChange=new De,this.tabIndex=parseInt(s)||0,this.color=o.color||"accent",this._noopAnimations="NoopAnimations"===l,this.id=this._uniqueId="mat-mdc-slide-toggle-"+ ++EEt,this.hideIcon=o.hideIcon??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{"keyboard"===t||"program"===t?(this._focused=!0,this._changeDetectorRef.markForCheck()):t||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(t){t.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(t){this.checked=!!t}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}validate(t){return this.required&&!0!==t.value?{required:!0}:null}registerOnValidatorChange(t){this._validatorOnChange=t}setDisabledState(t){this.disabled=t,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new iX(this,this.checked)))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Ul),mt(Mn),hl("tabindex"),mt(CEt),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(n,r){if(1&n&&Mi(wEt,5),2&n){let s;Be(s=Ve())&&(r._switchElement=s.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(n,r){2&n&&(Kc("id",r.id),Ti("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Ll(r.color?"mat-"+r.color:""),bi("mat-mdc-slide-toggle-focused",r._focused)("mat-mdc-slide-toggle-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],required:[Wt.HasDecoratorInputTransform,"required","required",Je],color:"color",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)],checked:[Wt.HasDecoratorInputTransform,"checked","checked",Je],hideIcon:[Wt.HasDecoratorInputTransform,"hideIcon","hideIcon",Je]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[fi([SEt,{provide:Ys,useExisting:e,multi:!0}]),ln,tr,Vi],ngContentSelectors:_Et,decls:13,vars:24,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"div",1)(1,"button",2,0),Vt("click",function(){return Ut(s),zt(r._handleClick())}),we(3,"div",3),tt(4,"div",4)(5,"div",5)(6,"div",6),we(7,"div",7),et(),tt(8,"div",8),we(9,"div",9),et(),Gt(10,TEt,5,0,"div",10),et()()(),tt(11,"label",11),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),xi(12),et()()}if(2&n){const s=qi(2);yt("labelPosition",r.labelPosition),lt(),bi("mdc-switch--selected",r.checked)("mdc-switch--unselected",!r.checked)("mdc-switch--checked",r.checked)("mdc-switch--disabled",r.disabled),yt("tabIndex",r.disabled?-1:r.tabIndex)("disabled",r.disabled),Ti("id",r.buttonId)("name",r.name)("aria-label",r.ariaLabel)("aria-labelledby",r._getAriaLabelledBy())("aria-describedby",r.ariaDescribedby)("aria-required",r.required||null)("aria-checked",r.checked),lt(8),yt("matRippleTrigger",s)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),lt(),xn(10,r.hideIcon?-1:10),lt(),yt("for",r.buttonId),Ti("id",r._labelId)}},dependencies:[iu,YR],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}.mdc-switch{width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation)}.mdc-switch .mdc-switch__focus-ring-wrapper,.mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height)}.mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape)}.mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size);width:var(--mdc-switch-state-layer-size)}.mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:"";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mdc-switch__handle{transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--selected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--unselected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch__track::after,.mdc-switch__track::before{border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color)}.mdc-switch--selected .mdc-switch__track::after,.mdc-switch--selected .mdc-switch__track::before{border-width:var(--mat-switch-selected-track-outline-width)}.mdc-switch--disabled .mdc-switch__track::after,.mdc-switch--disabled .mdc-switch__track::before{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}'],encapsulation:2,changeDetection:0})}return e})(),MEt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Gk,Ki,Ki]})}return e})();function IEt(e,i){if(1&e){const t=ve();tt(0,"button",14),Vt("click",function(){Ut(t);const r=Ct().index;return zt(Ct().removeReaction(r))}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function REt(e,i){if(1&e){const t=ve();tt(0,"mat-option",15),Vt("click",function(){const r=Ut(t).$implicit,s=Ct().$implicit;return zt(Ct().reactionSeveritySelected(s,r))}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function kEt(e,i){if(1&e){const t=ve();tt(0,"div",4)(1,"div",5),Gt(2,IEt,3,0,"button",6),et(),tt(3,"div",7)(4,"div",8)(5,"app-autocomplete-binding",9),Vt("selectionChange",function(r){const s=Ut(t).$implicit;return zt(Ct().reactionManifestationSelected(s,r))}),et()(),tt(6,"button",10)(7,"mat-icon"),ut(8,"info"),et()(),tt(9,"mat-menu",null,0)(11,"span",11),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(12,"p"),ut(13,"Terminology binding:"),et(),tt(14,"pre"),ut(15),et()()()(),tt(16,"mat-form-field",12)(17,"mat-label"),ut(18,"Reaction Severity"),et(),tt(19,"mat-select"),Gt(20,REt,2,2,"mat-option",13),et()(),tt(21,"div",7)(22,"div",8)(23,"app-autocomplete-binding",9),Vt("selectionChange",function(r){const s=Ut(t).$implicit;return zt(Ct().reactionRouteSelected(s,r))}),et()(),tt(24,"button",10)(25,"mat-icon"),ut(26,"info"),et()(),tt(27,"mat-menu",null,1)(29,"span",11),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(30,"p"),ut(31,"Terminology binding:"),et(),tt(32,"pre"),ut(33),et()()()()()}if(2&e){const t=i.index,n=qi(10),r=qi(28),s=Ct();lt(2),yt("ngIf",t>0),lt(3),yt("binding",s.reactionManifestationBinding),lt(),yt("matMenuTriggerFor",n),lt(5),yt("disableRipple",!0),lt(4),Ze(s.reactionManifestationBinding.ecl),lt(5),yt("ngForOf",s.severityOptions),lt(3),yt("binding",s.routeBinding),lt(),yt("matMenuTriggerFor",r),lt(5),yt("disableRipple",!0),lt(4),Ze(s.routeBinding.ecl)}}let PEt=(()=>{class e{constructor(){this.reactions=[],this.newManifestation=new De,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.reaction={},this.onChangeCallback=()=>{},this.onTouchedCallback=()=>{}}writeValue(t){void 0!==t&&(this.reactions=t)}setDisabledState(t){}addNewReaction(){this.reactions.push(this.reaction),this.reaction={},this.onChangeCallback(this.reactions)}removeReaction(t){this.reactions.splice(t,1),this.onChangeCallback(this.reactions)}reactionManifestationSelected(t,n){t.manifestation=n,this.newManifestation.emit(n),this.onChangeCallback(this.reactions)}reactionSeveritySelected(t,n){t.severity=n,this.onChangeCallback(this.reactions)}reactionRouteSelected(t,n){t.route=n,this.onChangeCallback(this.reactions)}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies-allergy-list-reaction"]],inputs:{reactions:"reactions"},outputs:{newManifestation:"newManifestation"},features:[fi([{provide:ua,useExisting:Sn(()=>e),multi:!0}])],decls:5,vars:1,consts:[["reactionPopoverMenu","matMenu"],["routePopoverMenu","matMenu"],["class","reaction",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Add reaction",3,"click"],[1,"reaction"],[1,"button-container"],["mat-icon-button","","color","primary","class","remove","matTooltip","Remove reaction",3,"click",4,"ngIf"],[1,"row-centered"],[1,"small-form-field"],[3,"selectionChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"form-field"],[3,"value","click",4,"ngFor","ngForOf"],["mat-icon-button","","color","primary","matTooltip","Remove reaction",1,"remove",3,"click"],[3,"click","value"]],template:function(n,r){1&n&&(Gt(0,kEt,34,10,"div",2),tt(1,"div")(2,"button",3),Vt("click",function(){return r.addNewReaction()}),tt(3,"mat-icon"),ut(4,"add"),et()()()),2&n&&yt("ngForOf",r.reactions)},dependencies:[gs,Ms,Oo,da,bl,Gl,cu,Xl,wl,nu,lv,xu,av],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px;margin-bottom:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.button-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;width:100%}"]})}return e})();const FEt=()=>({});function OEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function LEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function NEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function BEt(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",11),Vt("selectionChange",function(r){return Ut(t),zt(Ct().substanceSelected(r,!0))}),et()}if(2&e){const t=Ct();yt("binding",t.substanceBinding)("term",t.selectedSubstanceTerm)}}function VEt(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",11),Vt("selectionChange",function(r){return Ut(t),zt(Ct().substanceSelected(r))}),et()}if(2&e){const t=Ct();yt("binding",t.refinedSubstanceBinding)("term",t.selectedSubstanceTerm)}}function UEt(e,i){if(1&e&&(tt(0,"pre"),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.substanceBinding.ecl)}}function zEt(e,i){if(1&e&&(tt(0,"pre"),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.refinedSubstanceBinding.ecl)}}function GEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}function HEt(e,i){if(1&e){const t=ve();tt(0,"mat-option",31),Vt("click",function(){return Ut(t),zt(Ct().updateAllergyStr())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ze(t.display)}}let WEt=(()=>{class e{constructor(t,n,r){this.terminologyService=t,this.clipboard=n,this._snackBar=r,this.newProblem=new De,this.clinicalStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"active",display:"Active"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"inactive",display:"Inactive"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",code:"resolved",display:"Resolved"}],this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.verificationStatusOptions=[{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"unconfirmed",display:"Unconfirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"presumed",display:"Presumed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"confirmed",display:"Confirmed"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"refuted",display:"Refuted"},{system:"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",code:"entered-in-error",display:"Entered in Error"}],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.intoleranceTypeOptions=[{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"609433001",display:"Hypersensitivity disposition (finding)",fhirCode:"allergy",fhirDisplay:"Allergy"},{system:"http://hl7.org/fhir/allergy-intolerance-type",code:"782197009",display:"Intolerance to substance (finding)",fhirCode:"intolerance",fhirDisplay:"Intolerance"}],this.selectedIntoleranceType=null,this.intoleranceCategoryOptions=[{code:"food",display:"Food"},{code:"medication",display:"Medication"},{code:"environment",display:"Environment"},{code:"biologic",display:"Biologic"}],this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Va(this.selectedIntoleranceCategories),this.criticalityOptions=[{code:"low",display:"Low Risk"},{code:"high",display:"High Risk"},{code:"unable-to-assess",display:"Unable to Assess Risk"}],this.selectedCriticality=null,this.severityOptions=[{code:"mild",display:"Mild",sctCode:"255604002",sctDisplay:"Mild (qualifier value)"},{code:"moderate",display:"Moderate",sctCode:"6736007",sctDisplay:"Moderate (qualifier value)"},{code:"severe",display:"Severe",sctCode:"24484000",sctDisplay:"Severe (qualifier value)"}],this.selectedSeverity={},this.codeBinding={ecl:"<<418038007 |Propensity to adverse reactions to substance| OR <<420134006 |Propensity to adverse reaction (finding)|",title:"Allergy/Intolerance by propensity"},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.substanceBinding={ecl:"<<105590001 | Substance (substance) | OR <<373873005 | Pharmaceutical / biologic product (product) |",title:"Allergy/Intolerance substance or product"},this.refinedSubstanceBinding={ecl:"<<105590001 | Substance (substance) |",title:"Allergy/Intolerance substance based on propensity"},this.selectedSubstanceTerm="",this.selectedSubstance=null,this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.reactionManifestationBinding={ecl:"<<404684003 |Clinical finding|",title:"Reaction Manifestation"},this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm="",this.routeBinding={ecl:"<<284009009 |Route of administration value|",title:"Exposure Route"},this.selectedRoute=null,this.selectedRouteTerm="",this.outputAllergyBase={resourceType:"AllergyIntolerance",id:"medication",text:{},clinicalStatus:{coding:[]},verificationStatus:{coding:[]},type:"",category:[],criticality:"high",code:{coding:[]},reaction:[{substance:[{coding:[]}],manifestation:[{coding:[]}],exposureRoute:{coding:[]},severity:""}],patient:{reference:"Patient/example"},recordedDate:"2010-03-01",participant:[{function:{coding:[{system:"http://terminology.hl7.org/CodeSystem/provenance-participant-type",code:"author",display:"Author"}]},actor:{reference:"Practitioner/example"}}]},this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.outputAllergyStr=""}ngOnInit(){this.updateAllergyStr()}onReactionsChange(t){this.updateAllergyStr()}clear(){this.selectedClinicalStatus=this.clinicalStatusOptions[0],this.selectedVerificationStatus=this.verificationStatusOptions[0],this.selectedIntoleranceType=null,this.selectedIntoleranceCategories=[],this.selectedIntoleranceCategoriesControl=new Va(this.selectedIntoleranceCategories),this.selectedCriticality=null,this.selectedSeverity={},this.selectedCode=null,this.selectedCodeTerm="",this.recordPropensity=!1,this.selectedSubstanceTerm="",this.selectedReactionManifestation=null,this.selectedReactionManifestationTerm=" ",this.selectedRoute=null,this.selectedRouteTerm=" ",this.selectedReactions=[{suibstance:{},manifestation:{},severity:{},route:{}}],this.outputAllergy=JSON.parse(JSON.stringify(this.outputAllergyBase)),this.updateAllergyStr(),setTimeout(()=>{this.selectedReactionManifestationTerm="",this.selectedRouteTerm=""},100)}updateAllergyStr(){this.outputAllergy.clinicalStatus.coding=[this.selectedClinicalStatus],this.outputAllergy.verificationStatus.coding=[this.selectedVerificationStatus],this.outputAllergy.type=this.selectedIntoleranceType?this.selectedIntoleranceType.fhirCode:"",this.outputAllergy.category=this.selectedIntoleranceCategories.length?this.selectedIntoleranceCategories.map(t=>t.display):[],this.outputAllergy.criticality=this.selectedCriticality?.code?[this.selectedCriticality.code]:{},this.outputAllergy.reaction=[],this.selectedReactions.forEach(t=>{t.manifestation.code&&(t.manifestation.system="http://snomed.info/sct"),t.route.code&&(t.route.system="http://snomed.info/sct"),this.outputAllergy.reaction.push({substance:[{coding:[this.selectedSubstance]}],manifestation:[{coding:t.manifestation?[t.manifestation]:[{}]}],exposureRoute:{coding:t.route?[t.route]:[{}]},severity:t.severity?t.severity.code:""})}),setTimeout(()=>{this.outputAllergyStr=JSON.stringify(this.outputAllergy,null,2)},100)}substanceSelected(t,n){var r=this;return de(function*(){n&&(r.selectedCodeTerm=""),r.selectedSubstance=t,r.selectedIntoleranceCategories=[],t=Object.assign({system:"http://snomed.info/sct"},t),r.recordPropensity||(r.outputAllergy.code.coding=[t]),r.outputAllergy.reaction[0].substance[0].coding=[t],(yield r.getSubstanceCategories(t))?.expansion?.contains?.forEach(o=>{"762766007"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[0]):"115668003"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[3]):"410942007"==o.code?r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[1]):"57795002"==o.code&&r.selectedIntoleranceCategories.push(r.intoleranceCategoryOptions[2])}),r.selectedIntoleranceCategoriesControl.setValue(r.selectedIntoleranceCategories),r.updateAllergyStr()})()}propensityRecordChanged(){this.outputAllergy.code.coding=[],this.selectedCode&&this.codeSelected(this.selectedCode)}codeSelected(t){var n=this;return de(function*(){if(t=Object.assign({system:"http://snomed.info/sct"},t)){n.selectedCodeTerm=t.display,n.selectedCode=t,n.recordPropensity&&(n.outputAllergy.code.coding=[t]);let r=yield n.getTypes(t);if(r.expansion?.contains){const o=r.expansion?.contains[0];n.selectedIntoleranceType=n.intoleranceTypeOptions.find(l=>l.code===o.code)}let s=yield n.getAllergySubstance(t);if(s.expansion.contains||(s=yield n.getIntoleranceSubstance(t)),s.expansion?.contains){const o=s.expansion?.contains[0];n.refinedSubstanceBinding.ecl=`<<${o.code} | ${o.display} |`,n.substanceSelected(o),n.selectedSubstanceTerm=o.display}else n.refinedSubstanceBinding.ecl="<<105590001 | Substance (substance) |"}})()}getIntoleranceSubstance(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . 47429007 |Associated with (attribute)|`,"")).pipe(Di(s=>s)))})()}getAllergySubstance(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`${t.code} |${t.display}| . 246075003 |Causative agent (attribute)|`,"")).pipe(Di(s=>s)))})()}getSubstanceCategories(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`> ${t.code} |${t.display}| AND (762766007 |Edible substance| OR 115668003 |Biological substance (substance)| OR 410942007 |Drug or medicament (substance)| OR 57795002 |Chemical element|)`,"")).pipe(Di(s=>s)))})()}getTypes(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(`> ${t.code} |${t.display}| AND (609433001 |Hypersensitivity disposition| OR 782197009 |Intolerance to substance|)`,"")).pipe(Di(s=>s)))})()}saveFhirResource(){var t=new Blob([this.outputAllergyStr],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(t,"AllergyIntolerance.json")}copyToClipboard(t){this.clipboard.copy(t)}addToProblemsList(){if(this.selectedCode)this.newProblem.emit(this.selectedCode);else if(this.selectedSubstance&&this.selectedIntoleranceType){let t="";"609433001"===this.selectedIntoleranceType.code?t="Allergy to ":"782197009"===this.selectedIntoleranceType.code&&(t="Intolerance to "),t+=this.selectedSubstance.display,this.newProblem.emit({code:`${this.selectedIntoleranceType.code}:246075003=${this.selectedSubstance.code}`,display:t,substance:this.selectedSubstance})}else this._snackBar.openFromComponent(Ar,{duration:1e3,data:"Nothing to add to problem list",panelClass:["yellow-snackbar"]});this.clear()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(zk),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies-allergy-list"]],outputs:{newProblem:"newProblem"},decls:105,vars:30,consts:[["substancePopoverMenu","matMenu"],["codePopoverMenu","matMenu"],["id","main-card"],[1,"row"],[1,"column"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-flat-button","","color","accent","id","clear",3,"click"],[1,"row-centered"],[1,"smallest-form-field"],[3,"selectionChange","binding","term"],["mat-menu-item","",3,"click","disableRipple"],["matTooltip","Defines wether to use a propensity based model or a substance based model. Defines which one is recorded in the code element of the AllergyIntolerance resource.",3,"ngModelChange","click","ngModel"],[1,"form-field"],[3,"ngModelChange","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[1,"small-form-field"],[3,"binding","term","selectionChange",4,"ngIf"],[4,"ngIf"],[3,"formControl","multiple"],[3,"ngModelChange","newManifestation","ngModel"],["mat-flat-button","","color","accent",3,"click"],["href","https://hl7.org/FHIR/allergyintolerance.html","target","_blank"],["id","output"],["id","save"],["mat-icon-button","","matTooltip","Download FHIR Resource",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy FHIR Resource",3,"click"],["fontIcon","content_copy"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],[3,"click","value"]],template:function(n,r){if(1&n){const s=ve();tt(0,"mat-card",2)(1,"div",3)(2,"div",4)(3,"h4"),ut(4,"Allergy Intolerance Form "),tt(5,"button",5)(6,"mat-icon"),ut(7,"info"),et()(),tt(8,"mat-menu",null,0)(10,"span",6),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(11,"h4"),ut(12,"Allergy list"),et(),tt(13,"p"),ut(14,"Allergy or intolerance can be recorded in a specific section (e.g., \u201cDrug Allergy and Intolerance\u201d) of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),et(),tt(15,"p"),ut(16,"In terms of documenting sensitivity type in the allergy list there is the option to map to 609433001 |Hypersensitivity disposition which in SNOMED CT represents both immune-mediated and non-immune mediated hypersensitivity or to map to 609328004 |Allergic disposition (finding)|which is common clinical parlance for what many clinicians would mean by allergic or non-allergic hypersensitivity. In addition, as recommended in the FHIR documentation if one is unclear as to whether a condition represents hypersensitivity or intolerance, one can just omit the type element from the resource."),et(),tt(17,"p"),ut(18,"If SNOMED CT concepts are used to document the causative agent, it is preferable to use concepts from the Substance rather than Pharmaceutical/biologic product hierarchy since this will facilitate the downstream use of data, e.g., clinical decision support, data exchange."),et(),tt(19,"p"),ut(20,"Almost all allergy and intolerance finding concepts are modeled using substance concepts in SNOMED CT. The SNOMED CT substance hierarchy has grouper concepts that are based on structure (e.g., Macrolide) or disposition (e.g., substance with histamine receptor antagonist mechanism of action). Clinical decision support systems can utilize these grouper concepts to access information at the desired level of granularity. Clinicians can also record a class of substance instead of a specific drug or substance (e.g., angiotensin II receptor antagonist). Note that substance grouper concepts based on therapeutic role (e.g., anticonvulsant) is not recommended for use because they are currently under review and may be retired in future."),et(),tt(21,"p"),ut(22,"There are situations in which it is difficult to determine the specific substance as a true cause or most likely cause of a condition. This is the case for allergy/intolerance to a product containing multiple substances."),et(),tt(23,"p"),ut(24,"Records of allergy to multiple substances or to multi-ingredient products should be recorded at the product level and updated when more specific information becomes available (e.g., positive sensitivity test to one specific ingredient of the mix)."),et(),tt(25,"p"),ut(26,"For more information check the "),tt(27,"a",7),ut(28,"Implementation Guide"),et(),ut(29," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),tt(30,"button",8),Vt("click",function(){return Ut(s),zt(r.clear())}),ut(31,"Clear"),et(),tt(32,"div",9)(33,"div",10)(34,"app-autocomplete-binding",11),Vt("selectionChange",function(l){return Ut(s),zt(r.codeSelected(l))}),et()(),tt(35,"button",5)(36,"mat-icon"),ut(37,"info"),et()(),tt(38,"mat-menu",null,1)(40,"span",12),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(41,"p"),ut(42,"Terminology binding:"),et(),tt(43,"pre"),ut(44),et()()(),tt(45,"mat-slide-toggle",13),wa("ngModelChange",function(l){return Ut(s),Na(r.recordPropensity,l)||(r.recordPropensity=l),zt(l)}),Vt("click",function(){return Ut(s),zt(r.propensityRecordChanged())}),ut(46," Propensity based model "),et()(),tt(47,"mat-form-field",14)(48,"mat-label"),ut(49,"Allergy Intolerance Type"),et(),tt(50,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedIntoleranceType,l)||(r.selectedIntoleranceType=l),zt(l)}),Gt(51,OEt,2,2,"mat-option",16),et()(),tt(52,"div",9)(53,"mat-form-field",4)(54,"mat-label"),ut(55,"Clinical Status"),et(),tt(56,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedClinicalStatus,l)||(r.selectedClinicalStatus=l),zt(l)}),Gt(57,LEt,2,2,"mat-option",16),et()(),tt(58,"mat-form-field",4)(59,"mat-label"),ut(60,"Verification Status"),et(),tt(61,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedVerificationStatus,l)||(r.selectedVerificationStatus=l),zt(l)}),Gt(62,NEt,2,2,"mat-option",16),et()()(),tt(63,"div",9)(64,"div",17),Gt(65,BEt,1,2,"app-autocomplete-binding",18)(66,VEt,1,2,"app-autocomplete-binding",18),et(),tt(67,"button",5)(68,"mat-icon"),ut(69,"info"),et()(),tt(70,"mat-menu",null,0)(72,"span",12),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(73,"p"),ut(74,"Terminology binding:"),et(),Gt(75,UEt,2,1,"pre",19)(76,zEt,2,1,"pre",19),et()()(),tt(77,"div",9)(78,"mat-form-field",4)(79,"mat-label"),ut(80,"Substance Category"),et(),tt(81,"mat-select",20),Gt(82,GEt,2,2,"mat-option",16),et()(),tt(83,"mat-form-field",4)(84,"mat-label"),ut(85,"Allergy Criticality"),et(),tt(86,"mat-select",15),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedCriticality,l)||(r.selectedCriticality=l),zt(l)}),Gt(87,HEt,2,2,"mat-option",16),et()()(),tt(88,"app-allergies-allergy-list-reaction",21),wa("ngModelChange",function(l){return Ut(s),Na(r.selectedReactions,l)||(r.selectedReactions=l),zt(l)}),Vt("ngModelChange",function(l){return Ut(s),zt(r.onReactionsChange(l))})("newManifestation",function(l){return Ut(s),zt(r.newProblem.emit(l))}),et(),tt(89,"button",22),Vt("click",function(){return Ut(s),zt(r.addToProblemsList())}),ut(90,"Save"),et()(),tt(91,"div",4)(92,"h4"),ut(93,"AllergyIntolerance HL7 FHIR Resource ("),tt(94,"a",23),ut(95,"link"),et(),ut(96,")"),et(),tt(97,"div",24)(98,"div",25)(99,"button",26),Vt("click",function(){return Ut(s),zt(r.saveFhirResource())}),we(100,"mat-icon",27),et(),tt(101,"button",28),Vt("click",function(){return Ut(s),zt(r.copyToClipboard(r.outputAllergyStr))}),we(102,"mat-icon",29),et()(),tt(103,"textarea",30),ut(104," "),et()()()()()}if(2&n){const s=qi(9),o=qi(39);lt(5),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(24),yt("binding",r.codeBinding)("term",r.selectedCodeTerm),lt(),yt("matMenuTriggerFor",o),lt(5),yt("disableRipple",!0),lt(4),Ze(r.codeBinding.ecl),lt(),ba("ngModel",r.recordPropensity),lt(5),ba("ngModel",r.selectedIntoleranceType),lt(),yt("ngForOf",r.intoleranceTypeOptions),lt(5),ba("ngModel",r.selectedClinicalStatus),lt(),yt("ngForOf",r.clinicalStatusOptions),lt(4),ba("ngModel",r.selectedVerificationStatus),lt(),yt("ngForOf",r.verificationStatusOptions),lt(3),yt("ngIf",!r.recordPropensity),lt(),yt("ngIf",r.recordPropensity),lt(),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(3),yt("ngIf",!r.recordPropensity),lt(),yt("ngIf",r.recordPropensity),lt(5),yt("formControl",r.selectedIntoleranceCategoriesControl)("multiple",!0),lt(),yt("ngForOf",r.intoleranceCategoryOptions),lt(4),ba("ngModel",r.selectedCriticality),lt(),yt("ngForOf",r.criticalityOptions),lt(),ba("ngModel",r.selectedReactions),lt(15),yt("options",Ko(29,FEt))("lang","json")("innerHTML",r.outputAllergyStr,Pf)}},dependencies:[gs,Ms,GC,Sa,Oo,da,bl,Gl,cu,Xl,wl,nu,No,Uy,vC,lv,Wl,xu,Gk,av,PEt],styles:["#main-card[_ngcontent-%COMP%]{padding:10px;width:100%}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:flex-start}.row-centered[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center}.column[_ngcontent-%COMP%]{position:relative;flex:1;margin:5px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%}.smallest-form-field[_ngcontent-%COMP%]{width:60%;margin:5px}.small-form-field[_ngcontent-%COMP%]{width:90%;margin:5px}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;padding:4px 8px;height:36px}.mat-mdc-form-field-appearance-outline[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:0}.reaction[_ngcontent-%COMP%]{border-radius:10px;background-color:#a9bee9;padding:10px}#output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative}pre[_ngcontent-%COMP%] > code[_ngcontent-%COMP%]{width:45%;white-space:pre-wrap;word-wrap:break-word}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}#clear[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return e})(),XEt=(()=>{class e{constructor(t){this._snackBar=t}addProblem(t){var n=this;return de(function*(){n.allergiesProblemListComponent.addProblem(t),n._snackBar.openFromComponent(Ar,{duration:1e3,data:"Problem list updated",panelClass:["green-snackbar"]})})()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-allergies"]],viewQuery:function(n,r){if(1&n&&Mi(zW,5),2&n){let s;Be(s=Ve())&&(r.allergiesProblemListComponent=s.first)}},decls:31,vars:2,consts:[["substancePopoverMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/x/PaDICg","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Allergy List Approach (AllergyIntolerance FHIR resource)"],[3,"newProblem"],["label","Problem List Approach (Condition FHIR resource)"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1)(1,"h3"),ut(2,"Allergy, Hypersensitivity and Intolerance "),tt(3,"button",2)(4,"mat-icon"),ut(5,"info"),et()(),tt(6,"mat-menu",null,0)(8,"span",3),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(9,"h4"),ut(10,"Allergy, Hypersensitivity and Intolerance Implementation Demo"),et(),tt(11,"p"),ut(12,"This is a demonstration of different implementation approaches for recording Allergies, Hypersensitivity and Intolerance."),et(),tt(13,"p")(14,"b"),ut(15,"Allergy list:"),et(),ut(16," allergy or intolerance can be recorded in a specific section of the EHR, which records the causative agent together with other details, including type (allergy, non-allergic hypersensitivity, intolerance), certainty, manifestation, and severity. This corresponds to the FHIR substance based AllergyIntolerance resource data model."),et(),tt(17,"p")(18,"b"),ut(19,"Problem list:"),et(),ut(20," Allergy or intolerance can also be recorded in the EHR as a problem. The problem list is normally restricted to SNOMED CT concepts from three hierarchies \u2013 Clinical finding, Event and Finding with explicit context. This corresponds either to the FHIR finding based AllergyIntolerance resource data model or the FHIR Condition resource."),et(),tt(21,"p"),ut(22,"For more information check the "),tt(23,"a",4),ut(24,"Implementation Guide"),et(),ut(25," developed by the SNOMED International Allergy Clinical Reference Group."),et()()()(),tt(26,"mat-tab-group",5)(27,"mat-tab",6)(28,"app-allergies-allergy-list",7),Vt("newProblem",function(l){return Ut(s),zt(r.addProblem(l))}),et()(),tt(29,"mat-tab",8),we(30,"app-allergies-problem-list"),et()()()}if(2&n){const s=qi(7);lt(3),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0)}},dependencies:[Oo,da,bl,Gl,cu,zy,ov,zW,WEt],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}#guideLink[_ngcontent-%COMP%]{font-size:smaller}.long-tooltip[_ngcontent-%COMP%]{padding-left:3rem;padding-right:3rem;font-weight:lighter;font-size:.9rem}"]})}return e})();function Hk(e,i,t){for(let n in i)if(i.hasOwnProperty(n)){const r=i[n];r?e.setProperty(n,r,t?.has(n)?"important":""):e.removeProperty(n)}return e}function cv(e,i){const t=i?"":"none";Hk(e.style,{"touch-action":i?"":"none","-webkit-user-drag":i?"":"none","-webkit-tap-highlight-color":i?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function nX(e,i,t){Hk(e.style,{position:i?"":"fixed",top:i?"":"0",opacity:i?"":"0",left:i?"":"-999em"},t)}function HC(e,i){return i&&"none"!=i?e+" "+i:e}function rX(e){const i=e.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(e)*i}function Wk(e,i){return e.getPropertyValue(i).split(",").map(n=>n.trim())}function Xk(e){const i=e.getBoundingClientRect();return{top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:i.width,height:i.height,x:i.x,y:i.y}}function jk(e,i,t){const{top:n,bottom:r,left:s,right:o}=e;return t>=n&&t<=r&&i>=s&&i<=o}function Gy(e,i,t){e.top+=i,e.bottom=e.top+e.height,e.left+=t,e.right=e.left+e.width}function sX(e,i,t,n){const{top:r,right:s,bottom:o,left:l,width:w,height:C}=e,M=w*i,P=C*i;return n>r-P&&nl-M&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:Xk(t)})})}handleScroll(i){const t=yl(i),n=this.positions.get(t);if(!n)return null;const r=n.scrollPosition;let s,o;if(t===this._document){const C=this.getViewportScrollPosition();s=C.top,o=C.left}else s=t.scrollTop,o=t.scrollLeft;const l=r.top-s,w=r.left-o;return this.positions.forEach((C,M)=>{C.clientRect&&t!==M&&t.contains(M)&&Gy(C.clientRect,l,w)}),r.top=s,r.left=o,{top:l,left:w}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function oX(e){const i=e.cloneNode(!0),t=i.querySelectorAll("[id]"),n=e.nodeName.toLowerCase();i.removeAttribute("id");for(let r=0;rcv(t,i)))}constructor(i,t,n,r,s,o){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=s,this._dragDropRegistry=o,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new Pe,this._pointerMoveSubscription=Ie.EMPTY,this._pointerUpSubscription=Ie.EMPTY,this._scrollSubscription=Ie.EMPTY,this._resizeSubscription=Ie.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new Pe,this.started=new Pe,this.released=new Pe,this.ended=new Pe,this.entered=new Pe,this.exited=new Pe,this.dropped=new Pe,this.moved=this._moveEvents,this._pointerDown=l=>{if(this.beforeStarted.next(),this._handles.length){const w=this._getTargetHandle(l);w&&!this._disabledHandles.has(w)&&!this.disabled&&this._initializeDragSequence(w,l)}else this.disabled||this._initializeDragSequence(this._rootElement,l)},this._pointerMove=l=>{const w=this._getPointerPositionOnPage(l);if(!this._hasStartedDragging){if(Math.abs(w.x-this._pickupPositionOnPage.x)+Math.abs(w.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const L=Date.now()>=this._dragStartTime+this._getDragStartDelay(l),U=this._dropContainer;if(!L)return void this._endDragSequence(l);(!U||!U.isDragging()&&!U.isReceiving())&&(l.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(l)))}return}l.preventDefault();const C=this._getConstrainedPointerPosition(w);if(this._hasMoved=!0,this._lastKnownPointerPosition=w,this._updatePointerDirectionDelta(C),this._dropContainer)this._updateActiveDropContainer(C,w);else{const M=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,P=this._activeTransform;P.x=C.x-M.x+this._passiveTransform.x,P.y=C.y-M.y+this._passiveTransform.y,this._applyRootElementTransform(P.x,P.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:C,event:l,distance:this._getDragDistance(C),delta:this._pointerDirectionDelta})})},this._pointerUp=l=>{this._endDragSequence(l)},this._nativeDragStart=l=>{if(this._handles.length){const w=this._getTargetHandle(l);w&&!this._disabledHandles.has(w)&&!this.disabled&&l.preventDefault()}else this.disabled||l.preventDefault()},this.withRootElement(i).withParent(t.parentDragRef||null),this._parentPositions=new aX(n),o.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(i){this._handles=i.map(n=>vs(n)),this._handles.forEach(n=>cv(n,this.disabled)),this._toggleNativeDragInteractions();const t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(i){return this._previewTemplate=i,this}withPlaceholderTemplate(i){return this._placeholderTemplate=i,this}withRootElement(i){const t=vs(i);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,WC),t.addEventListener("touchstart",this._pointerDown,uX),t.addEventListener("dragstart",this._nativeDragStart,WC)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(i){return this._boundaryElement=i?vs(i):null,this._resizeSubscription.unsubscribe(),i&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(i){return this._parentDragRef=i,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(i){!this._disabledHandles.has(i)&&this._handles.indexOf(i)>-1&&(this._disabledHandles.add(i),cv(i,!0))}enableHandle(i){this._disabledHandles.has(i)&&(this._disabledHandles.delete(i),cv(i,this.disabled))}withDirection(i){return this._direction=i,this}_withDropContainer(i){this._dropContainer=i}getFreeDragPosition(){const i=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:i.x,y:i.y}}setFreeDragPosition(i){return this._activeTransform={x:0,y:0},this._passiveTransform.x=i.x,this._passiveTransform.y=i.y,this._dropContainer||this._applyRootElementTransform(i.x,i.y),this}withPreviewContainer(i){return this._previewContainer=i,this}_sortFromLastPointerPosition(){const i=this._lastKnownPointerPosition;i&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(i),i)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(i){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:i}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(i),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const t=this._getPointerPositionOnPage(i);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:i})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(i){Hy(i)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const t=this._dropContainer;if(t){const n=this._rootElement,r=n.parentNode,s=this._placeholder=this._createPlaceholderElement(),o=this._anchor=this._anchor||this._document.createComment(""),l=this._getShadowRoot();r.insertBefore(o,n),this._initialTransform=n.style.transform||"",this._preview=this._createPreviewElement(),nX(n,!1,Yk),this._document.body.appendChild(r.replaceChild(s,n)),this._getPreviewInsertionPoint(r,l).appendChild(this._preview),this.started.next({source:this,event:i}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:i}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(i,t){this._parentDragRef&&t.stopPropagation();const n=this.isDragging(),r=Hy(t),s=!r&&0!==t.button,o=this._rootElement,l=yl(t),w=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),C=r?ZT(t):KT(t);if(l&&l.draggable&&"mousedown"===t.type&&t.preventDefault(),n||s||w||C)return;if(this._handles.length){const O=o.style;this._rootElementTapHighlight=O.webkitTapHighlightColor||"",O.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(O=>this._updateOnScroll(O)),this._boundaryElement&&(this._boundaryRect=Xk(this._boundaryElement));const M=this._previewTemplate;this._pickupPositionInElement=M&&M.template&&!M.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,i,t);const P=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:P.x,y:P.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(i){nX(this._rootElement,!0,Yk),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(i),s=this._getDragDistance(r),o=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:s,dropPoint:r,event:i}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:o,distance:s,dropPoint:r,event:i}),t.drop(this,n,this._initialIndex,this._initialContainer,o,s,r,i),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:i,y:t},{x:n,y:r}){let s=this._initialContainer._getSiblingContainerFromPosition(this,i,t);!s&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(i,t)&&(s=this._initialContainer),s&&s!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=s,this._dropContainer.enter(this,i,t,s===this._initialContainer&&s.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:s,currentIndex:s.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,i,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(i,t):this._applyPreviewTransform(i-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_createPreviewElement(){const i=this._previewTemplate,t=this.previewClass,n=i?i.template:null;let r;if(n&&i){const s=i.matchSize?this._initialDomRect:null,o=i.viewContainer.createEmbeddedView(n,i.context);o.detectChanges(),r=fX(o,this._document),this._previewRef=o,i.matchSize?mX(r,s):r.style.transform=XC(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=oX(this._rootElement),mX(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return Hk(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},Yk),cv(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(s=>r.classList.add(s)):r.classList.add(t)),r}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const i=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(i.left,i.top);const t=function YEt(e){const i=getComputedStyle(e),t=Wk(i,"transition-property"),n=t.find(l=>"transform"===l||"all"===l);if(!n)return 0;const r=t.indexOf(n),s=Wk(i,"transition-duration"),o=Wk(i,"transition-delay");return rX(s[r])+rX(o[r])}(this._preview);return 0===t?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{const r=o=>{(!o||yl(o)===this._preview&&"transform"===o.propertyName)&&(this._preview?.removeEventListener("transitionend",r),n(),clearTimeout(s))},s=setTimeout(r,1.5*t);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){const i=this._placeholderTemplate,t=i?i.template:null;let n;return t?(this._placeholderRef=i.viewContainer.createEmbeddedView(t,i.context),this._placeholderRef.detectChanges(),n=fX(this._placeholderRef,this._document)):n=oX(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(i,t,n){const r=t===this._rootElement?null:t,s=r?r.getBoundingClientRect():i,o=Hy(n)?n.targetTouches[0]:n,l=this._getViewportScrollPosition();return{x:s.left-i.left+(o.pageX-s.left-l.left),y:s.top-i.top+(o.pageY-s.top-l.top)}}_getPointerPositionOnPage(i){const t=this._getViewportScrollPosition(),n=Hy(i)?i.touches[0]||i.changedTouches[0]||{pageX:0,pageY:0}:i,r=n.pageX-t.left,s=n.pageY-t.top;if(this._ownerSVGElement){const o=this._ownerSVGElement.getScreenCTM();if(o){const l=this._ownerSVGElement.createSVGPoint();return l.x=r,l.y=s,l.matrixTransform(o.inverse())}}return{x:r,y:s}}_getConstrainedPointerPosition(i){const t=this._dropContainer?this._dropContainer.lockAxis:null;let{x:n,y:r}=this.constrainPosition?this.constrainPosition(i,this,this._initialDomRect,this._pickupPositionInElement):i;if("x"===this.lockAxis||"x"===t?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):("y"===this.lockAxis||"y"===t)&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){const{x:s,y:o}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,l=this._boundaryRect,{width:w,height:C}=this._getPreviewRect(),M=l.top+o,P=l.bottom-(C-o);n=hX(n,l.left+s,l.right-(w-s)),r=hX(r,M,P)}return{x:n,y:r}}_updatePointerDirectionDelta(i){const{x:t,y:n}=i,r=this._pointerDirectionDelta,s=this._pointerPositionAtLastDirectionChange,o=Math.abs(t-s.x),l=Math.abs(n-s.y);return o>this._config.pointerDirectionChangeThreshold&&(r.x=t>s.x?1:-1,s.x=t),l>this._config.pointerDirectionChangeThreshold&&(r.y=n>s.y?1:-1,s.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const i=this._handles.length>0||!this.isDragging();i!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=i,cv(this._rootElement,i))}_removeRootElementListeners(i){i.removeEventListener("mousedown",this._pointerDown,WC),i.removeEventListener("touchstart",this._pointerDown,uX),i.removeEventListener("dragstart",this._nativeDragStart,WC)}_applyRootElementTransform(i,t){const n=XC(i,t),r=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=r.transform&&"none"!=r.transform?r.transform:""),r.transform=HC(n,this._initialTransform)}_applyPreviewTransform(i,t){const n=this._previewTemplate?.template?void 0:this._initialTransform,r=XC(i,t);this._preview.style.transform=HC(r,n)}_getDragDistance(i){const t=this._pickupPositionOnPage;return t?{x:i.x-t.x,y:i.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:i,y:t}=this._passiveTransform;if(0===i&&0===t||this.isDragging()||!this._boundaryElement)return;const n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(0===r.width&&0===r.height||0===n.width&&0===n.height)return;const s=r.left-n.left,o=n.right-r.right,l=r.top-n.top,w=n.bottom-r.bottom;r.width>n.width?(s>0&&(i+=s),o>0&&(i-=o)):i=0,r.height>n.height?(l>0&&(t+=l),w>0&&(t-=w)):t=0,(i!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:i})}_getDragStartDelay(i){const t=this.dragStartDelay;return"number"==typeof t?t:Hy(i)?t.touch:t?t.mouse:0}_updateOnScroll(i){const t=this._parentPositions.handleScroll(i);if(t){const n=yl(i);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&Gy(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=IR(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(i,t){const n=this._previewContainer||"global";if("parent"===n)return i;if("global"===n){const r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return vs(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(i){return this._handles.find(t=>i.target&&(i.target===t||t.contains(i.target)))}}function XC(e,i){return`translate3d(${Math.round(e)}px, ${Math.round(i)}px, 0)`}function hX(e,i,t){return Math.max(i,Math.min(t,e))}function Hy(e){return"t"===e.type[0]}function fX(e,i){const t=e.rootNodes;if(1===t.length&&t[0].nodeType===i.ELEMENT_NODE)return t[0];const n=i.createElement("div");return t.forEach(r=>n.appendChild(r)),n}function mX(e,i){e.style.width=`${i.width}px`,e.style.height=`${i.height}px`,e.style.transform=XC(i.left,i.top)}function $k(e,i,t){const n=Wy(i,e.length-1),r=Wy(t,e.length-1);if(n===r)return;const s=e[n],o=r0)return null;const l="horizontal"===this.orientation,w=s.findIndex(W=>W.drag===i),C=s[o],P=C.clientRect,O=w>o?1:-1,L=this._getItemOffsetPx(s[w].clientRect,P,O),U=this._getSiblingOffsetPx(w,s,O),X=s.slice();return $k(s,w,o),s.forEach((W,Z)=>{if(X[Z]===W)return;const rt=W.drag===i,st=rt?L:U,vt=rt?i.getPlaceholderElement():W.drag.getRootElement();W.offset+=st,l?(vt.style.transform=HC(`translate3d(${Math.round(W.offset)}px, 0, 0)`,W.initialTransform),Gy(W.clientRect,0,st)):(vt.style.transform=HC(`translate3d(0, ${Math.round(W.offset)}px, 0)`,W.initialTransform),Gy(W.clientRect,st,0))}),this._previousSwap.overlaps=jk(P,t,n),this._previousSwap.drag=C.drag,this._previousSwap.delta=l?r.x:r.y,{previousIndex:w,currentIndex:o}}enter(i,t,n,r){const s=null==r||r<0?this._getItemIndexFromPointerPosition(i,t,n):r,o=this._activeDraggables,l=o.indexOf(i),w=i.getPlaceholderElement();let C=o[s];if(C===i&&(C=o[s+1]),!C&&(null==s||-1===s||s-1&&o.splice(l,1),C&&!this._dragDropRegistry.isDragging(C)){const M=C.getRootElement();M.parentElement.insertBefore(w,M),o.splice(s,0,i)}else vs(this._element).appendChild(w),o.push(i);w.style.transform="",this._cacheItemPositions()}withItems(i){this._activeDraggables=i.slice(),this._cacheItemPositions()}withSortPredicate(i){this._sortPredicate=i}reset(){this._activeDraggables.forEach(i=>{const t=i.getRootElement();if(t){const n=this._itemPositions.find(r=>r.drag===i)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(i){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===i)}updateOnScroll(i,t){this._itemPositions.forEach(({clientRect:n})=>{Gy(n,i,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}_cacheItemPositions(){const i="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(t=>{const n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:Xk(n)}}).sort((t,n)=>i?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(i,t,n){const r="horizontal"===this.orientation;let s=r?t.left-i.left:t.top-i.top;return-1===n&&(s+=r?t.width-i.width:t.height-i.height),s}_getSiblingOffsetPx(i,t,n){const r="horizontal"===this.orientation,s=t[i].clientRect,o=t[i+-1*n];let l=s[r?"width":"height"]*n;if(o){const w=r?"left":"top",C=r?"right":"bottom";-1===n?l-=o.clientRect[w]-s[C]:l+=s[w]-o.clientRect[C]}return l}_shouldEnterAsFirstChild(i,t){if(!this._activeDraggables.length)return!1;const n=this._itemPositions,r="horizontal"===this.orientation;if(n[0].drag!==this._activeDraggables[0]){const o=n[n.length-1].clientRect;return r?i>=o.right:t>=o.bottom}{const o=n[0].clientRect;return r?i<=o.left:t<=o.top}}_getItemIndexFromPointerPosition(i,t,n,r){const s="horizontal"===this.orientation,o=this._itemPositions.findIndex(({drag:l,clientRect:w})=>l!==i&&((!r||l!==this._previousSwap.drag||!this._previousSwap.overlaps||(s?r.x:r.y)!==this._previousSwap.delta)&&(s?t>=Math.floor(w.left)&&t=Math.floor(w.top)&&n!0,this.sortPredicate=()=>!0,this.beforeStarted=new Pe,this.entered=new Pe,this.exited=new Pe,this.dropped=new Pe,this.sorted=new Pe,this.receivingStarted=new Pe,this.receivingStopped=new Pe,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=Ie.EMPTY,this._verticalScrollDirection=jl.NONE,this._horizontalScrollDirection=Bo.NONE,this._stopScrollTimers=new Pe,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function jEt(e=0,i=Ty){return e<0&&(e=0),Iy(e,e,i)}(0,zH).pipe(Ui(this._stopScrollTimers)).subscribe(()=>{const o=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===jl.UP?o.scrollBy(0,-l):this._verticalScrollDirection===jl.DOWN&&o.scrollBy(0,l),this._horizontalScrollDirection===Bo.LEFT?o.scrollBy(-l,0):this._horizontalScrollDirection===Bo.RIGHT&&o.scrollBy(l,0)})},this.element=vs(i),this._document=n,this.withScrollableParents([this.element]),t.registerDropContainer(this),this._parentPositions=new aX(n),this._sortStrategy=new ZEt(this.element,t),this._sortStrategy.withSortPredicate((o,l)=>this.sortPredicate(o,l,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(i,t,n,r){this._draggingStarted(),null==r&&this.sortingDisabled&&(r=this._draggables.indexOf(i)),this._sortStrategy.enter(i,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:i,container:this,currentIndex:this.getItemIndex(i)})}exit(i){this._reset(),this.exited.next({item:i,container:this})}drop(i,t,n,r,s,o,l,w={}){this._reset(),this.dropped.next({item:i,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:s,distance:o,dropPoint:l,event:w})}withItems(i){const t=this._draggables;return this._draggables=i,i.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>-1===i.indexOf(r))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(i){return this._sortStrategy.direction=i,this}connectedTo(i){return this._siblings=i.slice(),this}withOrientation(i){return this._sortStrategy.orientation=i,this}withScrollableParents(i){const t=vs(this.element);return this._scrollableElements=-1===i.indexOf(t)?[t,...i]:i.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(i){return this._isDragging?this._sortStrategy.getItemIndex(i):this._draggables.indexOf(i)}isReceiving(){return this._activeSiblings.size>0}_sortItem(i,t,n,r){if(this.sortingDisabled||!this._domRect||!sX(this._domRect,.05,t,n))return;const s=this._sortStrategy.sort(i,t,n,r);s&&this.sorted.next({previousIndex:s.previousIndex,currentIndex:s.currentIndex,container:this,item:i})}_startScrollingIfNecessary(i,t){if(this.autoScrollDisabled)return;let n,r=jl.NONE,s=Bo.NONE;if(this._parentPositions.positions.forEach((o,l)=>{l===this._document||!o.clientRect||n||sX(o.clientRect,.05,i,t)&&([r,s]=function qEt(e,i,t,n,r){const s=vX(i,r),o=xX(i,n);let l=jl.NONE,w=Bo.NONE;if(s){const C=e.scrollTop;s===jl.UP?C>0&&(l=jl.UP):e.scrollHeight-C>e.clientHeight&&(l=jl.DOWN)}if(o){const C=e.scrollLeft;"rtl"===t?o===Bo.RIGHT?C<0&&(w=Bo.RIGHT):e.scrollWidth+C>e.clientWidth&&(w=Bo.LEFT):o===Bo.LEFT?C>0&&(w=Bo.LEFT):e.scrollWidth-C>e.clientWidth&&(w=Bo.RIGHT)}return[l,w]}(l,o.clientRect,this._sortStrategy.direction,i,t),(r||s)&&(n=l))}),!r&&!s){const{width:o,height:l}=this._viewportRuler.getViewportSize(),w={width:o,height:l,top:0,right:o,bottom:l,left:0};r=vX(w,t),s=xX(w,i),n=window}n&&(r!==this._verticalScrollDirection||s!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=s,this._scrollNode=n,(r||s)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const i=vs(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=i.msScrollSnapType||i.scrollSnapType||"",i.scrollSnapType=i.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const i=vs(this.element);this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(i).clientRect}_reset(){this._isDragging=!1;const i=vs(this.element).style;i.scrollSnapType=i.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(i,t){return null!=this._domRect&&jk(this._domRect,i,t)}_getSiblingContainerFromPosition(i,t,n){return this._siblings.find(r=>r._canReceive(i,t,n))}_canReceive(i,t,n){if(!this._domRect||!jk(this._domRect,t,n)||!this.enterPredicate(i,this))return!1;const r=this._getShadowRoot().elementFromPoint(t,n);if(!r)return!1;const s=vs(this.element);return r===s||s.contains(r)}_startReceiving(i,t){const n=this._activeSiblings;!n.has(i)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(i),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:i,receiver:this,items:t}))}_stopReceiving(i){this._activeSiblings.delete(i),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:i,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(i=>{if(this.isDragging()){const t=this._parentPositions.handleScroll(i);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const i=IR(vs(this.element));this._cachedShadowRoot=i||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const i=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,i))}}function vX(e,i){const{top:t,bottom:n,height:r}=e,s=.05*r;return i>=t-s&&i<=t+s?jl.UP:i>=n-s&&i<=n+s?jl.DOWN:jl.NONE}function xX(e,i){const{left:t,right:n,width:r}=e,s=.05*r;return i>=t-s&&i<=t+s?Bo.LEFT:i>=n-s&&i<=n+s?Bo.RIGHT:Bo.NONE}const jC=Cc({passive:!1,capture:!0});let tAt=(()=>{class e{constructor(t,n){this._ngZone=t,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=r=>r.isDragging(),this.pointerMove=new Pe,this.pointerUp=new Pe,this.scroll=new Pe,this._preventDefaultWhileDragging=r=>{this._activeDragInstances.length>0&&r.preventDefault()},this._persistentTouchmoveListener=r=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&r.preventDefault(),this.pointerMove.next(r))},this._document=n}registerDropContainer(t){this._dropInstances.has(t)||this._dropInstances.add(t)}registerDragItem(t){this._dragInstances.add(t),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,jC)})}removeDropContainer(t){this._dropInstances.delete(t)}removeDragItem(t){this._dragInstances.delete(t),this.stopDragging(t),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,jC)}startDragging(t,n){if(!(this._activeDragInstances.indexOf(t)>-1)&&(this._activeDragInstances.push(t),1===this._activeDragInstances.length)){const r=n.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:jC}),r||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:jC}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,o)=>{this._document.addEventListener(o,s.handler,s.options)})})}}stopDragging(t){const n=this._activeDragInstances.indexOf(t);n>-1&&(this._activeDragInstances.splice(n,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(t){return this._activeDragInstances.indexOf(t)>-1}scrolled(t){const n=[this.scroll];return t&&t!==this._document&&n.push(new ur(r=>this._ngZone.runOutsideAngular(()=>{const o=l=>{this._activeDragInstances.length&&r.next(l)};return t.addEventListener("scroll",o,!0),()=>{t.removeEventListener("scroll",o,!0)}}))),Yr(...n)}ngOnDestroy(){this._dragInstances.forEach(t=>this.removeDragItem(t)),this._dropInstances.forEach(t=>this.removeDropContainer(t)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((t,n)=>{this._document.removeEventListener(n,t.handler,t.options)}),this._globalListeners.clear()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ii),Jt(Ni))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const eAt={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let Qk=(()=>{class e{constructor(t,n,r,s){this._document=t,this._ngZone=n,this._viewportRuler=r,this._dragDropRegistry=s}createDrag(t,n=eAt){return new KEt(t,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(t){return new JEt(t,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(ii),Jt(ou),Jt(tAt))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const Xy=new ee("CDK_DRAG_PARENT"),yX=new ee("CdkDragHandle");let bX=(()=>{class e{get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._stateChanges.next(this)}constructor(t,n){this.element=t,this._parentDrag=n,this._stateChanges=new Pe,this._disabled=!1,n?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Xy,12))};static#e=this.\u0275dir=ce({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[Wt.HasDecoratorInputTransform,"cdkDragHandleDisabled","disabled",Je]},standalone:!0,features:[fi([{provide:yX,useExisting:e}]),ln]})}return e})();const wX=new ee("CDK_DRAG_CONFIG"),_X=new ee("CdkDropList");let Kk=(()=>{class e{static#t=this._dragInstances=[];get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(t){this._disabled=t,this._dragRef.disabled=this._disabled}constructor(t,n,r,s,o,l,w,C,M,P,O){this.element=t,this.dropContainer=n,this._ngZone=s,this._viewContainerRef=o,this._dir=w,this._changeDetectorRef=M,this._selfHandle=P,this._parentDrag=O,this._destroyed=new Pe,this._handles=new Wr([]),this.started=new De,this.released=new De,this.ended=new De,this.entered=new De,this.exited=new De,this.dropped=new De,this.moved=new ur(L=>{const U=this._dragRef.moved.pipe(Di(X=>({source:this,pointerPosition:X.pointerPosition,event:X.event,delta:X.delta,distance:X.distance}))).subscribe(L);return()=>{U.unsubscribe()}}),this._dragRef=C.createDrag(t,{dragStartThreshold:l&&null!=l.dragStartThreshold?l.dragStartThreshold:5,pointerDirectionChangeThreshold:l&&null!=l.pointerDirectionChangeThreshold?l.pointerDirectionChangeThreshold:5,zIndex:l?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),l&&this._assignDefaults(l),n&&(this._dragRef._withDropContainer(n._dropListRef),n.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(t){this._dragRef.setFreeDragPosition(t)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(er(1),Ui(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(t){const n=t.rootElementSelector,r=t.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const t=e._dragInstances.indexOf(this);t>-1&&e._dragInstances.splice(t,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(t){const n=this._handles.getValue();n.push(t),this._handles.next(n)}_removeHandle(t){const n=this._handles.getValue(),r=n.indexOf(t);r>-1&&(n.splice(r,1),this._handles.next(n))}_setPreviewTemplate(t){this._previewTemplate=t}_resetPreviewTemplate(t){t===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(t){this._placeholderTemplate=t}_resetPlaceholderTemplate(t){t===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){const t=this.element.nativeElement;let n=t;this.rootElementSelector&&(n=void 0!==t.closest?t.closest(this.rootElementSelector):t.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||t)}_getBoundaryElement(){const t=this.boundaryElement;return t?"string"==typeof t?this.element.nativeElement.closest(t):vs(t):null}_syncInputs(t){t.beforeStarted.subscribe(()=>{if(!t.isDragging()){const n=this._dir,r=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,o=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.dragStartDelay="object"==typeof r&&r?r:Ch(r),t.constrainPosition=this.constrainPosition,t.previewClass=this.previewClass,t.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(o).withPreviewContainer(this.previewContainer||"global"),n&&t.withDirection(n.value)}}),t.beforeStarted.pipe(er(1)).subscribe(()=>{if(this._parentDrag)return void t.withParent(this._parentDrag._dragRef);let n=this.element.nativeElement.parentElement;for(;n;){if(n.classList.contains("cdk-drag")){t.withParent(e._dragInstances.find(r=>r.element.nativeElement===n)?._dragRef||null);break}n=n.parentElement}})}_handleEvents(t){t.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),t.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),t.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(t){const{lockAxis:n,dragStartDelay:r,constrainPosition:s,previewClass:o,boundaryElement:l,draggingDisabled:w,rootElementSelector:C,previewContainer:M}=t;this.disabled=w??!1,this.dragStartDelay=r||0,n&&(this.lockAxis=n),s&&(this.constrainPosition=s),o&&(this.previewClass=o),l&&(this.boundaryElement=l),C&&(this.rootElementSelector=C),M&&(this.previewContainer=M)}_setupHandlesListener(){this._handles.pipe(hs(t=>{const n=t.map(r=>r.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),Rs(t=>Yr(...t.map(n=>n._stateChanges.pipe(Ta(n))))),Ui(this._destroyed)).subscribe(t=>{const n=this._dragRef,r=t.element.nativeElement;t.disabled?n.disableHandle(r):n.enableHandle(r)})}static#e=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(_X,12),mt(Ni),mt(ii),mt(Ir),mt(wX,8),mt(Ba,8),mt(Qk),mt(Mn),mt(yX,10),mt(Xy,12))};static#i=this.\u0275dir=ce({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){2&n&&bi("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[Wt.None,"cdkDragData","data"],lockAxis:[Wt.None,"cdkDragLockAxis","lockAxis"],rootElementSelector:[Wt.None,"cdkDragRootElement","rootElementSelector"],boundaryElement:[Wt.None,"cdkDragBoundary","boundaryElement"],dragStartDelay:[Wt.None,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[Wt.None,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[Wt.HasDecoratorInputTransform,"cdkDragDisabled","disabled",Je],constrainPosition:[Wt.None,"cdkDragConstrainPosition","constrainPosition"],previewClass:[Wt.None,"cdkDragPreviewClass","previewClass"],previewContainer:[Wt.None,"cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[fi([{provide:Xy,useExisting:e}]),ln,tr]})}return e})();const Zk=new ee("CdkDropListGroup");let rAt=0,Jk=(()=>{class e{static#t=this._dropLists=[];get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(t){this._dropListRef.disabled=this._disabled=t}constructor(t,n,r,s,o,l,w){this.element=t,this._changeDetectorRef=r,this._scrollDispatcher=s,this._dir=o,this._group=l,this._destroyed=new Pe,this.connectedTo=[],this.id="cdk-drop-list-"+rAt++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new De,this.entered=new De,this.exited=new De,this.sorted=new De,this._unsortedItems=new Set,this._dropListRef=n.createDropList(t),this._dropListRef.data=this,w&&this._assignDefaults(w),this._dropListRef.enterPredicate=(C,M)=>this.enterPredicate(C.data,M.data),this._dropListRef.sortPredicate=(C,M,P)=>this.sortPredicate(C,M.data,P.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),e._dropLists.push(this),l&&l._items.add(this)}addItem(t){this._unsortedItems.add(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(t){this._unsortedItems.delete(t),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((t,n)=>t._dragRef.getVisibleElement().compareDocumentPosition(n._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const t=e._dropLists.indexOf(this);t>-1&&e._dropLists.splice(t,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(t){this._dir&&this._dir.change.pipe(Ta(this._dir.value),Ui(this._destroyed)).subscribe(n=>t.withDirection(n)),t.beforeStarted.subscribe(()=>{const n=Cy(this.connectedTo).map(r=>"string"==typeof r?e._dropLists.find(o=>o.id===r):r);if(this._group&&this._group._items.forEach(r=>{-1===n.indexOf(r)&&n.push(r)}),!this._scrollableParentsResolved){const r=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(s=>s.getElementRef().nativeElement);this._dropListRef.withScrollableParents(r),this._scrollableParentsResolved=!0}t.disabled=this.disabled,t.lockAxis=this.lockAxis,t.sortingDisabled=this.sortingDisabled,t.autoScrollDisabled=this.autoScrollDisabled,t.autoScrollStep=Ch(this.autoScrollStep,2),t.connectedTo(n.filter(r=>r&&r!==this).map(r=>r._dropListRef)).withOrientation(this.orientation)})}_handleEvents(t){t.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),t.entered.subscribe(n=>{this.entered.emit({container:this,item:n.item.data,currentIndex:n.currentIndex})}),t.exited.subscribe(n=>{this.exited.emit({container:this,item:n.item.data}),this._changeDetectorRef.markForCheck()}),t.sorted.subscribe(n=>{this.sorted.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,container:this,item:n.item.data})}),t.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,item:n.item.data,isPointerOverContainer:n.isPointerOverContainer,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),Yr(t.receivingStarted,t.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(t){const{lockAxis:n,draggingDisabled:r,sortingDisabled:s,listAutoScrollDisabled:o,listOrientation:l}=t;this.disabled=r??!1,this.sortingDisabled=s??!1,this.autoScrollDisabled=o??!1,this.orientation=l||"vertical",n&&(this.lockAxis=n)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(t=>t._dragRef))}static#e=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Qk),mt(Mn),mt(Ry),mt(Ba,8),mt(Zk,12),mt(wX,8))};static#i=this.\u0275dir=ce({type:e,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(n,r){2&n&&(Ti("id",r.id),bi("cdk-drop-list-disabled",r.disabled)("cdk-drop-list-dragging",r._dropListRef.isDragging())("cdk-drop-list-receiving",r._dropListRef.isReceiving()))},inputs:{connectedTo:[Wt.None,"cdkDropListConnectedTo","connectedTo"],data:[Wt.None,"cdkDropListData","data"],orientation:[Wt.None,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[Wt.None,"cdkDropListLockAxis","lockAxis"],disabled:[Wt.HasDecoratorInputTransform,"cdkDropListDisabled","disabled",Je],sortingDisabled:[Wt.HasDecoratorInputTransform,"cdkDropListSortingDisabled","sortingDisabled",Je],enterPredicate:[Wt.None,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[Wt.None,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[Wt.HasDecoratorInputTransform,"cdkDropListAutoScrollDisabled","autoScrollDisabled",Je],autoScrollStep:[Wt.None,"cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[fi([{provide:Zk,useValue:void 0},{provide:_X,useExisting:e}]),ln]})}return e})(),lAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[Qk],imports:[lu]})}return e})();function cAt(e,i){}class YC{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}}let TX=(()=>{class e extends sC{constructor(t,n,r,s,o,l,w,C){super(),this._elementRef=t,this._focusTrapFactory=n,this._config=s,this._interactivityChecker=o,this._ngZone=l,this._overlayRef=w,this._focusMonitor=C,this._platform=me(ir),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=me(Mn),this.attachDomPortal=M=>{this._portalOutlet.hasAttached();const P=this._portalOutlet.attachDomPortal(M);return this._contentAttached(),P},this._document=r,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){const n=this._ariaLabelledByQueue.indexOf(t);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();const n=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),n}attachTemplatePortal(t){this._portalOutlet.hasAttached();const n=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(n)}_focusByCssSelector(t,n){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,n)}_trapFocus(){const t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElementWhenReady().then(n=>{n||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){const t=this._config.restoreFocus;let n=null;if("string"==typeof t?n=this._document.querySelector(t):"boolean"==typeof t?n=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(n=t),this._config.restoreFocus&&n&&"function"==typeof n.focus){const r=GT(),s=this._elementRef.nativeElement;(!r||r===this._document.body||r===s||s.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){const t=this._elementRef.nativeElement,n=GT();return t===n||t.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=GT()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(UR),mt(Ni,8),mt(YC),mt(QT),mt(ii),mt(dC),mt(Ul))};static#e=this.\u0275cmp=je({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(1&n&&Mi(au,7),2&n){let s;Be(s=Ve())&&(r._portalOutlet=s.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){2&n&&Ti("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},standalone:!0,features:[hi,Vi],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){1&n&&Gt(0,cAt,0,0,"ng-template",0)},dependencies:[au],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}return e})();class qk{constructor(i,t){this.overlayRef=i,this.config=t,this.closed=new Pe,this.disableClose=t.disableClose,this.backdropClick=i.backdropClick(),this.keydownEvents=i.keydownEvents(),this.outsidePointerEvents=i.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{27===n.keyCode&&!this.disableClose&&!io(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=i.detachments().subscribe(()=>{!1!==t.closeOnOverlayDetachments&&this.close()})}close(i,t){if(this.containerInstance){const n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(i),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(i="",t=""){return this.overlayRef.updateSize({width:i,height:t}),this}addPanelClass(i){return this.overlayRef.addPanelClass(i),this}removePanelClass(i){return this.overlayRef.removePanelClass(i),this}}const CX=new ee("DialogScrollStrategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.block()}}),dAt=new ee("DialogData"),uAt=new ee("DefaultDialogConfig");let fAt=0,SX=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,n,r,s,o,l){this._overlay=t,this._injector=n,this._defaultOptions=r,this._parentDialog=s,this._overlayContainer=o,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Pe,this._afterOpenedAtThisLevel=new Pe,this._ariaHiddenElements=new Map,this.afterAllClosed=Dg(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ta(void 0))),this._scrollStrategy=l}open(t,n){(n={...this._defaultOptions||new YC,...n}).id=n.id||"cdk-dialog-"+fAt++,n.id&&this.getDialogById(n.id);const s=this._getOverlayConfig(n),o=this._overlay.create(s),l=new qk(o,n),w=this._attachContainer(o,l,n);return l.containerInstance=w,this._attachDialogContent(t,l,w,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){tP(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){tP(this._openDialogsAtThisLevel,t=>{!1===t.config.closeOnDestroy&&this._removeOpenDialog(t,!1)}),tP(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){const n=new qg({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(n.backdropClass=t.backdropClass),n}_attachContainer(t,n,r){const s=r.injector||r.viewContainerRef?.injector,o=[{provide:YC,useValue:r},{provide:qk,useValue:n},{provide:dC,useValue:t}];let l;r.container?"function"==typeof r.container?l=r.container:(l=r.container.type,o.push(...r.container.providers(r))):l=TX;const w=new Zg(l,r.viewContainerRef,is.create({parent:s||this._injector,providers:o}),r.componentFactoryResolver);return t.attach(w).instance}_attachDialogContent(t,n,r,s){if(t instanceof fr){const o=this._createInjector(s,n,r,void 0);let l={$implicit:s.data,dialogRef:n};s.templateContext&&(l={...l,..."function"==typeof s.templateContext?s.templateContext():s.templateContext}),r.attachTemplatePortal(new su(t,null,l,o))}else{const o=this._createInjector(s,n,r,this._injector),l=r.attachComponentPortal(new Zg(t,s.viewContainerRef,o,s.componentFactoryResolver));n.componentRef=l,n.componentInstance=l.instance}}_createInjector(t,n,r,s){const o=t.injector||t.viewContainerRef?.injector,l=[{provide:dAt,useValue:t.data},{provide:qk,useValue:n}];return t.providers&&("function"==typeof t.providers?l.push(...t.providers(n,t,r)):l.push(...t.providers)),t.direction&&(!o||!o.get(Ba,null,{optional:!0}))&&l.push({provide:Ba,useValue:{value:t.direction,change:vi()}}),is.create({parent:o||s,providers:l})}_removeOpenDialog(t,n){const r=this.openDialogs.indexOf(t);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,o)=>{s?o.setAttribute("aria-hidden",s):o.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){const t=this._overlayContainer.getContainerElement();if(t.parentElement){const n=t.parentElement.children;for(let r=n.length-1;r>-1;r--){const s=n[r];s!==t&&"SCRIPT"!==s.nodeName&&"STYLE"!==s.nodeName&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xs),Jt(is),Jt(uAt,8),Jt(e,12),Jt(cC),Jt(CX))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function tP(e,i){let t=e.length;for(;t--;)i(e[t])}let mAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[SX],imports:[qf,Jg,yH,Jg]})}return e})();function pAt(e,i){}class eP{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}}const iP="mdc-dialog--open",EX="mdc-dialog--opening",AX="mdc-dialog--closing";let DX=(()=>{class e extends TX{constructor(t,n,r,s,o,l,w,C,M){super(t,n,r,s,o,l,w,M),this._animationMode=C,this._animationStateChanged=new De,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?IX(this._config.enterAnimationDuration)??150:0,this._exitAnimationDuration=this._animationsEnabled?IX(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(MX,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(EX,iP)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(iP),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(iP),this._animationsEnabled?(this._hostElement.style.setProperty(MX,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(AX)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(EX,AX)}_waitForAnimationToComplete(t,n){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t})}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}attachComponentPortal(t){const n=super.attachComponentPortal(t);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(UR),mt(Ni,8),mt(eP),mt(QT),mt(ii),mt(dC),mt(Nr,8),mt(Ul))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,r){2&n&&(Kc("id",r._config.id),Ti("aria-modal",r._config.ariaModal)("role",r._config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),bi("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},standalone:!0,features:[hi,Vi],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"div",1),Gt(2,pAt,0,0,"ng-template",2),et()())},dependencies:[au],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto;outline:0;transform:scale(0.8)}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--closing .mdc-dialog__surface{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{opacity:1}.mdc-dialog--open .mdc-dialog__surface{transform:none}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__container .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{width:100%;height:100%}.mat-mdc-dialog-component-host{display:contents}.mat-mdc-dialog-container{--mdc-dialog-container-elevation: var(--mdc-dialog-container-elevation-shadow);outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, 4px)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87))}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6))}.mat-mdc-dialog-container .mdc-dialog__container{transition:opacity linear var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container .mdc-dialog__surface{transition:transform var(--mat-dialog-transition-duration, 0ms) 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container,.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__surface{transition:none}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-title{padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2})}return e})();const MX="--mat-dialog-transition-duration";function IX(e){return null==e?null:"number"==typeof e?e:e.endsWith("ms")?Ch(e.substring(0,e.length-2)):e.endsWith("s")?1e3*Ch(e.substring(0,e.length-1)):"0"===e?0:null}var $C=function(e){return e[e.OPEN=0]="OPEN",e[e.CLOSING=1]="CLOSING",e[e.CLOSED=2]="CLOSED",e}($C||{});class Oh{constructor(i,t,n){this._ref=i,this._containerInstance=n,this._afterOpened=new Pe,this._beforeClosed=new Pe,this._state=$C.OPEN,this.disableClose=t.disableClose,this.id=i.id,i.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(In(r=>"opened"===r.state),er(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(In(r=>"closed"===r.state),er(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),i.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Yr(this.backdropClick(),this.keydownEvents().pipe(In(r=>27===r.keyCode&&!this.disableClose&&!io(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),RX(this,"keydown"===r.type?"keyboard":"mouse"))})}close(i){this._result=i,this._containerInstance._animationStateChanged.pipe(In(t=>"closing"===t.state),er(1)).subscribe(t=>{this._beforeClosed.next(i),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=$C.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(i){let t=this._ref.config.positionStrategy;return i&&(i.left||i.right)?i.left?t.left(i.left):t.right(i.right):t.centerHorizontally(),i&&(i.top||i.bottom)?i.top?t.top(i.top):t.bottom(i.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(i="",t=""){return this._ref.updateSize(i,t),this}addPanelClass(i){return this._ref.addPanelClass(i),this}removePanelClass(i){return this._ref.removePanelClass(i),this}getState(){return this._state}_finishDialogClose(){this._state=$C.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}}function RX(e,i,t){return e._closeInteractionType=i,e.close(t)}const QC=new ee("MatMdcDialogData"),xAt=new ee("mat-mdc-dialog-default-options"),kX=new ee("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{const e=me(xs);return()=>e.scrollStrategies.block()}});let bAt=0,lm=(()=>{class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){const t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,n,r,s,o,l,w,C){this._overlay=t,this._defaultOptions=s,this._scrollStrategy=o,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Pe,this._afterOpenedAtThisLevel=new Pe,this.dialogConfigClass=eP,this.afterAllClosed=Dg(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(Ta(void 0))),this._dialog=n.get(SX),this._dialogRefConstructor=Oh,this._dialogContainerType=DX,this._dialogDataToken=QC}open(t,n){let r;(n={...this._defaultOptions||new eP,...n}).id=n.id||"mat-mdc-dialog-"+bAt++,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();const s=this._dialog.open(t,{...n,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:YC,useValue:n}]},templateContext:()=>({dialogRef:r}),providers:(o,l,w)=>(r=new this._dialogRefConstructor(o,n,w),r.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:w},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentRef=s.componentRef,r.componentInstance=s.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{const o=this.openDialogs.indexOf(r);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let n=t.length;for(;n--;)t[n].close()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(xs),Jt(is),Jt(Xf,8),Jt(xAt,8),Jt(kX),Jt(e,12),Jt(cC),Jt(Nr,8))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),wAt=0,dv=(()=>{class e{constructor(t,n,r){this.dialogRef=t,this._elementRef=n,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=FX(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){const n=t._matDialogClose||t._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(t){RX(this.dialogRef,0===t.screenX&&0===t.screenY?"keyboard":"mouse",this.dialogResult)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh,8),mt(si),mt(lm))};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,r){1&n&&Vt("click",function(o){return r._onButtonClick(o)}),2&n&&Ti("aria-label",r.ariaLabel||null)("type",r.type)},inputs:{ariaLabel:[Wt.None,"aria-label","ariaLabel"],type:"type",dialogResult:[Wt.None,"mat-dialog-close","dialogResult"],_matDialogClose:[Wt.None,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[tr]})}return e})(),PX=(()=>{class e{constructor(t,n,r){this._dialogRef=t,this._elementRef=n,this._dialog=r}ngOnInit(){this._dialogRef||(this._dialogRef=FX(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh,8),mt(si),mt(lm))};static#e=this.\u0275dir=ce({type:e,standalone:!0})}return e})(),nP=(()=>{class e extends PX{constructor(){super(...arguments),this.id="mat-mdc-dialog-title-"+wAt++}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(n,r){2&n&&Kc("id",r.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[hi]})}return e})(),jy=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0})}return e})(),Yy=(()=>{class e extends PX{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static#t=this.\u0275fac=(()=>{let t;return function(r){return(t||(t=wn(e)))(r||e)}})();static#e=this.\u0275dir=ce({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(n,r){2&n&&bi("mat-mdc-dialog-actions-align-start","start"===r.align)("mat-mdc-dialog-actions-align-center","center"===r.align)("mat-mdc-dialog-actions-align-end","end"===r.align)},inputs:{align:"align"},standalone:!0,features:[hi]})}return e})();function FX(e,i){let t=e.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?i.find(n=>n.id===t.id):null}let _At=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[lm],imports:[mAt,qf,Jg,Ki,Ki]})}return e})(),TAt=(()=>{class e{constructor(t,n){this.dialogRef=t,this.data=n,this.localEcl="",this.localEcl=n.ecl}onNoClick(){this.dialogRef.close()}eclChanged(t){this.data.ecl=t?.detail[0]}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh),mt(QC))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-ecl-builder-dialog"]],decls:7,vars:2,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"full-height"],["apiurl","https://snowstorm.ihtsdotools.org/snowstorm/snomed-ct","branch","MAIN/2023-01-31","v-on:eclOutput","eclChange",3,"eclOutput","eclstring"],["mat-dialog-actions","",1,"actions"],["mat-flat-button","","color","accent","cdkFocusInitial","",3,"mat-dialog-close"]],template:function(n,r){1&n&&(tt(0,"h1",0),ut(1,"ECL Builder"),et(),tt(2,"div",1)(3,"snomed-ecl-builder",2),Vt("eclOutput",function(o){return r.eclChanged(o)}),et()(),tt(4,"div",3)(5,"button",4),ut(6,"Ok"),et()()),2&n&&(lt(3),hh("eclstring",r.localEcl),lt(2),yt("mat-dialog-close",r.data))},dependencies:[Sa,dv,nP,Yy,jy],styles:[".full-height[_ngcontent-%COMP%]{height:78%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"]})}return e})();const LX=new ee("CdkAccordion");let CAt=0,SAt=(()=>{class e{get expanded(){return this._expanded}set expanded(t){this._expanded!==t&&(this._expanded=t,this.expandedChange.emit(t),t?(this.opened.emit(),this._expansionDispatcher.notify(this.id,this.accordion?this.accordion.id:this.id)):this.closed.emit(),this._changeDetectorRef.markForCheck())}constructor(t,n,r){this.accordion=t,this._changeDetectorRef=n,this._expansionDispatcher=r,this._openCloseAllSubscription=Ie.EMPTY,this.closed=new De,this.opened=new De,this.destroyed=new De,this.expandedChange=new De,this.id="cdk-accordion-child-"+CAt++,this._expanded=!1,this.disabled=!1,this._removeUniqueSelectionListener=()=>{},this._removeUniqueSelectionListener=r.listen((s,o)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===o&&this.id!==s&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(t=>{this.disabled||(this.expanded=t)})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(LX,12),mt(Mn),mt(wR))};static#e=this.\u0275dir=ce({type:e,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[Wt.HasDecoratorInputTransform,"expanded","expanded",Je],disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],standalone:!0,features:[fi([{provide:LX,useValue:void 0}]),ln]})}return e})(),EAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({})}return e})();const AAt=["body"],DAt=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],MAt=["mat-expansion-panel-header","*","mat-action-row"];function IAt(e,i){}const RAt=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],kAt=["mat-panel-title","mat-panel-description","*"];function PAt(e,i){1&e&&(tt(0,"span",1),ul(),tt(1,"svg",2),we(2,"path",3),et()()),2&e&&yt("@indicatorRotate",Ct()._getExpandedState())}const NX=new ee("MAT_ACCORDION"),BX="225ms cubic-bezier(0.4,0.0,0.2,1)",VX={indicatorRotate:mr("indicatorRotate",[Rn("collapsed, void",qe({transform:"rotate(0deg)"})),Rn("expanded",qe({transform:"rotate(180deg)"})),on("expanded <=> collapsed, void => collapsed",sn(BX))]),bodyExpansion:mr("bodyExpansion",[Rn("collapsed, void",qe({height:"0px",visibility:"hidden"})),Rn("expanded",qe({height:"*",visibility:""})),on("expanded <=> collapsed, void => collapsed",sn(BX))])},UX=new ee("MAT_EXPANSION_PANEL");let FAt=(()=>{class e{constructor(t,n){this._template=t,this._expansionPanel=n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(fr),mt(UX,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["ng-template","matExpansionPanelContent",""]],standalone:!0})}return e})(),OAt=0;const zX=new ee("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS");let GX=(()=>{class e extends SAt{get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(t){this._hideToggle=t}get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(t){this._togglePosition=t}constructor(t,n,r,s,o,l,w){super(t,n,r),this._viewContainerRef=s,this._animationMode=l,this._hideToggle=!1,this.afterExpand=new De,this.afterCollapse=new De,this._inputChanges=new Pe,this._headerId="mat-expansion-panel-header-"+OAt++,this.accordion=t,this._document=o,this._animationsDisabled="NoopAnimations"===l,w&&(this.hideToggle=w.hideToggle)}_hasSpacing(){return!!this.accordion&&this.expanded&&"default"===this.accordion.displayMode}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Ta(null),In(()=>this.expanded&&!this._portal),er(1)).subscribe(()=>{this._portal=new su(this._lazyContent._template,this._viewContainerRef)})}ngOnChanges(t){this._inputChanges.next(t)}ngOnDestroy(){super.ngOnDestroy(),this._inputChanges.complete()}_containsFocus(){if(this._body){const t=this._document.activeElement,n=this._body.nativeElement;return t===n||n.contains(t)}return!1}_animationStarted(t){!HX(t)&&!this._animationsDisabled&&this._body&&this._body?.nativeElement.setAttribute("inert","")}_animationDone(t){HX(t)||("expanded"===t.toState?this.afterExpand.emit():"collapsed"===t.toState&&this.afterCollapse.emit(),!this._animationsDisabled&&this._body&&this._body.nativeElement.removeAttribute("inert"))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(NX,12),mt(Mn),mt(wR),mt(Ir),mt(Ni),mt(Nr,8),mt(zX,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-expansion-panel"]],contentQueries:function(n,r,s){if(1&n&&An(s,FAt,5),2&n){let o;Be(o=Ve())&&(r._lazyContent=o.first)}},viewQuery:function(n,r){if(1&n&&Mi(AAt,5),2&n){let s;Be(s=Ve())&&(r._body=s.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:6,hostBindings:function(n,r){2&n&&bi("mat-expanded",r.expanded)("_mat-animation-noopable",r._animationsDisabled)("mat-expansion-panel-spacing",r._hasSpacing())},inputs:{hideToggle:[Wt.HasDecoratorInputTransform,"hideToggle","hideToggle",Je],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],standalone:!0,features:[fi([{provide:NX,useValue:void 0},{provide:UX,useExisting:e}]),ln,hi,tr,Vi],ngContentSelectors:MAt,decls:7,vars:4,consts:[["body",""],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(n,r){if(1&n){const s=ve();Kn(DAt),xi(0),tt(1,"div",1,0),Vt("@bodyExpansion.start",function(l){return Ut(s),zt(r._animationStarted(l))})("@bodyExpansion.done",function(l){return Ut(s),zt(r._animationDone(l))}),tt(3,"div",2),xi(4,1),Gt(5,IAt,0,0,"ng-template",3),et(),xi(6,2),et()}2&n&&(lt(),yt("@bodyExpansion",r._getExpandedState())("id",r.id),Ti("aria-labelledby",r._headerId),lt(4),yt("cdkPortalOutlet",r._portal))},dependencies:[au],styles:['.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);position:relative;background:var(--mat-expansion-container-background-color);color:var(--mat-expansion-container-text-color);border-radius:var(--mat-expansion-container-shape)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape);border-top-left-radius:var(--mat-expansion-container-shape)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape);border-bottom-left-radius:var(--mat-expansion-container-shape)}.cdk-high-contrast-active .mat-expansion-panel{outline:solid 1px}.mat-expansion-panel.ng-animate-disabled,.ng-animate-disabled .mat-expansion-panel,.mat-expansion-panel._mat-animation-noopable{transition:none}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;font-family:var(--mat-expansion-container-text-font);font-size:var(--mat-expansion-container-text-size);font-weight:var(--mat-expansion-container-text-weight);line-height:var(--mat-expansion-container-text-line-height);letter-spacing:var(--mat-expansion-container-text-tracking)}.mat-expansion-panel-content[style*="visibility: hidden"] *{visibility:hidden !important}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color)}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2,data:{animation:[VX.bodyExpansion]},changeDetection:0})}return e})();function HX(e){return"void"===e.fromState}let LAt=(()=>{class e{constructor(t,n,r,s,o,l,w){this.panel=t,this._element=n,this._focusMonitor=r,this._changeDetectorRef=s,this._animationMode=l,this._parentChangeSubscription=Ie.EMPTY,this.tabIndex=0;const C=t.accordion?t.accordion._stateChanges.pipe(In(M=>!(!M.hideToggle&&!M.togglePosition))):Zo;this.tabIndex=parseInt(w||"")||0,this._parentChangeSubscription=Yr(t.opened,t.closed,C,t._inputChanges.pipe(In(M=>!!(M.hideToggle||M.disabled||M.togglePosition)))).subscribe(()=>this._changeDetectorRef.markForCheck()),t.closed.pipe(In(()=>t._containsFocus())).subscribe(()=>r.focusVia(n,"program")),o&&(this.expandedHeight=o.expandedHeight,this.collapsedHeight=o.collapsedHeight)}get disabled(){return this.panel.disabled}_toggle(){this.disabled||this.panel.toggle()}_isExpanded(){return this.panel.expanded}_getExpandedState(){return this.panel._getExpandedState()}_getPanelId(){return this.panel.id}_getTogglePosition(){return this.panel.togglePosition}_showToggle(){return!this.panel.hideToggle&&!this.panel.disabled}_getHeaderHeight(){const t=this._isExpanded();return t&&this.expandedHeight?this.expandedHeight:!t&&this.collapsedHeight?this.collapsedHeight:null}_keydown(t){switch(t.keyCode){case 32:case 13:io(t)||(t.preventDefault(),this._toggle());break;default:return void(this.panel.accordion&&this.panel.accordion._handleHeaderKeydown(t))}}focus(t,n){t?this._focusMonitor.focusVia(this._element,t,n):this._element.nativeElement.focus(n)}ngAfterViewInit(){this._focusMonitor.monitor(this._element).subscribe(t=>{t&&this.panel.accordion&&this.panel.accordion._handleHeaderFocus(this)})}ngOnDestroy(){this._parentChangeSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._element)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(GX,1),mt(si),mt(Ul),mt(Mn),mt(zX,8),mt(Nr,8),hl("tabindex"))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-expansion-panel-header"]],hostAttrs:["role","button",1,"mat-expansion-panel-header","mat-focus-indicator"],hostVars:15,hostBindings:function(n,r){1&n&&Vt("click",function(){return r._toggle()})("keydown",function(o){return r._keydown(o)}),2&n&&(Ti("id",r.panel._headerId)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r._getPanelId())("aria-expanded",r._isExpanded())("aria-disabled",r.panel.disabled),Ds("height",r._getHeaderHeight()),bi("mat-expanded",r._isExpanded())("mat-expansion-toggle-indicator-after","after"===r._getTogglePosition())("mat-expansion-toggle-indicator-before","before"===r._getTogglePosition())("_mat-animation-noopable","NoopAnimations"===r._animationMode))},inputs:{expandedHeight:"expandedHeight",collapsedHeight:"collapsedHeight",tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)]},standalone:!0,features:[ln,Vi],ngContentSelectors:kAt,decls:5,vars:3,consts:[[1,"mat-content"],[1,"mat-expansion-indicator"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 -960 960 960","aria-hidden","true","focusable","false"],["d","M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"]],template:function(n,r){1&n&&(Kn(RAt),tt(0,"span",0),xi(1),xi(2,1),xi(3,2),et(),Gt(4,PAt,3,1,"span",1)),2&n&&(bi("mat-content-hide-toggle",!r._showToggle()),lt(4),xn(4,r._showToggle()?4:-1))},styles:['.mat-expansion-panel-header{display:flex;flex-direction:row;align-items:center;padding:0 24px;border-radius:inherit;transition:height 225ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-expansion-header-collapsed-state-height);font-family:var(--mat-expansion-header-text-font);font-size:var(--mat-expansion-header-text-size);font-weight:var(--mat-expansion-header-text-weight);line-height:var(--mat-expansion-header-text-line-height);letter-spacing:var(--mat-expansion-header-text-tracking)}.mat-expansion-panel-header.mat-expanded{height:var(--mat-expansion-header-expanded-state-height)}.mat-expansion-panel-header[aria-disabled=true]{color:var(--mat-expansion-header-disabled-state-text-color)}.mat-expansion-panel-header:not([aria-disabled=true]){cursor:pointer}.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-header-hover-state-layer-color)}@media(hover: none){.mat-expansion-panel:not(.mat-expanded) .mat-expansion-panel-header:not([aria-disabled=true]):hover{background:var(--mat-expansion-container-background-color)}}.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-keyboard-focused,.mat-expansion-panel .mat-expansion-panel-header:not([aria-disabled=true]).cdk-program-focused{background:var(--mat-expansion-header-focus-state-layer-color)}.mat-expansion-panel-header._mat-animation-noopable{transition:none}.mat-expansion-panel-header:focus,.mat-expansion-panel-header:hover{outline:none}.mat-expansion-panel-header.mat-expanded:focus,.mat-expansion-panel-header.mat-expanded:hover{background:inherit}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before{flex-direction:row-reverse}.mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 16px 0 0}[dir=rtl] .mat-expansion-panel-header.mat-expansion-toggle-indicator-before .mat-expansion-indicator{margin:0 0 0 16px}.mat-content{display:flex;flex:1;flex-direction:row;overflow:hidden}.mat-content.mat-content-hide-toggle{margin-right:8px}[dir=rtl] .mat-content.mat-content-hide-toggle{margin-right:0;margin-left:8px}.mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-left:24px;margin-right:0}[dir=rtl] .mat-expansion-toggle-indicator-before .mat-content.mat-content-hide-toggle{margin-right:24px;margin-left:0}.mat-expansion-panel-header-title{color:var(--mat-expansion-header-text-color)}.mat-expansion-panel-header-title,.mat-expansion-panel-header-description{display:flex;flex-grow:1;flex-basis:0;margin-right:16px;align-items:center}[dir=rtl] .mat-expansion-panel-header-title,[dir=rtl] .mat-expansion-panel-header-description{margin-right:0;margin-left:16px}.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-title,.mat-expansion-panel-header[aria-disabled=true] .mat-expansion-panel-header-description{color:inherit}.mat-expansion-panel-header-description{flex-grow:2;color:var(--mat-expansion-header-description-color)}.mat-expansion-indicator::after{border-style:solid;border-width:0 2px 2px 0;content:"";display:inline-block;padding:3px;transform:rotate(45deg);vertical-align:middle;color:var(--mat-expansion-header-indicator-color);display:inline-block;display:var(--mat-expansion-legacy-header-indicator-display, inline-block)}.mat-expansion-indicator svg{width:24px;height:24px;margin:0 -8px;vertical-align:middle;fill:var(--mat-expansion-header-indicator-color);display:none;display:var(--mat-expansion-header-indicator-display, none)}.cdk-high-contrast-active .mat-expansion-panel-content{border-top:1px solid;border-top-left-radius:0;border-top-right-radius:0}'],encapsulation:2,data:{animation:[VX.indicatorRotate]},changeDetection:0})}return e})(),NAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-panel-description"]],hostAttrs:[1,"mat-expansion-panel-header-description"],standalone:!0})}return e})(),BAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-panel-title"]],hostAttrs:[1,"mat-expansion-panel-header-title"],standalone:!0})}return e})(),VAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,EAt,Jg]})}return e})();function UAt(e,i){if(1&e){const t=ve();tt(0,"mat-option",2),Vt("click",function(){return Ut(t),zt(Ct().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t.display," ")}}let WX=(()=>{class e{constructor(t){this.terminologyService=t,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>this.options=t.expansion.contains)}optionClicked(){this.selectionChange.emit(this.selectedOptions)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-dropdown-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:7,vars:5,consts:[[3,"ngModelChange","multiple","ngModel"],[3,"value","click",4,"ngFor","ngForOf"],[3,"click","value"]],template:function(n,r){1&n&&(tt(0,"mat-form-field")(1,"mat-label"),ut(2),et(),tt(3,"mat-select",0),wa("ngModelChange",function(o){return Na(r.selectedOptions,o)||(r.selectedOptions=o),o}),Gt(4,UAt,2,2,"mat-option",1),et(),tt(5,"mat-hint"),ut(6),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),yt("multiple","Select (Multiple)"==r.binding.type),ba("ngModel",r.selectedOptions),lt(),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,Xl,wl,om,nu,No,lv,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();const zAt=["input"],GAt=["formField"],HAt=["*"];let XX=0;class jX{constructor(i,t){this.source=i,this.value=t}}const WAt={provide:ua,useExisting:Sn(()=>rP),multi:!0},YX=new ee("MatRadioGroup"),XAt=new ee("mat-radio-default-options",{providedIn:"root",factory:function jAt(){return{color:"accent"}}});let rP=(()=>{class e{get name(){return this._name}set name(t){this._name=t,this._updateRadioButtonNames()}get labelPosition(){return this._labelPosition}set labelPosition(t){this._labelPosition="before"===t?"before":"after",this._markRadiosForCheck()}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,this._updateSelectedRadioFromValue(),this._checkSelectedRadioButton())}_checkSelectedRadioButton(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)}get selected(){return this._selected}set selected(t){this._selected=t,this.value=t?t.value:null,this._checkSelectedRadioButton()}get disabled(){return this._disabled}set disabled(t){this._disabled=t,this._markRadiosForCheck()}get required(){return this._required}set required(t){this._required=t,this._markRadiosForCheck()}constructor(t){this._changeDetector=t,this._value=null,this._name="mat-radio-group-"+XX++,this._selected=null,this._isInitialized=!1,this._labelPosition="after",this._disabled=!1,this._required=!1,this._controlValueAccessorChangeFn=()=>{},this.onTouched=()=>{},this.change=new De}ngAfterContentInit(){this._isInitialized=!0,this._buttonChanges=this._radios.changes.subscribe(()=>{this.selected&&!this._radios.find(t=>t===this.selected)&&(this._selected=null)})}ngOnDestroy(){this._buttonChanges?.unsubscribe()}_touch(){this.onTouched&&this.onTouched()}_updateRadioButtonNames(){this._radios&&this._radios.forEach(t=>{t.name=this.name,t._markForCheck()})}_updateSelectedRadioFromValue(){this._radios&&(null===this._selected||this._selected.value!==this._value)&&(this._selected=null,this._radios.forEach(n=>{n.checked=this.value===n.value,n.checked&&(this._selected=n)}))}_emitChangeEvent(){this._isInitialized&&this.change.emit(new jX(this._selected,this._value))}_markRadiosForCheck(){this._radios&&this._radios.forEach(t=>t._markForCheck())}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._changeDetector.markForCheck()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn))};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-radio-group"]],contentQueries:function(n,r,s){if(1&n&&An(s,KC,5),2&n){let o;Be(o=Ve())&&(r._radios=o)}},hostAttrs:["role","radiogroup",1,"mat-mdc-radio-group"],inputs:{color:"color",name:"name",labelPosition:"labelPosition",value:"value",selected:"selected",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],required:[Wt.HasDecoratorInputTransform,"required","required",Je]},outputs:{change:"change"},exportAs:["matRadioGroup"],standalone:!0,features:[fi([WAt,{provide:YX,useExisting:e}]),ln]})}return e})(),KC=(()=>{class e{get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(t){this._color=t}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l,w,C){this._elementRef=n,this._changeDetector=r,this._focusMonitor=s,this._radioDispatcher=o,this._providerOverride=w,this._uniqueId="mat-radio-"+ ++XX,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new De,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this.radioGroup=t,this._noopAnimations="NoopAnimations"===l,C&&(this.tabIndex=jr(C,0))}focus(t,n){n?this._focusMonitor.focusVia(this._inputElement,n,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,n)=>{t!==this.id&&n===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new jX(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(t){t.stopPropagation()}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){const n=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),n&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_updateTabIndex(){const t=this.radioGroup;let n;if(n=t&&t.selected&&!this.disabled?t.selected===this?this.tabIndex:-1:this.tabIndex,n!==this._previousTabIndex){const r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",n+""),this._previousTabIndex=n)}}static#t=this.\u0275fac=function(n){return new(n||e)(mt(YX,8),mt(si),mt(Mn),mt(Ul),mt(wR),mt(Nr,8),mt(XAt,8),hl("tabindex"))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-radio-button"]],viewQuery:function(n,r){if(1&n&&(Mi(zAt,5),Mi(GAt,7,si)),2&n){let s;Be(s=Ve())&&(r._inputElement=s.first),Be(s=Ve())&&(r._rippleTrigger=s.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(n,r){1&n&&Vt("focus",function(){return r._inputElement.nativeElement.focus()}),2&n&&(Ti("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),bi("mat-primary","primary"===r.color)("mat-accent","accent"===r.color)("mat-warn","warn"===r.color)("mat-mdc-radio-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?0:jr(t)],checked:[Wt.HasDecoratorInputTransform,"checked","checked",Je],value:"value",labelPosition:"labelPosition",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],required:[Wt.HasDecoratorInputTransform,"required","required",Je],color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[ln,Vi],ngContentSelectors:HAt,decls:13,vars:16,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"div",2,0)(2,"div",3)(3,"div",4),Vt("click",function(l){return Ut(s),zt(r._onTouchTargetClick(l))}),et(),tt(4,"input",5,1),Vt("change",function(l){return Ut(s),zt(r._onInputInteraction(l))}),et(),tt(6,"div",6),we(7,"div",7)(8,"div",8),et(),tt(9,"div",9),we(10,"div",10),et()(),tt(11,"label",11),xi(12),et()()}2&n&&(yt("labelPosition",r.labelPosition),lt(2),bi("mdc-radio--disabled",r.disabled),lt(2),yt("id",r.inputId)("checked",r.checked)("disabled",r.disabled)("required",r.required),Ti("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby),lt(5),yt("matRippleTrigger",r._rippleTrigger.nativeElement)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),lt(2),yt("for",r.inputId))},dependencies:[iu,YR],styles:['.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio[hidden]{display:none}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{padding:calc((var(--mdc-radio-state-layer-size) - 20px) / 2)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-selected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{top:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size) - 20px) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);right:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);left:calc((var(--mdc-radio-state-layer-size) - var(--mdc-radio-state-layer-size)) / 2);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:0;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}return e})(),YAt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,qc,Qg,KC,Ki]})}return e})();function $At(e,i){if(1&e){const t=ve();tt(0,"mat-radio-button",3),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().optionSelected(r))}),ut(1),et()}if(2&e){const t=i.$implicit;yt("value",t.code),lt(),Ye(" ",t.display," ")}}let $X=(()=>{class e{constructor(t){this.terminologyService=t,this.selectionChange=new De}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>this.options=t.expansion.contains)}optionSelected(t){this.selectionChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-radios-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:3,consts:[["aria-label","Select an option",1,"radio-group"],["class","radio-button",3,"value","click",4,"ngFor","ngForOf"],["id","hint"],[1,"radio-button",3,"click","value"]],template:function(n,r){1&n&&(tt(0,"div"),ut(1),et(),tt(2,"mat-radio-group",0),Gt(3,$At,2,2,"mat-radio-button",1),et(),tt(4,"div",2),ut(5),et()),2&n&&(lt(),Ze(r.binding.title),lt(2),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,rP,KC],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.radio-button[_ngcontent-%COMP%]{margin:0}"]})}return e})(),QX=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new De,this.text=""}ngOnInit(){}onTextChange(t){this.text=t,this.textChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-textbox-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","placeholder","Enter text...",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(tt(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),tt(3,"textarea",1),wa("ngModelChange",function(o){return Na(r.text,o)||(r.text=o),o}),Vt("ngModelChange",function(o){return r.onTextChange(o)}),et(),tt(4,"mat-hint"),ut(5),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),ba("ngModel",r.text),lt(2),Ze(r.binding.note))},dependencies:[Xl,wl,om,Fh,Hl,No,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();const QAt=["input"],KAt=["label"],ZAt=["*"],JAt=new ee("mat-checkbox-default-options",{providedIn:"root",factory:KX});function KX(){return{color:"accent",clickAction:"check-indeterminate"}}var no=function(e){return e[e.Init=0]="Init",e[e.Checked=1]="Checked",e[e.Unchecked=2]="Unchecked",e[e.Indeterminate=3]="Indeterminate",e}(no||{});const qAt={provide:ua,useExisting:Sn(()=>ZC),multi:!0};class tDt{}let eDt=0;const ZX=KX();let ZC=(()=>{class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(t){const n=new tDt;return n.source=this,n.checked=t,n}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(t,n,r,s,o,l){this._elementRef=t,this._changeDetectorRef=n,this._ngZone=r,this._animationMode=o,this._options=l,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new De,this.indeterminateChange=new De,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=no.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||ZX,this.color=this._options.color||ZX.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId="mat-mdc-checkbox-"+ ++eDt}ngOnChanges(t){t.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(t){t!=this.checked&&(this._checked=t,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(t){t!==this.disabled&&(this._disabled=t,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(t){const n=t!=this._indeterminate;this._indeterminate=t,n&&(this._transitionCheckState(this._indeterminate?no.Indeterminate:this.checked?no.Checked:no.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(t){this.checked=!!t}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}validate(t){return this.required&&!0!==t.value?{required:!0}:null}registerOnValidatorChange(t){this._validatorChangeFn=t}_transitionCheckState(t){let n=this._currentCheckState,r=this._getAnimationTargetElement();if(n!==t&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(n,t),this._currentCheckState=t,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);const s=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(s)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const t=this._options?.clickAction;this.disabled||"noop"===t?!this.disabled&&"noop"===t&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==t&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?no.Checked:no.Unchecked),this._emitChangeEvent())}_onInteractionEvent(t){t.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(t,n){if("NoopAnimations"===this._animationMode)return"";switch(t){case no.Init:if(n===no.Checked)return this._animationClasses.uncheckedToChecked;if(n==no.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case no.Unchecked:return n===no.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case no.Checked:return n===no.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case no.Indeterminate:return n===no.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(t){const n=this._inputElement;n&&(n.nativeElement.indeterminate=t)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(t){t.target&&this._labelElement.nativeElement.contains(t.target)&&t.stopPropagation()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(Mn),mt(ii),hl("tabindex"),mt(Nr,8),mt(JAt,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-checkbox"]],viewQuery:function(n,r){if(1&n&&(Mi(QAt,5),Mi(KAt,5),Mi(iu,5)),2&n){let s;Be(s=Ve())&&(r._inputElement=s.first),Be(s=Ve())&&(r._labelElement=s.first),Be(s=Ve())&&(r.ripple=s.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(n,r){2&n&&(Kc("id",r.id),Ti("tabindex",null)("aria-label",null)("aria-labelledby",null),Ll(r.color?"mat-"+r.color:"mat-accent"),bi("_mat-animation-noopable","NoopAnimations"===r._animationMode)("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked))},inputs:{ariaLabel:[Wt.None,"aria-label","ariaLabel"],ariaLabelledby:[Wt.None,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[Wt.None,"aria-describedby","ariaDescribedby"],id:"id",required:[Wt.HasDecoratorInputTransform,"required","required",Je],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[Wt.HasDecoratorInputTransform,"disableRipple","disableRipple",Je],tabIndex:[Wt.HasDecoratorInputTransform,"tabIndex","tabIndex",t=>null==t?void 0:jr(t)],color:"color",checked:[Wt.HasDecoratorInputTransform,"checked","checked",Je],disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],indeterminate:[Wt.HasDecoratorInputTransform,"indeterminate","indeterminate",Je]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[fi([qAt,{provide:Ys,useExisting:e,multi:!0}]),ln,tr,Vi],ngContentSelectors:ZAt,decls:15,vars:19,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(n,r){if(1&n){const s=ve();Kn(),tt(0,"div",3),Vt("click",function(l){return Ut(s),zt(r._preventBubblingFromLabel(l))}),tt(1,"div",4,0)(3,"div",5),Vt("click",function(){return Ut(s),zt(r._onTouchTargetClick())}),et(),tt(4,"input",6,1),Vt("blur",function(){return Ut(s),zt(r._onBlur())})("click",function(){return Ut(s),zt(r._onInputClick())})("change",function(l){return Ut(s),zt(r._onInteractionEvent(l))}),et(),we(6,"div",7),tt(7,"div",8),ul(),tt(8,"svg",9),we(9,"path",10),et(),Q0(),we(10,"div",11),et(),we(11,"div",12),et(),tt(12,"label",13,2),xi(14),et()()}if(2&n){const s=qi(2);yt("labelPosition",r.labelPosition),lt(4),bi("mdc-checkbox--selected",r.checked),yt("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled)("id",r.inputId)("required",r.required)("tabIndex",r.disabled?-1:r.tabIndex),Ti("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("name",r.name)("value",r.value),lt(7),yt("matRippleTrigger",s)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),lt(),yt("for",r.inputId)}},dependencies:[iu,YR],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}}.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:focus:not(:checked):not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}return e})(),rDt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[ZC,Ki,Ki]})}return e})();function sDt(e,i){if(1&e){const t=ve();tt(0,"mat-checkbox",3),Vt("click",function(){return Ut(t),zt(Ct().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;hh("formControlName",t.display),lt(),Ye(" ",t.display," ")}}let JX=(()=>{class e{constructor(t,n){this.terminologyService=t,this._formBuilder=n,this.selectionChange=new De,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.options=[{display:this.binding.title}],this.options?.forEach(t=>{this.checkboxes.addControl(t.display,this._formBuilder.control(!1))})}optionClicked(){let t=[];t.push({title:this.binding.title,code:this.binding.ecl,value:this.checkboxes.value[this.binding.title]?this.present:this.absent}),this.selectionChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(NC))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-checkbox-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:4,vars:3,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","before",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","before",1,"check",3,"click","formControlName"]],template:function(n,r){1&n&&(tt(0,"form",0),Gt(1,sDt,2,2,"mat-checkbox",1),tt(2,"span",2),ut(3),et()()),2&n&&(yt("formGroup",r.checkboxes),lt(),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,rv,No,nm,cd,sv,ZC],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}return e})(),qX=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(t){this.value=t,this.textChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-integer-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter integer value...","pattern","^-?[0-9]\\d*$","title","Only integer values are allowed",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(tt(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),tt(3,"input",1),wa("ngModelChange",function(o){return Na(r.value,o)||(r.value=o),o}),Vt("ngModelChange",function(o){return r.onValueChange(o)}),et(),tt(4,"mat-hint"),ut(5),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),ba("ngModel",r.value),lt(2),Ze(r.binding.note))},dependencies:[Xl,wl,om,Fh,Hl,PC,No,LC,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})(),tj=(()=>{class e{constructor(t){this.terminologyService=t,this.textChange=new De,this.value=0}ngOnInit(){}onValueChange(t){this.value=t,this.textChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-decimal-binding"]],inputs:{binding:"binding"},outputs:{textChange:"textChange"},decls:6,vars:3,consts:[[1,"example-full-width"],["matInput","","type","number","placeholder","Enter decimal value...","pattern","^-?[0-9]*\\.?[0-9]+$","title","Only decimal values are allowed","step","any",3,"ngModelChange","ngModel"]],template:function(n,r){1&n&&(tt(0,"mat-form-field",0)(1,"mat-label"),ut(2),et(),tt(3,"input",1),wa("ngModelChange",function(o){return Na(r.value,o)||(r.value=o),o}),Vt("ngModelChange",function(o){return r.onValueChange(o)}),et(),tt(4,"mat-hint"),ut(5),et()()),2&n&&(lt(2),Ze(r.binding.title),lt(),ba("ngModel",r.value),lt(2),Ze(r.binding.note))},dependencies:[Xl,wl,om,Fh,Hl,PC,No,LC,Wl],styles:[".chip[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row;background-color:#f4a460;border:none;cursor:default;height:36px;outline:none;padding:0;font-size:14px;color:#fff;font-family:Open Sans,sans-serif;white-space:nowrap;align-items:center;border-radius:16px;vertical-align:middle;text-decoration:none;justify-content:center;margin-right:20px}.chip-content[_ngcontent-%COMP%]{cursor:inherit;display:flex;align-items:center;-webkit-user-select:none;user-select:none;white-space:nowrap;padding-left:12px;padding-right:12px}mat-form-field[_ngcontent-%COMP%]{width:100%}.code[_ngcontent-%COMP%]{font-size:small;font-weight:lighter;margin-right:15px}mat-hint[_ngcontent-%COMP%]{font-size:12px}"]})}return e})();function aDt(e,i){if(1&e){const t=ve();tt(0,"mat-checkbox",3),Vt("click",function(){return Ut(t),zt(Ct().optionClicked())}),ut(1),et()}if(2&e){const t=i.$implicit;hh("formControlName",t.display),lt(),Ye(" ",t.display," ")}}let ej=(()=>{class e{constructor(t,n){this.terminologyService=t,this._formBuilder=n,this.selectionChange=new De,this.checkboxes=this._formBuilder.group([]),this.present={display:"Known present (qualifier value)",system:"http://snomed.info/sct",code:"410515003"},this.absent={display:"Known absent (qualifier value)",system:"http://snomed.info/sct",code:"410516002"}}ngOnInit(){this.terminologyService.expandValueSet(this.binding.ecl,"").subscribe(t=>{this.options=t.expansion.contains,this.options?.forEach(n=>{this.checkboxes.addControl(n.display,this._formBuilder.control(!1))})})}optionClicked(){let t=[];this.options?.forEach(n=>{t.push({code:n,value:this.checkboxes.value[n.display]?this.present:this.absent})}),this.selectionChange.emit(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(NC))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-checkbox-multiple-binding"]],inputs:{binding:"binding"},outputs:{selectionChange:"selectionChange"},decls:6,vars:4,consts:[[1,"check-group",3,"formGroup"],["class","check","labelPosition","after",3,"formControlName","click",4,"ngFor","ngForOf"],[1,"hint"],["labelPosition","after",1,"check",3,"click","formControlName"]],template:function(n,r){1&n&&(tt(0,"div"),ut(1),et(),tt(2,"form",0),Gt(3,aDt,2,2,"mat-checkbox",1),tt(4,"span",2),ut(5),et()()),2&n&&(lt(),Ze(r.binding.title),lt(),yt("formGroup",r.checkboxes),lt(),yt("ngForOf",r.options),lt(2),Ze(r.binding.note))},dependencies:[gs,rv,No,nm,cd,sv,ZC],styles:["#hint[_ngcontent-%COMP%]{font-size:12px}.check-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:20px 0;align-items:flex-start}.check[_ngcontent-%COMP%]{margin:0}.hint[_ngcontent-%COMP%]{font-size:.8rem;color:#999;padding:0;margin:0 0 0 5px}"]})}return e})();const oDt=["newPanel"],lDt=()=>({standalone:!0}),sP=()=>({});function cDt(e,i){1&e&&(tt(0,"mat-panel-description"),ut(1," Click to add new binding "),et())}function dDt(e,i){if(1&e){const t=ve();tt(0,"button",46),Vt("click",function(){let r;return Ut(t),zt(null==(r=Ct().newBindingForm.get("title"))?null:r.reset())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function uDt(e,i){1&e&&(tt(0,"span"),ut(1,"Restrict to Observables"),et())}function hDt(e,i){1&e&&(tt(0,"span"),ut(1,"Open to Observables + Findings + Procedures + Situations"),et())}function fDt(e,i){if(1&e&&(tt(0,"mat-option",47),ut(1),et()),2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t," ")}}function mDt(e,i){if(1&e){const t=ve();tt(0,"button",46),Vt("click",function(){let r;return Ut(t),zt(null==(r=Ct(2).newBindingForm.get("ecl"))?null:r.reset())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function pDt(e,i){if(1&e){const t=ve();tt(0,"mat-form-field",14)(1,"mat-label"),ut(2,"Answer options: ECL Expression"),et(),we(3,"input",48),tt(4,"a",49),Vt("click",function(){let r;Ut(t);const s=Ct();return zt(s.openEclBuilder(null==(r=s.newBindingForm.get("ecl"))?null:r.value,"ecl"))}),ut(5,"ECL Builder"),et(),Gt(6,mDt,3,0,"button",16),tt(7,"mat-error"),ut(8),et()()}if(2&e){let t;const n=Ct();lt(6),yt("ngIf",null==(t=n.newBindingForm.get("ecl"))?null:t.value),lt(2),Ze(n.getErrorMessage("ecl"))}}function gDt(e,i){1&e&&(tt(0,"span"),ut(1,"Restrict to Observables"),et())}function vDt(e,i){1&e&&(tt(0,"span"),ut(1,"Open to Observables + Findings + Procedures"),et())}function xDt(e,i){if(1&e){const t=ve();tt(0,"mat-form-field",14),we(1,"app-autocomplete-binding",50),tt(2,"a",19),Vt("click",function(){return Ut(t),zt(Ct().toggleCheckboxBinding())}),Gt(3,gDt,2,0,"span",10)(4,vDt,2,0,"span",10),et(),tt(5,"mat-error"),ut(6),et()()}if(2&e){const t=Ct();lt(),yt("binding",t.checkboxBinding),lt(2),yt("ngIf",t.checkboxBinding.ecl===t.codeBindingAll.ecl),lt(),yt("ngIf",t.checkboxBinding.ecl!=t.codeBindingAll.ecl),lt(2),Ze(t.getErrorMessage("ecl"))}}function yDt(e,i){if(1&e){const t=ve();tt(0,"button",46),Vt("click",function(){let r;return Ut(t),zt(null==(r=Ct(2).newBindingForm.get("note"))?null:r.reset())}),tt(1,"mat-icon"),ut(2,"close"),et()()}}function bDt(e,i){if(1&e&&(tt(0,"mat-form-field",51)(1,"mat-label"),ut(2,"Note"),et(),we(3,"input",52),Gt(4,yDt,3,0,"button",16),tt(5,"mat-error"),ut(6),et()()),2&e){let t;const n=Ct();lt(4),yt("ngIf",null==(t=n.newBindingForm.get("note"))?null:t.value),lt(2),Ze(n.getErrorMessage("note"))}}function wDt(e,i){if(1&e){const t=ve();tt(0,"button",27),Vt("click",function(){return Ut(t),zt(Ct().addBinding())}),ut(1,"Add binding"),et()}}function _Dt(e,i){if(1&e){const t=ve();tt(0,"button",27),Vt("click",function(){Ut(t);const r=Ct();return r.addBinding(),zt(r.clearOutput())}),ut(1,"Update binding"),et()}}function TDt(e,i){if(1&e){const t=ve();tt(0,"button",35),Vt("click",function(){Ut(t);const r=Ct();return zt(r.showRightContainer=!r.showRightContainer)}),ut(1),et()}if(2&e){const t=Ct();lt(),Ye(" ",t.showRightContainer?"Close data panel":"Open data panel"," ")}}function CDt(e,i){1&e&&(tt(0,"button",53),ut(1," Download form "),et()),2&e&&(Ct(),yt("matMenuTriggerFor",qi(69)))}function SDt(e,i){if(1&e){const t=ve();tt(0,"div",54)(1,"p",55),ut(2),et(),tt(3,"button",56),Vt("click",function(){return Ut(t),zt(Ct().titleEditMode=!0)}),tt(4,"mat-icon"),ut(5,"edit"),et()()()}if(2&e){const t=Ct();lt(2),Ze(t.formTitle)}}function EDt(e,i){if(1&e){const t=ve();tt(0,"div",54)(1,"form",57)(2,"mat-form-field")(3,"mat-label"),ut(4,"Title"),et(),tt(5,"input",58),wa("ngModelChange",function(r){Ut(t);const s=Ct();return Na(s.formTitle,r)||(s.formTitle=r),zt(r)}),Vt("ngModelChange",function(){return Ut(t),zt(Ct().refreshFhirQuestionnaire())}),et(),tt(6,"button",46),Vt("click",function(){return Ut(t),zt(Ct().formTitle="")}),tt(7,"mat-icon"),ut(8,"close"),et()()()(),tt(9,"button",56),Vt("click",function(){return Ut(t),zt(Ct().titleEditMode=!1)}),tt(10,"mat-icon"),ut(11,"save"),et()()()}if(2&e){const t=Ct();lt(5),ba("ngModel",t.formTitle),yt("ngModelOptions",Ko(2,lDt))}}function ADt(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function DDt(e,i){if(1&e){const t=ve();tt(0,"app-dropdown-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function MDt(e,i){if(1&e){const t=ve();tt(0,"app-radios-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function IDt(e,i){if(1&e&&(tt(0,"span",68),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ze(t.title)}}function RDt(e,i){if(1&e){const t=ve();tt(0,"app-textbox-binding",69),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function kDt(e,i){if(1&e){const t=ve();tt(0,"app-integer-binding",69),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function PDt(e,i){if(1&e){const t=ve();tt(0,"app-decimal-binding",69),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function FDt(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function ODt(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-multiple-binding",67),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function LDt(e,i){if(1&e&&(tt(0,"button",70)(1,"mat-icon"),ut(2,"info"),et()()),2&e){const t=Ct().$implicit;yt("matMenuTriggerFor",qi(15))("disabled",!t.code&&!t.ecl)}}function NDt(e,i){if(1&e){const t=ve();tt(0,"span",6),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Question terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Zc("",null==t.code?null:t.code.code," |",null==t.code?null:t.code.display,"|")}}function BDt(e,i){if(1&e){const t=ve();tt(0,"span",6),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Answer terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Ze(t.ecl)}}function VDt(e,i){if(1&e){const t=ve();tt(0,"div",59)(1,"div",60)(2,"mat-icon",61),ut(3,"drag_indicator"),et(),Gt(4,ADt,1,1,"app-autocomplete-binding",62)(5,DDt,1,1,"app-dropdown-binding",62)(6,MDt,1,1,"app-radios-binding",62)(7,IDt,2,1,"span",63)(8,RDt,1,1,"app-textbox-binding",64)(9,kDt,1,1,"app-integer-binding",64)(10,PDt,1,1,"app-decimal-binding",64)(11,FDt,1,1,"app-checkbox-binding",62)(12,ODt,1,1,"app-checkbox-multiple-binding",62)(13,LDt,3,2,"button",65),tt(14,"mat-menu",null,0),Gt(16,NDt,5,3,"span",66)(17,BDt,5,2,"span",66),et(),tt(18,"button",56),Vt("click",function(){const r=Ut(t).index;return zt(Ct().bindings.splice(r,1))}),tt(19,"mat-icon"),ut(20,"delete"),et()(),tt(21,"button",56),Vt("click",function(){const r=Ut(t).index;return zt(Ct().edit(r))}),tt(22,"mat-icon"),ut(23,"edit"),et()()()()}if(2&e){const t=i.$implicit;lt(4),yt("ngIf","Autocomplete"==t.type),lt(),yt("ngIf","Select (Single)"==t.type||"Select (Multiple)"==t.type),lt(),yt("ngIf","Options"==t.type),lt(),yt("ngIf","Section header"==t.type),lt(),yt("ngIf","Text box"==t.type),lt(),yt("ngIf","Integer"==t.type),lt(),yt("ngIf","Decimal"==t.type),lt(),yt("ngIf","Checkbox"==t.type),lt(),yt("ngIf","Checkbox multiple"==t.type),lt(),yt("ngIf","Section header"!=t.type),lt(3),yt("ngIf",t.code),lt(),yt("ngIf",t.ecl)}}function UDt(e,i){if(1&e){const t=ve();tt(0,"div",74)(1,"button",75),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.saveOutput(r.outputStr))}),we(2,"mat-icon",76),et(),tt(3,"button",77),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.copyOutputToClipboard(r.outputStr))}),we(4,"mat-icon",78),et()()}}function zDt(e,i){if(1&e&&(tt(0,"div",71),Gt(1,UDt,5,0,"div",72),tt(2,"textarea",73),ut(3," "),et()()),2&e){const t=Ct();lt(),yt("ngIf",t.showRightContainer),lt(),yt("options",Ko(4,sP))("lang","json")("innerHTML",t.responseStr,Pf)}}function GDt(e,i){if(1&e){const t=ve();tt(0,"div",74)(1,"button",75),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.saveBundleOutput(r.responseBundleStr))}),we(2,"mat-icon",76),et(),tt(3,"button",77),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.copyOutputToClipboard(r.responseBundleStr))}),we(4,"mat-icon",78),et()()}}function HDt(e,i){if(1&e&&(tt(0,"div",71),Gt(1,GDt,5,0,"div",72),tt(2,"textarea",73),ut(3," "),et()()),2&e){const t=Ct();lt(),yt("ngIf",t.showRightContainer),lt(),yt("options",Ko(4,sP))("lang","json")("innerHTML",t.responseBundleStr,Pf)}}function WDt(e,i){if(1&e){const t=ve();tt(0,"div",74)(1,"button",75),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.saveOutput(r.fhirQuestionnaireStr))}),we(2,"mat-icon",76),et(),tt(3,"button",77),Vt("click",function(){Ut(t);const r=Ct(2);return zt(r.copyOutputToClipboard(r.fhirQuestionnaireStr))}),we(4,"mat-icon",78),et()()}}function XDt(e,i){if(1&e&&(tt(0,"div",71),Gt(1,WDt,5,0,"div",72),tt(2,"textarea",73),ut(3," "),et()()),2&e){const t=Ct();lt(),yt("ngIf",t.showRightContainer),lt(),yt("options",Ko(4,sP))("lang","json")("innerHTML",t.fhirQuestionnaireStr,Pf)}}let jDt=(()=>{class e{constructor(t,n,r){this.terminologyService=t,this.clipboard=n,this.dialog=r,this.formTitle="My new form",this.titleEditMode=!1,this.bindings=[],this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}",this.fhirQuestionnaire={},this.fhirQuestionnaireStr="{}",this.observableBinding={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingObservables={title:"Question code (Observables)",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)|",value:""},this.codeBindingAll={title:"Question code",type:"Autocomplete",ecl:"<< 363787002 |Observable entity (observable entity)| OR << 404684003 |Clinical finding (finding)| OR << 71388002 |Procedure (procedure)| OR << 243796009 |Situation with explicit context (situation)|",value:""},this.codeBinding=this.codeBindingAll,this.checkboxBinding=JSON.parse(JSON.stringify(this.codeBindingAll)),this.example1={title:"Appendicitis data entry form (example)",bindings:[{title:"Diagnosis (type of appendicitis)",type:"Autocomplete",ecl:"<< 74400008 |Appendicitis|",value:"",note:"An autocomplete field to select between all descendants of appendicitis."},{title:"Clinical note",type:"Text box",ecl:"74400008 |Appendicitis|",value:"",note:"A text box for entering free text clinical information."},{title:"Appendicitis type",type:"Select (Single)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A single selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicitis type (M)",type:"Select (Multiple)",ecl:"<< 196781001 |Acute appendicitis with peritonitis (disorder)|",value:"",note:"A multiple selection dropdown field for a shorter selection of the type of appendicitis."},{title:"Appendicectomy type",type:"Options",ecl:"<< 174036004 |Emergency appendectomy (procedure)|",value:"",note:"A radio buttons selector for the type of appendicectomy procedure."}]},this.newBindingForm=new nv({title:new Va("",[vu.required,vu.maxLength(50)]),code:new Va("",[]),type:new Va("",[vu.required]),ecl:new Va("",[]),value:new Va("",[]),note:new Va("",[vu.maxLength(500)])}),this.indexInEdit=-1,this.panelOpenState=!1,this.maxSelectCount=50,this.maxOptionsCount=10,this.controlTypes=["Autocomplete","Select (Single)","Select (Multiple)","Options","Section header","Text box","Integer","Decimal","Checkbox","Checkbox multiple"].sort((s,o)=>s.localeCompare(o)),this.showRightContainer=!1}ngOnInit(){this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}get stateName(){return this.showRightContainer?"open":"closed"}addBinding(){var t=this;return de(function*(){if(t.newBindingForm.markAllAsTouched(),t.newBindingForm.invalid)return;const{title:n,code:r,type:s,ecl:o,value:l,note:w}=t.newBindingForm.controls;let C={title:n.value,code:r.value,type:s.value,ecl:o.value,value:l.value,note:w.value},M=!1;o.value?typeof C.type?.indexOf("Select")<"u"&&C.type?.indexOf("Select")>-1?(yield t.getEclPreview(o.value)).expansion.contains.length>t.maxSelectCount&&(M=!0,o.setErrors({selectTooManyResults:!0})):(typeof C.type?.indexOf("Options")<"u"&&C.type?.indexOf("Options")>-1||typeof C.type?.indexOf("Checkbox multiple")<"u"&&C.type?.indexOf("Checkbox multiple")>-1)&&(yield t.getEclPreview(o.value)).expansion.contains.length>t.maxOptionsCount&&(M=!0,o.setErrors({optionsTooManyResults:!0})):"Section header"!=C.type&&"Text box"!=C.type&&"Integer"!=C.type&&"Decimal"!=C.type&&(M=!0,o.setErrors({required:!0})),!M&&(t.indexInEdit>-1?t.bindings[t.indexInEdit]=C:t.bindings.push(C),t.newBindingForm.reset(),t.newPanel.close(),t.indexInEdit=-1,setTimeout(()=>{t.refreshFhirQuestionnaire(),t.refreshResponse()},100))})()}refreshFhirQuestionnaire(){this.fhirQuestionnaire={resourceType:"Questionnaire",title:this.formTitle,status:"draft",item:[]},this.bindings.forEach((t,n)=>{const r=this.createItemForBinding(t,n);r&&this.fhirQuestionnaire.item.push(r)}),this.fhirQuestionnaireStr=JSON.stringify(this.fhirQuestionnaire,null,2)}createItemForBinding(t,n){const r=this.initializeBaseItem(t,n);return["Select (Single)","Select (Multiple)","Options","Autocomplete"].includes(t.type)&&(r.extension=this.getExtensionForSelectableTypes(),r.answerValueSet=this.getAnswerValueSet(t)),"Autocomplete"===t.type&&r.extension.push(this.getAutocompleteExtension()),"Select (Multiple)"===t.type&&(r.repeats=!0),r}initializeBaseItem(t,n){const r={linkId:n+1,text:t.title,type:this.getQuestionnaireItemType(t.type)};return t.code&&(r.code=[{system:"http://snomed.info/sct",code:t.code.code,display:t.code.display}]),r}getQuestionnaireItemType(t){switch(t){case"Section header":return"display";case"Select (Single)":case"Select (Multiple)":case"Options":case"Checkbox multiple":case"Autocomplete":return"choice";case"Text box":return"text";case"Integer":return"integer";case"Decimal":return"decimal";default:return console.warn(`Unhandled binding type: ${t}`),null}}getExtensionForSelectableTypes(){return[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-preferredTerminologyServer",valueUrl:"https://snowstorm.ihtsdotools.org/fhir"}]}getAutocompleteExtension(){return{url:"http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",valueCodeableConcept:{coding:[{system:"http://hl7.org/fhir/questionnaire-item-control",code:"autocomplete",display:"Auto-complete"}]}}}getAnswerValueSet(t){return`http://snomed.info/sct/900000000000207008?fhir_vs=ecl%2F${encodeURIComponent(t.ecl)}`}getEclPreview(t){var n=this;return de(function*(){return Ca((yield n.terminologyService.expandValueSet(t,"")).pipe(Di(s=>s)))})()}edit(t){this.indexInEdit=t;const n=this.bindings[t];this.newBindingForm.setValue({title:n.title,code:n.code?n.code:"",type:n.type,ecl:n.ecl,value:n.value,note:n.note}),this.newPanel.open()}onDrop(t){$k(this.bindings,t.previousIndex,t.currentIndex)}getErrors(t){const n=this.newBindingForm.get(t);return n?n.errors:null}getErrorMessage(t){const n=this.getErrors(t);if(n){if(n.required)return"This field is required";if(n.maxlength)return`This field must be less than ${n.maxlength.requiredLength} characters`;if(n.selectTooManyResults)return`Too many results (Max = ${this.maxSelectCount})`;if(n.optionsTooManyResults)return`Too many results (Max = ${this.maxOptionsCount})`}return null}refreshResponse(){this.response={};for(let t of this.bindings)this.response[t.title]={},t.code&&(this.response[t.title].code=t.code);for(let[t,n]of Object.entries(this.output))this.output[t].code&&(this.response[t].code=this.output[t].code),this.output[t].value&&(this.response[t].value=this.output[t].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[t,n]of Object.entries(this.response)){let r=n;const s=r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0,o=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let l={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};l.code=s||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},o&&(l.valueCodeableConcept=o),r.value&&"string"==typeof r.value&&(l.valueString=r.value),(l.valueCodeableConcept||l.valueString)&&this.responseBundle.entry.push(l)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}optionSelected(t,n,r){this.output[t]={code:n,value:r},n||delete this.output[t].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}loadExample1(){this.formTitle=this.example1.title,this.bindings=this.example1.bindings,this.refreshFhirQuestionnaire(),this.clearOutput(),this.refreshResponse()}cancelEdit(){this.newBindingForm.reset(),this.newPanel.close(),this.indexInEdit=-1}clear(){this.bindings=[],this.clearOutput(),this.newBindingForm.reset(),this.formTitle="My new form",this.showRightContainer=!1}clearOutput(){this.output={},this.outputStr="{}";const t=JSON.parse(JSON.stringify(this.bindings));this.bindings=[],this.bindings=t}saveForm(){var t=new Blob([JSON.stringify({title:this.formTitle,bindings:this.bindings},null,2)],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(t,`${this.formTitle}.json`)}saveOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(n,`${this.formTitle}-data.json`)}saveBundleOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(n,`${this.formTitle}-fhir-bundle.json`)}copyOutputToClipboard(t){this.clipboard.copy(t)}uploadFile(t){if(1!==t.target.files.length)console.error("No file selected");else{const n=new FileReader;n.onloadend=r=>{if(n.result){const s=JSON.parse(n.result?.toString());Array.isArray(s)?(this.bindings=s,this.formTitle="My new form"):(this.bindings=[],this.bindings=s.bindings,this.formTitle=s.title),this.clearOutput(),this.refreshResponse(),this.refreshFhirQuestionnaire()}},n.readAsText(t.target.files[0])}}openEclBuilder(t,n){this.dialog.open(TAt,{data:{ecl:t},width:"80%",height:"80%"}).afterClosed().subscribe(s=>{if(s){const o=this.newBindingForm.get(n);o&&o.setValue(s.ecl)}})}toggleCodeBinding(){this.codeBinding=this.codeBinding===this.codeBindingAll?this.codeBindingObservables:this.codeBindingAll}toggleCheckboxBinding(){this.checkboxBinding=this.checkboxBinding.ecl===this.codeBindingAll.ecl?JSON.parse(JSON.stringify(this.codeBindingObservables)):JSON.parse(JSON.stringify(this.codeBindingAll)),this.checkboxBinding.title=this.checkboxBinding.title.replace("Question","Checkbox")}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(zk),mt(lm))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-bindings-sandbox"]],viewQuery:function(n,r){if(1&n&&Mi(oDt,5),2&n){let s;Be(s=Ve())&&(r.newPanel=s.first)}},decls:94,vars:27,consts:[["substancePopoverMenu","matMenu"],["newPanel",""],["fileInput",""],["demosMenu","matMenu"],["id","main-panel"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click","disableRipple"],[1,"flex","flex-row","mb-8"],[1,"w-2/3"],[1,"editPanel","w-full","pt-4","pb-4",3,"opened","closed"],[4,"ngIf"],[1,"row",3,"formGroup"],[1,"form-row"],[1,"form-column"],[1,"input-field"],["matInput","","type","text","formControlName","title","placeholder","Enter title..."],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],[1,"input-field","autocomplete-field"],["formControlName","code",1,"grow",3,"binding"],["href","javascript:void(0)",1,"bottom-right-link",3,"click"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["class","input-field",4,"ngIf"],["class","input-field full-width",4,"ngIf"],[1,"row"],[1,"grow"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"w-1/3"],[1,"flex","flex-row","gap-4","justify-end","flex-wrap"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["hidden","","type","file","id","file",3,"change"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor",4,"ngIf"],[1,"wide-menu"],["mat-menu-item","",3,"click"],["mat-flat-button","","color","accent",3,"click"],["class","compact-row-container",4,"ngIf"],[1,"row-container"],[1,"row-container-item"],["cdkDropList","",3,"cdkDropListDropped"],["class","output-panel","cdkDrag","",4,"ngFor","ngForOf"],["mat-stretch-tabs","false","mat-align-tabs","start"],["label","Data collected from form"],["class","output",4,"ngIf"],["label","Data collected (FHIR Bundle)"],["label","FHIR Questionnaire"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],[3,"value"],["matInput","","type","text","formControlName","ecl","placeholder","Enter ECL..."],["href","javascript:void(0)",1,"top-right-link",3,"click"],["formControlName","ecl",1,"grow",3,"binding"],[1,"input-field","full-width"],["matInput","","type","text","formControlName","note","placeholder","Enter a description..."],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"compact-row-container"],[1,"title"],["mat-icon-button","","color","primary",1,"tool",3,"click"],[1,"row","form-title"],["matInput","","type","text","placeholder","Enter title...",3,"ngModelChange","ngModel","ngModelOptions"],["cdkDrag","",1,"output-panel"],[1,"row","control"],["cdkDragHandle","",1,"tool","drag-handle"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",4)(1,"h3"),ut(2,"Terminology Bindings Sandbox "),tt(3,"button",5)(4,"mat-icon"),ut(5,"info"),et()(),tt(6,"mat-menu",null,0)(8,"span",6),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(9,"h4"),ut(10,"Terminology Bindings Sandbox"),et(),tt(11,"p"),ut(12,"This is a sandbox for creating terminology bindings, designed to support education activities."),et()()()(),tt(13,"div",7)(14,"div",8)(15,"mat-expansion-panel",9,1),Vt("opened",function(){return Ut(s),zt(r.panelOpenState=!0)})("closed",function(){return Ut(s),zt(r.panelOpenState=!1)}),tt(17,"mat-expansion-panel-header")(18,"mat-panel-title")(19,"h4"),ut(20,"New binding:"),et()(),Gt(21,cDt,2,0,"mat-panel-description",10),et(),tt(22,"div")(23,"form",11)(24,"div",12)(25,"div",13)(26,"h5"),ut(27,"Question"),et(),tt(28,"mat-form-field",14)(29,"mat-label"),ut(30,"Question text"),et(),we(31,"input",15),Gt(32,dDt,3,0,"button",16),tt(33,"mat-error"),ut(34),et()(),tt(35,"mat-form-field",17),we(36,"app-autocomplete-binding",18),tt(37,"a",19),Vt("click",function(){return Ut(s),zt(r.toggleCodeBinding())}),Gt(38,uDt,2,0,"span",10)(39,hDt,2,0,"span",10),et(),tt(40,"mat-error"),ut(41),et()()(),tt(42,"div",13)(43,"h5"),ut(44,"Answer"),et(),tt(45,"mat-form-field",14)(46,"mat-label"),ut(47,"Answer Type"),et(),tt(48,"mat-select",20),Gt(49,fDt,2,2,"mat-option",21),et(),tt(50,"mat-error"),ut(51),et()(),Gt(52,pDt,9,2,"mat-form-field",22)(53,xDt,7,4,"mat-form-field",22),et()(),Gt(54,bDt,7,2,"mat-form-field",23),et(),we(55,"br"),tt(56,"div",24),we(57,"span",25),Gt(58,wDt,2,0,"button",26)(59,_Dt,2,0,"button",26),tt(60,"button",27),Vt("click",function(){return Ut(s),zt(r.cancelEdit())}),ut(61,"Cancel"),et()()()()(),tt(62,"div",28)(63,"div",29),Gt(64,TDt,2,1,"button",30),tt(65,"input",31,2),Vt("change",function(l){return Ut(s),zt(r.uploadFile(l))}),et(),Gt(67,CDt,2,1,"button",32),tt(68,"mat-menu",33,3)(70,"button",34),Vt("click",function(){return Ut(s),zt(r.saveForm())}),ut(71,"Download"),et(),tt(72,"button",34),Vt("click",function(){return Ut(s),zt(r.saveOutput(r.fhirQuestionnaireStr))}),ut(73,"Download as FHIR Questionnaire"),et()(),tt(74,"button",35),Vt("click",function(){return Ut(s),zt(qi(66).click())}),ut(75,"Upload form"),et(),tt(76,"button",35),Vt("click",function(){return Ut(s),zt(r.loadExample1())}),ut(77,"Example"),et(),tt(78,"button",35),Vt("click",function(){return Ut(s),zt(r.clear())}),ut(79,"Clear"),et()()()(),Gt(80,SDt,6,1,"div",36)(81,EDt,12,3,"div",36),tt(82,"div",37)(83,"div",38)(84,"div",39),Vt("cdkDropListDropped",function(l){return Ut(s),zt(r.onDrop(l))}),Gt(85,VDt,24,12,"div",40),et()(),tt(86,"div",38)(87,"mat-tab-group",41)(88,"mat-tab",42),Gt(89,zDt,4,5,"div",43),et(),tt(90,"mat-tab",44),Gt(91,HDt,4,5,"div",43),et(),tt(92,"mat-tab",45),Gt(93,XDt,4,5,"div",43),et()()()()()}if(2&n){let s;const o=qi(7);lt(3),yt("matMenuTriggerFor",o),lt(5),yt("disableRipple",!0),lt(13),yt("ngIf",!r.panelOpenState),lt(2),yt("formGroup",r.newBindingForm),lt(9),yt("ngIf",null==(s=r.newBindingForm.get("title"))?null:s.value),lt(2),Ze(r.getErrorMessage("title")),lt(2),yt("binding",r.codeBinding),lt(2),yt("ngIf",r.codeBinding===r.codeBindingAll),lt(),yt("ngIf",r.codeBinding!=r.codeBindingAll),lt(2),Ze(r.getErrorMessage("code")),lt(8),yt("ngForOf",r.controlTypes),lt(2),Ze(r.getErrorMessage("type")),lt(),yt("ngIf","Section header"!=r.newBindingForm.controls.type.value&&"Text box"!=r.newBindingForm.controls.type.value&&"Checkbox"!=r.newBindingForm.controls.type.value&&"Integer"!=r.newBindingForm.controls.type.value&&"Decimal"!=r.newBindingForm.controls.type.value),lt(),yt("ngIf","Checkbox"==r.newBindingForm.controls.type.value),lt(),yt("ngIf","Section header"!=r.newBindingForm.controls.type.value),lt(4),yt("ngIf",-1==r.indexInEdit),lt(),yt("ngIf",r.indexInEdit>-1),lt(5),yt("ngIf",r.bindings.length),lt(3),yt("ngIf",r.bindings.length),lt(13),yt("ngIf",!r.titleEditMode),lt(),yt("ngIf",r.titleEditMode),lt(2),yt("@growShrink",r.stateName),lt(2),yt("ngForOf",r.bindings),lt(),yt("@openClose",r.stateName),lt(3),yt("ngIf",r.bindings.length>0),lt(2),yt("ngIf",r.bindings.length>0),lt(2),yt("ngIf",r.bindings.length>0)}},dependencies:[gs,Ms,GC,Jk,Kk,bX,Sa,Oo,da,bl,Gl,cu,Xl,wl,EW,DW,nu,Fh,rv,Hl,No,nm,cd,sv,zy,ov,lv,Wl,sm,xu,GX,LAt,BAt,NAt,av,WX,$X,QX,JX,qX,tj,ej],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"],data:{animation:[mr("openClose",[Rn("open",qe({opacity:1,width:"50%"})),Rn("closed",qe({opacity:0,width:"0"})),on("open <=> closed",[sn("0.5s")])]),mr("growShrink",[Rn("open",qe({width:"50%"})),Rn("closed",qe({width:"100%"})),on("open <=> closed",[sn("0.5s")])])]}})}return e})(),YDt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-prescription-main"]],decls:2,vars:0,template:function(n,r){1&n&&(tt(0,"p"),ut(1,"prescription-main works!, no?"),et())}})}return e})();const $Dt=["mat-sort-header",""],QDt=["*"];function KDt(e,i){if(1&e){const t=ve();tt(0,"div",2),Vt("@arrowPosition.start",function(){return Ut(t),zt(Ct()._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){return Ut(t),zt(Ct()._disableViewStateAnimation=!1)}),we(1,"div",3),tt(2,"div",4),we(3,"div",5)(4,"div",6)(5,"div",7),et()()}if(2&e){const t=Ct();yt("@arrowOpacity",t._getArrowViewState())("@arrowPosition",t._getArrowViewState())("@allowChildren",t._getArrowDirectionState()),lt(2),yt("@indicator",t._getArrowDirectionState()),lt(),yt("@leftPointer",t._getArrowDirectionState()),lt(),yt("@rightPointer",t._getArrowDirectionState())}}const ij=new ee("MAT_SORT_DEFAULT_OPTIONS");let Lh=(()=>{class e{get direction(){return this._direction}set direction(t){this._direction=t}constructor(t){this._defaultOptions=t,this._initializedStream=new py(1),this.sortables=new Map,this._stateChanges=new Pe,this.start="asc",this._direction="",this.disabled=!1,this.sortChange=new De,this.initialized=this._initializedStream}register(t){this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction=this.getNextSortDirection(t),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(t){if(!t)return"";let r=function ZDt(e,i){let t=["asc","desc"];return"desc"==e&&t.reverse(),i||t.push(""),t}(t.start||this.start,t?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),s=r.indexOf(this.direction)+1;return s>=r.length&&(s=0),r[s]}ngOnInit(){this._initializedStream.next()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete(),this._initializedStream.complete()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ij,8))};static#e=this.\u0275dir=ce({type:e,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{active:[Wt.None,"matSortActive","active"],start:[Wt.None,"matSortStart","start"],direction:[Wt.None,"matSortDirection","direction"],disableClear:[Wt.HasDecoratorInputTransform,"matSortDisableClear","disableClear",Je],disabled:[Wt.HasDecoratorInputTransform,"matSortDisabled","disabled",Je]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],standalone:!0,features:[ln,tr]})}return e})();const Nh=x1t.ENTERING+" "+v1t.STANDARD_CURVE,uv={indicator:mr("indicator",[Rn("active-asc, asc",qe({transform:"translateY(0px)"})),Rn("active-desc, desc",qe({transform:"translateY(10px)"})),on("active-asc <=> active-desc",sn(Nh))]),leftPointer:mr("leftPointer",[Rn("active-asc, asc",qe({transform:"rotate(-45deg)"})),Rn("active-desc, desc",qe({transform:"rotate(45deg)"})),on("active-asc <=> active-desc",sn(Nh))]),rightPointer:mr("rightPointer",[Rn("active-asc, asc",qe({transform:"rotate(45deg)"})),Rn("active-desc, desc",qe({transform:"rotate(-45deg)"})),on("active-asc <=> active-desc",sn(Nh))]),arrowOpacity:mr("arrowOpacity",[Rn("desc-to-active, asc-to-active, active",qe({opacity:1})),Rn("desc-to-hint, asc-to-hint, hint",qe({opacity:.54})),Rn("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",qe({opacity:0})),on("* => asc, * => desc, * => active, * => hint, * => void",sn("0ms")),on("* <=> *",sn(Nh))]),arrowPosition:mr("arrowPosition",[on("* => desc-to-hint, * => desc-to-active",sn(Nh,Kg([qe({transform:"translateY(-25%)"}),qe({transform:"translateY(0)"})]))),on("* => hint-to-desc, * => active-to-desc",sn(Nh,Kg([qe({transform:"translateY(0)"}),qe({transform:"translateY(25%)"})]))),on("* => asc-to-hint, * => asc-to-active",sn(Nh,Kg([qe({transform:"translateY(25%)"}),qe({transform:"translateY(0)"})]))),on("* => hint-to-asc, * => active-to-asc",sn(Nh,Kg([qe({transform:"translateY(0)"}),qe({transform:"translateY(-25%)"})]))),Rn("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",qe({transform:"translateY(0)"})),Rn("hint-to-desc, active-to-desc, desc",qe({transform:"translateY(-25%)"})),Rn("hint-to-asc, active-to-asc, asc",qe({transform:"translateY(25%)"}))]),allowChildren:mr("allowChildren",[on("* <=> *",[rC("@*",nC(),{optional:!0})])])};let JC=(()=>{class e{constructor(){this.changes=new Pe}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const qDt={provide:JC,deps:[[new Nd,new Tf,JC]],useFactory:function JDt(e){return e||new JC}};let aP=(()=>{class e{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(t){this._updateSortActionDescription(t)}constructor(t,n,r,s,o,l,w,C){this._intl=t,this._changeDetectorRef=n,this._sort=r,this._columnDef=s,this._focusMonitor=o,this._elementRef=l,this._ariaDescriber=w,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this.disabled=!1,this._sortActionDescription="Sort",C?.arrowPosition&&(this.arrowPosition=C?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{const n=!!t;n!==this._showIndicatorHint&&(this._setIndicatorHintVisible(n),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe(),this._sortButton&&this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription)}_setIndicatorHintVisible(t){this._isDisabled()&&t||(this._showIndicatorHint=t,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(t){this._viewState=t||{},this._disableViewStateAnimation&&(this._viewState={toState:t.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(t){!this._isDisabled()&&(32===t.keyCode||13===t.keyCode)&&(t.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const t=this._viewState.fromState;return(t?`${t}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(t){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,t)),this._sortActionDescription=t}_handleStateChanges(){this._rerenderSubscription=Yr(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(JC),mt(Mn),mt(Lh,8),mt("MAT_SORT_HEADER_COLUMN_DEF",8),mt(Ul),mt(si),mt(oH,8),mt(ij,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(n,r){1&n&&Vt("click",function(){return r._handleClick()})("keydown",function(o){return r._handleKeydown(o)})("mouseenter",function(){return r._setIndicatorHintVisible(!0)})("mouseleave",function(){return r._setIndicatorHintVisible(!1)}),2&n&&(Ti("aria-sort",r._getAriaSortAttribute()),bi("mat-sort-header-disabled",r._isDisabled()))},inputs:{id:[Wt.None,"mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je],sortActionDescription:"sortActionDescription",disableClear:[Wt.HasDecoratorInputTransform,"disableClear","disableClear",Je]},exportAs:["matSortHeader"],standalone:!0,features:[ln,Vi],attrs:$Dt,ngContentSelectors:QDt,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(n,r){1&n&&(Kn(),tt(0,"div",0)(1,"div",1),xi(2),et(),Gt(3,KDt,6,6,"div",2),et()),2&n&&(bi("mat-sort-header-sorted",r._isSorted())("mat-sort-header-position-before","before"===r.arrowPosition),Ti("tabindex",r._isDisabled()?null:0)("role",r._isDisabled()?null:"button"),lt(3),xn(3,r._renderArrow()?3:-1))},styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;color:var(--mat-sort-arrow-color);opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[uv.indicator,uv.leftPointer,uv.rightPointer,uv.arrowOpacity,uv.arrowPosition,uv.allowChildren]},changeDetection:0})}return e})(),t2t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[qDt],imports:[Ki]})}return e})(),e2t=(()=>{class e{saveItem(t,n){localStorage.setItem(t,n)}getItem(t){return localStorage.getItem(t)}removeItem(t){localStorage.removeItem(t)}isLocalStorageSupported(){try{const t="__test__";return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch{return!1}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hv=(()=>{class e{constructor(t,n){this.http=t,this.storageService=n,this.baseUrlSubject=new Wr("https://hapi.fhir.org/baseR4"),this.baseUrl$=this.baseUrlSubject.asObservable(),this.userTagSubject=new Wr(""),this.userTag$=this.userTagSubject.asObservable(),this.initialize()}initialize(){if(this.storageService.isLocalStorageSupported()){const t=this.storageService.getItem("baseUrl");t&&this.baseUrlSubject.next(t);const n=this.storageService.getItem("userTag");n&&this.userTagSubject.next(n)}}setBaseUrl(t){this.baseUrlSubject.next(t),this.storageService.saveItem("baseUrl",t)}getBaseUrl(){return this.baseUrlSubject.getValue()}setUserTag(t){this.userTagSubject.next(t),this.storageService.saveItem("userTag",t)}getUserTag(){return this.userTagSubject.getValue()}postQuestionnaire(t){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire`,t)}getQuestionnairesByTag(t,n){return n||(n=100),this.http.get(`${this.baseUrlSubject.value}/Questionnaire?_tag=${t}&_count=${n}`)}tagQuestionnaire(t,n){return this.http.post(`${this.baseUrlSubject.value}/Questionnaire/${t}/$meta-add`,{resourceType:"Parameters",parameter:[{name:"meta",valueMeta:{tag:[{system:"http://snomed.org/tags",code:n}]}}]})}deleteQuestionnaire(t){return this.http.delete(`${this.baseUrlSubject.value}/Questionnaire/${t}`)}updateOrCreateQuestionnaire(t,n){return t.id?this.http.put(`${this.baseUrlSubject.value}/Questionnaire?_id=${t.id}&_tag=${n}`,t).pipe(oa(s=>404===s.status?this.postQuestionnaire(t):Mg(s))):this.postQuestionnaire(t)}getQuestionnaireHistory(t){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${t}/_history`)}getSpecificQuestionnaireVersion(t,n){return this.http.get(`${this.getBaseUrl()}/Questionnaire/${t}/_history/${n}`)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(sd),Jt(e2t))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function i2t(e,i){if(1&e&&(tt(0,"mat-option",15),ut(1),et()),2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t.title," ")}}function n2t(e,i){1&e&&we(0,"mat-spinner",16)}function r2t(e,i){if(1&e){const t=ve();tt(0,"div",17)(1,"span",18),ut(2,"\u2261"),et(),ut(3),tt(4,"button",19),Vt("click",function(){const r=Ut(t).index;return zt(Ct().deleteQuestionnaire(r))}),tt(5,"mat-icon"),ut(6,"delete"),et()()()}if(2&e){const t=i.$implicit;lt(3),Ye(" ",t.title," ")}}let nj=(()=>{class e{constructor(t,n,r,s){this.fb=t,this.fhirService=n,this.data=r,this.dialogRef=s,this.allQuestionnaires=[],this.availableQuestionnaires=[],this.addedQuestionnaires=[],this.userTag="",this.loading=!1}ngOnInit(){this.questionnaireForm=this.fb.group({selectedQuestionnaire:[{value:"",disabled:!0}],assignedName:[{value:"",disabled:!0}]}),this.data&&(this.addedQuestionnaires=this.data.questionnaires,this.questionnaireForm.get("assignedName")?.setValue(this.data.title)),this.questionnaireForm.get("selectedQuestionnaire"),this.userTag=this.fhirService.getUserTag(),this.loadAvailableQuestionnaires()}updateAvailableQuestionnaires(){this.availableQuestionnaires=this.addedQuestionnaires?this.allQuestionnaires.filter(t=>!this.addedQuestionnaires.some(n=>n.id===t.id)):this.allQuestionnaires,this.availableQuestionnaires=this.availableQuestionnaires.filter(t=>!t.extension||!t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode))}loadAvailableQuestionnaires(){this.loading=!0,this.fhirService.getQuestionnairesByTag(this.userTag).subscribe(t=>{this.allQuestionnaires=t.entry.map(n=>n.resource),this.allQuestionnaires.sort((n,r)=>n.title.localeCompare(r.title)),this.updateAvailableQuestionnaires(),this.loading=!1,this.questionnaireForm?.get("selectedQuestionnaire")?.enable(),this.questionnaireForm?.get("assignedName")?.enable()})}addQuestionnaire(){const t=this.questionnaireForm.value;t.selectedQuestionnaire&&(this.addedQuestionnaires.push({...t.selectedQuestionnaire,assignedName:t.assignedName}),this.questionnaireForm.get("selectedQuestionnaire")?.reset(),this.updateAvailableQuestionnaires())}drop(t){$k(this.addedQuestionnaires,t.previousIndex,t.currentIndex)}deleteQuestionnaire(t){t>-1&&(this.addedQuestionnaires.splice(t,1),this.updateAvailableQuestionnaires())}isSaveDisabled(){return!this.questionnaireForm.get("assignedName")?.value||!this.addedQuestionnaires.length}closeModal(){this.dialogRef.close({title:this.questionnaireForm.get("assignedName")?.value,questionnaires:this.addedQuestionnaires})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(NC),mt(hv),mt(QC),mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-create-root-module"]],decls:26,vars:6,consts:[[1,"form-layout",3,"formGroup"],[1,"form-row"],[1,"full-width"],["matInput","","formControlName","assignedName"],[1,"half-width"],["formControlName","selectedQuestionnaire"],[3,"value",4,"ngFor","ngForOf"],["mat-raised-button","","color","primary",1,"add-button",3,"click","disabled"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"questionnaire-list"],[1,"list",3,"cdkDropListDropped"],["cdkDrag","","class","cdk-drag",4,"ngFor","ngForOf"],[1,"button-container"],["mat-flat-button","","color","primary","mat-dialog-close",""],["mat-flat-button","","color","accent",3,"click","disabled"],[3,"value"],["diameter","35",1,"loading-spinner"],["cdkDrag","",1,"cdk-drag"],[1,"drag-handle"],["mat-icon-button","","aria-label","Delete questionnaire",3,"click"]],template:function(n,r){1&n&&(tt(0,"mat-dialog-content")(1,"h2"),ut(2,"Create a modular Questionnaire"),et(),tt(3,"form",0)(4,"div",1)(5,"mat-form-field",2)(6,"mat-label"),ut(7,"Assign Name"),et(),we(8,"input",3),et()(),tt(9,"div",1)(10,"mat-form-field",4)(11,"mat-label"),ut(12,"Select Child Questionnaire"),et(),tt(13,"mat-select",5),Gt(14,i2t,2,2,"mat-option",6),et()(),tt(15,"button",7),Vt("click",function(){return r.addQuestionnaire()}),ut(16,"Add questionnaire"),et(),Gt(17,n2t,1,0,"mat-spinner",8),et()(),tt(18,"div",9)(19,"cdk-drop-list",10),Vt("cdkDropListDropped",function(o){return r.drop(o)}),Gt(20,r2t,7,1,"div",11),et()()(),tt(21,"mat-dialog-actions",12)(22,"button",13),ut(23,"Cancel"),et(),tt(24,"button",14),Vt("click",function(){return r.closeModal()}),ut(25,"Save"),et()()),2&n&&(lt(3),yt("formGroup",r.questionnaireForm),lt(11),yt("ngForOf",r.availableQuestionnaires),lt(),yt("disabled",r.loading),lt(2),yt("ngIf",r.loading),lt(3),yt("ngForOf",r.addedQuestionnaires),lt(4),yt("disabled",r.isSaveDisabled()||r.loading))},dependencies:[gs,Ms,Jk,Kk,Sa,Oo,da,Xl,wl,nu,Eh,Fh,rv,Hl,No,nm,cd,sv,lv,dv,Yy,jy],styles:[".questionnaire-list[_ngcontent-%COMP%]{width:100%;max-height:400px;overflow:auto;border:1px solid #ccc;border-radius:4px;background-color:#f9f9f9;padding:10px}.list[_ngcontent-%COMP%] .cdk-drag[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:4px;background-color:#fff;margin-bottom:10px;padding:10px;display:flex;align-items:center;justify-content:left;box-shadow:0 2px 4px #0000001a}.drag-handle[_ngcontent-%COMP%]{cursor:move;margin-right:15px;font-size:20px;color:#666}.cdk-drag-preview[_ngcontent-%COMP%]{background-color:#e0e0e0}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:0}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.form-layout[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:15px}.form-layout[_ngcontent-%COMP%] .full-width[_ngcontent-%COMP%]{width:100%}.form-layout[_ngcontent-%COMP%] .half-width[_ngcontent-%COMP%]{width:50%;margin-right:15px}"]})}return e})();function s2t(e,i){if(1&e&&(tt(0,"mat-option",16),ut(1),et()),2&e){const t=i.$implicit;yt("value",t),lt(),Ye(" ",t," ")}}function a2t(e,i){if(1&e){const t=ve();tt(0,"mat-form-field",13)(1,"mat-select",15),Vt("selectionChange",function(r){return Ut(t),zt(Ct(2)._changePageSize(r.value))}),O_(2,s2t,2,2,"mat-option",16,F_),et()()}if(2&e){const t=Ct(2);yt("appearance",t._formFieldAppearance)("color",t.color),lt(),yt("value",t.pageSize)("disabled",t.disabled)("aria-labelledby",t._pageSizeLabelId)("panelClass",t.selectConfig.panelClass||"")("disableOptionCentering",t.selectConfig.disableOptionCentering),lt(),L_(t._displayedPageSizeOptions)}}function o2t(e,i){if(1&e&&(tt(0,"div",14),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.pageSize)}}function l2t(e,i){if(1&e&&(tt(0,"div",2)(1,"div",12),ut(2),et(),Gt(3,a2t,4,7,"mat-form-field",13)(4,o2t,2,1,"div",14),et()),2&e){const t=Ct();lt(),Ti("id",t._pageSizeLabelId),lt(),Ye(" ",t._intl.itemsPerPageLabel," "),lt(),xn(3,t._displayedPageSizeOptions.length>1?3:-1),lt(),xn(4,t._displayedPageSizeOptions.length<=1?4:-1)}}function c2t(e,i){if(1&e){const t=ve();tt(0,"button",17),Vt("click",function(){return Ut(t),zt(Ct().firstPage())}),ul(),tt(1,"svg",7),we(2,"path",18),et()()}if(2&e){const t=Ct();yt("matTooltip",t._intl.firstPageLabel)("matTooltipDisabled",t._previousButtonsDisabled())("matTooltipPosition","above")("disabled",t._previousButtonsDisabled()),Ti("aria-label",t._intl.firstPageLabel)}}function d2t(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){return Ut(t),zt(Ct().lastPage())}),ul(),tt(1,"svg",7),we(2,"path",20),et()()}if(2&e){const t=Ct();yt("matTooltip",t._intl.lastPageLabel)("matTooltipDisabled",t._nextButtonsDisabled())("matTooltipPosition","above")("disabled",t._nextButtonsDisabled()),Ti("aria-label",t._intl.lastPageLabel)}}let qC=(()=>{class e{constructor(){this.changes=new Pe,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(t,n,r)=>{if(0==r||0==n)return`0 of ${r}`;const s=t*n;return`${s+1} \u2013 ${s<(r=Math.max(r,0))?Math.min(s+n,r):s+n} of ${r}`}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const h2t={provide:qC,deps:[[new Nd,new Tf,qC]],useFactory:function u2t(e){return e||new qC}},m2t=new ee("MAT_PAGINATOR_DEFAULT_OPTIONS");let p2t=0,oP=(()=>{class e{get pageIndex(){return this._pageIndex}set pageIndex(t){this._pageIndex=Math.max(t||0,0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(t){this._length=t||0,this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(t){this._pageSize=Math.max(t||0,0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(t){this._pageSizeOptions=(t||[]).map(n=>jr(n,0)),this._updateDisplayedPageSizeOptions()}constructor(t,n,r){if(this._intl=t,this._changeDetectorRef=n,this._pageSizeLabelId="mat-paginator-page-size-label-"+p2t++,this._isInitialized=!1,this._initializedStream=new py(1),this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this.hidePageSize=!1,this.showFirstLastButtons=!1,this.selectConfig={},this.disabled=!1,this.page=new De,this.initialized=this._initializedStream,this._intlChanges=t.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){const{pageSize:s,pageSizeOptions:o,hidePageSize:l,showFirstLastButtons:w}=r;null!=s&&(this._pageSize=s),null!=o&&(this._pageSizeOptions=o),null!=l&&(this.hidePageSize=l),null!=w&&(this.showFirstLastButtons=w)}this._formFieldAppearance=r?.formFieldAppearance||"outline"}ngOnInit(){this._isInitialized=!0,this._updateDisplayedPageSizeOptions(),this._initializedStream.next()}ngOnDestroy(){this._initializedStream.complete(),this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(t)}previousPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(t)}firstPage(){if(!this.hasPreviousPage())return;const t=this.pageIndex;this.pageIndex=0,this._emitPageEvent(t)}lastPage(){if(!this.hasNextPage())return;const t=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(t)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const t=this.getNumberOfPages()-1;return this.pageIndext-n),this._changeDetectorRef.markForCheck())}_emitPageEvent(t){this.page.emit({previousPageIndex:t,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(qC),mt(Mn),mt(m2t,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{color:"color",pageIndex:[Wt.HasDecoratorInputTransform,"pageIndex","pageIndex",jr],length:[Wt.HasDecoratorInputTransform,"length","length",jr],pageSize:[Wt.HasDecoratorInputTransform,"pageSize","pageSize",jr],pageSizeOptions:"pageSizeOptions",hidePageSize:[Wt.HasDecoratorInputTransform,"hidePageSize","hidePageSize",Je],showFirstLastButtons:[Wt.HasDecoratorInputTransform,"showFirstLastButtons","showFirstLastButtons",Je],selectConfig:"selectConfig",disabled:[Wt.HasDecoratorInputTransform,"disabled","disabled",Je]},outputs:{page:"page"},exportAs:["matPaginator"],standalone:!0,features:[ln,Vi],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],[1,"mat-mdc-paginator-page-size-label"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],[1,"mat-mdc-paginator-page-size-value"],["hideSingleSelectionIndicator","",3,"selectionChange","value","disabled","aria-labelledby","panelClass","disableOptionCentering"],[3,"value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"click","matTooltip","matTooltipDisabled","matTooltipPosition","disabled"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"div",1),Gt(2,l2t,5,4,"div",2),tt(3,"div",3)(4,"div",4),ut(5),et(),Gt(6,c2t,3,5,"button",5),tt(7,"button",6),Vt("click",function(){return r.previousPage()}),ul(),tt(8,"svg",7),we(9,"path",8),et()(),Q0(),tt(10,"button",9),Vt("click",function(){return r.nextPage()}),ul(),tt(11,"svg",7),we(12,"path",10),et()(),Gt(13,d2t,3,5,"button",11),et()()()),2&n&&(lt(2),xn(2,r.hidePageSize?-1:2),lt(3),Ye(" ",r._intl.getRangeLabel(r.pageIndex,r.pageSize,r.length)," "),lt(),xn(6,r.showFirstLastButtons?6:-1),lt(),yt("matTooltip",r._intl.previousPageLabel)("matTooltipDisabled",r._previousButtonsDisabled())("matTooltipPosition","above")("disabled",r._previousButtonsDisabled()),Ti("aria-label",r._intl.previousPageLabel),lt(3),yt("matTooltip",r._intl.nextPageLabel)("matTooltipDisabled",r._nextButtonsDisabled())("matTooltipPosition","above")("disabled",r._nextButtonsDisabled()),Ti("aria-label",r._intl.nextPageLabel),lt(3),xn(13,r.showFirstLastButtons?13:-1))},dependencies:[Xl,lv,nu,Oo,xu],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color);background-color:var(--mat-paginator-container-background-color);font-family:var(--mat-paginator-container-text-font);line-height:var(--mat-paginator-container-text-line-height);font-size:var(--mat-paginator-container-text-size);font-weight:var(--mat-paginator-container-text-weight);letter-spacing:var(--mat-paginator-container-text-tracking);--mat-form-field-container-height:var(--mat-paginator-form-field-container-height);--mat-form-field-container-vertical-padding:var(--mat-paginator-form-field-container-vertical-padding)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size)}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}return e})(),g2t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:[h2t],imports:[QR,KW,eX,oP]})}return e})(),rj=(()=>{class e{constructor(t,n){this.http=t,this.fhirService=n}generateRootQuestionnaire(t,n){var r=this;return de(function*(){try{let o=yield Ca(r.http.get("assets/questionnaires/root-questionnaire-template.json"));o.title=t;let l=0,w=r.fhirService.getBaseUrl();return r.fhirService.getUserTag(),n.forEach(M=>{l++,M.url=w+"/Questionnaire/"+M.id,o.item.push({linkId:l.toString(),text:M.title,type:"group",required:!1,item:[{extension:[{url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire",valueCanonical:M.url}],linkId:l.toString()+".1",text:"Unable to resolve sub-questionnaire",type:"display"}]})}),o}catch(s){throw console.error("Error generating root questionnaire:",s),s}})()}getRootQuestionnaireData(t){var n=this;return de(function*(){if(!t||!Array.isArray(t.item))throw new Error("Invalid root questionnaire");const r=t.title,s=t.item.filter(l=>"group"===l.type&&l.item&&Array.isArray(l.item)).flatMap(l=>l.item).map(function(){var l=de(function*(w){const C=w.extension?.find(M=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===M.url);return C?n.getQuestionnaireFromUrl(C.valueCanonical):null});return function(w){return l.apply(this,arguments)}}());return{title:r,questionnaires:(yield Promise.all(s)).filter(l=>null!==l)}})()}checkForAssembleRoot(t){return!!(t&&t.extension&&Array.isArray(t.extension))&&t.extension.some(n=>"assemble-root"===n.valueCode)}assembleQuestionnaire(t){var n=this;return de(function*(){if(t=JSON.parse(JSON.stringify(t)),!n.checkForAssembleRoot(t))return null;for(let r of t.item)if("group"==r.type){r.extension=[];for(let s of r.item)if(s.extension&&Array.isArray(s.extension))for(let o of s.extension)if("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===o.url){let l=yield n.getQuestionnaireFromUrl(o.valueCanonical);l&&(r.item=l.item),r.extension||(r.extension=[]),r.extension.push({url:"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom",valueCanonical:o.valueCanonical})}}return t.extension=t.extension.filter(r=>"assemble-root"!==r.valueCode),t})()}disassembleQuestionnaire(t){var n=this;return de(function*(){if(!t||!t.item||!Array.isArray(t.item))throw new Error("Invalid root questionnaire");const r=t.title,s=[];for(const o of t.item)if("group"===o.type&&o.extension&&Array.isArray(o.extension)){const l=o.extension.find(w=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assembledFrom"===w.url);if(l){const w=l.valueCanonical,C=yield n.getQuestionnaireFromUrl(w);C&&s.push(C)}}return{title:r,questionnaires:s}})()}getQuestionnaireFromUrl(t){var n=this;return de(function*(){try{return yield Ca(n.http.get(t))}catch(r){return console.error("Error fetching questionnaire:",r),null}})()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(sd),Jt(hv))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const v2t=()=>[5,10,20],x2t=e=>["status-pill",e],y2t=()=>["status-pill","active"],b2t=()=>["status-pill","draft"];function w2t(e,i){1&e&&(tt(0,"th",19),ut(1," Title "),et())}function _2t(e,i){if(1&e&&(tt(0,"td",20),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.title," ")}}function T2t(e,i){1&e&&(tt(0,"th",19),ut(1," Status "),et())}function C2t(e,i){if(1&e&&(tt(0,"td",20)(1,"span",21),ut(2),sa(3,"uppercase"),et()()),2&e){const t=i.$implicit;lt(),yt("ngClass",vc(4,x2t,t.status)),lt(),Ze(xc(3,2,t.status))}}function S2t(e,i){1&e&&(tt(0,"th",22),ut(1," Version "),et())}function E2t(e,i){if(1&e&&(tt(0,"td",20),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.meta.versionId," ")}}function A2t(e,i){1&e&&(tt(0,"th",19),ut(1," Last updated "),et())}function D2t(e,i){if(1&e&&(tt(0,"td",20),ut(1),sa(2,"date"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",Xd(2,1,t.meta.lastUpdated,"MMMM d, y, h:mm:ss a")," ")}}function M2t(e,i){1&e&&(tt(0,"th",19),ut(1," Type "),et())}function I2t(e,i){1&e&&(tt(0,"span",21),ut(1,"QUESTIONNAIRE"),et()),2&e&&yt("ngClass",Ko(1,y2t))}function R2t(e,i){1&e&&(tt(0,"span",21),ut(1,"MODULAR ROOT"),et()),2&e&&yt("ngClass",Ko(1,b2t))}function k2t(e,i){if(1&e&&(tt(0,"td",20),Gt(1,I2t,2,2,"span",23)(2,R2t,2,2,"span",23),et()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.isRootQuestionnaire(t))}}function P2t(e,i){1&e&&(tt(0,"th",22),ut(1," Actions "),et())}function F2t(e,i){if(1&e){const t=ve();tt(0,"button",34),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().validate(r))}),tt(1,"mat-icon"),ut(2,"done"),et()()}if(2&e){const t=Ct().$implicit;yt("disabled",Ct().isRootQuestionnaire(t))}}function O2t(e,i){if(1&e){const t=ve();tt(0,"button",35),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().assemble(r))}),tt(1,"mat-icon"),ut(2,"build"),et()()}}function L2t(e,i){if(1&e){const t=ve();tt(0,"button",36),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().preview(r))}),tt(1,"mat-icon"),ut(2,"visibility"),et()()}}function N2t(e,i){if(1&e){const t=ve();tt(0,"button",37),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().openInNewTab(r))}),tt(1,"mat-icon"),ut(2,"open_in_new"),et()()}}function B2t(e,i){if(1&e){const t=ve();tt(0,"button",38),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().editQuestionnaire(r))}),tt(1,"mat-icon"),ut(2,"edit"),et()()}}function V2t(e,i){if(1&e){const t=ve();tt(0,"button",39),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().openModularQuestionnaireModal(r))}),tt(1,"mat-icon"),ut(2,"edit"),et()()}}function U2t(e,i){if(1&e){const t=ve();tt(0,"td",20),Gt(1,F2t,3,1,"button",24)(2,O2t,3,0,"button",25)(3,L2t,3,0,"button",26)(4,N2t,3,0,"button",27),tt(5,"button",28),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().saveQuestionnaire(r))}),tt(6,"mat-icon"),ut(7,"cloud_download"),et()(),Gt(8,B2t,3,0,"button",29)(9,V2t,3,0,"button",30),tt(10,"button",31),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().viewHistory(r))}),tt(11,"mat-icon"),ut(12,"history"),et()(),tt(13,"span",32)(14,"button",33),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().deleteQuestionnaire(r))}),tt(15,"mat-icon"),ut(16,"delete"),et()()()()}if(2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",n.config.validate),lt(),yt("ngIf",n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.config.preview&&!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.config.preview),lt(4),yt("ngIf",!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.isRootQuestionnaire(t)),lt(),yt("disabled",1==t.meta.versionId),lt(3),hh("matTooltip",n.getDeleteTooltip(t)),lt(),yt("disabled",n.getReferencingQuestionnaires(t).length>0)}}function z2t(e,i){1&e&&we(0,"tr",40)}function G2t(e,i){1&e&&we(0,"tr",41)}function H2t(e,i){1&e&&(tt(0,"p",42)(1,"i"),ut(2," No questionnaires found. Upload your questionnaires to start. "),et()())}function W2t(e,i){1&e&&we(0,"mat-spinner",43)}function X2t(e,i){if(1&e){const t=ve();tt(0,"button",44),Vt("click",function(){return Ut(t),zt(Ct().downloadAllQuestionnaires())}),ut(1," Download bundle "),et()}}let sj=(()=>{class e{constructor(t,n,r,s){this.fhirService=t,this.questionnaireService=n,this.dialog=r,this._snackBar=s,this.questionnaireSelected=new De,this.validateQuestionnaire=new De,this.previewQuestionnaire=new De,this.viewQuestionaireHistory=new De,this.config={},this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new em,this.questionnaires=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.notFound=!1,this.baseUrlChanged=new Pe,this.userTagChanged=new Pe,this.fbUrl="https://formbuilder.nlm.nih.gov",this.blankQuestionnaire={resourceType:"Questionnaire",title:"New Form",status:"draft",item:[{type:"string",linkId:"4009522077787",text:"Item 0"}]}}ngOnInit(){}ngAfterViewInit(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort,this.dataSource.sortingDataAccessor=(t,n)=>{switch(n){case"type":return this.isRootQuestionnaire(t)?"Modular root":"Questionnaire";case"version":return t.meta&&t.meta.versionId?t.meta.versionId:"";case"lastUpdated":return t.meta&&t.meta.lastUpdated?new Date(t.meta.lastUpdated):"";default:return t[n]}},this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires(),Zd([this.fhirService.baseUrl$.pipe(tu(1e3),eu()),this.fhirService.userTag$.pipe(tu(1e3),eu())]).subscribe(([t,n])=>{(this.selectedFhirServer!==t||this.selectedUserTag!==n)&&(this.selectedFhirServer=t,this.selectedUserTag=n,this.selectedUserTag&&this.selectedFhirServer&&this.loadQuestionnaires())})}ngOnChanges(t){}loadQuestionnaires(){this.loading=!0,this.notFound=!1,this.questionnaires=[],this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(t=>{t.entry?(this.questionnaires=t.entry.map(n=>n.resource),this.dataSource.data=this.questionnaires,this.dataSource.sort=this.sort,this.loading=!1,this.sort.active="title",this.sort.direction="asc",this.sort.sortChange.emit()):(this.questionnaires=[],this.dataSource.data=this.questionnaires,this.loading=!1,this.notFound=!0)})}updateQuestionnairesList(t){const n=this.questionnaires.findIndex(r=>r.id===t.id);-1!==n?(this.questionnaires[n]=t,this.dataSource.data=this.questionnaires):(this.questionnaires.push(t),this.dataSource.data=this.questionnaires)}addQuestionnaire(t){this.updateQuestionnairesList(t)}deleteQuestionnaire(t){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Deleting Questionnaire...",panelClass:["green-snackbar"]}),this.fhirService.deleteQuestionnaire(t.id).subscribe(()=>{this.questionnaires=this.questionnaires.filter(n=>n.id!==t.id),this.dataSource.data=this.questionnaires,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire deleted successfully",panelClass:["green-snackbar"]})})}selectQuestionnaire(t){this.questionnaireSelected.emit(t)}validate(t){this.validateQuestionnaire.emit(t)}viewHistory(t){this.viewQuestionaireHistory.emit(t)}preview(t){this.previewQuestionnaire.emit(t)}openInNewTab(t){window.open(this.selectedFhirServer+"/Questionnaire/"+t.id,"_blank")}saveQuestionnaire(t){var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});dd(n,`${t.title}-v${t.meta.versionId}.json`)}isRootQuestionnaire(t){return!(!t.extension||!Array.isArray(t.extension))&&t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode)}assemble(t){this._snackBar.openFromComponent(Ar,{duration:2e3,data:"Assembling Questionnaire...",panelClass:["green-snackbar"]}),this.questionnaireService.assembleQuestionnaire(t).then(n=>{n.title=t.title+" (assembled)",this.previewQuestionnaire.emit(n),this._snackBar.openFromComponent(Ar,{duration:2e3,data:"Questionnaire ready",panelClass:["green-snackbar"]})}).catch(n=>{console.error("Error assembling questionnaire:",n)})}createQuestionnaire(){let t=this.blankQuestionnaire;t.meta||(t.meta={}),t.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.editQuestionnaire(t)}editQuestionnaire(t){const n=window.open(this.fbUrl+"/window-open?referrer="+encodeURIComponent(window.location.href));window.addEventListener("message",function s(o){if(o.origin===r.fbUrl){const w=o.data.questionnaire;switch(o.data.type){case"initialized":n?.postMessage({type:"initialQuestionnaire",questionnaire:t},r.fbUrl);break;case"updateQuestionnaire":break;case"closed":r.fhirService.updateOrCreateQuestionnaire(w,r.selectedUserTag).pipe(Vl()).subscribe(C=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(C)},C=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})})}}},!0);let r=this}openModularQuestionnaireModal(t){var n=this;return de(function*(){let r=yield n.questionnaireService.getRootQuestionnaireData(t);n.dialog.open(nj,{data:r,width:"75%"}).afterClosed().subscribe(o=>{o&&n.handleDialogResult(o,t)})})()}handleDialogResult(t,n){var r=this;return de(function*(){r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Updating questionnaire...",panelClass:["green-snackbar"]});try{let s=yield r.questionnaireService.generateRootQuestionnaire(t.title,t.questionnaires);s&&(n.title=t.title,n.item=s.item,r.addQuestionnaire(n),r.fhirService.updateOrCreateQuestionnaire(n,r.selectedUserTag).pipe(Vl()).subscribe(o=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire updated successfully",panelClass:["green-snackbar"]}),r.updateQuestionnairesList(o)},o=>{r._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]})}))}catch(s){console.error("Error handling dialog result:",s)}})()}downloadAllQuestionnaires(){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Downloading Questionnaires...",panelClass:["green-snackbar"]}),this.fhirService.getQuestionnairesByTag(this.selectedUserTag).subscribe(t=>{var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});dd(n,"questionnaires-bundle.json"),this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaires downloaded successfully",panelClass:["green-snackbar"]})})}getReferencingQuestionnaires(t){let r=`${this.fhirService.getBaseUrl()}/Questionnaire/${t.id}`;return this.dataSource.data.filter(o=>o.item&&Array.isArray(o.item)&&o.item.some(l=>l.item&&Array.isArray(l.item)&&l.item.some(w=>w.extension&&Array.isArray(w.extension)&&w.extension.some(C=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-subQuestionnaire"===C.url&&C.valueCanonical===r))))}getDeleteTooltip(t){const n=this.getReferencingQuestionnaires(t);return 0===n.length?"Delete Questionnaire":`Cannot delete: Referenced by ${n.map(s=>`"${s.title}"`).join(", ")}`}static#t=this.\u0275fac=function(n){return new(n||e)(mt(hv),mt(rj),mt(lm),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-list-questionnaires"]],viewQuery:function(n,r){if(1&n&&(Mi(oP,5),Mi(Lh,5)),2&n){let s;Be(s=Ve())&&(r.paginator=s.first),Be(s=Ve())&&(r.sort=s.first)}},inputs:{config:"config"},outputs:{questionnaireSelected:"questionnaireSelected",validateQuestionnaire:"validateQuestionnaire",previewQuestionnaire:"previewQuestionnaire",viewQuestionaireHistory:"viewQuestionaireHistory"},features:[tr],decls:28,vars:9,consts:[["id","table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["showFirstLastButtons","",1,"mat-elevation-z8",3,"pageSizeOptions","pageSize"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["id","outer-container"],[1,"download-button-container"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],["mat-header-cell",""],[3,"ngClass",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Validate Questionnaire",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Assemble Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Preview Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Open resource in new tab",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Edit Modular Questionnaire",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","View Questionnaire History",1,"action-button",3,"click","disabled"],[3,"matTooltip"],["mat-icon-button","","color","accent",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Validate Questionnaire",1,"action-button",3,"click","disabled"],["mat-icon-button","","color","accent","matTooltip","Assemble Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Edit Modular Questionnaire",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"],["mat-flat-button","","color","accent","matTooltip","Download all Questionnaires",3,"click"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"table",1),Wi(2,2),Gt(3,w2t,2,0,"th",3)(4,_2t,2,1,"td",4),Xi(),Wi(5,5),Gt(6,T2t,2,0,"th",3)(7,C2t,4,6,"td",4),Xi(),Wi(8,6),Gt(9,S2t,2,0,"th",7)(10,E2t,2,1,"td",4),Xi(),Wi(11,8),Gt(12,A2t,2,0,"th",3)(13,D2t,3,4,"td",4),Xi(),Wi(14,9),Gt(15,M2t,2,0,"th",3)(16,k2t,3,2,"td",4),Xi(),Wi(17,10),Gt(18,P2t,2,0,"th",7)(19,U2t,17,9,"td",4),Xi(),Gt(20,z2t,1,0,"tr",11)(21,G2t,1,0,"tr",12),et(),we(22,"mat-paginator",13),Gt(23,H2t,3,0,"p",14)(24,W2t,1,0,"mat-spinner",15),et(),tt(25,"div",16)(26,"div",17),Gt(27,X2t,2,0,"button",18),et()()),2&n&&(lt(),yt("dataSource",r.dataSource),lt(19),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(),yt("pageSizeOptions",Ko(8,v2t))("pageSize",10),lt(),yt("ngIf",r.notFound&&!r.questionnaires.length),lt(),yt("ngIf",r.loading),lt(3),yt("ngIf",!r.loading&&r.questionnaires.length>0))},dependencies:[bc,Ms,Sa,Oo,da,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,Lh,aP,oP,_I,gh],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}#table-container[_ngcontent-%COMP%]{padding-bottom:2rem}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px;margin-bottom:2rem}"]})}return e})(),j2t=(()=>{class e{constructor(t){this.dialogRef=t,this.listConfig={select:!0}}selectAndDownload(t){this.dialogRef.close(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-load-questionnaire-modal"]],decls:7,vars:1,consts:[[3,"questionnaireSelected","config"],["align","end"],["mat-flat-button","","color","accent","mat-dialog-close",""]],template:function(n,r){1&n&&(tt(0,"mat-dialog-content")(1,"h2"),ut(2,"Available Questionnaires"),et(),tt(3,"app-list-questionnaires",0),Vt("questionnaireSelected",function(o){return r.selectAndDownload(o)}),et()(),tt(4,"mat-dialog-actions",1)(5,"button",2),ut(6,"Close"),et()()),2&n&&(lt(3),yt("config",r.listConfig))},dependencies:[Sa,dv,Yy,jy,sj]})}return e})();const Y2t=["settingsForm"];function $2t(e,i){1&e&&(tt(0,"mat-error"),ut(1,"Base URL is required"),et())}function Q2t(e,i){1&e&&(tt(0,"mat-error"),ut(1,"User Tag is required and must be at least 3 characters"),et())}let lP=(()=>{class e{constructor(t,n){this.fhirService=t,this.dialogRef=n,this.baseUrl="",this.userTag=""}ngAfterViewInit(){this.triggerValidation()}triggerValidation(){Object.keys(this.settingsForm.controls).forEach(t=>{const n=this.settingsForm.control.get(t);n?.markAsTouched({onlySelf:!0}),n?.markAsDirty({onlySelf:!0})})}ngOnInit(){this.baseUrl=this.fhirService.getBaseUrl(),this.userTag=this.fhirService.getUserTag()}updateSettings(){this.settingsForm.valid&&(this.fhirService.setBaseUrl(this.baseUrl),this.fhirService.setUserTag(this.userTag),this.dialogRef.close("save"))}static#t=this.\u0275fac=function(n){return new(n||e)(mt(hv),mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-fhir-server-settings-modal"]],viewQuery:function(n,r){if(1&n&&Mi(Y2t,5),2&n){let s;Be(s=Ve())&&(r.settingsForm=s.first)}},decls:29,vars:5,consts:[["settingsForm","ngForm"],["baseUrlField","ngModel"],["userTagField","ngModel"],[1,"form-container"],[1,"warning"],[3,"ngSubmit"],["matInput","","name","baseUrl","required","",3,"ngModelChange","ngModel"],[4,"ngIf"],["matInput","","name","userTag","required","","minlength","3",3,"ngModelChange","ngModel"],[1,"button-container"],["mat-flat-button","","color","accent","type","submit",3,"disabled"],["mat-flat-button","","color","primary","mat-dialog-close",""]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",3)(1,"h2"),ut(2,"FHIR Server Connection"),et(),tt(3,"p"),ut(4,"Manager mode allows you to store questionnares in a FHIR Server. Enter the FHIR server URL and your "),tt(5,"b"),ut(6,"User Tag"),et(),ut(7,", this value will be used to identify your questionnaires."),et(),tt(8,"p",4),ut(9,"Warning: using the default public FHIR server will not ensure the persistence of your information, always save your questionnaires to your computer as a backup."),et(),tt(10,"form",5,0),Vt("ngSubmit",function(){return Ut(s),zt(r.updateSettings())}),tt(12,"mat-form-field")(13,"mat-label"),ut(14,"Base URL of the FHIR Server"),et(),tt(15,"input",6,1),wa("ngModelChange",function(l){return Ut(s),Na(r.baseUrl,l)||(r.baseUrl=l),zt(l)}),et(),Gt(17,$2t,2,0,"mat-error",7),et(),tt(18,"mat-form-field")(19,"mat-label"),ut(20,"User Tag"),et(),tt(21,"input",8,2),wa("ngModelChange",function(l){return Ut(s),Na(r.userTag,l)||(r.userTag=l),zt(l)}),et(),Gt(23,Q2t,2,0,"mat-error",7),et(),tt(24,"div",9)(25,"button",10),ut(26,"Open FHIR Repository"),et(),tt(27,"button",11),ut(28,"Close"),et()()()()}if(2&n){const s=qi(11),o=qi(16),l=qi(22);lt(15),ba("ngModel",r.baseUrl),lt(2),yt("ngIf",o.invalid&&o.touched),lt(4),ba("ngModel",r.userTag),lt(2),yt("ngIf",l.invalid&&l.touched),lt(2),yt("disabled",!s.valid)}},dependencies:[Ms,Sa,Xl,wl,EW,Fh,rv,Hl,No,nm,FC,Nk,Wl,sm,dv],styles:[".form-container[_ngcontent-%COMP%]{margin:auto;padding:20px}mat-form-field[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.warning[_ngcontent-%COMP%]{color:#ff9500;font-weight:lighter;font-style:italic}"]})}return e})(),cP=(()=>{class e{constructor(t,n){this.data=t,this.dialogRef=n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(QC),mt(Oh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-confirmation-dialog"]],decls:10,vars:4,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","",1,"button-container"],["mat-button","",3,"mat-dialog-close"]],template:function(n,r){1&n&&(tt(0,"h1",0),ut(1),et(),tt(2,"div",1)(3,"p"),ut(4),et()(),tt(5,"div",2)(6,"button",3),ut(7,"Yes"),et(),tt(8,"button",3),ut(9,"No"),et()()),2&n&&(lt(),Ze(r.data.title),lt(3),Ze(r.data.message),lt(2),yt("mat-dialog-close",!0),lt(2),yt("mat-dialog-close",!1))},dependencies:[Sa,dv,nP,Yy,jy],encapsulation:2})}return e})();const K2t=new ee("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");let dP=(()=>{class e{constructor(t,n,r,s,o){this._elementRef=t,this._ngZone=n,this._changeDetectorRef=r,this._animationMode=s,this._isNoopAnimation=!1,this._defaultColor="primary",this._value=0,this._bufferValue=0,this.animationEnd=new De,this._mode="determinate",this._transitionendHandler=l=>{0===this.animationEnd.observers.length||!l.target||!l.target.classList.contains("mdc-linear-progress__primary-bar")||("determinate"===this.mode||"buffer"===this.mode)&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation="NoopAnimations"===s,o&&(o.color&&(this.color=this._defaultColor=o.color),this.mode=o.mode||this.mode)}get color(){return this._color||this._defaultColor}set color(t){this._color=t}get value(){return this._value}set value(t){this._value=aj(t||0),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(t){this._bufferValue=aj(t||0),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(t){this._mode=t,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${"buffer"===this.mode?this.bufferValue:100}%`}_isIndeterminate(){return"indeterminate"===this.mode||"query"===this.mode}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ii),mt(Mn),mt(Nr,8),mt(K2t,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(n,r){2&n&&(Ti("aria-valuenow",r._isIndeterminate()?null:r.value)("mode",r.mode),Ll("mat-"+r.color),bi("_mat-animation-noopable",r._isNoopAnimation)("mdc-linear-progress--animation-ready",!r._isNoopAnimation)("mdc-linear-progress--indeterminate",r._isIndeterminate()))},inputs:{color:"color",value:[Wt.HasDecoratorInputTransform,"value","value",jr],bufferValue:[Wt.HasDecoratorInputTransform,"bufferValue","bufferValue",jr],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],standalone:!0,features:[ln,Vi],decls:7,vars:4,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(n,r){1&n&&(tt(0,"div",0),we(1,"div",1)(2,"div",2),et(),tt(3,"div",3),we(4,"span",4),et(),tt(5,"div",5),we(6,"span",4),et()),2&n&&(lt(),Ds("flex-basis",r._getBufferBarFlexBasis()),lt(2),Ds("transform",r._getPrimaryBarTransform()))},styles:["@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half))}100%{transform:translateX(var(--mdc-linear-progress-primary-full))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-primary-full-neg))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full-neg))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height) * -2.5))}}.mdc-linear-progress__bar-inner{border-color:var(--mdc-linear-progress-active-indicator-color)}.mdc-linear-progress__buffer-dots{background-color:var(--mdc-linear-progress-track-color)}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-color:rgba(0,0,0,0);background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E\")}}.mdc-linear-progress__buffer-bar{background-color:var(--mdc-linear-progress-track-color)}.mdc-linear-progress{height:max(var(--mdc-linear-progress-track-height), var(--mdc-linear-progress-active-indicator-height))}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress{height:4px}}.mdc-linear-progress__bar{height:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__bar-inner{border-top-width:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__buffer{height:var(--mdc-linear-progress-track-height)}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-size:10px var(--mdc-linear-progress-track-height)}}.mdc-linear-progress__buffer{border-radius:var(--mdc-linear-progress-track-shape)}.mat-mdc-progress-bar{display:block;text-align:start;--mdc-linear-progress-primary-half: 83.67142%;--mdc-linear-progress-primary-full: 200.611057%;--mdc-linear-progress-secondary-quarter: 37.651913%;--mdc-linear-progress-secondary-half: 84.386165%;--mdc-linear-progress-secondary-full: 160.277782%;--mdc-linear-progress-primary-half-neg: -83.67142%;--mdc-linear-progress-primary-full-neg: -200.611057%;--mdc-linear-progress-secondary-quarter-neg: -37.651913%;--mdc-linear-progress-secondary-half-neg: -84.386165%;--mdc-linear-progress-secondary-full-neg: -160.277782%}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}"],encapsulation:2,changeDetection:0})}return e})();function aj(e,i=0,t=100){return Math.max(i,Math.min(t,e))}let J2t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki]})}return e})();const q2t=["questionnairesList"];function tMt(e,i){if(1&e&&(tt(0,"div",19),we(1,"mat-progress-bar",20),tt(2,"div",21),ut(3),et()()),2&e){const t=Ct();lt(),yt("value",t.validatingProgress),lt(2),Ye("",t.validatingProgress,"%")}}function eMt(e,i){if(1&e){const t=ve();tt(0,"button",22),Vt("click",function(){return Ut(t),zt(Ct().saveQuestionnaire())}),ut(1," Save changes "),et()}if(2&e){const t=Ct();yt("disabled",t.validating||!t.questionnaire)}}function iMt(e,i){1&e&&(tt(0,"span"),ut(1,"Run validation"),et())}function nMt(e,i){1&e&&we(0,"mat-spinner",26)}function rMt(e,i){if(1&e){const t=ve();tt(0,"button",23),Vt("click",function(){return Ut(t),zt(Ct().validate())}),Gt(1,iMt,2,0,"span",24)(2,nMt,1,0,"mat-spinner",25),et()}if(2&e){const t=Ct();lt(),yt("ngIf",!t.validating),lt(),yt("ngIf",t.validating)}}function sMt(e,i){if(1&e&&(tt(0,"span",32),ut(1),et()),2&e){const t=Ct(2);lt(),Ye("Error: ",t.loadResults.error,"")}}function aMt(e,i){if(1&e&&(tt(0,"span",33),ut(1),et()),2&e){const t=Ct(2);lt(),Ye("Inactive: ",t.loadResults.inactive,"")}}function oMt(e,i){if(1&e&&(tt(0,"span",34),ut(1),et()),2&e){const t=Ct(2);lt(),Ye("Active: ",t.loadResults.active,"")}}function lMt(e,i){if(1&e&&(tt(0,"p",27)(1,"b"),ut(2,"Questionnaire:"),et(),ut(3),tt(4,"i"),ut(5),et(),ut(6,") - "),tt(7,"span",28),ut(8),et(),ut(9),sa(10,"date"),Gt(11,sMt,2,1,"span",29)(12,aMt,2,1,"span",30)(13,oMt,2,1,"span",31),et()),2&e){const t=Ct();lt(3),Ye(" ",t.questionnaire.title," ("),lt(2),Ze(t.questionnaire.url),lt(3),Ye("",t.dataSource.data.length," bindings"),lt(),Zc(" - - Version: ",t.questionnaire.meta.versionId," (",Xd(10,8,t.questionnaire.meta.lastUpdated,"fullDate"),") "),lt(2),yt("ngIf",t.loadResults.total>0),lt(),yt("ngIf",t.loadResults.total>0),lt(),yt("ngIf",t.loadResults.total>0)}}function cMt(e,i){1&e&&(tt(0,"th",35),ut(1," # "),et())}function dMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.order," ")}}function uMt(e,i){1&e&&(tt(0,"th",35),ut(1," FHIRPath "),et())}function hMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.path," ")}}function fMt(e,i){1&e&&(tt(0,"th",35),ut(1," Path "),et())}function mMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.readablePath," ")}}function pMt(e,i){1&e&&(tt(0,"th",35),ut(1,"Code "),et())}function gMt(e,i){if(1&e&&(tt(0,"td",36)(1,"a",37),ut(2),et()()),2&e){const t=i.$implicit;lt(),H_("href","http://snomed.info/id/",t.code,"",lx),lt(),Ze(t.code)}}function vMt(e,i){1&e&&(tt(0,"th",35),ut(1," Display "),et())}function xMt(e,i){if(1&e&&(tt(0,"p",41),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ye("Concept FSN: ",t.serverDisplay,"")}}function yMt(e,i){1&e&&(tt(0,"p",42),ut(1,"Concept is inactive"),et())}function bMt(e,i){if(1&e){const t=ve();tt(0,"p",43),ut(1),tt(2,"button",44),Vt("click",function(){const r=Ut(t).$implicit,s=Ct().$implicit;return zt(Ct().replaceInactiveConcept(s,r.replacement))}),tt(3,"mat-icon"),ut(4,"arrow_forward"),et()()()}if(2&e){const t=i.$implicit,n=Ct(2);lt(),Ux(" Replacement: ",t.equivalence," to ",t.replacement.code," |",t.replacement.display,"| "),lt(),yt("disabled",n.validating)}}function wMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),Gt(2,xMt,2,1,"p",38)(3,yMt,2,0,"p",39)(4,bMt,5,4,"p",40),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.display," "),lt(),yt("ngIf",t.serverDisplay),lt(),yt("ngIf","Inactive"==t.status),lt(),yt("ngForOf",t.replacements)}}function _Mt(e,i){1&e&&(tt(0,"th",35),ut(1," System "),et())}function TMt(e,i){if(1&e&&(tt(0,"td",36),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.system," ")}}function CMt(e,i){1&e&&(tt(0,"th",35),ut(1," Status "),et())}function SMt(e,i){1&e&&(tt(0,"span"),we(1,"mat-progress-bar",45),et())}function EMt(e,i){if(1&e&&(tt(0,"span")(1,"span",46),ut(2),et()()),2&e){const t=Ct().$implicit;lt(),yt("ngClass",t.status),lt(),Ze(t.status)}}function AMt(e,i){if(1&e&&(tt(0,"td",36),Gt(1,SMt,2,0,"span",24)(2,EMt,3,2,"span",24),et()),2&e){const t=i.$implicit;lt(),yt("ngIf","Validating"==t.status),lt(),yt("ngIf","Validating"!=t.status)}}function DMt(e,i){1&e&&we(0,"tr",47)}function MMt(e,i){1&e&&we(0,"tr",48)}function IMt(e,i){1&e&&we(0,"mat-spinner",49)}let RMt=(()=>{class e{constructor(t,n){this.terminologyService=t,this._snackBar=n,this.questionnaireUpdated=new De,this.validatingQuestionnaire=new De,this.loading=!1,this.validating=!1,this.displayedColumns=["order","readablePath","code","display","system","status"],this.dataSource=new em,this.validatingProgress=0,this.orderCounter=0,this.loadResults={total:0,active:0,inactive:0,error:0},this.requiresSave=!1}ngOnChanges(t){t.questionnaire&&(this.questionnaire?this.loadQuestionnaire(this.questionnaire):this.clearQuestionnaire())}clearQuestionnaire(){this.questionnaire=null,this.dataSource.data=[],this.orderCounter=0,this.validatingProgress=0,this.loadResults={total:0,active:0,inactive:0,error:0}}loadQuestionnaire(t){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=t;let n=this.extractObjects(t);this.dataSource.data=n,this.dataSource.sort=this.sort},700)}validate(){var t=this;this.loadResults={total:0,active:0,inactive:0,error:0},this.dataSource.data.forEach(s=>{s.status="Not checked"}),this.validating=!0,this.validatingQuestionnaire.emit(!0);let n=this.dataSource.data.length,r=0;this.asyncForEach(this.dataSource.data,function(){var s=de(function*(o){t.loadResults.total++,o.status="Validating",r++,t.validatingProgress=Math.round(r/n*100);try{const l=yield t.terminologyService.lookupConcept(o.code,o.system).pipe(Vl()).toPromise();let w=[],C="";for(const M of l.parameter){if("designation"===M.name){let P="",O="";for(const L of M.part)"value"===L.name&&(P=L.valueString),"use"===L.name&&(O=L.valueCoding?.code);w.push(P),"900000000000003001"===O&&(C=P)}"inactive"===M.name&&(M.valueBoolean?(o.status="Inactive",t.loadResults.inactive++):(o.status="Active",t.loadResults.active++))}if((!o.display||!w.includes(o.display))&&(o.serverDisplay=C),"Inactive"==o.status){const M=yield t.getHistoricalAssociationsTarget("900000000000527005",o.code),P=yield t.getHistoricalAssociationsTarget("900000000000530003",o.code),O=yield t.getHistoricalAssociationsTarget("900000000000523009",o.code),L=yield t.getHistoricalAssociationsTarget("900000000000526001",o.code),U=M.concat(P,O,L);o.replacements=U}}catch{o.status="Error",t.loadResults.error++}});return function(o){return s.apply(this,arguments)}}()).then(()=>{this.validating=!1,this.validatingQuestionnaire.emit(!1)})}getHistoricalAssociationsTarget(t,n){var r=this;return de(function*(){let s=[];const o=r.terminologyService.translate(t,n);let l=yield Ca(o.pipe(Di(w=>w)));if(l.parameter)for(const w of l.parameter)if("match"===w.name){let C={replacement:{},equivalence:""};for(const M of w.part)"concept"===M.name&&M.valueCoding&&(C.replacement={code:M.valueCoding.code,display:M.valueCoding.display,system:M.valueCoding.system}),"equivalence"===M.name&&M.valueCode&&(C.equivalence=M.valueCode);s.push(C)}return s})()}removeSemanticTag(t){return t.replace(/\s*\([^)]+\)\s*$/,"").trim().toLowerCase()}asyncForEach(t,n){return de(function*(){for(let r=0;r ${t.text}`:t.text),t.system&&t.system.startsWith("http://snomed.info/sct")&&t.code&&t.display){this.orderCounter++;const o={order:this.orderCounter,system:t.system,code:t.code,display:t.display,path:n,readablePath:r,status:"Not checked"};s.some(l=>l.system===o.system&&l.code===o.code&&l.display===o.display)||s.push(o)}if(Array.isArray(t))for(let o in t)s=s.concat(this.extractObjects(t[o],`${n}[${o}]`,r));else for(let o in t)t.hasOwnProperty(o)&&(s=s.concat(this.extractObjects(t[o],n?`${n}.${o}`:o,r)));if(t.answerValueSet&&t.answerValueSet.startsWith("http")){const l=new URL(t.answerValueSet).searchParams.get("fhir_vs");if(l){const w=decodeURIComponent(l),C=/(\d{5,})(?:\s*\|\s*([^|]*)\s*\|)?/g;let M;for(;null!==(M=C.exec(w));)this.orderCounter++,s.push({order:this.orderCounter,code:M[1],display:M[2]?M[2].trim():void 0,system:"http://snomed.info/sct",path:n+".answerValueSet",readablePath:r+" -> answerValueSet [ECL]",status:"Not checked"})}}return s}replaceInactiveConcept(t,n){this.searchAndReplace(this.questionnaire,t,n,!1)&&(this.requiresSave=!0,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Inactive reference replaced successfully. Save the questionnaire to persist the changes.",panelClass:["green-snackbar"]}))}saveQuestionnaire(){this.questionnaireUpdated.emit(this.questionnaire)}searchAndReplace(t,n,r,s){if("object"!=typeof t||null===t)return s;if(t.system==n.system&&t.code==n.code&&t.display==n.display&&(t.system=r.system,t.code=r.code,t.display=r.display,s=!0),t.answerValueSet){const o=new URL(t.answerValueSet),l=o.searchParams.get("fhir_vs");if(l){const w=decodeURIComponent(l),C=new RegExp(`(\\s|^)${n.code}(\\s|$|\\|)`,"g");if(C.test(w)){const M=w.replace(C,`$1${r.code}$2`);s=!0;const P=new RegExp(`\\|\\s*${n.display}\\s*\\|`,"g");if(P.test(M)){const O=M.replace(P,`| ${r.display} |`);o.searchParams.set("fhir_vs",encodeURIComponent(O)),t.answerValueSet=o.toString()}o.searchParams.set("fhir_vs",encodeURIComponent(M)),t.answerValueSet=o.toString()}}}if(Array.isArray(t))for(let o in t)s=this.searchAndReplace(t[o],n,r,s);else for(let o in t)t.hasOwnProperty(o)&&(s=this.searchAndReplace(t[o],n,r,s));if(s&&this.dataSource.data)for(let o in this.dataSource.data)this.dataSource.data[o].system==n.system&&this.dataSource.data[o].code==n.code&&this.dataSource.data[o].display==n.display&&(this.dataSource.data[o].system=r.system,this.dataSource.data[o].code=r.code,this.dataSource.data[o].display=r.display,this.dataSource.data[o].status="Active",this.dataSource.data[o].replacements=[]);return s}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-validate-questionnaire"]],viewQuery:function(n,r){if(1&n&&(Mi(Lh,5),Mi(ov,5),Mi(q2t,5)),2&n){let s;Be(s=Ve())&&(r.sort=s.first),Be(s=Ve())&&(r.tabGroup=s.first),Be(s=Ve())&&(r.questionnairesList=s.first)}},inputs:{questionnaire:"questionnaire"},outputs:{questionnaireUpdated:"questionnaireUpdated",validatingQuestionnaire:"validatingQuestionnaire"},features:[tr],decls:31,vars:8,consts:[[1,"button-container","bottom-spacer"],["class","progress-container",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","accent",3,"click",4,"ngIf"],["class","header","id","tab-header",4,"ngIf"],[1,"table-container","mt-4"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","order"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","path"],["matColumnDef","readablePath"],["matColumnDef","code"],["matColumnDef","display"],["matColumnDef","system"],["matColumnDef","status"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["diameter","35","class","loading-spinner",4,"ngIf"],[1,"progress-container"],["mode","determinate",3,"value"],[1,"progress-label"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"click"],[4,"ngIf"],["diameter","20",4,"ngIf"],["diameter","20"],["id","tab-header",1,"header"],[1,"bindingsCount"],["class","mini-pill Error",4,"ngIf"],["class","mini-pill Inactive",4,"ngIf"],["class","mini-pill Active",4,"ngIf"],[1,"mini-pill","Error"],[1,"mini-pill","Inactive"],[1,"mini-pill","Active"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["target","_blank",1,"code-link",3,"href"],["class","server-name",4,"ngIf"],["class","concept-is-inactive",4,"ngIf"],["class","replacement",4,"ngFor","ngForOf"],[1,"server-name"],[1,"concept-is-inactive"],[1,"replacement"],["mat-icon-button","","color","primary","matTooltip","Replace using this concept",3,"click","disabled"],["mode","indeterminate"],[1,"pill",3,"ngClass"],["mat-header-row",""],["mat-row",""],["diameter","35",1,"loading-spinner"]],template:function(n,r){1&n&&(tt(0,"div",0),Gt(1,tMt,4,2,"div",1)(2,eMt,2,1,"button",2)(3,rMt,3,2,"button",3),et(),Gt(4,lMt,14,11,"p",4),tt(5,"div",5)(6,"table",6),Wi(7,7),Gt(8,cMt,2,0,"th",8)(9,dMt,2,1,"td",9),Xi(),Wi(10,10),Gt(11,uMt,2,0,"th",8)(12,hMt,2,1,"td",9),Xi(),Wi(13,11),Gt(14,fMt,2,0,"th",8)(15,mMt,2,1,"td",9),Xi(),Wi(16,12),Gt(17,pMt,2,0,"th",8)(18,gMt,3,3,"td",9),Xi(),Wi(19,13),Gt(20,vMt,2,0,"th",8)(21,wMt,5,4,"td",9),Xi(),Wi(22,14),Gt(23,_Mt,2,0,"th",8)(24,TMt,2,1,"td",9),Xi(),Wi(25,15),Gt(26,CMt,2,0,"th",8)(27,AMt,3,2,"td",9),Xi(),Gt(28,DMt,1,0,"tr",16)(29,MMt,1,0,"tr",17),et(),Gt(30,IMt,1,0,"mat-spinner",18),et()),2&n&&(lt(),yt("ngIf",r.validating),lt(),yt("ngIf",r.requiresSave),lt(),yt("ngIf",!r.validating&&r.questionnaire),lt(),yt("ngIf",r.questionnaire),lt(2),yt("dataSource",r.dataSource),lt(22),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(),yt("ngIf",r.loading))},dependencies:[bc,gs,Ms,Sa,Oo,da,dP,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,Lh,aP,gh],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem;padding-bottom:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}"]})}return e})();const kMt=e=>["status-pill",e],PMt=()=>["status-pill","active"],FMt=()=>["status-pill","draft"];function OMt(e,i){1&e&&(tt(0,"th",15),ut(1," Title "),et())}function LMt(e,i){if(1&e&&(tt(0,"td",16),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.title," ")}}function NMt(e,i){1&e&&(tt(0,"th",15),ut(1," Status "),et())}function BMt(e,i){if(1&e&&(tt(0,"td",16)(1,"span",17),ut(2),sa(3,"uppercase"),et()()),2&e){const t=i.$implicit;lt(),yt("ngClass",vc(4,kMt,t.status)),lt(),Ze(xc(3,2,t.status))}}function VMt(e,i){1&e&&(tt(0,"th",15),ut(1," Version "),et())}function UMt(e,i){if(1&e&&(tt(0,"td",16),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.meta.versionId," ")}}function zMt(e,i){1&e&&(tt(0,"th",15),ut(1," Date "),et())}function GMt(e,i){if(1&e&&(tt(0,"td",16)(1,"i"),ut(2),sa(3,"date"),et()()),2&e){const t=i.$implicit;lt(2),Ze(Xd(3,1,t.meta.lastUpdated,"MMMM d, y, h:mm:ss a"))}}function HMt(e,i){1&e&&(tt(0,"th",15),ut(1," Type "),et())}function WMt(e,i){1&e&&(tt(0,"span",17),ut(1,"QUESTIONNAIRE"),et()),2&e&&yt("ngClass",Ko(1,PMt))}function XMt(e,i){1&e&&(tt(0,"span",17),ut(1,"MODULAR ROOT"),et()),2&e&&yt("ngClass",Ko(1,FMt))}function jMt(e,i){if(1&e&&(tt(0,"td",16),Gt(1,WMt,2,2,"span",18)(2,XMt,2,2,"span",18),et()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",!n.isRootQuestionnaire(t)),lt(),yt("ngIf",n.isRootQuestionnaire(t))}}function YMt(e,i){1&e&&(tt(0,"th",19),ut(1," Actions "),et())}function $Mt(e,i){if(1&e){const t=ve();tt(0,"button",24),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().restore(r))}),tt(1,"mat-icon"),ut(2,"restore_page"),et()()}}function QMt(e,i){if(1&e){const t=ve();tt(0,"td",16)(1,"button",20),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().preview(r))}),tt(2,"mat-icon"),ut(3,"visibility"),et()(),tt(4,"button",21),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().openInNewTab(r))}),tt(5,"mat-icon"),ut(6,"open_in_new"),et()(),tt(7,"button",22),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().saveQuestionnaire(r))}),tt(8,"mat-icon"),ut(9,"cloud_download"),et()(),Gt(10,$Mt,3,0,"button",23),et()}if(2&e){const t=i.$implicit,n=Ct();lt(10),yt("ngIf",(null==t||null==t.meta?null:t.meta.versionId)!=(null==n.versions[0]||null==n.versions[0].meta?null:n.versions[0].meta.versionId))}}function KMt(e,i){1&e&&we(0,"tr",25)}function ZMt(e,i){1&e&&we(0,"tr",26)}function JMt(e,i){1&e&&(tt(0,"p",27)(1,"i"),ut(2," No questionnaire selected. "),et()())}function qMt(e,i){1&e&&we(0,"mat-spinner",28)}let tIt=(()=>{class e{constructor(t){this.fhirService=t,this.previewQuestionnaire=new De,this.restoreQuestionnaireVersion=new De,this.versions=[],this.loading=!1,this.selectedFhirServer="",this.selectedUserTag="",this.displayedColumns=["title","status","version","lastUpdated","type","actions"],this.dataSource=new em}ngOnChanges(t){t.questionnaire&&t.questionnaire.currentValue&&t.questionnaire.currentValue.id&&this.loadVersions()}ngOnInit(){Zd([this.fhirService.baseUrl$.pipe(tu(1e3),eu()),this.fhirService.userTag$.pipe(tu(1e3),eu())]).subscribe(([t,n])=>{(this.selectedFhirServer!==t||this.selectedUserTag!==n)&&(this.selectedFhirServer=t,this.selectedUserTag=n,this.selectedUserTag&&this.selectedFhirServer&&this.loadVersions())})}loadVersions(t){this.versions=[],this.dataSource.data=this.versions,t&&(this.questionnaire=t),this.questionnaire&&(this.loading=!0,this.fhirService.getQuestionnaireHistory(this.questionnaire.id).subscribe(n=>{this.versions=n.entry.map(r=>r.resource),this.dataSource.data=this.versions,this.loading=!1},n=>{this.loading=!1}))}preview(t){this.previewQuestionnaire.emit(t),this.loadVersions()}openInNewTab(t){window.open(this.selectedFhirServer+"/Questionnaire/"+t.id+"/_history/"+t.meta.versionId,"_blank")}saveQuestionnaire(t){var n=new Blob([JSON.stringify(t,null,2)],{type:"text/plain;charset=utf-8"});dd(n,`${t.title}-v${t.meta.versionId}.json`)}restore(t){this.restoreQuestionnaireVersion.emit(t)}isRootQuestionnaire(t){return!(!t.extension||!Array.isArray(t.extension))&&t.extension.some(n=>"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-assemble-expectation"===n.url&&"assemble-root"===n.valueCode)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(hv))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-questionnaire-history"]],inputs:{questionnaire:"questionnaire"},outputs:{previewQuestionnaire:"previewQuestionnaire",restoreQuestionnaireVersion:"restoreQuestionnaireVersion"},features:[tr],decls:24,vars:5,consts:[[1,"table-container"],["mat-table","","matSort","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","version"],["matColumnDef","lastUpdated"],["matColumnDef","type"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","not-found",4,"ngIf"],["diameter","35","class","loading-spinner",4,"ngIf"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"ngClass"],[3,"ngClass",4,"ngIf"],["mat-header-cell",""],["mat-icon-button","","color","accent","matTooltip","Preview Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Open resource in new tab",1,"action-button",3,"click"],["mat-icon-button","","color","accent","matTooltip","Download Questionnaire",1,"action-button",3,"click"],["mat-icon-button","","color","accent","class","action-button","matTooltip","Restore Version",3,"click",4,"ngIf"],["mat-icon-button","","color","accent","matTooltip","Restore Version",1,"action-button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"not-found"],["diameter","35",1,"loading-spinner"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"table",1),Wi(2,2),Gt(3,OMt,2,0,"th",3)(4,LMt,2,1,"td",4),Xi(),Wi(5,5),Gt(6,NMt,2,0,"th",3)(7,BMt,4,6,"td",4),Xi(),Wi(8,6),Gt(9,VMt,2,0,"th",3)(10,UMt,2,1,"td",4),Xi(),Wi(11,7),Gt(12,zMt,2,0,"th",3)(13,GMt,4,4,"td",4),Xi(),Wi(14,8),Gt(15,HMt,2,0,"th",3)(16,jMt,3,2,"td",4),Xi(),Wi(17,9),Gt(18,YMt,2,0,"th",10)(19,QMt,11,1,"td",4),Xi(),Gt(20,KMt,1,0,"tr",11)(21,ZMt,1,0,"tr",12),et(),Gt(22,JMt,3,0,"p",13)(23,qMt,1,0,"mat-spinner",14),et()),2&n&&(lt(),yt("dataSource",r.dataSource),lt(19),yt("matHeaderRowDef",r.displayedColumns),lt(),yt("matRowDefColumns",r.displayedColumns),lt(),yt("ngIf",!r.questionnaire),lt(),yt("ngIf",r.loading))},dependencies:[bc,Ms,Oo,da,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,Lh,aP,_I,gh],styles:[".list-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.list-text[_ngcontent-%COMP%]{flex-grow:1}.list-subtext[_ngcontent-%COMP%]{font-size:.8rem;color:#666;margin-left:1rem}.action-button[_ngcontent-%COMP%]{margin-left:8px}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.list-item[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.status-pill[_ngcontent-%COMP%]{display:inline-block;padding:3px 8px;border-radius:15px;font-size:10px;color:#fff;text-align:center;margin-left:1rem}.status-pill.draft[_ngcontent-%COMP%]{background-color:#007bff}.status-pill.unknown[_ngcontent-%COMP%]{background-color:#ffc107}.status-pill.active[_ngcontent-%COMP%]{background-color:#28a745}.status-pill.retired[_ngcontent-%COMP%]{background-color:#dc3545}.not-found[_ngcontent-%COMP%]{margin-top:2rem}#outer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end}.download-button-container[_ngcontent-%COMP%]{margin-top:10px}.table-container[_ngcontent-%COMP%]{margin:2rem;padding-bottom:2rem}"]})}return e})();const eIt=["questionnairesList"],iIt=["fileInput"],nIt=["questionnaireHistory"];function rIt(e,i){1&e&&(tt(0,"span"),ut(1," / Validator"),et())}function sIt(e,i){1&e&&(tt(0,"span"),ut(1," / Questionnaires repository"),et())}function aIt(e,i){if(1&e){const t=ve();tt(0,"span",19)(1,"a",20),Vt("click",function(){return Ut(t),zt(Ct(3).mode="Manager")}),tt(2,"mat-icon"),ut(3,"play_arrow"),et(),tt(4,"span"),ut(5,"Reconnect to last FHIR Server"),et()()()}}function oIt(e,i){if(1&e&&(tt(0,"span",19)(1,"span",21),ut(2),tt(3,"i"),ut(4),et(),ut(5,'" )'),et()()),2&e){const t=Ct(3);lt(2),Ye(" ( ",t.selectedFhirServer,' as "'),lt(2),Ze(t.selectedUserTag)}}function lIt(e,i){if(1&e){const t=ve();tt(0,"div",14)(1,"h3",15),ut(2,"Work with the Questionnaire Manager"),et(),tt(3,"p",15),ut(4,"Connect to a FHIR server to store and version your questionnaire resources. Use the integrated questionnaire manager, editor and validator."),et(),tt(5,"div",16)(6,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="repository",zt(r.advanceFromStep1())}),ut(7,"Connect to a FHIR Server and Open Repository Manager"),et(),Gt(8,aIt,6,0,"span",18)(9,oIt,6,2,"span",18),et()()}if(2&e){const t=Ct(2);lt(8),yt("ngIf",t.selectedFhirServer&&t.selectedUserTag),lt(),yt("ngIf",t.selectedFhirServer&&t.selectedUserTag)}}function cIt(e,i){if(1&e){const t=ve();tt(0,"div",22)(1,"h3",15),ut(2,"Work with a single questionnaire"),et(),tt(3,"p",15),ut(4,"Create, preview or validate a questionnaire you upload from your computer."),et(),tt(5,"div",23)(6,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="edit",zt(r.advanceFromStep1())}),ut(7,"Open NLM Form Builder"),et(),tt(8,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="example",zt(r.advanceFromStep1())}),ut(9,"Load an example questionnaire"),et(),tt(10,"button",17),Vt("click",function(){Ut(t);const r=Ct(2);return r.step1Response="validate",zt(r.advanceFromStep1())}),ut(11,"Upload and validate a questionnaire"),et()()()}}function dIt(e,i){if(1&e&&(tt(0,"div",10)(1,"div",11),Gt(2,lIt,10,2,"div",12)(3,cIt,12,0,"div",13),et()()),2&e){const t=Ct();lt(2),yt("ngIf","step1"==t.mode),lt(),yt("ngIf","utility"==t.mode)}}function uIt(e,i){if(1&e&&(tt(0,"span"),ut(1," Connected to "),tt(2,"a",37),ut(3),et(),ut(4,' as "'),tt(5,"i"),ut(6),et(),ut(7,'" '),et()),2&e){const t=Ct(2);lt(2),yt("href",t.selectedFhirServer,lx),lt(),Ze(t.selectedFhirServer),lt(3),Ze(t.selectedUserTag)}}function hIt(e,i){if(1&e){const t=ve();tt(0,"button",26),Vt("click",function(){return Ut(t),zt(Ct(2).createQuestionnaire())}),ut(1," Create Questionnaire "),et()}2&e&&yt("disabled",Ct(2).validating)}function fIt(e,i){if(1&e){const t=ve();tt(0,"button",26),Vt("click",function(){return Ut(t),zt(Ct(2).openModularQuestionnaireModal())}),ut(1," Create Modular Questionnaire "),et()}2&e&&yt("disabled",Ct(2).validating)}function mIt(e,i){if(1&e){const t=ve();tt(0,"mat-tab",38)(1,"div",31)(2,"app-list-questionnaires",39,3),Vt("validateQuestionnaire",function(r){return Ut(t),zt(Ct(2).switchToValidateTab(r))})("previewQuestionnaire",function(r){return Ut(t),zt(Ct(2).switchToPreviewTab(r))})("viewQuestionaireHistory",function(r){return Ut(t),zt(Ct(2).switchToHistoryTab(r))}),et()()()}if(2&e){const t=Ct(2);lt(2),yt("config",t.listConfig)}}function pIt(e,i){if(1&e&&(tt(0,"h4"),ut(1),sa(2,"date"),et()),2&e){const t=Ct(2);lt(),Ux("",t.questionnaire.title," - Version: ",t.questionnaire.meta.versionId," (",Xd(2,3,t.questionnaire.meta.lastUpdated,"fullDate"),")")}}function gIt(e,i){if(1&e){const t=ve();tt(0,"div")(1,"div",24),Gt(2,uIt,8,3,"span",8),tt(3,"input",25,0),Vt("change",function(r){return Ut(t),zt(Ct().onFileSelected(r))}),et(),tt(5,"button",26),Vt("click",function(){return Ut(t),zt(qi(4).click())}),ut(6," Upload "),et(),tt(7,"button",26),Vt("click",function(){return Ut(t),zt(Ct().saveQuestionnaireToDisk())}),ut(8,"Download"),et(),Gt(9,hIt,2,1,"button",27)(10,fIt,2,1,"button",27),et(),tt(11,"mat-tab-group",28),Vt("selectedIndexChange",function(r){return Ut(t),zt(Ct().onTabChange(r))}),Gt(12,mIt,4,1,"mat-tab",29),tt(13,"mat-tab",30)(14,"div",31),Gt(15,pIt,3,6,"h4",8),we(16,"div",32),et()(),tt(17,"mat-tab",33)(18,"app-validate-questionnaire",34,1),Vt("questionnaireUpdated",function(r){return Ut(t),zt(Ct().saveQuestionnaire(r))})("validatingQuestionnaire",function(r){return Ut(t),zt(Ct().validating=r)}),et()(),tt(20,"mat-tab",35)(21,"app-questionnaire-history",36,2),Vt("previewQuestionnaire",function(r){return Ut(t),zt(Ct().switchToPreviewTab(r))})("restoreQuestionnaireVersion",function(r){return Ut(t),zt(Ct().saveQuestionnaire(r))}),et()()()()}if(2&e){const t=Ct();lt(2),yt("ngIf","Manager"==t.mode),lt(3),yt("disabled",t.validating),lt(2),yt("disabled",t.validating||!t.questionnaire),lt(2),yt("ngIf","Manager"==t.mode),lt(),yt("ngIf","Manager"==t.mode),lt(2),yt("ngIf","Manager"===t.mode),lt(3),yt("ngIf",t.questionnaire),lt(),bi("hidden",!t.questionnaire),lt(2),yt("questionnaire",t.questionnaire),lt(3),yt("questionnaire",t.questionnaire)}}let vIt=(()=>{class e{constructor(t,n,r,s,o,l,w){this.http=t,this.terminologyService=n,this.fhirService=r,this.questionnaireService=s,this.activatedRoute=o,this.dialog=l,this._snackBar=w,this.loading=!1,this.validating=!1,this.orderCounter=0,this.savingQuestionnaire=!1,this.selectedFhirServer="",this.selectedUserTag="",this.showFhirSetupModal=!1,this.listConfig={validate:!0,preview:!0},this.mode="step1"}ngOnInit(){this.fhirService.baseUrl$.subscribe(t=>{this.selectedFhirServer=t}),this.fhirService.userTag$.subscribe(t=>{this.selectedUserTag=t}),this.activatedRoute.queryParams.subscribe(t=>{this.mode="true"===t.utility?"utility":"step1"}),this.loadScript()}loadScript(){const t=document.createElement("script");t.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/webcomponent/lhc-forms.js",t.onload=()=>{const n=document.createElement("script");n.src="https://clinicaltables.nlm.nih.gov/lforms-versions/36.3.2/fhir/R4/lformsFHIR.min.js",n.onload=()=>{},document.head.appendChild(n)},document.head.appendChild(t)}toggleMode(){"Validator"===this.mode?this.dialog.open(lP,{width:"60%",disableClose:!0}).afterClosed().subscribe(n=>{"save"===n&&(this.mode="Manager",setTimeout(()=>{this.tabGroup.selectedIndex=0},500))}):this.mode="Validator"}previewForm(){"Preview"==this.getCurrentTabName()&&(this.questionnaire?LForms.Util.addFormToPage(this.questionnaire,"myFormContainer"):LForms.Util.addFormToPage({},"myFormContainer"))}getFormData(){this.questionnaire&&LForms.Util.getFormData("myFormContainer",!0,!0,!0)}displayHistory(t){t&&this.questionnaireHistory.loadVersions(t)}loadExampleQuestionnaire(){Ca(this.http.get("assets/questionnaires/Carcinoma-of-the-Exocrine-Pancreas-Histopathology-Reporting-Form.R4 (11).json")).then(t=>{this.loadQuestionnaire(t),"Manager"===this.mode&&(this.tabGroup.selectedIndex=1)})}clearQuestionnaire(){this.questionnaire=null,this.orderCounter=0,this.previewForm()}createQuestionnaire(){this.questionnairesList.createQuestionnaire()}loadQuestionnaire(t){this.loading=!0,this.clearQuestionnaire(),setTimeout(()=>{this.loading=!1,this.questionnaire=t,this.previewForm()},700)}saveQuestionnaireToDisk(){var t=new Blob([JSON.stringify(this.questionnaire,null,2)],{type:"text/plain;charset=utf-8"});dd(t,`${this.questionnaire.title}.json`)}onFileSelected(t){const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const o=JSON.parse(s.target?.result);"Questionnaire"===o.resourceType?(this.loadQuestionnaire(o),setTimeout(()=>{"Manager"===this.mode?this.postCurrentQuestionnaire():this.tabGroup.selectedIndex=1},1e3)):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"The file is not a FHIR Questionnaire Resource",panelClass:["red-snackbar"]})}catch(o){console.error(o),this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Invalid JSON file",panelClass:["red-snackbar"]})}},r.readAsText(n),t.target.value=""}}postCurrentQuestionnaire(){this.postQuestionnaire(this.questionnaire)}postQuestionnaire(t){if(-1!==this.questionnairesList.questionnaires.findIndex(r=>r.title===t.title&&r.id!==t.id))this.dialog.open(cP,{width:"400px",data:{title:"Confirm Action",message:"A questionnaire with the same title and different ID already exists. Do you want to proceed?"}}).afterClosed().subscribe(s=>{s?this.saveQuestionnaire(t):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})});else{-1!==this.questionnairesList.questionnaires.findIndex(o=>o.title===t.title&&o.id===t.id&&o.meta?.versionId>=t.meta?.versionId)?this.dialog.open(cP,{width:"400px",data:{title:"Confirm Action",message:"A newer version or identical of this questionnaire already exists. Do you want to proceed?"}}).afterClosed().subscribe(l=>{l?this.saveQuestionnaire(t):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire save action cancelled",panelClass:["red-snackbar"]})}):this.saveQuestionnaire(t)}}saveQuestionnaire(t){t?(this.savingQuestionnaire=!0,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Saving Questionnaire...",panelClass:["green-snackbar"]}),t.meta||(t.meta={}),t.meta.tag=[{system:"http://snomed.org/tags",code:this.selectedUserTag,display:this.selectedUserTag},{system:"http://snomed.org/tags",code:"questionnaireManagerTool",display:"questionnaireManagerTool"}],this.fhirService.updateOrCreateQuestionnaire(t,this.selectedUserTag).pipe(Vl()).subscribe(n=>{setTimeout(()=>{this.tabGroup.selectedIndex=0,setTimeout(()=>{this.savingQuestionnaire=!1,this.questionnairesList.addQuestionnaire(n)},300)},300),this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire saved successfully",panelClass:["green-snackbar"]})},n=>{this.savingQuestionnaire=!1,this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error saving questionnaire",panelClass:["red-snackbar"]}),this.dialog.open(cP,{width:"400px",data:{title:"Save error",message:"This could be an ID conflict. Post again as a new questionnaire?"}}).afterClosed().subscribe(s=>{s?(delete t.id,this.saveQuestionnaire(t)):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Questionnaire not saved",panelClass:["red-snackbar"]})})})):this._snackBar.openFromComponent(Ar,{duration:5e3,data:"No questionnaire to save",panelClass:["red-snackbar"]})}listQuestionnaires(){this.fhirService.getQuestionnairesByTag(this.selectedUserTag).pipe(Vl()).subscribe(t=>{},t=>{console.error(t)})}openLoadQuestionnairesDialog(){this.dialog.open(j2t,{width:"70%"}).afterClosed().subscribe(n=>{this.loadQuestionnaire(n)})}setFhirServer(){this.fhirService.setBaseUrl(this.selectedFhirServer),this.fhirService.setUserTag(this.selectedUserTag)}setupFhirServer(){this.dialog.open(lP,{width:"60%"})}switchToValidateTab(t){this.loadQuestionnaire(t),this.tabGroup.selectedIndex=2}switchToPreviewTab(t){this.loadQuestionnaire(t),this.tabGroup.selectedIndex=1}switchToHistoryTab(t){this.displayHistory(t),this.tabGroup.selectedIndex=3}advanceFromStep1(){"edit"==this.step1Response?window.open("https://lhcformbuilder.nlm.nih.gov/","_blank"):"validate"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.uploadInput.nativeElement.click()},200)):"repository"==this.step1Response?this.dialog.open(lP,{width:"60%"}).afterClosed().subscribe(n=>{n&&(this.mode="Manager")}):"example"==this.step1Response?(this.mode="Validator",setTimeout(()=>{this.loadExampleQuestionnaire()},300)):"reconnect"==this.step1Response&&(this.mode="Manager"),this.step1Response=""}getCurrentTabName(){const t=this.tabGroup.selectedIndex;return null!=t?this.tabGroup._tabs.toArray()[t].textLabel:""}onTabChange(t){"Preview"===this.tabGroup._tabs.toArray()[t].textLabel&&setTimeout(()=>{this.previewForm()},300)}openModularQuestionnaireModal(){this.dialog.open(nj,{width:"75%"}).afterClosed().subscribe(n=>{n&&this.questionnaireService.generateRootQuestionnaire(n.title,n.questionnaires).then(r=>{this.postQuestionnaire(r)}).catch(r=>{console.error("Error:",r)})})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd),mt(ca),mt(hv),mt(rj),mt(Tc),mt(lm),mt(Sh))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-questionnaires-main"]],viewQuery:function(n,r){if(1&n&&(Mi(Lh,5),Mi(ov,5),Mi(eIt,5),Mi(iIt,5),Mi(nIt,5)),2&n){let s;Be(s=Ve())&&(r.sort=s.first),Be(s=Ve())&&(r.tabGroup=s.first),Be(s=Ve())&&(r.questionnairesList=s.first),Be(s=Ve())&&(r.uploadInput=s.first),Be(s=Ve())&&(r.questionnaireHistory=s.first)}},decls:11,vars:4,consts:[["fileInput",""],["validateQuestionnaire",""],["questionnaireHistory",""],["questionnairesList",""],[1,"header-container"],[1,"header"],[1,"breadcrumb"],["href","javascript:void(0)",3,"click"],[4,"ngIf"],["id","step1",4,"ngIf"],["id","step1"],[1,"flex","justify-between","pr-4"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px]",4,"ngIf"],["class","w-full border-2 border-blue-200 bg-transparent rounded-lg p-4 m-2 min-h-[500px] justify-center",4,"ngIf"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]"],[1,"text-center"],[1,"flex","justify-center","flex-col","gap-1","mt-10"],["mat-flat-button","","color","accent",1,"mx-auto","w-auto","flex-none",3,"click"],["class","mx-auto w-auto flex-none",4,"ngIf"],[1,"mx-auto","w-auto","flex-none"],["href","javascript:void(0)","id","reconnect-link",3,"click"],[1,"muted"],[1,"w-full","border-2","border-blue-200","bg-transparent","rounded-lg","p-4","m-2","min-h-[500px]","justify-center"],[1,"flex","justify-center","flex-col","gap-5","mt-10"],[1,"button-container","bottom-spacer"],["type","file","hidden","",3,"change"],["mat-flat-button","","color","accent",3,"click","disabled"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-stretch-tabs","false","mat-align-tabs","start",3,"selectedIndexChange"],["label","My Questionnaires",4,"ngIf"],["label","Preview"],[1,"tab-container"],["id","myFormContainer"],["label","Validate SNOMED Bindings"],[3,"questionnaireUpdated","validatingQuestionnaire","questionnaire"],["label","History"],[3,"previewQuestionnaire","restoreQuestionnaireVersion","questionnaire"],["target","_blank",3,"href"],["label","My Questionnaires"],[3,"validateQuestionnaire","previewQuestionnaire","viewQuestionaireHistory","config"]],template:function(n,r){1&n&&(tt(0,"div",4)(1,"h2",5),ut(2," SNOMED CT Terminology Bindings Validator - FHIR Questionnaire Manager "),et(),tt(3,"div",6)(4,"span")(5,"a",7),Vt("click",function(){return r.mode="step1"}),ut(6,"Home"),et(),Gt(7,rIt,2,0,"span",8)(8,sIt,2,0,"span",8),et()()(),Gt(9,dIt,4,2,"div",9)(10,gIt,23,11,"div",8)),2&n&&(lt(7),yt("ngIf","Validator"==r.mode),lt(),yt("ngIf","Manager"==r.mode),lt(),yt("ngIf","step1"==r.mode||"utility"==r.mode),lt(),yt("ngIf","Manager"==r.mode||"Validator"==r.mode))},dependencies:[Ms,Sa,da,zy,ov,sj,RMt,tIt,gh],styles:[".header[_ngcontent-%COMP%]{margin-left:2rem;margin-top:1rem}.table-container[_ngcontent-%COMP%]{margin-left:2rem;margin-right:2rem}.button-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin-right:2rem;align-items:center}.bottom-spacer[_ngcontent-%COMP%]{margin-bottom:1rem}.pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;font-weight:700;text-align:center;display:inline-block;font-size:.8rem}.pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.mini-pill[_ngcontent-%COMP%]{padding:5px 10px;border-radius:20px;text-align:center;font-weight:700;font-size:.9rem;margin-right:2rem;float:right}.mini-pill.Active[_ngcontent-%COMP%]{background-color:#4caf50;color:#fff}.mini-pill.Inactive[_ngcontent-%COMP%]{background-color:#ffc107;color:#fff}.mini-pill.Error[_ngcontent-%COMP%]{background-color:#f44336;color:#fff}.progress-container[_ngcontent-%COMP%]{margin-top:1rem;position:relative;width:30%}.progress-label[_ngcontent-%COMP%]{position:absolute;width:100%;text-align:center;top:60%;transform:translateY(-50%);font-size:.9rem;font-weight:700}.bindingsCount[_ngcontent-%COMP%]{font-size:1rem;font-weight:lighter}.loading-spinner[_ngcontent-%COMP%]{margin-left:2rem;margin-top:2rem}.code-link[_ngcontent-%COMP%]{font-size:.8rem}.server-name[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:maroon}.replacement[_ngcontent-%COMP%]{font-weight:lighter;font-style:italic;color:#00800b;display:flex;align-items:center;font-size:.9rem;margin-left:2rem}.concept-is-inactive[_ngcontent-%COMP%]{color:maroon;font-size:.9rem;margin-bottom:0rem}#myFormContainer[_ngcontent-%COMP%], #tab-header[_ngcontent-%COMP%]{margin-top:1rem}.tab-container[_ngcontent-%COMP%]{padding-top:1rem;padding-left:2rem;padding-right:2rem}.outgoing-link[_ngcontent-%COMP%]{font-size:.8rem;float:right;margin-right:2rem}#step1[_ngcontent-%COMP%]{margin-top:2rem;margin-left:2rem;font-size:large}#step1[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{margin-left:2rem;display:flex;flex-direction:column;align-items:flex-start}.step-button-container[_ngcontent-%COMP%]{margin-left:30rem;margin-top:2rem}.breadcrumb[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:2rem}.header-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.hidden[_ngcontent-%COMP%]{visibility:hidden}.muted[_ngcontent-%COMP%]{color:#8f9397}#reconnect[_ngcontent-%COMP%]{margin-left:5rem}#reconnect-link[_ngcontent-%COMP%]{display:flex;vertical-align:middle;flex-direction:row}"]})}return e})();const xIt=e=>({"bg-pink":e});function yIt(e,i){if(1&e&&(tt(0,"p",18),ut(1),et()),2&e){const t=Ct();lt(),Ze(t.studentSubsetDefinition)}}function bIt(e,i){1&e&&we(0,"mat-spinner",19)}function wIt(e,i){if(1&e&&(tt(0,"p",23),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.definitionVsMembersValidationResult)}}function _It(e,i){if(1&e&&(tt(0,"p",23),ut(1),et()),2&e){const t=Ct(2);lt(),Ze(t.keyConceptValidationResult)}}function TIt(e,i){if(1&e&&(tt(0,"div",20)(1,"h3",21),ut(2,"Validation Results"),et(),Gt(3,wIt,2,1,"p",22)(4,_It,2,1,"p",22),tt(5,"p",23),ut(6),et(),tt(7,"p",23),ut(8),et()()),2&e){const t=Ct();lt(3),yt("ngIf",t.selectedAssignment.referenceDefinition),lt(),yt("ngIf",t.selectedAssignment.referenceDefinition),lt(2),Ze(t.membersNotInRefrenceListResult),lt(2),Ze(t.refrenceListVsStudentListResult)}}function CIt(e,i){1&e&&(tt(0,"th",33),ut(1,"ID"),et())}function SIt(e,i){if(1&e&&(tt(0,"td",34),ut(1),et()),2&e){const t=i.$implicit;lt(),Ze(t.referencedComponentId)}}function EIt(e,i){1&e&&(tt(0,"th",33),ut(1,"Name"),et())}function AIt(e,i){if(1&e&&(tt(0,"td",34),ut(1),et()),2&e){const t=i.$implicit;lt(),Ze(t.name)}}function DIt(e,i){1&e&&(tt(0,"th",33),ut(1,"Result"),et())}function MIt(e,i){1&e&&(tt(0,"span"),ut(1,"OK"),et())}function IIt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).$implicit;lt(),Ye(" ",t.customMessage.note," ")}}function RIt(e,i){1&e&&(tt(0,"span"),ut(1," Error "),et())}function kIt(e,i){if(1&e&&(tt(0,"span"),Gt(1,MIt,2,0,"span",16)(2,IIt,2,1,"span",16)(3,RIt,2,0,"span",16),et()),2&e){const t=Ct().$implicit;lt(),yt("ngIf",null==t||null==t.inReferenceList?null:t.inReferenceList.value),lt(),yt("ngIf",!(null!=t&&null!=t.inReferenceList&&t.inReferenceList.value)&&(null==t||null==t.customMessage?null:t.customMessage.value)),lt(),yt("ngIf",!(null!=t&&null!=t.inReferenceList&&t.inReferenceList.value||null!=t&&null!=t.customMessage&&t.customMessage.value))}}function PIt(e,i){if(1&e&&(tt(0,"td",34),Gt(1,kIt,4,3,"span",16),et()),2&e){const t=Ct(2);lt(),yt("ngIf",t.membersValidationResult)}}function FIt(e,i){1&e&&we(0,"tr",35)}function OIt(e,i){if(1&e&&we(0,"tr",36),2&e){const t=i.$implicit,n=Ct(2);yt("ngClass",vc(1,xIt,!(null!=t.inReferenceList&&t.inReferenceList.value)&&n.membersValidationResult))}}function LIt(e,i){if(1&e&&(tt(0,"div",24)(1,"table",25),Wi(2,26),Gt(3,CIt,2,0,"th",27)(4,SIt,2,1,"td",28),Xi(),Wi(5,29),Gt(6,EIt,2,0,"th",27)(7,AIt,2,1,"td",28),Xi(),Wi(8,30),Gt(9,DIt,2,0,"th",27)(10,PIt,2,1,"td",28),Xi(),Gt(11,FIt,1,0,"tr",31)(12,OIt,1,3,"tr",32),et()()),2&e){const t=Ct();lt(),yt("dataSource",t.studentSubsetMembersDataSource),lt(10),yt("matHeaderRowDef",t.studentSubsetMembersDisplayedColumns),lt(),yt("matRowDefColumns",t.studentSubsetMembersDisplayedColumns)}}function NIt(e,i){if(1&e){const t=ve();tt(0,"button",40),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setAssignment(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function BIt(e,i){if(1&e&&(tt(0,"div")(1,"h3"),ut(2,"Assignment"),et(),tt(3,"button",37),ut(4),et(),tt(5,"mat-menu",38,2),Gt(7,NIt,2,1,"button",39),et()()),2&e){const t=qi(6),n=Ct();lt(3),yt("matMenuTriggerFor",t),lt(),Ye("Selected assignment: ",null==n.selectedAssignment?null:n.selectedAssignment.name,""),lt(3),yt("ngForOf",n.assignments)}}function VIt(e,i){if(1&e&&(tt(0,"h3"),ut(1),et()),2&e){const t=Ct();lt(),Ye(" Assignment: ",null==t.selectedAssignment?null:t.selectedAssignment.name," ")}}function UIt(e,i){1&e&&(tt(0,"ol")(1,"li"),ut(2,"1- Upload definition file"),et(),tt(3,"li"),ut(4,"2- Upload members file"),et(),tt(5,"li"),ut(6,"3- Click validate"),et()())}function zIt(e,i){1&e&&(tt(0,"ol")(1,"li"),ut(2,"1- Upload members file"),et(),tt(3,"li"),ut(4,"2- Click validate"),et()())}function GIt(e,i){if(1&e){const t=ve();tt(0,"div")(1,"div")(2,"h3"),ut(3,"Reference Data"),et(),tt(4,"mat-form-field",41)(5,"mat-label"),ut(6,"Textarea"),et(),tt(7,"textarea",42),wa("ngModelChange",function(r){Ut(t);const s=Ct();return Na(s.assignmentsString,r)||(s.assignmentsString=r),zt(r)}),et()(),tt(8,"button",11),Vt("click",function(){return Ut(t),zt(Ct().updateAssignments())}),ut(9,"Update Assignments"),et()()()}if(2&e){const t=Ct();lt(7),ba("ngModel",t.assignmentsString)}}let HIt=(()=>{class e{constructor(t,n,r,s){this.http=t,this.terminologyService=n,this._snackBar=r,this.activatedRoute=s,this.studentSubsetMembersDisplayedColumns=["referencedComponentId","name","result"],this.studentSubsetMembersDataSource=new em,this.studentSubsetmembers=[],this.studentSubsetDefinition="",this.keyConceptValidationResult="",this.definitionVsMembersValidationResult="",this.membersNotInRefrenceListResult="",this.membersValidationResult=!1,this.refrenceListVsStudentListResult="",this.embeddedMode=!1,this.loading=!1,this.ok="\u2705",this.error="\u{1f7e5}",this.assignments=[{name:"Assignment X",referenceData:[{referencedComponentId:"403197009",name:"Sun-induced wrinkles"},{referencedComponentId:"279002006",name:"Lichenification of skin"},{referencedComponentId:"274672009",name:"Changes in skin texture"},{referencedComponentId:"271767006",name:"Peeling of skin"},{referencedComponentId:"271761007",name:"Scaly skin"},{referencedComponentId:"247434009",name:"Wrinkled skin"}],referenceDefinition:"< 185823004 |Finding of skin texture (finding)|",keyConceptsInECL:[{code:"185823004",display:"Finding of skin texture (finding)"}],customMessages:[{conceptId:"85345005",note:"wrong hierarchy",principle:"wrong hierarchy"},{conceptId:"403197009",note:"wrong hierarchy",principle:"wrong hierarchy"}]}],this.assignmentsString=JSON.stringify(this.assignments),this.selectedAssignment=this.assignments[0],this.referenceDataDisplayedColumns=["referencedComponentId","name"],this.referenceDataDataSource=new em(this.selectedAssignment.referenceData)}ngOnInit(){var t=this;return de(function*(){const n=yield Ca(t.http.get("assets/definitions/assignments.json"));t.assignments=n,t.assignmentsString=JSON.stringify(t.assignments),t.setAssignment(t.assignments[0]),t.activatedRoute.queryParams.subscribe(r=>{r.assignment&&t.setAssignment(t.assignments.find(s=>s.name===r.assignment)),t.embeddedMode="true"===r.embedded})})()}setAssignment(t){t&&(this.selectedAssignment=t,this.referenceDataDataSource=new em(this.selectedAssignment.referenceData))}checkStudentECLvsStudentList(){var t=this;return de(function*(){if(!t.studentSubsetDefinition){let r=yield t.terminologyService.expandValueSet(t.studentSubsetDefinition,"").toPromise(),o=0;t.studentSubsetmembers.forEach(l=>{r.expansion.contains.find(C=>C.code===l.referencedComponentId)?l.inStudentECL={value:!0,message:""}:(l.inStudentECL={value:!1,message:""},o++)})}return 0})()}checkStudentECLvsKeyConcept(){if(this.studentSubsetDefinition){console.log("Student ECL not defined");let t=this.studentSubsetDefinition,r=!0;return this.selectedAssignment.keyConceptsInECL.forEach(s=>{t.includes(s.code)||(r=!1)}),r}return!0}checkStudentListVsReferenceList(){let n=this.selectedAssignment.referenceData;this.studentSubsetmembers.forEach(s=>{s.inReferenceList=n.find(l=>l.referencedComponentId===s.referencedComponentId)?{value:!0,message:""}:{value:!1,message:""}})}checkReferenceListVsStudentList(){let t=this.studentSubsetmembers,r=0;return this.selectedAssignment.referenceData.forEach(s=>{t.find(l=>l.referencedComponentId===s.referencedComponentId)?s.inStudentList={value:!0,message:""}:(s.inStudentList={value:!1,message:""},r++)}),r}checkStudentListVsCustomMessages(){let n=this.selectedAssignment.customMessages;this.studentSubsetmembers.forEach(r=>{const s=n.find(o=>o.conceptId===r.referencedComponentId);r.customMessage=s?{value:!0,principle:s.principle,note:s.note}:{value:!1,principle:"",note:""}})}updateAssignments(){this.assignments=JSON.parse(this.assignmentsString),this.setAssignment(this.assignments[0])}validateAssignment(){var t=this;return de(function*(){t.loading=!0,t.keyConceptValidationResult="",t.definitionVsMembersValidationResult="",t.membersValidationResult=!1,t.loading=!0,t.studentSubsetDefinition&&(t.definitionVsMembersValidationResult=(yield t.checkStudentECLvsStudentList())>0?t.error+" The uploaded definition and members files are not in alignment":t.ok+" The uploaded definition and members files are in alignment",t.keyConceptValidationResult=t.checkStudentECLvsKeyConcept()?t.ok+" The definition of your subset includes the key subhierarchy":t.error+" The definition of your subset does not include the key subhierarchy"),t.checkStudentListVsReferenceList();let n=t.studentSubsetmembers.filter(s=>!s.inReferenceList.value).length;t.membersNotInRefrenceListResult=n>0?t.error+" There are "+n+" members in your subset that are not recommended to be included":t.ok+" All members match the recommended list of concepts for the subset",t.checkStudentListVsCustomMessages();let r=t.checkReferenceListVsStudentList();t.refrenceListVsStudentListResult=r>0?t.error+" "+r+" "+(r>1?"concepts are":"concept is")+" missing in the uploaded member list that would be recommended to be included in this subset":t.ok+" All recommended concepts are included in this subset",t.loading=!1,t.membersValidationResult=!0})()}onSubsetmembersFileSelected(t){this.studentSubsetmembers=[],this.studentSubsetMembersDataSource=new em,this.studentSubsetMembersDataSource.sort=this.sort,this.loading=!0;const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const l=r.result.split("\n"),w=l[0].split("\t");if(w.length<2)throw new Error("Invalid file format");const C=w.indexOf("referencedComponentId"),M=w.indexOf("name");if(C<0||M<0)throw new Error("Invalid file format");const P=[];for(let O=1;OO.name.localeCompare(L.name)),this.studentSubsetmembers=P,this.studentSubsetMembersDataSource.data=P,this.loading=!1}catch(o){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+o.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=s=>{this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+s,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(n)}else this.loading=!1}onDefinitionFileSelected(t){this.studentSubsetDefinition="",this.loading=!0;const n=t.target.files?.[0];if(n){const r=new FileReader;r.onload=s=>{try{const w=r.result.replace(/\r/g,"").split("\n"),C=w[0].split("\t");if(C.length<2)throw new Error("Invalid file format");const M=C.indexOf("referencedComponentId"),P=C.indexOf("definition");if(M<0||P<0)throw new Error("Invalid file format");this.studentSubsetDefinition=w[1].split("\t")[P],this.loading=!1}catch(o){this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+o.message,panelClass:["red-snackbar"]}),this.loading=!1}},r.onerror=s=>{this._snackBar.openFromComponent(Ar,{duration:5e3,data:"Error reading file: "+s,panelClass:["red-snackbar"]}),this.loading=!1},r.readAsText(n)}else this.loading=!1}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd),mt(ca),mt(Sh),mt(Tc))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-subset-validator"]],viewQuery:function(n,r){if(1&n&&Mi(Lh,5),2&n){let s;Be(s=Ve())&&(r.sort=s.first)}},decls:31,vars:12,consts:[["fileInput",""],["fileInputDefinition",""],["demosMenu","matMenu"],[1,"layout-container"],[1,"left-column"],[1,"upload-controls"],[1,"mb-4"],["class","terminal-style",4,"ngIf"],["type","file",2,"display","none",3,"change"],[1,"buttons-panel"],["mat-flat-button","","color","primary",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click"],["class","spinner","diameter","30",4,"ngIf"],["class","blue-rounded-div",4,"ngIf"],["class","table-container",4,"ngIf"],[1,"right-column"],[4,"ngIf"],[1,"instructions"],[1,"terminal-style"],["diameter","30",1,"spinner"],[1,"blue-rounded-div"],[1,"text-white","mb-1"],["class","validation-result",4,"ngIf"],[1,"validation-result"],[1,"table-container"],["mat-table","",3,"dataSource"],["matColumnDef","referencedComponentId"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","name"],["matColumnDef","result"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"ngClass",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row","",3,"ngClass"],["mat-flat-button","","color","accent",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],["appearance","fill"],["matInput","",3,"ngModelChange","ngModel"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3"),ut(4,"Subset Members Validator"),et(),tt(5,"p",6),ut(6),et(),Gt(7,yIt,2,1,"p",7),tt(8,"input",8,0),Vt("change",function(l){return Ut(s),zt(r.onSubsetmembersFileSelected(l))}),et(),tt(10,"input",8,1),Vt("change",function(l){return Ut(s),zt(r.onDefinitionFileSelected(l))}),et(),tt(12,"div",9)(13,"button",10),Vt("click",function(){return Ut(s),zt(qi(11).click())}),ut(14," Upload Definition File "),et(),tt(15,"button",11),Vt("click",function(){return Ut(s),zt(qi(9).click())}),ut(16,"Upload Members File"),et(),tt(17,"button",10),Vt("click",function(){return Ut(s),zt(r.validateAssignment())}),ut(18,"Validate"),et(),Gt(19,bIt,1,0,"mat-spinner",12),et(),Gt(20,TIt,9,4,"div",13),et(),Gt(21,LIt,13,3,"div",14),et(),tt(22,"div",15),Gt(23,BIt,8,3,"div",16)(24,VIt,2,1,"h3",16),tt(25,"h3"),ut(26,"Instructions"),et(),tt(27,"div",17),Gt(28,UIt,7,0,"ol",16)(29,zIt,5,0,"ol",16),et(),Gt(30,GIt,10,1,"div",16),et()()}2&n&&(lt(6),Ye("Validating against ",r.terminologyService.getFhirUrlParam(),""),lt(),yt("ngIf",r.studentSubsetDefinition),lt(6),yt("disabled",!r.selectedAssignment.referenceDefinition),lt(4),yt("disabled",!r.studentSubsetMembersDataSource.data.length),lt(2),yt("ngIf",r.loading),lt(),yt("ngIf",!r.loading&&r.membersNotInRefrenceListResult),lt(),yt("ngIf",!r.loading&&r.studentSubsetMembersDataSource.data.length),lt(2),yt("ngIf",!r.embeddedMode),lt(),yt("ngIf",r.embeddedMode),lt(4),yt("ngIf",r.selectedAssignment.referenceDefinition),lt(),yt("ngIf",!r.selectedAssignment.referenceDefinition),lt(),yt("ngIf",!r.embeddedMode))},dependencies:[bc,gs,Ms,Sa,bl,Gl,cu,Xl,wl,Eh,Fh,Hl,No,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,Wl],styles:["[_nghost-%COMP%]{display:block;height:calc(100% - 65px)}.layout-container[_ngcontent-%COMP%]{display:flex;height:100%}.left-column[_ngcontent-%COMP%]{flex:0 0 68%;display:flex;flex-direction:column;height:100%}.right-column[_ngcontent-%COMP%]{flex:0 0 28%}.buttons-panel[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem;margin-top:2rem}.upload-controls[_ngcontent-%COMP%], .table-container[_ngcontent-%COMP%]{width:100%;margin-bottom:20px}.table-container[_ngcontent-%COMP%]{overflow-y:auto}.upload-controls[_ngcontent-%COMP%]{margin-left:20px}table[_ngcontent-%COMP%]{width:100%}.validation-result[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.blue-rounded-div[_ngcontent-%COMP%]{border-radius:10px;background-color:#4d7fb4;padding:.5rem 3rem 1rem;width:80%;color:#f5f5f5;margin-top:20px}.terminal-style[_ngcontent-%COMP%]{font-family:monospace;font-size:.9rem;background-color:#000;color:#fff;padding:10px;border-radius:10px;margin-top:20px;width:80%}h4[_ngcontent-%COMP%]{margin-top:10px}.instructions[_ngcontent-%COMP%]{margin-top:20px;margin-bottom:20px;font-weight:lighter;font-size:larger}h3[_ngcontent-%COMP%]{margin-top:10px}.bg-pink[_ngcontent-%COMP%]{background-color:pink}tr.mat-mdc-row[_ngcontent-%COMP%]:hover{background-color:#aba9a9!important}"]})}return e})();const oj=function(e){const i=[];let t=0;for(let n=0;n>6|192,i[t++]=63&r|128):55296==(64512&r)&&n+1>18|240,i[t++]=r>>12&63|128,i[t++]=r>>6&63|128,i[t++]=63&r|128):(i[t++]=r>>12|224,i[t++]=r>>6&63|128,i[t++]=63&r|128)}return i},lj={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,i){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=i?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let r=0;r>6,L=63&C;w||(L=64,o||(O=64)),n.push(t[s>>2],t[(3&s)<<4|l>>4],t[O],t[L])}return n.join("")},encodeString(e,i){return this.HAS_NATIVE_SUPPORT&&!i?btoa(e):this.encodeByteArray(oj(e),i)},decodeString(e,i){return this.HAS_NATIVE_SUPPORT&&!i?atob(e):function(e){const i=[];let t=0,n=0;for(;t191&&r<224){const s=e[t++];i[n++]=String.fromCharCode((31&r)<<6|63&s)}else if(r>239&&r<365){const w=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536;i[n++]=String.fromCharCode(55296+(w>>10)),i[n++]=String.fromCharCode(56320+(1023&w))}else{const s=e[t++],o=e[t++];i[n++]=String.fromCharCode((15&r)<<12|(63&s)<<6|63&o)}}return i.join("")}(this.decodeStringToByteArray(e,i))},decodeStringToByteArray(e,i){this.init_();const t=i?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let r=0;r>4),64!==C&&(n.push(l<<4&240|C>>2),64!==P&&n.push(C<<6&192|P))}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class $It extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const tS=function(e){return function(e){const i=oj(e);return lj.encodeByteArray(i,!0)}(e).replace(/\./g,"")},eS=()=>{try{return function ZIt(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if(typeof process>"u"||typeof process.env>"u")return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const i=e&&function(e){try{return lj.decodeString(e,!0)}catch(i){console.error("base64Decode failed: ",i)}return null}(e[1]);return i&&JSON.parse(i)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},dj=()=>{var e;return null===(e=eS())||void 0===e?void 0:e.config};class uj{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((i,t)=>{this.resolve=i,this.reject=t})}wrapCallback(i){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof i&&(this.promise.catch(()=>{}),1===i.length?i(t):i(t,n))}}}class fv extends Error{constructor(i,t,n){super(t),this.code=i,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,fv.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,mj.prototype.create)}}class mj{constructor(i,t,n){this.service=i,this.serviceName=t,this.errors=n}create(i,...t){const n=t[0]||{},r=`${this.service}/${i}`,s=this.errors[i],o=s?function lRt(e,i){return e.replace(cRt,(t,n)=>{const r=i[n];return null!=r?String(r):`<${n}?>`})}(s,n):"Error";return new fv(r,`${this.serviceName}: ${o} (${r}).`,n)}}const cRt=/\{\$([^}]+)}/g;function $y(e,i){if(e===i)return!0;const t=Object.keys(e),n=Object.keys(i);for(const r of t){if(!n.includes(r))return!1;const s=e[r],o=i[r];if(gj(s)&&gj(o)){if(!$y(s,o))return!1}else if(s!==o)return!1}for(const r of n)if(!t.includes(r))return!1;return!0}function gj(e){return null!==e&&"object"==typeof e}function Ec(e){return e&&e._delegate?e._delegate:e}class Qy{constructor(i,t,n){this.name=i,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(i){return this.instantiationMode=i,this}setMultipleInstances(i){return this.multipleInstances=i,this}setServiceProps(i){return this.serviceProps=i,this}setInstanceCreatedCallback(i){return this.onInstanceCreated=i,this}}const cm="[DEFAULT]";class vRt{constructor(i,t){this.name=i,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(i){const t=this.normalizeInstanceIdentifier(i);if(!this.instancesDeferred.has(t)){const n=new uj;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(i){var t;const n=this.normalizeInstanceIdentifier(i?.identifier),r=null!==(t=i?.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(s){if(r)return null;throw s}}getComponent(){return this.component}setComponent(i){if(i.name!==this.name)throw Error(`Mismatching Component ${i.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=i,this.shouldAutoInitialize()){if(function yRt(e){return"EAGER"===e.instantiationMode}(i))try{this.getOrInitializeService({instanceIdentifier:cm})}catch{}for(const[t,n]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(t);try{const s=this.getOrInitializeService({instanceIdentifier:r});n.resolve(s)}catch{}}}}clearInstance(i=cm){this.instancesDeferred.delete(i),this.instancesOptions.delete(i),this.instances.delete(i)}delete(){var i=this;return de(function*(){const t=Array.from(i.instances.values());yield Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])})()}isComponentSet(){return null!=this.component}isInitialized(i=cm){return this.instances.has(i)}getOptions(i=cm){return this.instancesOptions.get(i)||{}}initialize(i={}){const{options:t={}}=i,n=this.normalizeInstanceIdentifier(i.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[s,o]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(s)&&o.resolve(r);return r}onInit(i,t){var n;const r=this.normalizeInstanceIdentifier(t),s=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;s.add(i),this.onInitCallbacks.set(r,s);const o=this.instances.get(r);return o&&i(o,r),()=>{s.delete(i)}}invokeOnInitCallbacks(i,t){const n=this.onInitCallbacks.get(t);if(n)for(const r of n)try{r(i,t)}catch{}}getOrInitializeService({instanceIdentifier:i,options:t={}}){let n=this.instances.get(i);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:(e=i,e===cm?void 0:e),options:t}),this.instances.set(i,n),this.instancesOptions.set(i,t),this.invokeOnInitCallbacks(n,i),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,i,n)}catch{}var e;return n||null}normalizeInstanceIdentifier(i=cm){return this.component?this.component.multipleInstances?i:cm:i}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class bRt{constructor(i){this.name=i,this.providers=new Map}addComponent(i){const t=this.getProvider(i.name);if(t.isComponentSet())throw new Error(`Component ${i.name} has already been registered with ${this.name}`);t.setComponent(i)}addOrOverwriteComponent(i){this.getProvider(i.name).isComponentSet()&&this.providers.delete(i.name),this.addComponent(i)}getProvider(i){if(this.providers.has(i))return this.providers.get(i);const t=new vRt(i,this);return this.providers.set(i,t),t}getProviders(){return Array.from(this.providers.values())}}const pP=[];var jn=function(e){return e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT",e}(jn||{});const vj={debug:jn.DEBUG,verbose:jn.VERBOSE,info:jn.INFO,warn:jn.WARN,error:jn.ERROR,silent:jn.SILENT},wRt=jn.INFO,_Rt={[jn.DEBUG]:"log",[jn.VERBOSE]:"log",[jn.INFO]:"info",[jn.WARN]:"warn",[jn.ERROR]:"error"},TRt=(e,i,...t)=>{if(ii.some(t=>e instanceof t);let yj,bj;const wj=new WeakMap,gP=new WeakMap,_j=new WeakMap,vP=new WeakMap,xP=new WeakMap;let yP={get(e,i,t){if(e instanceof IDBTransaction){if("done"===i)return gP.get(e);if("objectStoreNames"===i)return e.objectStoreNames||_j.get(e);if("store"===i)return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Vh(e[i])},set:(e,i,t)=>(e[i]=t,!0),has:(e,i)=>e instanceof IDBTransaction&&("done"===i||"store"===i)||i in e};function RRt(e){return"function"==typeof e?function IRt(e){return e!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function ERt(){return bj||(bj=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(e)?function(...i){return e.apply(bP(this),i),Vh(wj.get(this))}:function(...i){return Vh(e.apply(bP(this),i))}:function(i,...t){const n=e.call(bP(this),i,...t);return _j.set(n,i.sort?i.sort():[i]),Vh(n)}}(e):(e instanceof IDBTransaction&&function DRt(e){if(gP.has(e))return;const i=new Promise((t,n)=>{const r=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),r()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)});gP.set(e,i)}(e),CRt(e,function SRt(){return yj||(yj=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(e,yP):e)}function Vh(e){if(e instanceof IDBRequest)return function ARt(e){const i=new Promise((t,n)=>{const r=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t(Vh(e.result)),r()},o=()=>{n(e.error),r()};e.addEventListener("success",s),e.addEventListener("error",o)});return i.then(t=>{t instanceof IDBCursor&&wj.set(t,e)}).catch(()=>{}),xP.set(i,e),i}(e);if(vP.has(e))return vP.get(e);const i=RRt(e);return i!==e&&(vP.set(e,i),xP.set(i,e)),i}const bP=e=>xP.get(e),PRt=["get","getKey","getAll","getAllKeys","count"],FRt=["put","add","delete","clear"],wP=new Map;function Tj(e,i){if(!(e instanceof IDBDatabase)||i in e||"string"!=typeof i)return;if(wP.get(i))return wP.get(i);const t=i.replace(/FromIndex$/,""),n=i!==t,r=FRt.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!r&&!PRt.includes(t))return;const s=function(){var o=de(function*(l,...w){const C=this.transaction(l,r?"readwrite":"readonly");let M=C.store;return n&&(M=M.index(w.shift())),(yield Promise.all([M[t](...w),r&&C.done]))[0]});return function(w){return o.apply(this,arguments)}}();return wP.set(i,s),s}!function MRt(e){yP=e(yP)}(e=>({...e,get:(i,t,n)=>Tj(i,t)||e.get(i,t,n),has:(i,t)=>!!Tj(i,t)||e.has(i,t)}));class ORt{constructor(i){this.container=i}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(function LRt(e){const i=e.getComponent();return"VERSION"===i?.type}(t)){const n=t.getImmediate();return`${n.library}/${n.version}`}return null}).filter(t=>t).join(" ")}}const nS="@firebase/app",dm=new xj("@firebase/app"),rS="[DEFAULT]",ckt={[nS]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","@firebase/vertexai-preview":"fire-vertex","fire-js":"fire-js",firebase:"fire-js-all"},um=new Map,Ky=new Map,Zy=new Map;function Cj(e,i){try{e.container.addComponent(i)}catch(t){dm.debug(`Component ${i.name} failed to register with FirebaseApp ${e.name}`,t)}}function sS(e){const i=e.name;if(Zy.has(i))return dm.debug(`There were multiple attempts to register component ${i}.`),!1;Zy.set(i,e);for(const t of um.values())Cj(t,e);for(const t of Ky.values())Cj(t,e);return!0}const Yl=new mj("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."});class Ej{constructor(i,t,n){this._isDeleted=!1,this._options=Object.assign({},i),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new Qy("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(i){this.checkDestroyed(),this._automaticDataCollectionEnabled=i}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(i){this._isDeleted=i}checkDestroyed(){if(this.isDeleted)throw Yl.create("app-deleted",{appName:this._name})}}function Aj(e,i={}){let t=e;"object"!=typeof i&&(i={name:i});const n=Object.assign({name:rS,automaticDataCollectionEnabled:!1},i),r=n.name;if("string"!=typeof r||!r)throw Yl.create("bad-app-name",{appName:String(r)});if(t||(t=dj()),!t)throw Yl.create("no-options");const s=um.get(r);if(s){if($y(t,s.options)&&$y(n,s.config))return s;throw Yl.create("duplicate-app",{appName:r})}const o=new bRt(r);for(const w of Zy.values())o.addComponent(w);const l=new Ej(t,n,o);return um.set(r,l),l}function hm(e,i,t){var n;let r=null!==(n=ckt[e])&&void 0!==n?n:e;t&&(r+=`-${t}`);const s=r.match(/\s|\//),o=i.match(/\s|\//);if(s||o){const l=[`Unable to register library "${r}" with version "${i}":`];return s&&l.push(`library name "${r}" contains illegal characters (whitespace or "/")`),s&&o&&l.push("and"),o&&l.push(`version name "${i}" contains illegal characters (whitespace or "/")`),void dm.warn(l.join(" "))}sS(new Qy(`${r}-version`,()=>({library:r,version:i}),"VERSION"))}const gkt="firebase-heartbeat-database",vkt=1,Jy="firebase-heartbeat-store";let CP=null;function Dj(){return CP||(CP=function kRt(e,i,{blocked:t,upgrade:n,blocking:r,terminated:s}={}){const o=indexedDB.open(e,i),l=Vh(o);return n&&o.addEventListener("upgradeneeded",w=>{n(Vh(o.result),w.oldVersion,w.newVersion,Vh(o.transaction),w)}),t&&o.addEventListener("blocked",w=>t(w.oldVersion,w.newVersion,w)),l.then(w=>{s&&w.addEventListener("close",()=>s()),r&&w.addEventListener("versionchange",C=>r(C.oldVersion,C.newVersion,C))}).catch(()=>{}),l}(gkt,vkt,{upgrade:(e,i)=>{if(0===i)try{e.createObjectStore(Jy)}catch(t){console.warn(t)}}}).catch(e=>{throw Yl.create("idb-open",{originalErrorMessage:e.message})})),CP}function SP(){return(SP=de(function*(e){try{const t=(yield Dj()).transaction(Jy),n=yield t.objectStore(Jy).get(Ij(e));return yield t.done,n}catch(i){if(i instanceof fv)dm.warn(i.message);else{const t=Yl.create("idb-get",{originalErrorMessage:i?.message});dm.warn(t.message)}}})).apply(this,arguments)}function Mj(e,i){return EP.apply(this,arguments)}function EP(){return(EP=de(function*(e,i){try{const n=(yield Dj()).transaction(Jy,"readwrite");yield n.objectStore(Jy).put(i,Ij(e)),yield n.done}catch(t){if(t instanceof fv)dm.warn(t.message);else{const n=Yl.create("idb-set",{originalErrorMessage:t?.message});dm.warn(n.message)}}})).apply(this,arguments)}function Ij(e){return`${e.name}!${e.options.appId}`}class wkt{constructor(i){this.container=i,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new Tkt(t),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}triggerHeartbeat(){var i=this;return de(function*(){var t,n;const s=i.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),o=Rj();if((null!=(null===(t=i._heartbeatsCache)||void 0===t?void 0:t.heartbeats)||(i._heartbeatsCache=yield i._heartbeatsCachePromise,null!=(null===(n=i._heartbeatsCache)||void 0===n?void 0:n.heartbeats)))&&i._heartbeatsCache.lastSentHeartbeatDate!==o&&!i._heartbeatsCache.heartbeats.some(l=>l.date===o))return i._heartbeatsCache.heartbeats.push({date:o,agent:s}),i._heartbeatsCache.heartbeats=i._heartbeatsCache.heartbeats.filter(l=>{const w=new Date(l.date).valueOf();return Date.now()-w<=2592e6}),i._storage.overwrite(i._heartbeatsCache)})()}getHeartbeatsHeader(){var i=this;return de(function*(){var t;if(null===i._heartbeatsCache&&(yield i._heartbeatsCachePromise),null==(null===(t=i._heartbeatsCache)||void 0===t?void 0:t.heartbeats)||0===i._heartbeatsCache.heartbeats.length)return"";const n=Rj(),{heartbeatsToSend:r,unsentEntries:s}=function _kt(e,i=1024){const t=[];let n=e.slice();for(const r of e){const s=t.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),kj(t)>i){s.dates.pop();break}}else if(t.push({agent:r.agent,dates:[r.date]}),kj(t)>i){t.pop();break}n=n.slice(1)}return{heartbeatsToSend:t,unsentEntries:n}}(i._heartbeatsCache.heartbeats),o=tS(JSON.stringify({version:2,heartbeats:r}));return i._heartbeatsCache.lastSentHeartbeatDate=n,s.length>0?(i._heartbeatsCache.heartbeats=s,yield i._storage.overwrite(i._heartbeatsCache)):(i._heartbeatsCache.heartbeats=[],i._storage.overwrite(i._heartbeatsCache)),o})()}}function Rj(){return(new Date).toISOString().substring(0,10)}class Tkt{constructor(i){this.app=i,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return de(function*(){return!!function fj(){try{return"object"==typeof indexedDB}catch{return!1}}()&&function aRt(){return new Promise((e,i)=>{try{let t=!0;const n="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(n);r.onsuccess=()=>{r.result.close(),t||self.indexedDB.deleteDatabase(n),e(!0)},r.onupgradeneeded=()=>{t=!1},r.onerror=()=>{var s;i((null===(s=r.error)||void 0===s?void 0:s.message)||"")}}catch(t){i(t)}})}().then(()=>!0).catch(()=>!1)})()}read(){var i=this;return de(function*(){if(yield i._canUseIndexedDBPromise){const n=yield function xkt(e){return SP.apply(this,arguments)}(i.app);return n?.heartbeats?n:{heartbeats:[]}}return{heartbeats:[]}})()}overwrite(i){var t=this;return de(function*(){var n;if(yield t._canUseIndexedDBPromise){const s=yield t.read();return Mj(t.app,{lastSentHeartbeatDate:null!==(n=i.lastSentHeartbeatDate)&&void 0!==n?n:s.lastSentHeartbeatDate,heartbeats:i.heartbeats})}})()}add(i){var t=this;return de(function*(){var n;if(yield t._canUseIndexedDBPromise){const s=yield t.read();return Mj(t.app,{lastSentHeartbeatDate:null!==(n=i.lastSentHeartbeatDate)&&void 0!==n?n:s.lastSentHeartbeatDate,heartbeats:[...s.heartbeats,...i.heartbeats]})}})()}}function kj(e){return tS(JSON.stringify({version:2,heartbeats:e})).length}!function Ckt(e){sS(new Qy("platform-logger",i=>new ORt(i),"PRIVATE")),sS(new Qy("heartbeat",i=>new wkt(i),"PRIVATE")),hm(nS,"0.10.6",e),hm(nS,"0.10.6","esm2017"),hm("fire-js","")}("");var fm,Oj,Pj=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fj={};(function(){var e;function n(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}function r(ft,dt,pt){pt||(pt=0);var bt=Array(16);if("string"==typeof dt)for(var Tt=0;16>Tt;++Tt)bt[Tt]=dt.charCodeAt(pt++)|dt.charCodeAt(pt++)<<8|dt.charCodeAt(pt++)<<16|dt.charCodeAt(pt++)<<24;else for(Tt=0;16>Tt;++Tt)bt[Tt]=dt[pt++]|dt[pt++]<<8|dt[pt++]<<16|dt[pt++]<<24;var Et=ft.g[3],Dt=(dt=ft.g[0])+(Et^(pt=ft.g[1])&((Tt=ft.g[2])^Et))+bt[0]+3614090360&4294967295;Dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=(pt=(Tt=(Et=(dt=pt+(Dt<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[1]+3905402710&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[2]+606105819&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[3]+3250441966&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Et^pt&(Tt^Et))+bt[4]+4118548399&4294967295)<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[5]+1200080426&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[6]+2821735955&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[7]+4249261313&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Et^pt&(Tt^Et))+bt[8]+1770035416&4294967295)<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[9]+2336552879&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[10]+4294925233&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[11]+2304563134&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Et^pt&(Tt^Et))+bt[12]+1804603682&4294967295)<<7&4294967295|Dt>>>25))+((Dt=Et+(Tt^dt&(pt^Tt))+bt[13]+4254626195&4294967295)<<12&4294967295|Dt>>>20))+((Dt=Tt+(pt^Et&(dt^pt))+bt[14]+2792965006&4294967295)<<17&4294967295|Dt>>>15))+((Dt=pt+(dt^Tt&(Et^dt))+bt[15]+1236535329&4294967295)<<22&4294967295|Dt>>>10))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[1]+4129170786&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[6]+3225465664&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[11]+643717713&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[0]+3921069994&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[5]+3593408605&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[10]+38016083&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[15]+3634488961&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[4]+3889429448&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[9]+568446438&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[14]+3275163606&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[3]+4107603335&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[8]+1163531501&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(Tt^Et&(pt^Tt))+bt[13]+2850285829&4294967295)<<5&4294967295|Dt>>>27))+((Dt=Et+(pt^Tt&(dt^pt))+bt[2]+4243563512&4294967295)<<9&4294967295|Dt>>>23))+((Dt=Tt+(dt^pt&(Et^dt))+bt[7]+1735328473&4294967295)<<14&4294967295|Dt>>>18))+((Dt=pt+(Et^dt&(Tt^Et))+bt[12]+2368359562&4294967295)<<20&4294967295|Dt>>>12))+((Dt=dt+(pt^Tt^Et)+bt[5]+4294588738&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[8]+2272392833&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[11]+1839030562&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[14]+4259657740&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(pt^Tt^Et)+bt[1]+2763975236&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[4]+1272893353&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[7]+4139469664&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[10]+3200236656&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(pt^Tt^Et)+bt[13]+681279174&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[0]+3936430074&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[3]+3572445317&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[6]+76029189&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(pt^Tt^Et)+bt[9]+3654602809&4294967295)<<4&4294967295|Dt>>>28))+((Dt=Et+(dt^pt^Tt)+bt[12]+3873151461&4294967295)<<11&4294967295|Dt>>>21))+((Dt=Tt+(Et^dt^pt)+bt[15]+530742520&4294967295)<<16&4294967295|Dt>>>16))+((Dt=pt+(Tt^Et^dt)+bt[2]+3299628645&4294967295)<<23&4294967295|Dt>>>9))+((Dt=dt+(Tt^(pt|~Et))+bt[0]+4096336452&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[7]+1126891415&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Tt+(dt^(Et|~pt))+bt[14]+2878612391&4294967295)<<15&4294967295|Dt>>>17))+((Dt=pt+(Et^(Tt|~dt))+bt[5]+4237533241&4294967295)<<21&4294967295|Dt>>>11))+((Dt=dt+(Tt^(pt|~Et))+bt[12]+1700485571&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[3]+2399980690&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Tt+(dt^(Et|~pt))+bt[10]+4293915773&4294967295)<<15&4294967295|Dt>>>17))+((Dt=pt+(Et^(Tt|~dt))+bt[1]+2240044497&4294967295)<<21&4294967295|Dt>>>11))+((Dt=dt+(Tt^(pt|~Et))+bt[8]+1873313359&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[15]+4264355552&4294967295)<<10&4294967295|Dt>>>22))+((Dt=Tt+(dt^(Et|~pt))+bt[6]+2734768916&4294967295)<<15&4294967295|Dt>>>17))+((Dt=pt+(Et^(Tt|~dt))+bt[13]+1309151649&4294967295)<<21&4294967295|Dt>>>11))+((Et=(dt=pt+((Dt=dt+(Tt^(pt|~Et))+bt[4]+4149444226&4294967295)<<6&4294967295|Dt>>>26))+((Dt=Et+(pt^(dt|~Tt))+bt[11]+3174756917&4294967295)<<10&4294967295|Dt>>>22))^((Tt=Et+((Dt=Tt+(dt^(Et|~pt))+bt[2]+718787259&4294967295)<<15&4294967295|Dt>>>17))|~dt))+bt[9]+3951481745&4294967295,ft.g[0]=ft.g[0]+dt&4294967295,ft.g[1]=ft.g[1]+(Tt+(Dt<<21&4294967295|Dt>>>11))&4294967295,ft.g[2]=ft.g[2]+Tt&4294967295,ft.g[3]=ft.g[3]+Et&4294967295}function o(ft,dt){this.h=dt;for(var pt=[],bt=!0,Tt=ft.length-1;0<=Tt;Tt--){var Et=0|ft[Tt];bt&&Et==dt||(pt[Tt]=Et,bt=!1)}this.g=pt}(function i(ft,dt){function pt(){}pt.prototype=dt.prototype,ft.D=dt.prototype,ft.prototype=new pt,ft.prototype.constructor=ft,ft.C=function(bt,Tt,Et){for(var Dt=Array(arguments.length-2),Le=2;Lethis.h?this.blockSize:2*this.blockSize)-this.h);ft[0]=128;for(var dt=1;dtdt;++dt)for(var bt=0;32>bt;bt+=8)ft[pt++]=this.g[dt]>>>bt&255;return ft};var l={};function w(ft){return-128<=ft&&128>ft?function s(ft,dt){var pt=l;return Object.prototype.hasOwnProperty.call(pt,ft)?pt[ft]:pt[ft]=dt(ft)}(ft,function(dt){return new o([0|dt],0>dt?-1:0)}):new o([0|ft],0>ft?-1:0)}function C(ft){if(isNaN(ft)||!isFinite(ft))return P;if(0>ft)return W(C(-ft));for(var dt=[],pt=1,bt=0;ft>=pt;bt++)dt[bt]=ft/pt|0,pt*=4294967296;return new o(dt,0)}var P=w(0),O=w(1),L=w(16777216);function U(ft){if(0!=ft.h)return!1;for(var dt=0;dt>>16,ft[dt]&=65535,dt++}function st(ft,dt){this.g=ft,this.h=dt}function vt(ft,dt){if(U(dt))throw Error("division by zero");if(U(ft))return new st(P,P);if(X(ft))return dt=vt(W(ft),dt),new st(W(dt.g),W(dt.h));if(X(dt))return dt=vt(ft,W(dt)),new st(W(dt.g),dt.h);if(30=bt.l(ft);)pt=_t(pt),bt=_t(bt);var Tt=Mt(pt,1),Et=Mt(bt,1);for(bt=Mt(bt,2),pt=Mt(pt,2);!U(bt);){var Dt=Et.add(bt);0>=Dt.l(ft)&&(Tt=Tt.add(pt),Et=Dt),bt=Mt(bt,1),pt=Mt(pt,1)}return dt=Z(ft,Tt.j(dt)),new st(Tt,dt)}for(Tt=P;0<=ft.l(dt);){for(pt=Math.max(1,Math.floor(ft.m()/dt.m())),bt=48>=(bt=Math.ceil(Math.log(pt)/Math.LN2))?1:Math.pow(2,bt-48),Dt=(Et=C(pt)).j(dt);X(Dt)||0>>31;return new o(pt,ft.h)}function Mt(ft,dt){var pt=dt>>5;dt%=32;for(var bt=ft.g.length-pt,Tt=[],Et=0;Et>>dt|ft.i(Et+pt+1)<<32-dt:ft.i(Et+pt);return new o(Tt,ft.h)}(e=o.prototype).m=function(){if(X(this))return-W(this).m();for(var ft=0,dt=1,pt=0;pt(ft=ft||10)||36>>0).toString(ft);if(U(pt=Tt))return Et+bt;for(;6>Et.length;)Et="0"+Et;bt=Et+bt}},e.i=function(ft){return 0>ft?0:ft>>16)+(this.i(Tt)>>>16)+(ft.i(Tt)>>>16);bt=Dt>>>16,pt[Tt]=(Dt&=65535)<<16|(Et&=65535)}return new o(pt,-2147483648&pt[pt.length-1]?-1:0)},e.j=function(ft){if(U(this)||U(ft))return P;if(X(this))return X(ft)?W(this).j(W(ft)):W(W(this).j(ft));if(X(ft))return W(this.j(W(ft)));if(0>this.l(L)&&0>ft.l(L))return C(this.m()*ft.m());for(var dt=this.g.length+ft.g.length,pt=[],bt=0;bt<2*dt;bt++)pt[bt]=0;for(bt=0;bt>>16,Dt=65535&this.i(bt),Le=ft.i(Tt)>>>16,ge=65535&ft.i(Tt);pt[2*bt+2*Tt]+=Dt*ge,rt(pt,2*bt+2*Tt),pt[2*bt+2*Tt+1]+=Et*ge,rt(pt,2*bt+2*Tt+1),pt[2*bt+2*Tt+1]+=Dt*Le,rt(pt,2*bt+2*Tt+1),pt[2*bt+2*Tt+2]+=Et*Le,rt(pt,2*bt+2*Tt+2)}for(bt=0;bt(dt=dt||10)||36Et?(Et=C(Math.pow(dt,Et)),bt=bt.j(Et).add(C(Dt))):bt=(bt=bt.j(pt)).add(C(Dt))}return bt},fm=Fj.Integer=o}).apply(typeof Pj<"u"?Pj:typeof self<"u"?self:typeof window<"u"?window:{});var Lj,Nj,qy,Bj,oS,AP,Vj,Uj,zj,aS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},yu={};(function(){var e,i="function"==typeof Object.defineProperties?Object.defineProperty:function(z,ct,xt){return z==Array.prototype||z==Object.prototype||(z[ct]=xt.value),z},n=function t(z){z=["object"==typeof globalThis&&globalThis,z,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof aS&&aS];for(var ct=0;ct{throw z},0)}function Dt(){var z=Ne;let ct=null;return z.g&&(ct=z.g,z.g=z.g.next,z.g||(z.h=null),ct.next=null),ct}var ge=new class Z{constructor(ct,xt){this.i=ct,this.j=xt,this.h=0,this.g=null}get(){let ct;return 0new fe,z=>z.reset());class fe{constructor(){this.next=this.g=this.h=null}set(ct,xt){this.h=ct,this.g=xt,this.next=null}reset(){this.next=this.g=this.h=null}}let Qt,_e=!1,Ne=new class Le{constructor(){this.h=this.g=null}add(ct,xt){const It=ge.get();It.set(ct,xt),this.h?this.h.next=It:this.g=It,this.h=It}},Se=()=>{const z=l.Promise.resolve(void 0);Qt=()=>{z.then(Ei)}};var Ei=()=>{for(var z;z=Dt();){try{z.h.call(z.g)}catch(xt){Et(xt)}var ct=ge;ct.j(z),100>ct.h&&(ct.h++,z.next=ct.g,ct.g=z)}_e=!1};function Kt(){this.s=this.s,this.C=this.C}function ke(z,ct){this.type=z,this.g=this.target=ct,this.defaultPrevented=!1}Kt.prototype.s=!1,Kt.prototype.ma=function(){this.s||(this.s=!0,this.N())},Kt.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()},ke.prototype.h=function(){this.defaultPrevented=!0};var Ce=function(){if(!l.addEventListener||!Object.defineProperty)return!1;var z=!1,ct=Object.defineProperty({},"passive",{get:function(){z=!0}});try{const xt=()=>{};l.addEventListener("test",xt,ct),l.removeEventListener("test",xt,ct)}catch{}return z}();function oi(z,ct){if(ke.call(this,z?z.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,z){var xt=this.type=z.type,It=z.changedTouches&&z.changedTouches.length?z.changedTouches[0]:null;if(this.target=z.target||z.srcElement,this.g=ct,ct=z.relatedTarget){if(_t){t:{try{vt(ct.nodeName);var Zt=!0;break t}catch{}Zt=!1}Zt||(ct=null)}}else"mouseover"==xt?ct=z.fromElement:"mouseout"==xt&&(ct=z.toElement);this.relatedTarget=ct,It?(this.clientX=void 0!==It.clientX?It.clientX:It.pageX,this.clientY=void 0!==It.clientY?It.clientY:It.pageY,this.screenX=It.screenX||0,this.screenY=It.screenY||0):(this.clientX=void 0!==z.clientX?z.clientX:z.pageX,this.clientY=void 0!==z.clientY?z.clientY:z.pageY,this.screenX=z.screenX||0,this.screenY=z.screenY||0),this.button=z.button,this.key=z.key||"",this.ctrlKey=z.ctrlKey,this.altKey=z.altKey,this.shiftKey=z.shiftKey,this.metaKey=z.metaKey,this.pointerId=z.pointerId||0,this.pointerType="string"==typeof z.pointerType?z.pointerType:ui[z.pointerType]||"",this.state=z.state,this.i=z,z.defaultPrevented&&oi.aa.h.call(this)}}U(oi,ke);var ui={2:"touch",3:"pen",4:"mouse"};oi.prototype.h=function(){oi.aa.h.call(this);var z=this.i;z.preventDefault?z.preventDefault():z.returnValue=!1};var ni="closure_listenable_"+(1e6*Math.random()|0),Ft=0;function jt(z,ct,xt,It,Zt){this.listener=z,this.proxy=null,this.src=ct,this.type=xt,this.capture=!!It,this.ha=Zt,this.key=++Ft,this.da=this.fa=!1}function Xt(z){z.da=!0,z.listener=null,z.proxy=null,z.src=null,z.ha=null}function Ht(z){this.src=z,this.g={},this.h=0}function Te(z,ct){var xt=ct.type;if(xt in z.g){var pe,It=z.g[xt],Zt=Array.prototype.indexOf.call(It,ct,void 0);(pe=0<=Zt)&&Array.prototype.splice.call(It,Zt,1),pe&&(Xt(ct),0==z.g[xt].length&&(delete z.g[xt],z.h--))}}function Pt(z,ct,xt,It){for(var Zt=0;Zt>>0);function Co(z){return"function"==typeof z?z:(z[ti]||(z[ti]=function(ct){return z.handleEvent(ct)}),z[ti])}function qn(){Kt.call(this),this.i=new Ht(this),this.M=this,this.F=null}function Hn(z,ct){var xt,It=z.F;if(It)for(xt=[];It;It=It.F)xt.push(It);if(z=z.M,It=ct.type||ct,"string"==typeof ct)ct=new ke(ct,z);else if(ct instanceof ke)ct.target=ct.target||z;else{var Zt=ct;bt(ct=new ke(It,z),Zt)}if(Zt=!0,xt)for(var pe=xt.length-1;0<=pe;pe--){var li=ct.g=xt[pe];Zt=Js(li,It,!0,ct)&&Zt}if(Zt=Js(li=ct.g=z,It,!0,ct)&&Zt,Zt=Js(li,It,!1,ct)&&Zt,xt)for(pe=0;pe{z.g=null,z.i&&(z.i=!1,Ji(z))},z.l);const ct=z.h;z.h=null,z.m.apply(null,ct)}U(qn,Kt),qn.prototype[ni]=!0,qn.prototype.removeEventListener=function(z,ct,xt,It){nr(this,z,ct,xt,It)},qn.prototype.N=function(){if(qn.aa.N.call(this),this.i){var ct,z=this.i;for(ct in z.g){for(var xt=z.g[ct],It=0;ItIt.length)){var Zt=It[1];if(Array.isArray(Zt)&&!(1>Zt.length)){var pe=Zt[0];if("noop"!=pe&&"stop"!=pe&&"close"!=pe)for(var li=1;lict.length?ze:(ct=ct.slice(It,It+xt),z.C=It+xt,ct))}function Yi(z){z.S=Date.now()+z.I,Cr(z,z.I)}function Cr(z,ct){if(null!=z.B)throw Error("WatchDog timer not null");z.B=wp(O(z.ba,z),ct)}function Pa(z){z.B&&(l.clearTimeout(z.B),z.B=null)}function Hr(z){0==z.j.G||z.J||Dnt(z.j,z)}function zs(z){Pa(z);var ct=z.M;ct&&"function"==typeof ct.ma&&ct.ma(),z.M=null,vp(z.U),z.g&&(ct=z.g,z.g=null,ct.abort(),ct.ma())}function Qu(z,ct){try{var xt=z.j;if(0!=xt.G&&(xt.g==z||I4(xt.h,z)))if(!z.K&&I4(xt.h,z)&&3==xt.G){try{var It=xt.Da.g.parse(ct)}catch{It=null}if(Array.isArray(It)&&3==It.length){var Zt=It;if(0==Zt[0]){t:if(!xt.u){if(xt.g){if(!(xt.g.F+3e3Zt[2]&&xt.F&&0==xt.v&&!xt.C&&(xt.C=wp(O(xt.Za,xt),6e3));if(1>=oc(xt.h)&&xt.ca){try{xt.ca()}catch{}xt.ca=void 0}}else Sp(xt,11)}else if((z.K||xt.g==z)&&WA(xt),!rt(ct))for(Zt=xt.Da.g.parse(ct),ct=0;ctAo)&&(3!=Ao||this.g&&(this.h.h||this.g.oa()||wnt(this.g)))){this.J||4!=Ao||7==ct||bp(),Pa(this);var xt=this.g.Z();this.X=xt;e:if(ei(this)){var It=wnt(this.g);z="";var Zt=It.length,pe=4==Zu(this.g);if(!this.h.i){if(typeof TextDecoder>"u"){zs(this),Hr(this);var li="";break e}this.h.i=new l.TextDecoder}for(ct=0;ct=z.j}function oc(z){return z.h?1:z.g?z.g.size:0}function I4(z,ct){return z.h?z.h==ct:!!z.g&&z.g.has(ct)}function R4(z,ct){z.g?z.g.add(ct):z.h=ct}function ant(z,ct){z.h&&z.h==ct?z.h=null:z.g&&z.g.has(ct)&&z.g.delete(ct)}function ont(z){if(null!=z.h)return z.i.concat(z.h.D);if(null!=z.g&&0!==z.g.size){let ct=z.i;for(const xt of z.g.values())ct=ct.concat(xt.D);return ct}return X(z.i)}function lnt(z,ct){if(z.forEach&&"function"==typeof z.forEach)z.forEach(ct,void 0);else if(w(z)||"string"==typeof z)Array.prototype.forEach.call(z,ct,void 0);else for(var xt=function RJt(z){if(z.na&&"function"==typeof z.na)return z.na();if(!z.V||"function"!=typeof z.V){if(typeof Map<"u"&&z instanceof Map)return Array.from(z.keys());if(!(typeof Set<"u"&&z instanceof Set)){if(w(z)||"string"==typeof z){var ct=[];z=z.length;for(var xt=0;xtct)throw Error("Bad port number "+ct);z.s=ct}else z.s=null}function dnt(z,ct,xt){ct instanceof rw?(z.i=ct,function BJt(z,ct){ct&&!z.j&&(wf(z),z.i=null,z.g.forEach(function(xt,It){var Zt=It.toLowerCase();It!=Zt&&(hnt(this,It),mnt(this,Zt,xt))},z)),z.j=ct}(z.i,z.h)):(xt||(ct=nw(ct,LJt)),z.i=new rw(ct,z.h))}function qr(z,ct,xt){z.i.set(ct,xt)}function VA(z){return qr(z,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),z}function iw(z,ct){return z?ct?decodeURI(z.replace(/%25/g,"%2525")):decodeURIComponent(z):""}function nw(z,ct,xt){return"string"==typeof z?(z=encodeURI(z).replace(ct,PJt),xt&&(z=z.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),z):null}function PJt(z){return"%"+((z=z.charCodeAt(0))>>4&15).toString(16)+(15&z).toString(16)}Cp.prototype.toString=function(){var z=[],ct=this.j;ct&&z.push(nw(ct,unt,!0),":");var xt=this.g;return(xt||"file"==ct)&&(z.push("//"),(ct=this.o)&&z.push(nw(ct,unt,!0),"@"),z.push(encodeURIComponent(String(xt)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(xt=this.s)&&z.push(":",String(xt))),(xt=this.l)&&(this.g&&"/"!=xt.charAt(0)&&z.push("/"),z.push(nw(xt,"/"==xt.charAt(0)?OJt:FJt,!0))),(xt=this.i.toString())&&z.push("?",xt),(xt=this.m)&&z.push("#",nw(xt,NJt)),z.join("")};var unt=/[#\/\?@]/g,FJt=/[#\?:]/g,OJt=/[#\?]/g,LJt=/[#\?@]/g,NJt=/#/g;function rw(z,ct){this.h=this.g=null,this.i=z||null,this.j=!!ct}function wf(z){z.g||(z.g=new Map,z.h=0,z.i&&function kJt(z,ct){if(z){z=z.split("&");for(var xt=0;xt{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,aw(this)),this.readyState=0},e.Sa=function(z){if(this.g&&(this.l=z,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=z.headers,this.readyState=2,ow(this)),this.g&&(this.readyState=3,ow(this),this.g)))if("arraybuffer"===this.responseType)z.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof l.ReadableStream<"u"&&"body"in z){if(this.j=z.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;pnt(this)}else z.text().then(this.Ra.bind(this),this.ga.bind(this))},e.Pa=function(z){if(this.g){if(this.o&&z.value)this.response.push(z.value);else if(!this.o){var ct=z.value?z.value:new Uint8Array(0);(ct=this.v.decode(ct,{stream:!z.done}))&&(this.response=this.responseText+=ct)}z.done?aw(this):ow(this),3==this.readyState&&pnt(this)}},e.Ra=function(z){this.g&&(this.response=this.responseText=z,aw(this))},e.Qa=function(z){this.g&&(this.response=z,aw(this))},e.ga=function(){this.g&&aw(this)},e.setRequestHeader=function(z,ct){this.u.append(z,ct)},e.getResponseHeader=function(z){return this.h&&this.h.get(z.toLowerCase())||""},e.getAllResponseHeaders=function(){if(!this.h)return"";const z=[],ct=this.h.entries();for(var xt=ct.next();!xt.done;)z.push((xt=xt.value)[0]+": "+xt[1]),xt=ct.next();return z.join("\r\n")},Object.defineProperty(UA.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(z){this.m=z?"include":"same-origin"}}),U(_s,qn);var HJt=/^https?$/i,WJt=["POST","PUT"];function vnt(z,ct){z.h=!1,z.g&&(z.j=!0,z.g.abort(),z.j=!1),z.l=ct,z.m=5,xnt(z),zA(z)}function xnt(z){z.A||(z.A=!0,Hn(z,"complete"),Hn(z,"error"))}function ynt(z){if(z.h&&typeof o<"u"&&(!z.v[1]||4!=Zu(z)||2!=z.Z()))if(z.u&&4==Zu(z))So(z.Ea,0,z);else if(Hn(z,"readystatechange"),4==Zu(z)){z.h=!1;try{const li=z.Z();t:switch(li){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var ct=!0;break t;default:ct=!1}var xt;if(!(xt=ct)){var It;if(It=0===li){var Zt=String(z.D).match(cnt)[1]||null;!Zt&&l.self&&l.self.location&&(Zt=l.self.location.protocol.slice(0,-1)),It=!HJt.test(Zt?Zt.toLowerCase():"")}xt=It}if(xt)Hn(z,"complete"),Hn(z,"success");else{z.m=6;try{var pe=2{}:null;z.g=null,z.v=null,ct||Hn(z,"ready");try{xt.onreadystatechange=It}catch{}}}function bnt(z){z.I&&(l.clearTimeout(z.I),z.I=null)}function Zu(z){return z.g?z.g.readyState:0}function wnt(z){try{if(!z.g)return null;if("response"in z.g)return z.g.response;switch(z.H){case"":case"text":return z.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in z.g)return z.g.mozResponseArrayBuffer}return null}catch{return null}}function lw(z,ct,xt){return xt&&xt.internalChannelParams&&xt.internalChannelParams[z]||ct}function _nt(z){this.Aa=0,this.i=[],this.j=new _p,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=lw("failFast",!1,z),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=lw("baseRetryDelayMs",5e3,z),this.cb=lw("retryDelaySeedMs",1e4,z),this.Wa=lw("forwardChannelMaxRetries",2,z),this.wa=lw("forwardChannelRequestTimeoutMs",2e4,z),this.pa=z&&z.xmlHttpFactory||void 0,this.Xa=z&&z.Tb||void 0,this.Ca=z&&z.useFetchStreams||!1,this.L=void 0,this.J=z&&z.supportsCrossDomainXhr||!1,this.K="",this.h=new Rd(z&&z.concurrentRequestLimit),this.Da=new zJt,this.P=z&&z.fastHandshake||!1,this.O=z&&z.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=z&&z.Rb||!1,z&&z.xa&&this.j.xa(),z&&z.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&z&&z.detectBufferingProxy||!1,this.ja=void 0,z&&z.longPollingTimeout&&0rr)pe=Math.max(0,Zt[Ya].g-100),Pr=!1;else try{GJt(Eo,li,"req"+rr+"_")}catch{It&&It(Eo)}}if(Pr){It=li.join("&");break t}}}return z=z.i.splice(0,xt),ct.D=z,It}function Ent(z){if(!z.g&&!z.u){z.Y=1;var ct=z.Fa;Qt||Se(),_e||(Qt(),_e=!0),Ne.add(ct,z),z.v=0}}function F4(z){return!(z.g||z.u||3<=z.v||(z.Y++,z.u=wp(O(z.Fa,z),Mnt(z,z.v)),z.v++,0))}function O4(z){null!=z.A&&(l.clearTimeout(z.A),z.A=null)}function Ant(z){z.g=new ie(z,z.j,"rpc",z.Y),null===z.m&&(z.g.H=z.o),z.g.O=0;var ct=Ku(z.qa);qr(ct,"RID","rpc"),qr(ct,"SID",z.K),qr(ct,"AID",z.T),qr(ct,"CI",z.F?"0":"1"),!z.F&&z.ja&&qr(ct,"TO",z.ja),qr(ct,"TYPE","xmlhttp"),cw(z,ct),z.m&&z.o&&k4(ct,z.m,z.o),z.L&&(z.g.I=z.L);var xt=z.g;z=z.ia,xt.L=1,xt.v=VA(Ku(ct)),xt.m=null,xt.P=!0,yi(xt,z)}function WA(z){null!=z.C&&(l.clearTimeout(z.C),z.C=null)}function Dnt(z,ct){var xt=null;if(z.g==ct){WA(z),O4(z),z.g=null;var It=2}else{if(!I4(z.h,ct))return;xt=ct.D,ant(z.h,ct),It=1}if(0!=z.G)if(ct.o)if(1==It){xt=ct.m?ct.m.length:0,ct=Date.now()-ct.F;var Zt=z.B;Hn(It=D0(),new M0(It,xt)),HA(z)}else Ent(z);else if(3==(Zt=ct.s)||0==Zt&&0=z.h.j-(z.s?1:0)||(z.s?(z.i=ct.D.concat(z.i),0):1==z.G||2==z.G||z.B>=(z.Va?0:z.Wa)||(z.s=wp(O(z.Ga,z,ct),Mnt(z,z.B)),z.B++,0)))}(z,ct)||2==It&&F4(z)))switch(xt&&0{It.abort(),_f(0,0,!1,ct)},1e4);fetch(z,{signal:It.signal}).then(pe=>{clearTimeout(Zt),_f(0,0,!!pe.ok,ct)}).catch(()=>{clearTimeout(Zt),_f(0,0,!1,ct)})}(It.toString(),xt)}else ja(2);z.G=0,z.l&&z.l.sa(ct),Int(z),Tnt(z)}function Int(z){if(z.G=0,z.ka=[],z.l){const ct=ont(z.h);(0!=ct.length||0!=z.i.length)&&(W(z.ka,ct),W(z.ka,z.i),z.h.i.length=0,X(z.i),z.i.length=0),z.l.ra()}}function Rnt(z,ct,xt){var It=xt instanceof Cp?Ku(xt):new Cp(xt);if(""!=It.g)ct&&(It.g=ct+"."+It.g),BA(It,It.s);else{var Zt=l.location;It=Zt.protocol,ct=ct?ct+"."+Zt.hostname:Zt.hostname,Zt=+Zt.port;var pe=new Cp(null);It&&NA(pe,It),ct&&(pe.g=ct),Zt&&BA(pe,Zt),xt&&(pe.l=xt),It=pe}return ct=z.ya,(xt=z.D)&&ct&&qr(It,xt,ct),qr(It,"VER",z.la),cw(z,It),It}function knt(z,ct,xt){if(ct&&!z.J)throw Error("Can't create secondary domain capable XhrIo object.");return(ct=new _s(z.Ca&&!z.pa?new sw({eb:xt}):z.pa)).Ha(z.J),ct}function Pnt(){}function XA(){}function Pl(z,ct){qn.call(this),this.g=new _nt(ct),this.l=z,this.h=ct&&ct.messageUrlParams||null,z=ct&&ct.messageHeaders||null,ct&&ct.clientProtocolHeaderRequired&&(z?z["X-Client-Protocol"]="webchannel":z={"X-Client-Protocol":"webchannel"}),this.g.o=z,z=ct&&ct.initMessageHeaders||null,ct&&ct.messageContentType&&(z?z["X-WebChannel-Content-Type"]=ct.messageContentType:z={"X-WebChannel-Content-Type":ct.messageContentType}),ct&&ct.va&&(z?z["X-WebChannel-Client-Profile"]=ct.va:z={"X-WebChannel-Client-Profile":ct.va}),this.g.S=z,(z=ct&&ct.Sb)&&!rt(z)&&(this.g.m=z),this.v=ct&&ct.supportsCrossDomainXhr||!1,this.u=ct&&ct.sendRawJson||!1,(ct=ct&&ct.httpSessionIdParam)&&!rt(ct)&&(this.g.D=ct,null!==(z=this.h)&&ct in z&&ct in(z=this.h)&&delete z[ct]),this.j=new k0(this)}function Fnt(z){bf.call(this),z.__headers__&&(this.headers=z.__headers__,this.statusCode=z.__status__,delete z.__headers__,delete z.__status__);var ct=z.__sm__;if(ct){t:{for(const xt in ct){z=xt;break t}z=void 0}(this.i=z)&&(z=this.i,ct=null!==ct&&z in ct?ct[z]:void 0),this.data=ct}else this.data=z}function Ont(){ew.call(this),this.status=1}function k0(z){this.g=z}(e=_s.prototype).Ha=function(z){this.J=z},e.ea=function(z,ct,xt,It){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+z);ct=ct?ct.toUpperCase():"GET",this.D=z,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():se.g(),this.v=function tw(z){return z.h||(z.h=z.i())}(this.o?this.o:se),this.g.onreadystatechange=O(this.Ea,this);try{this.B=!0,this.g.open(ct,String(z),!0),this.B=!1}catch(pe){return void vnt(this,pe)}if(z=xt||"",xt=new Map(this.headers),It)if(Object.getPrototypeOf(It)===Object.prototype)for(var Zt in It)xt.set(Zt,It[Zt]);else{if("function"!=typeof It.keys||"function"!=typeof It.get)throw Error("Unknown input type for opt_headers: "+String(It));for(const pe of It.keys())xt.set(pe,It.get(pe))}It=Array.from(xt.keys()).find(pe=>"content-type"==pe.toLowerCase()),Zt=l.FormData&&z instanceof l.FormData,!(0<=Array.prototype.indexOf.call(WJt,ct,void 0))||It||Zt||xt.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[pe,li]of xt)this.g.setRequestHeader(pe,li);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{bnt(this),this.u=!0,this.g.send(z),this.u=!1}catch(pe){vnt(this,pe)}},e.abort=function(z){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=z||7,Hn(this,"complete"),Hn(this,"abort"),zA(this))},e.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),zA(this,!0)),_s.aa.N.call(this)},e.Ea=function(){this.s||(this.B||this.u||this.j?ynt(this):this.bb())},e.bb=function(){ynt(this)},e.isActive=function(){return!!this.g},e.Z=function(){try{return 2=this.R)){var z=2*this.R;this.j.info("BP detection timer enabled: "+z),this.A=wp(O(this.ab,this),z)}},e.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,ja(10),GA(this),Ant(this))},e.Za=function(){null!=this.C&&(this.C=null,GA(this),F4(this),ja(19))},e.fb=function(z){z?(this.j.info("Successfully pinged google.com"),ja(2)):(this.j.info("Failed to ping google.com"),ja(1))},e.isActive=function(){return!!this.l&&this.l.isActive(this)},(e=Pnt.prototype).ua=function(){},e.ta=function(){},e.sa=function(){},e.ra=function(){},e.isActive=function(){return!0},e.Na=function(){},XA.prototype.g=function(z,ct){return new Pl(z,ct)},U(Pl,qn),Pl.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},Pl.prototype.close=function(){P4(this.g)},Pl.prototype.o=function(z){var ct=this.g;if("string"==typeof z){var xt={};xt.__data__=z,z=xt}else this.u&&((xt={}).__data__=ac(z),z=xt);ct.i.push(new Tp(ct.Ya++,z)),3==ct.G&&HA(ct)},Pl.prototype.N=function(){this.g.l=null,delete this.j,P4(this.g),delete this.g,Pl.aa.N.call(this)},U(Fnt,bf),U(Ont,ew),U(k0,Pnt),k0.prototype.ua=function(){Hn(this.g,"a")},k0.prototype.ta=function(z){Hn(this.g,new Fnt(z))},k0.prototype.sa=function(z){Hn(this.g,new Ont)},k0.prototype.ra=function(){Hn(this.g,"b")},XA.prototype.createWebChannel=XA.prototype.g,Pl.prototype.send=Pl.prototype.o,Pl.prototype.open=Pl.prototype.m,Pl.prototype.close=Pl.prototype.close,zj=yu.createWebChannelTransport=function(){return new XA},Uj=yu.getStatEventTarget=function(){return D0()},Vj=yu.Event=$u,AP=yu.Stat={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},Lt.NO_ERROR=0,Lt.TIMEOUT=8,Lt.HTTP_ERROR=6,oS=yu.ErrorCode=Lt,Nt.COMPLETE="complete",Bj=yu.EventType=Nt,PA.EventType=yp,yp.OPEN="a",yp.CLOSE="b",yp.ERROR="c",yp.MESSAGE="d",qn.prototype.listen=qn.prototype.K,qy=yu.WebChannel=PA,Nj=yu.FetchXmlHttpFactory=sw,_s.prototype.listenOnce=_s.prototype.L,_s.prototype.getLastError=_s.prototype.Ka,_s.prototype.getLastErrorCode=_s.prototype.Ba,_s.prototype.getStatus=_s.prototype.Z,_s.prototype.getResponseJson=_s.prototype.Oa,_s.prototype.getResponseText=_s.prototype.oa,_s.prototype.send=_s.prototype.ea,_s.prototype.setWithCredentials=_s.prototype.Ha,Lj=yu.XhrIo=_s}).apply(typeof aS<"u"?aS:typeof self<"u"?self:typeof window<"u"?window:{});const Gj="@firebase/firestore";class Ea{constructor(i){this.uid=i}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(i){return i.uid===this.uid}}Ea.UNAUTHENTICATED=new Ea(null),Ea.GOOGLE_CREDENTIALS=new Ea("google-credentials-uid"),Ea.FIRST_PARTY=new Ea("first-party-uid"),Ea.MOCK_USER=new Ea("mock-user");let mv="10.12.3";const Uh=new xj("@firebase/firestore");function pv(){return Uh.logLevel}function Fe(e,...i){if(Uh.logLevel<=jn.DEBUG){const t=i.map(DP);Uh.debug(`Firestore (${mv}): ${e}`,...t)}}function ks(e,...i){if(Uh.logLevel<=jn.ERROR){const t=i.map(DP);Uh.error(`Firestore (${mv}): ${e}`,...t)}}function _l(e,...i){if(Uh.logLevel<=jn.WARN){const t=i.map(DP);Uh.warn(`Firestore (${mv}): ${e}`,...t)}}function DP(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return e}}function gi(e="Unexpected state"){const i=`FIRESTORE (${mv}) INTERNAL ASSERTION FAILED: `+e;throw ks(i),new Error(i)}function Ai(e,i){e||gi()}function ai(e,i){return e}const he={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class Oe extends fv{constructor(i,t){super(i,t),this.code=i,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class ha{constructor(){this.promise=new Promise((i,t)=>{this.resolve=i,this.reject=t})}}class Hj{constructor(i,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${i}`)}}class Skt{getToken(){return Promise.resolve(null)}invalidateToken(){}start(i,t){i.enqueueRetryable(()=>t(Ea.UNAUTHENTICATED))}shutdown(){}}class Ekt{constructor(i){this.token=i,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(i,t){this.changeListener=t,i.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class Akt{constructor(i){this.t=i,this.currentUser=Ea.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(i,t){var n=this;let r=this.i;const s=C=>this.i!==r?(r=this.i,t(C)):Promise.resolve();let o=new ha;this.o=()=>{this.i++,this.currentUser=this.u(),o.resolve(),o=new ha,i.enqueueRetryable(()=>s(this.currentUser))};const l=()=>{const C=o;i.enqueueRetryable(de(function*(){yield C.promise,yield s(n.currentUser)}))},w=C=>{Fe("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=C,this.auth.addAuthTokenListener(this.o),l()};this.t.onInit(C=>w(C)),setTimeout(()=>{if(!this.auth){const C=this.t.getImmediate({optional:!0});C?w(C):(Fe("FirebaseAuthCredentialsProvider","Auth not yet detected"),o.resolve(),o=new ha)}},0),l()}getToken(){const i=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(n=>this.i!==i?(Fe("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):n?(Ai("string"==typeof n.accessToken),new Hj(n.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){const i=this.auth&&this.auth.getUid();return Ai(null===i||"string"==typeof i),new Ea(i)}}class Dkt{constructor(i,t,n){this.l=i,this.h=t,this.P=n,this.type="FirstParty",this.user=Ea.FIRST_PARTY,this.I=new Map}T(){return this.P?this.P():null}get headers(){this.I.set("X-Goog-AuthUser",this.l);const i=this.T();return i&&this.I.set("Authorization",i),this.h&&this.I.set("X-Goog-Iam-Authorization-Token",this.h),this.I}}class Mkt{constructor(i,t,n){this.l=i,this.h=t,this.P=n}getToken(){return Promise.resolve(new Dkt(this.l,this.h,this.P))}start(i,t){i.enqueueRetryable(()=>t(Ea.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class Wj{constructor(i){this.value=i,this.type="AppCheck",this.headers=new Map,i&&i.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class Ikt{constructor(i){this.A=i,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(i,t){const n=s=>{null!=s.error&&Fe("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,Fe("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?t(s.token):Promise.resolve()};this.o=s=>{i.enqueueRetryable(()=>n(s))};const r=s=>{Fe("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>r(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?r(s):Fe("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const i=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(i).then(t=>t?(Ai("string"==typeof t.token),this.R=t.token,new Wj(t.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}function Rkt(e){const i=typeof self<"u"&&(self.crypto||self.msCrypto),t=new Uint8Array(e);if(i&&"function"==typeof i.getRandomValues)i.getRandomValues(t);else for(let n=0;ni?1:0}function gv(e,i,t){return e.length===i.length&&e.every((n,r)=>t(n,i[r]))}class ns{constructor(i,t){if(this.seconds=i,this.nanoseconds=t,t<0)throw new Oe(he.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(t>=1e9)throw new Oe(he.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(i<-62135596800)throw new Oe(he.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i);if(i>=253402300800)throw new Oe(he.INVALID_ARGUMENT,"Timestamp seconds out of range: "+i)}static now(){return ns.fromMillis(Date.now())}static fromDate(i){return ns.fromMillis(i.getTime())}static fromMillis(i){const t=Math.floor(i/1e3),n=Math.floor(1e6*(i-1e3*t));return new ns(t,n)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(i){return this.seconds===i.seconds?tn(this.nanoseconds,i.nanoseconds):tn(this.seconds,i.seconds)}isEqual(i){return i.seconds===this.seconds&&i.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class Ii{constructor(i){this.timestamp=i}static fromTimestamp(i){return new Ii(i)}static min(){return new Ii(new ns(0,0))}static max(){return new Ii(new ns(253402300799,999999999))}compareTo(i){return this.timestamp._compareTo(i.timestamp)}isEqual(i){return this.timestamp.isEqual(i.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class tb{constructor(i,t,n){void 0===t?t=0:t>i.length&&gi(),void 0===n?n=i.length-t:n>i.length-t&&gi(),this.segments=i,this.offset=t,this.len=n}get length(){return this.len}isEqual(i){return 0===tb.comparator(this,i)}child(i){const t=this.segments.slice(this.offset,this.limit());return i instanceof tb?i.forEach(n=>{t.push(n)}):t.push(i),this.construct(t)}limit(){return this.offset+this.length}popFirst(i){return this.construct(this.segments,this.offset+(i=void 0===i?1:i),this.length-i)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(i){return this.segments[this.offset+i]}isEmpty(){return 0===this.length}isPrefixOf(i){if(i.lengtho)return 1}return i.lengtht.length?1:0}}class Bn extends tb{construct(i,t,n){return new Bn(i,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...i){const t=[];for(const n of i){if(n.indexOf("//")>=0)throw new Oe(he.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(r=>r.length>0))}return new Bn(t)}static emptyPath(){return new Bn([])}}const kkt=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class rs extends tb{construct(i,t,n){return new rs(i,t,n)}static isValidIdentifier(i){return kkt.test(i)}canonicalString(){return this.toArray().map(i=>(i=i.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),rs.isValidIdentifier(i)||(i="`"+i+"`"),i)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new rs(["__name__"])}static fromServerFormat(i){const t=[];let n="",r=0;const s=()=>{if(0===n.length)throw new Oe(he.INVALID_ARGUMENT,`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""};let o=!1;for(;r=2&&this.path.get(this.path.length-2)===i}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(i){return null!==i&&0===Bn.comparator(this.path,i.path)}toString(){return this.path.toString()}static comparator(i,t){return Bn.comparator(i.path,t.path)}static isDocumentKey(i){return i.length%2==0}static fromSegments(i){return new di(new Bn(i.slice()))}}class Tl{constructor(i,t,n){this.readTime=i,this.documentKey=t,this.largestBatchId=n}static min(){return new Tl(Ii.min(),di.empty(),-1)}static max(){return new Tl(Ii.max(),di.empty(),-1)}}function IP(e,i){let t=e.readTime.compareTo(i.readTime);return 0!==t?t:(t=di.comparator(e.documentKey,i.documentKey),0!==t?t:tn(e.largestBatchId,i.largestBatchId))}const Qj="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class Kj{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(i){this.onCommittedListeners.push(i)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(i=>i())}}function zh(e){return RP.apply(this,arguments)}function RP(){return(RP=de(function*(e){if(e.code!==he.FAILED_PRECONDITION||e.message!==Qj)throw e;Fe("LocalStore","Unexpectedly lost primary lease")})).apply(this,arguments)}class te{constructor(i){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,i(t=>{this.isDone=!0,this.result=t,this.nextCallback&&this.nextCallback(t)},t=>{this.isDone=!0,this.error=t,this.catchCallback&&this.catchCallback(t)})}catch(i){return this.next(void 0,i)}next(i,t){return this.callbackAttached&&gi(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(i,this.result):new te((n,r)=>{this.nextCallback=s=>{this.wrapSuccess(i,s).next(n,r)},this.catchCallback=s=>{this.wrapFailure(t,s).next(n,r)}})}toPromise(){return new Promise((i,t)=>{this.next(i,t)})}wrapUserFunction(i){try{const t=i();return t instanceof te?t:te.resolve(t)}catch(t){return te.reject(t)}}wrapSuccess(i,t){return i?this.wrapUserFunction(()=>i(t)):te.resolve(t)}wrapFailure(i,t){return i?this.wrapUserFunction(()=>i(t)):te.reject(t)}static resolve(i){return new te((t,n)=>{t(i)})}static reject(i){return new te((t,n)=>{n(i)})}static waitFor(i){return new te((t,n)=>{let r=0,s=0,o=!1;i.forEach(l=>{++r,l.next(()=>{++s,o&&s===r&&t()},w=>n(w))}),o=!0,s===r&&t()})}static or(i){let t=te.resolve(!1);for(const n of i)t=t.next(r=>r?te.resolve(r):n());return t}static forEach(i,t){const n=[];return i.forEach((r,s)=>{n.push(t.call(this,r,s))}),this.waitFor(n)}static mapArray(i,t){return new te((n,r)=>{const s=i.length,o=new Array(s);let l=0;for(let w=0;w{o[C]=M,++l,l===s&&n(o)},M=>r(M))}})}static doWhile(i,t){return new te((n,r)=>{const s=()=>{!0===i()?t().next(()=>{s()},r):n()};s()})}}function Gh(e){return"IndexedDbTransactionError"===e.name}let Cl=(()=>{class e{constructor(t,n){this.previousValue=t,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(t){return this.previousValue=Math.max(t,this.previousValue),this.previousValue}next(){const t=++this.previousValue;return this.se&&this.se(t),t}}return e.oe=-1,e})();function ib(e){return null==e}function nb(e){return 0===e&&1/e==-1/0}function oY(e){let i=0;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&i++;return i}function Hh(e,i){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&i(t,e[t])}function cY(e){for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i))return!1;return!0}class zr{constructor(i,t){this.comparator=i,this.root=t||Ua.EMPTY}insert(i,t){return new zr(this.comparator,this.root.insert(i,t,this.comparator).copy(null,null,Ua.BLACK,null,null))}remove(i){return new zr(this.comparator,this.root.remove(i,this.comparator).copy(null,null,Ua.BLACK,null,null))}get(i){let t=this.root;for(;!t.isEmpty();){const n=this.comparator(i,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(i){let t=0,n=this.root;for(;!n.isEmpty();){const r=this.comparator(i,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(i){return this.root.inorderTraversal(i)}forEach(i){this.inorderTraversal((t,n)=>(i(t,n),!1))}toString(){const i=[];return this.inorderTraversal((t,n)=>(i.push(`${t}:${n}`),!1)),`{${i.join(", ")}}`}reverseTraversal(i){return this.root.reverseTraversal(i)}getIterator(){return new dS(this.root,null,this.comparator,!1)}getIteratorFrom(i){return new dS(this.root,i,this.comparator,!1)}getReverseIterator(){return new dS(this.root,null,this.comparator,!0)}getReverseIteratorFrom(i){return new dS(this.root,i,this.comparator,!0)}}class dS{constructor(i,t,n,r){this.isReverse=r,this.nodeStack=[];let s=1;for(;!i.isEmpty();)if(s=t?n(i.key,t):1,t&&r&&(s*=-1),s<0)i=this.isReverse?i.left:i.right;else{if(0===s){this.nodeStack.push(i);break}this.nodeStack.push(i),i=this.isReverse?i.right:i.left}}getNext(){let i=this.nodeStack.pop();const t={key:i.key,value:i.value};if(this.isReverse)for(i=i.left;!i.isEmpty();)this.nodeStack.push(i),i=i.right;else for(i=i.right;!i.isEmpty();)this.nodeStack.push(i),i=i.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;const i=this.nodeStack[this.nodeStack.length-1];return{key:i.key,value:i.value}}}class Ua{constructor(i,t,n,r,s){this.key=i,this.value=t,this.color=n??Ua.RED,this.left=r??Ua.EMPTY,this.right=s??Ua.EMPTY,this.size=this.left.size+1+this.right.size}copy(i,t,n,r,s){return new Ua(i??this.key,t??this.value,n??this.color,r??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(i){return this.left.inorderTraversal(i)||i(this.key,this.value)||this.right.inorderTraversal(i)}reverseTraversal(i){return this.right.reverseTraversal(i)||i(this.key,this.value)||this.left.reverseTraversal(i)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(i,t,n){let r=this;const s=n(i,r.key);return r=s<0?r.copy(null,null,null,r.left.insert(i,t,n),null):0===s?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(i,t,n)),r.fixUp()}removeMin(){if(this.left.isEmpty())return Ua.EMPTY;let i=this;return i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.removeMin(),null),i.fixUp()}remove(i,t){let n,r=this;if(t(i,r.key)<0)r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(i,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(i,r.key)){if(r.right.isEmpty())return Ua.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(i,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let i=this;return i.right.isRed()&&!i.left.isRed()&&(i=i.rotateLeft()),i.left.isRed()&&i.left.left.isRed()&&(i=i.rotateRight()),i.left.isRed()&&i.right.isRed()&&(i=i.colorFlip()),i}moveRedLeft(){let i=this.colorFlip();return i.right.left.isRed()&&(i=i.copy(null,null,null,null,i.right.rotateRight()),i=i.rotateLeft(),i=i.colorFlip()),i}moveRedRight(){let i=this.colorFlip();return i.left.left.isRed()&&(i=i.rotateRight(),i=i.colorFlip()),i}rotateLeft(){const i=this.copy(null,null,Ua.RED,null,this.right.left);return this.right.copy(null,null,this.color,i,null)}rotateRight(){const i=this.copy(null,null,Ua.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,i)}colorFlip(){const i=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,i,t)}checkMaxDepth(){const i=this.check();return Math.pow(2,i)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw gi();const i=this.left.check();if(i!==this.right.check())throw gi();return i+(this.isRed()?0:1)}}Ua.EMPTY=null,Ua.RED=!0,Ua.BLACK=!1,Ua.EMPTY=new class{constructor(){this.size=0}get key(){throw gi()}get value(){throw gi()}get color(){throw gi()}get left(){throw gi()}get right(){throw gi()}copy(i,t,n,r,s){return this}insert(i,t,n){return new Ua(i,t)}remove(i,t){return this}isEmpty(){return!0}inorderTraversal(i){return!1}reverseTraversal(i){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class Dr{constructor(i){this.comparator=i,this.data=new zr(this.comparator)}has(i){return null!==this.data.get(i)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(i){return this.data.indexOf(i)}forEach(i){this.data.inorderTraversal((t,n)=>(i(t),!1))}forEachInRange(i,t){const n=this.data.getIteratorFrom(i[0]);for(;n.hasNext();){const r=n.getNext();if(this.comparator(r.key,i[1])>=0)return;t(r.key)}}forEachWhile(i,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!i(n.getNext().key))return}firstAfterOrEqual(i){const t=this.data.getIteratorFrom(i);return t.hasNext()?t.getNext().key:null}getIterator(){return new dY(this.data.getIterator())}getIteratorFrom(i){return new dY(this.data.getIteratorFrom(i))}add(i){return this.copy(this.data.remove(i).insert(i,!0))}delete(i){return this.has(i)?this.copy(this.data.remove(i)):this}isEmpty(){return this.data.isEmpty()}unionWith(i){let t=this;return t.size{t=t.add(n)}),t}isEqual(i){if(!(i instanceof Dr)||this.size!==i.size)return!1;const t=this.data.getIterator(),n=i.data.getIterator();for(;t.hasNext();){const r=t.getNext().key,s=n.getNext().key;if(0!==this.comparator(r,s))return!1}return!0}toArray(){const i=[];return this.forEach(t=>{i.push(t)}),i}toString(){const i=[];return this.forEach(t=>i.push(t)),"SortedSet("+i.toString()+")"}copy(i){const t=new Dr(this.comparator);return t.data=i,t}}class dY{constructor(i){this.iter=i}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class qo{constructor(i){this.fields=i,i.sort(rs.comparator)}static empty(){return new qo([])}unionWith(i){let t=new Dr(rs.comparator);for(const n of this.fields)t=t.add(n);for(const n of i)t=t.add(n);return new qo(t.toArray())}covers(i){for(const t of this.fields)if(t.isPrefixOf(i))return!0;return!1}isEqual(i){return gv(this.fields,i.fields,(t,n)=>t.isEqual(n))}}class uY extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class fa{constructor(i){this.binaryString=i}static fromBase64String(i){const t=function(r){try{return atob(r)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new uY("Invalid base64 string: "+s):s}}(i);return new fa(t)}static fromUint8Array(i){const t=function(r){let s="";for(let o=0;oifd(t,i))}function jh(e,i){if(e===i)return 0;const t=Xh(e),n=Xh(i);if(t!==n)return tn(t,n);switch(t){case 0:case 9007199254740991:return 0;case 1:return tn(e.booleanValue,i.booleanValue);case 2:return function(s,o){const l=ys(s.integerValue||s.doubleValue),w=ys(o.integerValue||o.doubleValue);return lw?1:l===w?0:isNaN(l)?isNaN(w)?0:-1:1}(e,i);case 3:return hY(e.timestampValue,i.timestampValue);case 4:return hY(rb(e),rb(i));case 5:return tn(e.stringValue,i.stringValue);case 6:return function(s,o){const l=wu(s),w=wu(o);return l.compareTo(w)}(e.bytesValue,i.bytesValue);case 7:return function(s,o){const l=s.split("/"),w=o.split("/");for(let C=0;Ci.mapValue.fields[t]=ob(n)),i}if(e.arrayValue){const i={arrayValue:{values:[]}};for(let t=0;t<(e.arrayValue.values||[]).length;++t)i.arrayValue.values[t]=ob(e.arrayValue.values[t]);return i}return Object.assign({},e)}function pY(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class za{constructor(i){this.value=i}static empty(){return new za({mapValue:{}})}field(i){if(i.isEmpty())return this.value;{let t=this.value;for(let n=0;n{if(!t.isImmediateParentOf(l)){const w=this.getFieldsMap(t);this.applyChanges(w,n,r),n={},r=[],t=l.popLast()}o?n[l.lastSegment()]=ob(o):r.push(l.lastSegment())});const s=this.getFieldsMap(t);this.applyChanges(s,n,r)}delete(i){const t=this.field(i.popLast());pS(t)&&t.mapValue.fields&&delete t.mapValue.fields[i.lastSegment()]}isEqual(i){return fd(this.value,i.value)}getFieldsMap(i){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;ni[r]=s);for(const r of n)delete i[r]}clone(){return new za(ob(this.value))}}function xY(e){const i=[];return Hh(e.fields,(t,n)=>{const r=new rs([t]);if(pS(n)){const s=xY(n.mapValue).fields;if(0===s.length)i.push(r);else for(const o of s)i.push(r.child(o))}else i.push(r)}),new qo(i)}class $r{constructor(i,t,n,r,s,o,l){this.key=i,this.documentType=t,this.version=n,this.readTime=r,this.createTime=s,this.data=o,this.documentState=l}static newInvalidDocument(i){return new $r(i,0,Ii.min(),Ii.min(),Ii.min(),za.empty(),0)}static newFoundDocument(i,t,n,r){return new $r(i,1,t,Ii.min(),n,r,0)}static newNoDocument(i,t){return new $r(i,2,t,Ii.min(),Ii.min(),za.empty(),0)}static newUnknownDocument(i,t){return new $r(i,3,t,Ii.min(),Ii.min(),za.empty(),2)}convertToFoundDocument(i,t){return!this.createTime.isEqual(Ii.min())||2!==this.documentType&&0!==this.documentType||(this.createTime=i),this.version=i,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(i){return this.version=i,this.documentType=2,this.data=za.empty(),this.documentState=0,this}convertToUnknownDocument(i){return this.version=i,this.documentType=3,this.data=za.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ii.min(),this}setReadTime(i){return this.readTime=i,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(i){return i instanceof $r&&this.key.isEqual(i.key)&&this.version.isEqual(i.version)&&this.documentType===i.documentType&&this.documentState===i.documentState&&this.data.isEqual(i.data)}mutableCopy(){return new $r(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class Yh{constructor(i,t){this.position=i,this.inclusive=t}}function yY(e,i,t){let n=0;for(let r=0;r":return i>0;case">=":return i>=0;default:return gi()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class wr extends wY{constructor(i,t){super(),this.filters=i,this.op=t,this.ae=null}static create(i,t){return new wr(i,t)}matches(i){return wv(this)?void 0===this.filters.find(t=>!t.matches(i)):void 0!==this.filters.find(t=>t.matches(i))}getFlattenedFilters(){return null!==this.ae||(this.ae=this.filters.reduce((i,t)=>i.concat(t.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function wv(e){return"and"===e.op}function NP(e){return function _Y(e){for(const i of e.filters)if(i instanceof wr)return!1;return!0}(e)&&wv(e)}function BP(e){if(e instanceof Vn)return e.field.canonicalString()+e.op.toString()+bv(e.value);if(NP(e))return e.filters.map(i=>BP(i)).join(",");{const i=e.filters.map(t=>BP(t)).join(",");return`${e.op}(${i})`}}function TY(e,i){return e instanceof Vn?(n=e,(r=i)instanceof Vn&&n.op===r.op&&n.field.isEqual(r.field)&&fd(n.value,r.value)):e instanceof wr?function(n,r){return r instanceof wr&&n.op===r.op&&n.filters.length===r.filters.length&&n.filters.reduce((s,o,l)=>s&&TY(o,r.filters[l]),!0)}(e,i):void gi();var n,r}function SY(e){return e instanceof Vn?`${(t=e).field.canonicalString()} ${t.op} ${bv(t.value)}`:e instanceof wr?function(t){return t.op.toString()+" {"+t.getFilters().map(SY).join(" ,")+"}"}(e):"Filter";var t}class lPt extends Vn{constructor(i,t,n){super(i,t,n),this.key=di.fromName(n.referenceValue)}matches(i){const t=di.comparator(i.key,this.key);return this.matchesComparison(t)}}class cPt extends Vn{constructor(i,t){super(i,"in",t),this.keys=EY(0,t)}matches(i){return this.keys.some(t=>t.isEqual(i.key))}}class dPt extends Vn{constructor(i,t){super(i,"not-in",t),this.keys=EY(0,t)}matches(i){return!this.keys.some(t=>t.isEqual(i.key))}}function EY(e,i){var t;return((null===(t=i.arrayValue)||void 0===t?void 0:t.values)||[]).map(n=>di.fromName(n.referenceValue))}class uPt extends Vn{constructor(i,t){super(i,"array-contains",t)}matches(i){const t=i.data.field(this.field);return ab(t)&&sb(t.arrayValue,this.value)}}class AY extends Vn{constructor(i,t){super(i,"in",t)}matches(i){const t=i.data.field(this.field);return null!==t&&sb(this.value.arrayValue,t)}}class hPt extends Vn{constructor(i,t){super(i,"not-in",t)}matches(i){if(sb(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const t=i.data.field(this.field);return null!==t&&!sb(this.value.arrayValue,t)}}class fPt extends Vn{constructor(i,t){super(i,"array-contains-any",t)}matches(i){const t=i.data.field(this.field);return!(!ab(t)||!t.arrayValue.values)&&t.arrayValue.values.some(n=>sb(this.value.arrayValue,n))}}class mPt{constructor(i,t=null,n=[],r=[],s=null,o=null,l=null){this.path=i,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=s,this.startAt=o,this.endAt=l,this.ue=null}}function VP(e,i=null,t=[],n=[],r=null,s=null,o=null){return new mPt(e,i,t,n,r,s,o)}function ym(e){const i=ai(e);if(null===i.ue){let t=i.path.canonicalString();null!==i.collectionGroup&&(t+="|cg:"+i.collectionGroup),t+="|f:",t+=i.filters.map(n=>BP(n)).join(","),t+="|ob:",t+=i.orderBy.map(n=>{return(s=n).field.canonicalString()+s.dir;var s}).join(","),ib(i.limit)||(t+="|l:",t+=i.limit),i.startAt&&(t+="|lb:",t+=i.startAt.inclusive?"b:":"a:",t+=i.startAt.position.map(n=>bv(n)).join(",")),i.endAt&&(t+="|ub:",t+=i.endAt.inclusive?"a:":"b:",t+=i.endAt.position.map(n=>bv(n)).join(",")),i.ue=t}return i.ue}function cb(e,i){if(e.limit!==i.limit||e.orderBy.length!==i.orderBy.length)return!1;for(let t=0;t0?i.explicitOrderBy[i.explicitOrderBy.length-1].dir:"asc";(function(o){let l=new Dr(rs.comparator);return o.filters.forEach(w=>{w.getFlattenedFilters().forEach(C=>{C.isInequality()&&(l=l.add(C.field))})}),l})(i).forEach(s=>{t.has(s.canonicalString())||s.isKeyField()||i.ce.push(new lb(s,n))}),t.has(rs.keyField().canonicalString())||i.ce.push(new lb(rs.keyField(),n))}return i.ce}function so(e){const i=ai(e);return i.le||(i.le=function PY(e,i){if("F"===e.limitType)return VP(e.path,e.collectionGroup,i,e.filters,e.limit,e.startAt,e.endAt);{i=i.map(r=>new lb(r.field,"desc"===r.dir?"asc":"desc"));const t=e.endAt?new Yh(e.endAt.position,e.endAt.inclusive):null,n=e.startAt?new Yh(e.startAt.position,e.startAt.inclusive):null;return VP(e.path,e.collectionGroup,i,e.filters,e.limit,t,n)}}(i,Tv(e))),i.le}function zP(e,i){const t=e.filters.concat([i]);return new _u(e.path,e.collectionGroup,e.explicitOrderBy.slice(),t,e.limit,e.limitType,e.startAt,e.endAt)}function xS(e,i,t){return new _u(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),i,t,e.startAt,e.endAt)}function db(e,i){return cb(so(e),so(i))&&e.limitType===i.limitType}function FY(e){return`${ym(so(e))}|lt:${e.limitType}`}function Cv(e){return`Query(target=${function(t){let n=t.path.canonicalString();return null!==t.collectionGroup&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(r=>SY(r)).join(", ")}]`),ib(t.limit)||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(r=>{return`${(o=r).field.canonicalString()} (${o.dir})`;var o}).join(", ")}]`),t.startAt&&(n+=", startAt: ",n+=t.startAt.inclusive?"b:":"a:",n+=t.startAt.position.map(r=>bv(r)).join(",")),t.endAt&&(n+=", endAt: ",n+=t.endAt.inclusive?"a:":"b:",n+=t.endAt.position.map(r=>bv(r)).join(",")),`Target(${n})`}(so(e))}; limitType=${e.limitType})`}function ub(e,i){return i.isFoundDocument()&&function(n,r){const s=r.key.path;return null!==n.collectionGroup?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(s):di.isDocumentKey(n.path)?n.path.isEqual(s):n.path.isImmediateParentOf(s)}(e,i)&&function(n,r){for(const s of Tv(n))if(!s.field.isKeyField()&&null===r.data.field(s.field))return!1;return!0}(e,i)&&function(n,r){for(const s of n.filters)if(!s.matches(r))return!1;return!0}(e,i)&&(r=i,!((n=e).startAt&&!function(o,l,w){const C=yY(o,l,w);return o.inclusive?C<=0:C<0}(n.startAt,Tv(n),r)||n.endAt&&!function(o,l,w){const C=yY(o,l,w);return o.inclusive?C>=0:C>0}(n.endAt,Tv(n),r)));var n,r}function LY(e){return(i,t)=>{let n=!1;for(const r of Tv(e)){const s=pPt(r,i,t);if(0!==s)return s;n=n||r.field.isKeyField()}return 0}}function pPt(e,i,t){const n=e.field.isKeyField()?di.comparator(i.key,t.key):function(s,o,l){const w=o.data.field(s),C=l.data.field(s);return null!==w&&null!==C?jh(w,C):gi()}(e.field,i,t);switch(e.dir){case"asc":return n;case"desc":return-1*n;default:return gi()}}class Tu{constructor(i,t){this.mapKeyFn=i,this.equalsFn=t,this.inner={},this.innerSize=0}get(i){const t=this.mapKeyFn(i),n=this.inner[t];if(void 0!==n)for(const[r,s]of n)if(this.equalsFn(r,i))return s}has(i){return void 0!==this.get(i)}set(i,t){const n=this.mapKeyFn(i),r=this.inner[n];if(void 0===r)return this.inner[n]=[[i,t]],void this.innerSize++;for(let s=0;s{for(const[r,s]of n)i(r,s)})}isEmpty(){return cY(this.inner)}size(){return this.innerSize}}const gPt=new zr(di.comparator);function tl(){return gPt}const NY=new zr(di.comparator);function hb(...e){let i=NY;for(const t of e)i=i.insert(t.key,t);return i}function BY(e){let i=NY;return e.forEach((t,n)=>i=i.insert(t,n.overlayedDocument)),i}function md(){return fb()}function VY(){return fb()}function fb(){return new Tu(e=>e.toString(),(e,i)=>e.isEqual(i))}const vPt=new zr(di.comparator),xPt=new Dr(di.comparator);function fn(...e){let i=xPt;for(const t of e)i=i.add(t);return i}const yPt=new Dr(tn);function UY(e,i){if(e.useProto3Json){if(isNaN(i))return{doubleValue:"NaN"};if(i===1/0)return{doubleValue:"Infinity"};if(i===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:nb(i)?"-0":i}}function zY(e){return{integerValue:""+e}}function GY(e,i){return function qj(e){return"number"==typeof e&&Number.isInteger(e)&&!nb(e)&&e<=Number.MAX_SAFE_INTEGER&&e>=Number.MIN_SAFE_INTEGER}(i)?zY(i):UY(e,i)}class yS{constructor(){this._=void 0}}function bPt(e,i,t){return e instanceof Sv?function(r,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:r.seconds,nanos:r.nanoseconds}}}};return s&&uS(s)&&(s=hS(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(t,i):e instanceof bm?WY(e,i):e instanceof wm?XY(e,i):function(r,s){const o=HY(r,s),l=jY(o)+jY(r.Pe);return OP(o)&&OP(r.Pe)?zY(l):UY(r.serializer,l)}(e,i)}function wPt(e,i,t){return e instanceof bm?WY(e,i):e instanceof wm?XY(e,i):t}function HY(e,i){return e instanceof Ev?OP(n=i)||(s=n)&&"doubleValue"in s?i:{integerValue:0}:null;var n,s}class Sv extends yS{}class bm extends yS{constructor(i){super(),this.elements=i}}function WY(e,i){const t=YY(i);for(const n of e.elements)t.some(r=>fd(r,n))||t.push(n);return{arrayValue:{values:t}}}class wm extends yS{constructor(i){super(),this.elements=i}}function XY(e,i){let t=YY(i);for(const n of e.elements)t=t.filter(r=>!fd(r,n));return{arrayValue:{values:t}}}class Ev extends yS{constructor(i,t){super(),this.serializer=i,this.Pe=t}}function jY(e){return ys(e.integerValue||e.doubleValue)}function YY(e){return ab(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class TPt{constructor(i,t){this.version=i,this.transformResults=t}}class ss{constructor(i,t){this.updateTime=i,this.exists=t}static none(){return new ss}static exists(i){return new ss(void 0,i)}static updateTime(i){return new ss(i)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(i){return this.exists===i.exists&&(this.updateTime?!!i.updateTime&&this.updateTime.isEqual(i.updateTime):!i.updateTime)}}function bS(e,i){return void 0!==e.updateTime?i.isFoundDocument()&&i.version.isEqual(e.updateTime):void 0===e.exists||e.exists===i.isFoundDocument()}class wS{}function $Y(e,i){if(!e.hasLocalMutations||i&&0===i.fields.length)return null;if(null===i)return e.isNoDocument()?new Dv(e.key,ss.none()):new Av(e.key,e.data,ss.none());{const t=e.data,n=za.empty();let r=new Dr(rs.comparator);for(let s of i.fields)if(!r.has(s)){let o=t.field(s);null===o&&s.length>1&&(s=s.popLast(),o=t.field(s)),null===o?n.delete(s):n.set(s,o),r=r.add(s)}return new Cu(e.key,n,new qo(r.toArray()),ss.none())}}function CPt(e,i,t){e instanceof Av?function(r,s,o){const l=r.value.clone(),w=ZY(r.fieldTransforms,s,o.transformResults);l.setAll(w),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(e,i,t):e instanceof Cu?function(r,s,o){if(!bS(r.precondition,s))return void s.convertToUnknownDocument(o.version);const l=ZY(r.fieldTransforms,s,o.transformResults),w=s.data;w.setAll(KY(r)),w.setAll(l),s.convertToFoundDocument(o.version,w).setHasCommittedMutations()}(e,i,t):i.convertToNoDocument(t.version).setHasCommittedMutations()}function pb(e,i,t,n){return e instanceof Av?function(s,o,l,w){if(!bS(s.precondition,o))return l;const C=s.value.clone(),M=JY(s.fieldTransforms,w,o);return C.setAll(M),o.convertToFoundDocument(o.version,C).setHasLocalMutations(),null}(e,i,t,n):e instanceof Cu?function(s,o,l,w){if(!bS(s.precondition,o))return l;const C=JY(s.fieldTransforms,w,o),M=o.data;return M.setAll(KY(s)),M.setAll(C),o.convertToFoundDocument(o.version,M).setHasLocalMutations(),null===l?null:l.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(P=>P.field))}(e,i,t,n):(l=t,bS(e.precondition,o=i)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):l);var o,l}function SPt(e,i){let t=null;for(const n of e.fieldTransforms){const r=i.data.field(n.field),s=HY(n.transform,r||null);null!=s&&(null===t&&(t=za.empty()),t.set(n.field,s))}return t||null}function QY(e,i){return e.type===i.type&&!!e.key.isEqual(i.key)&&!!e.precondition.isEqual(i.precondition)&&(r=i.fieldTransforms,!!(void 0===(n=e.fieldTransforms)&&void 0===r||n&&r&&gv(n,r,(s,o)=>function _Pt(e,i){return e.field.isEqual(i.field)&&(r=i.transform,(n=e.transform)instanceof bm&&r instanceof bm||n instanceof wm&&r instanceof wm?gv(n.elements,r.elements,fd):n instanceof Ev&&r instanceof Ev?fd(n.Pe,r.Pe):n instanceof Sv&&r instanceof Sv);var n,r}(s,o))))&&(0===e.type?e.value.isEqual(i.value):1!==e.type||e.data.isEqual(i.data)&&e.fieldMask.isEqual(i.fieldMask));var n,r}class Av extends wS{constructor(i,t,n,r=[]){super(),this.key=i,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class Cu extends wS{constructor(i,t,n,r,s=[]){super(),this.key=i,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function KY(e){const i=new Map;return e.fieldMask.fields.forEach(t=>{if(!t.isEmpty()){const n=e.data.field(t);i.set(t,n)}}),i}function ZY(e,i,t){const n=new Map;Ai(e.length===t.length);for(let r=0;r{const s=i.get(r.key),o=s.overlayedDocument;let l=this.applyToLocalView(o,s.mutatedFields);l=t.has(r.key)?null:l;const w=$Y(o,l);null!==w&&n.set(r.key,w),o.isValidDocument()||o.convertToNoDocument(Ii.min())}),n}keys(){return this.mutations.reduce((i,t)=>i.add(t.key),fn())}isEqual(i){return this.batchId===i.batchId&&gv(this.mutations,i.mutations,(t,n)=>QY(t,n))&&gv(this.baseMutations,i.baseMutations,(t,n)=>QY(t,n))}}class XP{constructor(i,t,n,r){this.batch=i,this.commitVersion=t,this.mutationResults=n,this.docVersions=r}static from(i,t,n){Ai(i.mutations.length===n.length);let r=function(){return vPt}();const s=i.mutations;for(let o=0;o=8)throw new gb(`Invalid padding: ${t}`);if(n<0)throw new gb(`Invalid hash count: ${n}`);if(i.length>0&&0===this.hashCount)throw new gb(`Invalid hash count: ${n}`);if(0===i.length&&0!==t)throw new gb(`Invalid padding when bitmap length is 0: ${t}`);this.Ie=8*i.length-t,this.Te=fm.fromNumber(this.Ie)}Ee(i,t,n){let r=i.add(t.multiply(fm.fromNumber(n)));return 1===r.compare(APt)&&(r=new fm([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Te).toNumber()}de(i){return!!(this.bitmap[Math.floor(i/8)]&1<o.insert(l)),o}insert(i){if(0===this.Ie)return;const t=n$(i),[n,r]=r$(t);for(let s=0;s0&&(this.we=!0,this.pe=i)}Ce(){let i=fn(),t=fn(),n=fn();return this.ge.forEach((r,s)=>{switch(s){case 0:i=i.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:gi()}}),new xb(this.pe,this.ye,i,t,n)}ve(){this.we=!1,this.ge=c$()}Fe(i,t){this.we=!0,this.ge=this.ge.insert(i,t)}Me(i){this.we=!0,this.ge=this.ge.remove(i)}xe(){this.fe+=1}Oe(){this.fe-=1,Ai(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class DPt{constructor(i){this.Le=i,this.Be=new Map,this.ke=tl(),this.qe=l$(),this.Qe=new zr(tn)}Ke(i){for(const t of i.Re)i.Ve&&i.Ve.isFoundDocument()?this.$e(t,i.Ve):this.Ue(t,i.key,i.Ve);for(const t of i.removedTargetIds)this.Ue(t,i.key,i.Ve)}We(i){this.forEachTarget(i,t=>{const n=this.Ge(t);switch(i.state){case 0:this.ze(t)&&n.De(i.resumeToken);break;case 1:n.Oe(),n.Se||n.ve(),n.De(i.resumeToken);break;case 2:n.Oe(),n.Se||this.removeTarget(t);break;case 3:this.ze(t)&&(n.Ne(),n.De(i.resumeToken));break;case 4:this.ze(t)&&(this.je(t),n.De(i.resumeToken));break;default:gi()}})}forEachTarget(i,t){i.targetIds.length>0?i.targetIds.forEach(t):this.Be.forEach((n,r)=>{this.ze(r)&&t(r)})}He(i){const t=i.targetId,n=i.me.count,r=this.Je(t);if(r){const s=r.target;if(gS(s))if(0===n){const o=new di(s.path);this.Ue(t,o,$r.newNoDocument(o,Ii.min()))}else Ai(1===n);else{const o=this.Ye(t);if(o!==n){const l=this.Ze(i),w=l?this.Xe(l,i,o):1;0!==w&&(this.je(t),this.Qe=this.Qe.insert(t,2===w?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch"))}}}}Ze(i){const t=i.me.unchangedNames;if(!t||!t.bits)return null;const{bits:{bitmap:n="",padding:r=0},hashCount:s=0}=t;let o,l;try{o=wu(n).toUint8Array()}catch(w){if(w instanceof uY)return _l("Decoding the base64 bloom filter in existence filter failed ("+w.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw w}try{l=new YP(o,r,s)}catch(w){return _l(w instanceof gb?"BloomFilter error: ":"Applying bloom filter failed: ",w),null}return 0===l.Ie?null:l}Xe(i,t,n){return t.me.count===n-this.nt(i,t.targetId)?0:2}nt(i,t){const n=this.Le.getRemoteKeysForTarget(t);let r=0;return n.forEach(s=>{const o=this.Le.tt(),l=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;i.mightContain(l)||(this.Ue(t,s,null),r++)}),r}rt(i){const t=new Map;this.Be.forEach((s,o)=>{const l=this.Je(o);if(l){if(s.current&&gS(l.target)){const w=new di(l.target.path);null!==this.ke.get(w)||this.it(o,w)||this.Ue(o,w,$r.newNoDocument(w,i))}s.be&&(t.set(o,s.Ce()),s.ve())}});let n=fn();this.qe.forEach((s,o)=>{let l=!0;o.forEachWhile(w=>{const C=this.Je(w);return!C||"TargetPurposeLimboResolution"===C.purpose||(l=!1,!1)}),l&&(n=n.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(i));const r=new vb(i,t,this.Qe,this.ke,n);return this.ke=tl(),this.qe=l$(),this.Qe=new zr(tn),r}$e(i,t){if(!this.ze(i))return;const n=this.it(i,t.key)?2:0;this.Ge(i).Fe(t.key,n),this.ke=this.ke.insert(t.key,t),this.qe=this.qe.insert(t.key,this.st(t.key).add(i))}Ue(i,t,n){if(!this.ze(i))return;const r=this.Ge(i);this.it(i,t)?r.Fe(t,1):r.Me(t),this.qe=this.qe.insert(t,this.st(t).delete(i)),n&&(this.ke=this.ke.insert(t,n))}removeTarget(i){this.Be.delete(i)}Ye(i){const t=this.Ge(i).Ce();return this.Le.getRemoteKeysForTarget(i).size+t.addedDocuments.size-t.removedDocuments.size}xe(i){this.Ge(i).xe()}Ge(i){let t=this.Be.get(i);return t||(t=new o$,this.Be.set(i,t)),t}st(i){let t=this.qe.get(i);return t||(t=new Dr(tn),this.qe=this.qe.insert(i,t)),t}ze(i){const t=null!==this.Je(i);return t||Fe("WatchChangeAggregator","Detected inactive target",i),t}Je(i){const t=this.Be.get(i);return t&&t.Se?null:this.Le.ot(i)}je(i){this.Be.set(i,new o$),this.Le.getRemoteKeysForTarget(i).forEach(t=>{this.Ue(i,t,null)})}it(i,t){return this.Le.getRemoteKeysForTarget(i).has(t)}}function l$(){return new zr(di.comparator)}function c$(){return new zr(di.comparator)}const MPt={asc:"ASCENDING",desc:"DESCENDING"},IPt={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},RPt={and:"AND",or:"OR"};class kPt{constructor(i,t){this.databaseId=i,this.useProto3Json=t}}function $P(e,i){return e.useProto3Json||ib(i)?i:{value:i}}function Mv(e,i){return e.useProto3Json?`${new Date(1e3*i.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+i.nanoseconds).slice(-9)}Z`:{seconds:""+i.seconds,nanos:i.nanoseconds}}function d$(e,i){return e.useProto3Json?i.toBase64():i.toUint8Array()}function PPt(e,i){return Mv(e,i.toTimestamp())}function Ps(e){return Ai(!!e),Ii.fromTimestamp(function(t){const n=bu(t);return new ns(n.seconds,n.nanos)}(e))}function QP(e,i){return KP(e,i).canonicalString()}function KP(e,i){const t=(r=e,new Bn(["projects",r.projectId,"databases",r.database])).child("documents");var r;return void 0===i?t:t.child(i)}function u$(e){const i=Bn.fromString(e);return Ai(_$(i)),i}function yb(e,i){return QP(e.databaseId,i.path)}function pd(e,i){const t=u$(i);if(t.get(1)!==e.databaseId.projectId)throw new Oe(he.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+t.get(1)+" vs "+e.databaseId.projectId);if(t.get(3)!==e.databaseId.database)throw new Oe(he.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+t.get(3)+" vs "+e.databaseId.database);return new di(m$(t))}function h$(e,i){return QP(e.databaseId,i)}function ZP(e){return new Bn(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function m$(e){return Ai(e.length>4&&"documents"===e.get(4)),e.popFirst(5)}function p$(e,i,t){return{name:yb(e,i),fields:t.value.mapValue.fields}}function v$(e,i){return{documents:[h$(e,i.path)]}}function CS(e,i){const t={structuredQuery:{}},n=i.path;let r;null!==i.collectionGroup?(r=n,t.structuredQuery.from=[{collectionId:i.collectionGroup,allDescendants:!0}]):(r=n.popLast(),t.structuredQuery.from=[{collectionId:n.lastSegment()}]),t.parent=h$(e,r);const s=function(C){if(0!==C.length)return w$(wr.create(C,"and"))}(i.filters);s&&(t.structuredQuery.where=s);const o=function(C){if(0!==C.length)return C.map(M=>{return{field:$h((O=M).field),direction:BPt(O.dir)};var O})}(i.orderBy);o&&(t.structuredQuery.orderBy=o);const l=$P(e,i.limit);return null!==l&&(t.structuredQuery.limit=l),i.startAt&&(t.structuredQuery.startAt={before:(C=i.startAt).inclusive,values:C.position}),i.endAt&&(t.structuredQuery.endAt=function(C){return{before:!C.inclusive,values:C.position}}(i.endAt)),{_t:t,parent:r};var C}function y$(e){let i=function f$(e){const i=u$(e);return 4===i.length?Bn.emptyPath():m$(i)}(e.parent);const t=e.structuredQuery,n=t.from?t.from.length:0;let r=null;if(n>0){Ai(1===n);const M=t.from[0];M.allDescendants?r=M.collectionId:i=i.child(M.collectionId)}let s=[];t.where&&(s=function(P){const O=b$(P);return O instanceof wr&&NP(O)?O.getFilters():[O]}(t.where));let o=[];t.orderBy&&(o=t.orderBy.map(O=>{return new lb(Iv((U=O).field),function(W){switch(W){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(U.direction));var U}));let l=null;t.limit&&(l=function(P){let O;return O="object"==typeof P?P.value:P,ib(O)?null:O}(t.limit));let w=null;var P;t.startAt&&(w=new Yh((P=t.startAt).values||[],!!P.before));let C=null;return t.endAt&&(C=function(P){return new Yh(P.values||[],!P.before)}(t.endAt)),function IY(e,i,t,n,r,s,o,l){return new _u(e,i,t,n,r,s,o,l)}(i,r,o,s,l,"F",w,C)}function b$(e){return void 0!==e.unaryFilter?function(t){switch(t.unaryFilter.op){case"IS_NAN":const n=Iv(t.unaryFilter.field);return Vn.create(n,"==",{doubleValue:NaN});case"IS_NULL":const r=Iv(t.unaryFilter.field);return Vn.create(r,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=Iv(t.unaryFilter.field);return Vn.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=Iv(t.unaryFilter.field);return Vn.create(o,"!=",{nullValue:"NULL_VALUE"});default:return gi()}}(e):void 0!==e.fieldFilter?Vn.create(Iv((t=e).fieldFilter.field),function(r){switch(r){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return gi()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==e.compositeFilter?function(t){return wr.create(t.compositeFilter.filters.map(n=>b$(n)),function(r){switch(r){case"AND":return"and";case"OR":return"or";default:return gi()}}(t.compositeFilter.op))}(e):gi();var t}function BPt(e){return MPt[e]}function VPt(e){return IPt[e]}function UPt(e){return RPt[e]}function $h(e){return{fieldPath:e.canonicalString()}}function Iv(e){return rs.fromServerFormat(e.fieldPath)}function w$(e){return e instanceof Vn?function(t){if("=="===t.op){if(mY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NAN"}};if(fY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NULL"}}}else if("!="===t.op){if(mY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NOT_NAN"}};if(fY(t.value))return{unaryFilter:{field:$h(t.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:$h(t.field),op:VPt(t.op),value:t.value}}}(e):e instanceof wr?function(t){const n=t.getFilters().map(r=>w$(r));return 1===n.length?n[0]:{compositeFilter:{op:UPt(t.op),filters:n}}}(e):gi()}function zPt(e){const i=[];return e.fields.forEach(t=>i.push(t.canonicalString())),{fieldPaths:i}}function _$(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class Su{constructor(i,t,n,r,s=Ii.min(),o=Ii.min(),l=fa.EMPTY_BYTE_STRING,w=null){this.target=i,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=l,this.expectedCount=w}withSequenceNumber(i){return new Su(this.target,this.targetId,this.purpose,i,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(i,t){return new Su(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,i,null)}withExpectedCount(i){return new Su(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,i)}withLastLimboFreeSnapshotVersion(i){return new Su(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,i,this.resumeToken,this.expectedCount)}}class T${constructor(i){this.ct=i}}function qP(e){const i=y$({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?xS(i,i.limit,"L"):i}class Sm{constructor(){}Pt(i,t){this.It(i,t),t.Tt()}It(i,t){if("nullValue"in i)this.Et(t,5);else if("booleanValue"in i)this.Et(t,10),t.dt(i.booleanValue?1:0);else if("integerValue"in i)this.Et(t,15),t.dt(ys(i.integerValue));else if("doubleValue"in i){const n=ys(i.doubleValue);isNaN(n)?this.Et(t,13):(this.Et(t,15),nb(n)?t.dt(0):t.dt(n))}else if("timestampValue"in i){let n=i.timestampValue;this.Et(t,20),"string"==typeof n&&(n=bu(n)),t.At(`${n.seconds||""}`),t.dt(n.nanos||0)}else if("stringValue"in i)this.Rt(i.stringValue,t),this.Vt(t);else if("bytesValue"in i)this.Et(t,30),t.ft(wu(i.bytesValue)),this.Vt(t);else if("referenceValue"in i)this.gt(i.referenceValue,t);else if("geoPointValue"in i){const n=i.geoPointValue;this.Et(t,45),t.dt(n.latitude||0),t.dt(n.longitude||0)}else"mapValue"in i?pY(i)?this.Et(t,Number.MAX_SAFE_INTEGER):(this.yt(i.mapValue,t),this.Vt(t)):"arrayValue"in i?(this.wt(i.arrayValue,t),this.Vt(t)):gi()}Rt(i,t){this.Et(t,25),this.St(i,t)}St(i,t){t.At(i)}yt(i,t){const n=i.fields||{};this.Et(t,55);for(const r of Object.keys(n))this.Rt(r,t),this.It(n[r],t)}wt(i,t){const n=i.values||[];this.Et(t,50);for(const r of n)this.It(r,t)}gt(i,t){this.Et(t,37),di.fromName(i).path.forEach(n=>{this.Et(t,60),this.St(n,t)})}Et(i,t){i.dt(t)}Vt(i){i.dt(2)}}Sm.bt=new Sm;class QPt{constructor(){this._n=new sF}addToCollectionParentIndex(i,t){return this._n.add(t),te.resolve()}getCollectionParents(i,t){return te.resolve(this._n.getEntries(t))}addFieldIndex(i,t){return te.resolve()}deleteFieldIndex(i,t){return te.resolve()}deleteAllFieldIndexes(i){return te.resolve()}createTargetIndexes(i,t){return te.resolve()}getDocumentsMatchingTarget(i,t){return te.resolve(null)}getIndexType(i,t){return te.resolve(0)}getFieldIndexes(i,t){return te.resolve([])}getNextCollectionGroupToUpdate(i){return te.resolve(null)}getMinOffset(i,t){return te.resolve(Tl.min())}getMinOffsetFromCollectionGroup(i,t){return te.resolve(Tl.min())}updateCollectionGroup(i,t,n){return te.resolve()}updateIndexEntries(i,t){return te.resolve()}}class sF{constructor(){this.index={}}add(i){const t=i.lastSegment(),n=i.popLast(),r=this.index[t]||new Dr(Bn.comparator),s=!r.has(n);return this.index[t]=r.add(n),s}has(i){const t=i.lastSegment(),n=i.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(i){return(this.index[i]||new Dr(Bn.comparator)).toArray()}}new Uint8Array(0);class ao{constructor(i,t,n){this.cacheSizeCollectionThreshold=i,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(i){return new ao(i,ao.DEFAULT_COLLECTION_PERCENTILE,ao.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}ao.DEFAULT_COLLECTION_PERCENTILE=10,ao.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,ao.DEFAULT=new ao(41943040,ao.DEFAULT_COLLECTION_PERCENTILE,ao.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),ao.DISABLED=new ao(-1,0,0);class Am{constructor(i){this.On=i}next(){return this.On+=2,this.On}static Nn(){return new Am(0)}static Ln(){return new Am(-1)}}class j${constructor(){this.changes=new Tu(i=>i.toString(),(i,t)=>i.isEqual(t)),this.changesApplied=!1}addEntry(i){this.assertNotApplied(),this.changes.set(i.key,i)}removeEntry(i,t){this.assertNotApplied(),this.changes.set(i,$r.newInvalidDocument(i).setReadTime(t))}getEntry(i,t){this.assertNotApplied();const n=this.changes.get(t);return void 0!==n?te.resolve(n):this.getFromCache(i,t)}getEntries(i,t){return this.getAllFromCache(i,t)}apply(i){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(i)}assertNotApplied(){}}class nFt{constructor(i,t){this.overlayedDocument=i,this.mutatedFields=t}}class Z${constructor(i,t,n,r){this.remoteDocumentCache=i,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(i,t){let n=null;return this.documentOverlayCache.getOverlay(i,t).next(r=>(n=r,this.remoteDocumentCache.getEntry(i,t))).next(r=>(null!==n&&pb(n.mutation,r,qo.empty(),ns.now()),r))}getDocuments(i,t){return this.remoteDocumentCache.getEntries(i,t).next(n=>this.getLocalViewOfDocuments(i,n,fn()).next(()=>n))}getLocalViewOfDocuments(i,t,n=fn()){const r=md();return this.populateOverlays(i,r,t).next(()=>this.computeViews(i,t,r,n).next(s=>{let o=hb();return s.forEach((l,w)=>{o=o.insert(l,w.overlayedDocument)}),o}))}getOverlayedDocuments(i,t){const n=md();return this.populateOverlays(i,n,t).next(()=>this.computeViews(i,t,n,fn()))}populateOverlays(i,t,n){const r=[];return n.forEach(s=>{t.has(s)||r.push(s)}),this.documentOverlayCache.getOverlays(i,r).next(s=>{s.forEach((o,l)=>{t.set(o,l)})})}computeViews(i,t,n,r){let s=tl();const o=fb(),l=fb();return t.forEach((w,C)=>{const M=n.get(C.key);r.has(C.key)&&(void 0===M||M.mutation instanceof Cu)?s=s.insert(C.key,C):void 0!==M?(o.set(C.key,M.mutation.getFieldMask()),pb(M.mutation,C,M.mutation.getFieldMask(),ns.now())):o.set(C.key,qo.empty())}),this.recalculateAndSaveOverlays(i,s).next(w=>(w.forEach((C,M)=>o.set(C,M)),t.forEach((C,M)=>{var P;return l.set(C,new nFt(M,null!==(P=o.get(C))&&void 0!==P?P:null))}),l))}recalculateAndSaveOverlays(i,t){const n=fb();let r=new zr((o,l)=>o-l),s=fn();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(i,t).next(o=>{for(const l of o)l.keys().forEach(w=>{const C=t.get(w);if(null===C)return;let M=n.get(w)||qo.empty();M=l.applyToLocalView(C,M),n.set(w,M);const P=(r.get(l.batchId)||fn()).add(w);r=r.insert(l.batchId,P)})}).next(()=>{const o=[],l=r.getReverseIterator();for(;l.hasNext();){const w=l.getNext(),C=w.key,M=w.value,P=VY();M.forEach(O=>{if(!s.has(O)){const L=$Y(t.get(O),n.get(O));null!==L&&P.set(O,L),s=s.add(O)}}),o.push(this.documentOverlayCache.saveOverlays(i,C,P))}return te.waitFor(o)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(i,t){return this.remoteDocumentCache.getEntries(i,t).next(n=>this.recalculateAndSaveOverlays(i,n))}getDocumentsMatchingQuery(i,t,n,r){return di.isDocumentKey((o=t).path)&&null===o.collectionGroup&&0===o.filters.length?this.getDocumentsMatchingDocumentQuery(i,t.path):UP(t)?this.getDocumentsMatchingCollectionGroupQuery(i,t,n,r):this.getDocumentsMatchingCollectionQuery(i,t,n,r);var o}getNextDocuments(i,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(i,t,n,r).next(s=>{const o=r-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(i,t,n.largestBatchId,r-s.size):te.resolve(md());let l=-1,w=s;return o.next(C=>te.forEach(C,(M,P)=>(l{w=w.insert(M,O)}))).next(()=>this.populateOverlays(i,C,s)).next(()=>this.computeViews(i,w,C,fn())).next(M=>({batchId:l,changes:BY(M)})))})}getDocumentsMatchingDocumentQuery(i,t){return this.getDocument(i,new di(t)).next(n=>{let r=hb();return n.isFoundDocument()&&(r=r.insert(n.key,n)),r})}getDocumentsMatchingCollectionGroupQuery(i,t,n,r){const s=t.collectionGroup;let o=hb();return this.indexManager.getCollectionParents(i,s).next(l=>te.forEach(l,w=>{const C=(P=t,O=w.child(s),new _u(O,null,P.explicitOrderBy.slice(),P.filters.slice(),P.limit,P.limitType,P.startAt,P.endAt));var P,O;return this.getDocumentsMatchingCollectionQuery(i,C,n,r).next(M=>{M.forEach((P,O)=>{o=o.insert(P,O)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(i,t,n,r){let s;return this.documentOverlayCache.getOverlaysForCollection(i,t.path,n.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(i,t,n,s,r))).next(o=>{s.forEach((w,C)=>{const M=C.getKey();null===o.get(M)&&(o=o.insert(M,$r.newInvalidDocument(M)))});let l=hb();return o.forEach((w,C)=>{const M=s.get(w);void 0!==M&&pb(M.mutation,C,qo.empty(),ns.now()),ub(t,C)&&(l=l.insert(w,C))}),l})}}class rFt{constructor(i){this.serializer=i,this.cr=new Map,this.lr=new Map}getBundleMetadata(i,t){return te.resolve(this.cr.get(t))}saveBundleMetadata(i,t){return this.cr.set(t.id,{id:(r=t).id,version:r.version,createTime:Ps(r.createTime)}),te.resolve();var r}getNamedQuery(i,t){return te.resolve(this.lr.get(t))}saveNamedQuery(i,t){return this.lr.set(t.name,{name:(r=t).name,query:qP(r.bundledQuery),readTime:Ps(r.readTime)}),te.resolve();var r}}class sFt{constructor(){this.overlays=new zr(di.comparator),this.hr=new Map}getOverlay(i,t){return te.resolve(this.overlays.get(t))}getOverlays(i,t){const n=md();return te.forEach(t,r=>this.getOverlay(i,r).next(s=>{null!==s&&n.set(r,s)})).next(()=>n)}saveOverlays(i,t,n){return n.forEach((r,s)=>{this.ht(i,t,s)}),te.resolve()}removeOverlaysForBatchId(i,t,n){const r=this.hr.get(n);return void 0!==r&&(r.forEach(s=>this.overlays=this.overlays.remove(s)),this.hr.delete(n)),te.resolve()}getOverlaysForCollection(i,t,n){const r=md(),s=t.length+1,o=new di(t.child("")),l=this.overlays.getIteratorFrom(o);for(;l.hasNext();){const w=l.getNext().value,C=w.getKey();if(!t.isPrefixOf(C.path))break;C.path.length===s&&w.largestBatchId>n&&r.set(w.getKey(),w)}return te.resolve(r)}getOverlaysForCollectionGroup(i,t,n,r){let s=new zr((C,M)=>C-M);const o=this.overlays.getIterator();for(;o.hasNext();){const C=o.getNext().value;if(C.getKey().getCollectionGroup()===t&&C.largestBatchId>n){let M=s.get(C.largestBatchId);null===M&&(M=md(),s=s.insert(C.largestBatchId,M)),M.set(C.getKey(),C)}}const l=md(),w=s.getIterator();for(;w.hasNext()&&(w.getNext().value.forEach((C,M)=>l.set(C,M)),!(l.size()>=r)););return te.resolve(l)}ht(i,t,n){const r=this.overlays.get(n.key);if(null!==r){const o=this.hr.get(r.largestBatchId).delete(n.key);this.hr.set(r.largestBatchId,o)}this.overlays=this.overlays.insert(n.key,new jP(t,n));let s=this.hr.get(t);void 0===s&&(s=fn(),this.hr.set(t,s)),this.hr.set(t,s.add(n.key))}}class aF{constructor(){this.Pr=new Dr(Da.Ir),this.Tr=new Dr(Da.Er)}isEmpty(){return this.Pr.isEmpty()}addReference(i,t){const n=new Da(i,t);this.Pr=this.Pr.add(n),this.Tr=this.Tr.add(n)}dr(i,t){i.forEach(n=>this.addReference(n,t))}removeReference(i,t){this.Ar(new Da(i,t))}Rr(i,t){i.forEach(n=>this.removeReference(n,t))}Vr(i){const t=new di(new Bn([])),n=new Da(t,i),r=new Da(t,i+1),s=[];return this.Tr.forEachInRange([n,r],o=>{this.Ar(o),s.push(o.key)}),s}mr(){this.Pr.forEach(i=>this.Ar(i))}Ar(i){this.Pr=this.Pr.delete(i),this.Tr=this.Tr.delete(i)}gr(i){const t=new di(new Bn([])),n=new Da(t,i),r=new Da(t,i+1);let s=fn();return this.Tr.forEachInRange([n,r],o=>{s=s.add(o.key)}),s}containsKey(i){const t=new Da(i,0),n=this.Pr.firstAfterOrEqual(t);return null!==n&&i.isEqual(n.key)}}class Da{constructor(i,t){this.key=i,this.pr=t}static Ir(i,t){return di.comparator(i.key,t.key)||tn(i.pr,t.pr)}static Er(i,t){return tn(i.pr,t.pr)||di.comparator(i.key,t.key)}}class aFt{constructor(i,t){this.indexManager=i,this.referenceDelegate=t,this.mutationQueue=[],this.yr=1,this.wr=new Dr(Da.Ir)}checkEmpty(i){return te.resolve(0===this.mutationQueue.length)}addMutationBatch(i,t,n,r){const s=this.yr;this.yr++;const o=new WP(s,t,n,r);this.mutationQueue.push(o);for(const l of r)this.wr=this.wr.add(new Da(l.key,s)),this.indexManager.addToCollectionParentIndex(i,l.key.path.popLast());return te.resolve(o)}lookupMutationBatch(i,t){return te.resolve(this.Sr(t))}getNextMutationBatchAfterBatchId(i,t){const r=this.br(t+1),s=r<0?0:r;return te.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return te.resolve(0===this.mutationQueue.length?-1:this.yr-1)}getAllMutationBatches(i){return te.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(i,t){const n=new Da(t,0),r=new Da(t,Number.POSITIVE_INFINITY),s=[];return this.wr.forEachInRange([n,r],o=>{const l=this.Sr(o.pr);s.push(l)}),te.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(i,t){let n=new Dr(tn);return t.forEach(r=>{const s=new Da(r,0),o=new Da(r,Number.POSITIVE_INFINITY);this.wr.forEachInRange([s,o],l=>{n=n.add(l.pr)})}),te.resolve(this.Dr(n))}getAllMutationBatchesAffectingQuery(i,t){const n=t.path,r=n.length+1;let s=n;di.isDocumentKey(s)||(s=s.child(""));const o=new Da(new di(s),0);let l=new Dr(tn);return this.wr.forEachWhile(w=>{const C=w.key.path;return!!n.isPrefixOf(C)&&(C.length===r&&(l=l.add(w.pr)),!0)},o),te.resolve(this.Dr(l))}Dr(i){const t=[];return i.forEach(n=>{const r=this.Sr(n);null!==r&&t.push(r)}),t}removeMutationBatch(i,t){Ai(0===this.Cr(t.batchId,"removed")),this.mutationQueue.shift();let n=this.wr;return te.forEach(t.mutations,r=>{const s=new Da(r.key,t.batchId);return n=n.delete(s),this.referenceDelegate.markPotentiallyOrphaned(i,r.key)}).next(()=>{this.wr=n})}Mn(i){}containsKey(i,t){const n=new Da(t,0),r=this.wr.firstAfterOrEqual(n);return te.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(i){return te.resolve()}Cr(i,t){return this.br(i)}br(i){return 0===this.mutationQueue.length?0:i-this.mutationQueue[0].batchId}Sr(i){const t=this.br(i);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class oFt{constructor(i){this.vr=i,this.docs=new zr(di.comparator),this.size=0}setIndexManager(i){this.indexManager=i}addEntry(i,t){const n=t.key,r=this.docs.get(n),s=r?r.size:0,o=this.vr(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(i,n.path.popLast())}removeEntry(i){const t=this.docs.get(i);t&&(this.docs=this.docs.remove(i),this.size-=t.size)}getEntry(i,t){const n=this.docs.get(t);return te.resolve(n?n.document.mutableCopy():$r.newInvalidDocument(t))}getEntries(i,t){let n=tl();return t.forEach(r=>{const s=this.docs.get(r);n=n.insert(r,s?s.document.mutableCopy():$r.newInvalidDocument(r))}),te.resolve(n)}getDocumentsMatchingQuery(i,t,n,r){let s=tl();const o=t.path,l=new di(o.child("")),w=this.docs.getIteratorFrom(l);for(;w.hasNext();){const{key:C,value:{document:M}}=w.getNext();if(!o.isPrefixOf(C.path))break;C.path.length>o.length+1||IP(new Tl((e=M).readTime,e.key,-1),n)<=0||(r.has(M.key)||ub(t,M))&&(s=s.insert(M.key,M.mutableCopy()))}var e;return te.resolve(s)}getAllFromCollectionGroup(i,t,n,r){gi()}Fr(i,t){return te.forEach(this.docs,n=>t(n))}newChangeBuffer(i){return new lFt(this)}getSize(i){return te.resolve(this.size)}}class lFt extends j${constructor(i){super(),this.ar=i}applyChanges(i){const t=[];return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.ar.addEntry(i,r)):this.ar.removeEntry(n)}),te.waitFor(t)}getFromCache(i,t){return this.ar.getEntry(i,t)}getAllFromCache(i,t){return this.ar.getEntries(i,t)}}class cFt{constructor(i){this.persistence=i,this.Mr=new Tu(t=>ym(t),cb),this.lastRemoteSnapshotVersion=Ii.min(),this.highestTargetId=0,this.Or=0,this.Nr=new aF,this.targetCount=0,this.Lr=Am.Nn()}forEachTarget(i,t){return this.Mr.forEach((n,r)=>t(r)),te.resolve()}getLastRemoteSnapshotVersion(i){return te.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(i){return te.resolve(this.Or)}allocateTargetId(i){return this.highestTargetId=this.Lr.next(),te.resolve(this.highestTargetId)}setTargetsMetadata(i,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Or&&(this.Or=t),te.resolve()}qn(i){this.Mr.set(i.target,i);const t=i.targetId;t>this.highestTargetId&&(this.Lr=new Am(t),this.highestTargetId=t),i.sequenceNumber>this.Or&&(this.Or=i.sequenceNumber)}addTargetData(i,t){return this.qn(t),this.targetCount+=1,te.resolve()}updateTargetData(i,t){return this.qn(t),te.resolve()}removeTargetData(i,t){return this.Mr.delete(t.target),this.Nr.Vr(t.targetId),this.targetCount-=1,te.resolve()}removeTargets(i,t,n){let r=0;const s=[];return this.Mr.forEach((o,l)=>{l.sequenceNumber<=t&&null===n.get(l.targetId)&&(this.Mr.delete(o),s.push(this.removeMatchingKeysForTargetId(i,l.targetId)),r++)}),te.waitFor(s).next(()=>r)}getTargetCount(i){return te.resolve(this.targetCount)}getTargetData(i,t){const n=this.Mr.get(t)||null;return te.resolve(n)}addMatchingKeys(i,t,n){return this.Nr.dr(t,n),te.resolve()}removeMatchingKeys(i,t,n){this.Nr.Rr(t,n);const r=this.persistence.referenceDelegate,s=[];return r&&t.forEach(o=>{s.push(r.markPotentiallyOrphaned(i,o))}),te.waitFor(s)}removeMatchingKeysForTargetId(i,t){return this.Nr.Vr(t),te.resolve()}getMatchingKeysForTargetId(i,t){const n=this.Nr.gr(t);return te.resolve(n)}containsKey(i,t){return te.resolve(this.Nr.containsKey(t))}}class oF{constructor(i,t){this.Br={},this.overlays={},this.kr=new Cl(0),this.qr=!1,this.qr=!0,this.referenceDelegate=i(this),this.Qr=new cFt(this),this.indexManager=new QPt,this.remoteDocumentCache=new oFt(n=>this.referenceDelegate.Kr(n)),this.serializer=new T$(t),this.$r=new rFt(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.qr=!1,Promise.resolve()}get started(){return this.qr}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(i){return this.indexManager}getDocumentOverlayCache(i){let t=this.overlays[i.toKey()];return t||(t=new sFt,this.overlays[i.toKey()]=t),t}getMutationQueue(i,t){let n=this.Br[i.toKey()];return n||(n=new aFt(t,this.referenceDelegate),this.Br[i.toKey()]=n),n}getTargetCache(){return this.Qr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.$r}runTransaction(i,t,n){Fe("MemoryPersistence","Starting transaction:",i);const r=new dFt(this.kr.next());return this.referenceDelegate.Ur(),n(r).next(s=>this.referenceDelegate.Wr(r).next(()=>s)).toPromise().then(s=>(r.raiseOnCommittedEvent(),s))}Gr(i,t){return te.or(Object.values(this.Br).map(n=>()=>n.containsKey(i,t)))}}class dFt extends Kj{constructor(i){super(),this.currentSequenceNumber=i}}class kS{constructor(i){this.persistence=i,this.zr=new aF,this.jr=null}static Hr(i){return new kS(i)}get Jr(){if(this.jr)return this.jr;throw gi()}addReference(i,t,n){return this.zr.addReference(n,t),this.Jr.delete(n.toString()),te.resolve()}removeReference(i,t,n){return this.zr.removeReference(n,t),this.Jr.add(n.toString()),te.resolve()}markPotentiallyOrphaned(i,t){return this.Jr.add(t.toString()),te.resolve()}removeTarget(i,t){this.zr.Vr(t.targetId).forEach(r=>this.Jr.add(r.toString()));const n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(i,t.targetId).next(r=>{r.forEach(s=>this.Jr.add(s.toString()))}).next(()=>n.removeTargetData(i,t))}Ur(){this.jr=new Set}Wr(i){const t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return te.forEach(this.Jr,n=>{const r=di.fromPath(n);return this.Yr(i,r).next(s=>{s||t.removeEntry(r,Ii.min())})}).next(()=>(this.jr=null,t.apply(i)))}updateLimboDocument(i,t){return this.Yr(i,t).next(n=>{n?this.Jr.delete(t.toString()):this.Jr.add(t.toString())})}Kr(i){return 0}Yr(i,t){return te.or([()=>te.resolve(this.zr.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(i,t),()=>this.persistence.Gr(i,t)])}}class uF{constructor(i,t,n,r){this.targetId=i,this.fromCache=t,this.qi=n,this.Qi=r}static Ki(i,t){let n=fn(),r=fn();for(const s of t.docChanges)switch(s.type){case 0:n=n.add(s.doc.key);break;case 1:r=r.add(s.doc.key)}return new uF(i,t.fromCache,n,r)}}class hFt{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(i){this._documentReadCount+=i}}class q${constructor(){this.$i=!1,this.Ui=!1,this.Wi=100,this.Gi=function hj(){return!function rRt(){var e;const i=null===(e=eS())||void 0===e?void 0:e.forceEnvironment;if("node"===i)return!0;if("browser"===i)return!1;try{return"[object process]"===Object.prototype.toString.call(global.process)}catch{return!1}}()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}()?8:function Zj(e){const i=e.match(/Android ([\d.]+)/i),t=i?i[1].split(".").slice(0,2).join("."):"-1";return Number(t)}(function Bh(){return typeof navigator<"u"&&"string"==typeof navigator.userAgent?navigator.userAgent:""}())>0?6:4}initialize(i,t){this.zi=i,this.indexManager=t,this.$i=!0}getDocumentsMatchingQuery(i,t,n,r){const s={result:null};return this.ji(i,t).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.Hi(i,t,r,n).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new hFt;return this.Ji(i,t,o).next(l=>{if(s.result=l,this.Ui)return this.Yi(i,t,o,l.size)})}).next(()=>s.result)}Yi(i,t,n,r){return n.documentReadCountthis.Gi*r?(pv()<=jn.DEBUG&&Fe("QueryEngine","The SDK decides to create cache indexes for query:",Cv(t),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(i,so(t))):te.resolve())}ji(i,t){if(RY(t))return te.resolve(null);let n=so(t);return this.indexManager.getIndexType(i,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(t=xS(t,null,"F"),n=so(t)),this.indexManager.getDocumentsMatchingTarget(i,n).next(s=>{const o=fn(...s);return this.zi.getDocuments(i,o).next(l=>this.indexManager.getMinOffset(i,n).next(w=>{const C=this.Zi(t,l);return this.Xi(t,C,o,w.readTime)?this.ji(i,xS(t,null,"F")):this.es(i,C,t,w)}))})))}Hi(i,t,n,r){return RY(t)||r.isEqual(Ii.min())?te.resolve(null):this.zi.getDocuments(i,n).next(s=>{const o=this.Zi(t,s);return this.Xi(t,o,n,r)?te.resolve(null):(pv()<=jn.DEBUG&&Fe("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),Cv(t)),this.es(i,o,t,function Yj(e,i){const t=e.toTimestamp().seconds,n=e.toTimestamp().nanoseconds+1,r=Ii.fromTimestamp(1e9===n?new ns(t+1,0):new ns(t,n));return new Tl(r,di.empty(),i)}(r,-1)).next(l=>l))})}Zi(i,t){let n=new Dr(LY(i));return t.forEach((r,s)=>{ub(i,s)&&(n=n.add(s))}),n}Xi(i,t,n,r){if(null===i.limit)return!1;if(n.size!==t.size)return!0;const s="F"===i.limitType?t.last():t.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(r)>0)}Ji(i,t,n){return pv()<=jn.DEBUG&&Fe("QueryEngine","Using full collection scan to execute query:",Cv(t)),this.zi.getDocumentsMatchingQuery(i,t,Tl.min(),n)}es(i,t,n,r){return this.zi.getDocumentsMatchingQuery(i,n,r).next(s=>(t.forEach(o=>{s=s.insert(o.key,o)}),s))}}class fFt{constructor(i,t,n,r){this.persistence=i,this.ts=t,this.serializer=r,this.ns=new zr(tn),this.rs=new Tu(s=>ym(s),cb),this.ss=new Map,this.os=i.getRemoteDocumentCache(),this.Qr=i.getTargetCache(),this.$r=i.getBundleCache(),this._s(n)}_s(i){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(i),this.indexManager=this.persistence.getIndexManager(i),this.mutationQueue=this.persistence.getMutationQueue(i,this.indexManager),this.localDocuments=new Z$(this.os,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.os.setIndexManager(this.indexManager),this.ts.initialize(this.localDocuments,this.indexManager)}collectGarbage(i){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>i.collect(t,this.ns))}}function eQ(e,i){return hF.apply(this,arguments)}function hF(){return(hF=de(function*(e,i){const t=ai(e);return yield t.persistence.runTransaction("Handle user change","readonly",n=>{let r;return t.mutationQueue.getAllMutationBatches(n).next(s=>(r=s,t._s(i),t.mutationQueue.getAllMutationBatches(n))).next(s=>{const o=[],l=[];let w=fn();for(const C of r){o.push(C.batchId);for(const M of C.mutations)w=w.add(M.key)}for(const C of s){l.push(C.batchId);for(const M of C.mutations)w=w.add(M.key)}return t.localDocuments.getDocuments(n,w).next(C=>({us:C,removedBatchIds:o,addedBatchIds:l}))})})})).apply(this,arguments)}function iQ(e){const i=ai(e);return i.persistence.runTransaction("Get last remote snapshot version","readonly",t=>i.Qr.getLastRemoteSnapshotVersion(t))}function gFt(e,i){const t=ai(e);return t.persistence.runTransaction("Get next mutation batch","readonly",n=>(void 0===i&&(i=-1),t.mutationQueue.getNextMutationBatchAfterBatchId(n,i)))}function Lv(e,i,t){return fF.apply(this,arguments)}function fF(){return(fF=de(function*(e,i,t){const n=ai(e),r=n.ns.get(i),s=t?"readwrite":"readwrite-primary";try{t||(yield n.persistence.runTransaction("Release target",s,o=>n.persistence.referenceDelegate.removeTarget(o,r)))}catch(o){if(!Gh(o))throw o;Fe("LocalStore",`Failed to update sequence numbers for target ${i}: ${o}`)}n.ns=n.ns.remove(i),n.rs.delete(r.target)})).apply(this,arguments)}function OS(e,i,t){const n=ai(e);let r=Ii.min(),s=fn();return n.persistence.runTransaction("Execute query","readwrite",o=>function(w,C,M){const P=ai(w),O=P.rs.get(M);return void 0!==O?te.resolve(P.ns.get(O)):P.Qr.getTargetData(C,M)}(n,o,so(i)).next(l=>{if(l)return r=l.lastLimboFreeSnapshotVersion,n.Qr.getMatchingKeysForTargetId(o,l.targetId).next(w=>{s=w})}).next(()=>n.ts.getDocumentsMatchingQuery(o,i,t?r:Ii.min(),t?s:fn())).next(l=>(function aQ(e,i,t){let n=e.ss.get(i)||Ii.min();t.forEach((r,s)=>{s.readTime.compareTo(n)>0&&(n=s.readTime)}),e.ss.set(i,n)}(n,function OY(e){return e.collectionGroup||(e.path.length%2==1?e.path.lastSegment():e.path.get(e.path.length-2))}(i),l),{documents:l,hs:s})))}class xF{constructor(){this.activeTargetIds=function GP(){return yPt}()}As(i){this.activeTargetIds=this.activeTargetIds.add(i)}Rs(i){this.activeTargetIds=this.activeTargetIds.delete(i)}ds(){const i={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(i)}}class cQ{constructor(){this.no=new xF,this.ro={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(i){}updateMutationState(i,t,n){}addLocalQueryTarget(i){return this.no.As(i),this.ro[i]||"not-current"}updateQueryState(i,t,n){this.ro[i]=t}removeLocalQueryTarget(i){this.no.Rs(i)}isLocalQueryTarget(i){return this.no.activeTargetIds.has(i)}clearQueryState(i){delete this.ro[i]}getAllActiveQueryTargets(){return this.no.activeTargetIds}isActiveQueryTarget(i){return this.no.activeTargetIds.has(i)}start(){return this.no=new xF,Promise.resolve()}handleUserChange(i,t,n){}setOnlineState(i){}shutdown(){}writeSequenceNumber(i){}notifyBundleLoaded(i){}}class yFt{io(i){}shutdown(){}}class dQ{constructor(){this.so=()=>this.oo(),this._o=()=>this.ao(),this.uo=[],this.co()}io(i){this.uo.push(i)}shutdown(){window.removeEventListener("online",this.so),window.removeEventListener("offline",this._o)}co(){window.addEventListener("online",this.so),window.addEventListener("offline",this._o)}oo(){Fe("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const i of this.uo)i(0)}ao(){Fe("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const i of this.uo)i(1)}static D(){return typeof window<"u"&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let BS=null;function bF(){return null===BS?BS=268435456+Math.round(2147483648*Math.random()):BS++,"0x"+BS.toString(16)}const bFt={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class wFt{constructor(i){this.lo=i.lo,this.ho=i.ho}Po(i){this.Io=i}To(i){this.Eo=i}Ao(i){this.Ro=i}onMessage(i){this.Vo=i}close(){this.ho()}send(i){this.lo(i)}mo(){this.Io()}fo(){this.Eo()}po(i){this.Ro(i)}yo(i){this.Vo(i)}}const oo="WebChannelConnection";class _Ft extends class{constructor(t){this.databaseInfo=t,this.databaseId=t.databaseId;const n=t.ssl?"https":"http",r=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.wo=n+"://"+t.host,this.So=`projects/${r}/databases/${s}`,this.bo="(default)"===this.databaseId.database?`project_id=${r}`:`project_id=${r}&database_id=${s}`}get Do(){return!1}Co(t,n,r,s,o){const l=bF(),w=this.vo(t,n.toUriEncodedString());Fe("RestConnection",`Sending RPC '${t}' ${l}:`,w,r);const C={"google-cloud-resource-prefix":this.So,"x-goog-request-params":this.bo};return this.Fo(C,s,o),this.Mo(t,w,C,r).then(M=>(Fe("RestConnection",`Received RPC '${t}' ${l}: `,M),M),M=>{throw _l("RestConnection",`RPC '${t}' ${l} failed with error: `,M,"url: ",w,"request:",r),M})}xo(t,n,r,s,o,l){return this.Co(t,n,r,s,o)}Fo(t,n,r){t["X-Goog-Api-Client"]="gl-js/ fire/"+mv,t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),n&&n.headers.forEach((s,o)=>t[o]=s),r&&r.headers.forEach((s,o)=>t[o]=s)}vo(t,n){return`${this.wo}/v1/${n}:${bFt[t]}`}terminate(){}}{constructor(i){super(i),this.forceLongPolling=i.forceLongPolling,this.autoDetectLongPolling=i.autoDetectLongPolling,this.useFetchStreams=i.useFetchStreams,this.longPollingOptions=i.longPollingOptions}Mo(i,t,n,r){const s=bF();return new Promise((o,l)=>{const w=new Lj;w.setWithCredentials(!0),w.listenOnce(Bj.COMPLETE,()=>{try{switch(w.getLastErrorCode()){case oS.NO_ERROR:const M=w.getResponseJson();Fe(oo,`XHR for RPC '${i}' ${s} received:`,JSON.stringify(M)),o(M);break;case oS.TIMEOUT:Fe(oo,`RPC '${i}' ${s} timed out`),l(new Oe(he.DEADLINE_EXCEEDED,"Request time out"));break;case oS.HTTP_ERROR:const P=w.getStatus();if(Fe(oo,`RPC '${i}' ${s} failed with status:`,P,"response text:",w.getResponseText()),P>0){let O=w.getResponseJson();Array.isArray(O)&&(O=O[0]);const L=O?.error;if(L&&L.status&&L.message){const U=function(W){const Z=W.toLowerCase().replace(/_/g,"-");return Object.values(he).indexOf(Z)>=0?Z:he.UNKNOWN}(L.status);l(new Oe(U,L.message))}else l(new Oe(he.UNKNOWN,"Server responded with status "+w.getStatus()))}else l(new Oe(he.UNAVAILABLE,"Connection failed."));break;default:gi()}}finally{Fe(oo,`RPC '${i}' ${s} completed.`)}});const C=JSON.stringify(r);Fe(oo,`RPC '${i}' ${s} sending request:`,r),w.send(t,"POST",C,n,15)})}Oo(i,t,n){const r=bF(),s=[this.wo,"/","google.firestore.v1.Firestore","/",i,"/channel"],o=zj(),l=Uj(),w={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},C=this.longPollingOptions.timeoutSeconds;void 0!==C&&(w.longPollingTimeout=Math.round(1e3*C)),this.useFetchStreams&&(w.xmlHttpFactory=new Nj({})),this.Fo(w.initMessageHeaders,t,n),w.encodeInitMessageHeaders=!0;const M=s.join("");Fe(oo,`Creating RPC '${i}' stream ${r}: ${M}`,w);const P=o.createWebChannel(M,w);let O=!1,L=!1;const U=new wFt({lo:W=>{L?Fe(oo,`Not sending because RPC '${i}' stream ${r} is closed:`,W):(O||(Fe(oo,`Opening RPC '${i}' stream ${r} transport.`),P.open(),O=!0),Fe(oo,`RPC '${i}' stream ${r} sending:`,W),P.send(W))},ho:()=>P.close()}),X=(W,Z,rt)=>{W.listen(Z,st=>{try{rt(st)}catch(vt){setTimeout(()=>{throw vt},0)}})};return X(P,qy.EventType.OPEN,()=>{L||(Fe(oo,`RPC '${i}' stream ${r} transport opened.`),U.mo())}),X(P,qy.EventType.CLOSE,()=>{L||(L=!0,Fe(oo,`RPC '${i}' stream ${r} transport closed`),U.po())}),X(P,qy.EventType.ERROR,W=>{L||(L=!0,_l(oo,`RPC '${i}' stream ${r} transport errored:`,W),U.po(new Oe(he.UNAVAILABLE,"The operation could not be completed")))}),X(P,qy.EventType.MESSAGE,W=>{var Z;if(!L){const rt=W.data[0];Ai(!!rt);const vt=rt.error||(null===(Z=rt[0])||void 0===Z?void 0:Z.error);if(vt){Fe(oo,`RPC '${i}' stream ${r} received error:`,vt);const _t=vt.status;let Mt=function(pt){const bt=$s[pt];if(void 0!==bt)return e$(bt)}(_t),ft=vt.message;void 0===Mt&&(Mt=he.INTERNAL,ft="Unknown error status: "+_t+" with message "+vt.message),L=!0,U.po(new Oe(Mt,ft)),P.close()}else Fe(oo,`RPC '${i}' stream ${r} received:`,rt),U.yo(rt)}}),X(l,Vj.STAT_EVENT,W=>{W.stat===AP.PROXY?Fe(oo,`RPC '${i}' stream ${r} detected buffering proxy`):W.stat===AP.NOPROXY&&Fe(oo,`RPC '${i}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{U.fo()},0),U}}function VS(){return typeof document<"u"?document:null}function Db(e){return new kPt(e,!0)}class wF{constructor(i,t,n=1e3,r=1.5,s=6e4){this.oi=i,this.timerId=t,this.No=n,this.Lo=r,this.Bo=s,this.ko=0,this.qo=null,this.Qo=Date.now(),this.reset()}reset(){this.ko=0}Ko(){this.ko=this.Bo}$o(i){this.cancel();const t=Math.floor(this.ko+this.Uo()),n=Math.max(0,Date.now()-this.Qo),r=Math.max(0,t-n);r>0&&Fe("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.ko} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.qo=this.oi.enqueueAfterDelay(this.timerId,r,()=>(this.Qo=Date.now(),i())),this.ko*=this.Lo,this.kothis.Bo&&(this.ko=this.Bo)}Wo(){null!==this.qo&&(this.qo.skipDelay(),this.qo=null)}cancel(){null!==this.qo&&(this.qo.cancel(),this.qo=null)}Uo(){return(Math.random()-.5)*this.ko}}class hQ{constructor(i,t,n,r,s,o,l,w){this.oi=i,this.Go=n,this.zo=r,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=l,this.listener=w,this.state=0,this.jo=0,this.Ho=null,this.Jo=null,this.stream=null,this.Yo=new wF(i,t)}Zo(){return 1===this.state||5===this.state||this.Xo()}Xo(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.e_()}stop(){var i=this;return de(function*(){i.Zo()&&(yield i.close(0))})()}t_(){this.state=0,this.Yo.reset()}n_(){this.Xo()&&null===this.Ho&&(this.Ho=this.oi.enqueueAfterDelay(this.Go,6e4,()=>this.r_()))}i_(i){this.s_(),this.stream.send(i)}r_(){var i=this;return de(function*(){if(i.Xo())return i.close(0)})()}s_(){this.Ho&&(this.Ho.cancel(),this.Ho=null)}o_(){this.Jo&&(this.Jo.cancel(),this.Jo=null)}close(i,t){var n=this;return de(function*(){n.s_(),n.o_(),n.Yo.cancel(),n.jo++,4!==i?n.Yo.reset():t&&t.code===he.RESOURCE_EXHAUSTED?(ks(t.toString()),ks("Using maximum backoff delay to prevent overloading the backend."),n.Yo.Ko()):t&&t.code===he.UNAUTHENTICATED&&3!==n.state&&(n.authCredentialsProvider.invalidateToken(),n.appCheckCredentialsProvider.invalidateToken()),null!==n.stream&&(n.__(),n.stream.close(),n.stream=null),n.state=i,yield n.listener.Ao(t)})()}__(){}auth(){this.state=1;const i=this.a_(this.jo),t=this.jo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([n,r])=>{this.jo===t&&this.u_(n,r)},n=>{i(()=>{const r=new Oe(he.UNKNOWN,"Fetching auth token failed: "+n.message);return this.c_(r)})})}u_(i,t){const n=this.a_(this.jo);this.stream=this.l_(i,t),this.stream.Po(()=>{n(()=>this.listener.Po())}),this.stream.To(()=>{n(()=>(this.state=2,this.Jo=this.oi.enqueueAfterDelay(this.zo,1e4,()=>(this.Xo()&&(this.state=3),Promise.resolve())),this.listener.To()))}),this.stream.Ao(r=>{n(()=>this.c_(r))}),this.stream.onMessage(r=>{n(()=>this.onMessage(r))})}e_(){var i=this;this.state=5,this.Yo.$o(de(function*(){i.state=0,i.start()}))}c_(i){return Fe("PersistentStream",`close with error: ${i}`),this.stream=null,this.close(4,i)}a_(i){return t=>{this.oi.enqueueAndForget(()=>this.jo===i?t():(Fe("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class TFt extends hQ{constructor(i,t,n,r,s,o){super(i,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,o),this.serializer=s}l_(i,t){return this.connection.Oo("Listen",i,t)}onMessage(i){this.Yo.reset();const t=function OPt(e,i){let t;if("targetChange"in i){const n="NO_CHANGE"===(C=i.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===C?1:"REMOVE"===C?2:"CURRENT"===C?3:"RESET"===C?4:gi(),r=i.targetChange.targetIds||[],s=function(C,M){return C.useProto3Json?(Ai(void 0===M||"string"==typeof M),fa.fromBase64String(M||"")):(Ai(void 0===M||M instanceof Buffer||M instanceof Uint8Array),fa.fromUint8Array(M||new Uint8Array))}(e,i.targetChange.resumeToken),o=i.targetChange.cause,l=o&&function(C){const M=void 0===C.code?he.UNKNOWN:e$(C.code);return new Oe(M,C.message||"")}(o);t=new a$(n,r,s,l||null)}else if("documentChange"in i){const n=i.documentChange,r=pd(e,n.document.name),s=Ps(n.document.updateTime),o=n.document.createTime?Ps(n.document.createTime):Ii.min(),l=new za({mapValue:{fields:n.document.fields}}),w=$r.newFoundDocument(r,s,o,l);t=new TS(n.targetIds||[],n.removedTargetIds||[],w.key,w)}else if("documentDelete"in i){const n=i.documentDelete,r=pd(e,n.document),s=n.readTime?Ps(n.readTime):Ii.min(),o=$r.newNoDocument(r,s);t=new TS([],n.removedTargetIds||[],o.key,o)}else if("documentRemove"in i){const n=i.documentRemove,r=pd(e,n.document);t=new TS([],n.removedTargetIds||[],r,null)}else{if(!("filter"in i))return gi();{const n=i.filter,{count:r=0,unchangedNames:s}=n,o=new EPt(r,s);t=new s$(n.targetId,o)}}var C;return t}(this.serializer,i),n=function(s){if(!("targetChange"in s))return Ii.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Ii.min():o.readTime?Ps(o.readTime):Ii.min()}(i);return this.listener.h_(t,n)}P_(i){const t={};t.database=ZP(this.serializer),t.addTarget=function(s,o){let l;const w=o.target;if(l=gS(w)?{documents:v$(s,w)}:{query:CS(s,w)._t},l.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){l.resumeToken=d$(s,o.resumeToken);const C=$P(s,o.expectedCount);null!==C&&(l.expectedCount=C)}else if(o.snapshotVersion.compareTo(Ii.min())>0){l.readTime=Mv(s,o.snapshotVersion.toTimestamp());const C=$P(s,o.expectedCount);null!==C&&(l.expectedCount=C)}return l}(this.serializer,i);const n=function NPt(e,i){const t=function(r){switch(r){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return gi()}}(i.purpose);return null==t?null:{"goog-listen-tags":t}}(0,i);n&&(t.labels=n),this.i_(t)}I_(i){const t={};t.database=ZP(this.serializer),t.removeTarget=i,this.i_(t)}}class CFt extends hQ{constructor(i,t,n,r,s,o){super(i,"write_stream_connection_backoff","write_stream_idle","health_check_timeout",t,n,r,o),this.serializer=s,this.T_=!1}get E_(){return this.T_}start(){this.T_=!1,this.lastStreamToken=void 0,super.start()}__(){this.T_&&this.d_([])}l_(i,t){return this.connection.Oo("Write",i,t)}onMessage(i){if(Ai(!!i.streamToken),this.lastStreamToken=i.streamToken,this.T_){this.Yo.reset();const t=function LPt(e,i){return e&&e.length>0?(Ai(void 0!==i),e.map(t=>function(r,s){let o=Ps(r.updateTime?r.updateTime:s);return o.isEqual(Ii.min())&&(o=Ps(s)),new TPt(o,r.transformResults||[])}(t,i))):[]}(i.writeResults,i.commitTime),n=Ps(i.commitTime);return this.listener.A_(n,t)}return Ai(!i.writeResults||0===i.writeResults.length),this.T_=!0,this.listener.R_()}V_(){const i={};i.database=ZP(this.serializer),this.i_(i)}d_(i){const t={streamToken:this.lastStreamToken,writes:i.map(n=>function bb(e,i){let t;if(i instanceof Av)t={update:p$(e,i.key,i.value)};else if(i instanceof Dv)t={delete:yb(e,i.key)};else if(i instanceof Cu)t={update:p$(e,i.key,i.data),updateMask:zPt(i.fieldMask)};else{if(!(i instanceof HP))return gi();t={verify:yb(e,i.key)}}return i.fieldTransforms.length>0&&(t.updateTransforms=i.fieldTransforms.map(n=>function(s,o){const l=o.transform;if(l instanceof Sv)return{fieldPath:o.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(l instanceof bm)return{fieldPath:o.field.canonicalString(),appendMissingElements:{values:l.elements}};if(l instanceof wm)return{fieldPath:o.field.canonicalString(),removeAllFromArray:{values:l.elements}};if(l instanceof Ev)return{fieldPath:o.field.canonicalString(),increment:l.Pe};throw gi()}(0,n))),i.precondition.isNone||(t.currentDocument=void 0!==(s=i.precondition).updateTime?{updateTime:PPt(e,s.updateTime)}:void 0!==s.exists?{exists:s.exists}:gi()),t;var s}(this.serializer,n))};this.i_(t)}}class SFt extends class{}{constructor(i,t,n,r){super(),this.authCredentials=i,this.appCheckCredentials=t,this.connection=n,this.serializer=r,this.m_=!1}f_(){if(this.m_)throw new Oe(he.FAILED_PRECONDITION,"The client has already been terminated.")}Co(i,t,n,r){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Co(i,KP(t,n),r,s,o)).catch(s=>{throw"FirebaseError"===s.name?(s.code===he.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new Oe(he.UNKNOWN,s.toString())})}xo(i,t,n,r,s){return this.f_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,l])=>this.connection.xo(i,KP(t,n),r,o,l,s)).catch(o=>{throw"FirebaseError"===o.name?(o.code===he.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new Oe(he.UNKNOWN,o.toString())})}terminate(){this.m_=!0,this.connection.terminate()}}class EFt{constructor(i,t){this.asyncQueue=i,this.onlineStateHandler=t,this.state="Unknown",this.g_=0,this.p_=null,this.y_=!0}w_(){0===this.g_&&(this.S_("Unknown"),this.p_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.p_=null,this.b_("Backend didn't respond within 10 seconds."),this.S_("Offline"),Promise.resolve())))}D_(i){"Online"===this.state?this.S_("Unknown"):(this.g_++,this.g_>=1&&(this.C_(),this.b_(`Connection failed 1 times. Most recent error: ${i.toString()}`),this.S_("Offline")))}set(i){this.C_(),this.g_=0,"Online"===i&&(this.y_=!1),this.S_(i)}S_(i){i!==this.state&&(this.state=i,this.onlineStateHandler(i))}b_(i){const t=`Could not reach Cloud Firestore backend. ${i}\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.y_?(ks(t),this.y_=!1):Fe("OnlineStateTracker",t)}C_(){null!==this.p_&&(this.p_.cancel(),this.p_=null)}}class AFt{constructor(i,t,n,r,s){var o=this;this.localStore=i,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.v_=[],this.F_=new Map,this.M_=new Set,this.x_=[],this.O_=s,this.O_.io(l=>{n.enqueueAndForget(de(function*(){var w;Jh(o)&&(Fe("RemoteStore","Restarting streams for network reachability change."),yield(w=de(function*(M){const P=ai(M);P.M_.add(4),yield Nv(P),P.N_.set("Unknown"),P.M_.delete(4),yield Mb(P)}),function C(M){return w.apply(this,arguments)})(o))}))}),this.N_=new EFt(n,r)}}function Mb(e){return _F.apply(this,arguments)}function _F(){return(_F=de(function*(e){if(Jh(e))for(const i of e.x_)yield i(!0)})).apply(this,arguments)}function Nv(e){return TF.apply(this,arguments)}function TF(){return(TF=de(function*(e){for(const i of e.x_)yield i(!1)})).apply(this,arguments)}function US(e,i){const t=ai(e);t.F_.has(i.targetId)||(t.F_.set(i.targetId,i),EF(t)?SF(t):Uv(t).Xo()&&CF(t,i))}function Bv(e,i){const t=ai(e),n=Uv(t);t.F_.delete(i),n.Xo()&&fQ(t,i),0===t.F_.size&&(n.Xo()?n.n_():Jh(t)&&t.N_.set("Unknown"))}function CF(e,i){if(e.L_.xe(i.targetId),i.resumeToken.approximateByteSize()>0||i.snapshotVersion.compareTo(Ii.min())>0){const t=e.remoteSyncer.getRemoteKeysForTarget(i.targetId).size;i=i.withExpectedCount(t)}Uv(e).P_(i)}function fQ(e,i){e.L_.xe(i),Uv(e).I_(i)}function SF(e){e.L_=new DPt({getRemoteKeysForTarget:i=>e.remoteSyncer.getRemoteKeysForTarget(i),ot:i=>e.F_.get(i)||null,tt:()=>e.datastore.serializer.databaseId}),Uv(e).start(),e.N_.w_()}function EF(e){return Jh(e)&&!Uv(e).Zo()&&e.F_.size>0}function Jh(e){return 0===ai(e).M_.size}function mQ(e){e.L_=void 0}function DFt(e){return AF.apply(this,arguments)}function AF(){return(AF=de(function*(e){e.N_.set("Online")})).apply(this,arguments)}function MFt(e){return DF.apply(this,arguments)}function DF(){return(DF=de(function*(e){e.F_.forEach((i,t)=>{CF(e,i)})})).apply(this,arguments)}function IFt(e,i){return MF.apply(this,arguments)}function MF(){return(MF=de(function*(e,i){mQ(e),EF(e)?(e.N_.D_(i),SF(e)):e.N_.set("Unknown")})).apply(this,arguments)}function RFt(e,i,t){return IF.apply(this,arguments)}function IF(){return IF=de(function*(e,i,t){if(e.N_.set("Online"),i instanceof a$&&2===i.state&&i.cause)try{yield(n=de(function*(s,o){const l=o.cause;for(const w of o.targetIds)s.F_.has(w)&&(yield s.remoteSyncer.rejectListen(w,l),s.F_.delete(w),s.L_.removeTarget(w))}),function r(s,o){return n.apply(this,arguments)})(e,i)}catch(n){Fe("RemoteStore","Failed to remove targets %s: %s ",i.targetIds.join(","),n),yield zS(e,n)}else if(i instanceof TS?e.L_.Ke(i):i instanceof s$?e.L_.He(i):e.L_.We(i),!t.isEqual(Ii.min()))try{const n=yield iQ(e.localStore);t.compareTo(n)>=0&&(yield function(s,o){const l=s.L_.rt(o);return l.targetChanges.forEach((w,C)=>{if(w.resumeToken.approximateByteSize()>0){const M=s.F_.get(C);M&&s.F_.set(C,M.withResumeToken(w.resumeToken,o))}}),l.targetMismatches.forEach((w,C)=>{const M=s.F_.get(w);if(!M)return;s.F_.set(w,M.withResumeToken(fa.EMPTY_BYTE_STRING,M.snapshotVersion)),fQ(s,w);const P=new Su(M.target,w,C,M.sequenceNumber);CF(s,P)}),s.remoteSyncer.applyRemoteEvent(l)}(e,t))}catch(n){Fe("RemoteStore","Failed to raise snapshot:",n),yield zS(e,n)}var n}),IF.apply(this,arguments)}function zS(e,i,t){return RF.apply(this,arguments)}function RF(){return(RF=de(function*(e,i,t){if(!Gh(i))throw i;e.M_.add(1),yield Nv(e),e.N_.set("Offline"),t||(t=()=>iQ(e.localStore)),e.asyncQueue.enqueueRetryable(de(function*(){Fe("RemoteStore","Retrying IndexedDB access"),yield t(),e.M_.delete(1),yield Mb(e)}))})).apply(this,arguments)}function pQ(e,i){return i().catch(t=>zS(e,t,i))}function Vv(e){return kF.apply(this,arguments)}function kF(){return(kF=de(function*(e){const i=ai(e),t=qh(i);let n=i.v_.length>0?i.v_[i.v_.length-1].batchId:-1;for(;kFt(i);)try{const r=yield gFt(i.localStore,n);if(null===r){0===i.v_.length&&t.n_();break}n=r.batchId,PFt(i,r)}catch(r){yield zS(i,r)}gQ(i)&&vQ(i)})).apply(this,arguments)}function kFt(e){return Jh(e)&&e.v_.length<10}function PFt(e,i){e.v_.push(i);const t=qh(e);t.Xo()&&t.E_&&t.d_(i.mutations)}function gQ(e){return Jh(e)&&!qh(e).Zo()&&e.v_.length>0}function vQ(e){qh(e).start()}function FFt(e){return PF.apply(this,arguments)}function PF(){return(PF=de(function*(e){qh(e).V_()})).apply(this,arguments)}function OFt(e){return FF.apply(this,arguments)}function FF(){return(FF=de(function*(e){const i=qh(e);for(const t of e.v_)i.d_(t.mutations)})).apply(this,arguments)}function LFt(e,i,t){return OF.apply(this,arguments)}function OF(){return(OF=de(function*(e,i,t){const n=e.v_.shift(),r=XP.from(n,i,t);yield pQ(e,()=>e.remoteSyncer.applySuccessfulWrite(r)),yield Vv(e)})).apply(this,arguments)}function NFt(e,i){return LF.apply(this,arguments)}function LF(){return LF=de(function*(e,i){var t;i&&qh(e).E_&&(yield(t=de(function*(r,s){if(function t$(e){switch(e){default:return gi();case he.CANCELLED:case he.UNKNOWN:case he.DEADLINE_EXCEEDED:case he.RESOURCE_EXHAUSTED:case he.INTERNAL:case he.UNAVAILABLE:case he.UNAUTHENTICATED:return!1;case he.INVALID_ARGUMENT:case he.NOT_FOUND:case he.ALREADY_EXISTS:case he.PERMISSION_DENIED:case he.FAILED_PRECONDITION:case he.ABORTED:case he.OUT_OF_RANGE:case he.UNIMPLEMENTED:case he.DATA_LOSS:return!0}}(l=s.code)&&l!==he.ABORTED){const o=r.v_.shift();qh(r).t_(),yield pQ(r,()=>r.remoteSyncer.rejectFailedWrite(o.batchId,s)),yield Vv(r)}var l}),function n(r,s){return t.apply(this,arguments)})(e,i)),gQ(e)&&vQ(e)}),LF.apply(this,arguments)}function xQ(e,i){return NF.apply(this,arguments)}function NF(){return(NF=de(function*(e,i){const t=ai(e);t.asyncQueue.verifyOperationInProgress(),Fe("RemoteStore","RemoteStore received new credentials");const n=Jh(t);t.M_.add(3),yield Nv(t),n&&t.N_.set("Unknown"),yield t.remoteSyncer.handleCredentialChange(i),t.M_.delete(3),yield Mb(t)})).apply(this,arguments)}function BF(e,i){return VF.apply(this,arguments)}function VF(){return(VF=de(function*(e,i){const t=ai(e);i?(t.M_.delete(2),yield Mb(t)):i||(t.M_.add(2),yield Nv(t),t.N_.set("Unknown"))})).apply(this,arguments)}function Uv(e){return e.B_||(e.B_=function(t,n,r){const s=ai(t);return s.f_(),new TFt(n,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(e.datastore,e.asyncQueue,{Po:DFt.bind(null,e),To:MFt.bind(null,e),Ao:IFt.bind(null,e),h_:RFt.bind(null,e)}),e.x_.push(function(){var i=de(function*(t){t?(e.B_.t_(),EF(e)?SF(e):e.N_.set("Unknown")):(yield e.B_.stop(),mQ(e))});return function(t){return i.apply(this,arguments)}}())),e.B_}function qh(e){return e.k_||(e.k_=function(t,n,r){const s=ai(t);return s.f_(),new CFt(n,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,r)}(e.datastore,e.asyncQueue,{Po:()=>Promise.resolve(),To:FFt.bind(null,e),Ao:NFt.bind(null,e),R_:OFt.bind(null,e),A_:LFt.bind(null,e)}),e.x_.push(function(){var i=de(function*(t){t?(e.k_.t_(),yield Vv(e)):(yield e.k_.stop(),e.v_.length>0&&(Fe("RemoteStore",`Stopping write stream with ${e.v_.length} pending writes`),e.v_=[]))});return function(t){return i.apply(this,arguments)}}())),e.k_}class UF{constructor(i,t,n,r,s){this.asyncQueue=i,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=s,this.deferred=new ha,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(i,t,n,r,s){const o=Date.now()+n,l=new UF(i,t,o,r,s);return l.start(n),l}start(i){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),i)}skipDelay(){return this.handleDelayElapsed()}cancel(i){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new Oe(he.CANCELLED,"Operation cancelled"+(i?": "+i:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(i=>this.deferred.resolve(i))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function zv(e,i){if(ks("AsyncQueue",`${i}: ${e}`),Gh(e))return new Oe(he.UNAVAILABLE,`${i}: ${e}`);throw e}class Gv{constructor(i){this.comparator=i?(t,n)=>i(t,n)||di.comparator(t.key,n.key):(t,n)=>di.comparator(t.key,n.key),this.keyedMap=hb(),this.sortedSet=new zr(this.comparator)}static emptySet(i){return new Gv(i.comparator)}has(i){return null!=this.keyedMap.get(i)}get(i){return this.keyedMap.get(i)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(i){const t=this.keyedMap.get(i);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(i){this.sortedSet.inorderTraversal((t,n)=>(i(t),!1))}add(i){const t=this.delete(i.key);return t.copy(t.keyedMap.insert(i.key,i),t.sortedSet.insert(i,null))}delete(i){const t=this.get(i);return t?this.copy(this.keyedMap.remove(i),this.sortedSet.remove(t)):this}isEqual(i){if(!(i instanceof Gv)||this.size!==i.size)return!1;const t=this.sortedSet.getIterator(),n=i.sortedSet.getIterator();for(;t.hasNext();){const r=t.getNext().key,s=n.getNext().key;if(!r.isEqual(s))return!1}return!0}toString(){const i=[];return this.forEach(t=>{i.push(t.toString())}),0===i.length?"DocumentSet ()":"DocumentSet (\n "+i.join(" \n")+"\n)"}copy(i,t){const n=new Gv;return n.comparator=this.comparator,n.keyedMap=i,n.sortedSet=t,n}}class yQ{constructor(){this.q_=new zr(di.comparator)}track(i){const t=i.doc.key,n=this.q_.get(t);n?0!==i.type&&3===n.type?this.q_=this.q_.insert(t,i):3===i.type&&1!==n.type?this.q_=this.q_.insert(t,{type:n.type,doc:i.doc}):2===i.type&&2===n.type?this.q_=this.q_.insert(t,{type:2,doc:i.doc}):2===i.type&&0===n.type?this.q_=this.q_.insert(t,{type:0,doc:i.doc}):1===i.type&&0===n.type?this.q_=this.q_.remove(t):1===i.type&&2===n.type?this.q_=this.q_.insert(t,{type:1,doc:n.doc}):0===i.type&&1===n.type?this.q_=this.q_.insert(t,{type:2,doc:i.doc}):gi():this.q_=this.q_.insert(t,i)}Q_(){const i=[];return this.q_.inorderTraversal((t,n)=>{i.push(n)}),i}}class Hv{constructor(i,t,n,r,s,o,l,w,C){this.query=i,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=l,this.excludesMetadataChanges=w,this.hasCachedResults=C}static fromInitialDocuments(i,t,n,r,s){const o=[];return t.forEach(l=>{o.push({type:0,doc:l})}),new Hv(i,t,Gv.emptySet(t),o,n,r,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(i){if(!(this.fromCache===i.fromCache&&this.hasCachedResults===i.hasCachedResults&&this.syncStateChanged===i.syncStateChanged&&this.mutatedKeys.isEqual(i.mutatedKeys)&&db(this.query,i.query)&&this.docs.isEqual(i.docs)&&this.oldDocs.isEqual(i.oldDocs)))return!1;const t=this.docChanges,n=i.docChanges;if(t.length!==n.length)return!1;for(let r=0;ri.G_())}}class VFt{constructor(){this.queries=new Tu(i=>FY(i),db),this.onlineState="Unknown",this.z_=new Set}}function GF(){return(GF=de(function*(e,i){const t=ai(e);let n=3;const r=i.query;let s=t.queries.get(r);s?!s.W_()&&i.G_()&&(n=2):(s=new BFt,n=i.G_()?0:1);try{switch(n){case 0:s.K_=yield t.onListen(r,!0);break;case 1:s.K_=yield t.onListen(r,!1);break;case 2:yield t.onFirstRemoteStoreListen(r)}}catch(o){const l=zv(o,`Initialization of query '${Cv(i.query)}' failed`);return void i.onError(l)}t.queries.set(r,s),s.U_.push(i),i.j_(t.onlineState),s.K_&&i.H_(s.K_)&&XF(t)})).apply(this,arguments)}function WF(){return(WF=de(function*(e,i){const t=ai(e),n=i.query;let r=3;const s=t.queries.get(n);if(s){const o=s.U_.indexOf(i);o>=0&&(s.U_.splice(o,1),0===s.U_.length?r=i.G_()?0:1:!s.W_()&&i.G_()&&(r=2))}switch(r){case 0:return t.queries.delete(n),t.onUnlisten(n,!0);case 1:return t.queries.delete(n),t.onUnlisten(n,!1);case 2:return t.onLastRemoteStoreUnlisten(n);default:return}})).apply(this,arguments)}function UFt(e,i){const t=ai(e);let n=!1;for(const r of i){const o=t.queries.get(r.query);if(o){for(const l of o.U_)l.H_(r)&&(n=!0);o.K_=r}}n&&XF(t)}function zFt(e,i,t){const n=ai(e),r=n.queries.get(i);if(r)for(const s of r.U_)s.onError(t);n.queries.delete(i)}function XF(e){e.z_.forEach(i=>{i.next()})}var jF,bQ;(bQ=jF||(jF={})).J_="default",bQ.Cache="cache";class YF{constructor(i,t,n){this.query=i,this.Y_=t,this.Z_=!1,this.X_=null,this.onlineState="Unknown",this.options=n||{}}H_(i){if(!this.options.includeMetadataChanges){const n=[];for(const r of i.docChanges)3!==r.type&&n.push(r);i=new Hv(i.query,i.docs,i.oldDocs,n,i.mutatedKeys,i.fromCache,i.syncStateChanged,!0,i.hasCachedResults)}let t=!1;return this.Z_?this.ea(i)&&(this.Y_.next(i),t=!0):this.ta(i,this.onlineState)&&(this.na(i),t=!0),this.X_=i,t}onError(i){this.Y_.error(i)}j_(i){this.onlineState=i;let t=!1;return this.X_&&!this.Z_&&this.ta(this.X_,i)&&(this.na(this.X_),t=!0),t}ta(i,t){return!i.fromCache||!this.G_()||(!this.options.ra||!("Offline"!==t))&&(!i.docs.isEmpty()||i.hasCachedResults||"Offline"===t)}ea(i){return i.docChanges.length>0||!!(i.syncStateChanged||this.X_&&this.X_.hasPendingWrites!==i.hasPendingWrites)&&!0===this.options.includeMetadataChanges}na(i){i=Hv.fromInitialDocuments(i.query,i.docs,i.mutatedKeys,i.fromCache,i.hasCachedResults),this.Z_=!0,this.Y_.next(i)}G_(){return this.options.source!==jF.Cache}}class TQ{constructor(i){this.key=i}}class CQ{constructor(i){this.key=i}}class SQ{constructor(i,t){this.query=i,this.la=t,this.ha=null,this.hasCachedResults=!1,this.current=!1,this.Pa=fn(),this.mutatedKeys=fn(),this.Ia=LY(i),this.Ta=new Gv(this.Ia)}get Ea(){return this.la}da(i,t){const n=t?t.Aa:new yQ,r=t?t.Ta:this.Ta;let s=t?t.mutatedKeys:this.mutatedKeys,o=r,l=!1;const w="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,C="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(i.inorderTraversal((M,P)=>{const O=r.get(M),L=ub(this.query,P)?P:null,U=!!O&&this.mutatedKeys.has(O.key),X=!!L&&(L.hasLocalMutations||this.mutatedKeys.has(L.key)&&L.hasCommittedMutations);let W=!1;O&&L?O.data.isEqual(L.data)?U!==X&&(n.track({type:3,doc:L}),W=!0):this.Ra(O,L)||(n.track({type:2,doc:L}),W=!0,(w&&this.Ia(L,w)>0||C&&this.Ia(L,C)<0)&&(l=!0)):!O&&L?(n.track({type:0,doc:L}),W=!0):O&&!L&&(n.track({type:1,doc:O}),W=!0,(w||C)&&(l=!0)),W&&(L?(o=o.add(L),s=X?s.add(M):s.delete(M)):(o=o.delete(M),s=s.delete(M)))}),null!==this.query.limit)for(;o.size>this.query.limit;){const M="F"===this.query.limitType?o.last():o.first();o=o.delete(M.key),s=s.delete(M.key),n.track({type:1,doc:M})}return{Ta:o,Aa:n,Xi:l,mutatedKeys:s}}Ra(i,t){return i.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(i,t,n,r){const s=this.Ta;this.Ta=i.Ta,this.mutatedKeys=i.mutatedKeys;const o=i.Aa.Q_();o.sort((M,P)=>function(L,U){const X=W=>{switch(W){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return gi()}};return X(L)-X(U)}(M.type,P.type)||this.Ia(M.doc,P.doc)),this.Va(n),r=null!=r&&r;const l=t&&!r?this.ma():[],w=0===this.Pa.size&&this.current&&!r?1:0,C=w!==this.ha;return this.ha=w,0!==o.length||C?{snapshot:new Hv(this.query,i.Ta,s,o,i.mutatedKeys,0===w,C,!1,!!n&&n.resumeToken.approximateByteSize()>0),fa:l}:{fa:l}}j_(i){return this.current&&"Offline"===i?(this.current=!1,this.applyChanges({Ta:this.Ta,Aa:new yQ,mutatedKeys:this.mutatedKeys,Xi:!1},!1)):{fa:[]}}ga(i){return!this.la.has(i)&&!!this.Ta.has(i)&&!this.Ta.get(i).hasLocalMutations}Va(i){i&&(i.addedDocuments.forEach(t=>this.la=this.la.add(t)),i.modifiedDocuments.forEach(t=>{}),i.removedDocuments.forEach(t=>this.la=this.la.delete(t)),this.current=i.current)}ma(){if(!this.current)return[];const i=this.Pa;this.Pa=fn(),this.Ta.forEach(n=>{this.ga(n.key)&&(this.Pa=this.Pa.add(n.key))});const t=[];return i.forEach(n=>{this.Pa.has(n)||t.push(new CQ(n))}),this.Pa.forEach(n=>{i.has(n)||t.push(new TQ(n))}),t}pa(i){this.la=i.hs,this.Pa=fn();const t=this.da(i.documents);return this.applyChanges(t,!0)}ya(){return Hv.fromInitialDocuments(this.query,this.Ta,this.mutatedKeys,0===this.ha,this.hasCachedResults)}}class WFt{constructor(i,t,n){this.query=i,this.targetId=t,this.view=n}}class XFt{constructor(i){this.key=i,this.wa=!1}}class jFt{constructor(i,t,n,r,s,o){this.localStore=i,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Sa={},this.ba=new Tu(l=>FY(l),db),this.Da=new Map,this.Ca=new Set,this.va=new zr(di.comparator),this.Fa=new Map,this.Ma=new aF,this.xa={},this.Oa=new Map,this.Na=Am.Ln(),this.onlineState="Unknown",this.La=void 0}get isPrimaryClient(){return!0===this.La}}function YFt(e,i){return $F.apply(this,arguments)}function $F(){return($F=de(function*(e,i,t=!0){const n=GS(e);let r;const s=n.ba.get(i);return s?(n.sharedClientState.addLocalQueryTarget(s.targetId),r=s.view.ya()):r=yield EQ(n,i,t,!0),r})).apply(this,arguments)}function $Ft(e,i){return QF.apply(this,arguments)}function QF(){return(QF=de(function*(e,i){const t=GS(e);yield EQ(t,i,!0,!1)})).apply(this,arguments)}function EQ(e,i,t,n){return KF.apply(this,arguments)}function KF(){return(KF=de(function*(e,i,t,n){const r=yield function Ov(e,i){const t=ai(e);return t.persistence.runTransaction("Allocate target","readwrite",n=>{let r;return t.Qr.getTargetData(n,i).next(s=>s?(r=s,te.resolve(r)):t.Qr.allocateTargetId(n).next(o=>(r=new Su(i,o,"TargetPurposeListen",n.currentSequenceNumber),t.Qr.addTargetData(n,r).next(()=>r))))}).then(n=>{const r=t.ns.get(n.targetId);return(null===r||n.snapshotVersion.compareTo(r.snapshotVersion)>0)&&(t.ns=t.ns.insert(n.targetId,n),t.rs.set(i,n.targetId)),n})}(e.localStore,so(i)),s=r.targetId,o=t?e.sharedClientState.addLocalQueryTarget(s):"not-current";let l;return n&&(l=yield function ZF(e,i,t,n,r){return JF.apply(this,arguments)}(e,i,s,"current"===o,r.resumeToken)),e.isPrimaryClient&&t&&US(e.remoteStore,r),l})).apply(this,arguments)}function JF(){return JF=de(function*(e,i,t,n,r){e.Ba=(P,O,L)=>{return(U=de(function*(W,Z,rt,st){let vt=Z.view.da(rt);vt.Xi&&(vt=yield OS(W.localStore,Z.query,!1).then(({documents:dt})=>Z.view.da(dt,vt)));const _t=st&&st.targetChanges.get(Z.targetId),Mt=st&&null!=st.targetMismatches.get(Z.targetId),ft=Z.view.applyChanges(vt,W.isPrimaryClient,_t,Mt);return cO(W,Z.targetId,ft.fa),ft.snapshot}),function X(W,Z,rt,st){return U.apply(this,arguments)})(e,P,O,L);var U};const s=yield OS(e.localStore,i,!0),o=new SQ(i,s.hs),l=o.da(s.documents),w=xb.createSynthesizedTargetChangeForCurrentChange(t,n&&"Offline"!==e.onlineState,r),C=o.applyChanges(l,e.isPrimaryClient,w);cO(e,t,C.fa);const M=new WFt(i,t,o);return e.ba.set(i,M),e.Da.has(t)?e.Da.get(t).push(i):e.Da.set(t,[i]),C.snapshot}),JF.apply(this,arguments)}function QFt(e,i,t){return qF.apply(this,arguments)}function qF(){return(qF=de(function*(e,i,t){const n=ai(e),r=n.ba.get(i),s=n.Da.get(r.targetId);if(s.length>1)return n.Da.set(r.targetId,s.filter(o=>!db(o,i))),void n.ba.delete(i);n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)||(yield Lv(n.localStore,r.targetId,!1).then(()=>{n.sharedClientState.clearQueryState(r.targetId),t&&Bv(n.remoteStore,r.targetId),Wv(n,r.targetId)}).catch(zh))):(Wv(n,r.targetId),yield Lv(n.localStore,r.targetId,!0))})).apply(this,arguments)}function KFt(e,i){return tO.apply(this,arguments)}function tO(){return(tO=de(function*(e,i){const t=ai(e),n=t.ba.get(i),r=t.Da.get(n.targetId);t.isPrimaryClient&&1===r.length&&(t.sharedClientState.removeLocalQueryTarget(n.targetId),Bv(t.remoteStore,n.targetId))})).apply(this,arguments)}function eO(){return(eO=de(function*(e,i,t){const n=function bO(e){const i=ai(e);return i.remoteStore.remoteSyncer.applySuccessfulWrite=qFt.bind(null,i),i.remoteStore.remoteSyncer.rejectFailedWrite=tOt.bind(null,i),i}(e);try{const r=yield function(o,l){const w=ai(o),C=ns.now(),M=l.reduce((L,U)=>L.add(U.key),fn());let P,O;return w.persistence.runTransaction("Locally write mutations","readwrite",L=>{let U=tl(),X=fn();return w.os.getEntries(L,M).next(W=>{U=W,U.forEach((Z,rt)=>{rt.isValidDocument()||(X=X.add(Z))})}).next(()=>w.localDocuments.getOverlayedDocuments(L,U)).next(W=>{P=W;const Z=[];for(const rt of l){const st=SPt(rt,P.get(rt.key).overlayedDocument);null!=st&&Z.push(new Cu(rt.key,st,xY(st.value.mapValue),ss.exists(!0)))}return w.mutationQueue.addMutationBatch(L,C,Z,l)}).next(W=>{O=W;const Z=W.applyToLocalDocumentSet(P,X);return w.documentOverlayCache.saveOverlays(L,W.batchId,Z)})}).then(()=>({batchId:O.batchId,changes:BY(P)}))}(n.localStore,i);n.sharedClientState.addPendingMutation(r.batchId),function(o,l,w){let C=o.xa[o.currentUser.toKey()];C||(C=new zr(tn)),C=C.insert(l,w),o.xa[o.currentUser.toKey()]=C}(n,r.batchId,t),yield Eu(n,r.changes),yield Vv(n.remoteStore)}catch(r){const s=zv(r,"Failed to persist write");t.reject(s)}})).apply(this,arguments)}function AQ(e,i){return iO.apply(this,arguments)}function iO(){return(iO=de(function*(e,i){const t=ai(e);try{const n=yield function pFt(e,i){const t=ai(e),n=i.snapshotVersion;let r=t.ns;return t.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=t.os.newChangeBuffer({trackRemovals:!0});r=t.ns;const l=[];i.targetChanges.forEach((M,P)=>{const O=r.get(P);if(!O)return;l.push(t.Qr.removeMatchingKeys(s,M.removedDocuments,P).next(()=>t.Qr.addMatchingKeys(s,M.addedDocuments,P)));let L=O.withSequenceNumber(s.currentSequenceNumber);var X,W,Z;null!==i.targetMismatches.get(P)?L=L.withResumeToken(fa.EMPTY_BYTE_STRING,Ii.min()).withLastLimboFreeSnapshotVersion(Ii.min()):M.resumeToken.approximateByteSize()>0&&(L=L.withResumeToken(M.resumeToken,n)),r=r.insert(P,L),W=L,Z=M,(0===(X=O).resumeToken.approximateByteSize()||W.snapshotVersion.toMicroseconds()-X.snapshotVersion.toMicroseconds()>=3e8||Z.addedDocuments.size+Z.modifiedDocuments.size+Z.removedDocuments.size>0)&&l.push(t.Qr.updateTargetData(s,L))});let w=tl(),C=fn();if(i.documentUpdates.forEach(M=>{i.resolvedLimboDocuments.has(M)&&l.push(t.persistence.referenceDelegate.updateLimboDocument(s,M))}),l.push(function nQ(e,i,t){let n=fn(),r=fn();return t.forEach(s=>n=n.add(s)),i.getEntries(e,n).next(s=>{let o=tl();return t.forEach((l,w)=>{const C=s.get(l);w.isFoundDocument()!==C.isFoundDocument()&&(r=r.add(l)),w.isNoDocument()&&w.version.isEqual(Ii.min())?(i.removeEntry(l,w.readTime),o=o.insert(l,w)):!C.isValidDocument()||w.version.compareTo(C.version)>0||0===w.version.compareTo(C.version)&&C.hasPendingWrites?(i.addEntry(w),o=o.insert(l,w)):Fe("LocalStore","Ignoring outdated watch update for ",l,". Current version:",C.version," Watch version:",w.version)}),{cs:o,ls:r}})}(s,o,i.documentUpdates).next(M=>{w=M.cs,C=M.ls})),!n.isEqual(Ii.min())){const M=t.Qr.getLastRemoteSnapshotVersion(s).next(P=>t.Qr.setTargetsMetadata(s,s.currentSequenceNumber,n));l.push(M)}return te.waitFor(l).next(()=>o.apply(s)).next(()=>t.localDocuments.getLocalViewOfDocuments(s,w,C)).next(()=>w)}).then(s=>(t.ns=r,s))}(t.localStore,i);i.targetChanges.forEach((r,s)=>{const o=t.Fa.get(s);o&&(Ai(r.addedDocuments.size+r.modifiedDocuments.size+r.removedDocuments.size<=1),r.addedDocuments.size>0?o.wa=!0:r.modifiedDocuments.size>0?Ai(o.wa):r.removedDocuments.size>0&&(Ai(o.wa),o.wa=!1))}),yield Eu(t,n,i)}catch(n){yield zh(n)}})).apply(this,arguments)}function DQ(e,i,t){const n=ai(e);if(n.isPrimaryClient&&0===t||!n.isPrimaryClient&&1===t){const r=[];n.ba.forEach((s,o)=>{const l=o.view.j_(i);l.snapshot&&r.push(l.snapshot)}),function(o,l){const w=ai(o);w.onlineState=l;let C=!1;w.queries.forEach((M,P)=>{for(const O of P.U_)O.j_(l)&&(C=!0)}),C&&XF(w)}(n.eventManager,i),r.length&&n.Sa.h_(r),n.onlineState=i,n.isPrimaryClient&&n.sharedClientState.setOnlineState(i)}}function JFt(e,i,t){return nO.apply(this,arguments)}function nO(){return(nO=de(function*(e,i,t){const n=ai(e);n.sharedClientState.updateQueryState(i,"rejected",t);const r=n.Fa.get(i),s=r&&r.key;if(s){let o=new zr(di.comparator);o=o.insert(s,$r.newNoDocument(s,Ii.min()));const l=fn().add(s),w=new vb(Ii.min(),new Map,new zr(tn),o,l);yield AQ(n,w),n.va=n.va.remove(s),n.Fa.delete(i),dO(n)}else yield Lv(n.localStore,i,!1).then(()=>Wv(n,i,t)).catch(zh)})).apply(this,arguments)}function qFt(e,i){return rO.apply(this,arguments)}function rO(){return(rO=de(function*(e,i){const t=ai(e),n=i.batch.batchId;try{const r=yield function mFt(e,i){const t=ai(e);return t.persistence.runTransaction("Acknowledge batch","readwrite-primary",n=>{const r=i.batch.keys(),s=t.os.newChangeBuffer({trackRemovals:!0});return function(l,w,C,M){const P=C.batch,O=P.keys();let L=te.resolve();return O.forEach(U=>{L=L.next(()=>M.getEntry(w,U)).next(X=>{const W=C.docVersions.get(U);Ai(null!==W),X.version.compareTo(W)<0&&(P.applyToRemoteDocument(X,C),X.isValidDocument()&&(X.setReadTime(C.commitVersion),M.addEntry(X)))})}),L.next(()=>l.mutationQueue.removeMutationBatch(w,P))}(t,n,i,s).next(()=>s.apply(n)).next(()=>t.mutationQueue.performConsistencyCheck(n)).next(()=>t.documentOverlayCache.removeOverlaysForBatchId(n,r,i.batch.batchId)).next(()=>t.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(n,function(l){let w=fn();for(let C=0;C0&&(w=w.add(l.batch.mutations[C].key));return w}(i))).next(()=>t.localDocuments.getDocuments(n,r))})}(t.localStore,i);lO(t,n,null),oO(t,n),t.sharedClientState.updateMutationState(n,"acknowledged"),yield Eu(t,r)}catch(r){yield zh(r)}})).apply(this,arguments)}function tOt(e,i,t){return sO.apply(this,arguments)}function sO(){return(sO=de(function*(e,i,t){const n=ai(e);try{const r=yield function(o,l){const w=ai(o);return w.persistence.runTransaction("Reject batch","readwrite-primary",C=>{let M;return w.mutationQueue.lookupMutationBatch(C,l).next(P=>(Ai(null!==P),M=P.keys(),w.mutationQueue.removeMutationBatch(C,P))).next(()=>w.mutationQueue.performConsistencyCheck(C)).next(()=>w.documentOverlayCache.removeOverlaysForBatchId(C,M,l)).next(()=>w.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(C,M)).next(()=>w.localDocuments.getDocuments(C,M))})}(n.localStore,i);lO(n,i,t),oO(n,i),n.sharedClientState.updateMutationState(i,"rejected",t),yield Eu(n,r)}catch(r){yield zh(r)}})).apply(this,arguments)}function oO(e,i){(e.Oa.get(i)||[]).forEach(t=>{t.resolve()}),e.Oa.delete(i)}function lO(e,i,t){const n=ai(e);let r=n.xa[n.currentUser.toKey()];if(r){const s=r.get(i);s&&(t?s.reject(t):s.resolve(),r=r.remove(i)),n.xa[n.currentUser.toKey()]=r}}function Wv(e,i,t=null){e.sharedClientState.removeLocalQueryTarget(i);for(const n of e.Da.get(i))e.ba.delete(n),t&&e.Sa.ka(n,t);e.Da.delete(i),e.isPrimaryClient&&e.Ma.Vr(i).forEach(n=>{e.Ma.containsKey(n)||MQ(e,n)})}function MQ(e,i){e.Ca.delete(i.path.canonicalString());const t=e.va.get(i);null!==t&&(Bv(e.remoteStore,t),e.va=e.va.remove(i),e.Fa.delete(t),dO(e))}function cO(e,i,t){for(const n of t)n instanceof TQ?(e.Ma.addReference(n.key,i),iOt(e,n)):n instanceof CQ?(Fe("SyncEngine","Document no longer in limbo: "+n.key),e.Ma.removeReference(n.key,i),e.Ma.containsKey(n.key)||MQ(e,n.key)):gi()}function iOt(e,i){const t=i.key,n=t.path.canonicalString();e.va.get(t)||e.Ca.has(n)||(Fe("SyncEngine","New document in limbo: "+t),e.Ca.add(n),dO(e))}function dO(e){for(;e.Ca.size>0&&e.va.size{o.push(n.Ba(w,i,t).then(C=>{var M;if((C||t)&&n.isPrimaryClient){const P=C?!C.fromCache:null===(M=t?.targetChanges.get(w.targetId))||void 0===M?void 0:M.current;n.sharedClientState.updateQueryState(w.targetId,P?"current":"not-current")}if(C){r.push(C);const P=uF.Ki(w.targetId,C);s.push(P)}}))}),yield Promise.all(o),n.Sa.h_(r),yield(l=de(function*(C,M){const P=ai(C);try{yield P.persistence.runTransaction("notifyLocalViewChanges","readwrite",O=>te.forEach(M,L=>te.forEach(L.qi,U=>P.persistence.referenceDelegate.addReference(O,L.targetId,U)).next(()=>te.forEach(L.Qi,U=>P.persistence.referenceDelegate.removeReference(O,L.targetId,U)))))}catch(O){if(!Gh(O))throw O;Fe("LocalStore","Failed to update sequence numbers: "+O)}for(const O of M){const L=O.targetId;if(!O.fromCache){const U=P.ns.get(L),W=U.withLastLimboFreeSnapshotVersion(U.snapshotVersion);P.ns=P.ns.insert(L,W)}}}),function w(C,M){return l.apply(this,arguments)})(n.localStore,s))}),uO.apply(this,arguments)}function nOt(e,i){return hO.apply(this,arguments)}function hO(){return(hO=de(function*(e,i){const t=ai(e);if(!t.currentUser.isEqual(i)){Fe("SyncEngine","User change. New user:",i.toKey());const n=yield eQ(t.localStore,i);t.currentUser=i,(s=t).Oa.forEach(l=>{l.forEach(w=>{w.reject(new Oe(he.CANCELLED,"'waitForPendingWrites' promise is rejected due to a user change."))})}),s.Oa.clear(),t.sharedClientState.handleUserChange(i,n.removedBatchIds,n.addedBatchIds),yield Eu(t,n.us)}var s})).apply(this,arguments)}function rOt(e,i){const t=ai(e),n=t.Fa.get(i);if(n&&n.wa)return fn().add(n.key);{let r=fn();const s=t.Da.get(i);if(!s)return r;for(const o of s){const l=t.ba.get(o);r=r.unionWith(l.view.Ea)}return r}}function GS(e){const i=ai(e);return i.remoteStore.remoteSyncer.applyRemoteEvent=AQ.bind(null,i),i.remoteStore.remoteSyncer.getRemoteKeysForTarget=rOt.bind(null,i),i.remoteStore.remoteSyncer.rejectListen=JFt.bind(null,i),i.Sa.h_=UFt.bind(null,i.eventManager),i.Sa.ka=zFt.bind(null,i.eventManager),i}class Xv{constructor(){this.synchronizeTabs=!1}initialize(i){var t=this;return de(function*(){t.serializer=Db(i.databaseInfo.databaseId),t.sharedClientState=t.createSharedClientState(i),t.persistence=t.createPersistence(i),yield t.persistence.start(),t.localStore=t.createLocalStore(i),t.gcScheduler=t.createGarbageCollectionScheduler(i,t.localStore),t.indexBackfillerScheduler=t.createIndexBackfillerScheduler(i,t.localStore)})()}createGarbageCollectionScheduler(i,t){return null}createIndexBackfillerScheduler(i,t){return null}createLocalStore(i){return function tQ(e,i,t,n){return new fFt(e,i,t,n)}(this.persistence,new q$,i.initialUser,this.serializer)}createPersistence(i){return new oF(kS.Hr,this.serializer)}createSharedClientState(i){return new cQ}terminate(){var i=this;return de(function*(){var t,n;null===(t=i.gcScheduler)||void 0===t||t.stop(),null===(n=i.indexBackfillerScheduler)||void 0===n||n.stop(),i.sharedClientState.shutdown(),yield i.persistence.shutdown()})()}}class jv{initialize(i,t){var n=this;return de(function*(){n.localStore||(n.localStore=i.localStore,n.sharedClientState=i.sharedClientState,n.datastore=n.createDatastore(t),n.remoteStore=n.createRemoteStore(t),n.eventManager=n.createEventManager(t),n.syncEngine=n.createSyncEngine(t,!i.synchronizeTabs),n.sharedClientState.onlineStateHandler=r=>DQ(n.syncEngine,r,1),n.remoteStore.remoteSyncer.handleCredentialChange=nOt.bind(null,n.syncEngine),yield BF(n.remoteStore,n.syncEngine.isPrimaryClient))})()}createEventManager(i){return new VFt}createDatastore(i){const t=Db(i.databaseInfo.databaseId),n=new _Ft(i.databaseInfo);return new SFt(i.authCredentials,i.appCheckCredentials,n,t)}createRemoteStore(i){return n=this.localStore,r=this.datastore,s=i.asyncQueue,o=t=>DQ(this.syncEngine,t,0),l=dQ.D()?new dQ:new yFt,new AFt(n,r,s,o,l);var n,r,s,o,l}createSyncEngine(i,t){return function(r,s,o,l,w,C,M){const P=new jFt(r,s,o,l,w,C);return M&&(P.La=!0),P}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,i.initialUser,i.maxConcurrentLimboResolutions,t)}terminate(){var i=this;return de(function*(){var t,n;yield(n=de(function*(s){const o=ai(s);Fe("RemoteStore","RemoteStore shutting down."),o.M_.add(5),yield Nv(o),o.O_.shutdown(),o.N_.set("Unknown")}),function r(s){return n.apply(this,arguments)})(i.remoteStore),null===(t=i.datastore)||void 0===t||t.terminate()})()}}class HS{constructor(i){this.observer=i,this.muted=!1}next(i){this.observer.next&&this.Ka(this.observer.next,i)}error(i){this.observer.error?this.Ka(this.observer.error,i):ks("Uncaught Error in snapshot listener:",i.toString())}$a(){this.muted=!0}Ka(i,t){this.muted||setTimeout(()=>{this.muted||i(t)},0)}}class vOt{constructor(i,t,n,r){var s=this;this.authCredentials=i,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=Ea.UNAUTHENTICATED,this.clientId=Xj.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,function(){var o=de(function*(l){Fe("FirestoreClient","Received user=",l.uid),yield s.authCredentialListener(l),s.user=l});return function(l){return o.apply(this,arguments)}}()),this.appCheckCredentials.start(n,o=>(Fe("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(i){this.authCredentialListener=i}setAppCheckTokenChangeListener(i){this.appCheckCredentialListener=i}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new Oe(he.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){var i=this;this.asyncQueue.enterRestrictedMode();const t=new ha;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(de(function*(){try{i._onlineComponents&&(yield i._onlineComponents.terminate()),i._offlineComponents&&(yield i._offlineComponents.terminate()),i.authCredentials.shutdown(),i.appCheckCredentials.shutdown(),t.resolve()}catch(n){const r=zv(n,"Failed to shutdown persistence");t.reject(r)}})),t.promise}}function WS(e,i){return _O.apply(this,arguments)}function _O(){return _O=de(function*(e,i){e.asyncQueue.verifyOperationInProgress(),Fe("FirestoreClient","Initializing OfflineComponentProvider");const t=e.configuration;yield i.initialize(t);let n=t.initialUser;e.setCredentialChangeListener(function(){var r=de(function*(s){n.isEqual(s)||(yield eQ(i.localStore,s),n=s)});return function(s){return r.apply(this,arguments)}}()),i.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=i}),_O.apply(this,arguments)}function TO(e,i){return CO.apply(this,arguments)}function CO(){return(CO=de(function*(e,i){e.asyncQueue.verifyOperationInProgress();const t=yield function SO(e){return EO.apply(this,arguments)}(e);Fe("FirestoreClient","Initializing OnlineComponentProvider"),yield i.initialize(t,e.configuration),e.setCredentialChangeListener(n=>xQ(i.remoteStore,n)),e.setAppCheckTokenChangeListener((n,r)=>xQ(i.remoteStore,r)),e._onlineComponents=i})).apply(this,arguments)}function EO(){return(EO=de(function*(e){if(!e._offlineComponents)if(e._uninitializedComponentsProvider){Fe("FirestoreClient","Using user provided OfflineComponentProvider");try{yield WS(e,e._uninitializedComponentsProvider._offline)}catch(i){const t=i;if(!function FQ(e){return"FirebaseError"===e.name?e.code===he.FAILED_PRECONDITION||e.code===he.UNIMPLEMENTED:!(typeof DOMException<"u"&&e instanceof DOMException)||22===e.code||20===e.code||11===e.code}(t))throw t;_l("Error using user provided cache. Falling back to memory cache: "+t),yield WS(e,new Xv)}}else Fe("FirestoreClient","Using default OfflineComponentProvider"),yield WS(e,new Xv);return e._offlineComponents})).apply(this,arguments)}function XS(e){return AO.apply(this,arguments)}function AO(){return(AO=de(function*(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(Fe("FirestoreClient","Using user provided OnlineComponentProvider"),yield TO(e,e._uninitializedComponentsProvider._online)):(Fe("FirestoreClient","Using default OnlineComponentProvider"),yield TO(e,new jv))),e._onlineComponents})).apply(this,arguments)}function MO(){return(MO=de(function*(e){const i=yield XS(e),t=i.eventManager;return t.onListen=YFt.bind(null,i.syncEngine),t.onUnlisten=QFt.bind(null,i.syncEngine),t.onFirstRemoteStoreListen=$Ft.bind(null,i.syncEngine),t.onLastRemoteStoreUnlisten=KFt.bind(null,i.syncEngine),t})).apply(this,arguments)}function VQ(e,i,t={}){const n=new ha;return e.asyncQueue.enqueueAndForget(de(function*(){return function(s,o,l,w,C){const M=new HS({next:O=>{o.enqueueAndForget(()=>function HF(e,i){return WF.apply(this,arguments)}(s,P)),O.fromCache&&"server"===w.source?C.reject(new Oe(he.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):C.resolve(O)},error:O=>C.reject(O)}),P=new YF(l,M,{includeMetadataChanges:!0,ra:!0});return function zF(e,i){return GF.apply(this,arguments)}(s,P)}(yield function $v(e){return MO.apply(this,arguments)}(e),e.asyncQueue,i,t,n)})),n.promise}function UQ(e){const i={};return void 0!==e.timeoutSeconds&&(i.timeoutSeconds=e.timeoutSeconds),i}const zQ=new Map;function IO(e,i,t){if(!t)throw new Oe(he.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${i}.`)}function GQ(e){if(!di.isDocumentKey(e))throw new Oe(he.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function HQ(e){if(di.isDocumentKey(e))throw new Oe(he.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function jS(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{const i=(n=e).constructor?n.constructor.name:null;return i?`a custom ${i} object`:"an object"}}var n;return"function"==typeof e?"a function":gi()}function kn(e,i){if("_delegate"in e&&(e=e._delegate),!(e instanceof i)){if(i.name===e.constructor.name)throw new Oe(he.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const t=jS(e);throw new Oe(he.INVALID_ARGUMENT,`Expected type '${i.name}', but it was: ${t}`)}}return e}class XQ{constructor(i){var t,n;if(void 0===i.host){if(void 0!==i.ssl)throw new Oe(he.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=i.host,this.ssl=null===(t=i.ssl)||void 0===t||t;if(this.credentials=i.credentials,this.ignoreUndefinedProperties=!!i.ignoreUndefinedProperties,this.localCache=i.localCache,void 0===i.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==i.cacheSizeBytes&&i.cacheSizeBytes<1048576)throw new Oe(he.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=i.cacheSizeBytes}(function MOt(e,i,t,n){if(!0===i&&!0===n)throw new Oe(he.INVALID_ARGUMENT,`${e} and ${t} cannot be used together.`)})("experimentalForceLongPolling",i.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",i.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!i.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!(this.experimentalForceLongPolling||void 0!==i.experimentalAutoDetectLongPolling&&!i.experimentalAutoDetectLongPolling),this.experimentalLongPollingOptions=UQ(null!==(n=i.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(s){if(void 0!==s.timeoutSeconds){if(isNaN(s.timeoutSeconds))throw new Oe(he.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new Oe(he.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new Oe(he.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!i.useFetchStreams}isEqual(i){return this.host===i.host&&this.ssl===i.ssl&&this.credentials===i.credentials&&this.cacheSizeBytes===i.cacheSizeBytes&&this.experimentalForceLongPolling===i.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===i.experimentalAutoDetectLongPolling&&this.experimentalLongPollingOptions.timeoutSeconds===i.experimentalLongPollingOptions.timeoutSeconds&&this.ignoreUndefinedProperties===i.ignoreUndefinedProperties&&this.useFetchStreams===i.useFetchStreams}}class Ib{constructor(i,t,n,r){this._authCredentials=i,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new XQ({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new Oe(he.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(i){if(this._settingsFrozen)throw new Oe(he.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new XQ(i),void 0!==i.credentials&&(this._authCredentials=function(n){if(!n)return new Skt;switch(n.type){case"firstParty":return new Mkt(n.sessionIndex||"0",n.iamToken||null,n.authTokenFactory||null);case"provider":return n.client;default:throw new Oe(he.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(i.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(t){const n=zQ.get(t);n&&(Fe("ComponentProvider","Removing Datastore"),zQ.delete(t),n.terminate())}(this),Promise.resolve()}}class Ga{constructor(i,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=i}withConverter(i){return new Ga(this.firestore,i,this._query)}}class Fs{constructor(i,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=i}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new gd(this.firestore,this.converter,this._key.path.popLast())}withConverter(i){return new Fs(this.firestore,i,this._key)}}class gd extends Ga{constructor(i,t,n){super(i,t,_v(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const i=this._path.popLast();return i.isEmpty()?null:new Fs(this.firestore,null,new di(i))}withConverter(i){return new gd(this.firestore,i,this._path)}}function jQ(e,i,...t){if(e=Ec(e),IO("collection","path",i),e instanceof Ib){const n=Bn.fromString(i,...t);return HQ(n),new gd(e,null,n)}{if(!(e instanceof Fs||e instanceof gd))throw new Oe(he.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(Bn.fromString(i,...t));return HQ(n),new gd(e.firestore,null,n)}}class kOt{constructor(){this.iu=Promise.resolve(),this.su=[],this.ou=!1,this._u=[],this.au=null,this.uu=!1,this.cu=!1,this.lu=[],this.Yo=new wF(this,"async_queue_retry"),this.hu=()=>{const t=VS();t&&Fe("AsyncQueue","Visibility state changed to "+t.visibilityState),this.Yo.Wo()};const i=VS();i&&"function"==typeof i.addEventListener&&i.addEventListener("visibilitychange",this.hu)}get isShuttingDown(){return this.ou}enqueueAndForget(i){this.enqueue(i)}enqueueAndForgetEvenWhileRestricted(i){this.Pu(),this.Iu(i)}enterRestrictedMode(i){if(!this.ou){this.ou=!0,this.cu=i||!1;const t=VS();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.hu)}}enqueue(i){if(this.Pu(),this.ou)return new Promise(()=>{});const t=new ha;return this.Iu(()=>this.ou&&this.cu?Promise.resolve():(i().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(i){this.enqueueAndForget(()=>(this.su.push(i),this.Tu()))}Tu(){var i=this;return de(function*(){if(0!==i.su.length){try{yield i.su[0](),i.su.shift(),i.Yo.reset()}catch(t){if(!Gh(t))throw t;Fe("AsyncQueue","Operation failed with retryable error: "+t)}i.su.length>0&&i.Yo.$o(()=>i.Tu())}})()}Iu(i){const t=this.iu.then(()=>(this.uu=!0,i().catch(n=>{throw this.au=n,this.uu=!1,ks("INTERNAL UNHANDLED ERROR: ",function(o){let l=o.message||"";return o.stack&&(l=o.stack.includes(o.message)?o.stack:o.message+"\n"+o.stack),l}(n)),n}).then(n=>(this.uu=!1,n))));return this.iu=t,t}enqueueAfterDelay(i,t,n){this.Pu(),this.lu.indexOf(i)>-1&&(t=0);const r=UF.createAndSchedule(this,i,t,n,s=>this.Eu(s));return this._u.push(r),r}Pu(){this.au&&gi()}verifyOperationInProgress(){}du(){var i=this;return de(function*(){let t;do{t=i.iu,yield t}while(t!==i.iu)})()}Au(i){for(const t of this._u)if(t.timerId===i)return!0;return!1}Ru(i){return this.du().then(()=>{this._u.sort((t,n)=>t.targetTimeMs-n.targetTimeMs);for(const t of this._u)if(t.skipDelay(),"all"!==i&&t.timerId===i)break;return this.du()})}Vu(i){this.lu.push(i)}Eu(i){const t=this._u.indexOf(i);this._u.splice(t,1)}}class Mr extends Ib{constructor(i,t,n,r){super(i,t,n,r),this.type="firestore",this._queue=new kOt,this._persistenceKey=r?.name||"[DEFAULT]"}_terminate(){return this._firestoreClient||$Q(this),this._firestoreClient.terminate()}}function FOt(e,i){const t="object"==typeof e?e:function mkt(e=rS){const i=um.get(e);if(!i&&e===rS&&dj())return Aj();if(!i)throw Yl.create("no-app",{appName:e});return i}(),n="string"==typeof e?e:i||"(default)",r=function Sj(e,i){const t=e.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),e.container.getProvider(i)}(t,"firestore").getImmediate({identifier:n});if(!r._initialized){const s=(e=>{const i=(e=>{var i,t;return null===(t=null===(i=eS())||void 0===i?void 0:i.emulatorHosts)||void 0===t?void 0:t[e]})(e);if(!i)return;const t=i.lastIndexOf(":");if(t<=0||t+1===i.length)throw new Error(`Invalid host ${i} with no separate hostname and port!`);const n=parseInt(i.substring(t+1),10);return"["===i[0]?[i.substring(1,t-1),n]:[i.substring(0,t),n]})("firestore");s&&function IOt(e,i,t,n={}){var r;const s=(e=kn(e,Ib))._getSettings(),o=`${i}:${t}`;if("firestore.googleapis.com"!==s.host&&s.host!==o&&_l("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),n.mockUserToken){let l,w;if("string"==typeof n.mockUserToken)l=n.mockUserToken,w=Ea.MOCK_USER;else{l=function nRt(e,i){if(e.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n=i||"demo-project",r=e.iat||0,s=e.sub||e.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},e);return[tS(JSON.stringify({alg:"none",type:"JWT"})),tS(JSON.stringify(o)),""].join(".")}(n.mockUserToken,null===(r=e._app)||void 0===r?void 0:r.options.projectId);const C=n.mockUserToken.sub||n.mockUserToken.user_id;if(!C)throw new Oe(he.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");w=new Ea(C)}e._authCredentials=new Ekt(new Hj(l,w))}}(r,...s)}return r}function fs(e){return e._firestoreClient||$Q(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function $Q(e){var i,t,n;const r=e._freezeSettings(),s=(w=(null===(i=e._app)||void 0===i?void 0:i.options.appId)||"",new rPt(e._databaseId,w,e._persistenceKey,(M=r).host,M.ssl,M.experimentalForceLongPolling,M.experimentalAutoDetectLongPolling,UQ(M.experimentalLongPollingOptions),M.useFetchStreams));var w,M;e._firestoreClient=new vOt(e._authCredentials,e._appCheckCredentials,e._queue,s),null!==(t=r.localCache)&&void 0!==t&&t._offlineComponentProvider&&null!==(n=r.localCache)&&void 0!==n&&n._onlineComponentProvider&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:r.localCache.kind,_offline:r.localCache._offlineComponentProvider,_online:r.localCache._onlineComponentProvider})}class Mm{constructor(i){this._byteString=i}static fromBase64String(i){try{return new Mm(fa.fromBase64String(i))}catch(t){throw new Oe(he.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+t)}}static fromUint8Array(i){return new Mm(fa.fromUint8Array(i))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(i){return this._byteString.isEqual(i._byteString)}}class Im{constructor(...i){for(let t=0;t90)throw new Oe(he.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+i);if(!isFinite(t)||t<-180||t>180)throw new Oe(he.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=i,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(i){return this._lat===i._lat&&this._long===i._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(i){return tn(this._lat,i._lat)||tn(this._long,i._long)}}const LOt=/^__.*__$/;class NOt{constructor(i,t,n){this.data=i,this.fieldMask=t,this.fieldTransforms=n}toMutation(i,t){return null!==this.fieldMask?new Cu(i,this.data,this.fieldMask,t,this.fieldTransforms):new Av(i,this.data,t,this.fieldTransforms)}}function JQ(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw gi()}}class YS{constructor(i,t,n,r,s,o){this.settings=i,this.databaseId=t,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===s&&this.mu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get fu(){return this.settings.fu}gu(i){return new YS(Object.assign(Object.assign({},this.settings),i),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}pu(i){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(i),r=this.gu({path:n,yu:!1});return r.wu(i),r}Su(i){var t;const n=null===(t=this.path)||void 0===t?void 0:t.child(i),r=this.gu({path:n,yu:!1});return r.mu(),r}bu(i){return this.gu({path:void 0,yu:!0})}Du(i){return KS(i,this.settings.methodName,this.settings.Cu||!1,this.path,this.settings.vu)}contains(i){return void 0!==this.fieldMask.find(t=>i.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>i.isPrefixOf(t.field))}mu(){if(this.path)for(let i=0;iw.covers(P.field))}else w=null,C=o.fieldTransforms;return new NOt(new za(l),w,C)}function km(e,i){if(iK(e=Ec(e)))return VO("Unsupported field value:",i,e),eK(e,i);if(e instanceof Qv)return function(n,r){if(!JQ(r.fu))throw r.Du(`${n._methodName}() can only be used with update() and set()`);if(!r.path)throw r.Du(`${n._methodName}() is not currently supported inside arrays`);const s=n._toFieldTransform(r);s&&r.fieldTransforms.push(s)}(e,i),null;if(void 0===e&&i.ignoreUndefinedProperties)return null;if(i.path&&i.fieldMask.push(i.path),e instanceof Array){if(i.settings.yu&&4!==i.fu)throw i.Du("Nested arrays are not supported");return function(n,r){const s=[];let o=0;for(const l of n){let w=km(l,r.bu(o));null==w&&(w={nullValue:"NULL_VALUE"}),s.push(w),o++}return{arrayValue:{values:s}}}(e,i)}return function(n,r){if(null===(n=Ec(n)))return{nullValue:"NULL_VALUE"};if("number"==typeof n)return GY(r.serializer,n);if("boolean"==typeof n)return{booleanValue:n};if("string"==typeof n)return{stringValue:n};if(n instanceof Date){const s=ns.fromDate(n);return{timestampValue:Mv(r.serializer,s)}}if(n instanceof ns){const s=new ns(n.seconds,1e3*Math.floor(n.nanoseconds/1e3));return{timestampValue:Mv(r.serializer,s)}}if(n instanceof kO)return{geoPointValue:{latitude:n.latitude,longitude:n.longitude}};if(n instanceof Mm)return{bytesValue:d$(r.serializer,n._byteString)};if(n instanceof Fs){const s=r.databaseId,o=n.firestore._databaseId;if(!o.isEqual(s))throw r.Du(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:QP(n.firestore._databaseId||r.databaseId,n._key.path)}}throw r.Du(`Unsupported field value: ${jS(n)}`)}(e,i)}function eK(e,i){const t={};return cY(e)?i.path&&i.path.length>0&&i.fieldMask.push(i.path):Hh(e,(n,r)=>{const s=km(r,i.pu(n));null!=s&&(t[n]=s)}),{mapValue:{fields:t}}}function iK(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof ns||e instanceof kO||e instanceof Mm||e instanceof Fs||e instanceof Qv)}function VO(e,i,t){if(!iK(t)||"object"!=typeof(r=t)||null===r||Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r)){const n=jS(t);throw i.Du("an object"===n?e+" a custom object":e+" "+n)}var r}function Pb(e,i,t){if((i=Ec(i))instanceof Im)return i._internalPath;if("string"==typeof i)return QS(e,i);throw KS("Field path arguments must be of type string or ",e,!1,void 0,t)}const VOt=new RegExp("[~\\*/\\[\\]]");function QS(e,i,t){if(i.search(VOt)>=0)throw KS(`Invalid field path (${i}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,t);try{return new Im(...i.split("."))._internalPath}catch{throw KS(`Invalid field path (${i}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,t)}}function KS(e,i,t,n,r){const s=n&&!n.isEmpty(),o=void 0!==r;let l=`Function ${i}() called with invalid data`;t&&(l+=" (via `toFirestore()`)"),l+=". ";let w="";return(s||o)&&(w+=" (found",s&&(w+=` in field ${n}`),o&&(w+=` in document ${r}`),w+=")"),new Oe(he.INVALID_ARGUMENT,l+e+w)}function nK(e,i){return e.some(t=>t.isEqual(i))}class Fb{constructor(i,t,n,r,s){this._firestore=i,this._userDataWriter=t,this._key=n,this._document=r,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new Fs(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){const i=new UOt(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(i)}return this._userDataWriter.convertValue(this._document.data.value)}}get(i){if(this._document){const t=this._document.data.field(ZS("DocumentSnapshot.get",i));if(null!==t)return this._userDataWriter.convertValue(t)}}}class UOt extends Fb{data(){return super.data()}}function ZS(e,i){return"string"==typeof i?QS(e,i):i instanceof Im?i._internalPath:i._delegate._internalPath}class UO{}class Ob extends UO{}class Lb extends Ob{constructor(i,t,n){super(),this._field=i,this._op=t,this._value=n,this.type="where"}static _create(i,t,n){return new Lb(i,t,n)}_apply(i){const t=this._parse(i);return lK(i._query,t),new Ga(i.firestore,i.converter,zP(i._query,t))}_parse(i){const t=Rm(i.firestore);return function(s,o,l,w,C,M,P){let O;if(C.isKeyField()){if("array-contains"===M||"array-contains-any"===M)throw new Oe(he.INVALID_ARGUMENT,`Invalid Query. You can't perform '${M}' queries on documentId().`);if("in"===M||"not-in"===M){oK(P,M);const L=[];for(const U of P)L.push(aK(w,s,U));O={arrayValue:{values:L}}}else O=aK(w,s,P)}else"in"!==M&&"not-in"!==M&&"array-contains-any"!==M||oK(P,M),O=function tK(e,i,t,n=!1){return km(t,e.Fu(n?4:3,i))}(l,"where",P,"in"===M||"not-in"===M);return Vn.create(C,M,O)}(i._query,0,t,i.firestore._databaseId,this._field,this._op,this._value)}}class Kv extends UO{constructor(i,t){super(),this.type=i,this._queryConstraints=t}static _create(i,t){return new Kv(i,t)}_parse(i){const t=this._queryConstraints.map(n=>n._parse(i)).filter(n=>n.getFilters().length>0);return 1===t.length?t[0]:wr.create(t,this._getOperator())}_apply(i){const t=this._parse(i);return 0===t.getFilters().length?i:(function(r,s){let o=r;const l=s.getFlattenedFilters();for(const w of l)lK(o,w),o=zP(o,w)}(i._query,t),new Ga(i.firestore,i.converter,zP(i._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class zO extends Ob{constructor(i,t){super(),this._field=i,this._direction=t,this.type="orderBy"}static _create(i,t){return new zO(i,t)}_apply(i){const t=function(r,s,o){if(null!==r.startAt)throw new Oe(he.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==r.endAt)throw new Oe(he.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new lb(s,o)}(i._query,this._field,this._direction);return new Ga(i.firestore,i.converter,function(r,s){const o=r.explicitOrderBy.concat([s]);return new _u(r.path,r.collectionGroup,o,r.filters.slice(),r.limit,r.limitType,r.startAt,r.endAt)}(i._query,t))}}class JS extends Ob{constructor(i,t,n){super(),this.type=i,this._limit=t,this._limitType=n}static _create(i,t,n){return new JS(i,t,n)}_apply(i){return new Ga(i.firestore,i.converter,xS(i._query,this._limit,this._limitType))}}function aK(e,i,t){if("string"==typeof(t=Ec(t))){if(""===t)throw new Oe(he.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!UP(i)&&-1!==t.indexOf("/"))throw new Oe(he.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${t}' contains a '/' character.`);const n=i.path.child(Bn.fromString(t));if(!di.isDocumentKey(n))throw new Oe(he.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${n}' is not because it has an odd number of segments (${n.length}).`);return xm(e,new di(n))}if(t instanceof Fs)return xm(e,t._key);throw new Oe(he.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${jS(t)}.`)}function oK(e,i){if(!Array.isArray(e)||0===e.length)throw new Oe(he.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${i.toString()}' filters.`)}function lK(e,i){const t=function(r,s){for(const o of r)for(const l of o.getFlattenedFilters())if(s.indexOf(l.op)>=0)return l.op;return null}(e.filters,function(r){switch(r){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(i.op));if(null!==t)throw new Oe(he.INVALID_ARGUMENT,t===i.op?`Invalid query. You cannot use more than one '${i.op.toString()}' filter.`:`Invalid query. You cannot use '${i.op.toString()}' filters with '${t.toString()}' filters.`)}class dK{convertValue(i,t="none"){switch(Xh(i)){case 0:return null;case 1:return i.booleanValue;case 2:return ys(i.integerValue||i.doubleValue);case 3:return this.convertTimestamp(i.timestampValue);case 4:return this.convertServerTimestamp(i,t);case 5:return i.stringValue;case 6:return this.convertBytes(wu(i.bytesValue));case 7:return this.convertReference(i.referenceValue);case 8:return this.convertGeoPoint(i.geoPointValue);case 9:return this.convertArray(i.arrayValue,t);case 10:return this.convertObject(i.mapValue,t);default:throw gi()}}convertObject(i,t){return this.convertObjectMap(i.fields,t)}convertObjectMap(i,t="none"){const n={};return Hh(i,(r,s)=>{n[r]=this.convertValue(s,t)}),n}convertGeoPoint(i){return new kO(ys(i.latitude),ys(i.longitude))}convertArray(i,t){return(i.values||[]).map(n=>this.convertValue(n,t))}convertServerTimestamp(i,t){switch(t){case"previous":const n=hS(i);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(rb(i));default:return null}}convertTimestamp(i){const t=bu(i);return new ns(t.seconds,t.nanos)}convertDocumentKey(i,t){const n=Bn.fromString(i);Ai(_$(n));const r=new vm(n.get(1),n.get(3)),s=new di(n.popFirst(5));return r.isEqual(t)||ks(`Document ${s} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),s}}class Pm{constructor(i,t){this.hasPendingWrites=i,this.fromCache=t}isEqual(i){return this.hasPendingWrites===i.hasPendingWrites&&this.fromCache===i.fromCache}}class Zv extends Fb{constructor(i,t,n,r,s,o){super(i,t,n,r,o),this._firestore=i,this._firestoreImpl=i,this.metadata=s}exists(){return super.exists()}data(i={}){if(this._document){if(this._converter){const t=new iE(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,i)}return this._userDataWriter.convertValue(this._document.data.value,i.serverTimestamps)}}get(i,t={}){if(this._document){const n=this._document.data.field(ZS("DocumentSnapshot.get",i));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class iE extends Zv{data(i={}){return super.data(i)}}class Jv{constructor(i,t,n,r){this._firestore=i,this._userDataWriter=t,this._snapshot=r,this.metadata=new Pm(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){const i=[];return this.forEach(t=>i.push(t)),i}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(i,t){this._snapshot.docs.forEach(n=>{i.call(t,new iE(this._firestore,this._userDataWriter,n.key,n,new Pm(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(i={}){const t=!!i.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new Oe(he.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(r,s){if(r._snapshot.oldDocs.isEmpty()){let o=0;return r._snapshot.docChanges.map(l=>({type:"added",doc:new iE(r._firestore,r._userDataWriter,l.doc.key,l.doc,new Pm(r._snapshot.mutatedKeys.has(l.doc.key),r._snapshot.fromCache),r.query.converter),oldIndex:-1,newIndex:o++}))}{let o=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(l=>s||3!==l.type).map(l=>{const w=new iE(r._firestore,r._userDataWriter,l.doc.key,l.doc,new Pm(r._snapshot.mutatedKeys.has(l.doc.key),r._snapshot.fromCache),r.query.converter);let C=-1,M=-1;return 0!==l.type&&(C=o.indexOf(l.doc.key),o=o.delete(l.doc.key)),1!==l.type&&(o=o.add(l.doc),M=o.indexOf(l.doc.key)),{type:jOt(l.type),doc:w,oldIndex:C,newIndex:M}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function jOt(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return gi()}}class tf extends dK{constructor(i){super(),this.firestore=i}convertBytes(i){return new Mm(i)}convertReference(i){const t=this.convertDocumentKey(i,this.firestore._databaseId);return new Fs(this.firestore,null,t)}}function $Ot(e,i){const t=kn(e.firestore,Mr),n=function ROt(e,i,...t){if(e=Ec(e),1===arguments.length&&(i=Xj.newId()),IO("doc","path",i),e instanceof Ib){const n=Bn.fromString(i,...t);return GQ(n),new Fs(e,null,new di(n))}{if(!(e instanceof Fs||e instanceof gd))throw new Oe(he.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const n=e._path.child(Bn.fromString(i,...t));return GQ(n),new Fs(e.firestore,e instanceof gd?e.converter:null,new di(n))}}(e),r=function eE(e,i,t){let n;return n=e?t&&(t.merge||t.mergeFields)?e.toFirestore(i,t):e.toFirestore(i):i,n}(e.converter,i);return function Nb(e,i){return function(n,r){const s=new ha;return n.asyncQueue.enqueueAndForget(de(function*(){return function ZFt(e,i,t){return eO.apply(this,arguments)}(yield function DO(e){return XS(e).then(i=>i.syncEngine)}(n),r,s)})),s.promise}(fs(e),i)}(t,[$S(Rm(e.firestore),"addDoc",n._key,r,null!==e.converter,{}).toMutation(n._key,ss.exists(!1))]).then(()=>n)}!function(i,t=!0){mv="10.12.3",sS(new Qy("firestore",(n,{instanceIdentifier:r,options:s})=>{const o=n.getProvider("app").getImmediate(),l=new Mr(new Akt(n.getProvider("auth-internal")),new Ikt(n.getProvider("app-check-internal")),function(C,M){if(!Object.prototype.hasOwnProperty.apply(C.options,["projectId"]))throw new Oe(he.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new vm(C.options.projectId,M)}(o,r),o);return s=Object.assign({useFetchStreams:t},s),l._setSettings(s),l},"PUBLIC").setMultipleInstances(!0)),hm(Gj,"4.6.4",i),hm(Gj,"4.6.4","esm2017")}();let mK=(()=>{class e{constructor(t){this.terminologyService=t,this.goals=[{name:"Bronze",score:100},{name:"Silver",score:200},{name:"Gold",score:300},{name:"Platinum",score:400},{name:"Diamond",score:500}],this.difficultyLevels=[{name:"Easy",rules:{maxHitPoints:5,hitpointsAwardedForGuessingfullTerm:1,freeHints:2,pointsPerGuessedLetter:1,goals:this.goals,difficultyBonus:0,endless:!1,maxRoundTime:60}},{name:"Medium",rules:{maxHitPoints:4,hitpointsAwardedForGuessingfullTerm:1,freeHints:1,pointsPerGuessedLetter:2,goals:this.goals,difficultyBonus:50,endless:!1,maxRoundTime:50}},{name:"Hard",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!1,maxRoundTime:40}},{name:"Endless",rules:{maxHitPoints:3,hitpointsAwardedForGuessingfullTerm:1,freeHints:0,pointsPerGuessedLetter:3,goals:this.goals,difficultyBonus:100,endless:!0,maxRoundTime:30}}],this.rules=this.difficultyLevels[0].rules,this.fsn="",this.scg="",this.focusConcepts=[],this.attributePairs=[],this.usedHints=new Set,this.randomLimit=4e3,this.guessResult=new De,this.termResult=new De,this.game=new Wr(this.initialize())}loadMenu(){this.clearRoundTimer(),this.game.next({...this.game.value,state:"menu"})}getDifficultyLevels(){return this.difficultyLevels}newRound(t){var n=this;return de(function*(){n.clearRoundTimer(),n.game.next({...n.game.value,state:"choosingTerm",score:t?0:n.game.value.score,hitPoints:t?n.rules.maxHitPoints:n.game.value.hitPoints,round:t?1:n.game.value.round+1,remainingTime:n.rules.maxRoundTime});const r=Math.floor(Math.random()*n.randomLimit)+1,s=yield Ca(n.terminologyService.expandValueSet("^ 816080008 |International Patient Summary| {{ C definitionStatus = defined }}","",r,1));n.randomLimit=s.expansion.total-1;const o=yield Ca(n.terminologyService.lookupConcept(s.expansion.contains[0].code));let l=n.extractFSN(o);n.fsn=l||"";let w=n.extractScg(o);n.scg=w||"";let C=n.extractFocusConcepts(w||"");n.focusConcepts=C||[];let M=n.extractAttributePairs(w||"");n.attributePairs=M||[],l?n.initializeRound(l,t):n.initializeRound("No term found"),n.usedHints.clear()})()}extractFSN(t){let n=this.extractTerm(t,"900000000000003001",this.terminologyService.getLang());return n||(n=this.extractTerm(t,"900000000000013009",this.terminologyService.getLang())),n||(n=this.extractTerm(t,"900000000000003001","en")),n}extractTerm(t,n,r){let s="";return t.parameter.forEach(o=>{if("designation"===o.name){let l=o.part.some(C=>"use"===C.name&&C.valueCoding.code===n),w=o.part.some(C=>"language"===C.name&&C.valueCode===r);l&&w&&(s=o.part.find(C=>"value"===C.name)?.valueString)}}),s}extractScg(t){let n;return t.parameter.forEach(r=>{"property"===r.name&&r.part.some(s=>"code"===s.name&&"normalForm"===s.valueString)&&(n=r.part.find(s=>"valueString"===s.name)?.valueString)}),n}extractFocusConcepts(t){const[n]=t.split(":").map(l=>l.trim()),s=n.match(/\d+\|.*?\|/g);return s?s.map(l=>this.transformSnomedConcept(l.trim())||{code:"",display:""}).filter(l=>""!==l.code):[]}extractAttributePairs(t){const n=t.split(":").slice(1).join(":").trim(),r=/(\d+\|.*?\|)\s*=\s*(\d+\|.*?\|)/g;let s;const o=[];for(;null!==(s=r.exec(n));){const l=this.transformSnomedConcept(s[1].trim()),w=this.transformSnomedConcept(s[2].trim());l&&w&&o.push({type:l,target:w})}return o}transformSnomedConcept(t){const r=t.match(/^(\d+)\|(.+?)\|$/);return r?{code:r[1],display:r[2]}:null}initialize(){return{term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"menu",score:0,round:0,rules:this.rules,difficultyLevel:"",startTimestamp:0,endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:0,remainingTime:0}}startGame(t){this.clearRoundTimer(),this.rules=this.difficultyLevels.find(n=>n.name.toLowerCase()===t.toLowerCase())?.rules,this.game.next({term:"",displayTerm:[],hitPoints:this.rules.maxHitPoints,hintsAvailable:!0,hints:[],state:"playing",score:0,round:0,rules:this.rules,difficultyLevel:t,startTimestamp:Date.now(),endTimestamp:0,difficultyBonus:0,livesBonus:0,timeBonus:0,maxRoundTime:this.rules.maxRoundTime,remainingTime:this.rules.maxRoundTime}),this.newRound(!0)}initializeRound(t,n){const r=t.match(/\(([^)]+)\)$/),s=r?r[0]:"",o=s?t.lastIndexOf(s):t.length,l=t.split("").map((w,C)=>C>=o?w:/[a-zA-Z0-9\xe1-\xfa\xf1]/.test(w)?"_":w);this.game.next({...this.game.value,term:t,displayTerm:l,hitPoints:n?this.rules.maxHitPoints:this.game.value.hitPoints,hints:[],state:"playing",score:n?0:this.game.value.score,remainingTime:this.rules.maxRoundTime}),this.startRoundTimer();for(let w=0;w{wthis.goals[this.goals.length-1].score&&!1===this.rules.endless){n.state="won",n.endTimestamp=Date.now(),n.difficultyBonus=this.rules.difficultyBonus,n.livesBonus=10*n.hitPoints;const w=Math.round((n.endTimestamp-n.startTimestamp)/1e3);n.timeBonus=Math.max(0,180-w),n.score+=n.difficultyBonus+n.livesBonus+n.timeBonus}else n.hitPoints=n.hitPoints+this.rules.hitpointsAwardedForGuessingfullTerm,n.hitPoints>this.rules.maxHitPoints&&(n.hitPoints=this.rules.maxHitPoints),setTimeout(()=>{this.newRound()},1500)}else this.guessResult.emit({letter:t,result:!1}),n.hitPoints-=1,n.hitPoints<=0&&(n.hitPoints=0,n.state="gameOver",n.endTimestamp=Date.now(),n.difficultyBonus=this.rules.difficultyBonus,n.score+=n.difficultyBonus,this.clearRoundTimer());this.game.next(n)}revealHint(t){let n={...this.game.value},r="";if(0===this.focusConcepts.length&&0===this.attributePairs.length)return n.hints.push("No more hints available."),void this.game.next(n);let s=this.focusConcepts.length>0,o=this.attributePairs.length>0;if(s&&o&&(s=Math.random()<.5),s){let l=Math.floor(Math.random()*this.focusConcepts.length);r=`One of the parents of this concept is: ${this.focusConcepts[l].display}`,this.focusConcepts.splice(l,1)}else if(o){let l=Math.floor(Math.random()*this.attributePairs.length),w=this.attributePairs[l];r=`This concept has a ${w.type.display} of ${w.target.display}`,this.attributePairs.splice(l,1)}this.usedHints.add(r),n.hints.push(r),t||(n.hitPoints-=1),n.hintsAvailable=this.focusConcepts.length>0||this.attributePairs.length>0,this.game.next(n),n.hitPoints<=0&&(n.hitPoints=0,n.state="gameOver",n.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(n))}getGameState(){return this.game.asObservable()}startRoundTimer(){this.roundTimer=setInterval(()=>{const t=this.game.value,n=t.remainingTime-1,r={...t,remainingTime:n};n<=0?(r.remainingTime=0,r.state="gameOver",r.endTimestamp=Date.now(),this.clearRoundTimer(),this.game.next(r)):this.game.next(r)},1e3)}clearRoundTimer(){this.roundTimer&&(clearInterval(this.roundTimer),this.roundTimer=null)}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(ca))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),oLt=(()=>{class e{constructor(){this.loadingProgress=new Wr(0)}preloadImages(t){const n=t.map((r,s)=>this.preloadImage(r,t.length,s));return Promise.all(n).then(()=>{this.loadingProgress.next(100)})}preloadImage(t,n,r){return new Promise((s,o)=>{const l=new Image;l.src=t,l.onload=()=>{this.loadingProgress.next((r+1)/n*100),s()},l.onerror=o})}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),pK=(()=>{class e{constructor(){this.db=FOt(),this.scoreLimit=20}addScore(t,n){var r=this;return de(function*(){try{yield $Ot(jQ(r.db,t),n)}catch(s){console.error("Error adding document: ",s)}})()}getScores(t){var n=this;return de(function*(){const s=function zOt(e,i,...t){let n=[];i instanceof UO&&n.push(i),n=n.concat(t),function(s){const o=s.filter(w=>w instanceof Kv).length,l=s.filter(w=>w instanceof Lb).length;if(o>1||o>0&&l>0)throw new Oe(he.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(n);for(const r of n)e=r._apply(e);return e}(jQ(n.db,t),function GOt(e,i="asc"){const t=i,n=ZS("orderBy",e);return zO._create(n,t)}("score","desc"),function HOt(e){return function WQ(e,i){if(i<=0)throw new Oe(he.INVALID_ARGUMENT,`Function ${e}() requires a positive number, but it was: ${i}.`)}("limit",e),JS._create("limit",e,"F")}(n.scoreLimit));return(yield function YOt(e){e=kn(e,Ga);const i=kn(e.firestore,Mr),t=fs(i),n=new tf(i);return function rK(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new Oe(he.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}(e._query),VQ(t,e._query).then(r=>new Jv(i,n,e,r))}(s)).docs.map(l=>({id:l.id,...l.data()}))})()}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function lLt(e,i){if(1&e){const t=ve();tt(0,"button",4),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).guessLetter(r))}),ut(1),et()}if(2&e){const t=i.$implicit,n=Ct(2);bi("guessed-correct","correct"===n.guessedLetters[t])("guessed-wrong","wrong"===n.guessedLetters[t]),yt("disabled",n.isLetterGuessed(t)),lt(),Ye(" ",t," ")}}function cLt(e,i){if(1&e&&(tt(0,"div",2),Gt(1,lLt,2,6,"button",3),et()),2&e){const t=i.$implicit;lt(),yt("ngForOf",t)}}let dLt=(()=>{class e{constructor(){this.keyboardLayout=[["1","2","3","4","5","6","7","8","9","0"],["Q","W","E","R","T","Y","U","I","O","P"],["A","S","D","F","G","H","J","K","L"],["Z","X","C","V","B","N","M"]],this.guessedLetters={},this.letterGuessed=new De}addGuessedLetter(t,n){this.guessedLetters[t]=n?"correct":"wrong"}guessLetter(t){this.letterGuessed.emit(t)}isLetterGuessed(t){return t in this.guessedLetters}markLetterAsGuessed(t,n){this.guessedLetters[t]=n}reset(){this.guessedLetters={}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-keyboard"]],outputs:{letterGuessed:"letterGuessed"},decls:2,vars:1,consts:[[1,"keyboard-container"],["class","keyboard-row",4,"ngFor","ngForOf"],[1,"keyboard-row"],["mat-button","",3,"guessed-correct","guessed-wrong","disabled","click",4,"ngFor","ngForOf"],["mat-button","",3,"click","disabled"]],template:function(n,r){1&n&&(tt(0,"div",0),Gt(1,cLt,2,1,"div",1),et()),2&n&&(lt(),yt("ngForOf",r.keyboardLayout))},dependencies:[gs,Sa],styles:[".keyboard-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.keyboard-row[_ngcontent-%COMP%]{display:flex;justify-content:center;margin:5px;flex-wrap:wrap}button[_ngcontent-%COMP%]{margin:2px;padding:8px 6px;border-radius:8px;border:1px solid #000;transition:background-color .3s ease;min-width:40px;flex:1}button.guessed-correct[_ngcontent-%COMP%]{background-color:green;color:#fff}button.guessed-wrong[_ngcontent-%COMP%]{background-color:red;color:#fff}@media (max-width: 768px){.keyboard-row[_ngcontent-%COMP%]{margin:1px 0}.keyboard-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:1px;padding:8px;min-width:0;width:9%;flex:1 1 auto;font-size:14px}}"]})}return e})(),uLt=(()=>{class e{constructor(){this.tooltipDismissedKey="iosSafariTooltipDismissed"}isIosSafari(){return/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&/Safari/i.test(window.navigator.userAgent)&&!/CriOS/i.test(window.navigator.userAgent)&&!/FxiOS/i.test(window.navigator.userAgent)}tooltipDismissed(){return"true"===localStorage.getItem(this.tooltipDismissedKey)}dismissTooltip(){localStorage.setItem(this.tooltipDismissedKey,"true")}isRunningStandalone(){return"standalone"in window.navigator&&window.navigator.standalone}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function hLt(e,i){if(1&e){const t=ve();tt(0,"div",1)(1,"div",2),ut(2," Install this webapp on your iPhone: tap "),tt(3,"mat-icon"),ut(4,"ios_share"),et(),ut(5," and then 'Add to Home Screen' "),et(),tt(6,"button",3),Vt("click",function(){return Ut(t),zt(Ct().dismiss())}),tt(7,"mat-icon"),ut(8,"close"),et()()()}}let fLt=(()=>{class e{constructor(t){this.platformDetectionService=t,this.isIosSafari=!1,this.tooltipDismissed=!1}ngOnInit(){this.isIosSafari=this.platformDetectionService.isIosSafari(),this.tooltipDismissed=this.platformDetectionService.tooltipDismissed()||this.platformDetectionService.isRunningStandalone()}dismiss(){this.tooltipDismissed=!0,this.platformDetectionService.dismissTooltip()}static#t=this.\u0275fac=function(n){return new(n||e)(mt(uLt))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-add-to-home"]],decls:1,vars:1,consts:[["class","custom-tooltip",4,"ngIf"],[1,"custom-tooltip"],[1,"tooltip-text"],[1,"tooltip-dismiss-button",3,"click"]],template:function(n,r){1&n&&Gt(0,hLt,9,0,"div",0),2&n&&yt("ngIf",r.isIosSafari&&!r.tooltipDismissed)},dependencies:[Ms,da],styles:['.custom-tooltip[_ngcontent-%COMP%]{position:fixed;bottom:20px;left:50%;transform:translate(-50%);background:#fff;border-radius:8px;padding:16px;box-shadow:0 4px 8px #0003;display:flex;flex-direction:row;align-items:center;max-width:320px;box-sizing:border-box;z-index:1000}.custom-tooltip[_ngcontent-%COMP%]:after{content:"";position:absolute;bottom:-20px;left:50%;transform:translate(-50%);width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid white}.tooltip-icon[_ngcontent-%COMP%]{background:#007bff;color:#fff;border-radius:50%;padding:10px;margin-right:16px}.tooltip-text[_ngcontent-%COMP%]{color:#333;font-size:16px}.tooltip-dismiss-button[_ngcontent-%COMP%]{margin-left:auto;background:transparent;border:none;cursor:pointer}.tooltip-dismiss-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#666;vertical-align:bottom}']})}return e})(),gK=(()=>{class e{transform(t,...n){if(!t)return t;const r=Math.floor(t/1e3%60),s=Math.floor(t/6e4%60),o=Math.floor(t/36e5%24),l=0===o&&s<10?s.toString():s<10?"0"+s:s;let M="";return o>0&&(M+=`${o<10?"0"+o:o}h `),(s>0||o>0)&&(M+=`${l}m `),M+=`${0===o&&0===s&&r<10?r.toString():r<10?"0"+r:r}s`,M}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"elapsedTime",type:e,pure:!0})}return e})();const mLt=["keyboard"],vK=()=>[],pLt=(e,i)=>[e,i],WO=e=>[e],xK=e=>[e,"shadow-local"],gLt=e=>[e,"trophy-large","shadow-local"];function vLt(e,i){if(1&e&&(tt(0,"div",8)(1,"div",9)(2,"div",10),ut(3," Loading... "),et(),we(4,"mat-progress-bar",11),et()()),2&e){const t=Ct(2);lt(4),yt("value",t.loadingAssetsProgress)}}function xLt(e,i){1&e&&(tt(0,"span")(1,"mat-icon"),ut(2,"favorite"),et()())}function yLt(e,i){1&e&&(tt(0,"span")(1,"mat-icon"),ut(2,"favorite_border"),et()())}function bLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=i.$implicit;lt(),Ze(t)}}function wLt(e,i){if(1&e&&(tt(0,"span",33),Gt(1,bLt,2,1,"span",18),et()),2&e){const t=i.$implicit;lt(),yt("ngForOf",t.split(""))}}function _Lt(e,i){if(1&e&&(tt(0,"div",31),Gt(1,wLt,2,1,"span",32),et()),2&e){const t=Ct(2).ngIf;lt(),yt("ngForOf",t.displayTerm.join("").split(" "))}}function TLt(e,i){1&e&&(tt(0,"div",34)(1,"div",35),ut(2," Choosing a random SNOMED CT concept using the FHIR API "),et(),we(3,"mat-progress-bar",36),et())}function CLt(e,i){if(1&e){const t=ve();tt(0,"div",37),Vt("click",function(){return Ut(t),zt(Ct(3).revealHint())}),ut(1," Reveal Hint "),et()}}function SLt(e,i){if(1&e){const t=ve();tt(0,"div",37),Vt("click",function(){return Ut(t),zt(Ct(3).loadMenu())}),ut(1," Abandon game "),et()}}function ELt(e,i){1&e&&we(0,"li",41),2&e&&yt("innerHTML",i.$implicit,Pf)}function ALt(e,i){if(1&e&&(tt(0,"div",38)(1,"div",39)(2,"h2"),ut(3,"Hints:"),et(),tt(4,"ul"),Gt(5,ELt,1,1,"li",40),et()()()),2&e){const t=Ct(2).ngIf;lt(5),yt("ngForOf",t.hints)}}function DLt(e,i){if(1&e&&(tt(0,"mat-icon",47),ut(1,"grade"),et()),2&e){const t=Ct().$implicit;Ds("left",Ct(3).calculateGoalPosition(t.score-5),"%"),yt("ngClass",vc(3,WO,t.name.toLowerCase()))}}function MLt(e,i){if(1&e&&(tt(0,"mat-icon",48),ut(1,"grade"),et()),2&e){const t=Ct().$implicit;Ds("left",Ct(3).calculateGoalPosition(t.score-1),"%"),yt("ngClass",vc(3,WO,t.name.toLowerCase()))}}function ILt(e,i){if(1&e&&(tt(0,"div",49),ut(1),et()),2&e){const t=Ct().$implicit;Ds("left",Ct(3).calculateGoalPosition(t.score),"%"),yt("ngClass",vc(4,WO,t.name.toLowerCase())),lt(),Ye("",t.name," trophy!")}}function RLt(e,i){if(1&e&&(Wi(0),we(1,"div",42),Gt(2,DLt,2,5,"mat-icon",43),tt(3,"mat-icon",44),ut(4,"emoji_events"),et(),Gt(5,MLt,2,5,"mat-icon",45)(6,ILt,2,6,"div",46),Xi()),2&e){const t=i.$implicit,n=Ct(2).ngIf,r=Ct();lt(),Ll(t.name.toLowerCase()),Ds("left",r.calculateGoalPosition(t.score),"%"),lt(),yt("ngIf",n.score>=t.score),lt(),Ds("left",r.calculateGoalPosition(t.score-3),"%"),yt("ngClass",UM(10,pLt,t.name.toLowerCase(),n.score>=t.score?"trophy-large":"")),lt(2),yt("ngIf",n.score>=t.score),lt(),yt("ngIf",n.score>=t.score)}}function kLt(e,i){if(1&e){const t=ve();tt(0,"div")(1,"div",12)(2,"div",13),we(3,"img",14),tt(4,"div",15),ut(5),et()()(),tt(6,"div",16)(7,"span",17),ut(8),et(),Gt(9,xLt,3,0,"span",18)(10,yLt,3,0,"span",18),tt(11,"span",17),ut(12),et()(),Gt(13,_Lt,2,1,"div",19)(14,TLt,4,0,"div",20),tt(15,"p",21),ut(16,"Click the keys to guess the letters of the term!"),et(),tt(17,"div")(18,"app-keyboard",22,0),Vt("letterGuessed",function(r){return Ut(t),zt(Ct(2).guessLetter(r))}),et()(),tt(20,"div",23),Gt(21,CLt,2,0,"div",24)(22,SLt,2,0,"div",25),et(),Gt(23,ALt,6,1,"div",26),tt(24,"div",27),ut(25," * Hints are generated from the definition of the SNOMED CT concept, retrieved from the FHIR API as an SCG grammar expression "),et(),tt(26,"div",28)(27,"h3"),ut(28,"Score Progression"),et(),tt(29,"div",29),we(30,"mat-progress-bar",30),Gt(31,RLt,7,13,"ng-container",18),et()()()}if(2&e){const t=Ct().ngIf,n=Ct();lt(3),yt("@popIn",void 0),lt(2),Zc(" ",t.difficultyLevel," - ",n.getLanguageName(n.selectedLanguage)," "),lt(3),Zc(" Round: ",t.round," \xa0\xa0\xa0\xa0 Score: ",t.score," \xa0\xa0\xa0\xa0 Life: "),lt(),yt("ngForOf",Ko(16,vK).constructor(t.hitPoints)),lt(),yt("ngForOf",Ko(17,vK).constructor(t.rules.maxHitPoints-t.hitPoints)),lt(2),Ye(" \xa0\xa0\xa0\xa0 Time to guess: ",t.remainingTime,""),lt(),yt("ngIf","playing"==t.state),lt(),yt("ngIf","choosingTerm"===t.state),lt(3),yt("@shake",n.shakeState),lt(4),yt("ngIf","playing"==t.state&&t.hintsAvailable&&t.hitPoints>1),lt(),yt("ngIf","playing"==t.state),lt(),yt("ngIf",t.hints.length>0&&"playing"==t.state),lt(7),yt("value",n.calculateProgress(t.score)),lt(),yt("ngForOf",n.goals)}}function PLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",52),tt(3,"p",53)(4,"b"),ut(5,"Welcome to SnoGuess!"),et()(),tt(6,"p",53),ut(7," A fun way to learn about SNOMED CT concepts and their definitions. "),et(),tt(8,"div",54),Vt("click",function(){return Ut(t),zt(Ct(2).chooseDifficultyLevel())}),ut(9," New game "),et(),tt(10,"div",54),Vt("click",function(){return Ut(t),zt(Ct(2).showInstructionsPanel())}),ut(11," Instructions "),et(),tt(12,"div",55),Vt("click",function(){return Ut(t),zt(Ct(2).openScoreboard())}),ut(13," High Scores "),et(),tt(14,"p",56),ut(15," Playing with terms in the IPS Reference Set in "),tt(16,"b"),ut(17),et(),ut(18,", change language: "),et(),tt(19,"div",57)(20,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("da"))}),ut(21,"DA"),et(),tt(22,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("de"))}),ut(23,"DE"),et(),tt(24,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("en"))}),ut(25,"EN"),et(),tt(26,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("es"))}),ut(27,"ES"),et(),tt(28,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("et"))}),ut(29,"ET"),et(),tt(30,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("fi"))}),ut(31,"FI"),et(),tt(32,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("fr"))}),ut(33,"FR"),et(),tt(34,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("nl"))}),ut(35,"NL"),et(),tt(36,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("no"))}),ut(37,"NO"),et(),tt(38,"button",58),Vt("click",function(){return Ut(t),zt(Ct(2).setLanguage("sv"))}),ut(39,"SV"),et()()()}if(2&e){const t=Ct(2);lt(2),yt("@popIn",void 0),lt(6),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(5),Ze(t.getLanguageName(t.selectedLanguage))}}function FLt(e,i){1&e&&(tt(0,"span"),ut(1,", Endless"),et())}function OLt(e,i){if(1&e){const t=ve();tt(0,"div",62)(1,"div",63),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(3).startGame(r.name))}),ut(2),et(),tt(3,"p",64),ut(4),tt(5,"mat-icon",65),ut(6,"favorite"),et(),ut(7),tt(8,"mat-icon",66),ut(9,"contact_support"),et(),ut(10),tt(11,"mat-icon",67),ut(12,"timer"),et(),Gt(13,FLt,2,0,"span",5),et()()}if(2&e){const t=i.$implicit;lt(),yt("@scrollUp",void 0),lt(),Ye(" ",t.name," "),lt(),yt("@fadeInDelayed",void 0),lt(),Ye(" Life: ",t.rules.maxHitPoints," "),lt(3),Ye(", Free hints: ",t.rules.freeHints," "),lt(3),Zc(", Points per letter: ",t.rules.pointsPerGuessedLetter,", Time to guess: ",t.rules.maxRoundTime," "),lt(3),yt("ngIf",t.rules.endless)}}function LLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",59),tt(3,"p",53)(4,"b"),ut(5,"Choose the game difficulty"),et()(),Gt(6,OLt,14,8,"div",60),tt(7,"div",61),Vt("click",function(){return Ut(t),zt(Ct(2).backToMenu())}),ut(8," Back "),et()()}if(2&e){const t=Ct(2);lt(2),yt("@popIn",void 0),lt(4),yt("ngForOf",t.difficultyLevels),lt(),yt("@scrollUp",void 0)}}function NLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",68),tt(3,"ul",69)(4,"li",70)(5,"mat-icon"),ut(6,"check"),et(),ut(7,"Click the keys on the screen to guess the letters of the term "),tt(8,"mat-icon",71),ut(9,"keyboard"),et()(),tt(10,"li",70)(11,"mat-icon"),ut(12,"check"),et(),ut(13,"You have three to five lives, depending on your difficulty level "),tt(14,"span",72)(15,"mat-icon"),ut(16,"favorite"),et(),tt(17,"mat-icon"),ut(18,"favorite"),et(),tt(19,"mat-icon"),ut(20,"favorite"),et()()(),tt(21,"li",70)(22,"mat-icon"),ut(23,"check"),et(),ut(24,"There is also a maxmimum time to guess each term "),tt(25,"mat-icon",73),ut(26,"timer"),et()(),tt(27,"li",70)(28,"mat-icon"),ut(29,"check"),et(),ut(30,"You will loose one life with each wrong guess "),tt(31,"mat-icon",72),ut(32,"favorite_border"),et()(),tt(33,"li",70)(34,"mat-icon"),ut(35,"check"),et(),ut(36,"The game ends when you run out of lives or time"),tt(37,"mat-icon",72),ut(38,"close"),et()(),tt(39,"li",70)(40,"mat-icon"),ut(41,"check"),et(),ut(42,"You earn points for each correct guess "),tt(43,"mat-icon",71),ut(44,"plus_one"),et()(),tt(45,"li",70)(46,"mat-icon"),ut(47,"check"),et(),ut(48,"In Easy mode you get 2 hints for free, and in Medium mode you get one \u{1f4a1} "),et(),tt(49,"li",70)(50,"mat-icon"),ut(51,"check"),et(),ut(52,"You can reveal more hints, but each hint it will cost one life "),tt(53,"mat-icon",72),ut(54,"favorite_border"),et()(),tt(55,"li",70)(56,"mat-icon"),ut(57,"check"),et(),ut(58,"If you guess the whole term you can recover one life"),tt(59,"mat-icon",72),ut(60,"favorite"),et()(),tt(61,"li",70)(62,"mat-icon"),ut(63,"check"),et(),ut(64,"Keep guessing terms to increase your score and earn trophies "),tt(65,"mat-icon",74),ut(66,"emoji_events"),et()(),tt(67,"li",70)(68,"mat-icon"),ut(69,"check"),et(),ut(70,"Endless mode will not finish when you reach the Diamond Trophy "),tt(71,"mat-icon",75),ut(72,"emoji_events"),et()()(),tt(73,"div",76),Vt("click",function(){return Ut(t),zt(Ct(2).hideInstructionsPanel())}),ut(74," Back "),et()()}2&e&&(lt(2),yt("@popIn",void 0),lt(71),yt("@scrollUp",void 0))}function BLt(e,i){1&e&&(tt(0,"div",77),we(1,"img",78),et()),2&e&&(lt(),yt("@popIn",void 0))}function VLt(e,i){if(1&e&&(tt(0,"div"),ut(1),et()),2&e){const t=Ct(2).ngIf,n=Ct();lt(),Ye(" Trophy: ",n.getMaxTrophyObtained(t.score)," ")}}function ULt(e,i){if(1&e&&(tt(0,"div")(1,"mat-icon",88),ut(2,"grade"),et(),ut(3," \xa0\xa0 "),tt(4,"mat-icon",88),ut(5,"emoji_events"),et(),ut(6," \xa0 "),tt(7,"mat-icon",88),ut(8,"grade"),et()()),2&e){const t=Ct(2).ngIf,n=Ct();lt(),yt("ngClass",vc(3,xK,n.getMaxTrophyObtained(t.score).toLocaleLowerCase())),lt(3),yt("ngClass",vc(5,gLt,n.getMaxTrophyObtained(t.score).toLocaleLowerCase())),lt(3),yt("ngClass",vc(7,xK,n.getMaxTrophyObtained(t.score).toLocaleLowerCase()))}}function zLt(e,i){1&e&&(tt(0,"p",89),ut(1,"Checking high scores..."),et())}function GLt(e,i){if(1&e){const t=ve();tt(0,"div",90)(1,"p",91),ut(2," This is a High Score! Save a message to the public leaderboard! "),et(),tt(3,"input",92),wa("ngModelChange",function(r){Ut(t);const s=Ct(3);return Na(s.messageForLeaderboard,r)||(s.messageForLeaderboard=r),zt(r)}),et(),tt(4,"div",93),Vt("click",function(){Ut(t);const r=Ct(2).ngIf;return zt(Ct().saveScore(r))}),ut(5," Save "),et(),tt(6,"p",94),ut(7,"No personal information is recorded"),et()()}if(2&e){const t=Ct(3);lt(3),ba("ngModel",t.messageForLeaderboard)}}function HLt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",79),tt(3,"div",80)(4,"div"),ut(5," The term was: "),et(),tt(6,"div",81),ut(7),et(),tt(8,"div",82),ut(9),et(),tt(10,"div",83),ut(11),sa(12,"elapsedTime"),et(),Gt(13,VLt,2,1,"div",5),et(),Gt(14,ULt,9,9,"div",5)(15,zLt,2,0,"p",84)(16,GLt,8,1,"div",85),tt(17,"div",86),Vt("click",function(){Ut(t);const r=Ct(2);return r.loadMenu(),zt(r.chooseDifficultyLevel())}),ut(18," New game "),et(),tt(19,"div",86),Vt("click",function(){return Ut(t),zt(Ct(2).openScoreboard())}),ut(20," High Scores "),et(),tt(21,"div",87),Vt("click",function(){return Ut(t),zt(Ct(2).loadMenu())}),ut(22," Main menu "),et()()}if(2&e){const t=Ct().ngIf,n=Ct();lt(2),yt("@popIn",void 0),lt(5),Ye(" ",t.term,""),lt(2),Zc("",t.round," ",1==t.round?"round":"rounds",""),lt(2),Ux(" Final Score: ",t.score," points - Difficulty: ",t.difficultyLevel," - Total time: ",xc(12,14,t.endTimestamp-t.startTimestamp)," "),lt(2),yt("ngIf",n.getMaxTrophyObtained(t.score)),lt(),yt("ngIf",n.getMaxTrophyObtained(t.score)),lt(),yt("ngIf",n.highScoresLoading),lt(),yt("ngIf",n.highScore),lt(),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0)}}function WLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).ngIf;lt(),Ye("\u2192 Bonus: ",t.livesBonus,"")}}function XLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).ngIf;lt(),Ye("\u2192 Bonus: ",t.difficultyBonus,"")}}function jLt(e,i){if(1&e&&(tt(0,"span"),ut(1),et()),2&e){const t=Ct(2).ngIf;lt(),Ye("\u2192 Bonus: ",t.timeBonus,"")}}function YLt(e,i){if(1&e){const t=ve();tt(0,"div",90)(1,"p",91),ut(2," This is a High Score! Save a message to the public leaderboard! "),et(),tt(3,"input",100),wa("ngModelChange",function(r){Ut(t);const s=Ct(3);return Na(s.messageForLeaderboard,r)||(s.messageForLeaderboard=r),zt(r)}),et(),tt(4,"div",101),Vt("click",function(){Ut(t);const r=Ct(2).ngIf;return zt(Ct().saveScore(r))}),ut(5," Save "),et(),tt(6,"p",94),ut(7,"No personal information is recorded"),et()()}if(2&e){const t=Ct(3);lt(3),ba("ngModel",t.messageForLeaderboard)}}function $Lt(e,i){if(1&e){const t=ve();tt(0,"div",50),we(1,"img",51)(2,"img",95),tt(3,"div",96)(4,"mat-icon",97),ut(5,"grade"),et(),tt(6,"mat-icon",97),ut(7,"emoji_events"),et(),tt(8,"mat-icon",97),ut(9,"grade"),et()(),tt(10,"div",98),ut(11),Gt(12,WLt,2,1,"span",5),et(),tt(13,"div",98),ut(14),Gt(15,XLt,2,1,"span",5),et(),tt(16,"div",98),ut(17),sa(18,"elapsedTime"),Gt(19,jLt,2,1,"span",5),et(),tt(20,"div",99),ut(21),et(),Gt(22,YLt,8,1,"div",85),tt(23,"div",86),Vt("click",function(){Ut(t);const r=Ct(2);return r.loadMenu(),zt(r.chooseDifficultyLevel())}),ut(24," New game "),et(),tt(25,"div",86),Vt("click",function(){return Ut(t),zt(Ct(2).openScoreboard())}),ut(26," High Scores "),et(),tt(27,"div",87),Vt("click",function(){return Ut(t),zt(Ct(2).loadMenu())}),ut(28," Main menu "),et()()}if(2&e){const t=Ct().ngIf,n=Ct();lt(2),yt("@popIn",void 0),lt(9),Ye("Lives left: ",t.hitPoints," "),lt(),yt("ngIf",t.livesBonus>0),lt(2),Ye("Difficulty: ",t.difficultyLevel," "),lt(),yt("ngIf",t.difficultyBonus>0),lt(2),Ye("Time: ",xc(18,12,t.endTimestamp-t.startTimestamp)," "),lt(2),yt("ngIf",t.timeBonus>0),lt(2),Ye("Final score: ",t.score,""),lt(),yt("ngIf",n.highScore),lt(),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0),lt(2),yt("@scrollUp",void 0)}}function QLt(e,i){if(1&e&&(tt(0,"div",3),Gt(1,vLt,5,1,"div",4)(2,kLt,32,18,"div",5)(3,PLt,40,5,"div",6)(4,LLt,9,3,"div",6)(5,NLt,75,2,"div",6)(6,BLt,2,1,"div",7)(7,HLt,23,16,"div",6)(8,$Lt,29,14,"div",6),et()),2&e){const t=i.ngIf,n=Ct();lt(),yt("ngIf",n.loadingAssets),lt(),yt("ngIf",("playing"==t.state||"choosingTerm"==t.state)&&!n.loadingAssets),lt(),yt("ngIf","menu"===t.state&&!n.chooseDifficulty&&!n.showInstructions&&!n.loadingAssets),lt(),yt("ngIf","menu"===t.state&&n.chooseDifficulty&&!n.showInstructions&&!n.loadingAssets),lt(),yt("ngIf",n.showInstructions),lt(),yt("ngIf",n.termGuessed),lt(),yt("ngIf","gameOver"===t.state),lt(),yt("ngIf","won"==t.state)}}let KLt=(()=>{class e{constructor(t,n,r,s,o){this.snoguessMainService=t,this.preloadService=n,this.terminologyService=r,this.firebaseService=s,this.router=o,this.shakeState="normal",this.termGuessed="",this.goals=[],this.loadingAssetsProgress=0,this.loadingAssets=!0,this.highScoresLoading=!1,this.showInstructions=!1,this.chooseDifficulty=!1,this.currentYear=new Date,this.difficultyLevels=[],this.elapsedTime=0,this.gameInProgress=!1,this.messageForLeaderboard="",this.highScore=!1}ngOnInit(){this.game=this.snoguessMainService.getGameState(),this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.game.subscribe(n=>{"playing"===n.state&&(this.goals=n.rules.goals),("gameOver"===n.state||"won"===n.state)&&(this.stopTimer(),this.highScoresLoading=!0,this.firebaseService.getScores(n.difficultyLevel).then(r=>{this.highScoresLoading=!1,(!r||r.length<20||n.score>r[r.length-1].score)&&(this.highScore=!0)}))}),this.snoguessMainService.guessResult.subscribe(n=>{!1===n.result?(this.keyboard?.addGuessedLetter(n.letter,!1),this.shakeState="shake",setTimeout(()=>this.shakeState="normal",200)):this.keyboard?.addGuessedLetter(n.letter,!0)}),this.snoguessMainService.termResult.subscribe(n=>{n&&(this.keyboard?.reset(),this.termGuessed=n,setTimeout(()=>{this.termGuessed=""},2e3))}),this.preloadService.preloadImages(["assets/img/SI_CT_w_tagline.png","assets/img/snoguess-logo.png","assets/img/congratulations.png","assets/img/correct.png","assets/img/game-over.png","assets/img/instructions.png","assets/img/difficulty.png","assets/img/scoreboard.png"]).then(()=>{setTimeout(()=>{this.loadingAssets=!1,this.loadMenu()},500)}),this.preloadService.loadingProgress.subscribe(n=>{this.loadingAssetsProgress=n}),this.terminologyService.fhirUrlParam$.subscribe(n=>{n&&this.terminologyService.getCodeSystem(n).subscribe(r=>{this.selectedEdition=r?.entry[0]?.resource?.title})}),this.terminologyService.lang$.subscribe(n=>{this.selectedLanguage=n})}loadMenu(){this.snoguessMainService.loadMenu()}backToMenu(){this.chooseDifficulty=!1}showInstructionsPanel(){this.showInstructions=!0}hideInstructionsPanel(){this.showInstructions=!1}chooseDifficultyLevel(){this.chooseDifficulty=!0}startGame(t){this.chooseDifficulty=!1,this.keyboard&&this.keyboard.reset(),this.stopTimer(),this.snoguessMainService.startGame(t),this.startTimer(),this.highScore=!1}guessLetter(t){var n=this;return de(function*(){"playing"===(yield function WIt(e,i){const t="object"==typeof i;return new Promise((n,r)=>{const s=new Ho({next:o=>{n(o),s.unsubscribe()},error:r,complete:()=>{t?n(i.defaultValue):r(new Eg)}});e.subscribe(s)})}(n.game))?.state&&n.snoguessMainService.guessLetter(t)})()}revealHint(){this.snoguessMainService.revealHint()}calculateProgress(t){return Math.min(t/this.goals[this.goals.length-1].score*100,100)}calculateGoalPosition(t){return t/this.goals[this.goals.length-1].score*100}findCurrentGoal(t){if(!t||t{t>=r.score&&(n=r.name)}),n}startTimer(){this.elapsedTime=0,this.gameInProgress=!0;const t=Iy(0,1e3).pipe(Di(n=>this.elapsedTime=n),WH(()=>this.gameInProgress));this.gameTimerSubscription=t.subscribe()}stopTimer(){this.gameInProgress=!1,this.gameTimerSubscription&&this.gameTimerSubscription.unsubscribe()}openScoreboard(t){t||(t=this.difficultyLevels[0].name),this.router.navigate(["/snoguess/scoreboard"],{queryParams:{level:t}})}saveScore(t){let n={score:t.score,numberOfRounds:t.round,difficulty:t.difficultyLevel,elapsed:t.endTimestamp-t.startTimestamp,date:ns.now(),message:this.messageForLeaderboard};this.firebaseService.addScore(t.difficultyLevel,n).then(()=>{this.messageForLeaderboard="",this.openScoreboard(t.difficultyLevel)}).catch(r=>{this.messageForLeaderboard="",console.error("Error saving score: ",r),this.loadMenu()})}getLanguageName(t){return{en:"English",es:"Spanish",fr:"French",de:"German",da:"Danish",nl:"Dutch",et:"Estonian",fi:"Finnish",no:"Norwegian",sv:"Swedish"}[t]||t}setLanguage(t){this.terminologyService.setLang(t),this.terminologyService.setFhirUrlParam({en:{lang:"en",fhirUrl:"http://snomed.info/sct/900000000000207008"},es:{lang:"es",fhirUrl:"http://snomed.info/sct/449081005"},fr:{lang:"fr",fhirUrl:"http://snomed.info/sct/11000241103"},de:{lang:"de",fhirUrl:"http://snomed.info/sct/11000274103"},da:{lang:"da",fhirUrl:"http://snomed.info/sct/554471000005108"},nl:{lang:"nl",fhirUrl:"http://snomed.info/sct/11000146104"},et:{lang:"et",fhirUrl:"http://snomed.info/sct/11000181102"},fi:{lang:"fi",fhirUrl:"http://snomed.info/sct/11000229106"},no:{lang:"no",fhirUrl:"http://snomed.info/sct/51000202101"},sv:{lang:"sv",fhirUrl:"http://snomed.info/sct/45991000052106"}}[t].fhirUrl)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(mK),mt(oLt),mt(ca),mt(pK),mt(Fo))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-snoguess-main"]],viewQuery:function(n,r){if(1&n&&Mi(mLt,5),2&n){let s;Be(s=Ve())&&(r.keyboard=s.first)}},decls:6,vars:7,consts:[["keyboard",""],["class","snoguess-game",4,"ngIf"],[1,"text-center","mt-8","mb-4"],[1,"snoguess-game"],["class","assets-loading-container",4,"ngIf"],[4,"ngIf"],["class","flex flex-col items-center gap-4",4,"ngIf"],["class","overlay overlay-transparent",4,"ngIf"],[1,"assets-loading-container"],[1,"mt-48","mb-48"],[1,"progress-bar-message","text-center"],["mode","determinate",1,"game-progress-bar",3,"value"],[1,"flex","justify-center","mt-8","mb-8"],[1,"relative","w-1/4"],["src","assets/img/snoguess-logo.png","alt","Game Logo"],[1,"diff-label","absolute","-bottom-3","right-5","italic","text-gray-500"],[1,"hit-points"],[1,"score"],[4,"ngFor","ngForOf"],["class","term-display flex flex-row flex-wrap justify-center gap-8",4,"ngIf"],["class","loading-container",4,"ngIf"],[1,"guess-message"],[3,"letterGuessed"],[1,"game-buttons","mt-4"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","bg-gradient-to-b from-blue-500 to-gray-500 hover:from-black hover:to-blue-500 border-solid border-2 border-black \n rounded-3xl pt-1 pb-1 pl-6 pr-6 w-fit text-center cursor-pointer font-bold text-white",3,"click",4,"ngIf"],["class","hints-container",4,"ngIf"],[1,"note"],[1,"score-progression-panel"],[1,"progress-bar-container"],["mode","determinate",3,"value"],[1,"term-display","flex","flex-row","flex-wrap","justify-center","gap-8"],["class","whitespace-nowrap",4,"ngFor","ngForOf"],[1,"whitespace-nowrap"],[1,"loading-container"],[1,"progress-bar-message"],["mode","indeterminate"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pt-1","pb-1","pl-6","pr-6","w-fit","text-center","cursor-pointer","font-bold","text-white",3,"click"],[1,"hints-container"],[1,"hints-callout","text-center"],["class","hint-item",3,"innerHTML",4,"ngFor","ngForOf"],[1,"hint-item",3,"innerHTML"],[1,"goal-indicator"],["class","star-icon left-star",3,"ngClass","left",4,"ngIf"],[1,"trophy-icon",3,"ngClass"],["class","star-icon right-star",3,"ngClass","left",4,"ngIf"],["class","goal-name",3,"left","ngClass",4,"ngIf"],[1,"star-icon","left-star",3,"ngClass"],[1,"star-icon","right-star",3,"ngClass"],[1,"goal-name",3,"ngClass"],[1,"flex","flex-col","items-center","gap-4"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/snoguess-logo.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,"text-center","font-light","text-lg"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","text-3xl",3,"click"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-12","text-3xl",3,"click"],[1,"text-center","font-light","italic","text-lg"],[1,"text-center","font-light","italic","text-sm"],["mat-button","",3,"click"],["src","assets/img/difficulty.png","alt","Game Logo",1,"w-1/4","mt-8"],["class","level-container w-full flex flex-col justify-center items-center",4,"ngFor","ngForOf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","mb-8","text-3xl",3,"click"],[1,"level-container","w-full","flex","flex-col","justify-center","items-center"],[1,"menu-buttons","bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-4","pr-4","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-2","text-3xl",3,"click"],[1,"level-details","text-center","mt-3","flex","flex-row","items-center"],[1,"text-red-500","text-sm"],[1,"text-yellow-500","text-sm"],[1,"text-green-500","text-sm"],["src","assets/img/instructions.png","alt","Game Logo",1,"w-1/4","mt-8","mb-12"],[1,"text-left","instructions-text"],[1,"flex","flex-row","items-center","gap-2"],[1,"text-blue-900"],[1,"text-red-500"],[1,"text-green-500"],[1,"text-yellow-500"],[1,"text-blue-500"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pl-12","pr-12","pt-4","pb-4","w-1/5","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-3xl",3,"click"],[1,"overlay","overlay-transparent"],["src","assets/img/correct.png","alt","Correct",1,"w-1/5","mt-8"],["src","assets/img/game-over.png","alt","Game Logo",1,"w-1/4","mt-8"],[1,"text-xl","text-pretty","text-center"],[1,"font-bold"],[1,"mt-12"],[1,"mt-4"],["class","text-center italic text-gray-500",4,"ngIf"],["class","flex flex-col items-center gap-4 w-full",4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","text-2xl",3,"click"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],[3,"ngClass"],[1,"text-center","italic","text-gray-500"],[1,"flex","flex-col","items-center","gap-4","w-full"],[1,"font-bold","text-lg","md:text-xl","text-blue-900"],["type","text","placeholder","Type your message here",1,"w-full","md:w-1/2","text-base","md:text-2xl","text-center","bg-blue-50","border-solid","border-2",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4","md:text-2xl",3,"click"],[1,"text-sm","text-gray-400"],["src","assets/img/congratulations.png","alt","Game Logo",1,"w-1/3","mt-8"],[1,""],[1,"large-icon","diamond","shadow-local"],[1,"text-lg"],[1,"reveal","won"],["type","text","placeholder","Your message here",1,"w-full","md:w-1/2","text-base","md:text-lg",3,"ngModelChange","ngModel"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-2","border-black","rounded-3xl","pl-4","pr-4","pt-1","pb-1","w-fit","text-center","cursor-pointer","font-bold","text-white","ml-4",3,"click"]],template:function(n,r){1&n&&(Gt(0,QLt,9,8,"div",1),sa(1,"async"),tt(2,"div",2),ut(3),sa(4,"date"),et(),we(5,"app-add-to-home")),2&n&&(yt("ngIf",xc(1,2,r.game)),lt(3),Ye(" Copyright \xa9 ",Xd(4,4,r.currentYear,"yyyy")," SNOMED International\n"))},dependencies:[bc,gs,Ms,Sa,da,dP,Hl,No,Wl,dLt,fLt,wI,gh,gK],styles:[".snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a;min-height:85vh!important}.term-display[_ngcontent-%COMP%]{font-size:24px;letter-spacing:4px;word-break:break-all;margin-bottom:20px;text-align:center;font-family:monospace}.term-display[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:0}.hit-points[_ngcontent-%COMP%]{font-weight:700;color:#d9534f;text-align:center;margin-bottom:2rem}mat-form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:10px}button[_ngcontent-%COMP%]{margin-right:8px}.guess-field[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:1000}.overlay-dark[_ngcontent-%COMP%]{background-color:#00000080}.overlay-transparent[_ngcontent-%COMP%]{background-color:#0000}.message[_ngcontent-%COMP%]{font-size:4rem;text-align:center;margin-bottom:20px;font-weight:bolder}.reveal[_ngcontent-%COMP%]{font-size:2rem;text-align:center;margin-bottom:20px;font-weight:bolder}.won[_ngcontent-%COMP%]{color:#4caf50;text-shadow:black 2px 2px 2px}.lost[_ngcontent-%COMP%]{color:#f44336;text-shadow:rgb(0,0,0) 2px 2px 2px}.overlay[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1.5rem;padding:10px 20px}.loading-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center;margin-bottom:1rem}.progress-bar-message[_ngcontent-%COMP%]{color:#000;font-size:larger;margin-bottom:10px;font-style:italic;font-weight:lighter}.score[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:700}.score-progression-panel[_ngcontent-%COMP%]{margin-top:2rem}.progress-bar-container[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:5rem;position:relative;background-color:#e0e0e0;border-radius:5px}.goal-indicator[_ngcontent-%COMP%]{position:absolute;bottom:0;width:2px;height:10px;background-color:#000}.goal-indicator.bronze[_ngcontent-%COMP%]{background-color:#cd7f32}.goal-indicator.silver[_ngcontent-%COMP%]{background-color:silver}.goal-indicator.gold[_ngcontent-%COMP%]{background-color:gold}.goal-indicator.platinum[_ngcontent-%COMP%]{background-color:#e5e4e2}.goal-indicator.diamond[_ngcontent-%COMP%]{background-color:#3b49c4}.trophy-icon[_ngcontent-%COMP%]{position:absolute;bottom:-35px;font-size:24px;width:24px;transition:transform .3s ease}.trophy-large[_ngcontent-%COMP%]{transform:scale(2.5) translate(-2px,3px)}.bronze[_ngcontent-%COMP%]{color:#cd7f32}.silver[_ngcontent-%COMP%]{color:silver}.gold[_ngcontent-%COMP%]{color:gold}.platinum[_ngcontent-%COMP%]{color:#e5e4e2}.diamond[_ngcontent-%COMP%]{color:#3b49c4}.shadow-local[_ngcontent-%COMP%]{text-shadow:black 2px 2px 2px}.star-icon[_ngcontent-%COMP%]{position:absolute;bottom:-40px;font-size:30px;width:30px;transition:transform .3s ease}.left-star[_ngcontent-%COMP%]{transform:translate(-50px)}.right-star[_ngcontent-%COMP%]{transform:translate(30px)}.goal-name[_ngcontent-%COMP%]{position:absolute;bottom:-75px;width:100px;margin-left:-50px;text-align:center;font-size:12px;font-weight:700;color:#000}.large-icon[_ngcontent-%COMP%]{font-size:5rem;width:5rem;height:5rem}.note[_ngcontent-%COMP%]{font-size:.8rem;font-weight:lighter;margin-top:1rem;text-align:center}.hints-container[_ngcontent-%COMP%]{margin-top:1rem}.hints-callout[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:.5rem}.hint-item[_ngcontent-%COMP%]{color:#555;font-size:1em;list-style-type:none;position:relative;padding:5px 0 5px 30px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}li[_ngcontent-%COMP%]{margin-bottom:10px;color:#666;font-size:1.2rem}.guess-message[_ngcontent-%COMP%]{text-align:center;margin-top:1rem;font-size:1.2rem}.assests-loading-container[_ngcontent-%COMP%]{text-align:center;font-size:20px;color:#fff}.game-progress-bar[_ngcontent-%COMP%]{border-radius:22px;overflow:hidden;background-color:#e0e0e0;box-shadow:0 4px 8px #0003}.game-progress-bar[_ngcontent-%COMP%] .mat-progress-bar-fill[_ngcontent-%COMP%]:after{background-color:#4caf50;border-radius:22px}.game-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;vertical-align:middle;justify-content:center;gap:10px}.level-details[_ngcontent-%COMP%]{visibility:hidden}.level-container[_ngcontent-%COMP%]:hover .level-details[_ngcontent-%COMP%]{visibility:visible}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}"],data:{animation:[mr("shake",[on("normal => shake",sn(200,Kg([qe({transform:"translateX(0)"}),qe({transform:"translateX(-10px)"}),qe({transform:"translateX(10px)"}),qe({transform:"translateX(0)"})])))]),mr("popIn",[on(":enter",[qe({transform:"scale(0.8)",opacity:0}),sn("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",qe({transform:"scale(1.3)",opacity:1})),sn("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",qe({transform:"scale(1)",opacity:1}))])]),mr("scrollUp",[on(":enter",[qe({transform:"translateY(100%)",opacity:0}),sn("0.5s ease-out",qe({transform:"translateY(0)",opacity:1}))])]),mr("fadeInDelayed",[on(":enter",[qe({opacity:0}),sn("1s 0.5s ease-out",qe({opacity:1}))])])]}})}return e})();const ZLt=()=>({});function JLt(e,i){if(1&e){const t=ve();tt(0,"li")(1,"a",11),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().findingWithExplicitContextSelected(r))}),ut(2),et()()}if(2&e){const t=i.$implicit;lt(2),Ze(t.display)}}function qLt(e,i){1&e&&(tt(0,"th",20),ut(1," Type "),et())}function tNt(e,i){if(1&e&&(tt(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.type.display," ")}}function eNt(e,i){1&e&&(tt(0,"th",20),ut(1," Target "),et())}function iNt(e,i){if(1&e&&(tt(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.target.code," ")}}function nNt(e,i){1&e&&(tt(0,"th",20),ut(1," Target "),et())}function rNt(e,i){if(1&e&&(tt(0,"td",21),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.target.display," ")}}function sNt(e,i){1&e&&we(0,"tr",22)}function aNt(e,i){1&e&&we(0,"tr",23)}function oNt(e,i){if(1&e&&(tt(0,"div",4)(1,"h3"),ut(2),et(),tt(3,"table",12),Wi(4,13),Gt(5,qLt,2,0,"th",14)(6,tNt,2,1,"td",15),Xi(),Wi(7,16),Gt(8,eNt,2,0,"th",14)(9,iNt,2,1,"td",15),Xi(),Wi(10,17),Gt(11,nNt,2,0,"th",14)(12,rNt,2,1,"td",15),Xi(),Gt(13,sNt,1,0,"tr",18)(14,aNt,1,0,"tr",19),et()()),2&e){const t=Ct();lt(2),Ye("Relevant attributes (",t.selectedSituation.display,")"),lt(),yt("dataSource",t.dataSource),lt(10),yt("matHeaderRowDef",t.displayedColumns),lt(),yt("matRowDefColumns",t.displayedColumns)}}function lNt(e,i){if(1&e&&(tt(0,"div",4)(1,"h3"),ut(2,"Resource Type"),et(),tt(3,"a",24)(4,"span"),ut(5),et(),tt(6,"mat-icon"),ut(7,"open_in_new"),et()()()),2&e){const t=Ct();lt(3),yt("href","https://hl7.org/fhir/R4/"+t.resourceType+".html",lx),lt(2),Ye("FHIR R4 ",t.resourceType,"")}}function cNt(e,i){if(1&e){const t=ve();tt(0,"div",25)(1,"button",26),Vt("click",function(){Ut(t);const r=Ct();return zt(r.saveOutput(r.fhirRepresentationString))}),we(2,"mat-icon",27),et(),tt(3,"button",28),Vt("click",function(){Ut(t);const r=Ct();return zt(r.copyOutputToClipboard(r.fhirRepresentationString))}),we(4,"mat-icon",29),et()()}}let dNt=(()=>{class e{constructor(t,n){this.terminologyService=t,this.clipboard=n,this.fhirRepresentationString="{}",this.situationsBinding={title:"Finding with explicit context",type:"Autocomplete",ecl:"<< 413350009 |Finding with explicit context (situation)|",value:"",note:"Select a finding with explicit context"},this.SituationConstants={KnownPresent:{code:"410515003",display:"Known present",selfAndDescendants:[]},KnownAbsent:{code:"410516002",display:"Known absent",selfAndDescendants:[]},SubjectOfRecord:{code:"410604004",display:"Subject of record",selfAndDescendants:[]},PersonInTheFamily:{code:"303071001",display:"Person in the family",selfAndDescendants:[]},InThePast:{code:"410513005",display:"In the past",selfAndDescendants:[]},CurrentOrSpecifiedTime:{code:"410512000",display:"Current or specified time",selfAndDescendants:[]},KnownPossible:{code:"410590009",display:"Known possible",selfAndDescendants:[]}},this.examples=[{code:"160377001",display:"Family history of asthma"},{code:"12147341000119108",display:"History of burn"},{code:"428942009",display:"History of fall"},{code:"300890009",display:"Swelling absent"},{code:"162057007",display:"Nausea present"},{code:"401204006",display:"Suspected autism"}],this.displayedColumns=["type","targetCode","targetDisplay"],this.dataSource=[]}ngOnInit(){this.loadOrUpdateConstants()}loadOrUpdateConstants(){var t=this;return de(function*(){let n=localStorage.getItem("SituationConstants");n?(t.SituationConstants=JSON.parse(n),console.log("Loaded constants from cache.")):(yield t.updateConstantDescendants(),localStorage.setItem("SituationConstants",JSON.stringify(t.SituationConstants)),console.log("Updated constants and cached them."))})()}updateConstantDescendants(){var t=this;return de(function*(){for(const n in t.SituationConstants)if(Object.prototype.hasOwnProperty.call(t.SituationConstants,n)){const r=t.SituationConstants[n];let s=yield Ca(t.terminologyService.expandValueSet("<< "+r.code,"",0,1e3));r.selfAndDescendants=s.expansion.contains.map(o=>o.code)}})()}convertSituationToFhir(t){var n=this;return de(function*(){n.selectedSituation=t,n.fhirRepresentation=null,n.fhirRepresentationString="Loading...",n.dataSource=[],n.resourceType=void 0;let l,w,C,M,r=yield Ca(n.terminologyService.lookupConcept(t.code)),s=n.terminologyService.getNormalForm(r);if(n.terminologyService.parseNormmalForm(s).groups.forEach(P=>{const O=P.find(W=>"408732007"===W.type.code);O&&(n.dataSource=[...n.dataSource,O],w=O.target);const L=P.find(W=>"408729009"===W.type.code);L&&(n.dataSource=[...n.dataSource,L],l=L.target);const U=P.find(W=>"408731000"===W.type.code);U&&(n.dataSource=[...n.dataSource,U],C=U.target);const X=P.find(W=>"246090004"===W.type.code);X&&(n.dataSource=[...n.dataSource,X],M=X.target)}),M){const P=n.SituationConstants.KnownPresent.selfAndDescendants.includes(l?.code),O=n.SituationConstants.SubjectOfRecord.selfAndDescendants.includes(w?.code),L=n.SituationConstants.InThePast.selfAndDescendants.includes(C?.code),U=n.SituationConstants.KnownAbsent.selfAndDescendants.includes(l?.code),X=n.SituationConstants.KnownPossible.selfAndDescendants.includes(l?.code),W=n.SituationConstants.CurrentOrSpecifiedTime.selfAndDescendants.includes(C?.code),Z=n.SituationConstants.PersonInTheFamily.selfAndDescendants.includes(w?.code);P&&O&&L?n.updateFhirRepresentation(n.createFhirCondition(M,"inactive")):P&&O&&W?n.updateFhirRepresentation(n.createFhirCondition(M,"active")):X&&O&&W?n.updateFhirRepresentation(n.createFhirCondition(M,"unconfirmed")):P&&Z?n.updateFhirRepresentation(n.createFamilyMemberHistoryForFinding(M,w)):U&&O&&W?n.updateFhirRepresentation(n.createFhirObservationForAbsentFinding(M)):n.fhirRepresentationString="No FHIR representation for this situation"}else n.fhirRepresentationString="No FHIR representation for this situation"})()}updateFhirRepresentation(t){this.fhirRepresentation=t,this.fhirRepresentationString=JSON.stringify(t,null,2)}findingWithExplicitContextSelected(t){t&&t.code&&this.convertSituationToFhir(t)}createFhirCondition(t,n){return this.resourceType="Condition",{resourceType:"Condition",subject:{reference:"Patient/1234"},clinicalStatus:{coding:[{system:"http://terminology.hl7.org/CodeSystem/condition-clinical",code:n}]},code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]}}}createFhirObservationForAbsentFinding(t){return this.resourceType="Observation",{resourceType:"Observation",subject:{reference:"Patient/1234"},status:"registered",code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]},valueCodeableConcept:{coding:[{system:"http://snomed.info/sct",code:"410516002",display:"Known absent"}]}}}createFamilyMemberHistoryForFinding(t,n){return this.resourceType="FamilyMemberHistory",{resourceType:"FamilyMemberHistory",status:"completed",patient:{reference:"Patient/1234"},relationship:{coding:[{system:"http://snomed.info/sct",code:n.code,display:n.display}]},condition:[{code:{coding:[{system:"http://snomed.info/sct",code:t.code,display:t.display}]}}]}}saveOutput(t){var n=new Blob([t],{type:"text/plain;charset=utf-8"});(0,dd.saveAs)(n,`${this.selectedSituation.display}-fhir.json`)}copyOutputToClipboard(t){this.clipboard.copy(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca),mt(zk))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-situation-map"]],decls:17,vars:9,consts:[[1,"p-8"],[1,"flex","flex-wrap","gap-4"],[1,"w-1/3"],[1,"w-auto",3,"selectionChange","binding"],[1,"mt-8"],[4,"ngFor","ngForOf"],["class","mt-8",4,"ngIf"],[1,"flex-grow"],[1,"output"],["id","save",4,"ngIf"],["highlight-js","","id","output","wrap","soft",3,"options","lang","innerHTML"],["href","javascript:void(0);",3,"click"],["mat-table","",3,"dataSource"],["matColumnDef","type"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","targetCode"],["matColumnDef","targetDisplay"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["target","_blank",1,"flex","flex-row","items-center","gap-2",3,"href"],["id","save"],["mat-icon-button","","matTooltip","Download",3,"click"],["fontIcon","cloud_download"],["mat-icon-button","","matTooltip","Copy",3,"click"],["fontIcon","content_copy"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"h2"),ut(2,"Consistent Context Representation for Situations with Explicit Context"),et(),tt(3,"div",1)(4,"div",2)(5,"app-autocomplete-binding",3),Vt("selectionChange",function(o){return r.findingWithExplicitContextSelected(o)}),et(),tt(6,"h3",4),ut(7,"Examples"),et(),tt(8,"ul"),Gt(9,JLt,3,1,"li",5),et(),Gt(10,oNt,15,4,"div",6)(11,lNt,8,2,"div",6),et(),tt(12,"div",7)(13,"div",8),Gt(14,cNt,5,0,"div",9),tt(15,"textarea",10),ut(16," "),et()()()()()),2&n&&(lt(5),yt("binding",r.situationsBinding),lt(4),yt("ngForOf",r.examples),lt(),yt("ngIf",null==r.selectedSituation?null:r.selectedSituation.display),lt(),yt("ngIf",r.resourceType),lt(3),yt("ngIf",r.fhirRepresentationString.length>15),lt(),yt("options",Ko(8,ZLt))("lang","json")("innerHTML",r.fhirRepresentationString,Pf))},dependencies:[gs,Ms,GC,Oo,da,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,xu,av],styles:[".output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem;min-height:45rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}"]})}return e})(),uNt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-context-main"]],decls:1,vars:0,template:function(n,r){1&n&&we(0,"app-situation-map")},dependencies:[dNt]})}return e})();var hNt=ps(867),fNt=ps.n(hNt);let mNt=(()=>{class e{constructor(){this.filter=new(fNt())}transform(t){return t&&this.filter.clean(t)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275pipe=$a({name:"safeText",type:e,pure:!0})}return e})();function pNt(e,i){if(1&e){const t=ve();tt(0,"a",13),Vt("click",function(){Ut(t);const r=Ct().$implicit;return zt(Ct().setLevel(r.name))}),ut(1),et()}if(2&e){const t=Ct().$implicit;lt(),Ye(" ",t.name," ")}}function gNt(e,i){if(1&e&&(tt(0,"span",14),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ze(t.name)}}function vNt(e,i){if(1&e&&(tt(0,"span"),Gt(1,pNt,2,1,"a",7)(2,gNt,2,1,"span",8),et()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",n.selectedLevel!=t.name),lt(),yt("ngIf",n.selectedLevel==t.name)}}function xNt(e,i){if(1&e){const t=ve();tt(0,"a",13),Vt("click",function(){return Ut(t),zt(Ct().setLevel("scoreboard"))}),ut(1," Legacy "),et()}}function yNt(e,i){1&e&&(tt(0,"span",14),ut(1,"Legacy"),et())}function bNt(e,i){1&e&&we(0,"mat-spinner",15)}function wNt(e,i){1&e&&(tt(0,"th",28),ut(1," Position "),et())}function _Nt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.index;lt(),Ye(" ",t+1," ")}}function TNt(e,i){1&e&&(tt(0,"th",28),ut(1," Message "),et())}function CNt(e,i){if(1&e&&(tt(0,"span"),ut(1),sa(2,"safeText"),et()),2&e){const t=Ct().$implicit;lt(),Ze(xc(2,1,t.message))}}function SNt(e,i){1&e&&(tt(0,"span",31)(1,"i"),ut(2,"No information available (qualifier value)"),et()())}function ENt(e,i){if(1&e&&(tt(0,"td",29),Gt(1,CNt,3,3,"span",11)(2,SNt,3,0,"span",30),et()),2&e){const t=i.$implicit;lt(),yt("ngIf",t.message),lt(),yt("ngIf",!t.message)}}function ANt(e,i){1&e&&(tt(0,"th",28),ut(1," Score "),et())}function DNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.score," ")}}function MNt(e,i){1&e&&(tt(0,"th",28),ut(1," Rounds "),et())}function INt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.numberOfRounds," ")}}function RNt(e,i){1&e&&(tt(0,"th",28),ut(1," Difficulty "),et())}function kNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),et()),2&e){const t=i.$implicit;lt(),Ye(" ",t.difficulty," ")}}function PNt(e,i){1&e&&(tt(0,"th",28),ut(1," Time Played "),et())}function FNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),sa(2,"elapsedTime"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",xc(2,1,t.elapsed)," ")}}function ONt(e,i){1&e&&(tt(0,"th",28),ut(1," Date "),et())}function LNt(e,i){if(1&e&&(tt(0,"td",29),ut(1),sa(2,"date"),et()),2&e){const t=i.$implicit;lt(),Ye(" ",Xd(2,1,t.date,"short")," ")}}function NNt(e,i){1&e&&we(0,"tr",32)}function BNt(e,i){1&e&&we(0,"tr",33)}function VNt(e,i){if(1&e&&(tt(0,"div")(1,"table",16),Wi(2,17),Gt(3,wNt,2,0,"th",18)(4,_Nt,2,1,"td",19),Xi(),Wi(5,20),Gt(6,TNt,2,0,"th",18)(7,ENt,3,2,"td",19),Xi(),Wi(8,21),Gt(9,ANt,2,0,"th",18)(10,DNt,2,1,"td",19),Xi(),Wi(11,22),Gt(12,MNt,2,0,"th",18)(13,INt,2,1,"td",19),Xi(),Wi(14,23),Gt(15,RNt,2,0,"th",18)(16,kNt,2,1,"td",19),Xi(),Wi(17,24),Gt(18,PNt,2,0,"th",18)(19,FNt,3,3,"td",19),Xi(),Wi(20,25),Gt(21,ONt,2,0,"th",18)(22,LNt,3,4,"td",19),Xi(),Gt(23,NNt,1,0,"tr",26)(24,BNt,1,0,"tr",27),et()()),2&e){const t=Ct();lt(),yt("dataSource",t.dataSource),lt(22),yt("matHeaderRowDef",t.displayedColumns),lt(),yt("matRowDefColumns",t.displayedColumns)}}let UNt=(()=>{class e{constructor(t,n,r,s){this.firebaseService=t,this.router=n,this.snoguessMainService=r,this.route=s,this.displayedColumns=["position","message","difficulty","score","numberOfRounds","secondsPlayed","date"],this.dataSource=[],this.loadingScores=!1,this.difficultyLevels=[],this.selectedLevel=""}ngOnInit(){this.difficultyLevels=this.snoguessMainService.getDifficultyLevels(),this.route.queryParams.subscribe(t=>{const n=t.level;this.selectedLevel=n&&this.difficultyLevels.some(s=>s.name===n)?n:this.difficultyLevels[0].name,this.loadScores(this.selectedLevel),t.refresh&&this.startAutoRefresh()})}ngOnDestroy(){this.stopAutoRefresh()}startAutoRefresh(){this.stopAutoRefresh(),this.intervalId=setInterval(()=>{this.loadScores(this.selectedLevel)},6e4)}stopAutoRefresh(){this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}setLevel(t){this.selectedLevel=t,this.loadScores(t)}loadScores(t){this.loadingScores=!0,this.firebaseService.getScores(t).then(n=>{this.dataSource=n.map(r=>({...r,date:r.date?r.date.toDate():new Date})),this.loadingScores=!1})}backToGame(){this.router.navigate(["/snoguess"])}static#t=this.\u0275fac=function(n){return new(n||e)(mt(pK),mt(Fo),mt(mK),mt(Tc))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-scoreboard"]],decls:19,vars:8,consts:[[1,"flex","flex-col","items-center","gap-4","pt-6","snoguess-game"],["src","assets/img/SI_CT_w_tagline.png","alt","SNOMED CT Logo",1,"w-1/6"],["src","assets/img/scoreboard.png","alt","High Scores",1,"w-1/4","mt-8"],[1,"mb-2","flex","flex-row","items-center","gap-1"],[1,"diamond"],[1,"mb-3","flex","flex-row","items-center","gap-3"],[4,"ngFor","ngForOf"],["href","javascript:void(0)","class","text-blue-500 underline",3,"click",4,"ngIf"],["class","selected-level",4,"ngIf"],[1,"flex","flex-row","items-center","gap-3"],["diameter","50",4,"ngIf"],[4,"ngIf"],[1,"bg-gradient-to-b","from-blue-500","to-gray-500","hover:from-black","hover:to-blue-500","border-solid","border-4","border-black","rounded-3xl","pt-4","pb-4","w-1/6","text-center","cursor-pointer","font-bold","text-white","mt-12","mb-24","text-2xl",3,"click"],["href","javascript:void(0)",1,"text-blue-500","underline",3,"click"],[1,"selected-level"],["diameter","50"],["mat-table","",1,"mat-elevation-z8",3,"dataSource"],["matColumnDef","position"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","message"],["matColumnDef","score"],["matColumnDef","numberOfRounds"],["matColumnDef","difficulty"],["matColumnDef","secondsPlayed"],["matColumnDef","date"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["class","text-gray-400",4,"ngIf"],[1,"text-gray-400"],["mat-header-row",""],["mat-row",""]],template:function(n,r){1&n&&(tt(0,"div",0),we(1,"img",1)(2,"img",2),tt(3,"div",3)(4,"span"),ut(5,"Messages posted by players!\xa0"),et(),tt(6,"mat-icon",4),ut(7,"emoji_events"),et()(),tt(8,"div",5),Gt(9,vNt,3,2,"span",6)(10,xNt,2,0,"a",7)(11,yNt,2,0,"span",8),et(),tt(12,"div",9)(13,"h3"),ut(14),et()(),Gt(15,bNt,1,0,"mat-spinner",10)(16,VNt,25,3,"div",11),tt(17,"div",12),Vt("click",function(){return r.backToGame()}),ut(18," Back to game "),et()()),2&n&&(lt(2),yt("@popIn",void 0),lt(7),yt("ngForOf",r.difficultyLevels),lt(),yt("ngIf","scoreboard"!=r.selectedLevel),lt(),yt("ngIf","scoreboard"==r.selectedLevel),lt(3),Ye("Top 20 ",r.selectedLevel," level scores"),lt(),yt("ngIf",r.loadingScores),lt(),yt("ngIf",!r.loadingScores),lt(),yt("@scrollUp",void 0))},dependencies:[gs,Ms,da,Eh,Ah,fu,Dh,mu,hu,Mh,pu,gu,Ih,Rh,gh,gK,mNt],styles:[".diamond[_ngcontent-%COMP%]{color:#3b49c4}.snoguess-game[_ngcontent-%COMP%]{padding:20px;border-radius:8px;max-width:80%;margin:auto;box-shadow:0 4px 8px #0000001a}@media (max-width: 1300px){.menu-buttons[_ngcontent-%COMP%]{font-size:large}}@media (max-width: 876px){.snoguess-game[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .bg-gradient-to-b[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .hints-container[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .score-progression-panel[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .guess-field[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] img[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:100%!important;max-width:100%!important;margin:0 auto;box-sizing:border-box;box-shadow:none}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%]{flex-direction:column;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .game-buttons[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{width:-moz-fit-content!important;width:fit-content!important;margin-bottom:1rem}.snoguess-game[_ngcontent-%COMP%] .goal-indicator[_ngcontent-%COMP%]{display:none}.snoguess-game[_ngcontent-%COMP%] .hit-points[_ngcontent-%COMP%]{margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .term-display[_ngcontent-%COMP%]{font-size:20px;margin-top:1rem}.snoguess-game[_ngcontent-%COMP%] .guess-message[_ngcontent-%COMP%]{font-size:12px}.snoguess-game[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px!important}.snoguess-game[_ngcontent-%COMP%] .pt-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-1[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-6[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pt-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pb-4[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pl-12[_ngcontent-%COMP%], .snoguess-game[_ngcontent-%COMP%] .pr-12[_ngcontent-%COMP%]{padding:10px}.snoguess-game[_ngcontent-%COMP%] .font-bold[_ngcontent-%COMP%]{font-size:16px}.snoguess-game[_ngcontent-%COMP%] .diff-label[_ngcontent-%COMP%]{text-align:right}}.selected-level[_ngcontent-%COMP%]{font-weight:700}"],data:{animation:[mr("shake",[on("normal => shake",sn(200,Kg([qe({transform:"translateX(0)"}),qe({transform:"translateX(-10px)"}),qe({transform:"translateX(10px)"}),qe({transform:"translateX(0)"})])))]),mr("popIn",[on(":enter",[qe({transform:"scale(0.8)",opacity:0}),sn("0.5s cubic-bezier(.8, -0.6, 0.2, 1.5)",qe({transform:"scale(1.3)",opacity:1})),sn("0.2s cubic-bezier(.8, -0.6, 0.2, 1.5)",qe({transform:"scale(1)",opacity:1}))])]),mr("scrollUp",[on(":enter",[qe({transform:"translateY(100%)",opacity:0}),sn("0.5s ease-out",qe({transform:"translateY(0)",opacity:1}))])]),mr("fadeInDelayed",[on(":enter",[qe({opacity:0}),sn("1s 0.5s ease-out",qe({opacity:1}))])])]}})}return e})();function qv(e){return e+.5|0}const Au=(e,i,t)=>Math.max(Math.min(e,t),i);function Bb(e){return Au(qv(2.55*e),0,255)}function nf(e){return Au(qv(255*e),0,255)}function Du(e){return Au(qv(e/2.55)/100,0,1)}function yK(e){return Au(qv(100*e),0,100)}const $l={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},XO=[..."0123456789ABCDEF"],zNt=e=>XO[15&e],GNt=e=>XO[(240&e)>>4]+XO[15&e],rE=e=>(240&e)>>4==(15&e);const YNt=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function bK(e,i,t){const n=i*Math.min(t,1-t),r=(s,o=(s+e/30)%12)=>t-n*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function $Nt(e,i,t){const n=(r,s=(r+e/60)%6)=>t-t*i*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function QNt(e,i,t){const n=bK(e,1,.5);let r;for(i+t>1&&(r=1/(i+t),i*=r,t*=r),r=0;r<3;r++)n[r]*=1-i-t,n[r]+=i;return n}function jO(e){const t=e.r/255,n=e.g/255,r=e.b/255,s=Math.max(t,n,r),o=Math.min(t,n,r),l=(s+o)/2;let w,C,M;return s!==o&&(M=s-o,C=l>.5?M/(2-s-o):M/(s+o),w=function KNt(e,i,t,n,r){return e===r?(i-t)/n+(ie<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,t0=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function aE(e,i,t){if(e){let n=jO(e);n[i]=Math.max(0,Math.min(n[i]+n[i]*t,0===i?360:1)),n=$O(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function CK(e,i){return e&&Object.assign(i||{},e)}function SK(e){var i={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(i={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(i.a=nf(e[3]))):(i=CK(e,{r:0,g:0,b:0,a:1})).a=nf(i.a),i}function l4t(e){return"r"===e.charAt(0)?function s4t(e){const i=r4t.exec(e);let n,r,s,t=255;if(i){if(i[7]!==n){const o=+i[7];t=i[8]?Bb(o):Au(255*o,0,255)}return n=+i[1],r=+i[3],s=+i[5],n=255&(i[2]?Bb(n):Au(n,0,255)),r=255&(i[4]?Bb(r):Au(r,0,255)),s=255&(i[6]?Bb(s):Au(s,0,255)),{r:n,g:r,b:s,a:t}}}(e):function qNt(e){const i=YNt.exec(e);let n,t=255;if(!i)return;i[5]!==n&&(t=i[6]?Bb(+i[5]):nf(+i[5]));const r=wK(+i[2]),s=+i[3]/100,o=+i[4]/100;return n="hwb"===i[1]?function ZNt(e,i,t){return YO(QNt,e,i,t)}(r,s,o):"hsv"===i[1]?function JNt(e,i,t){return YO($Nt,e,i,t)}(r,s,o):$O(r,s,o),{r:n[0],g:n[1],b:n[2],a:t}}(e)}class e0{constructor(i){if(i instanceof e0)return i;const t=typeof i;let n;"object"===t?n=SK(i):"string"===t&&(n=function WNt(e){var t,i=e.length;return"#"===e[0]&&(4===i||5===i?t={r:255&17*$l[e[1]],g:255&17*$l[e[2]],b:255&17*$l[e[3]],a:5===i?17*$l[e[4]]:255}:(7===i||9===i)&&(t={r:$l[e[1]]<<4|$l[e[2]],g:$l[e[3]]<<4|$l[e[4]],b:$l[e[5]]<<4|$l[e[6]],a:9===i?$l[e[7]]<<4|$l[e[8]]:255})),t}(i)||function n4t(e){sE||(sE=function i4t(){const e={},i=Object.keys(TK),t=Object.keys(_K);let n,r,s,o,l;for(n=0;n>16&255,s>>8&255,255&s]}return e}(),sE.transparent=[0,0,0,0]);const i=sE[e.toLowerCase()];return i&&{r:i[0],g:i[1],b:i[2],a:4===i.length?i[3]:255}}(i)||l4t(i)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var i=CK(this._rgb);return i&&(i.a=Du(i.a)),i}set rgb(i){this._rgb=SK(i)}rgbString(){return this._valid?function a4t(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Du(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}(this._rgb):void 0}hexString(){return this._valid?function jNt(e){var i=(e=>rE(e.r)&&rE(e.g)&&rE(e.b)&&rE(e.a))(e)?zNt:GNt;return e?"#"+i(e.r)+i(e.g)+i(e.b)+((e,i)=>e<255?i(e):"")(e.a,i):void 0}(this._rgb):void 0}hslString(){return this._valid?function e4t(e){if(!e)return;const i=jO(e),t=i[0],n=yK(i[1]),r=yK(i[2]);return e.a<255?`hsla(${t}, ${n}%, ${r}%, ${Du(e.a)})`:`hsl(${t}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(i,t){if(i){const n=this.rgb,r=i.rgb;let s;const o=t===s?.5:t,l=2*o-1,w=n.a-r.a,C=((l*w==-1?l:(l+w)/(1+l*w))+1)/2;s=1-C,n.r=255&C*n.r+s*r.r+.5,n.g=255&C*n.g+s*r.g+.5,n.b=255&C*n.b+s*r.b+.5,n.a=o*n.a+(1-o)*r.a,this.rgb=n}return this}interpolate(i,t){return i&&(this._rgb=function o4t(e,i,t){const n=t0(Du(e.r)),r=t0(Du(e.g)),s=t0(Du(e.b));return{r:nf(QO(n+t*(t0(Du(i.r))-n))),g:nf(QO(r+t*(t0(Du(i.g))-r))),b:nf(QO(s+t*(t0(Du(i.b))-s))),a:e.a+t*(i.a-e.a)}}(this._rgb,i._rgb,t)),this}clone(){return new e0(this.rgb)}alpha(i){return this._rgb.a=nf(i),this}clearer(i){return this._rgb.a*=1-i,this}greyscale(){const i=this._rgb,t=qv(.3*i.r+.59*i.g+.11*i.b);return i.r=i.g=i.b=t,this}opaquer(i){return this._rgb.a*=1+i,this}negate(){const i=this._rgb;return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,this}lighten(i){return aE(this._rgb,2,i),this}darken(i){return aE(this._rgb,2,-i),this}saturate(i){return aE(this._rgb,1,i),this}desaturate(i){return aE(this._rgb,1,-i),this}rotate(i){return function t4t(e,i){var t=jO(e);t[0]=wK(t[0]+i),t=$O(t),e.r=t[0],e.g=t[1],e.b=t[2]}(this._rgb,i),this}}function Mu(){}const c4t=(()=>{let e=0;return()=>e++})();function Zn(e){return null==e}function Qr(e){if(Array.isArray&&Array.isArray(e))return!0;const i=Object.prototype.toString.call(e);return"[object"===i.slice(0,7)&&"Array]"===i.slice(-6)}function Un(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function bs(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function Sl(e,i){return bs(e)?e:i}function mn(e,i){return typeof e>"u"?i:e}const EK=(e,i)=>"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*i:+e;function Gr(e,i,t){if(e&&"function"==typeof e.call)return e.apply(t,i)}function _r(e,i,t,n){let r,s,o;if(Qr(e))if(s=e.length,n)for(r=s-1;r>=0;r--)i.call(t,e[r],r);else for(r=0;re,x:e=>e.x,y:e=>e.y};function rf(e,i){return(DK[i]||(DK[i]=function m4t(e){const i=function f4t(e){const i=e.split("."),t=[];let n="";for(const r of i)n+=r,n.endsWith("\\")?n=n.slice(0,-1)+".":(t.push(n),n="");return t}(e);return t=>{for(const n of i){if(""===n)break;t=t&&t[n]}return t}}(i)))(e)}function KO(e){return e.charAt(0).toUpperCase()+e.slice(1)}const zb=e=>typeof e<"u",sf=e=>"function"==typeof e,MK=(e,i)=>{if(e.size!==i.size)return!1;for(const t of e)if(!i.has(t))return!1;return!0},Kr=Math.PI,Zr=2*Kr,g4t=Zr+Kr,cE=Number.POSITIVE_INFINITY,v4t=Kr/180,Os=Kr/2,Fm=Kr/4,IK=2*Kr/3,af=Math.log10,vd=Math.sign;function Gb(e,i,t){return Math.abs(e-i)w&&C=Math.min(i,t)-n&&e<=Math.max(i,t)+n}function qO(e,i,t){t=t||(o=>e[o]1;)s=r+n>>1,t(s)?r=s:n=s;return{lo:r,hi:n}}const Ru=(e,i,t,n)=>qO(e,t,n?r=>{const s=e[r][i];return se[r][i]qO(e,t,n=>e[n][i]>=t),OK=["push","pop","shift","splice","unshift"];function LK(e,i){const t=e._chartjs;if(!t)return;const n=t.listeners,r=n.indexOf(i);-1!==r&&n.splice(r,1),!(n.length>0)&&(OK.forEach(s=>{delete e[s]}),delete e._chartjs)}function NK(e){const i=new Set(e);return i.size===e.length?e:Array.from(i)}const BK=typeof window>"u"?function(e){return e()}:window.requestAnimationFrame;function VK(e,i){let t=[],n=!1;return function(...r){t=r,n||(n=!0,BK.call(window,()=>{n=!1,e.apply(i,t)}))}}const tL=e=>"start"===e?"left":"end"===e?"right":"center",lo=(e,i,t)=>"start"===e?i:"end"===e?t:(i+t)/2;function UK(e,i,t){const n=i.length;let r=0,s=n;if(e._sorted){const{iScale:o,_parsed:l}=e,w=o.axis,{min:C,max:M,minDefined:P,maxDefined:O}=o.getUserBounds();P&&(r=Ma(Math.min(Ru(l,w,C).lo,t?n:Ru(i,w,o.getPixelForValue(C)).lo),0,n-1)),s=O?Ma(Math.max(Ru(l,o.axis,M,!0).hi+1,t?0:Ru(i,w,o.getPixelForValue(M),!0).hi+1),r,n)-r:n-r}return{start:r,count:s}}function zK(e){const{xScale:i,yScale:t,_scaleRanges:n}=e,r={xmin:i.min,xmax:i.max,ymin:t.min,ymax:t.max};if(!n)return e._scaleRanges=r,!0;const s=n.xmin!==i.min||n.xmax!==i.max||n.ymin!==t.min||n.ymax!==t.max;return Object.assign(n,r),s}const dE=e=>0===e||1===e,GK=(e,i,t)=>-Math.pow(2,10*(e-=1))*Math.sin((e-i)*Zr/t),HK=(e,i,t)=>Math.pow(2,-10*e)*Math.sin((e-i)*Zr/t)+1,Wb={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>1-Math.cos(e*Os),easeOutSine:e=>Math.sin(e*Os),easeInOutSine:e=>-.5*(Math.cos(Kr*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>dE(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1))),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>dE(e)?e:GK(e,.075,.3),easeOutElastic:e=>dE(e)?e:HK(e,.075,.3),easeInOutElastic:e=>dE(e)?e:e<.5?.5*GK(2*e,.1125,.45):.5+.5*HK(2*e-1,.1125,.45),easeInBack:e=>e*e*(2.70158*e-1.70158),easeOutBack:e=>(e-=1)*e*(2.70158*e+1.70158)+1,easeInOutBack(e){let i=1.70158;return(e/=.5)<1?e*e*((1+(i*=1.525))*e-i)*.5:.5*((e-=2)*e*((1+(i*=1.525))*e+i)+2)},easeInBounce:e=>1-Wb.easeOutBounce(1-e),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInOutBounce:e=>e<.5?.5*Wb.easeInBounce(2*e):.5*Wb.easeOutBounce(2*e-1)+.5};function eL(e){if(e&&"object"==typeof e){const i=e.toString();return"[object CanvasPattern]"===i||"[object CanvasGradient]"===i}return!1}function WK(e){return eL(e)?e:new e0(e)}function iL(e){return eL(e)?e:new e0(e).saturate(.5).darken(.1).hexString()}const A4t=["x","y","borderWidth","radius","tension"],D4t=["color","borderColor","backgroundColor"],XK=new Map;function Xb(e,i,t){return function R4t(e,i){i=i||{};const t=e+JSON.stringify(i);let n=XK.get(t);return n||(n=new Intl.NumberFormat(e,i),XK.set(t,n)),n}(i,t).format(e)}const jK={values:e=>Qr(e)?e:""+e,numeric(e,i,t){if(0===e)return"0";const n=this.chart.options.locale;let r,s=e;if(t.length>1){const C=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(C<1e-4||C>1e15)&&(r="scientific"),s=function k4t(e,i){let t=i.length>3?i[2].value-i[1].value:i[1].value-i[0].value;return Math.abs(t)>=1&&e!==Math.floor(e)&&(t=e-Math.floor(e)),t}(e,t)}const o=af(Math.abs(s)),l=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),w={notation:r,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(w,this.options.ticks.format),Xb(e,n,w)},logarithmic(e,i,t){if(0===e)return"0";const n=t[i].significand||e/Math.pow(10,Math.floor(af(e)));return[1,2,3,5,10,15].includes(n)||i>.8*t.length?jK.numeric.call(this,e,i,t):""}};var uE={formatters:jK};const Om=Object.create(null),nL=Object.create(null);function jb(e,i){if(!i)return e;const t=i.split(".");for(let n=0,r=t.length;nn.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,r)=>iL(r.backgroundColor),this.hoverBorderColor=(n,r)=>iL(r.borderColor),this.hoverColor=(n,r)=>iL(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(i),this.apply(t)}set(i,t){return rL(this,i,t)}get(i){return jb(this,i)}describe(i,t){return rL(nL,i,t)}override(i,t){return rL(Om,i,t)}route(i,t,n,r){const s=jb(this,i),o=jb(this,n),l="_"+t;Object.defineProperties(s,{[l]:{value:s[t],writable:!0},[t]:{enumerable:!0,get(){const w=this[l],C=o[r];return Un(w)?Object.assign({},C,w):mn(w,C)},set(w){this[l]=w}}})}apply(i){i.forEach(t=>t(this))}}var as=new F4t({_scriptable:e=>!e.startsWith("on"),_indexable:e=>"events"!==e,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function M4t(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:i=>"onProgress"!==i&&"onComplete"!==i&&"fn"!==i}),e.set("animations",{colors:{type:"color",properties:D4t},numbers:{type:"number",properties:A4t}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:i=>0|i}}}})},function I4t(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function P4t(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(i,t)=>t.lineWidth,tickColor:(i,t)=>t.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:uE.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:i=>!i.startsWith("before")&&!i.startsWith("after")&&"callback"!==i&&"parser"!==i,_indexable:i=>"borderDash"!==i&&"tickBorderDash"!==i&&"dash"!==i}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:i=>"backdropPadding"!==i&&"callback"!==i,_indexable:i=>"backdropPadding"!==i})}]);function hE(e,i,t,n,r){let s=i[r];return s||(s=i[r]=e.measureText(r).width,t.push(r)),s>n&&(n=s),n}function L4t(e,i,t,n){let r=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==i&&(r=n.data={},s=n.garbageCollect=[],n.font=i),e.save(),e.font=i;let o=0;const l=t.length;let w,C,M,P,O;for(w=0;wt.length){for(w=0;w0&&e.stroke()}}function ku(e,i,t){return t=t||.5,!i||e&&e.x>i.left-t&&e.xi.top-t&&e.y0&&""!==s.strokeColor;let w,C;for(e.save(),e.font=r.string,function V4t(e,i){i.translation&&e.translate(i.translation[0],i.translation[1]),Zn(i.rotation)||e.rotate(i.rotation),i.color&&(e.fillStyle=i.color),i.textAlign&&(e.textAlign=i.textAlign),i.textBaseline&&(e.textBaseline=i.textBaseline)}(e,s),w=0;w+e||0;function aL(e,i){const t={},n=Un(i),r=n?Object.keys(i):i,s=Un(e)?n?o=>mn(e[o],e[i[o]]):o=>e[o]:()=>e;for(const o of r)t[o]=X4t(s(o));return t}function QK(e){return aL(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Bm(e){return aL(e,["topLeft","topRight","bottomLeft","bottomRight"])}function co(e){const i=QK(e);return i.width=i.left+i.right,i.height=i.top+i.bottom,i}function ma(e,i){let t=mn((e=e||{}).size,(i=i||as.font).size);"string"==typeof t&&(t=parseInt(t,10));let n=mn(e.style,i.style);n&&!(""+n).match(H4t)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const r={family:mn(e.family,i.family),lineHeight:W4t(mn(e.lineHeight,i.lineHeight),t),size:t,style:n,weight:mn(e.weight,i.weight),string:""};return r.string=function O4t(e){return!e||Zn(e.size)||Zn(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(r),r}function $b(e,i,t,n){let s,o,l,r=!0;for(s=0,o=e.length;se[0])){const s=t||e;typeof n>"u"&&(n=tZ("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:n,_getTarget:r,override:l=>oL([l,...e],i,s,n)};return new Proxy(o,{deleteProperty:(l,w)=>(delete l[w],delete l._keys,delete e[0][w],!0),get:(l,w)=>ZK(l,w,()=>function t3t(e,i,t,n){let r;for(const s of i)if(r=tZ(Y4t(s,e),t),typeof r<"u")return lL(e,r)?cL(t,n,e,r):r}(w,i,e,l)),getOwnPropertyDescriptor:(l,w)=>Reflect.getOwnPropertyDescriptor(l._scopes[0],w),getPrototypeOf:()=>Reflect.getPrototypeOf(e[0]),has:(l,w)=>eZ(l).includes(w),ownKeys:l=>eZ(l),set(l,w,C){const M=l._storage||(l._storage=r());return l[w]=M[w]=C,delete l._keys,!0}})}function r0(e,i,t,n){const r={_cacheable:!1,_proxy:e,_context:i,_subProxy:t,_stack:new Set,_descriptors:KK(e,n),setContext:s=>r0(e,s,t,n),override:s=>r0(e.override(s),i,t,n)};return new Proxy(r,{deleteProperty:(s,o)=>(delete s[o],delete e[o],!0),get:(s,o,l)=>ZK(s,o,()=>function $4t(e,i,t){const{_proxy:n,_context:r,_subProxy:s,_descriptors:o}=e;let l=n[i];return sf(l)&&o.isScriptable(i)&&(l=function Q4t(e,i,t,n){const{_proxy:r,_context:s,_subProxy:o,_stack:l}=t;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let w=i(s,o||n);return l.delete(e),lL(e,w)&&(w=cL(r._scopes,r,e,w)),w}(i,l,e,t)),Qr(l)&&l.length&&(l=function K4t(e,i,t,n){const{_proxy:r,_context:s,_subProxy:o,_descriptors:l}=t;if(typeof s.index<"u"&&n(e))return i[s.index%i.length];if(Un(i[0])){const w=i,C=r._scopes.filter(M=>M!==w);i=[];for(const M of w){const P=cL(C,r,e,M);i.push(r0(P,s,o&&o[e],l))}}return i}(i,l,e,o.isIndexable)),lL(i,l)&&(l=r0(l,r,s&&s[i],o)),l}(s,o,l)),getOwnPropertyDescriptor:(s,o)=>s._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o),getPrototypeOf:()=>Reflect.getPrototypeOf(e),has:(s,o)=>Reflect.has(e,o),ownKeys:()=>Reflect.ownKeys(e),set:(s,o,l)=>(e[o]=l,delete s[o],!0)})}function KK(e,i={scriptable:!0,indexable:!0}){const{_scriptable:t=i.scriptable,_indexable:n=i.indexable,_allKeys:r=i.allKeys}=e;return{allKeys:r,scriptable:t,indexable:n,isScriptable:sf(t)?t:()=>t,isIndexable:sf(n)?n:()=>n}}const Y4t=(e,i)=>e?e+KO(i):i,lL=(e,i)=>Un(i)&&"adapters"!==e&&(null===Object.getPrototypeOf(i)||i.constructor===Object);function ZK(e,i,t){if(Object.prototype.hasOwnProperty.call(e,i)||"constructor"===i)return e[i];const n=t();return e[i]=n,n}function JK(e,i,t){return sf(e)?e(i,t):e}const Z4t=(e,i)=>!0===e?i:"string"==typeof e?rf(i,e):void 0;function J4t(e,i,t,n,r){for(const s of i){const o=Z4t(t,s);if(o){e.add(o);const l=JK(o._fallback,t,r);if(typeof l<"u"&&l!==t&&l!==n)return l}else if(!1===o&&typeof n<"u"&&t!==n)return null}return!1}function cL(e,i,t,n){const r=i._rootScopes,s=JK(i._fallback,t,n),o=[...e,...r],l=new Set;l.add(n);let w=qK(l,o,t,s||t,n);return!(null===w||typeof s<"u"&&s!==t&&(w=qK(l,o,s,w,n),null===w))&&oL(Array.from(l),[""],r,s,()=>function q4t(e,i,t){const n=e._getTarget();i in n||(n[i]={});const r=n[i];return Qr(r)&&Un(t)?t:r||{}}(i,t,n))}function qK(e,i,t,n,r){for(;t;)t=J4t(e,i,t,n,r);return t}function tZ(e,i){for(const t of i){if(!t)continue;const n=t[e];if(typeof n<"u")return n}}function eZ(e){let i=e._keys;return i||(i=e._keys=function e3t(e){const i=new Set;for(const t of e)for(const n of Object.keys(t).filter(r=>!r.startsWith("_")))i.add(n);return Array.from(i)}(e._scopes)),i}function iZ(e,i,t,n){const{iScale:r}=e,{key:s="r"}=this._parsing,o=new Array(n);let l,w,C,M;for(l=0,w=n;li"x"===e?"y":"x";function n3t(e,i,t,n){const r=e.skip?i:e,s=i,o=t.skip?i:t,l=JO(s,r),w=JO(o,s);let C=l/(l+w),M=w/(l+w);C=isNaN(C)?0:C,M=isNaN(M)?0:M;const P=n*C,O=n*M;return{previous:{x:s.x-P*(o.x-r.x),y:s.y-P*(o.y-r.y)},next:{x:s.x+O*(o.x-r.x),y:s.y+O*(o.y-r.y)}}}function pE(e,i,t){return Math.max(Math.min(e,t),i)}function l3t(e,i,t,n,r){let s,o,l,w;if(i.spanGaps&&(e=e.filter(C=>!C.skip)),"monotone"===i.cubicInterpolationMode)!function a3t(e,i="x"){const t=nZ(i),n=e.length,r=Array(n).fill(0),s=Array(n);let o,l,w,C=s0(e,0);for(o=0;oe.ownerDocument.defaultView.getComputedStyle(e,null),d3t=["top","right","bottom","left"];function Vm(e,i,t){const n={};t=t?"-"+t:"";for(let r=0;r<4;r++){const s=d3t[r];n[s]=parseFloat(e[i+"-"+s+t])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const u3t=(e,i,t)=>(e>0||i>0)&&(!t||!t.shadowRoot);function Um(e,i){if("native"in e)return e;const{canvas:t,currentDevicePixelRatio:n}=i,r=vE(t),s="border-box"===r.boxSizing,o=Vm(r,"padding"),l=Vm(r,"border","width"),{x:w,y:C,box:M}=function h3t(e,i){const t=e.touches,n=t&&t.length?t[0]:e,{offsetX:r,offsetY:s}=n;let l,w,o=!1;if(u3t(r,s,e.target))l=r,w=s;else{const C=i.getBoundingClientRect();l=n.clientX-C.left,w=n.clientY-C.top,o=!0}return{x:l,y:w,box:o}}(e,t),P=o.left+(M&&l.left),O=o.top+(M&&l.top);let{width:L,height:U}=i;return s&&(L-=o.width+l.width,U-=o.height+l.height),{x:Math.round((w-P)/L*t.width/n),y:Math.round((C-O)/U*t.height/n)}}const xE=e=>Math.round(10*e)/10;function rZ(e,i,t){const n=i||1,r=Math.floor(e.height*n),s=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),(e.currentDevicePixelRatio!==n||o.height!==r||o.width!==s)&&(e.currentDevicePixelRatio=n,o.height=r,o.width=s,e.ctx.setTransform(n,0,0,n,0,0),!0)}const p3t=function(){let e=!1;try{const i={get passive(){return e=!0,!1}};dL()&&(window.addEventListener("test",null,i),window.removeEventListener("test",null,i))}catch{}return e}();function sZ(e,i){const t=function c3t(e,i){return vE(e).getPropertyValue(i)}(e,i),n=t&&t.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function zm(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:e.y+t*(i.y-e.y)}}function g3t(e,i,t,n){return{x:e.x+t*(i.x-e.x),y:"middle"===n?t<.5?e.y:i.y:"after"===n?t<1?e.y:i.y:t>0?i.y:e.y}}function v3t(e,i,t,n){const r={x:e.cp2x,y:e.cp2y},s={x:i.cp1x,y:i.cp1y},o=zm(e,r,t),l=zm(r,s,t),w=zm(s,i,t),C=zm(o,l,t),M=zm(l,w,t);return zm(C,M,t)}function a0(e,i,t){return e?function(e,i){return{x:t=>e+e+i-t,setWidth(t){i=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,n)=>t-n,leftForLtr:(t,n)=>t-n}}(i,t):{x:e=>e,setWidth(e){},textAlign:e=>e,xPlus:(e,i)=>e+i,leftForLtr:(e,i)=>e}}function aZ(e,i){let t,n;("ltr"===i||"rtl"===i)&&(t=e.canvas.style,n=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",i,"important"),e.prevTextDirection=n)}function oZ(e,i){void 0!==i&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",i[0],i[1]))}function lZ(e){return"angle"===e?{between:Hb,compare:b4t,normalize:El}:{between:Iu,compare:(i,t)=>i-t,normalize:i=>i}}function cZ({start:e,end:i,count:t,loop:n,style:r}){return{start:e%t,end:i%t,loop:n&&(i-e+1)%t==0,style:r}}function dZ(e,i,t){if(!t)return[e];const{property:n,start:r,end:s}=t,o=i.length,{compare:l,between:w,normalize:C}=lZ(n),{start:M,end:P,loop:O,style:L}=function b3t(e,i,t){const{property:n,start:r,end:s}=t,{between:o,normalize:l}=lZ(n),w=i.length;let O,L,{start:C,end:M,loop:P}=e;if(P){for(C+=w,M+=w,O=0,L=w;Ol({chart:i,initial:t.initial,numSteps:o,currentStep:Math.min(n-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=BK.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(i=Date.now()){let t=0;this._charts.forEach((n,r)=>{if(!n.running||!n.items.length)return;const s=n.items;let w,o=s.length-1,l=!1;for(;o>=0;--o)w=s[o],w._active?(w._total>n.duration&&(n.duration=w._total),w.tick(i),l=!0):(s[o]=s[s.length-1],s.pop());l&&(r.draw(),this._notify(r,n,i,"progress")),s.length||(n.running=!1,this._notify(r,n,i,"complete"),n.initial=!1),t+=s.length}),this._lastDate=i,0===t&&(this._running=!1)}_getAnims(i){const t=this._charts;let n=t.get(i);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(i,n)),n}listen(i,t,n){this._getAnims(i).listeners[t].push(n)}add(i,t){!t||!t.length||this._getAnims(i).items.push(...t)}has(i){return this._getAnims(i).items.length>0}start(i){const t=this._charts.get(i);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((n,r)=>Math.max(n,r._duration),0),this._refresh())}running(i){if(!this._running)return!1;const t=this._charts.get(i);return!(!t||!t.running||!t.items.length)}stop(i){const t=this._charts.get(i);if(!t||!t.items.length)return;const n=t.items;let r=n.length-1;for(;r>=0;--r)n[r].cancel();t.items=[],this._notify(i,t,Date.now(),"complete")}remove(i){return this._charts.delete(i)}}var Pu=new E3t;const mZ="transparent",A3t={boolean:(e,i,t)=>t>.5?i:e,color(e,i,t){const n=WK(e||mZ),r=n.valid&&WK(i||mZ);return r&&r.valid?r.mix(n,t).hexString():i},number:(e,i,t)=>e+(i-e)*t};class D3t{constructor(i,t,n,r){const s=t[n];r=$b([i.to,r,s,i.from]);const o=$b([i.from,s,r]);this._active=!0,this._fn=i.fn||A3t[i.type||typeof o],this._easing=Wb[i.easing]||Wb.linear,this._start=Math.floor(Date.now()+(i.delay||0)),this._duration=this._total=Math.floor(i.duration),this._loop=!!i.loop,this._target=t,this._prop=n,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(i,t,n){if(this._active){this._notify(!1);const r=this._target[this._prop],s=n-this._start,o=this._duration-s;this._start=n,this._duration=Math.floor(Math.max(o,i.duration)),this._total+=s,this._loop=!!i.loop,this._to=$b([i.to,t,r,i.from]),this._from=$b([i.from,r,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(i){const t=i-this._start,n=this._duration,r=this._prop,s=this._from,o=this._loop,l=this._to;let w;if(this._active=s!==l&&(o||t1?2-w:w,w=this._easing(Math.min(1,Math.max(0,w))),this._target[r]=this._fn(s,l,w))}wait(){const i=this._promises||(this._promises=[]);return new Promise((t,n)=>{i.push({res:t,rej:n})})}_notify(i){const t=i?"res":"rej",n=this._promises||[];for(let r=0;r{const s=i[r];if(!Un(s))return;const o={};for(const l of t)o[l]=s[l];(Qr(s.properties)&&s.properties||[r]).forEach(l=>{(l===r||!n.has(l))&&n.set(l,o)})})}_animateOptions(i,t){const n=t.options,r=function I3t(e,i){if(!i)return;let t=e.options;if(t)return t.$shared&&(e.options=t=Object.assign({},t,{$shared:!1,$animations:{}})),t;e.options=i}(i,n);if(!r)return[];const s=this._createAnimations(r,n);return n.$shared&&function M3t(e,i){const t=[],n=Object.keys(i);for(let r=0;r{i.options=n},()=>{}),s}_createAnimations(i,t){const n=this._properties,r=[],s=i.$animations||(i.$animations={}),o=Object.keys(t),l=Date.now();let w;for(w=o.length-1;w>=0;--w){const C=o[w];if("$"===C.charAt(0))continue;if("options"===C){r.push(...this._animateOptions(i,t));continue}const M=t[C];let P=s[C];const O=n.get(C);if(P){if(O&&P.active()){P.update(O,M,l);continue}P.cancel()}O&&O.duration?(s[C]=P=new D3t(O,i,C,M),r.push(P)):i[C]=M}return r}update(i,t){if(0===this._properties.size)return void Object.assign(i,t);const n=this._createAnimations(i,t);return n.length?(Pu.add(this._chart,n),!0):void 0}}function gZ(e,i){const t=e&&e.options||{},n=t.reverse,r=void 0===t.min?i:0,s=void 0===t.max?i:0;return{start:n?s:r,end:n?r:s}}function vZ(e,i){const t=[],n=e._getSortedDatasetMetas(i);let r,s;for(r=0,s=n.length;r0||!t&&s<0)return r.index}return null}function bZ(e,i){const{chart:t,_cachedMeta:n}=e,r=t._stacks||(t._stacks={}),{iScale:s,vScale:o,index:l}=n,w=s.axis,C=o.axis,M=function F3t(e,i,t){return`${e.id}.${i.id}.${t.stack||t.type}`}(s,o,n),P=i.length;let O;for(let L=0;Lt[n].axis===i).shift()}function Qb(e,i){const t=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){i=i||e._parsed;for(const r of i){const s=r._stacks;if(!s||void 0===s[n]||void 0===s[n][t])return;delete s[n][t],void 0!==s[n]._visualValues&&void 0!==s[n]._visualValues[t]&&delete s[n]._visualValues[t]}}}const mL=e=>"reset"===e||"none"===e,wZ=(e,i)=>i?e:Object.assign({},e);let cf=(()=>class e{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=hL(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Qb(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),s=(O,L,U,X)=>"x"===O?L:"r"===O?X:U,o=n.xAxisID=mn(r.xAxisID,fL(t,"x")),l=n.yAxisID=mn(r.yAxisID,fL(t,"y")),w=n.rAxisID=mn(r.rAxisID,fL(t,"r")),C=n.indexAxis,M=n.iAxisID=s(C,o,l,w),P=n.vAxisID=s(C,l,o,w);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(w),n.iScale=this.getScaleForId(M),n.vScale=this.getScaleForId(P)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&LK(this._data,this),t._stacked&&Qb(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Un(n))this._data=function P3t(e,i){const{iScale:t,vScale:n}=i,r="x"===t.axis?"x":"y",s="x"===n.axis?"x":"y",o=Object.keys(e),l=new Array(o.length);let w,C,M;for(w=0,C=o.length;w{const n="_onData"+KO(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return e._chartjs.listeners.forEach(l=>{"function"==typeof l[n]&&l[n](...s)}),o}})}))}(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let s=!1;this._dataCheck();const o=n._stacked;n._stacked=hL(n.vScale,n),n.stack!==r.stack&&(s=!0,Qb(n),n.stack=r.stack),this._resyncElements(t),(s||o!==n._stacked)&&(bZ(this,n._parsed),n._stacked=hL(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:s}=this,{iScale:o,_stacked:l}=r,w=o.axis;let P,O,L,C=0===t&&n===s.length||r._sorted,M=t>0&&r._parsed[t-1];if(!1===this._parsing)r._parsed=s,r._sorted=!0,L=s;else{L=Qr(s[t])?this.parseArrayData(r,s,t,n):Un(s[t])?this.parseObjectData(r,s,t,n):this.parsePrimitiveData(r,s,t,n);const U=()=>null===O[w]||M&&O[w]e&&!i.hidden&&i._stacked&&{keys:vZ(this.chart,!0),values:null})(n,r),M={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:P,max:O}=function O3t(e){const{min:i,max:t,minDefined:n,maxDefined:r}=e.getUserBounds();return{min:n?i:Number.NEGATIVE_INFINITY,max:r?t:Number.POSITIVE_INFINITY}}(w);let L,U;function X(){U=s[L];const W=U[w.axis];return!bs(U[t.axis])||P>W||O=0;--L)if(!X()){this.updateRangeFromParsed(M,t,U,C);break}return M}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let s,o,l;for(s=0,o=n.length;s=0&&tthis.getContext(r,s,n),O);return W.$shared&&(W.$shared=C,o[l]=Object.freeze(wZ(W,C))),W}_resolveAnimations(t,n,r){const s=this.chart,o=this._cachedDataOpts,l=`animation-${n}`,w=o[l];if(w)return w;let C;if(!1!==s.options.animation){const P=this.chart.config,O=P.datasetAnimationScopeKeys(this._type,n),L=P.getOptionScopes(this.getDataset(),O);C=P.createResolver(L,this.getContext(t,r,n))}const M=new pZ(s,C&&C.animations);return C&&C._cacheable&&(o[l]=Object.freeze(M)),M}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||mL(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),s=this._sharedOptions,o=this.getSharedOptions(r),l=this.includeOptions(n,o)||o!==s;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:l}}updateElement(t,n,r,s){mL(s)?Object.assign(t,r):this._resolveAnimations(n,s).update(t,r)}updateSharedOptions(t,n,r){t&&!mL(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,s){t.active=s;const o=this.getStyle(n,s);this._resolveAnimations(n,r,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,r=this._cachedMeta.data;for(const[w,C,M]of this._syncList)this[w](C,M);this._syncList=[];const s=r.length,o=n.length,l=Math.min(o,s);l&&this.parse(0,l),o>s?this._insertElements(s,o-s,t):o{for(M.length+=n,w=M.length-1;w>=l;w--)M[w]=M[w-n]};for(C(o),w=t;wr-s))}return e._cache.$bar}(i,e.type);let r,s,o,l,n=i._length;const w=()=>{32767===o||-32768===o||(zb(l)&&(n=Math.min(n,Math.abs(o-l)||n)),l=o)};for(r=0,s=t.length;rMath.abs(l)&&(w=l,C=o),i[t.axis]=C,i._custom={barStart:w,barEnd:C,start:r,end:s,min:o,max:l}}(e,i,t,n):i[t.axis]=t.parse(e,n),i}function TZ(e,i,t,n){const r=e.iScale,s=e.vScale,o=r.getLabels(),l=r===s,w=[];let C,M,P,O;for(C=t,M=t+n;Ce.x,t="left",n="right"):(i=e.baseclass e extends cf{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,n,r,s){return TZ(t,n,r,s)}parseArrayData(t,n,r,s){return TZ(t,n,r,s)}parseObjectData(t,n,r,s){const{iScale:o,vScale:l}=t,{xAxisKey:w="x",yAxisKey:C="y"}=this._parsing,M="x"===o.axis?w:C,P="x"===l.axis?w:C,O=[];let L,U,X,W;for(L=r,U=r+s;LP.controller.options.grouped),o=r.options.stacked,l=[],w=this._cachedMeta.controller.getParsed(n),C=w&&w[r.axis],M=P=>{const O=P._parsed.find(U=>U[r.axis]===C),L=O&&O[P.vScale.axis];if(Zn(L)||isNaN(L))return!0};for(const P of s)if((void 0===n||!M(P))&&((!1===o||-1===l.indexOf(P.stack)||void 0===o&&void 0===P.stack)&&l.push(P.stack),P.index===t))break;return l.length||l.push(void 0),l}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,r){const s=this._getStacks(t,r),o=void 0!==n?s.indexOf(n):-1;return-1===o?s.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,s=[];let o,l;for(o=0,l=n.data.length;o=t?1:-1)}(W,n,w)*l,O===w&&(rt-=W/2);const st=n.getPixelForDecimal(0),vt=n.getPixelForDecimal(1),_t=Math.min(st,vt),Mt=Math.max(st,vt);rt=Math.max(Math.min(rt,Mt),_t),X=rt+W,r&&!P&&(C._stacks[n.axis]._visualValues[s]=n.getValueForPixel(X)-n.getValueForPixel(rt))}if(rt===n.getPixelForValue(w)){const st=vd(W)*n.getLineWidthForValue(w)/2;rt+=st,W-=st}return{size:W,base:rt,head:X,center:X+W/2}}_calculateBarIndexPixels(t,n){const r=n.scale,s=this.options,o=s.skipNull,l=mn(s.maxBarThickness,1/0);let w,C;if(n.grouped){const M=o?this._getStackCount(t):n.stackCount,P="flex"===s.barThickness?function H3t(e,i,t,n){const r=i.pixels,s=r[e];let o=e>0?r[e-1]:null,l=eclass e extends cf{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,n,r,s){const o=super.parsePrimitiveData(t,n,r,s);for(let l=0;l=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,l=this.getParsed(t),w=s.getLabelForValue(l.x),C=o.getLabelForValue(l.y),M=l._custom;return{label:r[t]||"",value:"("+w+", "+C+(M?", "+M:"")+")"}}update(t){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,t)}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w}=this._cachedMeta,{sharedOptions:C,includeOptions:M}=this._getSharedOptions(n,s),P=l.axis,O=w.axis;for(let L=n;Lclass e extends cf{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=t.legend.options;return n.labels.map((o,l)=>{const C=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:C.backgroundColor,strokeStyle:C.borderColor,fontColor:s,lineWidth:C.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=r;else{let l,w,o=C=>+r[C];if(Un(r[t])){const{key:C="value"}=this._parsing;o=M=>+rf(r[M],C)}for(l=t,w=t+n;l"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100:+e/i)(this.options.cutout,w),1),M=this._getRingWeight(this.index),{circumference:P,rotation:O}=this._getRotationExtents(),{ratioX:L,ratioY:U,offsetX:X,offsetY:W}=function J3t(e,i,t){let n=1,r=1,s=0,o=0;if(iHb(st,l,w,!0)?1:Math.max(vt,vt*t,_t,_t*t),U=(st,vt,_t)=>Hb(st,l,w,!0)?-1:Math.min(vt,vt*t,_t,_t*t),X=L(0,C,P),W=L(Os,M,O),Z=U(Kr,C,P),rt=U(Kr+Os,M,O);n=(X-Z)/2,r=(W-rt)/2,s=-(X+Z)/2,o=-(W+rt)/2}return{ratioX:n,ratioY:r,offsetX:s,offsetY:o}}(O,P,C),st=Math.max(Math.min((r.width-l)/L,(r.height-l)/U)/2,0),vt=EK(this.options.radius,st),Mt=(vt-Math.max(vt*C,0))/this._getVisibleDatasetWeightTotal();this.offsetX=X*vt,this.offsetY=W*vt,s.total=this.calculateTotal(),this.outerRadius=vt-Mt*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-Mt*M,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,s=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/Zr)}updateElements(t,n,r,s){const o="reset"===s,l=this.chart,w=l.chartArea,P=(w.left+w.right)/2,O=(w.top+w.bottom)/2,L=o&&l.options.animation.animateScale,U=L?0:this.innerRadius,X=L?0:this.outerRadius,{sharedOptions:W,includeOptions:Z}=this._getSharedOptions(n,s);let st,rt=this._getRotation();for(st=0;st0&&!isNaN(t)?Zr*(Math.abs(t)/n):0}getLabelAndValue(t){const r=this.chart,s=r.data.labels||[],o=Xb(this._cachedMeta._parsed[t],r.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let s,o,l,w,C;if(!t)for(s=0,o=r.data.datasets.length;sclass e extends cf{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:r,data:s=[],_dataset:o}=n,l=this.chart._animationsDisabled;let{start:w,count:C}=UK(n,s,l);this._drawStart=w,this._drawCount=C,zK(n)&&(w=0,C=s.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=s;const M=this.resolveDatasetElementOptions(t);this.options.showLine||(M.borderWidth=0),M.segment=this.options.segment,this.updateElement(r,void 0,{animated:!l,options:M},t),this.updateElements(s,w,C,t)}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w,_stacked:C,_dataset:M}=this._cachedMeta,{sharedOptions:P,includeOptions:O}=this._getSharedOptions(n,s),L=l.axis,U=w.axis,{spanGaps:X,segment:W}=this.options,Z=n0(X)?X:Number.POSITIVE_INFINITY,rt=this.chart._animationsDisabled||o||"none"===s,st=n+r,vt=t.length;let _t=n>0&&this.getParsed(n-1);for(let Mt=0;Mt=st){dt.skip=!0;continue}const pt=this.getParsed(Mt),bt=Zn(pt[U]),Tt=dt[L]=l.getPixelForValue(pt[L],Mt),Et=dt[U]=o||bt?w.getBasePixel():w.getPixelForValue(C?this.applyStack(w,pt,C):pt[U],Mt);dt.skip=isNaN(Tt)||isNaN(Et)||bt,dt.stop=Mt>0&&Math.abs(pt[L]-_t[L])>Z,W&&(dt.parsed=pt,dt.raw=M.data[Mt]),O&&(dt.options=P||this.resolveDataElementOptions(Mt,ft.active?"active":s)),rt||this.updateElement(ft,Mt,dt,s),_t=pt}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return r;const o=s[0].size(this.resolveDataElementOptions(0)),l=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(r,o,l)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}})(),EZ=(()=>class e extends cf{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:s}}=t.legend.options;return n.labels.map((o,l)=>{const C=t.getDatasetMeta(0).controller.getStyle(l);return{text:o,fillStyle:C.backgroundColor,strokeStyle:C.borderColor,fontColor:s,lineWidth:C.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(l),index:l}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,n){super(t,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const r=this.chart,s=r.data.labels||[],o=Xb(this._cachedMeta._parsed[t].r,r.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,n,r,s){return iZ.bind(this)(t,n,r,s)}update(t){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,t)}getMinMax(){const n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach((r,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(on.max&&(n.max=o))}),n}_updateRadius(){const t=this.chart,n=t.chartArea,r=t.options,s=Math.min(n.right-n.left,n.bottom-n.top),o=Math.max(s/2,0),w=(o-Math.max(r.cutoutPercentage?o/100*r.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=o-w*this.index,this.innerRadius=this.outerRadius-w}updateElements(t,n,r,s){const o="reset"===s,l=this.chart,C=l.options.animation,M=this._cachedMeta.rScale,P=M.xCenter,O=M.yCenter,L=M.getIndexAngle(0)-.5*Kr;let X,U=L;const W=360/this.countVisibleElements();for(X=0;X{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&n++}),n}_computeAngle(t,n,r){return this.chart.getDataVisibility(t)?Ac(this.resolveDataElementOptions(t,n).angle||r):0}})();var tBt=Object.freeze({__proto__:null,BarController:K3t,BubbleController:Z3t,DoughnutController:gL,LineController:q3t,PieController:(()=>class e extends gL{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}})(),PolarAreaController:EZ,RadarController:(()=>class e extends cf{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const n=this._cachedMeta.vScale,r=this.getParsed(t);return{label:n.getLabels()[t],value:""+n.getLabelForValue(r[n.axis])}}parseObjectData(t,n,r,s){return iZ.bind(this)(t,n,r,s)}update(t){const n=this._cachedMeta,r=n.dataset,s=n.data||[],o=n.iScale.getLabels();if(r.points=s,"resize"!==t){const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),this.updateElement(r,void 0,{_loop:!0,_fullLoop:o.length===s.length,options:l},t)}this.updateElements(s,0,s.length,t)}updateElements(t,n,r,s){const o=this._cachedMeta.rScale,l="reset"===s;for(let w=n;wclass e extends cf{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:s,yScale:o}=n,l=this.getParsed(t),w=s.getLabelForValue(l.x),C=o.getLabelForValue(l.y);return{label:r[t]||"",value:"("+w+", "+C+")"}}update(t){const n=this._cachedMeta,{data:r=[]}=n,s=this.chart._animationsDisabled;let{start:o,count:l}=UK(n,r,s);if(this._drawStart=o,this._drawCount=l,zK(n)&&(o=0,l=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:w,_dataset:C}=n;w._chart=this.chart,w._datasetIndex=this.index,w._decimated=!!C._decimated,w.points=r;const M=this.resolveDatasetElementOptions(t);M.segment=this.options.segment,this.updateElement(w,void 0,{animated:!s,options:M},t)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,o,l,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,n,r,s){const o="reset"===s,{iScale:l,vScale:w,_stacked:C,_dataset:M}=this._cachedMeta,P=this.resolveDataElementOptions(n,s),O=this.getSharedOptions(P),L=this.includeOptions(s,O),U=l.axis,X=w.axis,{spanGaps:W,segment:Z}=this.options,rt=n0(W)?W:Number.POSITIVE_INFINITY,st=this.chart._animationsDisabled||o||"none"===s;let vt=n>0&&this.getParsed(n-1);for(let _t=n;_t0&&Math.abs(ft[U]-vt[U])>rt,Z&&(dt.parsed=ft,dt.raw=M.data[_t]),L&&(dt.options=O||this.resolveDataElementOptions(_t,Mt.active?"active":s)),st||this.updateElement(Mt,_t,dt,s),vt=ft}this.updateSharedOptions(O,s,P)}getMaxOverflow(){const t=this._cachedMeta,n=t.data||[];if(!this.options.showLine){let w=0;for(let C=n.length-1;C>=0;--C)w=Math.max(w,n[C].size(this.resolveDataElementOptions(C))/2);return w>0&&w}const r=t.dataset,s=r.options&&r.options.borderWidth||0;if(!n.length)return s;const o=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(s,o,l)/2}})()});function Gm(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class vL{static override(i){Object.assign(vL.prototype,i)}options;constructor(i){this.options=i||{}}init(){}formats(){return Gm()}parse(){return Gm()}format(){return Gm()}add(){return Gm()}diff(){return Gm()}startOf(){return Gm()}endOf(){return Gm()}}var eBt__date=vL;function iBt(e,i,t,n){const{controller:r,data:s,_sorted:o}=e,l=r._cachedMeta.iScale;if(l&&i===l.axis&&"r"!==i&&o&&s.length){const w=l._reversePixels?_4t:Ru;if(!n)return w(s,i,t);if(r._sharedOptions){const C=s[0],M="function"==typeof C.getRange&&C.getRange(i);if(M){const P=w(s,i,t-M),O=w(s,i,t+M);return{lo:P.lo,hi:O.hi}}}}return{lo:0,hi:s.length-1}}function Kb(e,i,t,n,r){const s=e.getSortedVisibleDatasetMetas(),o=t[i];for(let l=0,w=s.length;l{w[o]&&w[o](i[t],r)&&(s.push({element:w,datasetIndex:C,index:M}),l=l||w.inRange(i.x,i.y,r))}),n&&!l?[]:s}var aBt={evaluateInteractionItems:Kb,modes:{index(e,i,t,n){const r=Um(i,e),s=t.axis||"x",o=t.includeInvisible||!1,l=t.intersect?xL(e,r,s,n,o):yL(e,r,s,!1,n,o),w=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(C=>{const M=l[0].index,P=C.data[M];P&&!P.skip&&w.push({element:P,datasetIndex:C.index,index:M})}),w):[]},dataset(e,i,t,n){const r=Um(i,e),s=t.axis||"xy",o=t.includeInvisible||!1;let l=t.intersect?xL(e,r,s,n,o):yL(e,r,s,!1,n,o);if(l.length>0){const w=l[0].datasetIndex,C=e.getDatasetMeta(w).data;l=[];for(let M=0;MxL(e,Um(i,e),t.axis||"xy",n,t.includeInvisible||!1),nearest:(e,i,t,n)=>yL(e,Um(i,e),t.axis||"xy",t.intersect,n,t.includeInvisible||!1),x:(e,i,t,n)=>AZ(e,Um(i,e),"x",t.intersect,n),y:(e,i,t,n)=>AZ(e,Um(i,e),"y",t.intersect,n)}};const DZ=["left","top","right","bottom"];function Zb(e,i){return e.filter(t=>t.pos===i)}function MZ(e,i){return e.filter(t=>-1===DZ.indexOf(t.pos)&&t.box.axis===i)}function Jb(e,i){return e.sort((t,n)=>{const r=i?n:t,s=i?t:n;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function IZ(e,i,t,n){return Math.max(e[t],i[t])+Math.max(e[n],i[n])}function RZ(e,i){e.top=Math.max(e.top,i.top),e.left=Math.max(e.left,i.left),e.bottom=Math.max(e.bottom,i.bottom),e.right=Math.max(e.right,i.right)}function uBt(e,i,t,n){const{pos:r,box:s}=t,o=e.maxPadding;if(!Un(r)){t.size&&(e[r]-=t.size);const P=n[t.stack]||{size:0,count:1};P.size=Math.max(P.size,t.horizontal?s.height:s.width),t.size=P.size/P.count,e[r]+=t.size}s.getPadding&&RZ(o,s.getPadding());const l=Math.max(0,i.outerWidth-IZ(o,e,"left","right")),w=Math.max(0,i.outerHeight-IZ(o,e,"top","bottom")),C=l!==e.w,M=w!==e.h;return e.w=l,e.h=w,t.horizontal?{same:C,other:M}:{same:M,other:C}}function fBt(e,i){const t=i.maxPadding;return function n(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(i[o],t[o])}),s}(e?["left","right"]:["top","bottom"])}function qb(e,i,t,n){const r=[];let s,o,l,w,C,M;for(s=0,o=e.length,C=0;sC.box.fullSize),!0),n=Jb(Zb(i,"left"),!0),r=Jb(Zb(i,"right")),s=Jb(Zb(i,"top"),!0),o=Jb(Zb(i,"bottom")),l=MZ(i,"x"),w=MZ(i,"y");return{fullSize:t,leftAndTop:n.concat(s),rightAndBottom:r.concat(w).concat(o).concat(l),chartArea:Zb(i,"chartArea"),vertical:n.concat(r).concat(w),horizontal:s.concat(o).concat(l)}}(e.boxes),w=l.vertical,C=l.horizontal;_r(e.boxes,X=>{"function"==typeof X.beforeLayout&&X.beforeLayout()});const M=w.reduce((X,W)=>W.box.options&&!1===W.box.options.display?X:X+1,0)||1,P=Object.freeze({outerWidth:i,outerHeight:t,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/M,hBoxMaxHeight:o/2}),O=Object.assign({},r);RZ(O,co(n));const L=Object.assign({maxPadding:O,w:s,h:o,x:r.left,y:r.top},r),U=function cBt(e,i){const t=function lBt(e){const i={};for(const t of e){const{stack:n,pos:r,stackWeight:s}=t;if(!n||!DZ.includes(r))continue;const o=i[n]||(i[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return i}(e),{vBoxMaxWidth:n,hBoxMaxHeight:r}=i;let s,o,l;for(s=0,o=e.length;s{const W=X.box;Object.assign(W,e.chartArea),W.update(L.w,L.h,{left:0,top:0,right:0,bottom:0})})}};class PZ{acquireContext(i,t){}releaseContext(i){return!1}addEventListener(i,t,n){}removeEventListener(i,t,n){}getDevicePixelRatio(){return 1}getMaximumSize(i,t,n,r){return t=Math.max(0,t||i.width),n=n||i.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}isAttached(i){return!0}updateConfig(i){}}class mBt extends PZ{acquireContext(i){return i&&i.getContext&&i.getContext("2d")||null}updateConfig(i){i.options.animation=!1}}const bE="$chartjs",pBt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},FZ=e=>null===e||""===e,OZ=!!p3t&&{passive:!0};function xBt(e,i,t){e&&e.canvas&&e.canvas.removeEventListener(i,t,OZ)}function wE(e,i){for(const t of e)if(t===i||t.contains(i))return!0}function bBt(e,i,t){const n=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||wE(l.addedNodes,n),o=o&&!wE(l.removedNodes,n);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}function wBt(e,i,t){const n=e.canvas,r=new MutationObserver(s=>{let o=!1;for(const l of s)o=o||wE(l.removedNodes,n),o=o&&!wE(l.addedNodes,n);o&&t()});return r.observe(document,{childList:!0,subtree:!0}),r}const t1=new Map;let LZ=0;function NZ(){const e=window.devicePixelRatio;e!==LZ&&(LZ=e,t1.forEach((i,t)=>{t.currentDevicePixelRatio!==e&&i()}))}function CBt(e,i,t){const n=e.canvas,r=n&&uL(n);if(!r)return;const s=VK((l,w)=>{const C=r.clientWidth;t(l,w),C{const w=l[0],C=w.contentRect.width,M=w.contentRect.height;0===C&&0===M||s(C,M)});return o.observe(r),function _Bt(e,i){t1.size||window.addEventListener("resize",NZ),t1.set(e,i)}(e,s),o}function bL(e,i,t){t&&t.disconnect(),"resize"===i&&function TBt(e){t1.delete(e),t1.size||window.removeEventListener("resize",NZ)}(e)}function SBt(e,i,t){const n=e.canvas,r=VK(s=>{null!==e.ctx&&t(function yBt(e,i){const t=pBt[e.type]||e.type,{x:n,y:r}=Um(e,i);return{type:t,chart:i,native:e,x:void 0!==n?n:null,y:void 0!==r?r:null}}(s,e))},e);return function vBt(e,i,t){e&&e.addEventListener(i,t,OZ)}(n,i,r),r}class EBt extends PZ{acquireContext(i,t){const n=i&&i.getContext&&i.getContext("2d");return n&&n.canvas===i?(function gBt(e,i){const t=e.style,n=e.getAttribute("height"),r=e.getAttribute("width");if(e[bE]={initial:{height:n,width:r,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",FZ(r)){const s=sZ(e,"width");void 0!==s&&(e.width=s)}if(FZ(n))if(""===e.style.height)e.height=e.width/(i||2);else{const s=sZ(e,"height");void 0!==s&&(e.height=s)}}(i,t),n):null}releaseContext(i){const t=i.canvas;if(!t[bE])return!1;const n=t[bE].initial;["height","width"].forEach(s=>{const o=n[s];Zn(o)?t.removeAttribute(s):t.setAttribute(s,o)});const r=n.style||{};return Object.keys(r).forEach(s=>{t.style[s]=r[s]}),t.width=t.width,delete t[bE],!0}addEventListener(i,t,n){this.removeEventListener(i,t),(i.$proxies||(i.$proxies={}))[t]=({attach:bBt,detach:wBt,resize:CBt}[t]||SBt)(i,t,n)}removeEventListener(i,t){const n=i.$proxies||(i.$proxies={}),r=n[t];r&&(({attach:bL,detach:bL,resize:bL}[t]||xBt)(i,t,r),n[t]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(i,t,n,r){return function m3t(e,i,t,n){const r=vE(e),s=Vm(r,"margin"),o=gE(r.maxWidth,e,"clientWidth")||cE,l=gE(r.maxHeight,e,"clientHeight")||cE,w=function f3t(e,i,t){let n,r;if(void 0===i||void 0===t){const s=e&&uL(e);if(s){const o=s.getBoundingClientRect(),l=vE(s),w=Vm(l,"border","width"),C=Vm(l,"padding");i=o.width-C.width-w.width,t=o.height-C.height-w.height,n=gE(l.maxWidth,s,"clientWidth"),r=gE(l.maxHeight,s,"clientHeight")}else i=e.clientWidth,t=e.clientHeight}return{width:i,height:t,maxWidth:n||cE,maxHeight:r||cE}}(e,i,t);let{width:C,height:M}=w;if("content-box"===r.boxSizing){const O=Vm(r,"border","width"),L=Vm(r,"padding");C-=L.width+O.width,M-=L.height+O.height}return C=Math.max(0,C-s.width),M=Math.max(0,n?C/n:M-s.height),C=xE(Math.min(C,o,w.maxWidth)),M=xE(Math.min(M,l,w.maxHeight)),C&&!M&&(M=xE(C/2)),(void 0!==i||void 0!==t)&&n&&w.height&&M>w.height&&(M=w.height,C=xE(Math.floor(M*n))),{width:C,height:M}}(i,t,n,r)}isAttached(i){const t=i&&uL(i);return!(!t||!t.isConnected)}}class Fu{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(i){const{x:t,y:n}=this.getProps(["x","y"],i);return{x:t,y:n}}hasValue(){return n0(this.x)&&n0(this.y)}getProps(i,t){const n=this.$animations;if(!t||!n)return this;const r={};return i.forEach(s=>{r[s]=n[s]&&n[s].active()?n[s]._to:this[s]}),r}}function _E(e,i,t,n,r){const s=mn(n,0),o=Math.min(mn(r,e.length),e.length);let w,C,M,l=0;for(t=Math.ceil(t),r&&(w=r-n,t=w/Math.floor(w/t)),M=s;M<0;)l++,M=Math.round(s+l*t);for(C=Math.max(s,0);C"top"===i||"left"===i?e[i]+t:e[i]-t,VZ=(e,i)=>Math.min(i||e,e);function UZ(e,i){const t=[],n=e.length/i,r=e.length;let s=0;for(;so+l)))return w}function e1(e){return e.drawTicks?e.tickLength:0}function zZ(e,i){if(!e.display)return 0;const t=ma(e.font,i),n=co(e.padding);return(Qr(e.text)?e.text.length:1)*t.lineHeight+n.height}function VBt(e,i,t){let n=tL(e);return(t&&"right"!==i||!t&&"right"===i)&&(n=(e=>"left"===e?"right":"right"===e?"left":e)(n)),n}class Hm extends Fu{constructor(i){super(),this.id=i.id,this.type=i.type,this.options=void 0,this.ctx=i.ctx,this.chart=i.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(i){this.options=i.setContext(this.getContext()),this.axis=i.axis,this._userMin=this.parse(i.min),this._userMax=this.parse(i.max),this._suggestedMin=this.parse(i.suggestedMin),this._suggestedMax=this.parse(i.suggestedMax)}parse(i,t){return i}getUserBounds(){let{_userMin:i,_userMax:t,_suggestedMin:n,_suggestedMax:r}=this;return i=Sl(i,Number.POSITIVE_INFINITY),t=Sl(t,Number.NEGATIVE_INFINITY),n=Sl(n,Number.POSITIVE_INFINITY),r=Sl(r,Number.NEGATIVE_INFINITY),{min:Sl(i,n),max:Sl(t,r),minDefined:bs(i),maxDefined:bs(t)}}getMinMax(i){let o,{min:t,max:n,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:t,max:n};const l=this.getMatchingVisibleMetas();for(let w=0,C=l.length;wn?n:t,n=r&&t>n?t:n,{min:Sl(t,Sl(n,t)),max:Sl(n,Sl(t,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const i=this.chart.data;return this.options.labels||(this.isHorizontal()?i.xLabels:i.yLabels)||i.labels||[]}getLabelItems(i=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(i))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Gr(this.options.beforeUpdate,[this])}update(i,t,n){const{beginAtZero:r,grace:s,ticks:o}=this.options,l=o.sampleSize;this.beforeUpdate(),this.maxWidth=i,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function j4t(e,i,t){const{min:n,max:r}=e,s=EK(i,(r-n)/2),o=(l,w)=>t&&0===l?0:l+w;return{min:o(n,-Math.abs(s)),max:o(r,s)}}(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const w=lr)return function kBt(e,i,t,n){let o,r=0,s=t[0];for(n=Math.ceil(n),o=0;or-s).pop(),i}(n);for(let o=0,l=s.length-1;or)return w}return Math.max(r,1)}(s,i,r);if(o>0){let P,O;const L=o>1?Math.round((w-l)/(o-1)):null;for(_E(i,C,M,Zn(L)?0:l-L,l),P=0,O=o-1;P=s||n<=1||!this.isHorizontal())return void(this.labelRotation=r);const M=this._getLabelSizes(),P=M.widest.width,O=M.highest.height,L=Ma(this.chart.width-P,0,this.maxWidth);l=i.offset?this.maxWidth/n:L/(n-1),P+6>l&&(l=L/(n-(i.offset?.5:1)),w=this.maxHeight-e1(i.grid)-t.padding-zZ(i.title,this.chart.options.font),C=Math.sqrt(P*P+O*O),o=ZO(Math.min(Math.asin(Ma((M.highest.height+6)/l,-1,1)),Math.asin(Ma(w/C,-1,1))-Math.asin(Ma(O/C,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){Gr(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Gr(this.options.beforeFit,[this])}fit(){const i={width:0,height:0},{chart:t,options:{ticks:n,title:r,grid:s}}=this,o=this._isVisible(),l=this.isHorizontal();if(o){const w=zZ(r,t.options.font);if(l?(i.width=this.maxWidth,i.height=e1(s)+w):(i.height=this.maxHeight,i.width=e1(s)+w),n.display&&this.ticks.length){const{first:C,last:M,widest:P,highest:O}=this._getLabelSizes(),L=2*n.padding,U=Ac(this.labelRotation),X=Math.cos(U),W=Math.sin(U);l?i.height=Math.min(this.maxHeight,i.height+(n.mirror?0:W*P.width+X*O.height)+L):i.width=Math.min(this.maxWidth,i.width+(n.mirror?0:X*P.width+W*O.height)+L),this._calculatePadding(C,M,W,X)}}this._handleMargins(),l?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=i.height):(this.width=i.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(i,t,n,r){const{ticks:{align:s,padding:o},position:l}=this.options,w=0!==this.labelRotation,C="top"!==l&&"x"===this.axis;if(this.isHorizontal()){const M=this.getPixelForTick(0)-this.left,P=this.right-this.getPixelForTick(this.ticks.length-1);let O=0,L=0;w?C?(O=r*i.width,L=n*t.height):(O=n*i.height,L=r*t.width):"start"===s?L=t.width:"end"===s?O=i.width:"inner"!==s&&(O=i.width/2,L=t.width/2),this.paddingLeft=Math.max((O-M+o)*this.width/(this.width-M),0),this.paddingRight=Math.max((L-P+o)*this.width/(this.width-P),0)}else{let M=t.height/2,P=i.height/2;"start"===s?(M=0,P=i.height):"end"===s&&(M=t.height,P=0),this.paddingTop=M+o,this.paddingBottom=P+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Gr(this.options.afterFit,[this])}isHorizontal(){const{axis:i,position:t}=this.options;return"top"===t||"bottom"===t||"x"===i}isFullSize(){return this.options.fullSize}_convertTicksToLabels(i){let t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(i),t=0,n=i.length;t{const n=t.gc,r=n.length/2;let s;if(r>i){for(s=0;s({width:o[pt]||0,height:l[pt]||0});return{first:dt(0),last:dt(t-1),widest:dt(Mt),highest:dt(ft),widths:o,heights:l}}getLabelForValue(i){return i}getPixelForValue(i,t){return NaN}getValueForPixel(i){}getPixelForTick(i){const t=this.ticks;return i<0||i>t.length-1?null:this.getPixelForValue(t[i].value)}getPixelForDecimal(i){this._reversePixels&&(i=1-i);const t=this._startPixel+i*this._length;return function w4t(e){return Ma(e,-32768,32767)}(this._alignToPixels?Lm(this.chart,t,0):t)}getDecimalForPixel(i){const t=(i-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:i,max:t}=this;return i<0&&t<0?t:i>0&&t>0?i:0}getContext(i){const t=this.ticks||[];if(i>=0&&il*r?l/n:w/r:w*r0}_computeGridLineItems(i){const t=this.axis,n=this.chart,r=this.options,{grid:s,position:o,border:l}=r,w=s.offset,C=this.isHorizontal(),P=this.ticks.length+(w?1:0),O=e1(s),L=[],U=l.setContext(this.getContext()),X=U.display?U.width:0,W=X/2,Z=function(fe){return Lm(n,fe,X)};let rt,st,vt,_t,Mt,ft,dt,pt,bt,Tt,Et,Dt;if("top"===o)rt=Z(this.bottom),ft=this.bottom-O,pt=rt-W,Tt=Z(i.top)+W,Dt=i.bottom;else if("bottom"===o)rt=Z(this.top),Tt=i.top,Dt=Z(i.bottom)-W,ft=rt+W,pt=this.top+O;else if("left"===o)rt=Z(this.right),Mt=this.right-O,dt=rt-W,bt=Z(i.left)+W,Et=i.right;else if("right"===o)rt=Z(this.left),bt=i.left,Et=Z(i.right)-W,Mt=rt+W,dt=this.left+O;else if("x"===t){if("center"===o)rt=Z((i.top+i.bottom)/2+.5);else if(Un(o)){const fe=Object.keys(o)[0];rt=Z(this.chart.scales[fe].getPixelForValue(o[fe]))}Tt=i.top,Dt=i.bottom,ft=rt+W,pt=ft+O}else if("y"===t){if("center"===o)rt=Z((i.left+i.right)/2);else if(Un(o)){const fe=Object.keys(o)[0];rt=Z(this.chart.scales[fe].getPixelForValue(o[fe]))}Mt=rt-W,dt=Mt-O,bt=i.left,Et=i.right}const Le=mn(r.ticks.maxTicksLimit,P),ge=Math.max(1,Math.ceil(P/Le));for(st=0;st0&&(ui-=Ce/2)}Ei={left:ui,top:oi,width:Ce+Kt.width,height:ke+Kt.height,color:ge.backdropColor}}W.push({label:vt,font:pt,textOffset:Et,options:{rotation:X,color:Qt,strokeColor:_e,strokeWidth:Ne,textAlign:Se,textBaseline:Dt,translation:[_t,Mt],backdrop:Ei}})}return W}_getXAxisLabelAlignment(){const{position:i,ticks:t}=this.options;if(-Ac(this.labelRotation))return"top"===i?"left":"right";let r="center";return"start"===t.align?r="left":"end"===t.align?r="right":"inner"===t.align&&(r="inner"),r}_getYAxisLabelAlignment(i){const{position:t,ticks:{crossAlign:n,mirror:r,padding:s}}=this.options,l=i+s,w=this._getLabelSizes().widest.width;let C,M;return"left"===t?r?(M=this.right+s,"near"===n?C="left":"center"===n?(C="center",M+=w/2):(C="right",M+=w)):(M=this.right-l,"near"===n?C="right":"center"===n?(C="center",M-=w/2):(C="left",M=this.left)):"right"===t?r?(M=this.left+s,"near"===n?C="right":"center"===n?(C="center",M-=w/2):(C="left",M-=w)):(M=this.left+l,"near"===n?C="left":"center"===n?(C="center",M+=w/2):(C="right",M=this.right)):C="right",{textAlign:C,x:M}}_computeLabelArea(){if(this.options.ticks.mirror)return;const i=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:i.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:i.width}:void 0}drawBackground(){const{ctx:i,options:{backgroundColor:t},left:n,top:r,width:s,height:o}=this;t&&(i.save(),i.fillStyle=t,i.fillRect(n,r,s,o),i.restore())}getLineWidthForValue(i){const t=this.options.grid;if(!this._isVisible()||!t.display)return 0;const r=this.ticks.findIndex(s=>s.value===i);return r>=0?t.setContext(this.getContext(r)).lineWidth:0}drawGrid(i){const t=this.options.grid,n=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(i));let s,o;const l=(w,C,M)=>{!M.width||!M.color||(n.save(),n.lineWidth=M.width,n.strokeStyle=M.color,n.setLineDash(M.borderDash||[]),n.lineDashOffset=M.borderDashOffset,n.beginPath(),n.moveTo(w.x,w.y),n.lineTo(C.x,C.y),n.stroke(),n.restore())};if(t.display)for(s=0,o=r.length;s{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]:[{z:t,draw:s=>{this.draw(s)}}]}getMatchingVisibleMetas(i){const t=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",r=[];let s,o;for(s=0,o=t.length;s{const n=t.split("."),r=n.pop(),s=[e].concat(n).join("."),o=i[t].split("."),l=o.pop(),w=o.join(".");as.route(s,r,w,l)})}(i,e.defaultRoutes),e.descriptors&&as.describe(i,e.descriptors)}(i,o,n),this.override&&as.override(i.id,i.overrides)),o}get(i){return this.items[i]}unregister(i){const t=this.items,n=i.id,r=this.scope;n in t&&delete t[n],r&&n in as[r]&&(delete as[r][n],this.override&&delete Om[n])}}class WBt{constructor(){this.controllers=new TE(cf,"datasets",!0),this.elements=new TE(Fu,"elements"),this.plugins=new TE(Object,"plugins"),this.scales=new TE(Hm,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...i){this._each("register",i)}remove(...i){this._each("unregister",i)}addControllers(...i){this._each("register",i,this.controllers)}addElements(...i){this._each("register",i,this.elements)}addPlugins(...i){this._each("register",i,this.plugins)}addScales(...i){this._each("register",i,this.scales)}getController(i){return this._get(i,this.controllers,"controller")}getElement(i){return this._get(i,this.elements,"element")}getPlugin(i){return this._get(i,this.plugins,"plugin")}getScale(i){return this._get(i,this.scales,"scale")}removeControllers(...i){this._each("unregister",i,this.controllers)}removeElements(...i){this._each("unregister",i,this.elements)}removePlugins(...i){this._each("unregister",i,this.plugins)}removeScales(...i){this._each("unregister",i,this.scales)}_each(i,t,n){[...t].forEach(r=>{const s=n||this._getRegistryForType(r);n||s.isForType(r)||s===this.plugins&&r.id?this._exec(i,s,r):_r(r,o=>{const l=n||this._getRegistryForType(o);this._exec(i,l,o)})})}_exec(i,t,n){const r=KO(i);Gr(n["before"+r],[],n),t[i](n),Gr(n["after"+r],[],n)}_getRegistryForType(i){for(let t=0;ts.filter(l=>!o.some(w=>l.plugin.id===w.plugin.id));this._notify(r(t,n),i,"stop"),this._notify(r(n,t),i,"start")}}function YBt(e,i){return i||!1!==e?!0===e?{}:e:null}function QBt(e,{plugin:i,local:t},n,r){const s=e.pluginScopeKeys(i),o=e.getOptionScopes(n,s);return t&&i.defaults&&o.push(i.defaults),e.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function wL(e,i){return((i.datasets||{})[e]||{}).indexAxis||i.indexAxis||(as.datasets[e]||{}).indexAxis||"x"}function GZ(e){if("x"===e||"y"===e||"r"===e)return e}function JBt(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function _L(e,...i){if(GZ(e))return e;for(const t of i){const n=t.axis||JBt(t.position)||e.length>1&&GZ(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function HZ(e,i,t){if(t[i+"AxisID"]===e)return{axis:i}}function WZ(e){const i=e.options||(e.options={});i.plugins=mn(i.plugins,{}),i.scales=function t5t(e,i){const t=Om[e.type]||{scales:{}},n=i.scales||{},r=wL(e.type,i),s=Object.create(null);return Object.keys(n).forEach(o=>{const l=n[o];if(!Un(l))return console.error(`Invalid scale configuration for scale: ${o}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const w=_L(o,l,function qBt(e,i){if(i.data&&i.data.datasets){const t=i.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(t.length)return HZ(e,"x",t[0])||HZ(e,"y",t[0])}return{}}(o,e),as.scales[l.type]),C=function ZBt(e,i){return e===i?"_index_":"_value_"}(w,r),M=t.scales||{};s[o]=Ub(Object.create(null),[{axis:w},l,M[w],M[C]])}),e.data.datasets.forEach(o=>{const l=o.type||e.type,w=o.indexAxis||wL(l,i),M=(Om[l]||{}).scales||{};Object.keys(M).forEach(P=>{const O=function KBt(e,i){let t=e;return"_index_"===e?t=i:"_value_"===e&&(t="x"===i?"y":"x"),t}(P,w),L=o[O+"AxisID"]||O;s[L]=s[L]||Object.create(null),Ub(s[L],[{axis:O},n[L],M[P]])})}),Object.keys(s).forEach(o=>{const l=s[o];Ub(l,[as.scales[l.type],as.scale])}),s}(e,i)}function XZ(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}const jZ=new Map,YZ=new Set;function CE(e,i){let t=jZ.get(e);return t||(t=i(),jZ.set(e,t),YZ.add(t)),t}const n1=(e,i,t)=>{const n=rf(i,t);void 0!==n&&e.add(n)};class i5t{constructor(i){this._config=function e5t(e){return(e=e||{}).data=XZ(e.data),WZ(e),e}(i),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(i){this._config.type=i}get data(){return this._config.data}set data(i){this._config.data=XZ(i)}get options(){return this._config.options}set options(i){this._config.options=i}get plugins(){return this._config.plugins}update(){const i=this._config;this.clearCache(),WZ(i)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(i){return CE(i,()=>[[`datasets.${i}`,""]])}datasetAnimationScopeKeys(i,t){return CE(`${i}.transition.${t}`,()=>[[`datasets.${i}.transitions.${t}`,`transitions.${t}`],[`datasets.${i}`,""]])}datasetElementScopeKeys(i,t){return CE(`${i}-${t}`,()=>[[`datasets.${i}.elements.${t}`,`datasets.${i}`,`elements.${t}`,""]])}pluginScopeKeys(i){const t=i.id;return CE(`${this.type}-plugin-${t}`,()=>[[`plugins.${t}`,...i.additionalOptionScopes||[]]])}_cachedScopes(i,t){const n=this._scopeCache;let r=n.get(i);return(!r||t)&&(r=new Map,n.set(i,r)),r}getOptionScopes(i,t,n){const{options:r,type:s}=this,o=this._cachedScopes(i,n),l=o.get(t);if(l)return l;const w=new Set;t.forEach(M=>{i&&(w.add(i),M.forEach(P=>n1(w,i,P))),M.forEach(P=>n1(w,r,P)),M.forEach(P=>n1(w,Om[s]||{},P)),M.forEach(P=>n1(w,as,P)),M.forEach(P=>n1(w,nL,P))});const C=Array.from(w);return 0===C.length&&C.push(Object.create(null)),YZ.has(t)&&o.set(t,C),C}chartOptionScopes(){const{options:i,type:t}=this;return[i,Om[t]||{},as.datasets[t]||{},{type:t},as,nL]}resolveNamedOptions(i,t,n,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:l}=$Z(this._resolverCache,i,r);let w=o;(function r5t(e,i){const{isScriptable:t,isIndexable:n}=KK(e);for(const r of i){const s=t(r),o=n(r),l=(o||s)&&e[r];if(s&&(sf(l)||n5t(l))||o&&Qr(l))return!0}return!1})(o,t)&&(s.$shared=!1,w=r0(o,n=sf(n)?n():n,this.createResolver(i,n,l)));for(const C of t)s[C]=w[C];return s}createResolver(i,t,n=[""],r){const{resolver:s}=$Z(this._resolverCache,i,n);return Un(t)?r0(s,t,void 0,r):s}}function $Z(e,i,t){let n=e.get(i);n||(n=new Map,e.set(i,n));const r=t.join();let s=n.get(r);return s||(s={resolver:oL(i,t),subPrefixes:t.filter(l=>!l.toLowerCase().includes("hover"))},n.set(r,s)),s}const n5t=e=>Un(e)&&Object.getOwnPropertyNames(e).some(i=>sf(e[i])),a5t=["top","bottom","left","right","chartArea"];function QZ(e,i){return"top"===e||"bottom"===e||-1===a5t.indexOf(e)&&"x"===i}function KZ(e,i){return function(t,n){return t[e]===n[e]?t[i]-n[i]:t[e]-n[e]}}function ZZ(e){const i=e.chart,t=i.options.animation;i.notifyPlugins("afterRender"),Gr(t&&t.onComplete,[e],i)}function o5t(e){const i=e.chart,t=i.options.animation;Gr(t&&t.onProgress,[e],i)}function JZ(e){return dL()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const SE={},qZ=e=>{const i=JZ(e);return Object.values(SE).filter(t=>t.canvas===i).pop()};function l5t(e,i,t){const n=Object.keys(e);for(const r of n){const s=+r;if(s>=i){const o=e[r];delete e[r],(t>0||s>i)&&(e[s+t]=o)}}}function EE(e,i,t){return e.options.clip?e[t]:i[t]}let TL=(()=>class e{static defaults=as;static instances=SE;static overrides=Om;static registry=xd;static version="4.4.7";static getChart=qZ;static register(...t){xd.add(...t),tJ()}static unregister(...t){xd.remove(...t),tJ()}constructor(t,n){const r=this.config=new i5t(n),s=JZ(t),o=qZ(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const l=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||function ABt(e){return!dL()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?mBt:EBt}(s)),this.platform.updateConfig(r);const w=this.platform.acquireContext(s,l.aspectRatio),C=w&&w.canvas,M=C&&C.height,P=C&&C.width;this.id=c4t(),this.ctx=w,this.canvas=C,this.width=P,this.height=M,this._options=l,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new XBt,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function S4t(e,i){let t;return function(...n){return i?(clearTimeout(t),t=setTimeout(e,i,n)):e.apply(this,n),i}}(O=>this.update(O),l.resizeDelay||0),this._dataChanges=[],SE[this.id]=this,w&&C?(Pu.listen(this,"complete",ZZ),Pu.listen(this,"progress",o5t),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:s,_aspectRatio:o}=this;return Zn(t)?n&&o?o:s?r/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return xd}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():rZ(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return YK(this.canvas,this.ctx),this}stop(){return Pu.stop(this),this}resize(t,n){Pu.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,l=this.platform.getMaximumSize(this.canvas,t,n,r.maintainAspectRatio&&this.aspectRatio),w=r.devicePixelRatio||this.platform.getDevicePixelRatio(),C=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,rZ(this,w,!0)&&(this.notifyPlugins("resize",{size:l}),Gr(r.onResize,[this,l],this),this.attached&&this._doResize(C)&&this.render())}ensureScalesHaveIDs(){_r(this.options.scales||{},(r,s)=>{r.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,s=Object.keys(r).reduce((l,w)=>(l[w]=!1,l),{});let o=[];n&&(o=o.concat(Object.keys(n).map(l=>{const w=n[l],C=_L(l,w),M="r"===C,P="x"===C;return{options:w,dposition:M?"chartArea":P?"bottom":"left",dtype:M?"radialLinear":P?"category":"linear"}}))),_r(o,l=>{const w=l.options,C=w.id,M=_L(C,w),P=mn(w.type,l.dtype);(void 0===w.position||QZ(w.position,M)!==QZ(l.dposition))&&(w.position=l.dposition),s[C]=!0;let O=null;C in r&&r[C].type===P?O=r[C]:(O=new(xd.getScale(P))({id:C,type:P,ctx:this.ctx,chart:this}),r[O.id]=O),O.init(w,t)}),_r(s,(l,w)=>{l||delete r[w]}),_r(r,l=>{uo.configure(this,l,l.options),uo.addBox(this,l)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((s,o)=>s.index-o.index),r>n){for(let s=n;sn.length&&delete this._stacks,t.forEach((r,s)=>{0===n.filter(o=>o===r._dataset).length&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,s;for(this._removeUnreferencedMetasets(),r=0,s=n.length;r{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let M=0,P=this.data.datasets.length;M{M.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(KZ("z","_idx"));const{_active:w,_lastEvent:C}=this;C?this._eventHandler(C,!0):w.length&&this._updateHoverStyles(w,w,!0),this.render()}_updateScales(){_r(this.scales,t=>{uo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!MK(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:s,count:o}of n)l5t(t,s,"_removeElements"===r?-o:o)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(l=>l[0]===o).map((l,w)=>w+","+l.splice(1).join(","))),s=r(0);for(let o=1;oo.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;uo.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],_r(this.boxes,s=>{r&&"chartArea"===s.position||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let n=0,r=this.data.datasets.length;n=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r=t._clip,s=!r.disabled,o=function d5t(e,i){const{xScale:t,yScale:n}=e;return t&&n?{left:EE(t,i,"left"),right:EE(t,i,"right"),top:EE(n,i,"top"),bottom:EE(n,i,"bottom")}:i}(t,this.chartArea),l={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",l)&&(s&&fE(n,{left:!1===r.left?0:o.left-r.left,right:!1===r.right?this.width:o.right+r.right,top:!1===r.top?0:o.top-r.top,bottom:!1===r.bottom?this.height:o.bottom+r.bottom}),t.controller.draw(),s&&mE(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(t){return ku(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,s){const o=aBt.modes[n];return"function"==typeof o?o(this,t,r,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let s=r.filter(o=>o&&o._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(s)),s}getContext(){return this.$context||(this.$context=lf(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return"boolean"==typeof r.hidden?!r.hidden:!n.hidden}setDatasetVisibility(t,n){this.getDatasetMeta(t).hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const s=r?"show":"hide",o=this.getDatasetMeta(t),l=o.controller._resolveAnimations(void 0,s);zb(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),l.update(o,{visible:r}),this.update(w=>w.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),Pu.remove(this),t=0,n=this.data.datasets.length;t{n.addEventListener(this,o,l),t[o]=l},s=(o,l,w)=>{o.offsetX=l,o.offsetY=w,this._eventHandler(o)};_r(this.options.events,o=>r(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(C,M)=>{n.addEventListener(this,C,M),t[C]=M},s=(C,M)=>{t[C]&&(n.removeEventListener(this,C,M),delete t[C])},o=(C,M)=>{this.canvas&&this.resize(C,M)};let l;const w=()=>{s("attach",w),this.attached=!0,this.resize(),r("resize",o),r("detach",l)};l=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),r("attach",w)},n.isAttached(this.canvas)?w():l()}unbindEvents(){_r(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},_r(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const s=r?"set":"remove";let o,l,w,C;for("dataset"===n&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),w=0,C=t.length;w{const w=this.getDatasetMeta(o);if(!w)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:w.data[l],index:l}});!oE(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return 1===this._plugins._cache.filter(n=>n.plugin.id===t).length}_updateHoverStyles(t,n,r){const s=this.options.hover,o=(C,M)=>C.filter(P=>!M.some(O=>P.datasetIndex===O.datasetIndex&&P.index===O.index)),l=o(n,t),w=r?t:o(t,n);l.length&&this.updateHoverStyle(l,s.mode,!1),w.length&&s.mode&&this.updateHoverStyle(w,s.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=l=>(l.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",r,s))return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,s),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:s=[],options:o}=this,w=this._getActiveElements(t,s,r,n),C=function p4t(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(t),M=function c5t(e,i,t,n){return t&&"mouseout"!==e.type?n?i:e:null}(t,this._lastEvent,r,C);r&&(this._lastEvent=null,Gr(o.onHover,[t,w,this],this),C&&Gr(o.onClick,[t,w,this],this));const P=!oE(w,s);return(P||n)&&(this._active=w,this._updateHoverStyles(w,s,n)),this._lastEvent=M,P}_getActiveElements(t,n,r,s){if("mouseout"===t.type)return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}})();function tJ(){return _r(TL.instances,e=>e._plugins.invalidate())}function o0(e,i,t,n){return{x:t+e*Math.cos(i),y:n+e*Math.sin(i)}}function AE(e,i,t,n,r,s){const{x:o,y:l,startAngle:w,pixelMargin:C,innerRadius:M}=i,P=Math.max(i.outerRadius+n+t-C,0),O=M>0?M+n+t+C:0;let L=0;const U=r-w;if(n){const Qt=((M>0?M-n:0)+(P>0?P-n:0))/2;L=(U-(0!==Qt?U*Qt/(Qt+n):U))/2}const W=(U-Math.max(.001,U*P-t/Kr)/P)/2,Z=w+W+L,rt=r-W-L,{outerStart:st,outerEnd:vt,innerStart:_t,innerEnd:Mt}=function f5t(e,i,t,n){const r=function h5t(e){return aL(e,["outerStart","outerEnd","innerStart","innerEnd"])}(e.options.borderRadius),s=(t-i)/2,o=Math.min(s,n*i/2),l=w=>{const C=(t-Math.min(s,w))*n/2;return Ma(w,0,Math.min(s,C))};return{outerStart:l(r.outerStart),outerEnd:l(r.outerEnd),innerStart:Ma(r.innerStart,0,o),innerEnd:Ma(r.innerEnd,0,o)}}(i,O,P,rt-Z),ft=P-st,dt=P-vt,pt=Z+st/ft,bt=rt-vt/dt,Tt=O+_t,Et=O+Mt,Dt=Z+_t/Tt,Le=rt-Mt/Et;if(e.beginPath(),s){const ge=(pt+bt)/2;if(e.arc(o,l,P,pt,ge),e.arc(o,l,P,ge,bt),vt>0){const Ne=o0(dt,bt,o,l);e.arc(Ne.x,Ne.y,vt,bt,rt+Os)}const fe=o0(Et,rt,o,l);if(e.lineTo(fe.x,fe.y),Mt>0){const Ne=o0(Et,Le,o,l);e.arc(Ne.x,Ne.y,Mt,rt+Os,Le+Math.PI)}const Qt=(rt-Mt/O+(Z+_t/O))/2;if(e.arc(o,l,O,rt-Mt/O,Qt,!0),e.arc(o,l,O,Qt,Z+_t/O,!0),_t>0){const Ne=o0(Tt,Dt,o,l);e.arc(Ne.x,Ne.y,_t,Dt+Math.PI,Z-Os)}const _e=o0(ft,Z,o,l);if(e.lineTo(_e.x,_e.y),st>0){const Ne=o0(ft,pt,o,l);e.arc(Ne.x,Ne.y,st,Z-Os,pt)}}else{e.moveTo(o,l);const ge=Math.cos(pt)*P+o,fe=Math.sin(pt)*P+l;e.lineTo(ge,fe);const Qt=Math.cos(bt)*P+o,_e=Math.sin(bt)*P+l;e.lineTo(Qt,_e)}e.closePath()}function eJ(e,i,t=i){e.lineCap=mn(t.borderCapStyle,i.borderCapStyle),e.setLineDash(mn(t.borderDash,i.borderDash)),e.lineDashOffset=mn(t.borderDashOffset,i.borderDashOffset),e.lineJoin=mn(t.borderJoinStyle,i.borderJoinStyle),e.lineWidth=mn(t.borderWidth,i.borderWidth),e.strokeStyle=mn(t.borderColor,i.borderColor)}function v5t(e,i,t){e.lineTo(t.x,t.y)}function iJ(e,i,t={}){const n=e.length,{start:r=0,end:s=n-1}=t,{start:o,end:l}=i,w=Math.max(r,o),C=Math.min(s,l);return{count:n,start:w,loop:i.loop,ilen:Cl&&s>l)?n+C-w:C-w}}function y5t(e,i,t,n){const{points:r,options:s}=i,{count:o,start:l,loop:w,ilen:C}=iJ(r,t,n),M=function x5t(e){return e.stepped?N4t:e.tension||"monotone"===e.cubicInterpolationMode?B4t:v5t}(s);let L,U,X,{move:P=!0,reverse:O}=n||{};for(L=0;L<=C;++L)U=r[(l+(O?C-L:L))%o],!U.skip&&(P?(e.moveTo(U.x,U.y),P=!1):M(e,X,U,O,s.stepped),X=U);return w&&(U=r[(l+(O?C:0))%o],M(e,X,U,O,s.stepped)),!!w}function b5t(e,i,t,n){const r=i.points,{count:s,start:o,ilen:l}=iJ(r,t,n),{move:w=!0,reverse:C}=n||{};let O,L,U,X,W,Z,M=0,P=0;const rt=vt=>(o+(C?l-vt:vt))%s,st=()=>{X!==W&&(e.lineTo(M,W),e.lineTo(M,X),e.lineTo(M,Z))};for(w&&(L=r[rt(0)],e.moveTo(L.x,L.y)),O=0;O<=l;++O){if(L=r[rt(O)],L.skip)continue;const vt=L.x,_t=L.y,Mt=0|vt;Mt===U?(_tW&&(W=_t),M=(P*M+vt)/++P):(st(),e.lineTo(vt,_t),U=Mt,P=0,X=W=_t),Z=_t}st()}function CL(e){const i=e.options;return e._decimated||e._loop||i.tension||"monotone"===i.cubicInterpolationMode||i.stepped||i.borderDash&&i.borderDash.length?y5t:b5t}const C5t="function"==typeof Path2D;let DE=(()=>class e extends Fu{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const r=this.options;!r.tension&&"monotone"!==r.cubicInterpolationMode||r.stepped||this._pointsUpdated||(l3t(this._points,r,t,r.spanGaps?this._loop:this._fullLoop,n),this._pointsUpdated=!0)}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function T3t(e,i){const t=e.points,n=e.options.spanGaps,r=t.length;if(!r)return[];const s=!!e._loop,{start:o,end:l}=function w3t(e,i,t,n){let r=0,s=i-1;if(t&&!n)for(;rr&&e[s%i].skip;)s--;return s%=i,{start:r,end:s}}(t,r,s,n);return function hZ(e,i,t,n){return n&&n.setContext&&t?function C3t(e,i,t,n){const r=e._chart.getContext(),s=fZ(e.options),{_datasetIndex:o,options:{spanGaps:l}}=e,w=t.length,C=[];let M=s,P=i[0].start,O=P;function L(U,X,W,Z){const rt=l?-1:1;if(U!==X){for(U+=w;t[U%w].skip;)U-=rt;for(;t[X%w].skip;)X+=rt;U%w!=X%w&&(C.push({start:U%w,end:X%w,loop:W,style:Z}),M=Z,P=X%w)}}for(const U of i){P=l?P:U.start;let W,X=t[P%w];for(O=P+1;O<=U.end;O++){const Z=t[O%w];W=fZ(n.setContext(lf(r,{type:"segment",p0:X,p1:Z,p0DataIndex:(O-1)%w,p1DataIndex:O%w,datasetIndex:o}))),S3t(W,M)&&L(P,O-1,U.loop,M),X=Z,M=W}Pclass e extends Fu{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,n,r){const s=this.options,{x:o,y:l}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-l,2)"borderDash"!==i};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(i){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,i&&Object.assign(this,i)}inRange(i,t,n){const r=this.getProps(["x","y"],n),{angle:s,distance:o}=FK(r,{x:i,y:t}),{startAngle:l,endAngle:w,innerRadius:C,outerRadius:M,circumference:P}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),O=(this.options.spacing+this.options.borderWidth)/2,L=mn(P,w-l),U=Hb(s,l,w)&&l!==w,X=L>=Zr||U,W=Iu(o,C+O,M+O);return X&&W}getCenterPoint(i){const{x:t,y:n,startAngle:r,endAngle:s,innerRadius:o,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],i),{offset:w,spacing:C}=this.options,M=(r+s)/2,P=(o+l+C+w)/2;return{x:t+Math.cos(M)*P,y:n+Math.sin(M)*P}}tooltipPosition(i){return this.getCenterPoint(i)}draw(i){const{options:t,circumference:n}=this,r=(t.offset||0)/4,s=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>Zr?Math.floor(n/Zr):0,0===n||this.innerRadius<0||this.outerRadius<0)return;i.save();const l=(this.startAngle+this.endAngle)/2;i.translate(Math.cos(l)*r,Math.sin(l)*r);const C=r*(1-Math.sin(Math.min(Kr,n||0)));i.fillStyle=t.backgroundColor,i.strokeStyle=t.borderColor,function m5t(e,i,t,n,r){const{fullCircles:s,startAngle:o,circumference:l}=i;let w=i.endAngle;if(s){AE(e,i,t,n,w,r);for(let C=0;Cr?(C=r/w,e.arc(s,o,w,t+C,n-C,!0)):e.arc(s,o,r,t+Os,n-Os),e.closePath(),e.clip()}(e,i,U),s||(AE(e,i,t,n,U,r),e.stroke())}(i,this,C,s,o),i.restore()}},BarElement:class k5t extends Fu{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(i){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,i&&Object.assign(this,i)}draw(i){const{inflateAmount:t,options:{borderColor:n,backgroundColor:r}}=this,{inner:s,outer:o}=function M5t(e){const i=rJ(e),t=i.right-i.left,n=i.bottom-i.top,r=function A5t(e,i,t){const r=e.borderSkipped,s=QK(e.options.borderWidth);return{t:df(r.top,s.top,0,t),r:df(r.right,s.right,0,i),b:df(r.bottom,s.bottom,0,t),l:df(r.left,s.left,0,i)}}(e,t/2,n/2),s=function D5t(e,i,t){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),r=e.options.borderRadius,s=Bm(r),o=Math.min(i,t),l=e.borderSkipped,w=n||Un(r);return{topLeft:df(!w||l.top||l.left,s.topLeft,0,o),topRight:df(!w||l.top||l.right,s.topRight,0,o),bottomLeft:df(!w||l.bottom||l.left,s.bottomLeft,0,o),bottomRight:df(!w||l.bottom||l.right,s.bottomRight,0,o)}}(e,t/2,n/2);return{outer:{x:i.left,y:i.top,w:t,h:n,radius:s},inner:{x:i.left+r.l,y:i.top+r.t,w:t-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}(this),l=function I5t(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}(o.radius)?Yb:R5t;i.save(),(o.w!==s.w||o.h!==s.h)&&(i.beginPath(),l(i,EL(o,t,s)),i.clip(),l(i,EL(s,-t,o)),i.fillStyle=n,i.fill("evenodd")),i.beginPath(),l(i,EL(s,t)),i.fillStyle=r,i.fill(),i.restore()}inRange(i,t,n){return SL(this,i,t,n)}inXRange(i,t){return SL(this,i,null,t)}inYRange(i,t){return SL(this,null,i,t)}getCenterPoint(i){const{x:t,y:n,base:r,horizontal:s}=this.getProps(["x","y","base","horizontal"],i);return{x:s?(t+r)/2:t,y:s?n:(n+r)/2}}getRange(i){return"x"===i?this.width/2:this.height/2}},LineElement:DE,PointElement:E5t});const AL=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],sJ=AL.map(e=>e.replace("rgb(","rgba(").replace(")",", 0.5)"));function aJ(e){return AL[e%AL.length]}function oJ(e){return sJ[e%sJ.length]}function lJ(e){let i;for(i in e)if(e[i].borderColor||e[i].backgroundColor)return!0;return!1}var U5t={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(e,i,t){if(!t.enabled)return;const{data:{datasets:n},options:r}=e.config,{elements:s}=r,o=lJ(n)||function B5t(e){return e&&(e.borderColor||e.backgroundColor)}(r)||s&&lJ(s)||function V5t(){return"rgba(0,0,0,0.1)"!==as.borderColor||"rgba(0,0,0,0.1)"!==as.backgroundColor}();if(!t.forceOverride&&o)return;const l=function N5t(e){let i=0;return(t,n)=>{const r=e.getDatasetMeta(n).controller;r instanceof gL?i=function O5t(e,i){return e.backgroundColor=e.data.map(()=>aJ(i++)),i}(t,i):r instanceof EZ?i=function L5t(e,i){return e.backgroundColor=e.data.map(()=>oJ(i++)),i}(t,i):r&&(i=function F5t(e,i){return e.borderColor=aJ(i),e.backgroundColor=oJ(i),++i}(t,i))}}(e);n.forEach(l)}};function cJ(e){if(e._decimated){const i=e._data;delete e._decimated,delete e._data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,writable:!0,value:i})}}function dJ(e){e.data.datasets.forEach(i=>{cJ(i)})}var W5t={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(e,i,t)=>{if(!t.enabled)return void dJ(e);const n=e.width;e.data.datasets.forEach((r,s)=>{const{_data:o,indexAxis:l}=r,w=e.getDatasetMeta(s),C=o||r.data;if("y"===$b([l,e.options.indexAxis])||!w.controller.supportsDecimation)return;const M=e.scales[w.xAxisID];if("linear"!==M.type&&"time"!==M.type||e.options.parsing)return;let U,{start:P,count:O}=function H5t(e,i){const t=i.length;let r,n=0;const{iScale:s}=e,{min:o,max:l,minDefined:w,maxDefined:C}=s.getUserBounds();return w&&(n=Ma(Ru(i,s.axis,o).lo,0,t-1)),r=C?Ma(Ru(i,s.axis,l).hi+1,n,t)-n:t-n,{start:n,count:r}}(w,C);if(O<=(t.threshold||4*n))cJ(r);else{switch(Zn(o)&&(r._data=C,delete r.data,Object.defineProperty(r,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(X){this._data=X}})),t.algorithm){case"lttb":U=function z5t(e,i,t,n,r){const s=r.samples||n;if(s>=t)return e.slice(i,i+t);const o=[],l=(t-2)/(s-2);let w=0;const C=i+t-1;let P,O,L,U,X,M=i;for(o[w++]=e[M],P=0;PL&&(L=U,O=e[rt],X=rt);o[w++]=O,M=X}return o[w++]=e[C],o}(C,P,O,n,t);break;case"min-max":U=function G5t(e,i,t,n){let o,l,w,C,M,P,O,L,U,X,r=0,s=0;const W=[],rt=e[i].x,vt=e[i+t-1].x-rt;for(o=i;oX&&(X=C,O=o),r=(s*r+l.x)/++s;else{const Mt=o-1;if(!Zn(P)&&!Zn(O)){const ft=Math.min(P,O),dt=Math.max(P,O);ft!==L&&ft!==Mt&&W.push({...e[ft],x:r}),dt!==L&&dt!==Mt&&W.push({...e[dt],x:r})}o>0&&Mt!==L&&W.push(e[Mt]),W.push(l),M=_t,s=0,U=X=C,P=O=L=o}}return W}(C,P,O,n);break;default:throw new Error(`Unsupported decimation algorithm '${t.algorithm}'`)}r._decimated=U}})},destroy(e){dJ(e)}};function DL(e,i,t,n){if(n)return;let r=i[e],s=t[e];return"angle"===e&&(r=El(r),s=El(s)),{property:e,start:r,end:s}}function ML(e,i,t){for(;i>e;i--){const n=t[i];if(!isNaN(n.x)&&!isNaN(n.y))break}return i}function uJ(e,i,t,n){return e&&i?n(e[t],i[t]):e?e[t]:i?i[t]:0}function hJ(e,i){let t=[],n=!1;return Qr(e)?(n=!0,t=e):t=function j5t(e,i){const{x:t=null,y:n=null}=e||{},r=i.points,s=[];return i.segments.forEach(({start:o,end:l})=>{l=ML(o,l,r);const w=r[o],C=r[l];null!==n?(s.push({x:w.x,y:n}),s.push({x:C.x,y:n})):null!==t&&(s.push({x:t,y:w.y}),s.push({x:t,y:C.y}))}),s}(e,i),t.length?new DE({points:t,options:{tension:0},_loop:n,_fullLoop:n}):null}function fJ(e){return e&&!1!==e.fill}function Y5t(e,i,t){let r=e[i].fill;const s=[i];let o;if(!t)return r;for(;!1!==r&&-1===s.indexOf(r);){if(!bs(r))return r;if(o=e[r],!o)return!1;if(o.visible)return r;s.push(r),r=o.fill}return!1}function $5t(e,i,t){const n=function J5t(e){const i=e.options,t=i.fill;let n=mn(t&&t.target,t);return void 0===n&&(n=!!i.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(e);if(Un(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return bs(r)&&Math.floor(r)===r?function Q5t(e,i,t,n){return("-"===e||"+"===e)&&(t=i+t),!(t===i||t<0||t>=n)&&t}(n[0],i,r,t):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function eVt(e,i,t){const n=[];for(let r=0;r=0;--o){const l=r[o].$filler;l&&(l.line.updateControlPoints(s,l.axis),n&&l.fill&&IL(e.ctx,l,s))}},beforeDatasetsDraw(e,i,t){if("beforeDatasetsDraw"!==t.drawTime)return;const n=e.getSortedVisibleDatasetMetas();for(let r=n.length-1;r>=0;--r){const s=n[r].$filler;fJ(s)&&IL(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,i,t){const n=i.meta.$filler;!fJ(n)||"beforeDatasetDraw"!==t.drawTime||IL(e.ctx,n,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const xJ=(e,i)=>{let{boxHeight:t=i,boxWidth:n=i}=e;return e.usePointStyle&&(t=Math.min(t,i),n=e.pointStyleWidth||Math.min(n,i)),{boxWidth:n,boxHeight:t,itemHeight:Math.max(i,t)}};class yJ extends Fu{constructor(i){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t,n){this.maxWidth=i,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const i=this.options.labels||{};let t=Gr(i.generateLabels,[this.chart],this)||[];i.filter&&(t=t.filter(n=>i.filter(n,this.chart.data))),i.sort&&(t=t.sort((n,r)=>i.sort(n,r,this.chart.data))),this.options.reverse&&t.reverse(),this.legendItems=t}fit(){const{options:i,ctx:t}=this;if(!i.display)return void(this.width=this.height=0);const n=i.labels,r=ma(n.font),s=r.size,o=this._computeTitleHeight(),{boxWidth:l,itemHeight:w}=xJ(n,s);let C,M;t.font=r.string,this.isHorizontal()?(C=this.maxWidth,M=this._fitRows(o,s,l,w)+10):(M=this.maxHeight,C=this._fitCols(o,r,l,w)+10),this.width=Math.min(C,i.maxWidth||this.maxWidth),this.height=Math.min(M,i.maxHeight||this.maxHeight)}_fitRows(i,t,n,r){const{ctx:s,maxWidth:o,options:{labels:{padding:l}}}=this,w=this.legendHitBoxes=[],C=this.lineWidths=[0],M=r+l;let P=i;s.textAlign="left",s.textBaseline="middle";let O=-1,L=-M;return this.legendItems.forEach((U,X)=>{const W=n+t/2+s.measureText(U.text).width;(0===X||C[C.length-1]+W+2*l>o)&&(P+=M,C[C.length-(X>0?0:1)]=0,L+=M,O++),w[X]={left:0,top:L,row:O,width:W,height:r},C[C.length-1]+=W+l}),P}_fitCols(i,t,n,r){const{ctx:s,maxHeight:o,options:{labels:{padding:l}}}=this,w=this.legendHitBoxes=[],C=this.columnSizes=[],M=o-i;let P=l,O=0,L=0,U=0,X=0;return this.legendItems.forEach((W,Z)=>{const{itemWidth:rt,itemHeight:st}=function hVt(e,i,t,n,r){const s=function fVt(e,i,t,n){let r=e.text;return r&&"string"!=typeof r&&(r=r.reduce((s,o)=>s.length>o.length?s:o)),i+t.size/2+n.measureText(r).width}(n,e,i,t),o=function mVt(e,i,t){let n=e;return"string"!=typeof i.text&&(n=bJ(i,t)),n}(r,n,i.lineHeight);return{itemWidth:s,itemHeight:o}}(n,t,s,W,r);Z>0&&L+st+2*l>M&&(P+=O+l,C.push({width:O,height:L}),U+=O+l,X++,O=L=0),w[Z]={left:U,top:L,col:X,width:rt,height:st},O=Math.max(O,rt),L+=st+l}),P+=O,C.push({width:O,height:L}),P}adjustHitBoxes(){if(!this.options.display)return;const i=this._computeTitleHeight(),{legendHitBoxes:t,options:{align:n,labels:{padding:r},rtl:s}}=this,o=a0(s,this.left,this.width);if(this.isHorizontal()){let l=0,w=lo(n,this.left+r,this.right-this.lineWidths[l]);for(const C of t)l!==C.row&&(l=C.row,w=lo(n,this.left+r,this.right-this.lineWidths[l])),C.top+=this.top+i+r,C.left=o.leftForLtr(o.x(w),C.width),w+=C.width+r}else{let l=0,w=lo(n,this.top+i+r,this.bottom-this.columnSizes[l].height);for(const C of t)C.col!==l&&(l=C.col,w=lo(n,this.top+i+r,this.bottom-this.columnSizes[l].height)),C.top=w,C.left+=this.left+r,C.left=o.leftForLtr(o.x(C.left),C.width),w+=C.height+r}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const i=this.ctx;fE(i,this),this._draw(),mE(i)}}_draw(){const{options:i,columnSizes:t,lineWidths:n,ctx:r}=this,{align:s,labels:o}=i,l=as.color,w=a0(i.rtl,this.left,this.width),C=ma(o.font),{padding:M}=o,P=C.size,O=P/2;let L;this.drawTitle(),r.textAlign=w.textAlign("left"),r.textBaseline="middle",r.lineWidth=.5,r.font=C.string;const{boxWidth:U,boxHeight:X,itemHeight:W}=xJ(o,P),st=this.isHorizontal(),vt=this._computeTitleHeight();L=st?{x:lo(s,this.left+M,this.right-n[0]),y:this.top+M+vt,line:0}:{x:this.left+M,y:lo(s,this.top+vt+M,this.bottom-t[0].height),line:0},aZ(this.ctx,i.textDirection);const _t=W+M;this.legendItems.forEach((Mt,ft)=>{r.strokeStyle=Mt.fontColor,r.fillStyle=Mt.fontColor;const dt=r.measureText(Mt.text).width,pt=w.textAlign(Mt.textAlign||(Mt.textAlign=o.textAlign)),bt=U+O+dt;let Tt=L.x,Et=L.y;w.setWidth(this.width),st?ft>0&&Tt+bt+M>this.right&&(Et=L.y+=_t,L.line++,Tt=L.x=lo(s,this.left+M,this.right-n[L.line])):ft>0&&Et+_t>this.bottom&&(Tt=L.x=Tt+t[L.line].width+M,L.line++,Et=L.y=lo(s,this.top+vt+M,this.bottom-t[L.line].height)),function(Mt,ft,dt){if(isNaN(U)||U<=0||isNaN(X)||X<0)return;r.save();const pt=mn(dt.lineWidth,1);if(r.fillStyle=mn(dt.fillStyle,l),r.lineCap=mn(dt.lineCap,"butt"),r.lineDashOffset=mn(dt.lineDashOffset,0),r.lineJoin=mn(dt.lineJoin,"miter"),r.lineWidth=pt,r.strokeStyle=mn(dt.strokeStyle,l),r.setLineDash(mn(dt.lineDash,[])),o.usePointStyle){const bt={radius:X*Math.SQRT2/2,pointStyle:dt.pointStyle,rotation:dt.rotation,borderWidth:pt},Tt=w.xPlus(Mt,U/2);$K(r,bt,Tt,ft+O,o.pointStyleWidth&&U)}else{const bt=ft+Math.max((P-X)/2,0),Tt=w.leftForLtr(Mt,U),Et=Bm(dt.borderRadius);r.beginPath(),Object.values(Et).some(Dt=>0!==Dt)?Yb(r,{x:Tt,y:bt,w:U,h:X,radius:Et}):r.rect(Tt,bt,U,X),r.fill(),0!==pt&&r.stroke()}r.restore()}(w.x(Tt),Et,Mt),Tt=((e,i,t,n)=>e===(n?"left":"right")?t:"center"===e?(i+t)/2:i)(pt,Tt+U+O,st?Tt+bt:this.right,i.rtl),function(Mt,ft,dt){Nm(r,dt.text,Mt,ft+W/2,C,{strikethrough:dt.hidden,textAlign:w.textAlign(dt.textAlign)})}(w.x(Tt),Et,Mt),st?L.x+=bt+M:L.y+="string"!=typeof Mt.text?bJ(Mt,C.lineHeight)+M:_t}),oZ(this.ctx,i.textDirection)}drawTitle(){const i=this.options,t=i.title,n=ma(t.font),r=co(t.padding);if(!t.display)return;const s=a0(i.rtl,this.left,this.width),o=this.ctx,l=t.position,C=r.top+n.size/2;let M,P=this.left,O=this.width;if(this.isHorizontal())O=Math.max(...this.lineWidths),M=this.top+C,P=lo(i.align,P,this.right-O);else{const U=this.columnSizes.reduce((X,W)=>Math.max(X,W.height),0);M=C+lo(i.align,this.top,this.bottom-U-i.labels.padding-this._computeTitleHeight())}const L=lo(l,P,P+O);o.textAlign=s.textAlign(tL(l)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=n.string,Nm(o,t.text,L,M,n)}_computeTitleHeight(){const i=this.options.title,t=ma(i.font),n=co(i.padding);return i.display?t.lineHeight+n.height:0}_getLegendItemAt(i,t){let n,r,s;if(Iu(i,this.left,this.right)&&Iu(t,this.top,this.bottom))for(s=this.legendHitBoxes,n=0;nnull!==e&&null!==i&&e.datasetIndex===i.datasetIndex&&e.index===i.index)(r,n);r&&!s&&Gr(t.onLeave,[i,r,this],this),this._hoveredItem=n,n&&!s&&Gr(t.onHover,[i,n,this],this)}else n&&Gr(t.onClick,[i,n,this],this)}}function bJ(e,i){return i*(e.text?e.text.length:0)}var gVt={id:"legend",_element:yJ,start(e,i,t){const n=e.legend=new yJ({ctx:e.ctx,options:t,chart:e});uo.configure(e,n,t),uo.addBox(e,n)},stop(e){uo.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,i,t){const n=e.legend;uo.configure(e,n,t),n.options=t},afterUpdate(e){const i=e.legend;i.buildLabels(),i.adjustHitBoxes()},afterEvent(e,i){i.replay||e.legend.handleEvent(i.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,i,t){const n=i.datasetIndex,r=t.chart;r.isDatasetVisible(n)?(r.hide(n),i.hidden=!0):(r.show(n),i.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const i=e.data.datasets,{labels:{usePointStyle:t,pointStyle:n,textAlign:r,color:s,useBorderRadius:o,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(w=>{const C=w.controller.getStyle(t?0:void 0),M=co(C.borderWidth);return{text:i[w.index].label,fillStyle:C.backgroundColor,fontColor:s,hidden:!w.visible,lineCap:C.borderCapStyle,lineDash:C.borderDash,lineDashOffset:C.borderDashOffset,lineJoin:C.borderJoinStyle,lineWidth:(M.width+M.height)/4,strokeStyle:C.borderColor,pointStyle:n||C.pointStyle,rotation:C.rotation,textAlign:r||C.textAlign,borderRadius:o&&(l||C.borderRadius),datasetIndex:w.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class RL extends Fu{constructor(i){super(),this.chart=i.chart,this.options=i.options,this.ctx=i.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(i,t){const n=this.options;if(this.left=0,this.top=0,!n.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=i,this.height=this.bottom=t;const r=Qr(n.text)?n.text.length:1;this._padding=co(n.padding);const s=r*ma(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const i=this.options.position;return"top"===i||"bottom"===i}_drawArgs(i){const{top:t,left:n,bottom:r,right:s,options:o}=this,l=o.align;let C,M,P,w=0;return this.isHorizontal()?(M=lo(l,n,s),P=t+i,C=s-n):("left"===o.position?(M=n+i,P=lo(l,r,t),w=-.5*Kr):(M=s-i,P=lo(l,t,r),w=.5*Kr),C=r-t),{titleX:M,titleY:P,maxWidth:C,rotation:w}}draw(){const i=this.ctx,t=this.options;if(!t.display)return;const n=ma(t.font),s=n.lineHeight/2+this._padding.top,{titleX:o,titleY:l,maxWidth:w,rotation:C}=this._drawArgs(s);Nm(i,t.text,0,0,n,{color:t.color,maxWidth:w,rotation:C,textAlign:tL(t.align),textBaseline:"middle",translation:[o,l]})}}var xVt={id:"title",_element:RL,start(e,i,t){!function vVt(e,i){const t=new RL({ctx:e.ctx,options:i,chart:e});uo.configure(e,t,i),uo.addBox(e,t),e.titleBlock=t}(e,t)},stop(e){uo.removeBox(e,e.titleBlock),delete e.titleBlock},beforeUpdate(e,i,t){const n=e.titleBlock;uo.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ME=new WeakMap;var yVt={id:"subtitle",start(e,i,t){const n=new RL({ctx:e.ctx,options:t,chart:e});uo.configure(e,n,t),uo.addBox(e,n),ME.set(e,n)},stop(e){uo.removeBox(e,ME.get(e)),ME.delete(e)},beforeUpdate(e,i,t){const n=ME.get(e);uo.configure(e,n,t),n.options=t},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const r1={average(e){if(!e.length)return!1;let i,t,n=new Set,r=0,s=0;for(i=0,t=e.length;il+w)/n.size,y:r/s}},nearest(e,i){if(!e.length)return!1;let s,o,l,t=i.x,n=i.y,r=Number.POSITIVE_INFINITY;for(s=0,o=e.length;s-1?e.split("\n"):e}function bVt(e,i){const{element:t,datasetIndex:n,index:r}=i,s=e.getDatasetMeta(n).controller,{label:o,value:l}=s.getLabelAndValue(r);return{chart:e,label:o,parsed:s.getParsed(r),raw:e.data.datasets[n].data[r],formattedValue:l,dataset:s.getDataset(),dataIndex:r,datasetIndex:n,element:t}}function wJ(e,i){const t=e.chart.ctx,{body:n,footer:r,title:s}=e,{boxWidth:o,boxHeight:l}=i,w=ma(i.bodyFont),C=ma(i.titleFont),M=ma(i.footerFont),P=s.length,O=r.length,L=n.length,U=co(i.padding);let X=U.height,W=0,Z=n.reduce((vt,_t)=>vt+_t.before.length+_t.lines.length+_t.after.length,0);Z+=e.beforeBody.length+e.afterBody.length,P&&(X+=P*C.lineHeight+(P-1)*i.titleSpacing+i.titleMarginBottom),Z&&(X+=L*(i.displayColors?Math.max(l,w.lineHeight):w.lineHeight)+(Z-L)*w.lineHeight+(Z-1)*i.bodySpacing),O&&(X+=i.footerMarginTop+O*M.lineHeight+(O-1)*i.footerSpacing);let rt=0;const st=function(vt){W=Math.max(W,t.measureText(vt).width+rt)};return t.save(),t.font=C.string,_r(e.title,st),t.font=w.string,_r(e.beforeBody.concat(e.afterBody),st),rt=i.displayColors?o+2+i.boxPadding:0,_r(n,vt=>{_r(vt.before,st),_r(vt.lines,st),_r(vt.after,st)}),rt=0,t.font=M.string,_r(e.footer,st),t.restore(),W+=U.width,{width:W,height:X}}function TVt(e,i,t,n){const{x:r,width:s}=t,{width:o,chartArea:{left:l,right:w}}=e;let C="center";return"center"===n?C=r<=(l+w)/2?"left":"right":r<=s/2?C="left":r>=o-s/2&&(C="right"),function _Vt(e,i,t,n){const{x:r,width:s}=n,o=t.caretSize+t.caretPadding;if("left"===e&&r+s+o>i.width||"right"===e&&r-s-o<0)return!0}(C,e,i,t)&&(C="center"),C}function _J(e,i,t){const n=t.yAlign||i.yAlign||function wVt(e,i){const{y:t,height:n}=i;return te.height-n/2?"bottom":"center"}(e,t);return{xAlign:t.xAlign||i.xAlign||TVt(e,i,t,n),yAlign:n}}function TJ(e,i,t,n){const{caretSize:r,caretPadding:s,cornerRadius:o}=e,{xAlign:l,yAlign:w}=t,C=r+s,{topLeft:M,topRight:P,bottomLeft:O,bottomRight:L}=Bm(o);let U=function CVt(e,i){let{x:t,width:n}=e;return"right"===i?t-=n:"center"===i&&(t-=n/2),t}(i,l);const X=function SVt(e,i,t){let{y:n,height:r}=e;return"top"===i?n+=t:n-="bottom"===i?r+t:r/2,n}(i,w,C);return"center"===w?"left"===l?U+=C:"right"===l&&(U-=C):"left"===l?U-=Math.max(M,O)+r:"right"===l&&(U+=Math.max(P,L)+r),{x:Ma(U,0,n.width-i.width),y:Ma(X,0,n.height-i.height)}}function IE(e,i,t){const n=co(t.padding);return"center"===i?e.x+e.width/2:"right"===i?e.x+e.width-n.right:e.x+n.left}function CJ(e){return yd([],Ou(e))}function SJ(e,i){const t=i&&i.dataset&&i.dataset.tooltip&&i.dataset.tooltip.callbacks;return t?e.override(t):e}const EJ={beforeTitle:Mu,title(e){if(e.length>0){const i=e[0],t=i.chart.data.labels,n=t?t.length:0;if(this&&this.options&&"dataset"===this.options.mode)return i.dataset.label||"";if(i.label)return i.label;if(n>0&&i.dataIndex"u"?EJ[i].call(t,n):r}let AJ=(()=>class e extends Fu{static positioners=r1;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new pZ(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=function EVt(e,i,t){return lf(e,{tooltip:i,tooltipItems:t,type:"tooltip"})}(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,s=el(r,"beforeTitle",this,t),o=el(r,"title",this,t),l=el(r,"afterTitle",this,t);let w=[];return w=yd(w,Ou(s)),w=yd(w,Ou(o)),w=yd(w,Ou(l)),w}getBeforeBody(t,n){return CJ(el(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,s=[];return _r(t,o=>{const l={before:[],lines:[],after:[]},w=SJ(r,o);yd(l.before,Ou(el(w,"beforeLabel",this,o))),yd(l.lines,el(w,"label",this,o)),yd(l.after,Ou(el(w,"afterLabel",this,o))),s.push(l)}),s}getAfterBody(t,n){return CJ(el(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,s=el(r,"beforeFooter",this,t),o=el(r,"footer",this,t),l=el(r,"afterFooter",this,t);let w=[];return w=yd(w,Ou(s)),w=yd(w,Ou(o)),w=yd(w,Ou(l)),w}_createItems(t){const n=this._active,r=this.chart.data,s=[],o=[],l=[];let C,M,w=[];for(C=0,M=n.length;Ct.filter(P,O,L,r))),t.itemSort&&(w=w.sort((P,O)=>t.itemSort(P,O,r))),_r(w,P=>{const O=SJ(t.callbacks,P);s.push(el(O,"labelColor",this,P)),o.push(el(O,"labelPointStyle",this,P)),l.push(el(O,"labelTextColor",this,P))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=l,this.dataPoints=w,w}update(t,n){const r=this.options.setContext(this.getContext()),s=this._active;let o,l=[];if(s.length){const w=r1[r.position].call(this,s,this._eventPosition);l=this._createItems(r),this.title=this.getTitle(l,r),this.beforeBody=this.getBeforeBody(l,r),this.body=this.getBody(l,r),this.afterBody=this.getAfterBody(l,r),this.footer=this.getFooter(l,r);const C=this._size=wJ(this,r),M=Object.assign({},w,C),P=_J(this.chart,r,M),O=TJ(r,M,P,this.chart);this.xAlign=P.xAlign,this.yAlign=P.yAlign,o={opacity:1,x:O.x,y:O.y,width:C.width,height:C.height,caretX:w.x,caretY:w.y}}else 0!==this.opacity&&(o={opacity:0});this._tooltipItems=l,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,s){const o=this.getCaretPosition(t,r,s);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:s,yAlign:o}=this,{caretSize:l,cornerRadius:w}=r,{topLeft:C,topRight:M,bottomLeft:P,bottomRight:O}=Bm(w),{x:L,y:U}=t,{width:X,height:W}=n;let Z,rt,st,vt,_t,Mt;return"center"===o?(_t=U+W/2,"left"===s?(Z=L,rt=Z-l,vt=_t+l,Mt=_t-l):(Z=L+X,rt=Z+l,vt=_t-l,Mt=_t+l),st=Z):(rt="left"===s?L+Math.max(C,P)+l:"right"===s?L+X-Math.max(M,O)-l:this.caretX,"top"===o?(vt=U,_t=vt-l,Z=rt-l,st=rt+l):(vt=U+W,_t=vt+l,Z=rt+l,st=rt-l),Mt=vt),{x1:Z,x2:rt,x3:st,y1:vt,y2:_t,y3:Mt}}drawTitle(t,n,r){const s=this.title,o=s.length;let l,w,C;if(o){const M=a0(r.rtl,this.x,this.width);for(t.x=IE(this,r.titleAlign,r),n.textAlign=M.textAlign(r.titleAlign),n.textBaseline="middle",l=ma(r.titleFont),w=r.titleSpacing,n.fillStyle=r.titleColor,n.font=l.string,C=0;C0!==st)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,Yb(t,{x:W,y:X,w:M,h:C,radius:rt}),t.fill(),t.stroke(),t.fillStyle=l.backgroundColor,t.beginPath(),Yb(t,{x:Z,y:X+1,w:M-2,h:C-2,radius:rt}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(W,X,M,C),t.strokeRect(W,X,M,C),t.fillStyle=l.backgroundColor,t.fillRect(Z,X+1,M-2,C-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:s}=this,{bodySpacing:o,bodyAlign:l,displayColors:w,boxHeight:C,boxWidth:M,boxPadding:P}=r,O=ma(r.bodyFont);let L=O.lineHeight,U=0;const X=a0(r.rtl,this.x,this.width),W=function(pt){n.fillText(pt,X.x(t.x+U),t.y+L/2),t.y+=L+o},Z=X.textAlign(l);let rt,st,vt,_t,Mt,ft,dt;for(n.textAlign=l,n.textBaseline="middle",n.font=O.string,t.x=IE(this,Z,r),n.fillStyle=r.bodyColor,_r(this.beforeBody,W),U=w&&"right"!==Z?"center"===l?M/2+P:M+2+P:0,_t=0,ft=s.length;_t0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,s=r&&r.x,o=r&&r.y;if(s||o){const l=r1[t.position].call(this,this._active,this._eventPosition);if(!l)return;const w=this._size=wJ(this,t),C=Object.assign({},l,this._size),M=_J(n,t,C),P=TJ(t,C,M,n);(s._to!==P.x||o._to!==P.y)&&(this.xAlign=M.xAlign,this.yAlign=M.yAlign,this.width=w.width,this.height=w.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,P))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const l=co(n.padding);n.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,s,n),aZ(t,n.textDirection),o.y+=l.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),oZ(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=this._active,s=t.map(({datasetIndex:w,index:C})=>{const M=this.chart.getDatasetMeta(w);if(!M)throw new Error("Cannot find a dataset at index "+w);return{datasetIndex:w,element:M.data[C],index:C}}),o=!oE(r,s),l=this._positionChanged(s,n);(o||l)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],l=this._getActiveElements(t,o,n,r),w=this._positionChanged(l,t),C=n||!oE(l,o)||w;return C&&(this._active=l,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),C}_getActiveElements(t,n,r,s){const o=this.options;if("mouseout"===t.type)return[];if(!s)return n.filter(w=>this.chart.data.datasets[w.datasetIndex]&&void 0!==this.chart.getDatasetMeta(w.datasetIndex).controller.getParsed(w.index));const l=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&l.reverse(),l}_positionChanged(t,n){const{caretX:r,caretY:s,options:o}=this,l=r1[o.position].call(this,t,n);return!1!==l&&(r!==l.x||s!==l.y)}})();var DVt=Object.freeze({__proto__:null,Colors:U5t,Decimation:W5t,Filler:dVt,Legend:gVt,SubTitle:yVt,Title:xVt,Tooltip:{id:"tooltip",_element:AJ,positioners:r1,afterInit(e,i,t){t&&(e.tooltip=new AJ({chart:e,options:t}))},beforeUpdate(e,i,t){e.tooltip&&e.tooltip.initialize(t)},reset(e,i,t){e.tooltip&&e.tooltip.initialize(t)},afterDraw(e){const i=e.tooltip;if(i&&i._willRender()){const t={tooltip:i};if(!1===e.notifyPlugins("beforeTooltipDraw",{...t,cancelable:!0}))return;i.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",t)}},afterEvent(e,i){e.tooltip&&e.tooltip.handleEvent(i.event,i.replay,i.inChartArea)&&(i.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,i)=>i.bodyFont.size,boxWidth:(e,i)=>i.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:EJ},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>"filter"!==e&&"itemSort"!==e&&"external"!==e,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]}});function DJ(e){const i=this.getLabels();return e>=0&&eclass e extends Hm{static id="category";static defaults={ticks:{callback:DJ}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:s,label:o}of n)r[s]===o&&r.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(Zn(t))return null;const r=this.getLabels();return((e,i)=>null===e?null:Ma(Math.round(e),0,i))(n=isFinite(n)&&r[n]===t?n:function IVt(e,i,t,n){const r=e.indexOf(i);return-1===r?((e,i,t,n)=>("string"==typeof i?(t=e.push(i)-1,n.unshift({index:t,label:i})):isNaN(i)&&(t=null),t))(e,i,t,n):r!==e.lastIndexOf(i)?t:r}(r,t,mn(n,t),this._addedLabels),r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(r=0),n||(s=this.getLabels().length-1)),this.min=r,this.max=s}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,s=[];let o=this.getLabels();o=0===t&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let l=t;l<=n;l++)s.push({value:l});return s}getLabelForValue(t){return DJ.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}})();function MJ(e,i,{horizontal:t,minRotation:n}){const r=Ac(n),s=(t?Math.sin(r):Math.cos(r))||.001;return Math.min(i/s,.75*i*(""+e).length)}class RE extends Hm{constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(i,t){return Zn(i)||("number"==typeof i||i instanceof Number)&&!isFinite(+i)?null:+i}handleTickRangeOptions(){const{beginAtZero:i}=this.options,{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:s}=this;const o=w=>r=t?r:w,l=w=>s=n?s:w;if(i){const w=vd(r),C=vd(s);w<0&&C<0?l(0):w>0&&C>0&&o(0)}if(r===s){let w=0===s?1:Math.abs(.05*s);l(s+w),i||o(r-w)}this.min=r,this.max=s}getTickLimit(){const i=this.options.ticks;let r,{maxTicksLimit:t,stepSize:n}=i;return n?(r=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),t=t||11),t&&(r=Math.min(t,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const i=this.options,t=i.ticks;let n=this.getTickLimit();n=Math.max(2,n);const o=function PVt(e,i){const t=[],{bounds:r,step:s,min:o,max:l,precision:w,count:C,maxTicks:M,maxDigits:P,includeBounds:O}=e,L=s||1,U=M-1,{min:X,max:W}=i,Z=!Zn(o),rt=!Zn(l),st=!Zn(C),vt=(W-X)/(P+1);let Mt,ft,dt,pt,_t=RK((W-X)/U/L)*L;if(_t<1e-14&&!Z&&!rt)return[{value:X},{value:W}];pt=Math.ceil(W/_t)-Math.floor(X/_t),pt>U&&(_t=RK(pt*_t/U/L)*L),Zn(w)||(Mt=Math.pow(10,w),_t=Math.ceil(_t*Mt)/Mt),"ticks"===r?(ft=Math.floor(X/_t)*_t,dt=Math.ceil(W/_t)*_t):(ft=X,dt=W),Z&&rt&&s&&function y4t(e,i){const t=Math.round(e);return t-i<=e&&t+i>=e}((l-o)/s,_t/1e3)?(pt=Math.round(Math.min((l-o)/_t,M)),_t=(l-o)/pt,ft=o,dt=l):st?(ft=Z?o:ft,dt=rt?l:dt,pt=C-1,_t=(dt-ft)/pt):(pt=(dt-ft)/_t,pt=Gb(pt,Math.round(pt),_t/1e3)?Math.round(pt):Math.ceil(pt));const bt=Math.max(PK(_t),PK(ft));Mt=Math.pow(10,Zn(w)?bt:w),ft=Math.round(ft*Mt)/Mt,dt=Math.round(dt*Mt)/Mt;let Tt=0;for(Z&&(O&&ft!==o?(t.push({value:o}),ftl)break;t.push({value:Et})}return rt&&O&&dt!==l?t.length&&Gb(t[t.length-1].value,l,MJ(l,vt,e))?t[t.length-1].value=l:t.push({value:l}):(!rt||dt===l)&&t.push({value:dt}),t}({maxTicks:n,bounds:i.bounds,min:i.min,max:i.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===i.bounds&&kK(o,this,"value"),i.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const i=this.ticks;let t=this.min,n=this.max;if(super.configure(),this.options.offset&&i.length){const r=(n-t)/Math.max(i.length-1,1)/2;t-=r,n+=r}this._startValue=t,this._endValue=n,this._valueRange=n-t}getLabelForValue(i){return Xb(i,this.chart.options.locale,this.options.ticks.format)}}const s1=e=>Math.floor(af(e)),Wm=(e,i)=>Math.pow(10,s1(e)+i);function IJ(e){return e/Math.pow(10,s1(e))==1}function RJ(e,i,t){const n=Math.pow(10,t),r=Math.floor(e/n);return Math.ceil(i/n)-r}function kL(e){const i=e.ticks;if(i.display&&e.display){const t=co(i.backdropPadding);return mn(i.font&&i.font.size,as.font.size)+t.height}return 0}function BVt(e,i,t){return t=Qr(t)?t:[t],{w:L4t(e,i.string,t),h:t.length*i.lineHeight}}function kJ(e,i,t,n,r){return e===n||e===r?{start:i-t/2,end:i+t/2}:er?{start:i-t,end:i}:{start:i,end:i+t}}function UVt(e,i,t,n,r){const s=Math.abs(Math.sin(t)),o=Math.abs(Math.cos(t));let l=0,w=0;n.starti.r&&(l=(n.end-i.r)/s,e.r=Math.max(e.r,i.r+l)),r.starti.b&&(w=(r.end-i.b)/o,e.b=Math.max(e.b,i.b+w))}function zVt(e,i,t){const n=e.drawingArea,{extra:r,additionalAngle:s,padding:o,size:l}=t,w=e.getPointPosition(i,n+r+o,s),C=Math.round(ZO(El(w.angle+Os))),M=function jVt(e,i,t){return 90===t||270===t?e-=i/2:(t>270||t<90)&&(e-=i),e}(w.y,l.h,C),P=function WVt(e){return 0===e||180===e?"center":e<180?"left":"right"}(C),O=function XVt(e,i,t){return"right"===t?e-=i:"center"===t&&(e-=i/2),e}(w.x,l.w,P);return{visible:!0,x:w.x,y:M,textAlign:P,left:O,top:M,right:O+l.w,bottom:M+l.h}}function GVt(e,i){if(!i)return!0;const{left:t,top:n,right:r,bottom:s}=e;return!(ku({x:t,y:n},i)||ku({x:t,y:s},i)||ku({x:r,y:n},i)||ku({x:r,y:s},i))}function YVt(e,i,t){const{left:n,top:r,right:s,bottom:o}=t,{backdropColor:l}=i;if(!Zn(l)){const w=Bm(i.borderRadius),C=co(i.backdropPadding);e.fillStyle=l;const M=n-C.left,P=r-C.top,O=s-n+C.width,L=o-r+C.height;Object.values(w).some(U=>0!==U)?(e.beginPath(),Yb(e,{x:M,y:P,w:O,h:L,radius:w}),e.fill()):e.fillRect(M,P,O,L)}}function PJ(e,i,t,n){const{ctx:r}=e;if(t)r.arc(e.xCenter,e.yCenter,i,0,Zr);else{let s=e.getPointPosition(0,i);r.moveTo(s.x,s.y);for(let o=1;o=i?t[n]:t[r]]=!0}}else e[i]=!0}function BJ(e,i,t){const n=[],r={},s=i.length;let o,l;for(o=0;o=0&&(i[w].major=!0);return i}(e,n,r,t):n}let PL=(()=>class e extends Hm{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const r=t.time||(t.time={}),s=this._adapter=new eBt__date(t.adapters.date);s.init(n),Ub(r.displayFormats,s.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return void 0===t?null:OJ(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:s,max:o,minDefined:l,maxDefined:w}=this.getUserBounds();function C(M){!l&&!isNaN(M.min)&&(s=Math.min(s,M.min)),!w&&!isNaN(M.max)&&(o=Math.max(o,M.max))}(!l||!w)&&(C(this._getLabelBounds()),("ticks"!==t.bounds||"labels"!==t.ticks.source)&&C(this.getMinMax(!1))),s=bs(s)&&!isNaN(s)?s:+n.startOf(Date.now(),r),o=bs(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,s="labels"===r.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,w=function T4t(e,i,t){let n=0,r=e.length;for(;nn&&e[r-1]>t;)r--;return n>0||r=il.indexOf(t);s--){const o=il[s];if(kE[o].common&&e._adapter.diff(r,n,o)>=i-1)return o}return il[t?il.indexOf(t):0]}(this,w.length,n.minUnit,this.min,this.max)),this._majorUnit=r.major.enabled&&"year"!==this._unit?function qVt(e){for(let i=il.indexOf(e)+1,t=il.length;i+t.value))}initOffsets(t=[]){let s,o,n=0,r=0;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),n=1===t.length?1-s:(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),r=1===t.length?o:(o-this.getDecimalForValue(t[t.length-2]))/2);const l=t.length<3?.5:.25;n=Ma(n,0,l),r=Ma(r,0,l),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,s=this.options,o=s.time,l=o.unit||LJ(o.minUnit,n,r,this._getLabelCapacity(n)),w=mn(s.ticks.stepSize,1),C="week"===l&&o.isoWeekday,M=n0(C)||!0===C,P={};let L,U,O=n;if(M&&(O=+t.startOf(O,"isoWeek",C)),O=+t.startOf(O,M?"day":l),t.diff(r,n,l)>1e5*w)throw new Error(n+" and "+r+" are too far apart with stepSize of "+w+" "+l);const X="data"===s.ticks.source&&this.getDataTimestamps();for(L=O,U=0;L+W)}getLabelForValue(t){const r=this.options.time;return this._adapter.format(t,r.tooltipFormat?r.tooltipFormat:r.displayFormats.datetime)}format(t,n){return this._adapter.format(t,n||this.options.time.displayFormats[this._unit])}_tickFormatFunction(t,n,r,s){const o=this.options,l=o.ticks.callback;if(l)return Gr(l,[t,n,r],this);const w=o.time.displayFormats,C=this._unit,M=this._majorUnit,O=M&&w[M],L=r[n];return this._adapter.format(t,s||(M&&O&&L&&L.major?O:C&&w[C]))}generateTickLabels(t){let n,r,s;for(n=0,r=t.length;n0?w:1}getDataTimestamps(){let n,r,t=this._cache.data||[];if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,r=s.length;n=e[n].pos&&i<=e[r].pos&&({lo:n,hi:r}=Ru(e,"pos",i)),({pos:s,time:l}=e[n]),({pos:o,time:w}=e[r])):(i>=e[n].time&&i<=e[r].time&&({lo:n,hi:r}=Ru(e,"time",i)),({time:s,pos:l}=e[n]),({time:o,pos:w}=e[r]));const C=o-s;return C?l+(w-l)*(i-s)/C:l}const r8t=["radarCanvas"];function s8t(e,i){if(1&e&&(tt(0,"td"),ut(1),sa(2,"titlecase"),et()),2&e){const t=Ct(2).$implicit,n=Ct(2).$implicit,r=Ct();Ti("rowspan",r.getKpaRowSpan(r.maturityResponse,n,t)),lt(),Ye(" ",xc(2,2,t)," ")}}function a8t(e,i){if(1&e&&(tt(0,"td"),ut(1),sa(2,"number"),et()),2&e){const t=Ct(2).$implicit,n=Ct(2).$implicit,r=Ct();Ti("rowspan",r.getKpaRowSpan(r.maturityResponse,n,t)),lt(),Ye(" ",Xd(2,2,r.calculateAverage(r.getQuestions(r.maturityResponse,n,t)),"1.2-2")," ")}}function o8t(e,i){if(1&e&&(Wi(0),tt(1,"tr"),Gt(2,s8t,3,4,"td",5)(3,a8t,3,5,"td",5),et(),Xi()),2&e){const t=i.index,n=Ct(4);lt(2),yt("ngIf",n.isFirstRowInKpa(t)),lt(),yt("ngIf",n.isFirstRowInKpa(t))}}function l8t(e,i){if(1&e&&(Wi(0),Gt(1,o8t,4,2,"ng-container",3),sa(2,"keyvalue"),Xi()),2&e){const t=i.$implicit,n=Ct(2).$implicit,r=Ct();lt(),yt("ngForOf",xc(2,1,r.getQuestions(r.maturityResponse,n,t)))}}function c8t(e,i){if(1&e&&(Wi(0),Gt(1,l8t,3,3,"ng-container",3),Xi()),2&e){const t=Ct().$implicit,n=Ct();lt(),yt("ngForOf",n.getKpas(n.maturityResponse,t))}}function d8t(e,i){if(1&e&&(Wi(0),Gt(1,c8t,2,1,"ng-container",5),Xi()),2&e){const t=i.$implicit,n=Ct();lt(),yt("ngIf",t==n.maturityResponse.selectedStakeholder)}}TL.register(tBt,P5t,DVt,Object.freeze({__proto__:null,CategoryScale:kVt,LinearScale:class FVt extends RE{static id="linear";static defaults={ticks:{callback:uE.formatters.numeric}};determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=bs(i)?i:0,this.max=bs(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const i=this.isHorizontal(),t=i?this.width:this.height,n=Ac(this.options.ticks.minRotation),r=(i?Math.sin(n):Math.cos(n))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,s.lineHeight/r))}getPixelForValue(i){return null===i?NaN:this.getPixelForDecimal((i-this._startValue)/this._valueRange)}getValueForPixel(i){return this._startValue+this.getDecimalForPixel(i)*this._valueRange}},LogarithmicScale:class NVt extends Hm{static id="logarithmic";static defaults={ticks:{callback:uE.formatters.logarithmic,major:{enabled:!0}}};constructor(i){super(i),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(i,t){const n=RE.prototype.parse.apply(this,[i,t]);if(0!==n)return bs(n)&&n>0?n:null;this._zero=!0}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!0);this.min=bs(i)?Math.max(0,i):null,this.max=bs(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!bs(this._userMin)&&(this.min=i===Wm(this.min,0)?Wm(this.min,-1):Wm(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:i,maxDefined:t}=this.getUserBounds();let n=this.min,r=this.max;const s=l=>n=i?n:l,o=l=>r=t?r:l;n===r&&(n<=0?(s(1),o(10)):(s(Wm(n,-1)),o(Wm(r,1)))),n<=0&&s(Wm(r,-1)),r<=0&&o(Wm(n,1)),this.min=n,this.max=r}buildTicks(){const i=this.options,n=function LVt(e,{min:i,max:t}){i=Sl(e.min,i);const n=[],r=s1(i);let s=function OVt(e,i){let n=s1(i-e);for(;RJ(e,i,n)>10;)n++;for(;RJ(e,i,n)<10;)n--;return Math.min(n,s1(e))}(i,t),o=s<0?Math.pow(10,Math.abs(s)):1;const l=Math.pow(10,s),w=r>s?Math.pow(10,r):0,C=Math.round((i-w)*o)/o,M=Math.floor((i-w)/l/10)*l*10;let P=Math.floor((C-M)/Math.pow(10,s)),O=Sl(e.min,Math.round((w+M+P*Math.pow(10,s))*o)/o);for(;O=10?P=P<15?15:20:P++,P>=20&&(s++,P=2,o=s>=0?1:o),O=Math.round((w+M+P*Math.pow(10,s))*o)/o;const L=Sl(e.max,O);return n.push({value:L,major:IJ(L),significand:P}),n}({min:this._userMin,max:this._userMax},this);return"ticks"===i.bounds&&kK(n,this,"value"),i.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}getLabelForValue(i){return void 0===i?"0":Xb(i,this.chart.options.locale,this.options.ticks.format)}configure(){const i=this.min;super.configure(),this._startValue=af(i),this._valueRange=af(this.max)-af(i)}getPixelForValue(i){return(void 0===i||0===i)&&(i=this.min),null===i||isNaN(i)?NaN:this.getPixelForDecimal(i===this.min?0:(af(i)-this._startValue)/this._valueRange)}getValueForPixel(i){const t=this.getDecimalForPixel(i);return Math.pow(10,this._startValue+t*this._valueRange)}},RadialLinearScale:class ZVt extends RE{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:uE.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:i=>i,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(i){super(i),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const i=this._padding=co(kL(this.options)/2),t=this.width=this.maxWidth-i.width,n=this.height=this.maxHeight-i.height;this.xCenter=Math.floor(this.left+t/2+i.left),this.yCenter=Math.floor(this.top+n/2+i.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}determineDataLimits(){const{min:i,max:t}=this.getMinMax(!1);this.min=bs(i)&&!isNaN(i)?i:0,this.max=bs(t)&&!isNaN(t)?t:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/kL(this.options))}generateTickLabels(i){RE.prototype.generateTickLabels.call(this,i),this._pointLabels=this.getLabels().map((t,n)=>{const r=Gr(this.options.pointLabels.callback,[t,n],this);return r||0===r?r:""}).filter((t,n)=>this.chart.getDataVisibility(n))}fit(){const i=this.options;i.display&&i.pointLabels.display?function VVt(e){const i={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},t=Object.assign({},i),n=[],r=[],s=e._pointLabels.length,o=e.options.pointLabels,l=o.centerPointLabels?Kr/s:0;for(let w=0;w=0&&i=0;r--){const s=e._pointLabelItems[r];if(!s.visible)continue;const o=n.setContext(e.getPointLabelContext(r));YVt(t,o,s);const l=ma(o.font),{x:w,y:C,textAlign:M}=s;Nm(t,e._pointLabels[r],w,C+l.lineHeight/2,l,{color:o.color,textAlign:M,textBaseline:"middle"})}}(this,o),r.display&&this.ticks.forEach((M,P)=>{if(0!==P||0===P&&this.min<0){w=this.getDistanceFromCenterForValue(M.value);const O=this.getContext(P),L=r.setContext(O),U=s.setContext(O);!function QVt(e,i,t,n,r){const s=e.ctx,o=i.circular,{color:l,lineWidth:w}=i;!o&&!n||!l||!w||t<0||(s.save(),s.strokeStyle=l,s.lineWidth=w,s.setLineDash(r.dash||[]),s.lineDashOffset=r.dashOffset,s.beginPath(),PJ(e,t,o,n),s.closePath(),s.stroke(),s.restore())}(this,L,w,o,U)}}),n.display){for(i.save(),l=o-1;l>=0;l--){const M=n.setContext(this.getPointLabelContext(l)),{color:P,lineWidth:O}=M;!O||!P||(i.lineWidth=O,i.strokeStyle=P,i.setLineDash(M.borderDash),i.lineDashOffset=M.borderDashOffset,w=this.getDistanceFromCenterForValue(t.reverse?this.min:this.max),C=this.getPointPosition(l,w),i.beginPath(),i.moveTo(this.xCenter,this.yCenter),i.lineTo(C.x,C.y),i.stroke())}i.restore()}}drawBorder(){}drawLabels(){const i=this.ctx,t=this.options,n=t.ticks;if(!n.display)return;const r=this.getIndexAngle(0);let s,o;i.save(),i.translate(this.xCenter,this.yCenter),i.rotate(r),i.textAlign="center",i.textBaseline="middle",this.ticks.forEach((l,w)=>{if(0===w&&this.min>=0&&!t.reverse)return;const C=n.setContext(this.getContext(w)),M=ma(C.font);if(s=this.getDistanceFromCenterForValue(this.ticks[w].value),C.showLabelBackdrop){i.font=M.string,o=i.measureText(l.label).width,i.fillStyle=C.backdropColor;const P=co(C.backdropPadding);i.fillRect(-o/2-P.left,-s-M.size/2-P.top,o+P.width,M.size+P.height)}Nm(i,l.label,0,-s,M,{color:C.color,strokeColor:C.textStrokeColor,strokeWidth:C.textStrokeWidth})}),i.restore()}drawTitle(){}},TimeScale:PL,TimeSeriesScale:class e8t extends PL{static id="timeseries";static defaults=PL.defaults;constructor(i){super(i),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const i=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(i);this._minPos=PE(t,this.min),this._tableRange=PE(t,this.max)-this._minPos,super.initOffsets(i)}buildLookupTable(i){const{min:t,max:n}=this,r=[],s=[];let o,l,w,C,M;for(o=0,l=i.length;o=t&&C<=n&&r.push(C);if(r.length<2)return[{time:t,pos:0},{time:n,pos:1}];for(o=0,l=r.length;or-s)}_getTimestampsForTable(){let i=this._cache.all||[];if(i.length)return i;const t=this.getDataTimestamps(),n=this.getLabelTimestamps();return i=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,i=this._cache.all=i,i}getDecimalForValue(i){return(PE(this._table,i)-this._minPos)/this._tableRange}getValueForPixel(i){const t=this._offsets,n=this.getDecimalForPixel(i)/t.factor-t.end;return PE(this._table,n*this._tableRange+this._minPos,!0)}}}));let u8t=(()=>{class e{ngAfterViewInit(){this.maturityResponse&&this.generateChart()}ngOnChanges(t){this.radarCanvas&&t.maturityResponse&&this.maturityResponse&&this.generateChart()}generateChart(){this.chart&&this.chart.destroy();const t={};Object.entries(this.maturityResponse).forEach(([s,o])=>{const[l,w,C]=s.split(".");l&&w&&C&&l===this.maturityResponse.selectedStakeholder&&(t[w]=t[w]||{sum:0,count:0},t[w].sum+=o||0,t[w].count+=1)});const n=Array.from(new Set(Object.keys(this.maturityResponse).filter(s=>s.startsWith(this.maturityResponse.selectedStakeholder)).map(s=>s.split(".")[1]))),r=[{label:this.maturityResponse.selectedStakeholder,data:n.map(s=>t[s]?t[s].sum/t[s].count:0),backgroundColor:"rgba(54, 162, 235, 0.3)",borderColor:"rgba(54, 162, 235, 1)",pointBackgroundColor:"rgba(54, 162, 235, 1)",pointBorderColor:"#fff"}];this.chart=new TL(this.radarCanvas.nativeElement,{type:"radar",data:{labels:n,datasets:r},options:{aspectRatio:2,responsive:!0,plugins:{legend:{position:"top"},title:{display:!0,text:"Maturity Results by Stakeholder and KPA"}},scales:{r:{pointLabels:{padding:5},suggestedMin:0,suggestedMax:5,ticks:{stepSize:1}}}}})}getStakeholders(t){return Array.from(new Set(Object.keys(t).map(n=>n.split(".")[0])))}getKpas(t,n){return Array.from(new Set(Object.keys(t).filter(r=>r.startsWith(n)).map(r=>r.split(".")[1])))}getQuestions(t,n,r){return Object.keys(t).filter(s=>s.startsWith(`${n}.${r}`)).reduce((s,o)=>(s[o.split(".").slice(2).join(".")]=t[o],s),{})}getStakeholderRowSpan(t,n){return this.getKpas(t,n).reduce((s,o)=>s+this.getKpaRowSpan(t,n,o),0)}getKpaRowSpan(t,n,r){return Object.keys(t).filter(s=>s.startsWith(`${n}.${r}`)).length}isFirstRowInStakeholder(t,n,r){const s=this.getKpas(this.maturityResponse,n).indexOf(r);return 0===t&&0===s}isFirstRowInKpa(t){return 0===t}calculateAverage(t){const n=Object.values(t).filter(s=>null!==s),r=n.reduce((s,o)=>s+o,0);return n.length>0?r/n.length:0}calculateOverallAverage(t){const n={};for(const o in t)if(t.hasOwnProperty(o)&&null!==t[o]&&"selectedStakeholder"!==o){const l=o.split(".")[1];n[l]||(n[l]=[]),n[l].push(t[o])}const r=Object.keys(n).map(o=>{const l=n[o];return l.reduce((w,C)=>w+C,0)/l.length});return r.reduce((o,l)=>o+l,0)/r.length}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-maturity-results"]],viewQuery:function(n,r){if(1&n&&Mi(r8t,5),2&n){let s;Be(s=Ve())&&(r.radarCanvas=s.first)}},inputs:{maturityResponse:"maturityResponse"},features:[tr],decls:14,vars:2,consts:[["radarCanvas",""],[1,"centered-box"],[1,"bordered-table"],[4,"ngFor","ngForOf"],[1,"chart-container"],[4,"ngIf"]],template:function(n,r){1&n&&(tt(0,"h3",1),ut(1),et(),tt(2,"table",2)(3,"thead")(4,"tr")(5,"th"),ut(6,"KPA"),et(),tt(7,"th"),ut(8,"Result"),et()()(),tt(9,"tbody"),Gt(10,d8t,2,1,"ng-container",3),et()(),tt(11,"div",4),we(12,"canvas",null,0),et()),2&n&&(lt(),Ye("Overall calculated maturity score: ",r.calculateOverallAverage(r.maturityResponse),""),lt(9),yt("ngForOf",r.getStakeholders(r.maturityResponse)))},dependencies:[gs,Ms,DU,SU,EU],styles:[".bordered-table[_ngcontent-%COMP%]{border:1px solid #000;border-collapse:collapse;width:100%}.bordered-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .bordered-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:1px solid #000;padding:4px}.chart-container[_ngcontent-%COMP%]{display:flex;justify-content:center}.centered-box[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:2px solid #000;padding:10px;margin:20px auto;width:-moz-fit-content;width:fit-content;box-shadow:0 0 10px #0000001a}"]})}return e})();function h8t(e,i){if(1&e&&(tt(0,"mat-radio-button",12),ut(1),et()),2&e){const t=i.$implicit;yt("value",t.id),lt(),Ye(" ",t.name," ")}}function f8t(e,i){1&e&&(tt(0,"div",13),ut(1," Please select a stakeholder. "),et())}function m8t(e,i){if(1&e){const t=ve();tt(0,"div",5)(1,"div",6)(2,"h2"),ut(3,"Select Stakeholder"),et(),tt(4,"mat-radio-group",7),Gt(5,h8t,2,2,"mat-radio-button",8),et(),Gt(6,f8t,2,0,"div",9),tt(7,"div",10)(8,"button",11),Vt("click",function(){return Ut(t),zt(Ct().onStakeholderSelected())}),ut(9," Start "),et()()()()}if(2&e){const t=Ct();lt(),yt("formGroup",t.responseForm),lt(3),yt("formControl",t.currentControl)("@questionAnimation",t.animationState),lt(),yt("ngForOf",t.maturityQuestions.stakeHolders),lt(),yt("ngIf",(null==t.responseForm.controls.selectedStakeholder?null:t.responseForm.controls.selectedStakeholder.invalid)&&(null==t.responseForm.controls.selectedStakeholder?null:t.responseForm.controls.selectedStakeholder.touched)),lt(2),yt("disabled",t.responseForm.controls.selectedStakeholder.invalid)}}function p8t(e,i){1&e&&(tt(0,"mat-icon",23),ut(1," help_outline "),et()),2&e&&yt("matTooltip",Ct().$implicit.example)}function g8t(e,i){if(1&e&&(tt(0,"mat-radio-button",12)(1,"div",21),ut(2),Gt(3,p8t,2,1,"mat-icon",22),et()()),2&e){const t=i.$implicit;yt("value",t.score),lt(2),Ye(" ",t.text," "),lt(),yt("ngIf",t.example)}}function v8t(e,i){1&e&&(tt(0,"div",13),ut(1," Please select an option for this question. "),et())}function x8t(e,i){if(1&e){const t=ve();tt(0,"button",11),Vt("click",function(){return Ut(t),zt(Ct(3).goToNextQuestion())}),ut(1," Next "),et()}2&e&&yt("disabled",Ct(3).currentControl.invalid)}function y8t(e,i){if(1&e){const t=ve();tt(0,"button",24),Vt("click",function(){return Ut(t),zt(Ct(3).submitStakeholderResponses())}),ut(1," Submit "),et()}2&e&&yt("disabled",Ct(3).currentControl.invalid)}function b8t(e,i){if(1&e){const t=ve();tt(0,"div",6)(1,"h2"),ut(2),et(),we(3,"mat-progress-bar",15),tt(4,"div",16),ut(5),et(),tt(6,"h3"),ut(7),et(),tt(8,"p",17),ut(9),et(),tt(10,"mat-radio-group",7),Gt(11,g8t,4,3,"mat-radio-button",8),et(),Gt(12,v8t,2,0,"div",9),tt(13,"div",10)(14,"button",11),Vt("click",function(){return Ut(t),zt(Ct(2).goToPreviousQuestion())}),ut(15," Back "),et(),Gt(16,x8t,2,1,"button",18)(17,y8t,2,1,"button",19),et(),tt(18,"div",10)(19,"button",20),Vt("click",function(){return Ut(t),zt(Ct(2).startOver())}),ut(20," Restart assessment "),et()()()}if(2&e){const t=Ct(2);yt("formGroup",t.responseForm),lt(2),Ye("Stakeholder: ",t.allQuestions[t.currentQuestionIndex].stakeholderName,""),lt(),yt("value",(t.currentQuestionIndex+1)/(t.allQuestions.length+1)*100),lt(2),Zc("Question ",t.currentQuestionIndex+1," of ",t.allQuestions.length,""),lt(2),Ye("Key Process Area: ",t.allQuestions[t.currentQuestionIndex].kpaName,""),lt(),yt("@questionAnimation",t.animationState),lt(),Ze(t.allQuestions[t.currentQuestionIndex].question.question),lt(),yt("formControl",t.currentControl)("@questionAnimation",t.animationState),lt(),yt("ngForOf",t.allQuestions[t.currentQuestionIndex].question.options),lt(),yt("ngIf",(null==t.currentControl?null:t.currentControl.invalid)&&(null==t.currentControl?null:t.currentControl.touched)),lt(2),yt("disabled",t.currentQuestionIndex<1),lt(2),yt("ngIf",t.currentQuestionIndex{class e{constructor(t,n,r){this.http=t,this.fb=n,this.dialog=r,this.maturityQuestions={},this.allQuestions=[],this.currentQuestionIndex=-1,this.selectedStakeholder=null,this.animationState="enter",this.responseForm=this.fb.group({selectedStakeholder:new Va(null,vu.required)}),this.currentControl=this.responseForm.controls.selectedStakeholder}ngOnInit(){var t=this;return de(function*(){t.maturityQuestions=yield Ca(t.http.get("assets/maturity/maturityLevels.json")),t.initializeForm()})()}initializeForm(){this.responseForm=this.fb.group({selectedStakeholder:new Va(null,vu.required)}),this.currentControl=this.responseForm.controls.selectedStakeholder,this.maturityQuestions.stakeHolders.forEach(t=>{t.kpas.forEach(n=>{n.questions.forEach(r=>{const s=[t.id,n.id,r.id].join(".");this.responseForm.addControl(s,new Va(null,vu.required))})})})}onStakeholderSelected(){this.animationState="leave",setTimeout(()=>{const t=this.responseForm.get("selectedStakeholder")?.value;this.selectedStakeholder=this.maturityQuestions.stakeHolders.find(n=>n.id===t),this.flattenQuestions(),this.currentQuestionIndex=0,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath],this.animationState="enter"},200)}flattenQuestions(){this.allQuestions=[],this.selectedStakeholder&&this.selectedStakeholder.kpas.forEach(t=>{t.questions.forEach(n=>{const r=[this.selectedStakeholder.id,t.id,n.id].join(".");this.allQuestions.push({stakeholderName:this.selectedStakeholder.name,kpaName:t.name,question:n,questionFullPath:r})})})}goToNextQuestion(){this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex++,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath],this.animationState="enter"},200)}goToPreviousQuestion(){this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex--,this.currentControl=this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath],this.animationState="enter"},200)}startOver(){this.currentQuestionIndex=-1,this.responseForm.reset(),this.currentControl=this.responseForm.controls.selectedStakeholder}uploadFile(t){if(1!==t.target.files.length)console.error("No file selected");else{const n=new FileReader;n.onloadend=r=>{if(n.result){const s=JSON.parse(n.result?.toString());console.log("Uploaded version:",s),this.maturityQuestions=s}},n.readAsText(t.target.files[0])}}submitStakeholderResponses(){this.animationState="leave",setTimeout(()=>{this.currentQuestionIndex++,this.animationState="enter"},200)}getStakeholderFormGroup(t){return this.responseForm.get(t)}getUnansweredCount(t){let n=0;const r=this.responseForm.get(t);return r&&Object.keys(r.controls).forEach(s=>{const o=r.get(s);o&&Object.keys(o.controls).forEach(l=>{const w=o.get(l);w&&w.invalid&&n++})}),n}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd),mt(NC),mt(lm))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-maturity-main"]],decls:8,vars:3,consts:[["fileInput",""],[1,"flex","flex-row","gap-4","justify-end","flex-wrap","p-2"],["hidden","","type","file","id","file",3,"change"],["mat-flat-button","","color","accent",3,"click"],["class","question-flow-container",4,"ngIf"],[1,"question-flow-container"],[1,"question-container",3,"formGroup"],[1,"options-container",3,"formControl"],[3,"value",4,"ngFor","ngForOf"],["class","error-message",4,"ngIf"],[1,"button-container"],["mat-flat-button","","color","primary",3,"click","disabled"],[3,"value"],[1,"error-message"],["class","question-container",3,"formGroup",4,"ngIf"],["mode","determinate",1,"progress-bar",3,"value"],[1,"progress-message"],[1,"question-text"],["mat-flat-button","","color","primary",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","accent",3,"disabled","click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[1,"mat-radio-label-content"],["matTooltipPosition","right",3,"matTooltip",4,"ngIf"],["matTooltipPosition","right",3,"matTooltip"],["mat-flat-button","","color","accent",3,"click","disabled"],[1,"question-container"],[3,"maturityResponse"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1)(1,"input",2,0),Vt("change",function(l){return Ut(s),zt(r.uploadFile(l))}),et(),tt(3,"button",3),Vt("click",function(){return Ut(s),zt(qi(2).click())}),ut(4,"Load Maturity Spec"),et()(),Gt(5,m8t,10,6,"div",4)(6,w8t,2,1,"div",4)(7,_8t,12,4,"div",4)}2&n&&(lt(5),yt("ngIf",-1===r.currentQuestionIndex),lt(),yt("ngIf",r.currentQuestionIndex>=0&&r.currentQuestionIndex leave",[sn("200ms ease-in-out",qe({opacity:0}))]),on("leave => enter",[qe({opacity:0}),sn("200ms ease-in-out",qe({opacity:1}))])])]}})}return e})(),VJ=(()=>{class e{constructor(){this.demos=[{name:"Clinical User Interface Demo",subtitle:"Clinical demo",type:"external",url:"http://snomed.org/ui",description:"A simulation of clinical data entry on an EHR using SNOMED FHIR Terminology services"},{name:"Allergies",subtitle:"Clinical demo",type:"internal",url:"/allergies",description:"A SNOMED / FHIR implementation demo of recording Allergy / Intollerance details, from Allergies Clinical Reference Group"},{name:"Terminology Bindings Sandbox",subtitle:"Learning demo",type:"internal",url:"/sandbox",description:"A sandbox for learning and testing terminology bindings"},{name:"SNOMED Maps Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-icd-maps",description:"A SNOMED / ICD-10 maps demonstration, including complex map rules execution"},{name:"Post-coordination Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-postcoordination",description:"A SNOMED post-coordination demonstration, with new prototype Postcoordination Terminology server SNOWSTORM X"},{name:"IPS Terminology Demonstrator",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/iid-ips/",description:"A demonstration of the International Patient Summary (IPS) terminology, including the IPS SNOMED CT refset"},{name:"SNOMED & FHIR Questionnaires Manager Application",subtitle:"Application",type:"internal",url:"/questionnaires",description:"An application to manage a FHIR Questionnaires repository, with SNOMED CT bindings"},{name:"SNOMED & FHIR Questionnaires Utilities",subtitle:"Utilities",type:"internal",url:"/questionnaires",queryParams:{utility:!0},description:"Utilities for working with FHIR Questionnaires, including SNOMED CT bindings"},{name:"Context Representation Transformations",subtitle:"Learning demo",type:"internal",url:"/context",description:"A demonstration of the transformation of context representations from SNOMED to FHIR Resources"},{name:"SNOMED and LLMs (AI Demo)",subtitle:"Learning demo",type:"external",url:"https://ihtsdo.github.io/openai-demo/",description:"This demo uses OpenAI ChatGPT API to demonstrate the use of SNOMED CT with Language Model Models (LLMs). A developer key for the OpenAI API is required."},{name:"Snoguess (A SNOMED game)",subtitle:"Game",type:"internal",url:"/snoguess",description:"A SNOMED term guessing game, learn about SNOMED content while having fun and competing to achieve the highest score"},{name:"SNOMED Implementation Roadmap Generator",subtitle:"Tool",type:"external",url:"https://ihtsdo.github.io/roadmap-generator",description:"A tool designed to promote and support the creation of implementation roadmaps for the adoption of SNOMED CT in countries, regions or organizations."}]}getDemos(){return this.demos}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();function C8t(e,i){if(1&e){const t=ve();tt(0,"div",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-subtitle"),ut(4),et(),tt(5,"mat-card-title"),ut(6),et()(),tt(7,"mat-card-content")(8,"p"),ut(9),et()(),tt(10,"mat-card-actions")(11,"button",10),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().navigate(r))}),ut(12,"OPEN"),et()()()()}if(2&e){const t=i.$implicit;lt(4),Ze(t.subtitle),lt(2),Ze(t.name),lt(3),Ze(t.description)}}let UJ=(()=>{class e{constructor(t,n,r){this.router=t,this.route=n,this.menuService=r,this.demos=[]}ngOnInit(){this.demos=this.menuService.getDemos()}navigate(t){if("internal"===t.type){let n=t.queryParams,r=this.route.snapshot.queryParams;n=n?{...r,...n}:r,this.router.navigate([t.url],{queryParams:n})}else this.openInNewTab(t.url)}openInNewTab(t){window.open(t,"_blank")}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Fo),mt(Tc),mt(VJ))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-home"]],decls:17,vars:1,consts:[[1,"main-panel"],[1,"intro"],["href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank"],["href","https://confluence.ihtsdotools.org/display/CP/Clinical+Engagement","target","_blank"],[1,"demos-panel"],["class","demo-card-wrapper",4,"ngFor","ngForOf"],[1,"center-image"],["src","assets/img/SI_CT_Logo_Delivered_By.png","alt","SNOMED Logo",1,"transparent-image"],[1,"demo-card-wrapper"],[1,"demo-card"],["mat-button","","color","accent",3,"click"]],template:function(n,r){1&n&&(tt(0,"div",0)(1,"h1"),ut(2,"SNOMED CT Implementation Demonstrators"),et(),tt(3,"p",1),ut(4,"Welcome to our collection of SNOMED CT Implementation Demonstrators! This curated selection of demos showcases the diverse ways SNOMED CT can be implemented across different use cases. Each demonstration is "),tt(5,"a",2),ut(6,"open source"),et(),ut(7,", free to explore, and easy to replicate, providing a hands-on learning experience for developers, implementers, and healthcare professionals."),et(),tt(8,"p",1),ut(9,"These implementation demos have been created through the collaboration and expertise of the "),tt(10,"a",3),ut(11,"global SNOMED CT community of clinical experts"),et(),ut(12,", reflecting best practices and innovative use cases. Whether you\u2019re just getting started with SNOMED CT or looking to deepen your understanding, you\u2019ll find valuable insights here. Explore, learn, and join us in advancing healthcare interoperability."),et(),tt(13,"div",4),Gt(14,C8t,13,3,"div",5),et(),tt(15,"div",6),we(16,"img",7),et()()),2&n&&(lt(14),yt("ngForOf",r.demos))},dependencies:[gs,Sa,vC,b7,x7,w7,y7,v7],styles:[".main-panel[_ngcontent-%COMP%]{padding:2rem;height:calc(100vh - 70px)}.intro[_ngcontent-%COMP%]{font-size:1.2rem;margin-bottom:1.5rem}.demos-panel[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:2rem;justify-content:center;margin-top:3rem}.demo-card-wrapper[_ngcontent-%COMP%]{width:300px}.demo-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}mat-card-title[_ngcontent-%COMP%]{word-wrap:break-word;font-size:large;font-weight:700}mat-card-content[_ngcontent-%COMP%]{padding:1rem;margin-bottom:2rem}mat-card-actions[_ngcontent-%COMP%]{border-top:1px solid #e0e0e0;padding-top:10px;margin-top:auto}.center-image[_ngcontent-%COMP%]{text-align:center;margin-top:4rem;margin-left:20%;margin-right:20%}.transparent-image[_ngcontent-%COMP%]{opacity:.5}"]})}return e})();function S8t(e,i){if(1&e){const t=ve();tt(0,"app-autocomplete-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function E8t(e,i){if(1&e){const t=ve();tt(0,"app-dropdown-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function A8t(e,i){if(1&e){const t=ve();tt(0,"app-radios-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function D8t(e,i){if(1&e&&(tt(0,"span",10),ut(1),et()),2&e){const t=Ct().$implicit;lt(),Ze(t.title)}}function M8t(e,i){if(1&e){const t=ve();tt(0,"app-textbox-binding",11),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function I8t(e,i){if(1&e){const t=ve();tt(0,"app-integer-binding",11),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function R8t(e,i){if(1&e){const t=ve();tt(0,"app-decimal-binding",11),Vt("textChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function k8t(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function P8t(e,i){if(1&e){const t=ve();tt(0,"app-checkbox-multiple-binding",9),Vt("selectionChange",function(r){Ut(t);const s=Ct().$implicit;return zt(Ct().optionSelected(s.title,s.code,r))}),et()}2&e&&yt("binding",Ct().$implicit)}function F8t(e,i){if(1&e&&(tt(0,"button",12)(1,"mat-icon"),ut(2,"info"),et()()),2&e){const t=Ct().$implicit;yt("matMenuTriggerFor",qi(13))("disabled",!t.code&&!t.ecl)}}function O8t(e,i){if(1&e){const t=ve();tt(0,"span",13),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Question terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Zc("",null==t.code?null:t.code.code," |",null==t.code?null:t.code.display,"|")}}function L8t(e,i){if(1&e){const t=ve();tt(0,"span",13),Vt("click",function(r){return Ut(t),zt(r.stopPropagation())}),tt(1,"h4"),ut(2,"Answer terminology binding"),et(),tt(3,"pre"),ut(4),et()()}if(2&e){const t=Ct().$implicit;yt("disableRipple",!0),lt(4),Ze(t.ecl)}}function N8t(e,i){if(1&e&&(tt(0,"div",2)(1,"div",3),Gt(2,S8t,1,1,"app-autocomplete-binding",4)(3,E8t,1,1,"app-dropdown-binding",4)(4,A8t,1,1,"app-radios-binding",4)(5,D8t,2,1,"span",5)(6,M8t,1,1,"app-textbox-binding",6)(7,I8t,1,1,"app-integer-binding",6)(8,R8t,1,1,"app-decimal-binding",6)(9,k8t,1,1,"app-checkbox-binding",4)(10,P8t,1,1,"app-checkbox-multiple-binding",4)(11,F8t,3,2,"button",7),tt(12,"mat-menu",null,0),Gt(14,O8t,5,3,"span",8)(15,L8t,5,2,"span",8),et()()()),2&e){const t=i.$implicit;lt(2),yt("ngIf","Autocomplete"==t.type),lt(),yt("ngIf","Select (Single)"==t.type||"Select (Multiple)"==t.type),lt(),yt("ngIf","Options"==t.type),lt(),yt("ngIf","Section header"==t.type),lt(),yt("ngIf","Text box"==t.type),lt(),yt("ngIf","Integer"==t.type),lt(),yt("ngIf","Decimal"==t.type),lt(),yt("ngIf","Checkbox"==t.type),lt(),yt("ngIf","Checkbox multiple"==t.type),lt(),yt("ngIf","Section header"!=t.type),lt(3),yt("ngIf",t.code),lt(),yt("ngIf",t.ecl)}}let B8t=(()=>{class e{constructor(){this.output={},this.outputStr="{}",this.response={},this.responseStr="{}",this.responseBundle={},this.responseBundleStr="{}"}optionSelected(t,n,r){this.output[t]={code:n,value:r},n||delete this.output[t].code,this.outputStr=JSON.stringify(this.output,null,2),this.refreshResponse()}refreshResponse(){this.response={};for(let t of this.spec.bindings)this.response[t.title]={},t.code&&(this.response[t.title].code=t.code);for(let[t,n]of Object.entries(this.output))this.output[t].code&&(this.response[t].code=this.output[t].code),this.output[t].value&&(this.response[t].value=this.output[t].value);this.responseStr=JSON.stringify(this.response,null,2),this.refreshResponseBundle()}refreshResponseBundle(){this.responseBundle={resourceType:"Bundle",type:"collection",entry:[]};for(let[t,n]of Object.entries(this.response)){let r=n;const s=r.code?{coding:[{system:"http://snomed.info/sct",code:r.code.code,display:r.code.display}]}:void 0,o=r.value?.code?{coding:[{system:"http://snomed.info/sct",code:r.value.code,display:r.value.display}]}:void 0;let l={resourceType:"Observation",status:"final",category:[{coding:[{system:"http://terminology.hl7.org/CodeSystem/observation-category",code:"survey",display:"Survey"}]}],subject:{reference:"Patient/123"}};l.code=s||{coding:[{system:"http://snomed.info/sct",code:"363788007",display:"Clinical history/examination observable (observable entity)"}]},o&&(l.valueCodeableConcept=o),r.value&&"string"==typeof r.value&&(l.valueString=r.value),(l.valueCodeableConcept||l.valueString)&&this.responseBundle.entry.push(l)}this.responseBundleStr=JSON.stringify(this.responseBundle,null,2)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275cmp=je({type:e,selectors:[["app-bindings-viewer"]],inputs:{spec:"spec"},decls:3,vars:2,consts:[["substancePopoverMenu","matMenu"],["class","output-panel",4,"ngFor","ngForOf"],[1,"output-panel"],[1,"row","control"],["class","grow",3,"binding","selectionChange",4,"ngIf"],["class","title grow",4,"ngIf"],["class","grow",3,"binding","textChange",4,"ngIf"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled",4,"ngIf"],["mat-menu-item","",3,"disableRipple","click",4,"ngIf"],[1,"grow",3,"selectionChange","binding"],[1,"title","grow"],[1,"grow",3,"textChange","binding"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor","disabled"],["mat-menu-item","",3,"click","disableRipple"]],template:function(n,r){1&n&&(tt(0,"h2"),ut(1),et(),Gt(2,N8t,16,12,"div",1)),2&n&&(lt(),Ze(r.spec.title),lt(),yt("ngForOf",r.spec.bindings))},dependencies:[gs,Ms,Oo,da,bl,Gl,cu,av,WX,$X,QX,JX,qX,tj,ej],styles:["#main-panel[_ngcontent-%COMP%]{padding:10px}h3[_ngcontent-%COMP%]{margin-top:0}.row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:-5px;align-items:center;gap:10px}.grow[_ngcontent-%COMP%]{flex-grow:4}mat-hint[_ngcontent-%COMP%], mat-error[_ngcontent-%COMP%]{font-size:12px}.editPanel[_ngcontent-%COMP%]{border:1px solid #cccccc00;border-radius:5px;background-color:#a0c8e5}.control[_ngcontent-%COMP%]{margin-bottom:30px}.output-panel[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%] .tool[_ngcontent-%COMP%]{opacity:0;transition:opacity .5s}.row[_ngcontent-%COMP%]:hover .tool[_ngcontent-%COMP%]{opacity:1}.drag-handle[_ngcontent-%COMP%]{cursor:move;color:#616161}.title[_ngcontent-%COMP%]{font-size:20px;font-weight:700;margin-bottom:10px;margin-left:2rem}.action-button[_ngcontent-%COMP%]{position:absolute;right:0;margin-right:20px}.action-button[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:5px}.row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:flex-start}.compact-row-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:1rem}.row-container-item[_ngcontent-%COMP%]{width:100%;padding:10px}.output[_ngcontent-%COMP%]{border-radius:10px;background-color:#282c34;padding:10px;position:relative;margin:2rem}#save[_ngcontent-%COMP%]{position:absolute;right:0;top:0;color:#e88c15}.top-right-link[_ngcontent-%COMP%]{position:absolute;top:5px;right:0;font-size:smaller}.form-title[_ngcontent-%COMP%]{margin-left:1rem}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding:0!important}.bottom-right-link[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:0;font-size:smaller}.form-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.form-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-right:-10px;margin-left:-10px;width:100%}.form-column[_ngcontent-%COMP%]{flex:1 1 0px;padding-right:10px;padding-left:10px;display:flex;flex-direction:column;width:100%}.input-field.full-width[_ngcontent-%COMP%]{width:calc(100% - 20px);margin-bottom:20px}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}"]})}return e})();function V8t(e,i){if(1&e&&(tt(0,"mat-tab",7)(1,"div",8),we(2,"app-bindings-viewer",9),et()()),2&e){const t=i.$implicit;hh("label",t.spec.title),lt(2),yt("spec",t.spec)}}let U8t=(()=>{class e{constructor(t){this.http=t,this.emptySpec={},this.specs=[{specFile:"Example-spec.json",spec:this.emptySpec},{specFile:"Example-spec-2.json",spec:this.emptySpec}]}ngOnInit(){var t=this;this.specs.forEach(function(){var n=de(function*(r){const s=yield Ca(t.http.get("assets/specs/ncpt/"+r.specFile));console.log(s),r.spec=s});return function(r){return n.apply(this,arguments)}}())}static#t=this.\u0275fac=function(n){return new(n||e)(mt(sd))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-ncpt"]],decls:20,vars:3,consts:[["substancePopoverMenu","matMenu"],[1,"outer-container"],["mat-icon-button","","color","primary",3,"matMenuTriggerFor"],["mat-menu-item","",1,"long-tooltip",3,"click","disableRipple"],["href","https://confluence.ihtsdotools.org/display/WIPnutsig/SNOMED+CT+Implementation+Guide+for+the+Nutrition+Care+Process+Terminology","target","_blank"],["mat-stretch-tabs","false","mat-align-tabs","start"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"container"],[3,"spec"]],template:function(n,r){if(1&n){const s=ve();tt(0,"div",1)(1,"h3"),ut(2,"SNOMED CT - NCPT Implementation Demonstrator "),tt(3,"button",2)(4,"mat-icon"),ut(5,"info"),et()(),tt(6,"mat-menu",null,0)(8,"span",3),Vt("click",function(l){return Ut(s),zt(l.stopPropagation())}),tt(9,"h4"),ut(10,"SNOMED CT - NCPT Implementation Demonstrator"),et(),tt(11,"p"),ut(12,"This is a demonstration of the use of SNOMED CT for coding clinical information related to the Nutrition Care Process."),et(),tt(13,"p"),ut(14,"For more information check the "),tt(15,"a",4),ut(16," Implementation Guide"),et(),ut(17,"."),et()()()(),tt(18,"mat-tab-group",5),Gt(19,V8t,3,2,"mat-tab",6),et()()}if(2&n){const s=qi(7);lt(3),yt("matMenuTriggerFor",s),lt(5),yt("disableRipple",!0),lt(11),yt("ngForOf",r.specs)}},dependencies:[gs,Oo,da,bl,Gl,cu,zy,ov,B8t],styles:[".outer-container[_ngcontent-%COMP%]{margin:1rem;width:calc(100% - 2rem)}.container[_ngcontent-%COMP%]{margin:2rem;width:calc(100% - 4rem)}"]})}return e})();var z8t=ps(945),Ql=ps.n(z8t);const G8t=["gameContainer"];let H8t=(()=>{class e{constructor(t){this.terminologyService=t}ngOnInit(){const t=new W8t,n=new X8t(this.terminologyService),r={type:Ql().AUTO,width:800,height:600,parent:this.gameContainer.nativeElement,scene:[n,t],physics:{default:"arcade",arcade:{debug:!1}}};this.game=new(Ql().Game)(r)}ngOnDestroy(){this.game&&this.game.destroy(!0)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(ca))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-phaser-game"]],viewQuery:function(n,r){if(1&n&&Mi(G8t,7),2&n){let s;Be(s=Ve())&&(r.gameContainer=s.first)}},decls:2,vars:0,consts:[["gameContainer",""]],template:function(n,r){1&n&&we(0,"div",null,0)}})}return e})();class W8t extends Ql().Scene{constructor(){super({key:"UIScene",active:!0}),this.gamePaused=!1,this.speedButtons=[],this.speedLevels=[1,2,4,16],this.activeSpeedIndex=0}preload(){this.load.image("pauseButton","assets/cdstd/Objects/Buttons/button_pause.png"),this.load.image("unpauseButton","assets/cdstd/Objects/Buttons/button_unpause.png")}create(){this.pauseButton=this.add.image(75,50,"pauseButton").setInteractive(),this.pauseButton.on("pointerdown",()=>{const i=this.scene.get("CdstdScene");this.gamePaused?i&&(i.scene.resume(),this.gamePaused=!1,this.pauseButton.setTexture("pauseButton")):i&&(i.scene.pause(),this.gamePaused=!0,this.pauseButton.setTexture("unpauseButton"))}),this.speedLevels.forEach((i,t)=>{const n=this.add.text(150+60*t,35,`${i}x`,{fontSize:"18px",color:t===this.activeSpeedIndex?"#ff0":"#fff",backgroundColor:"#000",padding:{x:10,y:5}}).setInteractive().on("pointerdown",()=>{this.setSpeed(t)});this.speedButtons.push(n)})}setSpeed(i){this.activeSpeedIndex=i,this.speedButtons.forEach((n,r)=>{n.setStyle({color:r===this.activeSpeedIndex?"#ff0":"#fff"})});const t=this.scene.get("CdstdScene");t&&(t.time.timeScale=this.speedLevels[this.activeSpeedIndex],t.setSpeedMultiplier(this.speedLevels[this.activeSpeedIndex]))}}class X8t extends Ql().Scene{constructor(i){super({key:"CdstdScene"}),this.terminologyService=i,this.maxPatients=10,this.spawnedPatients=0,this.patientsInQueue=0,this.outsideQueue=[],this.insideQueue=[],this.goodTriage=0,this.badTriage=0,this.diagnosisData=[],this.admitting=!1,this.lastTriageTime=0,this.speedMultiplier=1,this.admissionEcl="( << 386661006 |Fever| OR << 22253000 |Pain (finding)| )",this.internalTriageRules=[{ecl:"<< 386661006",doctorIndex:1},{ecl:"<< 22253000",doctorIndex:0}],this.attendingDoctors=[{x:130,y:207,title:"Cardiologist",ecl:"(<< 106063007 |Cardiovascular finding (finding)| OR << 29857009 |Chest pain (finding)|)"},{x:130,y:140,title:"Infectologist",ecl:"<< 386661006 |Fever (finding)|"}],this.characterAnimations=[{name:"patient",variants:[{id:1,animations:{idle:{start:0,end:5,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:10,repeat:-1},dead:{start:0,end:3,frameRate:4,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}},{id:2,animations:{idle:{start:0,end:5,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:10,repeat:-1},dead:{start:0,end:3,frameRate:4,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}},{id:3,animations:{idle:{start:0,end:4,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:9,repeat:-1},dead:{start:0,end:4,frameRate:5,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}}]},{name:"gatekeeper",variants:[{id:2,animations:{idle:{start:0,end:5,frameRate:6,repeat:-1},walk:{start:0,end:9,frameRate:10,repeat:-1},dead:{start:0,end:4,frameRate:5,repeat:0},hurt:{start:0,end:2,frameRate:3,repeat:0}}}]}],this.terminologyService.setSnowstormFhirBase("https://snowstorm-lite.nw.r.appspot.com/fhir")}setSpeedMultiplier(i){this.speedMultiplier=i}getSelectedSpeed(){return this.speedMultiplier}preload(){this.load.json("diagnosisData","assets/cdstd/Data/dx_1.json"),this.load.image("hospitalFloor","assets/cdstd/Backgrounds/hospital-floor-day.png");const i=["idle","walk","dead","hurt"];for(let t=1;t<=3;t++)i.forEach(n=>{this.load.spritesheet(`patient_${n}_${t}`,`assets/cdstd/Characters/City_men_${t}/${n.charAt(0).toUpperCase()+n.slice(1)}.png`,{frameWidth:128,frameHeight:128})});for(let t=2;t<=2;t++)i.forEach(n=>{this.load.spritesheet(`gatekeeper_${n}_${t}`,`assets/cdstd/Characters/Gangsters_${t}/${n.charAt(0).toUpperCase()+n.slice(1)}.png`,{frameWidth:128,frameHeight:128})})}create(){this.diagnosisData=this.cache.json.get("diagnosisData"),this.defineAnimations(),this.background=this.add.image(400,300,"hospitalFloor"),this.background.setScale(1),this.scoreText=this.add.text(750,10,`Patients: ${this.spawnedPatients}`,{fontSize:"20px",color:"#ffffff",fontStyle:"bold"}).setOrigin(1,0),this.input.enabled=!0,this.outsideQueue=[],this.goodTriage=0,this.spawnedPatients=0,this.patients=this.physics.add.group(),this.spawnPatient(),this.scheduleRandomPatientSpawn(),this.addDoctors()}update(){this.patients.getChildren().forEach(t=>{const n=t;if(!n.active)return;const r=n.x,s=n.previousX;rs&&(n.flipX=!1),n.previousX=r}),this.scoreText.setText(`Patients: ${this.spawnedPatients} Effectiveness: ${(this.spawnedPatients-this.badTriage)/this.spawnedPatients*100}%`),this.admitting&&this.testNextPatientForAdmission();const i=Date.now();this.insideQueue.length>0&&this.attendingDoctors.every(t=>!t.character.info.busy)&&i-this.lastTriageTime>=2e3&&(this.lastTriageTime=Date.now(),this.time.delayedCall(1e3,()=>{this.internalTriage()}))}defineAnimations(){this.characterAnimations.forEach(({name:i,variants:t})=>{t.forEach(({id:n,animations:r})=>{Object.entries(r).forEach(([s,{start:o,end:l,frameRate:w,repeat:C}])=>{const M=`${i}_${s}_${n}`;this.anims.exists(M)||this.anims.create({key:M,frames:this.anims.generateFrameNumbers(`${i}_${s}_${n}`,{start:o,end:l}),frameRate:w,repeat:C})})})})}scheduleRandomPatientSpawn(){if(this.spawnedPatients{this.spawnPatient(),this.scheduleRandomPatientSpawn()},callbackScope:this})}}addDoctors(){this.internalTriageDoctor=new FE(this,270,350,"gatekeeper",2),this.internalTriageDoctor.flipX=!1,this.internalTriageDoctor.idle(),this.attendingDoctors.forEach(i=>{const t=new FE(this,i.x,i.y,"gatekeeper",2);t.info.ecl=i.ecl,t.info.title=i.title,t.info.busy=!1,t.idle(),i.character=t})}spawnPatient(){const i=new FE(this,80,10,"patient",Ql().Math.Between(1,3));this.outsideQueue.push(i),i.queuePosition=this.outsideQueue.length,i.setScale(.5),this.walkTo(i,[{x:80,y:533,duration:500},{x:330+20*i.queuePosition,y:533,duration:500}],()=>{this.patientsInQueue++,this.time.delayedCall(100,()=>{i.flipX=!0}),this.patientsInQueue===this.maxPatients&&this.queueComplete()}),i.setActive(!0).setVisible(!0),this.patients.add(i),this.spawnedPatients++}queueComplete(){this.gatekeeper=new FE(this,315,190,"gatekeeper",2),this.gatekeeper.setScale(.5),this.walkTo(this.gatekeeper,[{x:315,y:350,duration:200},{x:240,y:350,duration:200},{x:240,y:533,duration:200},{x:310,y:533,duration:200}],()=>{this.gatekeeper.say("We will start soon",1e3),this.time.delayedCall(1e3,()=>{this.admitting=!0})})}patientDied(i){}testNextPatientForAdmission(){if(0===this.outsideQueue.length)return;const i=this.outsideQueue.shift();i&&(this.admitting=!1,this.gatekeeper.say("How do you feel?",1500),this.time.delayedCall(1500,()=>{let t="I have been feeling with:\n";t+=i.clinicalData.diagnosis.map(n=>n.display).join("\n"),i.say(t,1800),this.time.delayedCall(2e3,()=>{this.checkPatientDiagnosisVsEcl(i,this.admissionEcl).then(n=>{n.length>0?(this.gatekeeper.say("Go in...",1500),i.clinicalData.diagnosis.forEach(r=>{n.find(s=>s.code===r.code)&&(r.status="admitted")}),this.time.delayedCall(1500,()=>{this.enterHospital(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{this.admitting=!0})})):(this.gatekeeper.say("Go home...",1500),this.time.delayedCall(500,()=>{this.walkAway(i),this.advanceQueue(this.outsideQueue),this.time.delayedCall(1e3,()=>{this.admitting=!0})}))})})}))}enterHospital(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length,i.walk(),this.walkTo(i,[{x:240,y:i.y,duration:500},{x:240,y:350,duration:500},{x:280+20*i.queuePosition,y:350,duration:500}],()=>{this.time.delayedCall(100,()=>{i.flipX=!0})})}walkAway(i){i.flipX=!1,i.walk();let t=[];i.y<500&&(t.push({x:240,y:i.y,duration:500}),t.push({x:240,y:533,duration:500}));let n=Ql().Math.Between(0,1);t.push({x:800*n,y:533,duration:1e3}),this.walkTo(i,t,()=>{this.time.delayedCall(100,()=>{i.destroy()})})}advanceQueue(i){if(0===i.length)return;console.log(i);const t=i[0].x-40;i.forEach((n,r)=>{n.walk(),n.queuePosition=r+1,this.walkTo(n,[{x:t+20*n.queuePosition,y:n.y,duration:500}],()=>{})})}internalTriage(){var i=this;return de(function*(){if(0===i.insideQueue.length)return;const t=i.insideQueue.shift();if(t){for(let n of i.internalTriageRules){const r=i.attendingDoctors[n.doctorIndex].character;if(!r.info.busy&&(yield i.checkPatientDiagnosisVsEcl(t,n.ecl)).length>0){console.log(`${r.info.title} is available and will attend to the patient.`),i.internalTriageDoctor.say(`Go to the ${r?.info?.title}`,1e3),i.time.delayedCall(1e3,()=>{t.flipX=!0;const o=[{x:240,y:t.y,duration:200},{x:240,y:r.y,duration:300},{x:r.x+30,y:r.y,duration:300}];r.info.busy=!0,i.walkTo(t,o,()=>{t.idle(),i.attendPatient(t,r)})});break}}t.active||i.addToInsideQueue(t)}})()}addToInsideQueue(i){this.insideQueue.push(i),i.queuePosition=this.insideQueue.length,this.walkTo(i,[{x:280+20*i.queuePosition,y:350,duration:500/this.speedMultiplier}],()=>{i.idle()}),console.log(`Patient re-added to insideQueue at position ${i.queuePosition}`)}attendPatient(i,t){t.info.busy=!0,this.time.delayedCall(1e3,()=>{this.checkPatientDiagnosisVsEcl(i,t.info.ecl).then(n=>{n.length>0?(i.clinicalData.diagnosis.forEach(r=>{n.find(s=>s.code===r.code)&&(r.status="treated")}),i.clinicalData.diagnosis.find(r=>"admitted"===r.status)?(t.say(`${t.info.title}\nGo to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),t.info.busy=!1})):(t.say(`${t.info.title}\nHave a nice day`,1e3),this.time.delayedCall(1e3,()=>{this.goodTriage++,this.walkAway(i),t.info.busy=!1}))):i.clinicalData.diagnosis.find(r=>"admitted"===r.status)?(t.say(`${t.info.title}\nI can't help with this, but go to the next doctor`,1e3),this.time.delayedCall(1e3,()=>{this.enterHospital(i),t.info.busy=!1})):(t.say(`${t.info.title}\nI can't help you...`,1e3),this.time.delayedCall(1e3,()=>{this.badTriage++,this.walkAway(i),t.info.busy=!1}))})})}gameOver(){this.add.text(400,350,"Game Over",{fontSize:"48px",color:"#ff0000",fontStyle:"bold"}).setOrigin(.5),this.add.text(400,400,"Press R to Restart",{fontSize:"24px",color:"#ffffff"}).setOrigin(.5),this.physics.pause();const i=this.input?.keyboard?.addKey("R");i?i.once("down",()=>{this.time.removeAllEvents(),this.tweens.killAll(),this.scene.restart()}):console.error("Keyboard input is not available.")}walkTo(i,t,n){if(0===t.length)return void n();i.walk();const r=s=>{if(s>=t.length)return i.idle(),void n();const o=t[s];this.tweens.add({targets:i,x:o.x,y:o.y,duration:o.duration/this.speedMultiplier,ease:"Linear",onComplete:()=>{r(s+1)}})};r(0)}checkPatientDiagnosisVsEcl(i,t){return new Promise((n,r)=>{let s=0,o="";i?.clinicalData.diagnosis.forEach((l,w)=>{"treated"!==l.status&&(s++,o+=s>1?` OR ${l.code}`:` ${l.code}`)}),0!==s?this.terminologyService.expandValueSet(t=t+" AND ("+o+" )","").subscribe(l=>{n(l.expansion?.total>0?l.expansion.contains:[])},l=>{r(l)}):n([])})}}class FE extends Ql().Physics.Arcade.Sprite{constructor(i,t,n,r,s=1,o=[]){if(super(i,t,n,`${r}_idle_${s}`),this.inQueue=!1,this.queuePosition=0,this.queueStartTime=0,this.hitPoints=5,this.previousX=0,this.clinicalData={},this.info={},i.add.existing(this),i.physics.add.existing(this),this.setCollideWorldBounds(!0),this.sceneRef=i,this.spriteType=s,this.role=r,i.add.existing(this),this.setScale(.5),"patient"===r)if(this.walk(),this.clinicalData.age=Ql().Math.Between(18,100),this.clinicalData.diagnosis=[],o&&o.length>0)this.clinicalData.diagnosis=o;else{const l=Ql().Math.Between(1,5);for(let w=0;wi.destroy()}),this.once(Ql().Animations.Events.ANIMATION_COMPLETE,()=>{this.hitPoints>0?this.idle():this.dead()})}startWaiting(){"patient"===this.role&&(this.inQueue=!0,this.queueStartTime=this.scene.time.now)}say(i,t=2e3){this.calloutText&&this.calloutText.destroy(),this.calloutLine&&this.calloutLine.destroy(),this.calloutText=this.sceneRef.add.text(this.x,this.y-50,i,{fontSize:"16px",color:"#ffffff",backgroundColor:"#000000",padding:{x:5,y:2},align:"center"}).setOrigin(.5).setDepth(10),this.calloutLine=this.sceneRef.add.line(this.x+5,this.y+10,0,0,10,-35,0).setLineWidth(1.5).setDepth(9),this.sceneRef.tweens.add({targets:[this.calloutText,this.calloutLine],alpha:0,duration:500/this.sceneRef.getSelectedSpeed(),delay:t,onComplete:()=>{this.calloutText?.destroy(),this.calloutText=void 0,this.calloutLine?.destroy()}})}}const j8t=[{path:"",component:UJ},{path:"home",component:UJ},{path:"allergies",component:XEt},{path:"sandbox",component:jDt},{path:"prescription",component:YDt},{path:"questionnaires",component:vIt},{path:"implementation-course/subset-validator",component:HIt},{path:"snoguess",component:KLt},{path:"snoguess/scoreboard",component:UNt},{path:"context",component:uNt},{path:"maturity",component:T8t},{path:"ncpt",component:U8t},{path:"phaser",component:H8t},{path:"**",redirectTo:""}];let Y8t=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[TG.forRoot(j8t,{useHash:!0}),TG]})}return e})();const $8t=[{title:"GROUP 1",description:"The first group of bindings in the coding demonstration",bindings:[{title:"Medicinal product + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, contain at least provided ingredientes (open world assuption), no information on form."},{title:"Gender",type:"dropdown",ecl:"< 365873007 |Gender finding (finding)|",value:"",note:"Patient gender."},{title:"Medicinal product form + groupers",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n [0..0] 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details."}]},{title:"GROUP 2",description:"The second group of bindings in the coding demonstration",bindings:[{title:"Medicinal product only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n [0..0] 411116001 |Has manufactured dose form| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, containing only the provided ingredientes (close world assuption), with no information on form."},{title:"Medicinal product form only",type:"autocomplete",ecl:"<< 763158003 |Medicinal product| :\n 1142139005 |Count of base of active ingredient| = *,\n 411116001 |Has manufactured dose form| = *,\n [0..0] 732943007 |Has basis of strength substance (attribute)| = *,\n [0..0] 774158006 |Has product name| = *",value:"",note:"Medicinal products, with form details, containing only the provided ingredientes (close world assuption)."}]}];let Q8t=(()=>{class e{constructor(){}getCodingSpec(){return $8t}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var pn,a1={version:"0.20.2"},pa=1200,Xm=1252,K8t=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],FL={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},OE=function(e){-1!=K8t.indexOf(e)&&(Xm=FL[0]=e)},Kl=function(e){pa=e,OE(e)};var o1=function(i){return String.fromCharCode(i)},OL=function(i){return String.fromCharCode(i)},Ls=null,ho="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function BE(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0,w=0,C=0;C>2,o=(3&t)<<4|(n=e.charCodeAt(C++))>>4,l=(15&n)<<2|(r=e.charCodeAt(C++))>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=ho.charAt(s)+ho.charAt(o)+ho.charAt(l)+ho.charAt(w);return i}function Al(e){var i="",s=0,o=0,l=0,w=0;"data:"==e.slice(0,5)&&(C=e.slice(0,1024).indexOf(";base64,"))>-1&&(e=e.slice(C+8)),e=e.replace(/[^\w\+\/\=]/g,"");for(var C=0;C>4),64!==(l=ho.indexOf(e.charAt(C++)))&&(i+=String.fromCharCode((15&o)<<4|l>>2)),64!==(w=ho.indexOf(e.charAt(C++)))&&(i+=String.fromCharCode((3&l)<<6|w));return i}var _n=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),bd=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(i,t){return t?new Buffer(i,t):new Buffer(i)}:Buffer.from.bind(Buffer)}return function(){}}(),l1=function(){if(typeof Buffer>"u")return!1;var e=bd([65,0]);return!!e&&1==e.toString("utf16le").length}();function uf(e){return _n?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function WJ(e){return _n?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var Vo=function(i){return _n?bd(i,"binary"):i.split("").map(function(t){return 255&t.charCodeAt(0)})};function c1(e){if(typeof ArrayBuffer>"u")return Vo(e);for(var i=new ArrayBuffer(e.length),t=new Uint8Array(i),n=0;n!=e.length;++n)t[n]=255&e.charCodeAt(n);return i}function wd(e){if(Array.isArray(e))return e.map(function(n){return String.fromCharCode(n)}).join("");for(var i=[],t=0;t=0;)i+=e.charAt(t--);return i}function Dc(e,i){var t=""+e;return t.length>=i?t:Xn("0",i-t.length)+t}function NL(e,i){var t=""+e;return t.length>=i?t:Xn(" ",i-t.length)+t}function VE(e,i){var t=""+e;return t.length>=i?t:t+Xn(" ",i-t.length)}var XJ=Math.pow(2,32);function d0(e,i){return e>XJ||e<-XJ?function r6t(e,i){var t=""+Math.round(e);return t.length>=i?t:Xn("0",i-t.length)+t}(e,i):function s6t(e,i){var t=""+e;return t.length>=i?t:Xn("0",i-t.length)+t}(Math.round(e),i)}function UE(e,i){return e.length>=7+(i=i||0)&&103==(32|e.charCodeAt(i))&&101==(32|e.charCodeAt(i+1))&&110==(32|e.charCodeAt(i+2))&&101==(32|e.charCodeAt(i+3))&&114==(32|e.charCodeAt(i+4))&&97==(32|e.charCodeAt(i+5))&&108==(32|e.charCodeAt(i+6))}var jJ=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],BL=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]],ki={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "'},YJ={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},o6t={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function zE(e,i,t){for(var n=e<0?-1:1,r=e*n,s=0,o=1,l=0,w=1,C=0,M=0,P=Math.floor(r);Ci&&(C>i?(M=w,l=s):(M=C,l=o)),!t)return[0,n*l,M];var O=Math.floor(n*l/M);return[O,n*l-O*M,M]}function _d(e,i,t){if(e>2958465||e<0)return null;e=function l6t(e){var i=e.toPrecision(16);if(i.indexOf("e")>-1){var t=i.slice(0,i.indexOf("e"));return(t=t.indexOf(".")>-1?t.slice(0,"0."==t.slice(0,2)?17:16):t.slice(0,15)+Xn("0",t.length-15))+i.slice(i.indexOf("e"))}var n=i.indexOf(".")>-1?i.slice(0,"0."==i.slice(0,2)?17:16):i.slice(0,15)+Xn("0",i.length-15);return Number(n)}(e);var n=0|e,r=Math.floor(86400*(e-n)),s=0,o=[],l={D:n,T:r,u:86400*(e-n)-r,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(l.u)<1e-6&&(l.u=0),i&&i.date1904&&(n+=1462),l.u>.9999&&(l.u=0,86400==++r&&(l.T=r=0,++n,++l.D)),60===n)o=t?[1317,10,29]:[1900,2,29],s=3;else if(0===n)o=t?[1317,8,29]:[1900,1,0],s=6;else{n>60&&--n;var w=new Date(1900,0,1);w.setDate(w.getDate()+n-1),o=[w.getFullYear(),w.getMonth()+1,w.getDate()],s=w.getDay(),n<60&&(s=(s+6)%7),t&&(s=function h6t(e,i){i[0]-=581;var t=e.getDay();return e<60&&(t=(t+6)%7),t}(w,o))}return l.y=o[0],l.m=o[1],l.d=o[2],l.S=r%60,r=Math.floor(r/60),l.M=r%60,r=Math.floor(r/60),l.H=r,l.q=s,l}function VL(e){return-1==e.indexOf(".")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function jm(e,i){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(0|e)===e?e.toString(10):function u1(e){var t,i=Math.floor(Math.log(Math.abs(e))*Math.LOG10E);return t=i>=-4&&i<=-1?e.toPrecision(10+i):Math.abs(i)<=9?function d6t(e){var i=e<0?12:11,t=VL(e.toFixed(12));return t.length<=i||(t=e.toPrecision(10)).length<=i?t:e.toExponential(5)}(e):10===i?e.toFixed(10).substr(0,12):function u6t(e){var i=VL(e.toFixed(11));return i.length>(e<0?12:11)||"0"===i||"-0"===i?e.toPrecision(6):i}(e),VL(function c6t(e){return-1==e.indexOf("E")?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}(t.toUpperCase()))}(e);case"undefined":return"";case"object":if(null==e)return"";if(e instanceof Date)return nl(14,ms(e,i&&i.date1904),i)}throw new Error("unsupported value in General format: "+e)}function f6t(e,i,t,n){var w,r="",s=0,o=0,l=t.y,C=0;switch(e){case 98:l=t.y+543;case 121:switch(i.length){case 1:case 2:w=l%100,C=2;break;default:w=l%1e4,C=4}break;case 109:switch(i.length){case 1:case 2:w=t.m,C=i.length;break;case 3:return BL[t.m-1][1];case 5:return BL[t.m-1][0];default:return BL[t.m-1][2]}break;case 100:switch(i.length){case 1:case 2:w=t.d,C=i.length;break;case 3:return jJ[t.q][0];default:return jJ[t.q][1]}break;case 104:switch(i.length){case 1:case 2:w=1+(t.H+11)%12,C=i.length;break;default:throw"bad hour format: "+i}break;case 72:switch(i.length){case 1:case 2:w=t.H,C=i.length;break;default:throw"bad hour format: "+i}break;case 77:switch(i.length){case 1:case 2:w=t.M,C=i.length;break;default:throw"bad minute format: "+i}break;case 115:if("s"!=i&&"ss"!=i&&".0"!=i&&".00"!=i&&".000"!=i)throw"bad second format: "+i;return 0!==t.u||"s"!=i&&"ss"!=i?(o=n>=2?3===n?1e3:100:1===n?10:1,(s=Math.round(o*(t.S+t.u)))>=60*o&&(s=0),"s"===i?0===s?"0":""+s/o:(r=Dc(s,2+n),"ss"===i?r.substr(0,2):"."+r.substr(2,i.length-1))):Dc(t.S,i.length);case 90:switch(i){case"[h]":case"[hh]":w=24*t.D+t.H;break;case"[m]":case"[mm]":w=60*(24*t.D+t.H)+t.M;break;case"[s]":case"[ss]":w=60*(60*(24*t.D+t.H)+t.M)+(0==n?Math.round(t.S+t.u):t.S);break;default:throw"bad abstime format: "+i}C=3===i.length?1:2;break;case 101:w=l,C=1}return C>0?Dc(w,C):""}function Lu(e){if(e.length<=3)return e;for(var t=e.length%3,n=e.substr(0,t);t!=e.length;t+=3)n+=(n.length>0?",":"")+e.substr(t,3);return n}var $J=/%/g;function QJ(e,i){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==i)return"0.0E+0";if(i<0)return"-"+QJ(e,-i);var r=e.indexOf(".");-1===r&&(r=e.indexOf("E"));var s=Math.floor(Math.log(i)*Math.LOG10E)%r;if(s<0&&(s+=r),-1===(t=(i/Math.pow(10,s)).toPrecision(n+1+(r+s)%r)).indexOf("e")){var o=Math.floor(Math.log(i)*Math.LOG10E);for(-1===t.indexOf(".")?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s);"0."===t.substr(0,2);)t=(t=t.charAt(0)+t.substr(2,r)+"."+t.substr(2+r)).replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,w,C,M){return w+C+M.substr(0,(r+s)%r)+"."+M.substr(s)+"E"})}else t=i.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}var KJ=/# (\?+)( ?)\/( ?)(\d+)/,ZJ=/^#*0*\.([0#]+)/,JJ=/\)[^)]*[0#]/,qJ=/\(###\) ###\\?-####/;function Uo(e){for(var t,i="",n=0;n!=e.length;++n)switch(t=e.charCodeAt(n)){case 35:break;case 63:i+=" ";break;case 48:i+="0";break;default:i+=String.fromCharCode(t)}return i}function tq(e,i){var t=Math.pow(10,i);return""+Math.round(e*t)/t}function eq(e,i){var t=e-Math.floor(e),n=Math.pow(10,i);return i<(""+Math.round(t*n)).length?0:Math.round(t*n)}function Zl(e,i,t){if(40===e.charCodeAt(0)&&!i.match(JJ)){var n=i.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?Zl("n",n,t):"("+Zl("n",n,-t)+")"}if(44===i.charCodeAt(i.length-1))return function p6t(e,i,t){for(var n=i.length-1;44===i.charCodeAt(n-1);)--n;return Nu(e,i.substr(0,n),t/Math.pow(10,3*(i.length-n)))}(e,i,t);if(-1!==i.indexOf("%"))return function m6t(e,i,t){var n=i.replace($J,""),r=i.length-n.length;return Nu(e,n,t*Math.pow(10,2*r))+Xn("%",r)}(e,i,t);if(-1!==i.indexOf("E"))return QJ(i,t);if(36===i.charCodeAt(0))return"$"+Zl(e,i.substr(" "==i.charAt(1)?2:1),t);var r,s,o,l,w=Math.abs(t),C=t<0?"-":"";if(i.match(/^00+$/))return C+d0(w,i.length);if(i.match(/^[#?]+$/))return"0"===(r=d0(t,0))&&(r=""),r.length>i.length?r:Uo(i.substr(0,i.length-r.length))+r;if(s=i.match(KJ))return function g6t(e,i,t){var n=parseInt(e[4],10),r=Math.round(i*n),s=Math.floor(r/n),o=r-s*n,l=n;return t+(0===s?"":""+s)+" "+(0===o?Xn(" ",e[1].length+1+e[4].length):NL(o,e[1].length)+e[2]+"/"+e[3]+Dc(l,e[4].length))}(s,w,C);if(i.match(/^#+0+$/))return C+d0(w,i.length-i.indexOf("0"));if(s=i.match(ZJ))return r=tq(t,s[1].length).replace(/^([^\.]+)$/,"$1."+Uo(s[1])).replace(/\.$/,"."+Uo(s[1])).replace(/\.(\d*)$/,function(U,X){return"."+X+Xn("0",Uo(s[1]).length-X.length)}),-1!==i.indexOf("0.")?r:r.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),s=i.match(/^(0*)\.(#*)$/))return C+tq(w,s[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=i.match(/^#{1,3},##0(\.?)$/))return C+Lu(d0(w,0));if(s=i.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+Zl(e,i,-t):Lu(""+(Math.floor(t)+function x6t(e,i){return i<(""+Math.round((e-Math.floor(e))*Math.pow(10,i))).length?1:0}(t,s[1].length)))+"."+Dc(eq(t,s[1].length),s[1].length);if(s=i.match(/^#,#*,#0/))return Zl(e,i.replace(/^#,#*,/,""),t);if(s=i.match(/^([0#]+)(\\?-([0#]+))+$/))return r=c0(Zl(e,i.replace(/[\\-]/g,""),t)),o=0,c0(c0(i.replace(/\\/g,"")).replace(/[0#]/g,function(U){return o-2147483648?""+(e>=0?0|e:e-1|0):""+Math.floor(e)}(t)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(U){return"00,"+(U.length<3?Dc(0,3-U.length):"")+U})+"."+Dc(o,s[1].length);switch(i){case"###,##0.00":return Zl(e,"#,##0.00",t);case"###,###":case"##,###":case"#,###":var L=Lu(d0(w,0));return"0"!==L?C+L:"";case"###,###.00":return Zl(e,"###,##0.00",t).replace(/^0\./,".");case"#,###.00":return Zl(e,"#,##0.00",t).replace(/^0\./,".")}throw new Error("unsupported format |"+i+"|")}function iq(e,i){var t,n=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(0==i)return"0.0E+0";if(i<0)return"-"+iq(e,-i);var r=e.indexOf(".");-1===r&&(r=e.indexOf("E"));var s=Math.floor(Math.log(i)*Math.LOG10E)%r;if(s<0&&(s+=r),!(t=(i/Math.pow(10,s)).toPrecision(n+1+(r+s)%r)).match(/[Ee]/)){var o=Math.floor(Math.log(i)*Math.LOG10E);-1===t.indexOf(".")?t=t.charAt(0)+"."+t.substr(1)+"E+"+(o-t.length+s):t+="E+"+(o-s),t=t.replace(/\+-/,"-")}t=t.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(l,w,C,M){return w+C+M.substr(0,(r+s)%r)+"."+M.substr(s)+"E"})}else t=i.toExponential(n);return e.match(/E\+00$/)&&t.match(/e[+-]\d$/)&&(t=t.substr(0,t.length-1)+"0"+t.charAt(t.length-1)),e.match(/E\-/)&&t.match(/e\+/)&&(t=t.replace(/e\+/,"e")),t.replace("e","E")}function Td(e,i,t){if(40===e.charCodeAt(0)&&!i.match(JJ)){var n=i.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return t>=0?Td("n",n,t):"("+Td("n",n,-t)+")"}if(44===i.charCodeAt(i.length-1))return function b6t(e,i,t){for(var n=i.length-1;44===i.charCodeAt(n-1);)--n;return Nu(e,i.substr(0,n),t/Math.pow(10,3*(i.length-n)))}(e,i,t);if(-1!==i.indexOf("%"))return function w6t(e,i,t){var n=i.replace($J,""),r=i.length-n.length;return Nu(e,n,t*Math.pow(10,2*r))+Xn("%",r)}(e,i,t);if(-1!==i.indexOf("E"))return iq(i,t);if(36===i.charCodeAt(0))return"$"+Td(e,i.substr(" "==i.charAt(1)?2:1),t);var r,s,o,l,w=Math.abs(t),C=t<0?"-":"";if(i.match(/^00+$/))return C+Dc(w,i.length);if(i.match(/^[#?]+$/))return r=""+t,0===t&&(r=""),r.length>i.length?r:Uo(i.substr(0,i.length-r.length))+r;if(s=i.match(KJ))return function v6t(e,i,t){return t+(0===i?"":""+i)+Xn(" ",e[1].length+2+e[4].length)}(s,w,C);if(i.match(/^#+0+$/))return C+Dc(w,i.length-i.indexOf("0"));if(s=i.match(ZJ))return r=(r=(""+t).replace(/^([^\.]+)$/,"$1."+Uo(s[1])).replace(/\.$/,"."+Uo(s[1]))).replace(/\.(\d*)$/,function(U,X){return"."+X+Xn("0",Uo(s[1]).length-X.length)}),-1!==i.indexOf("0.")?r:r.replace(/^0\./,".");if(i=i.replace(/^#+([0.])/,"$1"),s=i.match(/^(0*)\.(#*)$/))return C+(""+w).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=i.match(/^#{1,3},##0(\.?)$/))return C+Lu(""+w);if(s=i.match(/^#,##0\.([#0]*0)$/))return t<0?"-"+Td(e,i,-t):Lu(""+t)+"."+Xn("0",s[1].length);if(s=i.match(/^#,#*,#0/))return Td(e,i.replace(/^#,#*,/,""),t);if(s=i.match(/^([0#]+)(\\?-([0#]+))+$/))return r=c0(Td(e,i.replace(/[\\-]/g,""),t)),o=0,c0(c0(i.replace(/\\/g,"")).replace(/[0#]/g,function(U){return o-1||"\\"==t&&"-"==e.charAt(i+1)&&"0#".indexOf(e.charAt(i+2))>-1););break;case"?":for(;e.charAt(++i)===t;);break;case"*":++i,(" "==e.charAt(i)||"*"==e.charAt(i))&&++i;break;case"(":case")":++i;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;i-1;);break;default:++i}return!1}var rq=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function sq(e,i){if(null==i)return!1;var t=parseFloat(i[2]);switch(i[1]){case"=":if(e==t)return!0;break;case">":if(e>t)return!0;break;case"<":if(e":if(e!=t)return!0;break;case">=":if(e>=t)return!0;break;case"<=":if(e<=t)return!0}return!1}function nl(e,i,t){null==t&&(t={});var n="";switch(typeof e){case"string":n="m/d/yy"==e&&t.dateNF?t.dateNF:e;break;case"number":null==(n=14==e&&t.dateNF?t.dateNF:(null!=t.table?t.table:ki)[e])&&(n=t.table&&t.table[YJ[e]]||ki[YJ[e]]),null==n&&(n=o6t[e]||"General")}if(UE(n,0))return jm(i,t);i instanceof Date&&(i=ms(i,t.date1904));var r=function C6t(e,i){var t=function _6t(e){for(var i=[],t=!1,n=0,r=0;n-1&&--n,t.length>4)throw new Error("cannot find right format for |"+t.join("|")+"|");if("number"!=typeof i)return[4,4===t.length||r>-1?t[t.length-1]:"@"];switch(t.length){case 1:t=r>-1?["General","General","General",t[0]]:[t[0],t[0],t[0],"@"];break;case 2:t=r>-1?[t[0],t[0],t[0],t[1]]:[t[0],t[1],t[0],"@"];break;case 3:t=r>-1?[t[0],t[1],t[0],t[2]]:[t[0],t[1],t[2],"@"]}var s=i>0?t[0]:i<0?t[1]:t[2];if(-1===t[0].indexOf("[")&&-1===t[1].indexOf("["))return[n,s];if(null!=t[0].match(/\[[=<>]/)||null!=t[1].match(/\[[=<>]/)){var o=t[0].match(rq),l=t[1].match(rq);return sq(i,o)?[n,t[0]]:sq(i,l)?[n,t[1]]:[n,t[null!=o&&null!=l?2:1]]}return[n,s]}(n,i);if(UE(r[1]))return jm(i,t);if(!0===i)i="TRUE";else if(!1===i)i="FALSE";else if(""===i||null==i)return"";return function T6t(e,i,t,n){for(var C,M,P,r=[],s="",o=0,l="",w="t",O="H";o=12?e.charAt(o+2):l),X.t="T",O="h",o+=3):"AM/PM"===e.substr(o,5).toUpperCase()?(null!=C&&(X.v=C.H>=12?"PM":"AM"),X.t="T",o+=5,O="h"):"\u4e0a\u5348/\u4e0b\u5348"===e.substr(o,5).toUpperCase()?(null!=C&&(X.v=C.H>=12?"\u4e0b\u5348":"\u4e0a\u5348"),X.t="T",o+=5,O="h"):(X.t="t",++o),null==C&&"T"===X.t)return"";r[r.length]=X,w=l;break;case"[":for(s=l;"]"!==e.charAt(o++)&&o-1&&(s=(s.match(/\$([^-\[\]]*)/)||[])[1]||"$",Dl(e)||(r[r.length]={t:"t",v:s}));break;case".":if(null!=C){for(s=l;++o-1;)s+=l;r[r.length]={t:"n",v:s};break;case"?":for(s=l;e.charAt(++o)===l;)s+=l;r[r.length]={t:l,v:s},w=l;break;case"*":++o,(" "==e.charAt(o)||"*"==e.charAt(o))&&++o;break;case"(":case")":r[r.length]={t:1===n?"t":l,v:l},++o;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(s=l;o-1;)s+=e.charAt(o);r[r.length]={t:"D",v:s};break;case" ":r[r.length]={t:l,v:l},++o;break;case"$":r[r.length]={t:"t",v:"$"},++o;break;default:if(-1===",$-+/():!^&'~{}<>=\u20acacfijklopqrtuvwxzP".indexOf(l))throw new Error("unrecognized character "+l+" in "+e);r[r.length]={t:"t",v:l},++o}var rt,st,W=0,Z=0;for(o=r.length-1,w="t";o>=0;--o)switch(r[o].t){case"h":case"H":r[o].t=O,w="h",W<1&&(W=1);break;case"s":(rt=r[o].v.match(/\.0+$/))&&(Z=Math.max(Z,rt[0].length-1),W=4),W<3&&(W=3);case"d":case"y":case"e":w=r[o].t;break;case"M":w=r[o].t,W<2&&(W=2);break;case"m":"s"===w&&(r[o].t="M",W<2&&(W=2));break;case"X":break;case"Z":W<1&&r[o].v.match(/[Hh]/)&&(W=1),W<2&&r[o].v.match(/[Mm]/)&&(W=2),W<3&&r[o].v.match(/[Ss]/)&&(W=3)}switch(W){case 0:break;case 1:case 2:case 3:C.u>=.5&&(C.u=0,++C.S),C.S>=60&&(C.S=0,++C.M),C.M>=60&&(C.M=0,++C.H),C.H>=24&&(C.H=0,++C.D,(st=_d(C.D)).u=C.u,st.S=C.S,st.M=C.M,st.H=C.H,C=st);break;case 4:switch(Z){case 1:C.u=Math.round(10*C.u)/10;break;case 2:C.u=Math.round(100*C.u)/100;break;case 3:C.u=Math.round(1e3*C.u)/1e3}C.u>=1&&(C.u=0,++C.S),C.S>=60&&(C.S=0,++C.M),C.M>=60&&(C.M=0,++C.H),C.H>=24&&(C.H=0,++C.D,(st=_d(C.D)).u=C.u,st.S=C.S,st.M=C.M,st.H=C.H,C=st)}var _t,vt="";for(o=0;o0){40==vt.charCodeAt(0)?(ft=i<0&&45===vt.charCodeAt(0)?-i:i,dt=Nu("n",vt,ft)):(dt=Nu("n",vt,ft=i<0&&n>1?-i:i),ft<0&&r[0]&&"t"==r[0].t&&(dt=dt.substr(1),r[0].v="-"+r[0].v)),_t=dt.length-1;var pt=r.length;for(o=0;o-1){pt=o;break}var bt=r.length;if(pt===r.length&&-1===dt.indexOf("E")){for(o=r.length-1;o>=0;--o)null==r[o]||-1==="n?".indexOf(r[o].t)||(_t>=r[o].v.length-1?r[o].v=dt.substr(1+(_t-=r[o].v.length),r[o].v.length):_t<0?r[o].v="":(r[o].v=dt.substr(0,_t+1),_t=-1),r[o].t="t",bt=o);_t>=0&&bt=0;--o)if(null!=r[o]&&-1!=="n?".indexOf(r[o].t)){for(M=r[o].v.indexOf(".")>-1&&o===pt?r[o].v.indexOf(".")-1:r[o].v.length-1,Mt=r[o].v.substr(M+1);M>=0;--M)_t>=0&&("0"===r[o].v.charAt(M)||"#"===r[o].v.charAt(M))&&(Mt=dt.charAt(_t--)+Mt);r[o].v=Mt,r[o].t="t",bt=o}for(_t>=0&&bt-1&&o===pt?r[o].v.indexOf(".")+1:0,Mt=r[o].v.substr(0,M);M-1&&(r[o].v=Nu(r[o].t,r[o].v,ft=n>1&&i<0&&o>0&&"-"===r[o-1].v?-i:i),r[o].t="t");var Tt="";for(o=0;o!==r.length;++o)null!=r[o]&&(Tt+=r[o].v);return Tt}(r[1],i,t,r[0])}function UL(e,i){if("number"!=typeof i){i=+i||-1;for(var t=0;t<392;++t)if(null!=ki[t]){if(ki[t]==e){i=t;break}}else i<0&&(i=t);i<0&&(i=391)}return ki[i]=e,i}function h1(e){for(var i=0;392!=i;++i)void 0!==e[i]&&UL(e[i],i)}function u0(){ki=function a6t(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"\u4e0a\u5348/\u4e0b\u5348 "hh"\u6642"mm"\u5206"ss"\u79d2 "',e}()}var GE=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g,D6t={"d.m":"d\\.m"};function hf(e,i){return UL(D6t[e]||e,i)}var Bu,oq=function(){var e={version:"1.2.0"},t=function i(){for(var ft=0,dt=new Array(256),pt=0;256!=pt;++pt)dt[pt]=ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=1&(ft=pt)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1)?-306674912^ft>>>1:ft>>>1;return typeof Int32Array<"u"?new Int32Array(dt):dt}(),r=function n(ft){var dt=0,pt=0,bt=0,Tt=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(bt=0;256!=bt;++bt)Tt[bt]=ft[bt];for(bt=0;256!=bt;++bt)for(pt=ft[bt],dt=256+bt;dt<4096;dt+=256)pt=Tt[dt]=pt>>>8^ft[255&pt];var Et=[];for(bt=1;16!=bt;++bt)Et[bt-1]=typeof Int32Array<"u"&&"function"==typeof Tt.subarray?Tt.subarray(256*bt,256*bt+256):Tt.slice(256*bt,256*bt+256);return Et}(t),s=r[0],o=r[1],l=r[2],w=r[3],C=r[4],M=r[5],P=r[6],O=r[7],L=r[8],U=r[9],X=r[10],W=r[11],Z=r[12],rt=r[13],st=r[14];return e.table=t,e.bstr=function vt(ft,dt){for(var pt=~dt,bt=0,Tt=ft.length;bt>>8^t[255&(pt^ft.charCodeAt(bt++))];return~pt},e.buf=function _t(ft,dt){for(var pt=~dt,bt=ft.length-15,Tt=0;Tt>8&255]^Z[ft[Tt++]^pt>>16&255]^W[ft[Tt++]^pt>>>24]^X[ft[Tt++]]^U[ft[Tt++]]^L[ft[Tt++]]^O[ft[Tt++]]^P[ft[Tt++]]^M[ft[Tt++]]^C[ft[Tt++]]^w[ft[Tt++]]^l[ft[Tt++]]^o[ft[Tt++]]^s[ft[Tt++]]^t[ft[Tt++]];for(bt+=15;Tt>>8^t[255&(pt^ft[Tt++])];return~pt},e.str=function Mt(ft,dt){for(var pt=~dt,bt=0,Tt=ft.length,Et=0,Dt=0;bt>>8^t[255&(pt^Et)]:Et<2048?pt=(pt=pt>>>8^t[255&(pt^(192|Et>>6&31))])>>>8^t[255&(pt^(128|63&Et))]:Et>=55296&&Et<57344?(Et=64+(1023&Et),Dt=1023&ft.charCodeAt(bt++),pt=(pt=(pt=(pt=pt>>>8^t[255&(pt^(240|Et>>8&7))])>>>8^t[255&(pt^(128|Et>>2&63))])>>>8^t[255&(pt^(128|Dt>>6&15|(3&Et)<<4))])>>>8^t[255&(pt^(128|63&Dt))]):pt=(pt=(pt=pt>>>8^t[255&(pt^(224|Et>>12&15))])>>>8^t[255&(pt^(128|Et>>6&63))])>>>8^t[255&(pt^(128|63&Et))];return~pt},e}(),Oi=function(){var w,i={};function n(At){if("/"==At.charAt(At.length-1))return-1===At.slice(0,-1).indexOf("/")?At:n(At.slice(0,-1));var Ot=At.lastIndexOf("/");return-1===Ot?At:At.slice(0,Ot+1)}function r(At){if("/"==At.charAt(At.length-1))return r(At.slice(0,-1));var Ot=At.lastIndexOf("/");return-1===Ot?At:At.slice(Ot+1)}function s(At,Ot){"string"==typeof Ot&&(Ot=new Date(Ot));var Rt=Ot.getHours();Rt=(Rt=Rt<<6|Ot.getMinutes())<<5|Ot.getSeconds()>>>1,At.write_shift(2,Rt);var kt=Ot.getFullYear()-1980;kt=(kt=kt<<4|Ot.getMonth()+1)<<5|Ot.getDate(),At.write_shift(2,kt)}function l(At){va(At,0);for(var Ot={},Rt=0;At.l<=At.length-4;){var kt=At.read_shift(2),Lt=At.read_shift(2),Nt=At.l+Lt,se={};switch(kt){case 21589:1&(Rt=At.read_shift(1))&&(se.mtime=At.read_shift(4)),Lt>5&&(2&Rt&&(se.atime=At.read_shift(4)),4&Rt&&(se.ctime=At.read_shift(4))),se.mtime&&(se.mt=new Date(1e3*se.mtime));break;case 1:var xe=At.read_shift(4),ie=At.read_shift(4);se.usz=ie*Math.pow(2,32)+xe,xe=At.read_shift(4),ie=At.read_shift(4),se.csz=ie*Math.pow(2,32)+xe}At.l=Nt,Ot[kt]=se}return Ot}function C(){return w||(w=Bu)}function M(At,Ot){if(80==At[0]&&75==At[1])return tw(At,Ot);if(109==(32|At[0])&&105==(32|At[1]))return function bp(At,Ot){if("mime-version:"!=Ne(At.slice(0,13)).toLowerCase())throw new Error("Unsupported MAD header");var Rt=Ot&&Ot.root||"",kt=(_n&&Buffer.isBuffer(At)?At.toString("binary"):Ne(At)).split("\r\n"),Lt=0,Nt="";for(Lt=0;Lt0&&(Rt=(Rt=Rt.slice(0,Rt.length-1)).slice(0,Rt.lastIndexOf("/")+1),Nt.slice(0,Rt.length)!=Rt););var se=(kt[1]||"").match(/boundary="(.*?)"/);if(!se)throw new Error("MAD cannot find boundary");var xe="--"+(se[1]||""),oe={FileIndex:[],FullPaths:[]};ft(oe);var ze,He=0;for(Lt=0;Lt=Lt&&(He-=Lt),!se[He]){ie=[];var ei=[];for(ze=He;ze>=0;){ei[ze]=!0,se[ze]=!0,xe[xe.length]=ze,ie.push(At[ze]);var Ge=Rt[Math.floor(4*ze/kt)];if(kt<4+(yi=4*ze&ae))throw new Error("FAT boundary crossed: "+ze+" 4 "+kt);if(!At[Ge]||ei[ze=Zm(At[Ge],yi)])break}Nt[He]={nodes:xe,data:Mq([ie])}}return Nt}(Yi,se,ae,kt);se0&&xe!==Dt&&(Cr[xe].name="!MiniFAT"),Cr[ae[0]].name="!FAT",Cr.fat_addrs=ae,Cr.ssz=kt;var Hr=[],zs=[],Qu=[];(function st(At,Ot,Rt,kt,Lt,Nt,se,xe){for(var yi,ie=0,ae=kt.length?2:0,oe=Ot[At].data,ze=0,He=0;ze0&&ie!==Dt&&(Ot[ie].name="!StreamData")):Ge.size>=4096?(Ge.storage="fat",void 0===Ot[Ge.start]&&(Ot[Ge.start]=Z(Rt,Ge.start,Ot.fat_addrs,Ot.ssz)),Ot[Ge.start].name=Ge.name,Ge.content=Ot[Ge.start].data.slice(0,Ge.size)):(Ge.storage="minifat",Ge.size<0?Ge.size=0:ie!==Dt&&Ge.start!==Dt&&Ot[ie]&&(Ge.content=X(Ge,Ot[ie].data,(Ot[xe]||{}).data))),Ge.content&&va(Ge.content,0),Nt[yi]=Ge,se.push(Ge)}})(se,Cr,Yi,Hr,Lt,{},zs,xe),function U(At,Ot,Rt){for(var kt=0,Lt=0,Nt=0,se=0,xe=0,ie=Rt.length,ae=[],oe=[];kt0&&se>=0;)Nt.push(Ot.slice(se*Et,se*Et+Et)),Lt-=Et,se=Zm(Rt,4*se);return 0===Nt.length?re(0):Ns(Nt).slice(0,At.size)}function W(At,Ot,Rt,kt,Lt){var Nt=Dt;if(At===Dt){if(0!==Ot)throw new Error("DIFAT chain shorter than expected")}else if(-1!==At){var se=Rt[At],xe=(kt>>>2)-1;if(!se)return;for(var ie=0;ie=1&&W(Zm(se,kt-4),Ot-1,Rt,kt,Lt)}}function Z(At,Ot,Rt,kt,Lt){var Nt=[],se=[];Lt||(Lt=[]);var xe=kt-1,ie=0,ae=0;for(ie=Ot;ie>=0;){Lt[ie]=!0,Nt[Nt.length]=ie,se.push(At[ie]);var oe=Rt[Math.floor(4*ie/kt)];if(kt<4+(ae=4*ie&xe))throw new Error("FAT boundary crossed: "+ie+" 4 "+kt);if(!At[oe])break;ie=Zm(At[oe],ae)}return{nodes:Nt,data:Mq([se])}}function vt(At,Ot){return new Date(1e3*(Ra(At,Ot+4)/1e7*Math.pow(2,32)+Ra(At,Ot)/1e7-11644473600))}function ft(At,Ot){var Rt=Ot||{},kt=Rt.root||"Root Entry";if(At.FullPaths||(At.FullPaths=[]),At.FileIndex||(At.FileIndex=[]),At.FullPaths.length!==At.FileIndex.length)throw new Error("inconsistent CFB structure");0===At.FullPaths.length&&(At.FullPaths[0]=kt+"/",At.FileIndex[0]={name:kt,type:5}),Rt.CLSID&&(At.FileIndex[0].clsid=Rt.CLSID),function dt(At){var Ot="\x01Sh33tJ5";if(!Oi.find(At,"/"+Ot)){var Rt=re(4);Rt[0]=55,Rt[1]=Rt[3]=50,Rt[2]=54,At.FileIndex.push({name:Ot,type:2,content:Rt,size:4,L:69,R:69,C:69}),At.FullPaths.push(At.FullPaths[0]+Ot),pt(At)}}(At)}function pt(At,Ot){ft(At);for(var Rt=!1,kt=!1,Lt=At.FullPaths.length-1;Lt>=0;--Lt){var Nt=At.FileIndex[Lt];switch(Nt.type){case 0:kt?Rt=!0:(At.FileIndex.pop(),At.FullPaths.pop());break;case 1:case 2:case 5:kt=!0,isNaN(Nt.R*Nt.L*Nt.C)&&(Rt=!0),Nt.R>-1&&Nt.L>-1&&Nt.R==Nt.L&&(Rt=!0);break;default:Rt=!0}}if(Rt||Ot){var se=new Date(1987,1,19),xe=0,ie=Object.create?Object.create(null):{},ae=[];for(Lt=0;Lt1?1:-1,ze.size=0,ze.type=5;else if("/"==He.slice(-1)){for(xe=Lt+1;xe=ae.length?-1:xe,xe=Lt+1;xe=ae.length?-1:xe,ze.type=1}else n(At.FullPaths[Lt+1]||"")==n(He)&&(ze.R=Lt+1),ze.type=2}}}function bt(At,Ot){var Rt=Ot||{};if("mad"==Rt.fileType)return function LA(At,Ot){for(var Rt=Ot||{},kt=Rt.boundary||"SheetJS",Lt=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+(kt="------="+kt).slice(2)+'"',"","",""],Nt=At.FullPaths[0],se=Nt,xe=At.FileIndex[0],ie=1;ie=32&&yi<128&&++ze;var Ge=ze>=4*He/5;Lt.push(kt),Lt.push("Content-Location: "+(Rt.root||"file:///C:/SheetJS/")+se),Lt.push("Content-Transfer-Encoding: "+(Ge?"quoted-printable":"base64")),Lt.push("Content-Type: "+ew(xe,se)),Lt.push(""),Lt.push(Ge?FA(oe):$u(oe))}return Lt.push(kt+"--\r\n"),Lt.join("\r\n")}(At,Rt);if("zip"===(pt(At),Rt.fileType))return function yp(At,Ot){var Rt=Ot||{},kt=[],Lt=[],Nt=re(1),se=Rt.compression?8:0,xe=0,ae=0,oe=0,ze=0,He=0,yi=At.FullPaths[0],ei=yi,Ge=At.FileIndex[0],Yi=[],Cr=0;for(ae=1;ae0&&(Pa<4096?ei+=Pa+63>>6:Ge+=Pa+511>>9)}}for(var Hr=yi.FullPaths.length+3>>2,Qu=ei+127>>7,Tp=(ei+7>>3)+Ge+Hr+Qu,Rd=Tp+127>>7,I0=Rd<=109?0:Math.ceil((Rd-109)/127);Tp+Rd+I0+127>>7>Rd;)I0=++Rd<=109?0:Math.ceil((Rd-109)/127);var oc=[1,I0,Rd,Qu,Hr,Ge,ei,0];return yi.FileIndex[0].size=ei<<6,oc[7]=(yi.FileIndex[0].start=oc[0]+oc[1]+oc[2]+oc[3]+oc[4]+oc[5])+(oc[6]+7>>3),oc}(At),Lt=re(kt[7]<<9),Nt=0,se=0;for(Nt=0;Nt<8;++Nt)Lt.write_shift(1,ge[Nt]);for(Nt=0;Nt<8;++Nt)Lt.write_shift(2,0);for(Lt.write_shift(2,62),Lt.write_shift(2,3),Lt.write_shift(2,65534),Lt.write_shift(2,9),Lt.write_shift(2,6),Nt=0;Nt<3;++Nt)Lt.write_shift(2,0);for(Lt.write_shift(4,0),Lt.write_shift(4,kt[2]),Lt.write_shift(4,kt[0]+kt[1]+kt[2]+kt[3]-1),Lt.write_shift(4,0),Lt.write_shift(4,4096),Lt.write_shift(4,kt[3]?kt[0]+kt[1]+kt[2]-1:Dt),Lt.write_shift(4,kt[3]),Lt.write_shift(-4,kt[1]?kt[0]-1:Dt),Lt.write_shift(4,kt[1]),Nt=0;Nt<109;++Nt)Lt.write_shift(-4,Nt>9));for(xe(kt[6]+7>>3);511&Lt.l;)Lt.write_shift(-4,Qt.ENDOFCHAIN);for(se=Nt=0,ie=0;ie=4096)&&(oe.start=se,xe(ae+63>>6));for(;511&Lt.l;)Lt.write_shift(-4,Qt.ENDOFCHAIN);for(Nt=0;Nt31&&(console.error("Name "+He+" will be truncated to "+He.slice(0,31)),He=He.slice(0,31)),ae=2*(He.length+1),Lt.write_shift(64,He,"utf16le"),Lt.write_shift(2,ae),Lt.write_shift(1,oe.type),Lt.write_shift(1,oe.color),Lt.write_shift(-4,oe.L),Lt.write_shift(-4,oe.R),Lt.write_shift(-4,oe.C),oe.clsid)Lt.write_shift(16,oe.clsid,"hex");else for(ie=0;ie<4;++ie)Lt.write_shift(4,0);Lt.write_shift(4,oe.state||0),Lt.write_shift(4,0),Lt.write_shift(4,0),Lt.write_shift(4,0),Lt.write_shift(4,0),Lt.write_shift(4,oe.start),Lt.write_shift(4,oe.size),Lt.write_shift(4,0)}else{for(ie=0;ie<17;++ie)Lt.write_shift(4,0);for(ie=0;ie<3;++ie)Lt.write_shift(4,-1);for(ie=0;ie<12;++ie)Lt.write_shift(4,0)}}for(Nt=1;Nt=4096)if(Lt.l=oe.start+1<<9,_n&&Buffer.isBuffer(oe.content))oe.content.copy(Lt,Lt.l,0,oe.size),Lt.l+=oe.size+511&-512;else{for(ie=0;ie0&&oe.size<4096)if(_n&&Buffer.isBuffer(oe.content))oe.content.copy(Lt,Lt.l,0,oe.size),Lt.l+=oe.size+63&-64;else{for(ie=0;ie>16|Ot>>8|Ot));function Te(At,Ot){var Rt=Xt[255&At];return Ot<=8?Rt>>>8-Ot:(Rt=Rt<<8|Xt[At>>8&255],Ot<=16?Rt>>>16-Ot:(Rt=Rt<<8|Xt[At>>16&255])>>>24-Ot)}function Pt(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=6?0:At[kt+1]<<8))>>>Rt&3}function Ci(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=5?0:At[kt+1]<<8))>>>Rt&7}function Ue(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=3?0:At[kt+1]<<8))>>>Rt&31}function Bi(At,Ot){var Rt=7&Ot,kt=Ot>>>3;return(At[kt]|(Rt<=1?0:At[kt+1]<<8))>>>Rt&127}function en(At,Ot,Rt){var kt=7&Ot,Lt=Ot>>>3,se=At[Lt]>>>kt;return Rt<8-kt||(se|=At[Lt+1]<<8-kt,Rt<16-kt)||(se|=At[Lt+2]<<16-kt,Rt<24-kt)||(se|=At[Lt+3]<<24-kt),se&(1<>>3;return kt<=5?At[Lt]|=(7&Rt)<>8-kt),Ot+3}function nr(At,Ot,Rt){return At[Ot>>>3]|=Rt=(1&Rt)<<(7&Ot),Ot+1}function Jn(At,Ot,Rt){var Lt=Ot>>>3;return At[Lt]|=255&(Rt<<=7&Ot),At[Lt+1]=Rt>>>=8,Ot+8}function ls(At,Ot,Rt){var Lt=Ot>>>3;return At[Lt]|=255&(Rt<<=7&Ot),At[Lt+1]=255&(Rt>>>=8),At[Lt+2]=Rt>>>8,Ot+16}function Xa(At,Ot){var Rt=At.length,kt=2*Rt>Ot?2*Rt:Ot+5,Lt=0;if(Rt>=Ot)return At;if(_n){var Nt=WJ(kt);if(At.copy)At.copy(Nt);else for(;Lt>kt-ze,se=(1<=0;--se)Ot[xe|se<0;)ie[ie.l++]=xe[ae++]}return ie.l}(ie,ae):function se(xe,ie){for(var ae=0,oe=0,ze=jt?new Uint16Array(32768):[];oe0;)ie[ie.l++]=xe[oe++];ae=8*ie.l}else{ae=mi(ie,ae,+(oe+He==xe.length)+2);for(var yi=0;He-- >0;){var ei=xe[oe],Ge=-1,Yi=0;if((Ge=ze[yi=32767&(yi<<5^ei)])&&((Ge|=-32768&oe)>oe&&(Ge-=32768),Ge2){(ei=Lt[Yi])<=22?ae=Jn(ie,ae,Xt[ei+1]>>1)-1:(Jn(ie,ae,3),Jn(ie,ae+=5,Xt[ei-23]>>5),ae+=3);var Cr=ei<8?0:ei-4>>2;Cr>0&&(ls(ie,ae,Yi-ui[ei]),ae+=Cr),ae=Jn(ie,ae,Xt[ei=Ot[oe-Ge]]>>3),ae-=3;var Pa=ei<4?0:ei-2>>1;Pa>0&&(ls(ie,ae,oe-Ge-ni[ei]),ae+=Pa);for(var Hr=0;Hr>>3;return(At[kt]|(Rt<=4?0:At[kt+1]<<8))>>>Rt&15}(At,Ot+=5)+4;Ot+=4;for(var Nt=0,se=jt?new Uint8Array(19):Qe(19),xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ie=1,ae=jt?new Uint8Array(8):Qe(8),oe=jt?new Uint8Array(8):Qe(8),ze=se.length,He=0;He>8-ei;for(var Ge=(1<<7-ei)-1;Ge>=0;--Ge)$n[yi|Ge<>>=3){case 16:for(Nt=3+Pt(At,Ot),Ot+=2,yi=Yi[Yi.length-1];Nt-- >0;)Yi.push(yi);break;case 17:for(Nt=3+Ci(At,Ot),Ot+=3;Nt-- >0;)Yi.push(0);break;case 18:for(Nt=11+Bi(At,Ot),Ot+=7;Nt-- >0;)Yi.push(0);break;default:Yi.push(yi),ie>>0,xe=0,ie=0;!(1&kt);)if(kt=Ci(At,Rt),Rt+=3,kt>>>1)for(kt>>1==1?(xe=9,ie=5):(Rt=ac(At,Rt),xe=kr,ie=vp);;){!Ot&&se>>1==1?Co[oe]:Ji[oe];if(Rt+=15&ze,(ze>>>=4)>>>8&255){if(256==ze)break;var He=(ze-=257)<8?0:ze-4>>2;He>5&&(He=0);var yi=Nt+ui[ze];He>0&&(yi+=en(At,Rt,He),Rt+=He),oe=en(At,Rt,ie),Rt+=15&(ze=kt>>>1==1?qn[oe]:ji[oe]);var ei=(ze>>>=4)<4?0:ze-2>>1,Ge=ni[ze];for(ei>0&&(Ge+=en(At,Rt,ei),Rt+=ei),!Ot&&se>>3]|At[1+(Rt>>>3)]<<8;if(Rt+=32,ae>0)for(!Ot&&se0;)Lt[Nt++]=At[Rt>>>3],Rt+=8}return Ot?[Lt,Rt+7>>>3]:[Lt.slice(0,Nt),Rt+7>>>3]}(At.slice(At.l||0),Ot);return At.l+=kt[1],kt[0]}function A0(At,Ot){if(!At)throw new Error(Ot);typeof console<"u"&&console.error(Ot)}function tw(At,Ot){var Rt=At;va(Rt,0);var Nt={FileIndex:[],FullPaths:[]};ft(Nt,{root:Ot.root});for(var se=Rt.length-4;(80!=Rt[se]||75!=Rt[se+1]||5!=Rt[se+2]||6!=Rt[se+3])&&se>=0;)--se;Rt.l=se+4,Rt.l+=4;var xe=Rt.read_shift(2);Rt.l+=6;var ie=Rt.read_shift(4);for(Rt.l=ie,se=0;se>>=5);Rt>>>=4,kt.setMilliseconds(0),kt.setFullYear(Rt+1980),kt.setMonth(Nt-1),kt.setDate(Lt);var se=31&Ot,xe=63&(Ot>>>=5);return kt.setHours(Ot>>>=6),kt.setMinutes(xe),kt.setSeconds(se<<1),kt}(At);if(8257&Nt)throw new Error("Unsupported ZIP encryption");At.read_shift(4);for(var ae=At.read_shift(4),oe=At.read_shift(4),ze=At.read_shift(2),He=At.read_shift(2),yi="",ei=0;ei"u")throw new Error("Unsupported");return new Uint8Array(e)}(e):e}function f1(e,i,t){if(typeof Bu<"u"&&Bu.writeFileSync)return t?Bu.writeFileSync(e,i,t):Bu.writeFileSync(e,i);if(typeof Deno<"u"){if(t&&"string"==typeof i)switch(t){case"utf8":i=new TextEncoder(t).encode(i);break;case"binary":i=c1(i);break;default:throw new Error("Unsupported encoding "+t)}return Deno.writeFileSync(e,i)}var n="utf8"==t?Cd(i):i;if(typeof IE_SaveFile<"u")return IE_SaveFile(n,e);if(typeof Blob<"u"){var r=new Blob([lq(n)],{type:"application/octet-stream"});if(typeof navigator<"u"&&navigator.msSaveBlob)return navigator.msSaveBlob(r,e);if(typeof saveAs<"u")return saveAs(r,e);if(typeof URL<"u"&&typeof document<"u"&&document.createElement&&URL.createObjectURL){var s=URL.createObjectURL(r);if("object"==typeof chrome&&"function"==typeof(chrome.downloads||{}).download)return URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),chrome.downloads.download({url:s,filename:e,saveAs:!0});var o=document.createElement("a");if(null!=o.download)return o.download=e,o.href=s,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL&&typeof setTimeout<"u"&&setTimeout(function(){URL.revokeObjectURL(s)},6e4),s}else if(typeof URL<"u"&&!URL.createObjectURL&&"object"==typeof chrome){var l="data:application/octet-stream;base64,"+function e6t(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0,w=0,C=0;C>2,o=(3&t)<<4|(n=e[C++])>>4,l=(15&n)<<2|(r=e[C++])>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=ho.charAt(s)+ho.charAt(o)+ho.charAt(l)+ho.charAt(w);return i}(new Uint8Array(lq(n)));return chrome.downloads.download({url:l,filename:e,saveAs:!0})}}if(typeof $<"u"&&typeof File<"u"&&typeof Folder<"u")try{var w=File(e);return w.open("w"),w.encoding="binary",Array.isArray(i)&&(i=wd(i)),w.write(i),w.close(),i}catch(C){if(!C.message||-1==C.message.indexOf("onstruct"))throw C}throw new Error("cannot save file "+e)}function Jr(e){for(var i=Object.keys(e),t=[],n=0;n=60&&e<61)return e;var i=new Date;return i.setTime(24*(e>60?e:e+1)*60*60*1e3+dq),i}var O6t=/^(\d+):(\d+)(:\d+)?(\.\d+)?$/,L6t=/^(\d+)-(\d+)-(\d+)$/,uq=/^(\d+)-(\d+)-(\d+)[T ](\d+):(\d+)(:\d+)?(\.\d+)?$/;function os(e,i){if(e instanceof Date)return e;var t=e.match(O6t);return t?new Date((i?P6t:k6t)+1e3*(60*(60*parseInt(t[1],10)+parseInt(t[2],10))+(t[3]?parseInt(t[3].slice(1),10):0))+(t[4]?parseInt((t[4]+"000").slice(1,4),10):0)):(t=e.match(L6t))?new Date(Date.UTC(+t[1],+t[2]-1,+t[3],0,0,0,0)):(t=e.match(uq))?new Date(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4],+t[5],t[6]&&parseInt(t[6].slice(1),10)||0,t[7]&&parseInt((t[7]+"0000").slice(1,4),10)||0)):new Date(e)}function Ym(e,i){if(_n&&Buffer.isBuffer(e)){if(i&&l1){if(255==e[0]&&254==e[1])return Cd(e.slice(2).toString("utf16le"));if(254==e[1]&&255==e[2])return Cd(function GJ(e){for(var i=[],t=0;t>1;++t)i[t]=String.fromCharCode(e.charCodeAt(2*t+1)+(e.charCodeAt(2*t)<<8));return i.join("")}(e.slice(2).toString("binary")))}return e.toString("binary")}if(typeof TextDecoder<"u")try{if(i){if(255==e[0]&&254==e[1])return Cd(new TextDecoder("utf-16le").decode(e.slice(2)));if(254==e[0]&&255==e[1])return Cd(new TextDecoder("utf-16be").decode(e.slice(2)))}var t={"\u20ac":"\x80","\u201a":"\x82",\u0192:"\x83","\u201e":"\x84","\u2026":"\x85","\u2020":"\x86","\u2021":"\x87",\u02c6:"\x88","\u2030":"\x89",\u0160:"\x8a","\u2039":"\x8b",\u0152:"\x8c",\u017d:"\x8e","\u2018":"\x91","\u2019":"\x92","\u201c":"\x93","\u201d":"\x94","\u2022":"\x95","\u2013":"\x96","\u2014":"\x97","\u02dc":"\x98","\u2122":"\x99",\u0161:"\x9a","\u203a":"\x9b",\u0153:"\x9c",\u017e:"\x9e",\u0178:"\x9f"};return Array.isArray(e)&&(e=new Uint8Array(e)),new TextDecoder("latin1").decode(e).replace(/[\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\u017d\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\u017e\u0178]/g,function(s){return t[s]||s})}catch{}var n=[],r=0;try{for(r=0;r3&&-1==H6t.indexOf(i))return s}else if(i.replace(/[ap]m?/,"").match(/[a-z]/))return s;return o<0||o>8099||e.match(/[^-0-9:,\/\\\ ]/)?s:r}function $m(e){return new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function XE(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}function cn(e,i,t){if(e.FullPaths){var n;if("string"==typeof t)return n=_n?bd(t):function n6t(e){for(var i=[],t=0,n=e.length+250,r=uf(e.length+255),s=0;s>6&31,r[t++]=128|63&o;else if(o>=55296&&o<57344){o=64+(1023&o);var l=1023&e.charCodeAt(++s);r[t++]=240|o>>8&7,r[t++]=128|o>>2&63,r[t++]=128|l>>6&15|(3&o)<<4,r[t++]=128|63&l}else r[t++]=224|o>>12&15,r[t++]=128|o>>6&63,r[t++]=128|63&o;t>n&&(i.push(r.slice(0,t)),t=0,r=uf(65535),n=65530)}return i.push(r.slice(0,t)),Ns(i)}(t),Oi.utils.cfb_add(e,i,n);Oi.utils.cfb_add(e,i,t)}else e.file(i,t)}function WL(){return Oi.utils.cfb_new()}var Bs='\r\n',XL=HE({""":'"',"'":"'",">":">","<":"<","&":"&"}),jL=/[&<>'"]/g,q6t=/[\u0000-\u0008\u000b-\u001f\uFFFE-\uFFFF]/g;function gn(e){return(e+"").replace(jL,function(t){return XL[t]}).replace(q6t,function(t){return"_x"+("000"+t.charCodeAt(0).toString(16)).slice(-4)+"_"})}function bq(e){return gn(e).replace(/ /g,"_x0020_")}var wq=/[\u0000-\u001f]/g;function g1(e){return(e+"").replace(jL,function(t){return XL[t]}).replace(/\n/g,"
").replace(wq,function(t){return"&#x"+("000"+t.charCodeAt(0).toString(16)).slice(-4)+";"})}function YL(e){for(var i="",t=0,n=0,r=0,s=0,o=0,l=0;t191&&n<224?(o=(31&n)<<6,o|=63&r,i+=String.fromCharCode(o)):(s=e.charCodeAt(t++),n<240?i+=String.fromCharCode((15&n)<<12|(63&r)<<6|63&s):(l=((7&n)<<18|(63&r)<<12|(63&s)<<6|63&(o=e.charCodeAt(t++)))-65536,i+=String.fromCharCode(55296+(l>>>10&1023)),i+=String.fromCharCode(56320+(1023&l)))));return i}function Tq(e){var t,n,l,i=uf(2*e.length),r=1,s=0,o=0;for(n=0;n>>10&1023),t=56320+(1023&t)),0!==o&&(i[s++]=255&o,i[s++]=o>>>8,o=0),i[s++]=t%256,i[s++]=t>>>8;return i.slice(0,s).toString("ucs2")}function Cq(e){return bd(e,"binary").toString("utf8")}var jE="foo bar baz\xe2\x98\x83\xf0\x9f\x8d\xa3",gr=_n&&(Cq(jE)==YL(jE)&&Cq||Tq(jE)==YL(jE)&&Tq)||YL,Cd=_n?function(e){return bd(e,"utf8").toString("binary")}:function(e){for(var i=[],t=0,n=0,r=0;t>6))),i.push(String.fromCharCode(128+(63&n)));break;case n>=55296&&n<57344:n-=55296,r=e.charCodeAt(t++)-56320+(n<<10),i.push(String.fromCharCode(240+(r>>18&7))),i.push(String.fromCharCode(144+(r>>12&63))),i.push(String.fromCharCode(128+(r>>6&63))),i.push(String.fromCharCode(128+(63&r)));break;default:i.push(String.fromCharCode(224+(n>>12))),i.push(String.fromCharCode(128+(n>>6&63))),i.push(String.fromCharCode(128+(63&n)))}return i.join("")},Aq=/(^\s|\s$|\n)/;function Wa(e,i){return"<"+e+(i.match(Aq)?' xml:space="preserve"':"")+">"+i+""}function v1(e){return Jr(e).map(function(i){return" "+i+'="'+e[i]+'"'}).join("")}function We(e,i,t){return"<"+e+(null!=t?v1(t):"")+(null!=i?(i.match(Aq)?' xml:space="preserve"':"")+">"+i+""}function $L(e,i){try{return e.toISOString().replace(/\.\d*/,"")}catch(t){if(i)throw t}return""}var ga={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",mx:"http://schemas.microsoft.com/office/mac/excel/2008/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",sjs:"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Km=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],Il={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"},Dq=function(e){for(var i=[],n=0;n0&&Buffer.isBuffer(e[0][0])?Buffer.concat(e[0].map(function(i){return Buffer.isBuffer(i)?i:bd(i)})):Dq(e)}:Dq,Iq=function(e,i,t){for(var n=[],r=i;r0?f0(e,i+4,i+4+t-1):""},QL=Fq,Oq=function(e,i){var t=Ra(e,i);return t>0?f0(e,i+4,i+4+t-1):""},KL=Oq,Lq=function(e,i){var t=2*Ra(e,i);return t>0?f0(e,i+4,i+4+t-1):""},ZL=Lq,Nq=function(i,t){var n=Ra(i,t);return n>0?$E(i,t+4,t+4+n):""},JL=Nq,Bq=function(e,i){var t=Ra(e,i);return t>0?f0(e,i+4,i+4+t):""},qL=Bq,Vq=function(e,i){return function s9t(e,i){for(var t=1-2*(e[i+7]>>>7),n=((127&e[i+7])<<4)+(e[i+6]>>>4&15),r=15&e[i+6],s=5;s>=0;--s)r=256*r+e[i+s];return 2047==n?0==r?t*(1/0):NaN:(0==n?n=-1022:(n-=1023,r+=Math.pow(2,52)),t*Math.pow(2,n-52)*r)}(e,i)},QE=Vq,tN=function(i){return Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array};_n&&(QL=function(i,t){if(!Buffer.isBuffer(i))return Fq(i,t);var n=i.readUInt32LE(t);return n>0?i.toString("utf8",t+4,t+4+n-1):""},KL=function(i,t){if(!Buffer.isBuffer(i))return Oq(i,t);var n=i.readUInt32LE(t);return n>0?i.toString("utf8",t+4,t+4+n-1):""},ZL=function(i,t){if(!Buffer.isBuffer(i)||!l1)return Lq(i,t);var n=2*i.readUInt32LE(t);return i.toString("utf16le",t+4,t+4+n-1)},JL=function(i,t){if(!Buffer.isBuffer(i)||!l1)return Nq(i,t);var n=i.readUInt32LE(t);return i.toString("utf16le",t+4,t+4+n)},qL=function(i,t){if(!Buffer.isBuffer(i))return Bq(i,t);var n=i.readUInt32LE(t);return i.toString("utf8",t+4,t+4+n)},QE=function(i,t){return Buffer.isBuffer(i)?i.readDoubleLE(t):Vq(i,t)},tN=function(i){return Buffer.isBuffer(i)||Array.isArray(i)||typeof Uint8Array<"u"&&i instanceof Uint8Array}),typeof pn<"u"&&function Uq(){$E=function(e,i,t){return pn.utils.decode(1200,e.slice(i,t)).replace(fo,"")},f0=function(e,i,t){return pn.utils.decode(65001,e.slice(i,t))},QL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(Xm,e.slice(i+4,i+4+t-1)):""},KL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(pa,e.slice(i+4,i+4+t-1)):""},ZL=function(e,i){var t=2*Ra(e,i);return t>0?pn.utils.decode(1200,e.slice(i+4,i+4+t-1)):""},JL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(1200,e.slice(i+4,i+4+t)):""},qL=function(e,i){var t=Ra(e,i);return t>0?pn.utils.decode(65001,e.slice(i+4,i+4+t)):""}}();var m0=function(e,i){return e[i]},Uu=function(e,i){return 256*e[i+1]+e[i]},o9t=function(e,i){var t=256*e[i+1]+e[i];return t<32768?t:-1*(65535-t+1)},Ra=function(e,i){return e[i+3]*(1<<24)+(e[i+2]<<16)+(e[i+1]<<8)+e[i]},Zm=function(e,i){return e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]},l9t=function(e,i){return e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]};function x1(e,i){var n,r,o,l,w,C,t="",s=[];switch(i){case"dbcs":if(C=this.l,_n&&Buffer.isBuffer(this)&&l1)t=this.slice(this.l,this.l+2*e).toString("utf16le");else for(w=0;w0?Zm:l9t)(this,this.l),this.l+=4,n);case 8:case-8:if("f"===i)return r=8==e?QE(this,this.l):QE([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,r;e=8;case 16:t=kq(this,this.l,e)}}return this.l+=e,t}var c9t=function(e,i,t){e[t]=255&i,e[t+1]=i>>>8&255,e[t+2]=i>>>16&255,e[t+3]=i>>>24&255},d9t=function(e,i,t){e[t]=255&i,e[t+1]=i>>8&255,e[t+2]=i>>16&255,e[t+3]=i>>24&255},u9t=function(e,i,t){e[t]=255&i,e[t+1]=i>>>8&255};function h9t(e,i,t){var n=0,r=0;if("dbcs"===t){for(r=0;r!=i.length;++r)u9t(this,i.charCodeAt(r),this.l+2*r);n=2*i.length}else if("sbcs"===t||"cpstr"==t)if(typeof pn<"u"&&874==Xm){for(r=0;r!=i.length;++r){var s=pn.utils.encode(Xm,i.charAt(r));this[this.l+r]=s[0]}n=i.length}else if(typeof pn<"u"&&"cpstr"==t){if((s=pn.utils.encode(pa,i)).length==i.length)for(r=0;r>8}for(;this.l>>=8);break;case 3:n=3,this[this.l]=255&i,this[this.l+1]=255&(i>>>=8),this[this.l+2]=255&(i>>>=8);break;case 4:n=4,c9t(this,i,this.l);break;case 8:if(n=8,"f"===t){!function a9t(e,i,t){var n=(i<0||1/i==-1/0?1:0)<<7,r=0,s=0,o=n?-i:i;isFinite(o)?0==o?r=s=0:(r=Math.floor(Math.log(o)/Math.LN2),s=o*Math.pow(2,52-r),r<=-1023&&(!isFinite(s)||s>4|n}(this,i,this.l);break}case 16:break;case-4:n=4,d9t(this,i,this.l)}}return this.l+=n,this}function zq(e,i){var t=kq(this,this.l,e.length>>1);if(t!==e)throw new Error(i+"Expected "+e+" saw "+t);this.l+=e.length>>1}function va(e,i){e.l=i,e.read_shift=x1,e.chk=zq,e.write_shift=h9t}function mo(e,i){e.l+=i}function re(e){var i=uf(e);return va(i,0),i}function po(){var e=[],i=_n?256:2048,t=function(C){var M=re(C);return va(M,0),M},n=t(i),r=function(){n&&(n.l&&(n.length>n.l&&((n=n.slice(0,n.l)).l=n.length),n.length>0&&e.push(n)),n=null)},s=function(C){return n&&C=128?1:0)+1,n>=128&&++s,n>=16384&&++s,n>=2097152&&++s;var o=e.next(s);r<=127?o.write_shift(1,r):(o.write_shift(1,128+(127&r)),o.write_shift(1,r>>7));for(var l=0;4!=l;++l){if(!(n>=128)){o.write_shift(1,n);break}o.write_shift(1,128+(127&n)),n>>=7}n>0&&tN(t)&&e.push(t)}}function y1(e,i,t){var n=pr(e);if(i.s?(n.cRel&&(n.c+=i.s.c),n.rRel&&(n.r+=i.s.r)):(n.cRel&&(n.c+=i.c),n.rRel&&(n.r+=i.r)),!t||t.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}function Gq(e,i,t){var n=pr(e);return n.s=y1(n.s,i.s,t),n.e=y1(n.e,i.s,t),n}function b1(e,i){if(e.cRel&&e.c<0)for(e=pr(e);e.c<0;)e.c+=i>8?16384:256;if(e.rRel&&e.r<0)for(e=pr(e);e.r<0;)e.r+=i>8?1048576:i>5?65536:16384;var t=Tn(e);return!e.cRel&&null!=e.cRel&&(t=function p9t(e){return e.replace(/^([A-Z])/,"$$$1")}(t)),!e.rRel&&null!=e.rRel&&(t=function f9t(e){return e.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}(t)),t}function eN(e,i){return 0!=e.s.r||e.s.rRel||e.e.r!=(i.biff>=12?1048575:i.biff>=8?65536:16384)||e.e.rRel?0!=e.s.c||e.s.cRel||e.e.c!=(i.biff>=12?16383:255)||e.e.cRel?b1(e.s,i.biff)+":"+b1(e.e,i.biff):(e.s.rRel?"":"$")+Pn(e.s.r)+":"+(e.e.rRel?"":"$")+Pn(e.e.r):(e.s.cRel?"":"$")+dn(e.s.c)+":"+(e.e.cRel?"":"$")+dn(e.e.c)}function iN(e){return parseInt(function m9t(e){return e.replace(/\$(\d+)$/,"$1")}(e),10)-1}function Pn(e){return""+(e+1)}function nN(e){for(var i=function g9t(e){return e.replace(/^\$([A-Z])/,"$1")}(e),t=0,n=0;n!==i.length;++n)t=26*t+i.charCodeAt(n)-64;return t-1}function dn(e){if(e<0)throw new Error("invalid column "+e);var i="";for(++e;e;e=Math.floor((e-1)/26))i=String.fromCharCode((e-1)%26+65)+i;return i}function vr(e){for(var i=0,t=0,n=0;n=48&&r<=57?i=10*i+(r-48):r>=65&&r<=90&&(t=26*t+(r-64))}return{c:t-1,r:i-1}}function Tn(e){for(var i=e.c+1,t="";i;i=(i-1)/26|0)t=String.fromCharCode((i-1)%26+65)+t;return t+(e.r+1)}function xa(e){var i=e.indexOf(":");return-1==i?{s:vr(e),e:vr(e)}:{s:vr(e.slice(0,i)),e:vr(e.slice(i+1))}}function un(e,i){return typeof i>"u"||"number"==typeof i?un(e.s,e.e):("string"!=typeof e&&(e=Tn(e)),"string"!=typeof i&&(i=Tn(i)),e==i?e:e+":"+i)}function w1(e){var i=xa(e);return"$"+dn(i.s.c)+"$"+Pn(i.s.r)+":$"+dn(i.e.c)+"$"+Pn(i.e.r)}function _1(e,i){if(!(e||i&&i.biff<=5&&i.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(e)?"'"+e.replace(/'/g,"''")+"'":e}function Gn(e){var i={s:{c:0,r:0},e:{c:0,r:0}},t=0,n=0,r=0,s=e.length;for(t=0;n26);++n)t=26*t+r;for(i.s.c=--t,t=0;n9);++n)t=10*t+r;if(i.s.r=--t,n===s||10!=r)return i.e.c=i.s.c,i.e.r=i.s.r,i;for(++n,t=0;n!=s&&!((r=e.charCodeAt(n)-64)<1||r>26);++n)t=26*t+r;for(i.e.c=--t,t=0;n!=s&&!((r=e.charCodeAt(n)-48)<0||r>9);++n)t=10*t+r;return i.e.r=--t,i}function Sd(e,i,t){return null==e||null==e.t||"z"==e.t?"":void 0!==e.w?e.w:("d"==e.t&&!e.z&&t&&t.dateNF&&(e.z=t.dateNF),"e"==e.t?ec[e.v]||e.v:function Hq(e,i){var t="d"==e.t&&i instanceof Date;if(null!=e.z)try{return e.w=nl(e.z,t?ms(i):i)}catch{}try{return e.w=nl((e.XF||{}).numFmtId||(t?14:0),t?ms(i):i)}catch{return""+i}}(e,null==i?e.v:i))}function ff(e,i){var t=i&&i.sheet?i.sheet:"Sheet1",n={};return n[t]=e,{SheetNames:[t],Sheets:n}}function Wq(e,i,t){var n=t||{},r=e?null!=e["!data"]:n.dense;null!=Ls&&null==r&&(r=Ls);var s=e||{};r&&!s["!data"]&&(s["!data"]=[]);var o=0,l=0;if(s&&null!=n.origin)if("number"==typeof n.origin)o=n.origin;else{var w="string"==typeof n.origin?vr(n.origin):n.origin;o=w.r,l=w.c}var C={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(s["!ref"]){var M=Gn(s["!ref"]);C.s.c=M.s.c,C.s.r=M.s.r,C.e.c=Math.max(C.e.c,M.e.c),C.e.r=Math.max(C.e.r,M.e.r),-1==o&&(C.e.r=o=s["!ref"]?M.e.r+1:0)}else C.s.c=C.e.c=C.s.r=C.e.r=0;for(var P=[],O=!1,L=0;L!=i.length;++L)if(i[L]){if(!Array.isArray(i[L]))throw new Error("aoa_to_sheet expects an array of arrays");var U=o+L,X=""+(U+1);r&&(s["!data"][U]||(s["!data"][U]=[]),P=s["!data"][U]);for(var W=0;W!=i[L].length;++W)if(!(typeof i[L][W]>"u")){var Z={v:i[L][W]},rt=l+W;if(C.s.r>U&&(C.s.r=U),C.s.c>rt&&(C.s.c=rt),C.e.r0&&i.write_shift(0,e,"dbcs"),t?i.slice(0,i.l):i}function b9t(e){return{ich:e.read_shift(2),ifnt:e.read_shift(2)}}function rN(e,i){var t=e.l,n=e.read_shift(1),r=go(e),s=[],o={t:r,h:r};if(1&n){for(var l=e.read_shift(4),w=0;w!=l;++w)s.push(b9t(e));o.r=s}else o.r=[{ich:0,ifnt:0}];return e.l=t+i,o}var T9t=rN;function tc(e){var i=e.read_shift(4),t=e.read_shift(2);return t+=e.read_shift(1)<<16,e.l++,{c:i,iStyleRef:t}}function Jm(e,i){return null==i&&(i=re(8)),i.write_shift(-4,e.c),i.write_shift(3,e.iStyleRef||e.s),i.write_shift(1,0),i}function qm(e){var i=e.read_shift(2);return i+=e.read_shift(1)<<16,e.l++,{c:-1,iStyleRef:i}}function tp(e,i){return null==i&&(i=re(4)),i.write_shift(3,e.iStyleRef||e.s),i.write_shift(1,0),i}var S9t=go,Xq=ya;function KE(e){var i=e.read_shift(4);return 0===i||4294967295===i?"":e.read_shift(i,"dbcs")}function T1(e,i){var t=!1;return null==i&&(t=!0,i=re(127)),i.write_shift(4,e.length>0?e.length:4294967295),e.length>0&&i.write_shift(0,e,"dbcs"),t?i.slice(0,i.l):i}var E9t=go,sN=KE,aN=T1;function ZE(e){var i=e.slice(e.l,e.l+4),t=1&i[0],n=2&i[0];e.l+=4;var r=0===n?QE([0,0,0,0,252&i[0],i[1],i[2],i[3]],0):Zm(i,0)>>2;return t?r/100:r}function jq(e,i){null==i&&(i=re(4));var t=0,n=0,r=100*e;if(e==(0|e)&&e>=-(1<<29)&&e<1<<29?n=1:r==(0|r)&&r>=-(1<<29)&&r<1<<29&&(n=1,t=1),!n)throw new Error("unsupported RkNumber "+e);i.write_shift(-4,((t?r:e)<<2)+(t+2))}function Yq(e){var i={s:{},e:{}};return i.s.r=e.read_shift(4),i.e.r=e.read_shift(4),i.s.c=e.read_shift(4),i.e.c=e.read_shift(4),i}var ep=Yq,g0=function A9t(e,i){return i||(i=re(16)),i.write_shift(4,e.s.r),i.write_shift(4,e.e.r),i.write_shift(4,e.s.c),i.write_shift(4,e.e.c),i};function vo(e){if(e.length-e.l<8)throw"XLS Xnum Buffer underflow";return e.read_shift(8,"f")}function ip(e,i){return(i||re(8)).write_shift(8,e,"f")}function JE(e,i){if(i||(i=re(8)),!e||e.auto)return i.write_shift(4,0),i.write_shift(4,0),i;null!=e.index?(i.write_shift(1,2),i.write_shift(1,e.index)):null!=e.theme?(i.write_shift(1,6),i.write_shift(1,e.theme)):(i.write_shift(1,5),i.write_shift(1,0));var t=e.tint||0;if(t>0?t*=32767:t<0&&(t*=32768),i.write_shift(2,t),e.rgb&&null==e.theme){var n=e.rgb||"FFFFFF";"number"==typeof n&&(n=("000000"+n.toString(16)).slice(-6)),i.write_shift(1,parseInt(n.slice(0,2),16)),i.write_shift(1,parseInt(n.slice(2,4),16)),i.write_shift(1,parseInt(n.slice(4,6),16)),i.write_shift(1,255)}else i.write_shift(2,0),i.write_shift(1,0),i.write_shift(1,0);return i}var lN={1:{n:"CodePage",t:2},2:{n:"Category",t:80},3:{n:"PresentationFormat",t:80},4:{n:"ByteCount",t:3},5:{n:"LineCount",t:3},6:{n:"ParagraphCount",t:3},7:{n:"SlideCount",t:3},8:{n:"NoteCount",t:3},9:{n:"HiddenCount",t:3},10:{n:"MultimediaClipCount",t:3},11:{n:"ScaleCrop",t:11},12:{n:"HeadingPairs",t:4108},13:{n:"TitlesOfParts",t:4126},14:{n:"Manager",t:80},15:{n:"Company",t:80},16:{n:"LinksUpToDate",t:11},17:{n:"CharacterCount",t:3},19:{n:"SharedDoc",t:11},22:{n:"HyperlinksChanged",t:11},23:{n:"AppVersion",t:3,p:"version"},24:{n:"DigSig",t:65},26:{n:"ContentType",t:80},27:{n:"ContentStatus",t:80},28:{n:"Language",t:80},29:{n:"Version",t:80},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}},cN={1:{n:"CodePage",t:2},2:{n:"Title",t:80},3:{n:"Subject",t:80},4:{n:"Author",t:80},5:{n:"Keywords",t:80},6:{n:"Comments",t:80},7:{n:"Template",t:80},8:{n:"LastAuthor",t:80},9:{n:"RevNumber",t:80},10:{n:"EditTime",t:64},11:{n:"LastPrinted",t:64},12:{n:"CreatedDate",t:64},13:{n:"ModifiedDate",t:64},14:{n:"PageCount",t:3},15:{n:"WordCount",t:3},16:{n:"CharCount",t:3},17:{n:"Thumbnail",t:71},18:{n:"Application",t:80},19:{n:"DocSecurity",t:3},255:{},2147483648:{n:"Locale",t:19},2147483651:{n:"Behavior",t:19},1919054434:{}};function V9t(e){return e.map(function(i){return[i>>16&255,i>>8&255,255&i]})}var np=pr(V9t([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,0,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])),ec={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},C1={"#NULL!":0,"#DIV/0!":7,"#VALUE!":15,"#REF!":23,"#NAME?":29,"#NUM!":36,"#N/A":42,"#GETTING_DATA":43,"#WTF?":255},dN=["_xlnm.Consolidate_Area","_xlnm.Auto_Open","_xlnm.Auto_Close","_xlnm.Extract","_xlnm.Database","_xlnm.Criteria","_xlnm.Print_Area","_xlnm.Print_Titles","_xlnm.Recorder","_xlnm.Data_Form","_xlnm.Auto_Activate","_xlnm.Auto_Deactivate","_xlnm.Sheet_Title","_xlnm._FilterDatabase"],uN={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},iA={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function Jq(e,i,t){var s,n=function R6t(e){for(var i=[],t=Jr(e),n=0;n!==t.length;++n)null==i[e[t[n]]]&&(i[e[t[n]]]=[]),i[e[t[n]]].push(t[n]);return i}(uN),r=[];t||(r[r.length]=Bs,r[r.length]=We("Types",null,{xmlns:ga.CT,"xmlns:xsd":ga.xsd,"xmlns:xsi":ga.xsi}),r=r.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(C){return We("Default",null,{Extension:C[0],ContentType:C[1]})})));var o=function(C){e[C]&&e[C].length>0&&(r[r.length]=We("Override",null,{PartName:("/"==(s=e[C][0])[0]?"":"/")+s,ContentType:iA[C][i.bookType]||iA[C].xlsx}))},l=function(C){(e[C]||[]).forEach(function(M){r[r.length]=We("Override",null,{PartName:("/"==M[0]?"":"/")+M,ContentType:iA[C][i.bookType]||iA[C].xlsx})})},w=function(C){(e[C]||[]).forEach(function(M){r[r.length]=We("Override",null,{PartName:("/"==M[0]?"":"/")+M,ContentType:n[C][0]})})};return o("workbooks"),l("sheets"),l("charts"),w("themes"),["strs","styles"].forEach(o),["coreprops","extprops","custprops"].forEach(w),w("vba"),w("comments"),w("threadedcomments"),w("drawings"),l("metadata"),w("people"),!t&&r.length>2&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}var hn={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",SHEET:"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",XLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLink",CXML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml",CXMLP:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",CHART:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",CHARTEX:"http://schemas.microsoft.com/office/2014/relationships/chartEx",CS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet",MS:"http://schemas.microsoft.com/office/2006/relationships/xlMacrosheet",IMG:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",CONN:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/connections",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function S1(e){var i=e.lastIndexOf("/");return e.slice(0,i+1)+"_rels/"+e.slice(i+1)+".rels"}function v0(e){var i=[Bs,We("Relationships",null,{xmlns:ga.RELS})];return Jr(e["!id"]).forEach(function(t){i[i.length]=We("Relationship",null,e["!id"][t])}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function dr(e,i,t,n,r,s){if(r||(r={}),e["!id"]||(e["!id"]={}),e["!idx"]||(e["!idx"]=1),i<0)for(i=e["!idx"];e["!id"]["rId"+i];++i);if(e["!idx"]=i+1,r.Id="rId"+i,r.Type=n,r.Target=t,s?r.TargetMode=s:[hn.HLINK,hn.XPATH,hn.XMISS].indexOf(r.Type)>-1&&(r.TargetMode="External"),e["!id"][r.Id])throw new Error("Cannot rewrite rId "+i);return e["!id"][r.Id]=r,e[("/"+r.Target).replace("//","/")]=r,i}function qq(e,i,t){return[' \n',' \n'," \n"].join("")}function X9t(e,i){return[' \n',' \n'," \n"].join("")}function ttt(e,i){return'SheetJS '+a1.version+""}var Gu=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function fN(e,i,t,n,r){null!=r[e]||null==i||""===i||(r[e]=i,i=gn(i),n[n.length]=t?We(e,i,t):Wa(e,i))}function itt(e,i){var t=i||{},n=[Bs,We("cp:coreProperties",null,{"xmlns:cp":ga.CORE_PROPS,"xmlns:dc":ga.dc,"xmlns:dcterms":ga.dcterms,"xmlns:dcmitype":ga.dcmitype,"xmlns:xsi":ga.xsi})],r={};if(!e&&!t.Props)return n.join("");e&&(null!=e.CreatedDate&&fN("dcterms:created","string"==typeof e.CreatedDate?e.CreatedDate:$L(e.CreatedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,r),null!=e.ModifiedDate&&fN("dcterms:modified","string"==typeof e.ModifiedDate?e.ModifiedDate:$L(e.ModifiedDate,t.WTF),{"xsi:type":"dcterms:W3CDTF"},n,r));for(var s=0;s!=Gu.length;++s){var o=Gu[s],l=t.Props&&null!=t.Props[o[1]]?t.Props[o[1]]:e?e[o[1]]:null;!0===l?l="1":!1===l?l="0":"number"==typeof l&&(l=String(l)),null!=l&&fN(o[0],l,null,n,r)}return n.length>2&&(n[n.length]="",n[1]=n[1].replace("/>",">")),n.join("")}var rp=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],ntt=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function stt(e){var i=[],t=We;return e||(e={}),e.Application="SheetJS",i[i.length]=Bs,i[i.length]=We("Properties",null,{xmlns:ga.EXT_PROPS,"xmlns:vt":ga.vt}),rp.forEach(function(n){if(void 0!==e[n[1]]){var r;switch(n[2]){case"string":r=gn(String(e[n[1]]));break;case"bool":r=e[n[1]]?"true":"false"}void 0!==r&&(i[i.length]=t(n[0],r))}}),i[i.length]=t("HeadingPairs",t("vt:vector",t("vt:variant","Worksheets")+t("vt:variant",t("vt:i4",String(e.Worksheets))),{size:2,baseType:"variant"})),i[i.length]=t("TitlesOfParts",t("vt:vector",e.SheetNames.map(function(n){return""+gn(n)+""}).join(""),{size:e.Worksheets,baseType:"lpstr"})),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function att(e){var i=[Bs,We("Properties",null,{xmlns:ga.CUST_PROPS,"xmlns:vt":ga.vt})];if(!e)return i.join("");var t=1;return Jr(e).forEach(function(r){++t,i[i.length]=We("property",function r9t(e,i){switch(typeof e){case"string":var t=We("vt:lpwstr",gn(e));return i&&(t=t.replace(/"/g,"_x0022_")),t;case"number":return We((0|e)==e?"vt:i4":"vt:r8",gn(String(e)));case"boolean":return We("vt:bool",e?"true":"false")}if(e instanceof Date)return We("vt:filetime",$L(e));throw new Error("Unable to serialize "+e)}(e[r],!0),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:t,name:gn(r)})}),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}var mN={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function htt(e,i){var t=re(4),n=re(4);switch(t.write_shift(4,80==e?31:e),e){case 3:n.write_shift(-4,i);break;case 5:(n=re(8)).write_shift(8,i,"f");break;case 11:n.write_shift(4,i?1:0);break;case 64:n=function q9t(e){var t=("string"==typeof e?new Date(Date.parse(e)):e).getTime()/1e3+11644473600,n=t%Math.pow(2,32),r=(t-n)/Math.pow(2,32);r*=1e7;var s=(n*=1e7)/Math.pow(2,32)|0;s>0&&(n%=Math.pow(2,32),r+=s);var o=re(8);return o.write_shift(4,n),o.write_shift(4,r),o}(i);break;case 31:case 80:for((n=re(4+2*(i.length+1)+(i.length%2?0:2))).write_shift(4,i.length+1),n.write_shift(0,i,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+e+" "+i)}return Ns([t,n])}var mtt=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function aUt(e){switch(typeof e){case"boolean":return 11;case"number":return(0|e)==e?3:5;case"string":return 31;case"object":if(e instanceof Date)return 64}return-1}function ptt(e,i,t){var n=re(8),r=[],s=[],o=8,l=0,w=re(8),C=re(8);if(w.write_shift(4,2),w.write_shift(4,1200),C.write_shift(4,1),s.push(w),r.push(C),o+=8+w.length,!i){(C=re(8)).write_shift(4,0),r.unshift(C);var M=[re(4)];for(M[0].write_shift(4,e.length),l=0;l-1||ntt.indexOf(e[l][0])>-1)&&null!=e[l][1]){var O=e[l][1],L=0;if(i){var U=t[L=+i[e[l][0]]];if("version"==U.p&&"string"==typeof O){var X=O.split(".");O=(+X[0]<<16)+(+X[1]||0)}w=htt(U.t,O)}else{var W=aUt(O);-1==W&&(W=31,O=String(O)),w=htt(W,O)}s.push(w),(C=re(8)).write_shift(4,i?L:2+l),r.push(C),o+=8+w.length}var Z=8*(s.length+1);for(l=0;l=12?2:1),r="sbcs-cont",s=pa;t&&t.biff>=8&&(pa=1200),t&&8!=t.biff?12==t.biff&&(r="wstr"):e.read_shift(1)&&(r="dbcs-cont"),t.biff>=2&&t.biff<=5&&(r="cpstr");var l=n?e.read_shift(n,r):"";return pa=s,l}function dUt(e){var i=e.t||"",n=re(3);n.write_shift(2,i.length),n.write_shift(1,1);var r=re(2*i.length);return r.write_shift(2*i.length,i,"utf16le"),Ns([n,r])}function wtt(e,i,t){return t||(t=re(3+2*e.length)),t.write_shift(2,e.length),t.write_shift(1,1),t.write_shift(31,e,"utf16le"),t}function _tt(e,i){i||(i=re(6+2*e.length)),i.write_shift(4,1+e.length);for(var t=0;t-1?31:23;switch(n.charAt(0)){case"#":s=28;break;case".":s&=-3}i.write_shift(4,2),i.write_shift(4,s);var o=[8,6815827,6619237,4849780,83];for(t=0;t-1?n.slice(0,r):n;for(i.write_shift(4,2*(l.length+1)),t=0;t-1?n.slice(r+1):"",i)}else{for(o="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),t=0;t8?4:2;return[e.read_shift(n),e.read_shift(n,"i"),e.read_shift(n,"i")]}function sA(e){var i=e.read_shift(2),t=e.read_shift(2);return{s:{c:e.read_shift(2),r:i},e:{c:e.read_shift(2),r:t}}}function Ett(e,i){return i||(i=re(8)),i.write_shift(2,e.s.r),i.write_shift(2,e.e.r),i.write_shift(2,e.s.c),i.write_shift(2,e.e.c),i}function xN(e,i,t){var n=1536,r=16;switch(t.bookType){case"biff8":case"xla":break;case"biff5":n=1280,r=8;break;case"biff4":n=4,r=6;break;case"biff3":n=3,r=6;break;case"biff2":n=2,r=4;break;default:throw new Error("unsupported BIFF version")}var s=re(r);return s.write_shift(2,n),s.write_shift(2,i),r>4&&s.write_shift(2,29282),r>6&&s.write_shift(2,1997),r>8&&(s.write_shift(2,49161),s.write_shift(2,1),s.write_shift(2,1798),s.write_shift(2,0)),s}function RUt(e,i){var t=!i||i.biff>=8?2:1,n=re(8+t*e.name.length);n.write_shift(4,e.pos),n.write_shift(1,e.hs||0),n.write_shift(1,e.dt),n.write_shift(1,e.name.length),i.biff>=8&&n.write_shift(1,1),n.write_shift(t*e.name.length,e.name,i.biff<8?"sbcs":"utf16le");var r=n.slice(0,n.l);return r.l=n.l,r}function KUt(e,i,t,n){var r=t&&5==t.biff;n||(n=re(r?3+i.length:5+2*i.length)),n.write_shift(2,e),n.write_shift(r?1:2,i.length),r||n.write_shift(1,1),n.write_shift((r?1:2)*i.length,i,r?"sbcs":"utf16le");var s=n.length>n.l?n.slice(0,n.l):n;return null==s.l&&(s.l=s.length),s}function Rtt(e,i,t,n){var r=t&&5==t.biff;n||(n=re(r?16:20)),n.write_shift(2,0),e.style?(n.write_shift(2,e.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,e.numFmtId||0),n.write_shift(2,i<<4));var s=0;return e.numFmtId>0&&r&&(s|=1024),n.write_shift(4,s),n.write_shift(4,0),r||n.write_shift(4,0),n.write_shift(2,0),n}function ktt(e){var i=re(12);return i.l++,i.write_shift(1,e.numFmtId),i.l+=10,i}var lzt=ktt;function yN(e,i,t,n,r,s){var o=re(8);return op(e,i,n,o),btt(t,s,o),o}function bN(e,i,t,n){var r=re(6+(n||e.length));return r.write_shift(2,i),r.write_shift(2,t),r.write_shift(2,n||e.length),r.write_shift(e.length,e,"sbcs"),r}function Mzt(e){var i=re(24),t=vr(e[0]);i.write_shift(2,t.r),i.write_shift(2,t.r),i.write_shift(2,t.c),i.write_shift(2,t.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<16;++r)i.write_shift(1,parseInt(n[r],16));return Ns([i,gUt(e[1])])}function Rzt(e){var i=e[1].Tooltip,t=re(10+2*(i.length+1));t.write_shift(2,2048);var n=vr(e[0]);t.write_shift(2,n.r),t.write_shift(2,n.r),t.write_shift(2,n.c),t.write_shift(2,n.c);for(var r=0;r1048576&&(X=1e6),2!=P&&(W=M.read_shift(2));var Z=M.read_shift(2),rt=w.codepage||1252;2!=P&&(M.l+=16,M.read_shift(1),0!==M[M.l]&&(rt=e[M[M.l]]),M.l+=1,M.l+=2),U&&(M.l+=36);for(var st=[],vt={},_t=Math.min(M.length,2==P?521:W-10-(L?264:0)),Mt=U?32:11;M.l<_t&&13!=M[M.l];)switch(vt={},vt.name=(typeof pn<"u"?pn.utils.decode(rt,M.slice(M.l,M.l+Mt)):wd(M.slice(M.l,M.l+Mt))).replace(/[\u0000\r\n][\S\s]*$/g,""),M.l+=Mt,vt.type=String.fromCharCode(M.read_shift(1)),2!=P&&!U&&(vt.offset=M.read_shift(4)),vt.len=M.read_shift(1),2==P&&(vt.offset=M.read_shift(2)),vt.dec=M.read_shift(1),vt.name.length&&st.push(vt),2!=P&&(M.l+=U?13:14),vt.type){case"B":(!L||8!=vt.len)&&w.WTF&&console.log("Skipping "+vt.name+":"+vt.type);break;case"G":case"P":w.WTF&&console.log("Skipping "+vt.name+":"+vt.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+vt.type)}if(13!==M[M.l]&&(M.l=W-1),13!==M.read_shift(1))throw new Error("DBF Terminator not found "+M.l+" "+M[M.l]);M.l=W;var ft=0,dt=0;for(C[0]=[],dt=0;dt!=st.length;++dt)C[0][dt]=st[dt].name;for(;X-- >0;)if(42!==M[M.l])for(++M.l,C[++ft]=[],dt=0,dt=0;dt!=st.length;++dt){var pt=M.slice(M.l,M.l+st[dt].len);M.l+=st[dt].len,va(pt,0);var bt=typeof pn<"u"?pn.utils.decode(rt,pt):wd(pt);switch(st[dt].type){case"C":bt.trim().length&&(C[ft][dt]=bt.replace(/([^\s])\s+$/,"$1"));break;case"D":8===bt.length?(C[ft][dt]=new Date(Date.UTC(+bt.slice(0,4),+bt.slice(4,6)-1,+bt.slice(6,8),0,0,0,0)),w&&w.UTC||(C[ft][dt]=$m(C[ft][dt]))):C[ft][dt]=bt;break;case"F":C[ft][dt]=parseFloat(bt.trim());break;case"+":case"I":C[ft][dt]=U?2147483648^pt.read_shift(-4,"i"):pt.read_shift(4,"i");break;case"L":switch(bt.trim().toUpperCase()){case"Y":case"T":C[ft][dt]=!0;break;case"N":case"F":C[ft][dt]=!1;break;case"":case"\0":case"?":break;default:throw new Error("DBF Unrecognized L:|"+bt+"|")}break;case"M":if(!O)throw new Error("DBF Unexpected MEMO for type "+P.toString(16));C[ft][dt]="##MEMO##"+(U?parseInt(bt.trim(),10):pt.read_shift(4));break;case"N":(bt=bt.replace(/\u0000/g,"").trim())&&"."!=bt&&(C[ft][dt]=+bt||0);break;case"@":C[ft][dt]=new Date(pt.read_shift(-8,"f")-621356832e5);break;case"T":var Tt=pt.read_shift(4),Et=pt.read_shift(4);if(0==Tt&&0==Et)break;C[ft][dt]=new Date(864e5*(Tt-2440588)+Et),w&&w.UTC||(C[ft][dt]=$m(C[ft][dt]));break;case"Y":C[ft][dt]=pt.read_shift(4,"i")/1e4+pt.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":C[ft][dt]=-pt.read_shift(-8,"f");break;case"B":if(L&&8==st[dt].len){C[ft][dt]=pt.read_shift(8,"f");break}case"G":case"P":pt.l+=st[dt].len;break;case"0":if("_NullFlags"===st[dt].name)break;default:throw new Error("DBF Unsupported data type "+st[dt].type)}}else M.l+=Z;if(2!=P&&M.l=0&&Kl(+C.codepage),"string"==C.type)throw new Error("Cannot write DBF to JS string");var P=po(),O=JN(l,{header:1,raw:!0,cellDates:!0}),L=O[0],U=O.slice(1),X=l["!cols"]||[],W=0,Z=0,rt=0,st=1;for(W=0;W250&&(bt=250),"C"==(pt=((X[W]||{}).DBF||{}).type)&&X[W].DBF.len>bt&&(bt=X[W].DBF.len),"B"==dt&&"N"==pt&&(dt="N",ft[W]=X[W].DBF.dec,bt=X[W].DBF.len),Mt[W]="C"==dt||"N"==pt?bt:s[dt]||0,st+=Mt[W],_t[W]=dt}else _t[W]="?"}var Et=P.next(32);for(Et.write_shift(4,318902576),Et.write_shift(4,U.length),Et.write_shift(2,296+32*rt),Et.write_shift(2,st),W=0;W<4;++W)Et.write_shift(4,0);var Dt=+i[pa]||3;for(Et.write_shift(4,Dt<<8),e[Dt]!=+C.codepage&&(C.codepage&&console.error("DBF Unsupported codepage "+pa+", using 1252"),pa=1252),W=0,Z=0;WMt[Z]&&(_e=_e.slice(0,Mt[Z])),rt=0;rt":190,"?":191,"{":223},i=new RegExp("\x1bN("+Jr(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1").replace("{","\\{")+"|\\|)","gm");try{i=new RegExp("\x1bN("+Jr(e).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm")}catch{}var t=function(L,U){var X=e[U];return"number"==typeof X?OL(X):X},n=function(L,U,X){var W=U.charCodeAt(0)-32<<4|X.charCodeAt(0)-48;return 59==W?L:OL(W)};e["|"]=254;function o(L,U){var Et,X=L.split(/[\n\r]+/),W=-1,Z=-1,rt=0,st=0,vt=[],_t=[],Mt=null,ft={},dt=[],pt=[],bt=[],Tt=0,Dt={Workbook:{WBProps:{},Names:[]}};for(+U.codepage>=0&&Kl(+U.codepage);rt!==X.length;++rt){Tt=0;var Qt,Le=X[rt].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(i,t),ge=Le.replace(/;;/g,"\0").split(";").map(function(Ht){return Ht.replace(/\u0000/g,";")});if(Le.length>0)switch(ge[0]){case"ID":case"E":case"B":case"W":break;case"O":for(st=1;st=1&&_e<=4&&(Dt.Workbook.WBProps.date1904=!0)}break;case"P":"P"===ge[1].charAt(0)&&_t.push(Le.slice(3).replace(/;;/g,";"));break;case"NN":var Ne={Sheet:0};for(st=1;st-1&&vt[Ce][oi];if(!jt||!jt[1])throw new Error("SYLK shared formula cannot find base");ui=net(jt[1],{r:W-Ce,c:Z-oi})}ui&&(vt[W][Z]?vt[W][Z].f=ui:vt[W][Z]={t:"n",f:ui}),Ft&&(vt[W][Z]||(vt[W][Z]={t:"z"}),vt[W][Z].c=[{a:"SheetJSYLK",t:Ft}]);break;case"F":var Xt=0;for(st=1;st0?(dt[W].hpt=Tt,dt[W].hpx=b0(Tt)):0===Tt&&(dt[W].hidden=!0);break;default:if(U&&U.WTF)throw new Error("SYLK bad record "+Le)}Xt<1&&(Mt=null);break;default:if(U&&U.WTF)throw new Error("SYLK bad record "+Le)}}return dt.length>0&&(ft["!rows"]=dt),pt.length>0&&(ft["!cols"]=pt),pt.forEach(function(Ht){pf(Ht)}),U&&U.sheetRows&&(vt=vt.slice(0,U.sheetRows)),[vt,ft,Dt]}function w(L,U,X,W,Z,rt){var st="C;Y"+(X+1)+";X"+(W+1)+";K";switch(L.t){case"n":st+=L.v||0,L.f&&!L.F&&(st+=";E"+fA(L.f,{r:X,c:W}));break;case"b":st+=L.v?"TRUE":"FALSE";break;case"e":st+=L.w||ec[L.v]||L.v;break;case"d":st+=ms(os(L.v,rt),rt);break;case"s":st+='"'+(null==L.v?"":String(L.v)).replace(/"/g,"").replace(/;/g,";;")+'"'}return st}function C(L,U,X){return"C;Y"+(U+1)+";X"+(X+1)+";A"+function(L){return L.replace(/\n/g,"\x1b :").replace(/\r/g,"\x1b =")}(L.map(function(Z){return Z.t}).join(""))}return{to_workbook:function l(L,U){var X=function s(L,U){switch(U.type){case"base64":return o(Al(L),U);case"binary":return o(L,U);case"buffer":return o(_n&&Buffer.isBuffer(L)?L.toString("binary"):wd(L),U);case"array":return o(Ym(L),U)}throw new Error("Unrecognized type "+U.type)}(L,U),W=X[0],Z=X[1],rt=X[2],st=pr(U);st.date1904=(((rt||{}).Workbook||{}).WBProps||{}).date1904;var vt=p0(W,st);Jr(Z).forEach(function(Mt){vt[Mt]=Z[Mt]});var _t=ff(vt,U);return Jr(rt).forEach(function(Mt){_t[Mt]=rt[Mt]}),_t.bookType="sylk",_t},from_sheet:function O(L,U,X){U||(U={}),U._formats=["General"];var st,W=["ID;PSheetJS;N;E"],Z=[],rt=Gn(L["!ref"]||"A1"),vt=null!=L["!data"],_t="\r\n",Mt=(((X||{}).Workbook||{}).WBProps||{}).date1904;W.push("P;PGeneral");var dt=rt.s.r,pt=rt.s.c,bt=[];if(L["!ref"])for(dt=rt.s.r;dt<=rt.e.r;++dt)if(!vt||L["!data"][dt]){for(bt=[],pt=rt.s.c;pt<=rt.e.c;++pt)(st=vt?L["!data"][dt][pt]:L[dn(pt)+Pn(dt)])&&st.c&&bt.push(C(st.c,dt,pt));bt.length&&Z.push(bt.join(_t))}if(L["!ref"])for(dt=rt.s.r;dt<=rt.e.r;++dt)if(!vt||L["!data"][dt]){for(bt=[],pt=rt.s.c;pt<=rt.e.c;++pt)if((st=vt?L["!data"][dt][pt]:L[dn(pt)+Pn(dt)])&&(null!=st.v||st.f&&!st.F)){if("General"!=(st.z||("d"==st.t?ki[14]:"General"))){var Tt=U._formats.indexOf(st.z);-1==Tt&&(U._formats.push(st.z),Tt=U._formats.length-1,W.push("P;P"+st.z.replace(/;/g,";;"))),bt.push("F;P"+Tt+";Y"+(dt+1)+";X"+(pt+1))}bt.push(w(st,0,dt,pt,0,Mt))}Z.push(bt.join(_t))}return W.push("F;P0;DG0G8;M255"),L["!cols"]&&function M(L,U){U.forEach(function(X,W){var Z="F;W"+(W+1)+" "+(W+1)+" ";X.hidden?Z+="0":("number"==typeof X.width&&!X.wpx&&(X.wpx=I1(X.width)),"number"==typeof X.wpx&&!X.wch&&(X.wch=R1(X.wpx)),"number"==typeof X.wch&&(Z+=Math.round(X.wch)))," "!=Z.charAt(Z.length-1)&&L.push(Z)})}(W,L["!cols"]),L["!rows"]&&function P(L,U){U.forEach(function(X,W){var Z="F;";X.hidden?Z+="M0;":X.hpt?Z+="M"+20*X.hpt+";":X.hpx&&(Z+="M"+20*k1(X.hpx)+";"),Z.length>2&&L.push(Z+"R"+(W+1))})}(W,L["!rows"]),L["!ref"]&&W.push("B;Y"+(rt.e.r-rt.s.r+1)+";X"+(rt.e.c-rt.s.c+1)+";D"+[rt.s.c,rt.s.r,rt.e.c,rt.e.r].join(" ")),W.push("O;L;D;B"+(Mt?";V4":"")+";K47;G100 0.001"),delete U._formats,W.join(_t)+_t+Z.join(_t)+_t+"E"+_t}}}(),ztt=function(){function i(l,w){for(var C=l.split("\n"),M=-1,P=-1,O=0,L=[];O!==C.length;++O)if("BOT"!==C[O].trim()){if(!(M<0)){for(var U=C[O].trim().split(","),X=U[0],W=U[1],Z=C[++O]||"";1&(Z.match(/["]/g)||[]).length&&O=0||M.indexOf(",")>=0||M.indexOf(";")>=0?function s(M,P){var O=P||{},L="";null!=Ls&&null==O.dense&&(O.dense=Ls);var U={};O.dense&&(U["!data"]=[]);var X={s:{c:0,r:0},e:{c:0,r:0}};"sep="==M.slice(0,4)?13==M.charCodeAt(5)&&10==M.charCodeAt(6)?(L=M.charAt(4),M=M.slice(7)):13==M.charCodeAt(5)||10==M.charCodeAt(5)?(L=M.charAt(4),M=M.slice(6)):L=r(M.slice(0,1024)):L=O&&O.FS?O.FS:r(M.slice(0,1024));var W=0,Z=0,rt=0,st=0,vt=0,_t=L.charCodeAt(0),Mt=!1,ft=0,dt=M.charCodeAt(0),pt=null!=O.dateNF?function E6t(e){var i="number"==typeof e?ki[e]:e;return i=i.replace(GE,"(\\d+)"),GE.lastIndex=0,new RegExp("^"+i+"$")}(O.dateNF):null;function bt(){var Tt=M.slice(st,vt);"\r"==Tt.slice(-1)&&(Tt=Tt.slice(0,-1));var Et={};if('"'==Tt.charAt(0)&&'"'==Tt.charAt(Tt.length-1)&&(Tt=Tt.slice(1,-1).replace(/""/g,'"')),!1!==O.cellText&&(Et.w=Tt),0===Tt.length)Et.t="z";else if(O.raw)Et.t="s",Et.v=Tt;else if(0===Tt.trim().length)Et.t="s",Et.v=Tt;else if(61==Tt.charCodeAt(0))34==Tt.charCodeAt(1)&&34==Tt.charCodeAt(Tt.length-1)?(Et.t="s",Et.v=Tt.slice(2,-1).replace(/""/g,'"')):function m7t(e){return 1!=e.length}(Tt)?(Et.t="s",Et.f=Tt.slice(1),Et.v=Tt):(Et.t="s",Et.v=Tt);else if("TRUE"==Tt)Et.t="b",Et.v=!0;else if("FALSE"==Tt)Et.t="b",Et.v=!1;else if(isNaN(rt=Ml(Tt)))if(!isNaN((rt=m1(Tt)).getDate())||pt&&Tt.match(pt)){if(Et.z=O.dateNF||ki[14],pt&&Tt.match(pt)){var Dt=function A6t(e,i,t){var n=-1,r=-1,s=-1,o=-1,l=-1,w=-1;(i.match(GE)||[]).forEach(function(P,O){var L=parseInt(t[O+1],10);switch(P.toLowerCase().charAt(0)){case"y":n=L;break;case"d":s=L;break;case"h":o=L;break;case"s":w=L;break;case"m":o>=0?l=L:r=L}}),GE.lastIndex=0,w>=0&&-1==l&&r>=0&&(l=r,r=-1);var C=(""+(n>=0?n:(new Date).getFullYear())).slice(-4)+"-"+("00"+(r>=1?r:1)).slice(-2)+"-"+("00"+(s>=1?s:1)).slice(-2);7==C.length&&(C="0"+C),8==C.length&&(C="20"+C);var M=("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(l>=0?l:0)).slice(-2)+":"+("00"+(w>=0?w:0)).slice(-2);return-1==o&&-1==l&&-1==w?C:-1==n&&-1==r&&-1==s?M:C+"T"+M}(0,O.dateNF,Tt.match(pt)||[]);rt=os(Dt),O&&!1===O.UTC&&(rt=$m(rt))}else O&&!1===O.UTC?rt=$m(rt):!1!==O.cellText&&O.dateNF&&(Et.w=nl(Et.z,rt));O.cellDates?(Et.t="d",Et.v=rt):(Et.t="n",Et.v=ms(rt)),O.cellNF||delete Et.z}else Et.t="s",Et.v=Tt;else Et.t="n",Et.v=rt;if("z"==Et.t||(O.dense?(U["!data"][W]||(U["!data"][W]=[]),U["!data"][W][Z]=Et):U[Tn({c:Z,r:W})]=Et),dt=M.charCodeAt(st=vt+1),X.e.c0&&bt(),U["!ref"]=un(X),U}(M,P):p0(function i(M,P){var O=P||{},L=[];if(!M||0===M.length)return L;for(var U=M.split(/[\r\n]/),X=U.length-1;X>=0&&0===U[X].length;)--X;for(var W=10,Z=0,rt=0;rt<=X;++rt)-1==(Z=U[rt].indexOf(" "))?Z=U[rt].length:Z++,W=Math.max(W,Z);for(rt=0;rt<=X;++rt){L[rt]=[];var st=0;for(e(U[rt].slice(0,W).trim(),L,rt,st,O),st=1;st<=(U[rt].length-W)/10+1;++st)e(U[rt].slice(W+10*(st-1),W+10*st).trim(),L,rt,st,O)}return O.sheetRows&&(L=L.slice(0,O.sheetRows)),L}(M,P),P)}function l(M,P){var O="",L="string"==P.type?[0,0,0,0]:function $N(e,i){var t="";switch((i||{}).type||"base64"){case"buffer":case"array":return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case"base64":t=Al(e.slice(0,12));break;case"binary":t=e;break;default:throw new Error("Unrecognized type "+(i&&i.type||"undefined"))}return[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3),t.charCodeAt(4),t.charCodeAt(5),t.charCodeAt(6),t.charCodeAt(7)]}(M,P);switch(P.type){case"base64":O=Al(M);break;case"binary":case"string":O=M;break;case"buffer":O=65001==P.codepage?M.toString("utf8"):P.codepage&&typeof pn<"u"?pn.utils.decode(P.codepage,M):_n&&Buffer.isBuffer(M)?M.toString("binary"):wd(M);break;case"array":O=Ym(M);break;default:throw new Error("Unrecognized type "+P.type)}return 239==L[0]&&187==L[1]&&191==L[2]?O=gr(O.slice(3)):"string"!=P.type&&"buffer"!=P.type&&65001==P.codepage?O=gr(O):"binary"==P.type&&typeof pn<"u"&&P.codepage&&(O=pn.utils.decode(P.codepage,pn.utils.encode(28591,O))),"socialcalc:version:"==O.slice(0,19)?Gtt.to_sheet("string"==P.type?O:gr(O),P):o(O,P)}return{to_workbook:function w(M,P){return ff(l(M,P),P)},to_sheet:l,from_sheet:function C(M){var P=[];if(!M["!ref"])return"";for(var L,O=Gn(M["!ref"]),U=null!=M["!data"],X=O.s.r;X<=O.e.r;++X){for(var W=[],Z=O.s.c;Z<=O.e.c;++Z){var rt=Tn({r:X,c:Z});if((L=U?(M["!data"][X]||[])[Z]:M[rt])&&null!=L.v){for(var st=(L.w||(Sd(L),L.w)||"").slice(0,10);st.length<10;)st+=" ";W.push(st+(0===Z?" ":""))}else W.push(" ")}P.push(W.join(""))}return P.join("\n")}}}(),lp=function(){function e(Ft,jt,Xt){if(Ft){va(Ft,Ft.l||0);for(var Ht=Xt.Enum||ke;Ft.l255||Xe.s.r>999999)break;Xe.e.cen&&(Xe.s.c=en),mi=Qe.read_shift(4),Xe.s.r>mi&&(Xe.s.r=mi),mi=Qe.read_shift(4),Xe.e.rmi&&(Xe.s.r=mi),Xe.e.r0&&Ue>=0;){if(32&$n)switch(31&$n){case 2:ji={t:"n",v:ji.v+ac&65535};break;case 3:(ji={t:"n",v:ji.v+ac&65535}).v>32767&&(ji.v-=65536);break;case 7:ji={t:"s",v:Te[Bi=Bi+ac>>>0]};break;default:throw"Cannot apply delta for QPW cell type "+(31&$n)}else switch(31&$n){case 1:ji={t:"z"};break;case 2:ji={t:"n",v:Qe.read_shift(2)};break;case 7:ji={t:"s",v:Te[Bi=Qe.read_shift(4)-1]};break;default:throw"Cannot apply repeat for QPW cell type "+(31&$n)}!Xt.sheetStubs&&"z"==ji.t||(null!=Ht["!data"]?(Ht["!data"][mi]||(Ht["!data"][mi]=[]),Ht["!data"][mi][en]=ji):Ht[Ji+Pn(mi)]=ji),++mi,--Ue}}break;case 3074:en=Qe.read_shift(2),mi=Qe.read_shift(4);var xp=ui(Qe);null!=Ht["!data"]?(Ht["!data"][mi]||(Ht["!data"][mi]=[]),Ht["!data"][mi][en]={t:"s",v:xp}):Ht[dn(en)+Pn(mi)]={t:"s",v:xp}}Ft.l+=Xa}return nr}(Ft,jt);if(0==Ft[2]&&(8==Ft[3]||9==Ft[3])&&Ft.length>=16&&5==Ft[14]&&108===Ft[15])throw new Error("Unsupported Works 3 for Mac file");if(2==Ft[2])Xt.Enum=ke,e(Ft,function(ti,Co,qn){switch(qn){case 0:Xt.vers=ti,ti>=4096&&(Xt.qpro=!0);break;case 255:Xt.vers=ti,Xt.works=!0;break;case 6:mi=ti;break;case 204:ti&&(Pt=ti);break;case 222:Pt=ti;break;case 15:case 51:(!Xt.qpro&&!Xt.works||51==qn)&&ti[1].v.charCodeAt(0)<48&&(ti[1].v=ti[1].v.slice(1)),(Xt.works||Xt.works2)&&(ti[1].v=ti[1].v.replace(/\r\n/g,"\n"));case 13:case 14:case 16:!(112&~ti[2])&&(15&ti[2])>1&&(15&ti[2])<15&&(ti[1].z=Xt.dateNF||t[(15&ti[2])-1]||ki[14],Xt.cellDates&&(ti[1].v=Vu(ti[1].v),ti[1].t="number"==typeof ti[1].v?"n":"d")),Xt.qpro&&ti[3]>Ci&&(Ht["!ref"]=un(mi),Xe[Te]=Ht,Ue.push(Te),Ht={},Xt.dense&&(en=Ht["!data"]=[]),mi={s:{r:0,c:0},e:{r:0,c:0}},Ci=ti[3],Te=Pt||"Sheet"+(Ci+1),Pt="");var Hn=Xt.dense?(en[ti[0].r]||[])[ti[0].c]:Ht[Tn(ti[0])];if(Hn){Hn.t=ti[1].t,Hn.v=ti[1].v,null!=ti[1].z&&(Hn.z=ti[1].z),null!=ti[1].f&&(Hn.f=ti[1].f),Jn=Hn;break}Xt.dense?(en[ti[0].r]||(en[ti[0].r]=[]),en[ti[0].r][ti[0].c]=ti[1]):Ht[Tn(ti[0])]=ti[1],Jn=ti[1];break;case 21509:Xt.works2=!0;break;case 21506:5281==ti&&(Jn.z="hh:mm:ss",Xt.cellDates&&"n"==Jn.t&&(Jn.v=Vu(Jn.v),Jn.t="number"==typeof Jn.v?"n":"d"))}},Xt);else{if(26!=Ft[2]&&14!=Ft[2])throw new Error("Unrecognized LOTUS BOF "+Ft[2]);Xt.Enum=Ce,14==Ft[2]&&(Xt.qpro=!0,Ft.l=0),e(Ft,function(ti,Co,qn){switch(qn){case 204:Te=ti;break;case 22:ti[1].v.charCodeAt(0)<48&&(ti[1].v=ti[1].v.slice(1)),ti[1].v=ti[1].v.replace(/\x0F./g,function(Hn){return String.fromCharCode(Hn.charCodeAt(1)-32)}).replace(/\r\n/g,"\n");case 23:case 24:case 25:case 37:case 39:case 40:if(ti[3]>Ci&&(Ht["!ref"]=un(mi),Xe[Te]=Ht,Ue.push(Te),Ht={},Xt.dense&&(en=Ht["!data"]=[]),mi={s:{r:0,c:0},e:{r:0,c:0}},Te="Sheet"+((Ci=ti[3])+1)),nr>0&&ti[0].r>=nr)break;Xt.dense?(en[ti[0].r]||(en[ti[0].r]=[]),en[ti[0].r][ti[0].c]=ti[1]):Ht[Tn(ti[0])]=ti[1],mi.e.c=128?95:Pt)}return Ht.write_shift(1,0),Ht}function W(Ft,jt,Xt){var Ht=re(7);return Ht.write_shift(1,P(Xt)),Ht.write_shift(2,jt),Ht.write_shift(2,Ft),Ht.write_shift(2,Xt.v,"i"),Ht}function rt(Ft,jt,Xt){var Ht=re(13);return Ht.write_shift(1,P(Xt)),Ht.write_shift(2,jt),Ht.write_shift(2,Ft),Ht.write_shift(8,Xt.v,"f"),Ht}function vt(Ft,jt,Xt){var Ht=32768&jt;return jt=(Ht?Ft:0)+((jt&=-32769)>=8192?jt-16384:jt),(Ht?"":"$")+(Xt?dn(jt):Pn(jt))}var _t={31:["NA",0],33:["ABS",1],34:["TRUNC",1],35:["SQRT",1],36:["LOG",1],37:["LN",1],38:["PI",0],39:["SIN",1],40:["COS",1],41:["TAN",1],42:["ATAN2",2],43:["ATAN",1],44:["ASIN",1],45:["ACOS",1],46:["EXP",1],47:["MOD",2],49:["ISNA",1],50:["ISERR",1],51:["FALSE",0],52:["TRUE",0],53:["RAND",0],54:["DATE",3],63:["ROUND",2],64:["TIME",3],68:["ISNUMBER",1],69:["ISTEXT",1],70:["LEN",1],71:["VALUE",1],73:["MID",3],74:["CHAR",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],102:["UPPER",1],103:["LOWER",1],107:["PROPER",1],109:["TRIM",1],111:["T",1]},Mt=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function dt(Ft){var jt=[{c:0,r:0},{t:"n",v:0},0];return jt[0].r=Ft.read_shift(2),jt[3]=Ft[Ft.l++],jt[0].c=Ft[Ft.l++],jt}function bt(Ft,jt,Xt,Ht){var Te=re(6+Ht.length);Te.write_shift(2,Ft),Te.write_shift(1,Xt),Te.write_shift(1,jt),Te.write_shift(1,39);for(var Pt=0;Pt=128?95:Ci)}return Te.write_shift(1,0),Te}function Et(Ft,jt){var Xt=dt(Ft),Ht=Ft.read_shift(4),Te=Ft.read_shift(4),Pt=Ft.read_shift(2);if(65535==Pt)return 0===Ht&&3221225472===Te?(Xt[1].t="e",Xt[1].v=15):0===Ht&&3489660928===Te?(Xt[1].t="e",Xt[1].v=42):Xt[1].v=0,Xt;var Ci=32768&Pt;return Pt=(32767&Pt)-16446,Xt[1].v=(1-2*Ci)*(Te*Math.pow(2,Pt+32)+Ht*Math.pow(2,Pt)),Xt}function Dt(Ft,jt,Xt,Ht){var Te=re(14);if(Te.write_shift(2,Ft),Te.write_shift(1,Xt),Te.write_shift(1,jt),0==Ht)return Te.write_shift(4,0),Te.write_shift(4,0),Te.write_shift(2,65535),Te;var Pt=0,Ci=0,Ue=0;return Ht<0&&(Pt=1,Ht=-Ht),Ci=0|Math.log2(Ht),2147483648&(Ue=(Ht/=Math.pow(2,Ci-31))>>>0)||(++Ci,Ue=(Ht/=2)>>>0),Ht-=Ue,Ue|=2147483648,Ue>>>=0,Ht*=Math.pow(2,32),Te.write_shift(4,Ht>>>0),Te.write_shift(4,Ue),Te.write_shift(2,Ci+=16383+(Pt?32768:0)),Te}function fe(Ft,jt){var Xt=dt(Ft),Ht=Ft.read_shift(8,"f");return Xt[1].v=Ht,Xt}function _e(Ft,jt){return 0==Ft[Ft.l+jt-1]?Ft.read_shift(jt,"cstr"):""}function Kt(Ft,jt){var Xt=re(5+Ft.length);Xt.write_shift(2,14e3),Xt.write_shift(2,jt);for(var Ht=0;Ht127?95:Te}return Xt[Xt.l++]=0,Xt}var ke={0:{n:"BOF",f:ws},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:function w(Ft,jt,Xt){var Ht={s:{c:0,r:0},e:{c:0,r:0}};return 8==jt&&Xt.qpro?(Ht.s.c=Ft.read_shift(1),Ft.l++,Ht.s.r=Ft.read_shift(2),Ht.e.c=Ft.read_shift(1),Ft.l++,Ht.e.r=Ft.read_shift(2),Ht):(Ht.s.c=Ft.read_shift(2),Ht.s.r=Ft.read_shift(2),12==jt&&Xt.qpro&&(Ft.l+=2),Ht.e.c=Ft.read_shift(2),Ht.e.r=Ft.read_shift(2),12==jt&&Xt.qpro&&(Ft.l+=2),65535==Ht.s.c&&(Ht.s.c=Ht.e.c=Ht.s.r=Ht.e.r=0),Ht)}},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:function X(Ft,jt,Xt){var Ht=M(Ft,0,Xt);return Ht[1].v=Ft.read_shift(2,"i"),Ht}},14:{n:"NUMBER",f:function Z(Ft,jt,Xt){var Ht=M(Ft,0,Xt);return Ht[1].v=Ft.read_shift(8,"f"),Ht}},15:{n:"LABEL",f:function O(Ft,jt,Xt){var Ht=Ft.l+jt,Te=M(Ft,0,Xt);if(Te[1].t="s",20768==(65534&Xt.vers)){Ft.l++;var Pt=Ft.read_shift(1);return Te[1].v=Ft.read_shift(Pt,"utf8"),Te}return Xt.qpro&&Ft.l++,Te[1].v=Ft.read_shift(Ht-Ft.l,"cstr"),Te}},16:{n:"FORMULA",f:function st(Ft,jt,Xt){var Ht=Ft.l+jt,Te=M(Ft,0,Xt);if(Te[1].v=Ft.read_shift(8,"f"),Xt.qpro)Ft.l=Ht;else{var Pt=Ft.read_shift(2);(function ft(Ft,jt){va(Ft,0);for(var Xt=[],Ht=0,Te="",Pt="",Ci="",Xe="";Ft.lXt.length)return void console.error("WK1 bad formula parse 0x"+Ue.toString(16)+":|"+Xt.join("|")+"|");var nr=Xt.slice(-Ht);Xt.length-=Ht,Xt.push(_t[Ue][0]+"("+nr.join(",")+")")}}}1==Xt.length?jt[1].f=""+Xt[0]:console.error("WK1 bad formula parse |"+Xt.join("|")+"|")})(Ft.slice(Ft.l,Ft.l+Pt),Te),Ft.l+=Pt}return Te}},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:function U(Ft,jt,Xt){var Ht=Ft.l+jt,Te=M(Ft,0,Xt);if(Te[1].t="s",20768==Xt.vers){var Pt=Ft.read_shift(1);return Te[1].v=Ft.read_shift(Pt,"utf8"),Te}return Te[1].v=Ft.read_shift(Ht-Ft.l,"cstr"),Te}},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:_e},222:{n:"SHEETNAMELP",f:function Ne(Ft,jt){var Xt=Ft[Ft.l++];Xt>jt-1&&(Xt=jt-1);for(var Ht="";Ht.length>1;if(1&Xt[1].v)switch(7&Ht){case 0:Ht=5e3*(Ht>>3);break;case 1:Ht=500*(Ht>>3);break;case 2:Ht=(Ht>>3)/20;break;case 3:Ht=(Ht>>3)/200;break;case 4:Ht=(Ht>>3)/2e3;break;case 5:Ht=(Ht>>3)/2e4;break;case 6:Ht=(Ht>>3)/16;break;case 7:Ht=(Ht>>3)/64}return Xt[1].v=Ht,Xt}},25:{n:"FORMULA19",f:function Le(Ft,jt){var Xt=Et(Ft);return Ft.l+=jt-14,Xt}},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:function Ei(Ft,jt){for(var Xt={},Ht=Ft.l+jt;Ft.l>6,Xt}},38:{n:"??"},39:{n:"NUMBER27",f:fe},40:{n:"FORMULA28",f:function Qt(Ft,jt){var Xt=fe(Ft);return Ft.l+=jt-12,Xt}},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:_e},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:function Se(Ft,jt,Xt){if(Xt.qpro&&!(jt<21)){var Ht=Ft.read_shift(1);return Ft.l+=17,Ft.l+=1,Ft.l+=2,[Ht,Ft.read_shift(jt-21,"cstr")]}}},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}},oi={5:"dd-mmm-yy",6:"dd-mmm",7:"mmm-yy",8:"mm/dd/yy",10:"hh:mm:ss AM/PM",11:"hh:mm AM/PM",14:"dd-mmm-yyyy",15:"mmm-yyyy",34:"0.00",50:"0.00;[Red]0.00",66:"0.00;(0.00)",82:"0.00;[Red](0.00)",162:'"$"#,##0.00;\\("$"#,##0.00\\)',288:"0%",304:"0E+00",320:"# ?/?"};function ui(Ft){var jt=Ft.read_shift(2),Xt=Ft.read_shift(1);if(0!=Xt)throw"unsupported QPW string type "+Xt.toString(16);return Ft.read_shift(jt,"sbcs-cont")}return{sheet_to_wk1:function r(Ft,jt){var Xt=jt||{};if(+Xt.codepage>=0&&Kl(+Xt.codepage),"string"==Xt.type)throw new Error("Cannot write WK1 to JS string");var Ht=po();if(!Ft["!ref"])throw new Error("Cannot export empty sheet to WK1");var Te=Gn(Ft["!ref"]),Pt=null!=Ft["!data"],Ci=[];Re(Ht,0,function o(Ft){var jt=re(2);return jt.write_shift(2,Ft),jt}(1030)),Re(Ht,6,function C(Ft){var jt=re(8);return jt.write_shift(2,Ft.s.c),jt.write_shift(2,Ft.s.r),jt.write_shift(2,Ft.e.c),jt.write_shift(2,Ft.e.r),jt}(Te));for(var Xe=Math.min(Te.e.r,8191),Ue=Te.s.c;Ue<=Te.e.c;++Ue)Ci[Ue]=dn(Ue);for(var Bi=Te.s.r;Bi<=Xe;++Bi){var en=Pn(Bi);for(Ue=Te.s.c;Ue<=Te.e.c;++Ue){var mi=Pt?(Ft["!data"][Bi]||[])[Ue]:Ft[Ci[Ue]+en];if(mi&&"z"!=mi.t)switch(mi.t){case"n":(0|mi.v)==mi.v&&mi.v>=-32768&&mi.v<=32767?Re(Ht,13,W(Bi,Ue,mi)):Re(Ht,14,rt(Bi,Ue,mi));break;case"d":var nr=ms(mi.v);(0|nr)==nr&&nr>=-32768&&nr<=32767?Re(Ht,13,W(Bi,Ue,{t:"n",v:nr,z:mi.z||ki[14]})):Re(Ht,14,rt(Bi,Ue,{t:"n",v:nr,z:mi.z||ki[14]}));break;default:Re(Ht,15,L(Bi,Ue,Sd(mi).slice(0,239)))}}}return Re(Ht,1),Ht.end()},book_to_wk3:function s(Ft,jt){var Xt=jt||{};if(+Xt.codepage>=0&&Kl(+Xt.codepage),"string"==Xt.type)throw new Error("Cannot write WK3 to JS string");var Ht=po();Re(Ht,0,function l(Ft){var jt=re(26);jt.write_shift(2,4096),jt.write_shift(2,4),jt.write_shift(4,0);for(var Xt=0,Ht=0,Te=0,Pt=0;Pt8191&&(Xt=8191),jt.write_shift(2,Xt),jt.write_shift(1,Te),jt.write_shift(1,Ht),jt.write_shift(2,0),jt.write_shift(2,0),jt.write_shift(1,1),jt.write_shift(1,2),jt.write_shift(4,0),jt.write_shift(4,0),jt}(Ft));for(var Te=0,Pt=0;Te=0;--s)i=((16384&i?1:0)|i<<1&32767)^t[s];return 52811^i}function M1(e){for(var i=0,t=1;3!=i;++i)t=256*t+(e[i]>255?255:e[i]<0?0:e[i]);return t.toString(16).toUpperCase().slice(1)}var bo=6;function I1(e){return Math.floor((e+Math.round(128/bo)/256)*bo)}function R1(e){return Math.floor((e-5)/bo*100+.5)/100}function cA(e){return Math.round((e*bo+5)/bo*256)/256}function pf(e){e.width?(e.wpx=I1(e.width),e.wch=R1(e.wpx),e.MDW=bo):e.wpx?(e.wch=R1(e.wpx),e.width=cA(e.wch),e.MDW=bo):"number"==typeof e.wch&&(e.width=cA(e.wch),e.wpx=I1(e.width),e.MDW=bo),e.customWidth&&delete e.customWidth}var $tt=96;function k1(e){return 96*e/$tt}function b0(e){return e*$tt/96}function eHt(e,i,t){t||(t=re(6+4*i.length)),t.write_shift(2,e),ya(i,t);var n=t.length>t.l?t.slice(0,t.l):t;return null==t.l&&(t.l=t.length),n}var EN,rHt=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],sHt=mo;function Qtt(e,i){i||(i=re(84)),EN||(EN=HE(rHt));var t=EN[e.patternType];null==t&&(t=40),i.write_shift(4,t);var n=0;if(40!=t)for(JE({auto:1},i),JE({auto:1},i);n<12;++n)i.write_shift(4,0);else{for(;n<4;++n)i.write_shift(4,0);for(;n<12;++n)i.write_shift(4,0)}return i.length>i.l?i.slice(0,i.l):i}function Ktt(e,i,t){return t||(t=re(16)),t.write_shift(2,i||0),t.write_shift(2,e.numFmtId||0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(1,0),t}function P1(e,i){return i||(i=re(10)),i.write_shift(1,0),i.write_shift(1,0),i.write_shift(4,0),i.write_shift(4,0),i}var oHt=mo;function wHt(e,i){var t=po();return Ee(t,278),function hHt(e,i){if(i){var t=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)null!=i[r]&&++t}),0!=t&&(Ee(e,615,Mc(t)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var r=n[0];r<=n[1];++r)null!=i[r]&&Ee(e,44,eHt(r,i[r]))}),Ee(e,616))}}(t,e.SSF),function fHt(e){Ee(e,611,Mc(1)),Ee(e,43,function nHt(e,i){i||(i=re(153)),i.write_shift(2,20*e.sz),function I9t(e,i){i||(i=re(2)),i.write_shift(1,(e.italic?2:0)|(e.strike?8:0)|(e.outline?16:0)|(e.shadow?32:0)|(e.condense?64:0)|(e.extend?128:0)),i.write_shift(1,0)}(e,i),i.write_shift(2,e.bold?700:400);var t=0;"superscript"==e.vertAlign?t=1:"subscript"==e.vertAlign&&(t=2),i.write_shift(2,t),i.write_shift(1,e.underline||0),i.write_shift(1,e.family||0),i.write_shift(1,e.charset||0),i.write_shift(1,0),JE(e.color,i);var n=0;return"major"==e.scheme&&(n=1),"minor"==e.scheme&&(n=2),i.write_shift(1,n),ya(e.name,i),i.length>i.l?i.slice(0,i.l):i}({sz:12,color:{theme:1},name:"Calibri",family:2,scheme:"minor"})),Ee(e,612)}(t),function mHt(e){Ee(e,603,Mc(2)),Ee(e,45,Qtt({patternType:"none"})),Ee(e,45,Qtt({patternType:"gray125"})),Ee(e,604)}(t),function pHt(e){Ee(e,613,Mc(1)),Ee(e,46,function lHt(e,i){return i||(i=re(51)),i.write_shift(1,0),P1(0,i),P1(0,i),P1(0,i),P1(0,i),P1(0,i),i.length>i.l?i.slice(0,i.l):i}()),Ee(e,614)}(t),function gHt(e){Ee(e,626,Mc(1)),Ee(e,47,Ktt({numFmtId:0,fontId:0,fillId:0,borderId:0},65535)),Ee(e,627)}(t),function vHt(e,i){Ee(e,617,Mc(i.length)),i.forEach(function(t){Ee(e,47,Ktt(t,0))}),Ee(e,618)}(t,i.cellXfs),function xHt(e){Ee(e,619,Mc(1)),Ee(e,48,function cHt(e,i){return i||(i=re(52)),i.write_shift(4,e.xfId),i.write_shift(2,1),i.write_shift(1,+e.builtinId),i.write_shift(1,0),T1(e.name||"",i),i.length>i.l?i.slice(0,i.l):i}({xfId:0,builtinId:0,name:"Normal"})),Ee(e,620)}(t),function yHt(e){Ee(e,505,Mc(0)),Ee(e,506)}(t),function bHt(e){Ee(e,508,function dHt(e,i,t){var n=re(2052);return n.write_shift(4,e),T1(i,n),T1(t,n),n.length>n.l?n.slice(0,n.l):n}(0,"TableStyleMedium9","PivotStyleMedium4")),Ee(e,509)}(t),Ee(t,279),t.end()}function AN(e,i){if(i&&i.themeXLSX)return i.themeXLSX;if(e&&"string"==typeof e.raw)return e.raw;var t=[Bs];return t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]='',t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]='',t[t.length]="",t[t.length]="",t[t.length]="",t[t.length]="",t.join("")}function Jtt(e,i,t){var n=[21600,21600],r=["m0,0l0",n[1],n[0],n[1],n[0],"0xe"].join(","),s=[We("xml",null,{"xmlns:v":Il.v,"xmlns:o":Il.o,"xmlns:x":Il.x,"xmlns:mv":Il.mv}).replace(/\/>/,">"),We("o:shapelayout",We("o:idmap",null,{"v:ext":"edit",data:e}),{"v:ext":"edit"})],o=65536*e,l=i||[];return l.length>0&&s.push(We("v:shapetype",[We("v:stroke",null,{joinstyle:"miter"}),We("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202",coordsize:n.join(","),"o:spt":202,path:r})),l.forEach(function(w){++o,s.push(function KHt(e,i,t){var n=vr(e[0]),r={color2:"#BEFF82",type:"gradient"};"gradient"==r.type&&(r.angle="-180");var s="gradient"==r.type?We("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,o=We("v:fill",s,r);return["",o,We("v:shadow",null,{on:"t",obscured:"t"}),We("v:path",null,{"o:connecttype":"none"}),'
','',"","",Wa("x:Anchor",[n.c+1,0,n.r+1,0,n.c+3,20,n.r+5,20].join(",")),Wa("x:AutoFill","False"),Wa("x:Row",String(n.r)),Wa("x:Column",String(n.c)),e[1].hidden?"":"","",""].join("")}(w,o))}),s.push(""),s.join("")}function JHt(e){var i=[Bs,We("comments",null,{xmlns:Km[0]})],t=[];return i.push(""),e.forEach(function(n){n[1].forEach(function(r){var s=gn(r.a);-1==t.indexOf(s)&&(t.push(s),i.push(""+s+"")),r.T&&r.ID&&-1==t.indexOf("tc="+r.ID)&&(t.push("tc="+r.ID),i.push("tc="+r.ID+""))})}),0==t.length&&(t.push("SheetJ5"),i.push("SheetJ5")),i.push(""),i.push(""),e.forEach(function(n){var r=0,s=[],o=0;if(n[1][0]&&n[1][0].T&&n[1][0].ID&&(r=t.indexOf("tc="+n[1][0].ID)),n[1].forEach(function(C){C.a&&(r=t.indexOf(gn(C.a))),C.T&&++o,s.push(null==C.t?"":gn(C.t))}),0===o)n[1].forEach(function(C){i.push(''),i.push(Wa("t",null==C.t?"":gn(C.t))),i.push("")});else{n[1][0]&&n[1][0].T&&n[1][0].ID&&(r=t.indexOf("tc="+n[1][0].ID)),i.push('');for(var l="Comment:\n "+s[0]+"\n",w=1;w")}}),i.push(""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}function tet(e,i,t){var n=[Bs,We("ThreadedComments",null,{xmlns:ga.TCMNT}).replace(/[\/]>/,">")];return e.forEach(function(r){var s="";(r[1]||[]).forEach(function(o,l){if(o.T){o.a&&-1==i.indexOf(o.a)&&i.push(o.a);var w={ref:r[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+t.tcid++).slice(-12)+"}"};0==l?s=w.id:w.parentId=s,o.ID=w.id,o.a&&(w.personId="{54EE7950-7262-4200-6969-"+("000000000000"+i.indexOf(o.a)).slice(-12)+"}"),n.push(We("threadedComment",Wa("text",o.t||""),w))}else delete o.ID})}),n.push(""),n.join("")}function eet(e){var i=[Bs,We("personList",null,{xmlns:ga.TCMNT,"xmlns:x":Km[0]}).replace(/[\/]>/,">")];return e.forEach(function(t,n){i.push(We("person",null,{displayName:t,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:t,providerId:"None"}))}),i.push(""),i.join("")}var n7t=go;function iet(e){return ya(e.slice(0,54))}function s7t(e){var i=po(),t=[];return Ee(i,628),Ee(i,630),e.forEach(function(n){n[1].forEach(function(r){t.indexOf(r.a)>-1||(t.push(r.a.slice(0,54)),Ee(i,632,iet(r.a)),r.T&&r.ID&&-1==t.indexOf("tc="+r.ID)&&(t.push("tc="+r.ID),Ee(i,632,iet("tc="+r.ID))))})}),Ee(i,631),Ee(i,633),e.forEach(function(n){n[1].forEach(function(r){var s=-1;r.ID&&(s=t.indexOf("tc="+r.ID)),-1==s&&n[1][0].T&&n[1][0].ID&&(s=t.indexOf("tc="+n[1][0].ID)),-1==s&&(s=t.indexOf(r.a)),r.iauthor=s;var o={s:vr(n[0]),e:vr(n[0])};Ee(i,635,function i7t(e,i){return null==i&&(i=re(36)),i.write_shift(4,e[1].iauthor),g0(e[0],i),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i.write_shift(4,0),i}([o,r])),r.t&&r.t.length>0&&Ee(i,637,function C9t(e,i){var t=!1;return null==i&&(t=!0,i=re(23+4*e.t.length)),i.write_shift(1,1),ya(e.t,i),i.write_shift(4,1),function w9t(e,i){i||(i=re(4)),i.write_shift(2,e.ich||0),i.write_shift(2,e.ifnt||0)}({ich:0,ifnt:0},i),t?i.slice(0,i.l):i}(r)),Ee(i,636),delete r.iauthor})}),Ee(i,634),Ee(i,629),i.end()}var c7t=["xlsb","xlsm","xlam","biff8","xla"],cp=function(){var e=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,i={r:0,c:0};function t(n,r,s,o){var l=!1,w=!1;0==s.length?w=!0:"["==s.charAt(0)&&(w=!0,s=s.slice(1,-1)),0==o.length?l=!0:"["==o.charAt(0)&&(l=!0,o=o.slice(1,-1));var C=s.length>0?0|parseInt(s,10):0,M=o.length>0?0|parseInt(o,10):0;return l?M+=i.c:--M,w?C+=i.r:--C,r+(l?"":"$")+dn(M)+(w?"":"$")+Pn(C)}return function(r,s){return i=s,r.replace(e,t)}}(),hA=/(^|[^._A-Z0-9])(\$?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])(\$?)(\d{1,7})(?![_.\(A-Za-z0-9])/g;try{hA=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g}catch{}var fA=function(){return function(i,t){return i.replace(hA,function(n,r,s,o,l,w){var C=nN(o)-(s?0:t.c),M=iN(w)-(l?0:t.r);return r+"R"+("$"==l?M+1:0==M?"":"["+M+"]")+"C"+("$"==s?C+1:0==C?"":"["+C+"]")})}}();function net(e,i){return e.replace(hA,function(t,n,r,s,o,l){return n+("$"==r?r+s:dn(nN(s)+i.c))+("$"==o?o+l:Pn(iN(l)+i.r))})}function Zs(e){e.l+=1}function gf(e,i){var t=e.read_shift(1==i?1:2);return[16383&t,t>>14&1,t>>15&1]}function aet(e,i,t){var n=2;if(t){if(t.biff>=2&&t.biff<=5)return oet(e);12==t.biff&&(n=4)}var r=e.read_shift(n),s=e.read_shift(n),o=gf(e,2),l=gf(e,2);return{s:{r,c:o[0],cRel:o[1],rRel:o[2]},e:{r:s,c:l[0],cRel:l[1],rRel:l[2]}}}function oet(e){var i=gf(e,2),t=gf(e,2),n=e.read_shift(1),r=e.read_shift(1);return{s:{r:i[0],c:n,cRel:i[1],rRel:i[2]},e:{r:t[0],c:r,cRel:t[1],rRel:t[2]}}}function cet(e,i,t){if(t&&t.biff>=2&&t.biff<=5)return function g7t(e){var i=gf(e,2),t=e.read_shift(1);return{r:i[0],c:t,cRel:i[1],rRel:i[2]}}(e);var n=e.read_shift(t&&12==t.biff?4:2),r=gf(e,2);return{r:n,c:r[0],cRel:r[1],rRel:r[2]}}function v7t(e){var i=e.read_shift(2),t=e.read_shift(2);return{r:i,c:255&t,fQuoted:!!(16384&t),cRel:t>>15,rRel:t>>15}}function det(e){var i=1&e[e.l+1];return e.l+=4,[i,1]}function uet(e){return[e.read_shift(1),e.read_shift(1)]}function j7t(e,i){var t=[e.read_shift(1)];if(12==i)switch(t[0]){case 2:t[0]=4;break;case 4:t[0]=16;break;case 0:t[0]=1;break;case 1:t[0]=2}switch(t[0]){case 4:t[1]=function Vs(e,i){return 1===e.read_shift(i)}(e,1)?"TRUE":"FALSE",12!=i&&(e.l+=7);break;case 37:case 16:t[1]=ec[e[e.l]],e.l+=12==i?4:8;break;case 0:e.l+=8;break;case 1:t[1]=vo(e);break;case 2:t[1]=function ap(e,i,t){if(t.biff>5)return function A1(e,i,t){var n=e.read_shift(t&&2==t.biff?1:2);return 0===n?(e.l++,""):function sp(e,i,t){if(t){if(t.biff>=2&&t.biff<=5)return e.read_shift(i,"cpstr");if(t.biff>=12)return e.read_shift(i,"dbcs-cont")}var r=e.read_shift(1);return e.read_shift(i,0===r?"sbcs-cont":"dbcs-cont")}(e,n,t)}(e,0,t);var n=e.read_shift(1);return 0===n?(e.l++,""):e.read_shift(n,t.biff<=4||!e.lens?"cpstr":"sbcs-cont")}(e,0,{biff:i>0&&i<8?2:i});break;default:throw new Error("Bad SerAr: "+t[0])}return t}function Y7t(e,i,t){for(var n=e.read_shift(12==t.biff?4:2),r=[],s=0;s!=n;++s)r.push((12==t.biff?ep:sA)(e,8));return r}function $7t(e,i,t){var n=0,r=0;12==t.biff?(n=e.read_shift(4),r=e.read_shift(4)):(r=1+e.read_shift(1),n=1+e.read_shift(2)),t.biff>=2&&t.biff<8&&(--n,0==--r&&(r=256));for(var s=0,o=[];s!=n&&(o[s]=[]);++s)for(var l=0;l!=r;++l)o[s][l]=j7t(e,t.biff);return o}function F1(e,i,t){return e.l+=2,[v7t(e)]}function DN(e){return e.l+=6,[]}function het(e){return e.l+=2,[ws(e),1&e.read_shift(2)]}var mWt=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"],fet={1:{n:"PtgExp",f:function U7t(e,i,t){return e.l++,t&&12==t.biff?[e.read_shift(4,"i"),0]:[e.read_shift(2),e.read_shift(t&&2==t.biff?1:2)]}},2:{n:"PtgTbl",f:mo},3:{n:"PtgAdd",f:Zs},4:{n:"PtgSub",f:Zs},5:{n:"PtgMul",f:Zs},6:{n:"PtgDiv",f:Zs},7:{n:"PtgPower",f:Zs},8:{n:"PtgConcat",f:Zs},9:{n:"PtgLt",f:Zs},10:{n:"PtgLe",f:Zs},11:{n:"PtgEq",f:Zs},12:{n:"PtgGe",f:Zs},13:{n:"PtgGt",f:Zs},14:{n:"PtgNe",f:Zs},15:{n:"PtgIsect",f:Zs},16:{n:"PtgUnion",f:Zs},17:{n:"PtgRange",f:Zs},18:{n:"PtgUplus",f:Zs},19:{n:"PtgUminus",f:Zs},20:{n:"PtgPercent",f:Zs},21:{n:"PtgParen",f:Zs},22:{n:"PtgMissArg",f:Zs},23:{n:"PtgStr",f:function X7t(e,i,t){return e.l++,x0(e,0,t)}},26:{n:"PtgSheet",f:function vWt(e,i,t){return e.l+=5,e.l+=2,e.l+=2==t.biff?1:4,["PTGSHEET"]}},27:{n:"PtgEndSheet",f:function xWt(e,i,t){return e.l+=2==t.biff?4:5,["PTGENDSHEET"]}},28:{n:"PtgErr",f:function z7t(e){return e.l++,ec[e.read_shift(1)]}},29:{n:"PtgBool",f:function H7t(e){return e.l++,0!==e.read_shift(1)}},30:{n:"PtgInt",f:function G7t(e){return e.l++,e.read_shift(2)}},31:{n:"PtgNum",f:function W7t(e){return e.l++,vo(e)}},32:{n:"PtgArray",f:function S7t(e,i,t){var n=(96&e[e.l++])>>5;return e.l+=2==t.biff?6:12==t.biff?14:7,[n]}},33:{n:"PtgFunc",f:function L7t(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=e.read_shift(t&&t.biff<=3?1:2);return[KWt[r],vet[r],n]}},34:{n:"PtgFuncVar",f:function N7t(e,i,t){var n=e[e.l++],r=e.read_shift(1),s=t&&t.biff<=3?[88==n?-1:0,e.read_shift(1)]:function B7t(e){return[e[e.l+1]>>7,32767&e.read_shift(2)]}(e);return[r,(0===s[0]?vet:QWt)[s[1]]]}},35:{n:"PtgName",f:function Q7t(e,i,t){var n=e.read_shift(1)>>>5&3,s=e.read_shift(!t||t.biff>=8?4:2);switch(t.biff){case 2:e.l+=5;break;case 3:case 4:e.l+=8;break;case 5:e.l+=12}return[n,0,s]}},36:{n:"PtgRef",f:function P7t(e,i,t){var n=(96&e[e.l])>>5;return e.l+=1,[n,cet(e,0,t)]}},37:{n:"PtgArea",f:function b7t(e,i,t){return[(96&e[e.l++])>>5,aet(e,0,t)]}},38:{n:"PtgMemArea",f:function J7t(e,i,t){var n=e.read_shift(1)>>>5&3;return e.l+=t&&2==t.biff?3:4,[n,e.read_shift(t&&2==t.biff?1:2)]}},39:{n:"PtgMemErr",f:mo},40:{n:"PtgMemNoMem",f:mo},41:{n:"PtgMemFunc",f:function q7t(e,i,t){return[e.read_shift(1)>>>5&3,e.read_shift(t&&2==t.biff?1:2)]}},42:{n:"PtgRefErr",f:function tWt(e,i,t){var n=e.read_shift(1)>>>5&3;return e.l+=4,t.biff<8&&e.l--,12==t.biff&&(e.l+=2),[n]}},43:{n:"PtgAreaErr",f:function _7t(e,i,t){var n=(96&e[e.l++])>>5;return e.l+=t&&t.biff>8?12:t.biff<8?6:8,[n]}},44:{n:"PtgRefN",f:function F7t(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=function x7t(e,i,t){var n=t&&t.biff?t.biff:8;if(n>=2&&n<=5)return function y7t(e){var i=e.read_shift(2),t=e.read_shift(1),n=(32768&i)>>15,r=(16384&i)>>14;return i&=16383,1==n&&i>=8192&&(i-=16384),1==r&&t>=128&&(t-=256),{r:i,c:t,cRel:r,rRel:n}}(e);var r=e.read_shift(n>=12?4:2),s=e.read_shift(2),o=(16384&s)>>14,l=(32768&s)>>15;if(s&=16383,1==l)for(;r>524287;)r-=1048576;if(1==o)for(;s>8191;)s-=16384;return{r,c:s,cRel:o,rRel:l}}(e,0,t);return[n,r]}},45:{n:"PtgAreaN",f:function C7t(e,i,t){var n=(96&e[e.l++])>>5,r=function p7t(e,i,t){if(t.biff<8)return oet(e);var n=e.read_shift(12==t.biff?4:2),r=e.read_shift(12==t.biff?4:2),s=gf(e,2),o=gf(e,2);return{s:{r:n,c:s[0],cRel:s[1],rRel:s[2]},e:{r,c:o[0],cRel:o[1],rRel:o[2]}}}(e,0,t);return[n,r]}},46:{n:"PtgMemAreaN",f:function yWt(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},47:{n:"PtgMemNoMemN",f:function bWt(e){return[e.read_shift(1)>>>5&3,e.read_shift(2)]}},57:{n:"PtgNameX",f:function K7t(e,i,t){return 5==t.biff?function Z7t(e){var i=e.read_shift(1)>>>5&3,t=e.read_shift(2,"i");e.l+=8;var n=e.read_shift(2);return e.l+=12,[i,t,n]}(e):[e.read_shift(1)>>>5&3,e.read_shift(2),e.read_shift(4)]}},58:{n:"PtgRef3d",f:function O7t(e,i,t){var n=(96&e[e.l])>>5;e.l+=1;var r=e.read_shift(2);return t&&5==t.biff&&(e.l+=12),[n,r,cet(e,0,t)]}},59:{n:"PtgArea3d",f:function w7t(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2,"i");if(t&&5===t.biff)e.l+=12;return[n,r,aet(e,0,t)]}},60:{n:"PtgRefErr3d",f:function eWt(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2),s=4;if(t)switch(t.biff){case 5:s=15;break;case 12:s=6}return e.l+=s,[n,r]}},61:{n:"PtgAreaErr3d",f:function T7t(e,i,t){var n=(96&e[e.l++])>>5,r=e.read_shift(2),s=8;if(t)switch(t.biff){case 5:e.l+=12,s=6;break;case 12:s=12}return e.l+=s,[n,r]}},255:{}},_Wt={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},TWt={1:{n:"PtgElfLel",f:het},2:{n:"PtgElfRw",f:F1},3:{n:"PtgElfCol",f:F1},6:{n:"PtgElfRwV",f:F1},7:{n:"PtgElfColV",f:F1},10:{n:"PtgElfRadical",f:F1},11:{n:"PtgElfRadicalS",f:DN},13:{n:"PtgElfColS",f:DN},15:{n:"PtgElfColSV",f:DN},16:{n:"PtgElfRadicalLel",f:het},25:{n:"PtgList",f:function pWt(e){e.l+=2;var i=e.read_shift(2),t=e.read_shift(2),n=e.read_shift(4),r=e.read_shift(2),s=e.read_shift(2);return{ixti:i,coltype:3&t,rt:mWt[t>>2&31],idx:n,c:r,C:s}}},29:{n:"PtgSxName",f:function gWt(e){return e.l+=2,[e.read_shift(4)]}},255:{}},CWt={0:{n:"PtgAttrNoop",f:function wWt(e){return e.l+=4,[0,0]}},1:{n:"PtgAttrSemi",f:function I7t(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=t&&2==t.biff?3:4,[n]}},2:{n:"PtgAttrIf",f:function D7t(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&2==t.biff?1:2)]}},4:{n:"PtgAttrChoose",f:function E7t(e,i,t){e.l+=2;for(var n=e.read_shift(t&&2==t.biff?1:2),r=[],s=0;s<=n;++s)r.push(e.read_shift(t&&2==t.biff?1:2));return r}},8:{n:"PtgAttrGoto",f:function A7t(e,i,t){var n=255&e[e.l+1]?1:0;return e.l+=2,[n,e.read_shift(t&&2==t.biff?1:2)]}},16:{n:"PtgAttrSum",f:function V7t(e,i,t){e.l+=t&&2==t.biff?3:4}},32:{n:"PtgAttrBaxcel",f:det},33:{n:"PtgAttrBaxcel",f:det},64:{n:"PtgAttrSpace",f:function R7t(e){return e.read_shift(2),uet(e)}},65:{n:"PtgAttrSpaceSemi",f:function k7t(e){return e.read_shift(2),uet(e)}},128:{n:"PtgAttrIfError",f:function M7t(e){var i=255&e[e.l+1]?1:0;return e.l+=2,[i,e.read_shift(2)]}},255:{}};function O1(e,i,t,n){if(n.biff<8)return mo(e,i);for(var r=e.l+i,s=[],o=0;o!==t.length;++o)switch(t[o][0]){case"PtgArray":t[o][1]=$7t(e,0,n),s.push(t[o][1]);break;case"PtgMemArea":t[o][2]=Y7t(e,0,n),s.push(t[o][2]);break;case"PtgExp":n&&12==n.biff&&(t[o][1][1]=e.read_shift(4),s.push(t[o][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+t[o][0]}return 0!=(i=r-e.l)&&s.push(mo(e,i)),s}function SWt(e){for(var i=[],t=0;t=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function AWt(e,i){var t=e.lastIndexOf("!"),n=i.lastIndexOf("!");return-1==t&&-1==n?e+":"+i:t>0&&n>0&&e.slice(0,t).toLowerCase()==i.slice(0,n).toLowerCase()?e+":"+i.slice(n+1):(console.error("Cannot hydrate range",e,i),e+":"+i)}function met(e,i,t){if(!e)return"SH33TJSERR0";if(t.biff>8&&(!e.XTI||!e.XTI[i]))return e.SheetNames[i];if(!e.XTI)return"SH33TJSERR6";var n=e.XTI[i];if(t.biff<8)return i>1e4&&(i-=65536),i<0&&(i=-i),0==i?"":e.XTI[i-1];if(!n)return"SH33TJSERR1";var r="";if(t.biff>8)switch(e[n[0]][0]){case 357:return r=-1==n[1]?"#REF":e.SheetNames[n[1]],n[1]==n[2]?r:r+":"+e.SheetNames[n[2]];case 358:return null!=t.SID?e.SheetNames[t.SID]:"SH33TJSSAME"+e[n[0]][0];default:return"SH33TJSSRC"+e[n[0]][0]}switch(e[n[0]][0][0]){case 1025:return r=-1==n[1]?"#REF":e.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?r:r+":"+e.SheetNames[n[2]];case 14849:return e[n[0]].slice(1).map(function(s){return s.Name}).join(";;");default:return e[n[0]][0][3]?(r=-1==n[1]?"#REF":e[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?r:r+":"+e[n[0]][0][3][n[2]]):"SH33TJSERR2"}}function pet(e,i,t){var n=met(e,i,t);return"#REF"==n?n:_1(n,t)}function wo(e,i,t,n,r){var w,C,M,L,s=r&&r.biff||8,o={s:{c:0,r:0},e:{c:0,r:0}},l=[],P=0,O=0,U="";if(!e[0]||!e[0][0])return"";for(var X=-1,W="",Z=0,rt=e[0].length;Z=0){switch(e[0][X][1][0]){case 0:W=Xn(" ",e[0][X][1][1]);break;case 1:W=Xn("\r",e[0][X][1][1]);break;default:if(W="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][X][1][0])}C+=W,X=-1}l.push(C+EWt[st[0]]+w);break;case"PtgIsect":w=l.pop(),C=l.pop(),l.push(C+" "+w);break;case"PtgUnion":w=l.pop(),C=l.pop(),l.push(C+","+w);break;case"PtgRange":w=l.pop(),C=l.pop(),l.push(AWt(C,w));break;case"PtgAttrChoose":case"PtgAttrGoto":case"PtgAttrIf":case"PtgAttrIfError":case"PtgAttrBaxcel":case"PtgAttrSemi":case"PtgMemArea":case"PtgTbl":case"PtgMemErr":case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":case"PtgMemFunc":case"PtgMemNoMem":break;case"PtgRef":M=y1(st[1][1],o,r),l.push(b1(M,s));break;case"PtgRefN":M=t?y1(st[1][1],t,r):st[1][1],l.push(b1(M,s));break;case"PtgRef3d":P=st[1][1],M=y1(st[1][2],o,r),U=pet(n,P,r),l.push(U+"!"+b1(M,s));break;case"PtgFunc":case"PtgFuncVar":var _t=st[1][0],Mt=st[1][1];_t||(_t=0);var ft=0==(_t&=127)?[]:l.slice(-_t);l.length-=_t,"User"===Mt&&(Mt=ft.shift()),l.push(Mt+"("+ft.join(",")+")");break;case"PtgBool":l.push(st[1]?"TRUE":"FALSE");break;case"PtgInt":case"PtgErr":l.push(st[1]);break;case"PtgNum":l.push(String(st[1]));break;case"PtgStr":l.push('"'+st[1].replace(/"/g,'""')+'"');break;case"PtgAreaN":L=Gq(st[1][1],t?{s:t}:o,r),l.push(eN(L,r));break;case"PtgArea":L=Gq(st[1][1],o,r),l.push(eN(L,r));break;case"PtgArea3d":L=st[1][2],U=pet(n,P=st[1][1],r),l.push(U+"!"+eN(L,r));break;case"PtgAttrSum":l.push("SUM("+l.pop()+")");break;case"PtgName":var dt=(n.names||[])[(O=st[1][2])-1]||(n[0]||[])[O],pt=dt?dt.Name:"SH33TJSNAME"+String(O);pt&&"_xlfn."==pt.slice(0,6)&&!r.xlfn&&(pt=pt.slice(6)),l.push(pt);break;case"PtgNameX":var Tt,bt=st[1][1];if(O=st[1][2],!(r.biff<=5)){var Et="";if(14849==((n[bt]||[])[0]||[])[0]||(1025==((n[bt]||[])[0]||[])[0]?n[bt][O]&&n[bt][O].itab>0&&(Et=n.SheetNames[n[bt][O].itab-1]+"!"):Et=n.SheetNames[O-1]+"!"),n[bt]&&n[bt][O])Et+=n[bt][O].Name;else if(n[0]&&n[0][O])Et+=n[0][O].Name;else{var Dt=(met(n,bt,r)||"").split(";;");Dt[O-1]?Et=Dt[O-1]:Et+="SH33TJSERRX"}l.push(Et);break}bt<0&&(bt=-bt),n[bt]&&(Tt=n[bt][O]),Tt||(Tt={Name:"SH33TJSERRY"}),l.push(Tt.Name);break;case"PtgParen":var Le="(",ge=")";if(X>=0){switch(W="",e[0][X][1][0]){case 2:Le=Xn(" ",e[0][X][1][1])+Le;break;case 3:Le=Xn("\r",e[0][X][1][1])+Le;break;case 4:ge=Xn(" ",e[0][X][1][1])+ge;break;case 5:ge=Xn("\r",e[0][X][1][1])+ge;break;default:if(r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+e[0][X][1][0])}X=-1}l.push(Le+l.pop()+ge);break;case"PtgRefErr":case"PtgRefErr3d":case"PtgAreaErr":case"PtgAreaErr3d":l.push("#REF!");break;case"PtgExp":var fe={c:t.c,r:t.r};if(n.sharedf[Tn(M={c:st[1][1],r:st[1][0]})]){var Qt=n.sharedf[Tn(M)];l.push(wo(Qt,0,fe,n,r))}else{var _e=!1;for(w=0;w!=n.arrayf.length;++w)if(!(M.c<(C=n.arrayf[w])[0].s.c||M.c>C[0].e.c||M.rC[0].e.r)){l.push(wo(C[1],0,fe,n,r)),_e=!0;break}_e||l.push(st[1])}break;case"PtgArray":l.push("{"+SWt(st[1])+"}");break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":X=Z;break;case"PtgMissArg":l.push("");break;case"PtgList":l.push("Table"+st[1].idx+"[#"+st[1].rt+"]");break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");default:throw new Error("Unrecognized Formula Token: "+String(st))}if(3!=r.biff&&X>=0&&-1==["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"].indexOf(e[0][Z][0])){var Se=!0;switch((st=e[0][X])[1][0]){case 4:Se=!1;case 0:W=Xn(" ",st[1][1]);break;case 5:Se=!1;case 1:W=Xn("\r",st[1][1]);break;default:if(W="",r.WTF)throw new Error("Unexpected PtgAttrSpaceType "+st[1][0])}l.push((Se?W:"")+l.pop()+(Se?"":W)),X=-1}}if(l.length>1&&r.WTF)throw new Error("bad formula stack");return"TRUE"==l[0]||"FALSE"!=l[0]&&l[0]}function mA(e,i,t){var n=e.read_shift(4),r=function L1(e,i,t){for(var r,s,n=e.l+i,o=[];n!=e.l;)i=n-e.l,r=fet[s=e[e.l]]||fet[_Wt[s]],(24===s||25===s)&&(r=(24===s?TWt:CWt)[e[e.l+1]]),r&&r.f?o.push([r.n,r.f(e,i,t)]):mo(e,i);return o}(e,n,t),s=e.read_shift(4);return[r,s>0?O1(e,s,r,t):null]}var OWt=mA,pA=mA,LWt=mA,NWt=mA;function get(e){if((0|e)==e&&e=0){var i=re(11);return i.write_shift(4,3),i.write_shift(1,30),i.write_shift(2,e),i.write_shift(4,0),i}var t=re(17);return t.write_shift(4,11),t.write_shift(1,31),t.write_shift(8,e),t.write_shift(4,0),t}var $Wt=function YWt(e,i){if("number"==typeof e)return get(e);if("boolean"==typeof e)return function VWt(e){var i=re(10);return i.write_shift(4,2),i.write_shift(1,29),i.write_shift(1,e?1:0),i.write_shift(4,0),i}(e);if(/^#(DIV\/0!|GETTING_DATA|N\/A|NAME\?|NULL!|NUM!|REF!|VALUE!)$/.test(e))return function BWt(e){var i=re(10);return i.write_shift(4,2),i.write_shift(1,28),i.write_shift(1,e),i.write_shift(4,0),i}(+C1[e]);if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function zWt(e){var i=vr(e),t=re(15);return t.write_shift(4,7),t.write_shift(1,36),t.write_shift(4,i.r),t.write_shift(2,i.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),t.write_shift(4,0),t}(e);if(e.match(/^\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function WWt(e){var i=e.split(":"),t=i[0],n=re(23);n.write_shift(4,15);var r=vr(t=i[0]);return n.write_shift(1,36),n.write_shift(4,r.r),n.write_shift(2,r.c|("$"==t.charAt(0)?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),n.write_shift(4,0),r=vr(t=i[1]),n.write_shift(1,36),n.write_shift(4,r.r),n.write_shift(2,r.c|("$"==t.charAt(0)?0:1)<<14|(t.match(/\$\d/)?0:1)<<15),n.write_shift(4,0),n.write_shift(1,17),n.write_shift(4,0),n}(e);if(e.match(/^#REF!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function jWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=xa(e),s=re(23);return s.write_shift(4,15),s.write_shift(1,59),s.write_shift(2,2+i.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,r.s.r),s.write_shift(4,r.e.r),s.write_shift(2,r.s.c),s.write_shift(2,r.e.c),s.write_shift(4,0),s}(e,i);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function GWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t),r=vr(e=e.slice(t+1));"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var s=re(17);return s.write_shift(4,9),s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(o){return o.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,r.r),s.write_shift(2,r.c|("$"==e.charAt(0)?0:1)<<14|(e.match(/\$\d/)?0:1)<<15),s.write_shift(4,0),s}(e,i);if(e.match(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5}):\$?(?:[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D]|[A-Z]{1,2})\$?(?:10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})$/))return function XWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=e.split(":"),s=re(27);s.write_shift(4,19);var o=r[0],l=vr(o);return s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(w){return w.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,l.r),s.write_shift(2,l.c|("$"==o.charAt(0)?0:1)<<14|(o.match(/\$\d/)?0:1)<<15),l=vr(o=r[1]),s.write_shift(1,58),s.write_shift(2,2+i.SheetNames.map(function(w){return w.toLowerCase()}).indexOf(n.toLowerCase())),s.write_shift(4,l.r),s.write_shift(2,l.c|("$"==o.charAt(0)?0:1)<<14|(o.match(/\$\d/)?0:1)<<15),s.write_shift(1,17),s.write_shift(4,0),s}(e,i);if(/^(?:'[^\\\/?*\[\]:]*'|[^'][^\\\/?*\[\]:'`~!@#$%^()\-=+{}|;,<.>]*)!#REF!$/.test(e))return function HWt(e,i){var t=e.lastIndexOf("!"),n=e.slice(0,t);e=e.slice(t+1),"'"==n.charAt(0)&&(n=n.slice(1,-1).replace(/''/g,"'"));var r=re(17);return r.write_shift(4,9),r.write_shift(1,60),r.write_shift(2,2+i.SheetNames.map(function(s){return s.toLowerCase()}).indexOf(n.toLowerCase())),r.write_shift(4,0),r.write_shift(2,0),r.write_shift(4,0),r}(e,i);if(/^".*"$/.test(e))return function UWt(e){var i=re(7);i.write_shift(4,3+2*e.length),i.write_shift(1,23),i.write_shift(2,e.length);var t=re(2*e.length);t.write_shift(2*e.length,e,"utf16le");var n=re(4);return n.write_shift(4,0),Ns([i,t,n])}(e);if(/^[+-]\d+$/.test(e))return get(parseInt(e,10));throw"Formula |"+e+"| not supported for XLSB"},QWt={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},vet={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},KWt={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function ZWt(e){return("of:="+e.replace(hA,"$1[.$2$3$4$5]").replace(/\]:\[/g,":")).replace(/;/g,"|").replace(/,/g,";")}function yet(e){return e.replace(/!/,".").replace(/:/,":.")}var B1=typeof Map<"u";function RN(e,i,t){var n=0,r=e.length;if(t){if(B1?t.has(i):Object.prototype.hasOwnProperty.call(t,i))for(var s=B1?t.get(i):t[i];n-1?(t.width=cA(n),t.customWidth=1):null!=i.width&&(t.width=i.width),i.hidden&&(t.hidden=!0),null!=i.level&&(t.outlineLevel=t.level=i.level),t}function dp(e,i){if(e){var t=[.7,.7,.75,.75,.3,.3];"xlml"==i&&(t=[1,1,1,1,.5,.5]),null==e.left&&(e.left=t[0]),null==e.right&&(e.right=t[1]),null==e.top&&(e.top=t[2]),null==e.bottom&&(e.bottom=t[3]),null==e.header&&(e.header=t[4]),null==e.footer&&(e.footer=t[5])}}function vf(e,i,t){var n=t.revssf[null!=i.z?i.z:"General"],r=60,s=e.length;if(null==n&&t.ssf)for(;r<392;++r)if(null==t.ssf[r]){hf(i.z,r),t.ssf[r]=i.z,t.revssf[i.z]=n=r;break}for(r=0;r!=s;++r)if(e[r].numFmtId===n)return r;return e[s]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},s}function JWt(e,i,t){if(e&&e["!ref"]){var n=Gn(e["!ref"]);if(n.e.c"u")return"";var l="",w=e.t,C=e.v;if("z"!==e.t)switch(e.t){case"b":l=e.v?"1":"0";break;case"n":isNaN(e.v)?(e.t="e",l=ec[e.v=36]):isFinite(e.v)?l=""+e.v:(e.t="e",l=ec[e.v=7]);break;case"e":l=ec[e.v];break;case"d":if(n&&n.cellDates){var M=os(e.v,o);l=M.toISOString(),M.getUTCFullYear()<1900&&(l=l.slice(l.indexOf("T")+1).replace("Z",""))}else(e=pr(e)).t="n",l=""+(e.v=ms(os(e.v,o),o));typeof e.z>"u"&&(e.z=ki[14]);break;default:l=e.v}var P="z"==e.t||null==e.v?"":Wa("v",gn(l)),O={r:i},L=vf(n.cellXfs,e,n);switch(0!==L&&(O.s=L),e.t){case"n":case"z":break;case"d":O.t="d";break;case"b":O.t="b";break;case"e":O.t="e";break;default:if(null==e.v){delete e.t;break}if(e.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){P=Wa("v",""+RN(n.Strings,e.v,n.revStrings)),O.t="s";break}O.t="str"}if(e.t!=w&&(e.t=w,e.v=C),"string"==typeof e.f&&e.f){var U=e.F&&e.F.slice(0,i.length)==i?{t:"array",ref:e.F}:null;P=We("f",gn(e.f),U)+(null!=e.v?P:"")}return e.l&&(e.l.display=gn(l),t["!links"].push([i,e.l])),e.D&&(O.cm=1),We("c",P,O)}function EXt(e,i,t,n){var o,r=[Bs,We("worksheet",null,{xmlns:Km[0],"xmlns:r":ga.r})],l="",w=t.Sheets[t.SheetNames[e]];null==w&&(w={});var C=w["!ref"]||"A1",M=Gn(C);if(M.e.c>16383||M.e.r>1048575){if(i.WTF)throw new Error("Range "+C+" exceeds format limit A1:XFD1048576");M.e.c=Math.min(M.e.c,16383),M.e.r=Math.min(M.e.c,1048575),C=un(M)}n||(n={}),w["!comments"]=[];var P=[];(function cXt(e,i,t,n,r){var s=!1,o={},l=null;if("xlsx"!==n.bookType&&i.vbaraw){var w=i.SheetNames[t];try{i.Workbook&&(w=i.Workbook.Sheets[t].CodeName||w)}catch{}s=!0,o.codeName=Cd(gn(w))}if(e&&e["!outline"]){var C={summaryBelow:1,summaryRight:1};e["!outline"].above&&(C.summaryBelow=0),e["!outline"].left&&(C.summaryRight=0),l=(l||"")+We("outlinePr",null,C)}!s&&!l||(r[r.length]=We("sheetPr",l,o))})(w,t,e,i,r),r[r.length]=We("dimension",null,{ref:C}),r[r.length]=function _Xt(e,i,t,n){var r={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(r.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),We("sheetViews",We("sheetView",null,r),{})}(0,0,0,t),i.sheetFormat&&(r[r.length]=We("sheetFormatPr",null,{defaultRowHeight:i.sheetFormat.defaultRowHeight||"16",baseColWidth:i.sheetFormat.baseColWidth||"10",outlineLevelRow:i.sheetFormat.outlineLevelRow||"7"})),null!=w["!cols"]&&w["!cols"].length>0&&(r[r.length]=function vXt(e,i){for(var n,t=[""],r=0;r!=i.length;++r)(n=i[r])&&(t[t.length]=We("col",null,gA(r,n)));return t[t.length]="",t.join("")}(0,w["!cols"])),r[o=r.length]="",w["!links"]=[],null!=w["!ref"]&&(l=function SXt(e,i,t,n){var w,W,r=[],s=[],o=Gn(e["!ref"]),l="",C="",M=[],P=0,O=0,L=e["!rows"],U=null!=e["!data"],X={r:C},Z=-1,rt=(((n||{}).Workbook||{}).WBProps||{}).date1904;for(O=o.s.c;O<=o.e.c;++O)M[O]=dn(O);for(P=o.s.r;P<=o.e.r;++P){for(s=[],C=Pn(P),O=o.s.c;O<=o.e.c;++O){w=M[O]+C;var st=U?(e["!data"][P]||[])[O]:e[w];void 0!==st&&null!=(l=TXt(st,w,e,i,0,0,rt))&&s.push(l)}(s.length>0||L&&L[P])&&(X={r:C},L&&L[P]&&((W=L[P]).hidden&&(X.hidden=1),Z=-1,W.hpx?Z=k1(W.hpx):W.hpt&&(Z=W.hpt),Z>-1&&(X.ht=Z,X.customHeight=1),W.level&&(X.outlineLevel=W.level)),r[r.length]=We("row",s.join(""),X))}if(L)for(;P-1&&(X.ht=Z,X.customHeight=1),W.level&&(X.outlineLevel=W.level),r[r.length]=We("row","",X));return r.join("")}(w,i,0,t),l.length>0&&(r[r.length]=l)),r.length>o+1&&(r[r.length]="",r[o]=r[o].replace("/>",">")),w["!protect"]&&(r[r.length]=function hXt(e){var i={sheet:1};return dXt.forEach(function(t){null!=e[t]&&e[t]&&(i[t]="1")}),uXt.forEach(function(t){null!=e[t]&&!e[t]&&(i[t]="0")}),e.password&&(i.password=TN(e.password).toString(16).toUpperCase()),We("sheetProtection",null,i)}(w["!protect"])),null!=w["!autofilter"]&&(r[r.length]=function yXt(e,i,t,n){var r="string"==typeof e.ref?e.ref:un(e.ref);t.Workbook||(t.Workbook={Sheets:[]}),t.Workbook.Names||(t.Workbook.Names=[]);var s=t.Workbook.Names,o=xa(r);o.s.r==o.e.r&&(o.e.r=xa(i["!ref"]).e.r,r=un(o));for(var l=0;l0&&(r[r.length]=function oXt(e){if(0===e.length)return"";for(var i='',t=0;t!=e.length;++t)i+='';return i+""}(w["!merges"]));var L,O=-1,U=-1;return w["!links"].length>0&&(r[r.length]="",w["!links"].forEach(function(X){X[1].Target&&(L={ref:X[0]},"#"!=X[1].Target.charAt(0)&&(U=dr(n,-1,gn(X[1].Target).replace(/#[\s\S]*$/,""),hn.HLINK),L["r:id"]="rId"+U),(O=X[1].Target.indexOf("#"))>-1&&(L.location=gn(X[1].Target.slice(O+1))),X[1].Tooltip&&(L.tooltip=gn(X[1].Tooltip)),L.display=X[1].display,r[r.length]=We("hyperlink",null,L))}),r[r.length]=""),delete w["!links"],null!=w["!margins"]&&(r[r.length]=function pXt(e){return dp(e),We("pageMargins",null,e)}(w["!margins"])),(!i||i.ignoreEC||null==i.ignoreEC)&&(r[r.length]=Wa("ignoredErrors",We("ignoredError",null,{numberStoredAsText:1,sqref:C}))),P.length>0&&(U=dr(n,-1,"../drawings/drawing"+(e+1)+".xml",hn.DRAW),r[r.length]=We("drawing",null,{"r:id":"rId"+U}),w["!drawing"]=P),w["!comments"].length>0&&(U=dr(n,-1,"../drawings/vmlDrawing"+(e+1)+".vml",hn.VML),r[r.length]=We("legacyDrawing",null,{"r:id":"rId"+U}),w["!legacy"]=U),r.length>1&&(r[r.length]="",r[1]=r[1].replace("/>",">")),r.join("")}function MXt(e,i,t,n){var r=function DXt(e,i,t){var n=re(145),r=(t["!rows"]||[])[e]||{};n.write_shift(4,e),n.write_shift(4,0);var s=320;r.hpx?s=20*k1(r.hpx):r.hpt&&(s=20*r.hpt),n.write_shift(2,s),n.write_shift(1,0);var o=0;r.level&&(o|=r.level),r.hidden&&(o|=16),(r.hpx||r.hpt)&&(o|=32),n.write_shift(1,o),n.write_shift(1,0);var l=0,w=n.l;n.l+=4;for(var C={r:e,c:0},M=null!=t["!data"],P=0;P<16;++P)if(!(i.s.c>P+1<<10||i.e.cn.l?n.slice(0,n.l):n}(n,t,i);(r.length>17||(i["!rows"]||[])[n])&&Ee(e,0,r)}var IXt=ep,RXt=g0;function PN(e,i,t){return null==t&&(t=re(9)),Jm(i,t),t.write_shift(1,e.v),t}function FN(e,i,t){return null==t&&(t=re(8)),tp(i,t),t.write_shift(1,e.v),t.write_shift(2,0),t.write_shift(1,0),t}var ujt=ep,hjt=g0,Tet=["left","right","top","bottom","header","footer"];function Mjt(e,i,t,n,r,s,o,l){var w={r:t,c:n};if(i.c&&s["!comments"].push([Tn(w),i.c]),void 0===i.v)return!1;var C="";switch(i.t){case"b":C=i.v?"1":"0";break;case"d":(i=pr(i)).z=i.z||ki[14],i.v=ms(os(i.v,l),l),i.t="n";break;case"n":case"e":C=""+i.v;break;default:C=i.v}switch(w.s=vf(r.cellXfs,i,r),i.l&&s["!links"].push([Tn(w),i.l]),i.t){case"s":case"str":return r.bookSST?(C=RN(r.Strings,null==i.v?"":String(i.v),r.revStrings),w.t="s",w.v=C,o?Ee(e,18,function $Xt(e,i,t){return null==t&&(t=re(8)),tp(i,t),t.write_shift(4,i.v),t}(0,w)):Ee(e,7,function jXt(e,i,t){return null==t&&(t=re(12)),Jm(i,t),t.write_shift(4,i.v),t}(0,w))):(w.t="str",o?Ee(e,17,function ajt(e,i,t){var n=null==e.v?"":String(e.v);return null==t&&(t=re(8+4*n.length)),tp(i,t),ya(n,t),t.length>t.l?t.slice(0,t.l):t}(i,w)):Ee(e,6,function rjt(e,i,t){var n=null==e.v?"":String(e.v);return null==t&&(t=re(12+4*e.v.length)),Jm(i,t),ya(n,t),t.length>t.l?t.slice(0,t.l):t}(i,w))),!0;case"n":return i.v==(0|i.v)&&i.v>-1e3&&i.v<1e3?o?Ee(e,13,function ejt(e,i,t){return null==t&&(t=re(8)),tp(i,t),jq(e.v,t),t}(i,w)):Ee(e,2,function qXt(e,i,t){return null==t&&(t=re(12)),Jm(i,t),jq(e.v,t),t}(i,w)):isNaN(i.v)?o?Ee(e,14,FN({t:"e",v:36},w)):Ee(e,3,PN({t:"e",v:36},w)):isFinite(i.v)?o?Ee(e,16,function ZXt(e,i,t){return null==t&&(t=re(12)),tp(i,t),ip(e.v,t),t}(i,w)):Ee(e,5,function KXt(e,i,t){return null==t&&(t=re(16)),Jm(i,t),ip(e.v,t),t}(i,w)):o?Ee(e,14,FN({t:"e",v:7},w)):Ee(e,3,PN({t:"e",v:7},w)),!0;case"b":return w.t="b",o?Ee(e,15,function GXt(e,i,t){return null==t&&(t=re(5)),tp(i,t),t.write_shift(1,e.v?1:0),t}(i,w)):Ee(e,4,function UXt(e,i,t){return null==t&&(t=re(9)),Jm(i,t),t.write_shift(1,e.v?1:0),t}(i,w)),!0;case"e":return w.t="e",o?Ee(e,14,FN(i,w)):Ee(e,3,PN(i,w)),!0}return o?Ee(e,12,function BXt(e,i,t){return null==t&&(t=re(4)),tp(i,t)}(0,w)):Ee(e,1,function LXt(e,i,t){return null==t&&(t=re(8)),Jm(i,t)}(0,w)),!0}function Vjt(e,i,t,n){var r=po(),s=t.SheetNames[e],o=t.Sheets[s]||{},l=s;try{t&&t.Workbook&&(l=t.Workbook.Sheets[e].CodeName||l)}catch{}var w=Gn(o["!ref"]||"A1");if(w.e.c>16383||w.e.r>1048575){if(i.WTF)throw new Error("Range "+(o["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");w.e.c=Math.min(w.e.c,16383),w.e.r=Math.min(w.e.c,1048575)}return o["!links"]=[],o["!comments"]=[],Ee(r,129),(t.vbaraw||o["!outline"])&&Ee(r,147,function FXt(e,i,t){null==t&&(t=re(84+4*e.length));var n=192;i&&(i.above&&(n&=-65),i.left&&(n&=-129)),t.write_shift(1,n);for(var r=1;r<3;++r)t.write_shift(1,0);return JE({auto:1},t),t.write_shift(-4,-1),t.write_shift(-4,-1),Xq(e,t),t.slice(0,t.l)}(l,o["!outline"])),Ee(r,148,RXt(w)),function Njt(e,i,t){Ee(e,133),Ee(e,137,function Tjt(e,i,t){null==t&&(t=re(30));var n=924;return(((i||{}).Views||[])[0]||{}).RTL&&(n|=32),t.write_shift(2,n),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(4,0),t.write_shift(1,0),t.write_shift(1,0),t.write_shift(2,0),t.write_shift(2,100),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(4,0),t}(0,t)),Ee(e,138),Ee(e,134)}(r,0,t.Workbook),function kjt(e,i){!i||!i["!cols"]||(Ee(e,390),i["!cols"].forEach(function(t,n){t&&Ee(e,60,function yjt(e,i,t){null==t&&(t=re(18));var n=gA(e,i);t.write_shift(-4,e),t.write_shift(-4,e),t.write_shift(4,256*(n.width||10)),t.write_shift(4,0);var r=0;return i.hidden&&(r|=1),"number"==typeof n.width&&(r|=2),i.level&&(r|=i.level<<8),t.write_shift(2,r),t}(n,t))}),Ee(e,391))}(r,o),function Ijt(e,i,t,n,r){var s=Gn(i["!ref"]||"A1"),l="",w=[],C=(((r||{}).Workbook||{}).WBProps||{}).date1904;Ee(e,145);var M=null!=i["!data"],P=s.e.r;i["!rows"]&&(P=Math.max(s.e.r,i["!rows"].length-1));for(var O=s.s.r;O<=P;++O){l=Pn(O),MXt(e,i,s,O);var L=!1;if(O<=s.e.r)for(var U=s.s.c;U<=s.e.c;++U){O===s.s.r&&(w[U]=dn(U));var X=M?(i["!data"][O]||[])[U]:i[w[U]+l];L=!!X&&Mjt(e,X,O,U,n,i,L,C)}}Ee(e,146)}(r,o,0,i,t),function Bjt(e,i){i["!protect"]&&Ee(e,535,function Sjt(e,i){return null==i&&(i=re(66)),i.write_shift(2,e.password?TN(e.password):0),i.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(t){i.write_shift(4,t[1]?null==e[t[0]]||e[t[0]]?0:1:null!=e[t[0]]&&e[t[0]]?0:1)}),i}(i["!protect"]))}(r,o),function Ljt(e,i,t,n){if(i["!autofilter"]){var r=i["!autofilter"],s="string"==typeof r.ref?r.ref:un(r.ref);t.Workbook||(t.Workbook={Sheets:[]}),t.Workbook.Names||(t.Workbook.Names=[]);var o=t.Workbook.Names,l=xa(s);l.s.r==l.e.r&&(l.e.r=xa(i["!ref"]).e.r,s=un(l));for(var w=0;w0){var r=dr(n,-1,"../drawings/vmlDrawing"+(t+1)+".vml",hn.VML);Ee(e,551,aN("rId"+r)),i["!legacy"]=r}}(r,o,e,n),Ee(r,130),r.end()}var ON=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]],Qjt=":][*?/\\".split("");function Det(e,i){try{if(""==e)throw new Error("Sheet name cannot be blank");if(e.length>31)throw new Error("Sheet name cannot exceed 31 chars");if(39==e.charCodeAt(0)||39==e.charCodeAt(e.length-1))throw new Error("Sheet name cannot start or end with apostrophe (')");if("history"==e.toLowerCase())throw new Error("Sheet name cannot be 'History'");Qjt.forEach(function(t){if(-1!=e.indexOf(t))throw new Error("Sheet name cannot contain : \\ / ? * [ ]")})}catch(t){if(i)return!1;throw t}return!0}function eYt(e,i){return i||(i=re(127)),i.write_shift(4,e.Hidden),i.write_shift(4,e.iTabID),aN(e.strRelID,i),ya(e.name.slice(0,31),i),i.length>i.l?i.slice(0,i.l):i}function pYt(e,i){var t=po();return Ee(t,131),Ee(t,128,function cYt(e,i){i||(i=re(127));for(var t=0;4!=t;++t)i.write_shift(4,0);return ya("SheetJS",i),ya(a1.version,i),ya(a1.version,i),ya("7262",i),i.length>i.l?i.slice(0,i.l):i}()),Ee(t,153,function nYt(e,i){i||(i=re(72));var t=0;return e&&(e.date1904&&(t|=1),e.filterPrivacy&&(t|=8)),i.write_shift(4,t),i.write_shift(4,0),Xq(e&&e.CodeName||"ThisWorkbook",i),i.slice(0,i.l)}(e.Workbook&&e.Workbook.WBProps||null)),function uYt(e,i){if(i.Workbook&&i.Workbook.Sheets){for(var t=i.Workbook.Sheets,n=0,r=-1,s=-1;nr||(Ee(e,135),Ee(e,158,function dYt(e,i){return i||(i=re(29)),i.write_shift(-4,0),i.write_shift(-4,460),i.write_shift(4,28800),i.write_shift(4,17600),i.write_shift(4,500),i.write_shift(4,e),i.write_shift(4,e),i.write_shift(1,120),i.length>i.l?i.slice(0,i.l):i}(r)),Ee(e,136))}}(t,e),function lYt(e,i){Ee(e,143);for(var t=0;t!=i.SheetNames.length;++t)Ee(e,156,eYt({Hidden:i.Workbook&&i.Workbook.Sheets&&i.Workbook.Sheets[t]&&i.Workbook.Sheets[t].Hidden||0,iTabID:t+1,strRelID:"rId"+(t+1),name:i.SheetNames[t]}));Ee(e,144)}(t,e),function mYt(e,i){Ee(e,353),Ee(e,357),Ee(e,362,function fYt(e){var i=e.SheetNames.length,t=re(12*i+28);t.write_shift(4,i+2),t.write_shift(4,0),t.write_shift(4,-2),t.write_shift(4,-2),t.write_shift(4,0),t.write_shift(4,-1),t.write_shift(4,-1);for(var n=0;n-1&&(n|=32,r=r.slice(6)),t.write_shift(4,n),t.write_shift(1,0),t.write_shift(4,null==e.Sheet?4294967295:e.Sheet);var s=[t,ya(r),$Wt(e.Ref,i)];if(e.Comment)s.push(T1(e.Comment));else{var o=re(4);o.write_shift(4,4294967295),s.push(o)}return Ns(s)}(t,i))}catch{console.error("Could not serialize defined name "+JSON.stringify(t))}})}(t,e),Ee(t,132),t.end()}function ket(e){return We("NamedRange",null,{"ss:Name":"_xlnm."==e.Name.slice(0,6)?e.Name.slice(6):e.Name,"ss:RefersTo":"="+fA(e.Ref,{r:0,c:0})})}function GYt(e,i,t,n,r,s,o){if(!e||null==e.v&&null==e.f)return"";var l={};if(e.f&&(l["ss:Formula"]="="+gn(fA(e.f,o))),e.F&&e.F.slice(0,i.length)==i){var w=vr(e.F.slice(i.length+1));l["ss:ArrayRange"]="RC:R"+(w.r==o.r?"":"["+(w.r-o.r)+"]")+"C"+(w.c==o.c?"":"["+(w.c-o.c)+"]")}if(e.l&&e.l.Target&&(l["ss:HRef"]=gn(e.l.Target),e.l.Tooltip&&(l["x:HRefScreenTip"]=gn(e.l.Tooltip))),t["!merges"])for(var C=t["!merges"],M=0;M!=C.length;++M)C[M].s.c!=o.c||C[M].s.r!=o.r||(C[M].e.c>C[M].s.c&&(l["ss:MergeAcross"]=C[M].e.c-C[M].s.c),C[M].e.r>C[M].s.r&&(l["ss:MergeDown"]=C[M].e.r-C[M].s.r));var P="",O="";switch(e.t){case"z":if(!n.sheetStubs)return"";break;case"n":P="Number",O=String(e.v);break;case"b":P="Boolean",O=e.v?"1":"0";break;case"e":P="Error",O=ec[e.v];break;case"d":P="DateTime",O=new Date(e.v).toISOString(),null==e.z&&(e.z=e.z||ki[14]);break;case"s":P="String",O=function t9t(e){return(e+"").replace(jL,function(t){return XL[t]}).replace(wq,function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"})}(e.v||"")}var L=vf(n.cellXfs,e,n);l["ss:StyleID"]="s"+(21+L),l["ss:Index"]=o.c+1;var X="z"==e.t?"":''+(null!=e.v?O:"")+"";return(e.c||[]).length>0&&(X+=function zYt(e){return e.map(function(i){var t=function e9t(e){return e.replace(/(\r\n|[\r\n])/g," ")}(i.t||""),n=We("ss:Data",t,{xmlns:"http://www.w3.org/TR/REC-html40"}),r={};return i.a&&(r["ss:Author"]=i.a),e.hidden||(r["ss:ShowAlways"]="1"),We("Comment",n,r)}).join("")}(e.c)),We("Cell",X,l)}function HYt(e,i){var t='"}function XYt(e,i,t){var n=[],s=t.Sheets[t.SheetNames[e]],o=s?function VYt(e,i,t,n){if(!e||!((n||{}).Workbook||{}).Names)return"";for(var r=n.Workbook.Names,s=[],o=0;o0&&n.push(""+o+""),o=s?function WYt(e,i,t,n){if(!e["!ref"])return"";var r=Gn(e["!ref"]),s=e["!merges"]||[],o=0,l=[];e["!cols"]&&e["!cols"].forEach(function(W,Z){pf(W);var rt=!!W.width,st=gA(Z,W),vt={"ss:Index":Z+1};rt&&(vt["ss:Width"]=I1(st.width)),W.hidden&&(vt["ss:Hidden"]="1"),l.push(We("Column",null,vt))});for(var w=null!=e["!data"],C=r.s.r;C<=r.e.r;++C){for(var M=[HYt(C,(e["!rows"]||[])[C])],P=r.s.c;P<=r.e.c;++P){var O=!1;for(o=0;o!=s.length;++o)if(!(s[o].s.c>P||s[o].s.r>C||s[o].e.c"),M.length>2&&l.push(M.join(""))}return l.join("")}(s,i):"",o.length>0&&n.push(""+o+"
"),n.push(function UYt(e,i,t,n){if(!e)return"";var r=[];if(e["!margins"]&&(r.push(""),e["!margins"].header&&r.push(We("Header",null,{"x:Margin":e["!margins"].header})),e["!margins"].footer&&r.push(We("Footer",null,{"x:Margin":e["!margins"].footer})),r.push(We("PageMargins",null,{"x:Bottom":e["!margins"].bottom||"0.75","x:Left":e["!margins"].left||"0.7","x:Right":e["!margins"].right||"0.7","x:Top":e["!margins"].top||"0.75"})),r.push("")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[t])if(n.Workbook.Sheets[t].Hidden)r.push(We("Visible",1==n.Workbook.Sheets[t].Hidden?"SheetHidden":"SheetVeryHidden",{}));else{for(var s=0;s")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&r.push(""),e["!protect"]&&(r.push(Wa("ProtectContents","True")),e["!protect"].objects&&r.push(Wa("ProtectObjects","True")),e["!protect"].scenarios&&r.push(Wa("ProtectScenarios","True")),null==e["!protect"].selectLockedCells||e["!protect"].selectLockedCells?null!=e["!protect"].selectUnlockedCells&&!e["!protect"].selectUnlockedCells&&r.push(Wa("EnableSelection","UnlockedCells")):r.push(Wa("EnableSelection","NoSelection")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(o){e["!protect"][o[0]]&&r.push("<"+o[1]+"/>")})),0==r.length?"":We("WorksheetOptions",r.join(""),{xmlns:Il.x})}(s,0,e,t)),s["!autofilter"]&&n.push(''),n.join("")}function jYt(e,i){i||(i={}),e.SSF||(e.SSF=pr(ki)),e.SSF&&(u0(),h1(e.SSF),i.revssf=WE(e.SSF),i.revssf[e.SSF[65535]]=0,i.ssf=e.SSF,i.cellXfs=[],vf(i.cellXfs,{},{revssf:{General:0}}));var t=[];t.push(function OYt(e,i){var t=[];return e.Props&&t.push(function Z9t(e,i){var t=[];return Jr(mN).map(function(n){for(var r=0;r'+r.join("")+""}(e.Props,e.Custprops)),t.join("")}(e,i)),t.push(function LYt(e){return(((e||{}).Workbook||{}).WBProps||{}).date1904?'':""}(e)),t.push(""),t.push("");for(var n=0;n'];return i.cellXfs.forEach(function(n,r){var s=[];s.push(We("NumberFormat",null,{"ss:Format":gn(ki[n.numFmtId])}));var o={"ss:ID":"s"+(21+r)};t.push(We("Style",s.join(""),o))}),We("Styles",t.join(""))}(0,i),t[3]=function BYt(e){if(!((e||{}).Workbook||{}).Names)return"";for(var i=e.Workbook.Names,t=[],n=0;n0&&(n.family=l);var w=e.read_shift(1);switch(w>0&&(n.charset=w),e.l++,n.color=function D9t(e){var i={},n=e.read_shift(1)>>>1,r=e.read_shift(1),s=e.read_shift(2,"i"),o=e.read_shift(1),l=e.read_shift(1),w=e.read_shift(1);switch(e.l++,n){case 0:i.auto=1;break;case 1:i.index=r;var C=np[r];C&&(i.rgb=M1(C));break;case 2:i.rgb=M1([o,l,w]);break;case 3:i.theme=r}return 0!=s&&(i.tint=s>0?s/32767:s/32768),i}(e),e.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor"}return n.name=go(e),n}},44:{f:function tHt(e,i){return[e.read_shift(2),go(e)]}},45:{f:sHt},46:{f:oHt},47:{f:function aHt(e,i){var t=e.l+i,n=e.read_shift(2),r=e.read_shift(2);return e.l=t,{ixfe:n,numFmtId:r}}},48:{},49:{f:function y9t(e){return e.read_shift(4,"i")}},50:{},51:{f:function OHt(e){for(var i=[],t=e.read_shift(4);t-- >0;)i.push([e.read_shift(4),e.read_shift(4)]);return i}},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:function Vtt(e,i,t){if(!t.cellStyles)return mo(e,i);var n=t&&t.biff>=12?4:2,r=e.read_shift(n),s=e.read_shift(n),o=e.read_shift(n),l=e.read_shift(n),w=e.read_shift(2);2==n&&(e.l+=2);var C={s:r,e:s,w:o,ixfe:l,flags:w};return(t.biff>=5||!t.biff)&&(C.level=w>>8&7),C}},62:{f:function ijt(e){return[tc(e),rN(e),"is"]}},63:{f:function XHt(e){var i={};i.i=e.read_shift(4);var t={};t.r=e.read_shift(4),t.c=e.read_shift(4),i.r=Tn(t);var n=e.read_shift(1);return 2&n&&(i.l="1"),8&n&&(i.a="1"),i}},64:{f:function Ejt(){}},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:mo,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:function _jt(e){var i=e.read_shift(2);return e.l+=28,{RTL:32&i}}},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:function PXt(e,i){var t={},n=e[e.l];return++e.l,t.above=!(64&n),t.left=!(128&n),e.l+=18,t.name=S9t(e,i-19),t}},148:{f:IXt,p:16},151:{f:function gjt(){}},152:{},153:{f:function iYt(e,i){var t={},n=e.read_shift(4);t.defaultThemeVersion=e.read_shift(4);var r=i>8?go(e):"";return r.length>0&&(t.CodeName=r),t.autoCompressPictures=!!(65536&n),t.backupFile=!!(64&n),t.checkCompatibility=!!(4096&n),t.date1904=!!(1&n),t.filterPrivacy=!!(8&n),t.hidePivotFieldList=!!(1024&n),t.promptedSolutions=!!(16&n),t.publishItems=!!(2048&n),t.refreshAllConnections=!!(262144&n),t.saveExternalLinkValues=!!(128&n),t.showBorderUnselectedTables=!!(4&n),t.showInkAnnotation=!!(32&n),t.showObjects=["all","placeholders","none"][n>>13&3],t.showPivotChartFilter=!!(32768&n),t.updateLinks=["userSet","never","always"][n>>8&3],t}},154:{},155:{},156:{f:function tYt(e,i){var t={};return t.Hidden=e.read_shift(4),t.iTabID=e.read_shift(4),t.strRelID=sN(e,i-8),t.name=go(e),t}},157:{},158:{},159:{T:1,f:function fGt(e){return[e.read_shift(4),e.read_shift(4)]}},160:{T:-1},161:{T:1,f:ep},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:ujt},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:function PHt(e,i){return{flags:e.read_shift(4),version:e.read_shift(4),name:go(e)}}},336:{T:-1},337:{f:function BHt(e){return e.l+=4,0!=e.read_shift(4)},T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:sN},357:{},358:{},359:{},360:{T:1},361:{},362:{f:function Ltt(e,i,t){if(t.biff<8||!(t.biff>8)&&i==e[e.l]+(3==e[e.l+1]?1:0)+1)return function Ntt(e,i,t){3==e[e.l+1]&&e[e.l]++;var n=x0(e,0,t);return 3==n.charCodeAt(0)?n.slice(1):n}(e,0,t);for(var n=[],r=e.l+i,s=e.read_shift(t.biff>8?4:2);0!=s--;)n.push(yUt(e,0,t));if(e.l!=r)throw new Error("Bad ExternSheet: "+e.l+" != "+r);return n}},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:function vjt(e,i,t){var n=e.l+i,r=Yq(e),s=e.read_shift(1),o=[r];if(o[2]=s,t.cellFormula){var l=OWt(e,n-e.l,t);o[1]=l}else e.l=n;return o}},427:{f:function xjt(e,i,t){var n=e.l+i,s=[ep(e,16)];if(t.cellFormula){var o=NWt(e,n-e.l,t);s[1]=o,e.l=n}else e.l=n;return s}},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:function bjt(e){var i={};return Tet.forEach(function(t){i[t]=vo(e)}),i}},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:function kXt(){}},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:function mjt(e,i){var t=e.l+i,n=ep(e,16),r=KE(e),s=go(e),o=go(e),l=go(e);e.l=t;var w={rfx:n,relId:r,loc:s,display:l};return o&&(w.Tooltip=o),w}},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:sN},551:{f:KE},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:n7t},633:{T:1},634:{T:-1},635:{T:1,f:function e7t(e){var i={};i.iauthor=e.read_shift(4);var t=ep(e,16);return i.rfx=t.s,i.ref=Tn(t.s),e.l+=16,i}},636:{T:-1},637:{f:T9t},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:function Hjt(e,i){return e.l+=10,{name:go(e)}}},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:function Ajt(){}},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function Re(e,i,t,n){var r=i;if(!isNaN(r)){var s=n||(t||[]).length||0,o=e.next(4);o.write_shift(2,r),o.write_shift(2,s),s>0&&tN(t)&&e.push(t)}}function UN(e,i,t,n){var r=re(9);return D1(r,e,i),btt(t,n||"b",r),r}function Pet(e,i){i.forEach(function(t){var n=t[0].map(function(s){return s.t}).join("");if(n.length<=2048)return Re(e,28,bN(n,t[1],t[2]));Re(e,28,bN(n.slice(0,2048),t[1],t[2],n.length));for(var r=2048;r=0&&w<65536?Re(e,2,function Qzt(e,i,t,n,r){var s=re(9);return D1(s,e,i,n||0,r||0),s.write_shift(2,t),s}(t,n,w,l,o)):isNaN(w)?Re(e,5,UN(t,n,36,"e")):isFinite(w)?Re(e,3,function Yzt(e,i,t,n,r){var s=re(15);return D1(s,e,i,n||0,r||0),s.write_shift(8,t,"f"),s}(t,n,w,l,o)):Re(e,5,UN(t,n,7,"e")));case"b":case"e":return void Re(e,5,UN(t,n,i.v,i.t));case"s":case"str":return void Re(e,4,function e$t(e,i,t){var n=re(8+2*t.length);return D1(n,e,i),n.write_shift(1,t.length),n.write_shift(t.length,t,"sbcs"),n.l255||L.e.r>=U){if(i.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:IV16384");L.e.c=Math.min(L.e.c,255),L.e.r=Math.min(L.e.c,U-1)}Re(n,2057,xN(0,16,i)),Re(n,13,ic(1)),Re(n,12,ic(100)),Re(n,15,xo(!0)),Re(n,17,xo(!1)),Re(n,16,ip(.001)),Re(n,95,xo(!0)),Re(n,42,xo(!1)),Re(n,43,xo(!1)),Re(n,130,ic(1)),Re(n,128,function hzt(e){var i=re(8);return i.write_shift(4,0),i.write_shift(2,e[0]?e[0]+1:0),i.write_shift(2,e[1]?e[1]+1:0),i}([0,0])),Re(n,131,xo(!1)),Re(n,132,xo(!1)),C&&function h$t(e,i){if(i){var t=0;i.forEach(function(n,r){++t<=256&&n&&Re(e,125,function Nzt(e,i){var t=re(12);t.write_shift(2,i),t.write_shift(2,i),t.write_shift(2,256*e.width),t.write_shift(2,0);var n=0;return e.hidden&&(n|=1),t.write_shift(1,n),t.write_shift(1,n=e.level||0),t.write_shift(2,0),t}(gA(r,n),r))})}}(n,s["!cols"]),Re(n,512,function tzt(e,i){var t=8!=i.biff&&i.biff?2:4,n=re(2*t+6);return n.write_shift(t,e.s.r),n.write_shift(t,e.e.r+1),n.write_shift(2,e.s.c),n.write_shift(2,e.e.c+1),n.write_shift(2,0),n}(L,i));var X=(((t||{}).Workbook||{}).WBProps||{}).date1904;C&&(s["!links"]=[]);for(var W=L.s.c;W<=L.e.c;++W)O[W]=dn(W);for(var Z=[],rt=[],st=L.s.r;st<=L.e.r;++st)for(w&&(rt=s["!data"][st]||[]),P=Pn(st),W=L.s.c;W<=L.e.c;++W){M=O[W]+P;var vt=w?rt[W]:s[M];vt&&(f$t(n,vt,st,W,i,X),C&&vt.l&&s["!links"].push([M,vt.l]),vt.c&&Z.push([vt.c,st,W]))}var _t=l.CodeName||l.name||r;return C?function a$t(e,i){var o,t=[],n=0,r=po(),s=kc;i.forEach(function(w,C){var M="",P=w[0].map(function(st){return st.a&&!M&&(M=st.a),st.t}).join("");++kc;var O=re(150);O.write_shift(2,15),O.write_shift(2,61444),O.write_shift(4,150),O.write_shift(2,3234),O.write_shift(2,61450),O.write_shift(4,8),O.write_shift(4,kc),O.write_shift(4,2560),O.write_shift(2,227),O.write_shift(2,61451),O.write_shift(4,84),O.write_shift(2,128),O.write_shift(4,0),O.write_shift(2,139),O.write_shift(4,2),O.write_shift(2,191),O.write_shift(4,524296),O.write_shift(2,344),O.l+=4,O.write_shift(2,385),O.write_shift(4,134217808),O.write_shift(2,387),O.write_shift(4,134217808),O.write_shift(2,389),O.write_shift(4,268435700),O.write_shift(2,447),O.write_shift(4,1048592),O.write_shift(2,448),O.write_shift(4,134217809),O.write_shift(2,451),O.write_shift(4,268435700),O.write_shift(2,513),O.write_shift(4,134217809),O.write_shift(2,515),O.write_shift(4,268435700),O.write_shift(2,575),O.write_shift(4,196609),O.write_shift(2,959),O.write_shift(4,131072|(w[0].hidden?2:0)),O.l+=2,O.write_shift(2,61456),O.write_shift(4,18),O.write_shift(2,3),O.write_shift(2,w[2]+2),O.l+=2,O.write_shift(2,w[1]+1),O.l+=2,O.write_shift(2,w[2]+4),O.l+=2,O.write_shift(2,w[1]+5),O.l+=2,O.l+=2,O.write_shift(2,61457),O.l+=4,O.l=150,0==C?o=O:Re(r,236,O),n+=150;var L=re(52);L.write_shift(2,21),L.write_shift(2,18),L.write_shift(2,25),L.write_shift(2,kc),L.write_shift(2,0),L.l=22,L.write_shift(2,13),L.write_shift(2,22),L.write_shift(4,1651663474),L.write_shift(4,2503426821),L.write_shift(4,2150634280),L.write_shift(4,1768515844+256*kc),L.write_shift(2,0),L.write_shift(4,0),L.l+=4,Re(r,93,L);var U=re(8);U.l+=2,U.write_shift(2,61453),U.l+=4,Re(r,236,U),n+=8;var X=re(18);X.write_shift(2,18),X.l+=8,X.write_shift(2,P.length),X.write_shift(2,16),X.l+=4,Re(r,438,X);var W=re(1+P.length);W.write_shift(1,0),W.write_shift(P.length,P,"sbcs"),Re(r,60,W);var Z=re(16);Z.l+=8,Z.write_shift(2,P.length),Z.l+=6,Re(r,60,Z);var rt=re(12+M.length);rt.write_shift(2,w[1]),rt.write_shift(2,w[2]),rt.write_shift(2,0|(w[0].hidden?0:2)),rt.write_shift(2,kc),rt.write_shift(2,M.length),rt.write_shift(1,0),rt.write_shift(M.length,M,"sbcs"),rt.l++,t.push(rt)});var l=re(80);l.write_shift(2,15),l.write_shift(2,61442),l.write_shift(4,n+l.length-8),l.write_shift(2,16),l.write_shift(2,61448),l.write_shift(4,8),l.write_shift(4,i.length+1),l.write_shift(4,kc),l.write_shift(2,15),l.write_shift(2,61443),l.write_shift(4,n+48),l.write_shift(2,15),l.write_shift(2,61444),l.write_shift(4,40),l.write_shift(2,1),l.write_shift(2,61449),l.write_shift(4,16),l.l+=16,l.write_shift(2,2),l.write_shift(2,61450),l.write_shift(4,8),l.write_shift(4,s),l.write_shift(4,5),Re(e,236,o?Ns([l,o]):l),e.push(r.end()),t.forEach(function(w){Re(e,28,w)}),nc.push([s,i.length+1,kc]),++kc}(n,Z):Pet(n,Z),C&&Re(n,574,function zUt(e){var i=re(18),t=1718;return e&&e.RTL&&(t|=64),i.write_shift(2,t),i.write_shift(4,0),i.write_shift(4,64),i.write_shift(4,0),i.write_shift(4,0),i}((o.Views||[])[0])),C&&(s["!merges"]||[]).length&&Re(n,229,function Tzt(e){var i=re(2+8*e.length);i.write_shift(2,e.length);for(var t=0;t255&&typeof console<"u"&&console.error&&console.error("Worksheet '"+e.SheetNames[t]+"' extends beyond column IV (255). Data may be lost.")}var s=i||{};switch(s.biff||2){case 8:case 5:return function g$t(e,i){var t=i||{},n=[];e&&!e.SSF&&(e.SSF=pr(ki)),e&&e.SSF&&(u0(),h1(e.SSF),t.revssf=WE(e.SSF),t.revssf[e.SSF[65535]]=0,t.ssf=e.SSF),kc=1,nc=[],t.Strings=[],t.Strings.Count=0,t.Strings.Unique=0,YN(t),t.cellXfs=[],vf(t.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={});for(var r=0;r255||o.e.r>16383){if(n.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");o.e.c=Math.min(o.e.c,255),o.e.r=Math.min(o.e.c,16383)}for(var C=(((r||{}).Workbook||{}).WBProps||{}).date1904,M=[],P=[],O=o.s.c;O<=o.e.c;++O)w[O]=dn(O);for(var L=o.s.r;L<=o.e.r;++L)for(s&&(M=i["!data"][L]||[]),l=Pn(L),O=o.s.c;O<=o.e.c;++O){var U=s?M[O]:i[w[O]+l];U&&(i$t(e,U,L,O,n,C),U.c&&P.push([U.c,L,O]))}Pet(e,P)}(o,e.Sheets[e.SheetNames[r]],0,t,e),t._BIFF2FmtTable.forEach(function(l){t.biff<=3?Re(n,30,function JUt(e){var i=re(1+e.length);return i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i}(l)):Re(n,1054,function qUt(e){var i=re(3+e.length);return i.l+=2,i.write_shift(1,e.length),i.write_shift(e.length,e,"sbcs"),i}(l))}),t.cellXfs.forEach(function(l){switch(t.biff){case 2:Re(n,67,function ozt(e){var i=re(4);return i.l+=2,i.write_shift(1,e.numFmtId),i.l++,i}(l));break;case 3:Re(n,579,ktt(l));break;case 4:Re(n,1091,lzt(l))}}),delete t._BIFF2FmtTable,delete t.cellXfs,delete t._Fonts,n.push(o.end()),Re(n,10),n.end()}(e,i)}throw new Error("invalid type "+s.bookType+" for BIFF")}function Let(e,i,t,n){for(var r=e["!merges"]||[],s=[],o={},l=null!=e["!data"],w=i.s.c;w<=i.e.c;++w){for(var C=0,M=0,P=0;Pt||r[P].s.c>w||r[P].e.r1&&(o.rowspan=C),M>1&&(o.colspan=M),n.editable?U=''+U+"":L&&(o["data-t"]=L&&L.t||"z",null!=L.v&&(o["data-v"]=g1(L.v instanceof Date?L.v.toISOString():L.v)),null!=L.z&&(o["data-z"]=L.z),L.l&&"#"!=(L.l.Target||"#").charAt(0)&&(U=''+U+"")),o.id=(n.id||"sjs")+"-"+O,s.push(We("td",U,o))}}return""+s.join("")+""}var Net='SheetJS Table Export',Bet="";function Uet(e,i){var t=i||{},r=null!=t.footer?t.footer:Bet,s=[null!=t.header?t.header:Net],o=xa(e["!ref"]||"A1");if(s.push(function Vet(e,i,t){return[].join("")+""}(0,0,t)),e["!ref"])for(var l=o.s.r;l<=o.e.r;++l)s.push(Let(e,o,l,t));return s.push(""+r),s.join("")}var w$t=function(){var e=["",'',"",'',"",'',"",""].join(""),i=""+e+"";return function(){return Bs+i}}();function _$t(e,i){var t="number",n="",r={"style:name":i},s="",o=0;t:if((e=e.replace(/"[$]"/g,"$")).indexOf(";")>-1&&(console.error("Unsupported ODS Style Map exported. Using first branch of "+e),e=e.slice(0,e.indexOf(";"))),"@"!=e){if(e.indexOf(/\$/)>-1&&(t="currency"),'"'==e[o]){for(s="";'"'!=e[++o]||'"'==e[++o];)s+=e[o];"*"==e[1+--o]?(o++,n+=""+gn(s.replace(/""/g,'"'))+""):n+=""+gn(s.replace(/""/g,'"'))+"",e=e.slice(o+1),o=0}var l=e.match(/# (\?+)\/(\?+)/);if(l)n+=We("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":l[1].length,"number:max-denominator-value":Math.max(+l[1].replace(/./g,"9"),+l[2].replace(/./g,"9"))});else if(l=e.match(/# (\?+)\/(\d+)/))n+=We("number:fraction",null,{"number:min-integer-digits":0,"number:min-numerator-digits":l[1].length,"number:denominator-value":+l[2]});else if(l=e.match(/\b(\d+)(|\.\d+)%/))t="percentage",n+=We("number:number",null,{"number:decimal-places":l[2]&&l.length-1||0,"number:min-decimal-places":l[2]&&l.length-1||0,"number:min-integer-digits":l[1].length})+"%";else{var w=!1;if(["y","m","d"].indexOf(e[0])>-1){t="date";e:for(;o";break;case"yyy":case"yyyy":n+='';break;case"mmmmm":console.error("ODS has no equivalent of format |mmmmm|");case"m":case"mm":case"mmm":case"mmmm":n+='';break;case"d":case"dd":n+='';break;case"ddd":case"dddd":n+=''}break;case'"':for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+gn(s.slice(1).replace(/""/g,'"'))+"";break;case"\\":n+=""+gn(s=e[++o])+"";break;case"/":case":":n+=""+gn(s)+"";break;default:console.error("unrecognized character "+s+" in ODF format "+e)}if(!w)break t;e=e.slice(o+1),o=0}if(e.match(/^\[?[hms]/))for("number"==t&&(t="time"),e.match(/\[/)&&(e=e.replace(/[\[\]]/g,""),r["number:truncate-on-overflow"]="false");o';break;case"m":case"mm":n+='';break;case"s":case"ss":if("."==e[o+1])do{s+=e[o+1],++o}while("0"==e[o+1]);n+='"}break;case'"':for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+gn(s.slice(1).replace(/""/g,'"'))+"";break;case"/":case":":n+=""+gn(s)+"";break;case"a":if("a/p"==e.slice(o,o+3).toLowerCase()){n+="",o+=2;break}if("am/pm"==e.slice(o,o+5).toLowerCase()){n+="",o+=4;break}default:console.error("unrecognized character "+s+" in ODF format "+e)}else{if(e.indexOf(/\$/)>-1&&(t="currency"),"$"==e[0]&&(n+='$',e=e.slice(1),o=0),'"'==e[o=0]){for(;'"'!=e[++o]||'"'==e[++o];)s+=e[o];"*"==e[1+--o]?(o++,n+=""+gn(s.replace(/""/g,'"'))+""):n+=""+gn(s.replace(/""/g,'"'))+"",e=e.slice(o+1),o=0}var M=e.match(/([#0][0#,]*)(\.[0#]*|)(E[+]?0*|)/i);if(M&&M[0]){var P=M[1].replace(/,/g,"");n+="-1?' number:grouping="true"':"")+(M[2]&&' number:decimal-places="'+(M[2].length-1)+'"'||' number:decimal-places="0"')+(M[3]&&M[3].indexOf("+")>-1?' number:forced-exponent-sign="true"':"")+(M[3]?' number:min-exponent-digits="'+M[3].match(/0+/)[0].length+'"':"")+">",o=M.index+M[0].length}else console.error("Could not find numeric part of "+e);if('"'==e[o]){for(s="";'"'!=e[++o]||'"'==e[++o];)s+=e[o];--o,n+=""+gn(s.replace(/""/g,'"'))+""}}}}else t="text",n="";return n?We("number:"+t+"-style",n,r):(console.error("Could not generate ODS number format for |"+e+"|"),"")}function $et(e,i,t){for(var n=[],r=0;r\n"+n.map(function(o){var l=(-1==t?"$":"")+yet(o.Ref);return" "+We("table:named-range",null,{"table:name":o.Name,"table:cell-range-address":l,"table:base-cell-address":l.replace(/[\.][^\.]*$/,".$A$1")})}).join("\n")+"\n \n":""}var Qet=function(){var e=function(r,s){return gn(r).replace(/ +/g,function(o){return''}).replace(/\t/g,"").replace(/\n/g,s?"":"").replace(/^ /,"").replace(/ $/,"")},i=" \n",t=function(r,s,o,l,w,C){var M=[];M.push(' \n');var P=0,O=0,L=xa(r["!ref"]||"A1"),U=r["!merges"]||[],X=0,W=null!=r["!data"];if(r["!cols"])for(O=0;O<=L.e.c;++O)M.push(" \n");var rt=r["!rows"]||[];for(P=0;P\n");for(;P<=L.e.r;++P){for(M.push(" \n"),O=0;OO||U[X].s.r>P||U[X].e.c\n");else{var Mt=Tn({r:P,c:O}),ft=W?(r["!data"][P]||[])[O]:r[Mt];if(ft&&ft.f&&(vt["table:formula"]=gn(ZWt(ft.f)),ft.F&&ft.F.slice(0,Mt.length)==Mt)){var dt=xa(ft.F);vt["table:number-matrix-columns-spanned"]=dt.e.c-dt.s.c+1,vt["table:number-matrix-rows-spanned"]=dt.e.r-dt.s.r+1}if(ft){switch(ft.t){case"b":_t=ft.v?"TRUE":"FALSE",vt["office:value-type"]="boolean",vt["office:boolean-value"]=ft.v?"true":"false";break;case"n":_t=ft.w||String(ft.v||0),vt["office:value-type"]="float",vt["office:value"]=ft.v||0;break;case"s":case"str":_t=null==ft.v?"":ft.v,vt["office:value-type"]="string";break;case"d":_t=ft.w||os(ft.v,C).toISOString(),vt["office:value-type"]="date",vt["office:date-value"]=os(ft.v,C).toISOString(),vt["table:style-name"]="ce1";break;default:M.push(i);continue}var pt=e(_t);if(ft.l&&ft.l.Target){var bt=ft.l.Target;"#"!=(bt="#"==bt.charAt(0)?"#"+yet(bt.slice(1)):bt).charAt(0)&&!bt.match(/^\w+:/)&&(bt="../"+bt),pt=We("text:a",pt,{"xlink:href":bt.replace(/&/g,"&")})}w[ft.z]&&(vt["table:style-name"]="ce"+w[ft.z].slice(1));var Tt=We("text:p",pt,{});if(ft.c){for(var Et="",Dt="",Le={},ge=0;ge"+e(ft.c[ge].t)+"";ft.c.hidden||(Le["office:display"]=!0),Tt=We("office:annotation",Dt,Le)+Tt}M.push(" "+We("table:table-cell",Tt,vt)+"\n")}else M.push(i)}}M.push(" \n")}return(s.Workbook||{}).Names&&M.push($et(s.Workbook.Names,0,o)),M.push(" \n"),M.join("")};return function(s,o){var l=[Bs],w=v1({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),C=v1({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});"fods"==o.bookType?(l.push("\n"),l.push(ttt().replace(/]*?>/,"").replace(/<\/office:document-meta>/,"")+"\n")):l.push("\n");var M=function(r,s){r.push(" \n");var o=0;s.SheetNames.map(function(M){return s.Sheets[M]}).forEach(function(M){if(M&&M["!cols"])for(var P=0;P\n'),r.push(' \n'),r.push(" \n"),++o}});var l=0;s.SheetNames.map(function(M){return s.Sheets[M]}).forEach(function(M){if(M&&M["!rows"])for(var P=0;P\n'),r.push(' \n'),r.push(" \n"),++l}}),r.push(' \n'),r.push(' \n'),r.push(" \n"),r.push(' \n'),r.push(' \n'),r.push(" /\n"),r.push(' \n'),r.push(" /\n"),r.push(" \n"),r.push(" \n");var w={},C=69;return s.SheetNames.map(function(M){return s.Sheets[M]}).forEach(function(M){if(M){var P=null!=M["!data"];if(M["!ref"])for(var O=xa(M["!ref"]),L=0;L<=O.e.r;++L)for(var U=0;U<=O.e.c;++U){var X=P?(M["!data"][L]||[])[U]:M[Tn({r:L,c:U})];if(X&&X.z&&"general"!=X.z.toLowerCase()&&!w[X.z]){var W=_$t(X.z,"N"+C);W&&(w[X.z]="N"+C,++C,r.push(W+"\n"))}}}}),r.push(' \n'),Jr(w).forEach(function(M){r.push('\n')}),r.push(" \n"),w}(l,s);l.push(" \n"),l.push(" \n"),((s.Workbook||{}).WBProps||{}).date1904&&l.push(' \n \n \n');for(var P=0;P!=s.SheetNames.length;++P)l.push(t(s.Sheets[s.SheetNames[P]],s,P,0,M,((s.Workbook||{}).WBProps||{}).date1904));return(s.Workbook||{}).Names&&l.push($et(s.Workbook.Names,0,-1)),l.push(" \n"),l.push(" \n"),l.push("fods"==o.bookType?"":""),l.join("")}}();function Ket(e,i){if("fods"==i.bookType)return Qet(e,i);var t=WL(),n="",r=[],s=[];return cn(t,n="mimetype","application/vnd.oasis.opendocument.spreadsheet"),cn(t,n="content.xml",Qet(e,i)),r.push([n,"text/xml"]),s.push([n,"ContentFile"]),cn(t,n="styles.xml",w$t(e,i)),r.push([n,"text/xml"]),s.push([n,"StylesFile"]),cn(t,n="meta.xml",Bs+ttt()),r.push([n,"text/xml"]),s.push([n,"MetadataFile"]),cn(t,n="manifest.rdf",function j9t(e){var i=[Bs];i.push('\n');for(var t=0;t!=e.length;++t)i.push(qq(e[t][0],e[t][1])),i.push(X9t("",e[t][0]));return i.push(qq("","Document","pkg")),i.push(""),i.join("")}(s)),r.push([n,"application/rdf+xml"]),cn(t,n="META-INF/manifest.xml",function W9t(e){var i=[Bs];i.push('\n'),i.push(' \n');for(var t=0;t\n');return i.push(""),i.join("")}(r)),t}var Us=function(){try{return typeof Uint8Array>"u"||typeof Uint8Array.prototype.subarray>"u"?"slice":typeof Buffer<"u"?typeof Buffer.prototype.subarray>"u"?"slice":("function"==typeof Buffer.from?Buffer.from([72,62]):new Buffer([72,62]))instanceof Uint8Array?"subarray":"slice":"subarray"}catch{return"slice"}}();function Wu(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Pc(e){return typeof TextDecoder<"u"?(new TextDecoder).decode(e):gr(wd(e))}function Go(e){return typeof TextEncoder<"u"?(new TextEncoder).encode(e):Vo(Cd(e))}function xf(e){for(var i=0,t=0;t=128&&(n|=(127&e[t])<<7,e[t++]<128||(n|=(127&e[t])<<14,e[t++]<128)||(n|=(127&e[t])<<21,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,28),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,35),++t,e[t++]<128)||(n+=(127&e[t])*Math.pow(2,42),++t,e[t++]<128)))break t;return i.l=t,n}function Si(e){var i=new Uint8Array(7);i[0]=127&e;var t=1;t:if(e>127){if(i[t-1]|=128,i[t]=e>>7&127,++t,e<=16383||(i[t-1]|=128,i[t]=e>>14&127,++t,e<=2097151)||(i[t-1]|=128,i[t]=e>>21&127,++t,e<=268435455)||(i[t-1]|=128,i[t]=e/256>>>21&127,++t,e<=34359738367)||(i[t-1]|=128,i[t]=e/65536>>>21&127,++t,e<=4398046511103))break t;i[t-1]|=128,i[t]=e/16777216>>>21&127,++t}return i[Us](0,t)}function Zet(e){for(var i={l:0},t=[];i.l=128;);o=e[Us](t.l,l),t.l=l;break;case 1:o=e[Us](l,l+8),t.l=l+8;break;case 2:var w=H1(e,t);o=e[Us](t.l,t.l+w),t.l+=w;break;case 5:o=e[Us](l,l+4),t.l=l+4;break;default:throw new Error("PB Type ".concat(s," for Field ").concat(r," at offset ").concat(n))}var C={data:o,type:s};null==i[r]&&(i[r]=[]),i[r].push(C)}return i}function Ri(e){var i=[];return e.forEach(function(t,n){0!=n&&t.forEach(function(r){r.data&&(i.push(Si(8*n+r.type)),2==r.type&&i.push(Si(r.data.length)),i.push(r.data))})}),xf(i)}function up(e,i){return e?.map(function(t){return i(t.data)})||[]}function W1(e){for(var i,t=[],n={l:0};n.l>>0>0),t.push(o)}return t}function _0(e){var i=[];return e.forEach(function(t){var n=[[],[{data:Si(t.id),type:0}],[]];null!=t.merge&&(n[3]=[{data:Si(+!!t.merge),type:0}]);var r=[];t.messages.forEach(function(o){r.push(o.data),o.meta[3]=[{type:0,data:Si(o.data.length)}],n[2].push({data:Ri(o.meta),type:2})});var s=Ri(n);i.push(Si(s.length)),i.push(s),r.forEach(function(o){return i.push(o)})}),xf(i)}function S$t(e,i){if(0!=e)throw new Error("Unexpected Snappy chunk type ".concat(e));for(var t={l:0},n=H1(i,t),r=[],s=t.l;s>2&7),C=(224&i[s++])<<3,C|=i[s++]):(M=1+(i[s++]>>2),2==o?(C=i[s]|i[s+1]<<8,s+=2):(C=(i[s]|i[s+1]<<8|i[s+2]<<16|i[s+3]<<24)>>>0,s+=4)),0==C)throw new Error("Invalid offset 0");for(var P=r.length-1,O=C;P>=0&&O>=r[P].length;)O-=r[P].length,--P;if(P<0){if(0!=O)throw new Error("Invalid offset beyond length");O=r[P=0].length}if(M0&&(r.push(r[P][Us](r[P].length-O)),M-=O),++P;M>=r[P].length;)r.push(r[P]),M-=r[P].length,++P;M&&r.push(r[P][Us](0,M))}r.length>25&&(r=[xf(r)])}else{var l=i[s++]>>2;if(l<60)++l;else{var w=l-59;l=i[s],w>1&&(l|=i[s+1]<<8),w>2&&(l|=i[s+2]<<16),w>3&&(l|=i[s+3]<<24),l>>>=0,l++,s+=w}r.push(i[Us](s,s+l)),s+=l}}for(var L=0,U=0;U>8&255]))):n<=16777216?(o+=4,i.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(o+=5,i.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),i.push(e[Us](t,t+n)),o+=n,r[0]=0,r[1]=255&o,r[2]=o>>8&255,r[3]=o>>16&255,t+=n}return xf(i)}function zN(e,i){var t=new Uint8Array(32),n=Wu(t),r=12,s=0;switch(t[0]=5,e.t){case"n":if(e.z&&Dl(e.z)){t[1]=5,n.setFloat64(r,(Vu(e.v+1462).getTime()-Date.UTC(2001,0,1))/1e3,!0),s|=4,r+=8;break}t[1]=2,function C$t(e,i,t){var n=Math.floor(0==t?0:Math.LOG10E*Math.log(Math.abs(t)))+6176-16,r=t/Math.pow(10,n-6176);e[i+15]|=n>>7,e[i+14]|=(127&n)<<1;for(var s=0;r>=1;++s,r/=256)e[i+s]=255&r;e[i+15]|=t>=0?0:128}(t,r,e.v),s|=1,r+=16;break;case"b":t[1]=6,n.setFloat64(r,e.v?1:0,!0),s|=2,r+=8;break;case"s":var o=null==e.v?"":String(e.v);if(e.l){var l=i.rsst.findIndex(function(C){var M;return C.v==o&&C.l==(null==(M=e.l)?void 0:M.Target)});-1==l&&(i.rsst[l=i.rsst.length]={v:o,l:e.l.Target}),t[1]=9,n.setUint32(r,l,!0),s|=16,r+=4}else{var w=i.sst.indexOf(o);-1==w&&(i.sst[w=i.sst.length]=o),t[1]=3,n.setUint32(r,w,!0),s|=8,r+=4}break;case"d":t[1]=5,n.setFloat64(r,(e.v.getTime()-Date.UTC(2001,0,1))/1e3,!0),s|=4,r+=8;break;case"z":t[1]=0;break;default:throw"unsupported cell type "+e.t}return e.c&&(i.cmnt.push(function P$t(e){for(var i={a:"",t:"",replies:[]},t=0;t-1,r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};YN(i=i||{});var s=WL(),o="",l=0;if(i.cellXfs=[],vf(i.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),cn(s,o="docProps/core.xml",itt(e.Props,i)),r.coreprops.push(o),dr(i.rels,2,o,hn.CORE_PROPS),o="docProps/app.xml",!e.Props||!e.Props.SheetNames)if(e.Workbook&&e.Workbook.Sheets){for(var w=[],C=0;C0&&(cn(s,o="docProps/custom.xml",att(e.Custprops)),r.custprops.push(o),dr(i.rels,4,o,hn.CUST_PROPS));var M=["SheetJ5"];for(i.tcid=0,l=1;l<=e.SheetNames.length;++l){var P={"!id":{}},O=e.Sheets[e.SheetNames[l-1]];if(cn(s,o="xl/worksheets/sheet"+l+"."+t,EXt(l-1,i,e,P)),r.sheets.push(o),dr(i.wbrels,-1,"worksheets/sheet"+l+"."+t,hn.WS[0]),O){var U=O["!comments"],X=!1,W="";if(U&&U.length>0){var Z=!1;U.forEach(function(rt){rt[1].forEach(function(st){1==st.T&&(Z=!0)})}),Z&&(cn(s,W="xl/threadedComments/threadedComment"+l+".xml",tet(U,M,i)),r.threadedcomments.push(W),dr(P,-1,"../threadedComments/threadedComment"+l+".xml",hn.TCMNT)),cn(s,W="xl/comments"+l+"."+t,JHt(U)),r.comments.push(W),dr(P,-1,"../comments"+l+"."+t,hn.CMNT),X=!0}O["!legacy"]&&X&&cn(s,"xl/drawings/vmlDrawing"+l+".vml",Jtt(l,O["!comments"])),delete O["!comments"],delete O["!legacy"]}P["!id"].rId1&&cn(s,S1(o),v0(P))}return null!=i.Strings&&i.Strings.length>0&&(cn(s,o="xl/sharedStrings."+t,function hGt(e,i){if(!i.bookSST)return"";var t=[Bs];t[t.length]=We("sst",null,{xmlns:Km[0],count:e.Count,uniqueCount:e.Unique});for(var n=0;n!=e.length;++n)if(null!=e[n]){var r=e[n],s="";r.r?s+=r.r:(s+=""),t[t.length]=s+=""}return t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(i.Strings,i)),r.strs.push(o),dr(i.wbrels,-1,"sharedStrings."+t,hn.SST)),cn(s,o="xl/workbook."+t,function qjt(e){var i=[Bs];i[i.length]=We("workbook",null,{xmlns:Km[0],"xmlns:r":ga.r});var t=e.Workbook&&(e.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};e.Workbook&&e.Workbook.WBProps&&(ON.forEach(function(l){null!=e.Workbook.WBProps[l[0]]&&e.Workbook.WBProps[l[0]]!=l[1]&&(n[l[0]]=e.Workbook.WBProps[l[0]])}),e.Workbook.WBProps.CodeName&&(n.codeName=e.Workbook.WBProps.CodeName,delete n.CodeName)),i[i.length]=We("workbookPr",null,n);var r=e.Workbook&&e.Workbook.Sheets||[],s=0;if(r&&r[0]&&r[0].Hidden){for(i[i.length]="",s=0;s!=e.SheetNames.length&&r[s]&&r[s].Hidden;++s);s==e.SheetNames.length&&(s=0),i[i.length]='',i[i.length]=""}for(i[i.length]="",s=0;s!=e.SheetNames.length;++s){var o={name:gn(e.SheetNames[s].slice(0,31))};if(o.sheetId=""+(s+1),o["r:id"]="rId"+(s+1),r[s])switch(r[s].Hidden){case 1:o.state="hidden";break;case 2:o.state="veryHidden"}i[i.length]=We("sheet",null,o)}return i[i.length]="",t&&(i[i.length]="",e.Workbook&&e.Workbook.Names&&e.Workbook.Names.forEach(function(l){var w={name:l.Name};l.Comment&&(w.comment=l.Comment),null!=l.Sheet&&(w.localSheetId=""+l.Sheet),l.Hidden&&(w.hidden="1"),l.Ref&&(i[i.length]=We("definedName",gn(l.Ref),w))}),i[i.length]=""),i.length>2&&(i[i.length]="",i[1]=i[1].replace("/>",">")),i.join("")}(e)),r.workbooks.push(o),dr(i.rels,1,o,hn.WB),cn(s,o="xl/theme/theme1.xml",AN(e.Themes,i)),r.themes.push(o),dr(i.wbrels,-1,"theme/theme1.xml",hn.THEME),cn(s,o="xl/styles."+t,function qGt(e,i){var n,t=[Bs,We("styleSheet",null,{xmlns:Km[0],"xmlns:vt":ga.vt})];return e.SSF&&null!=(n=function QGt(e){var i=[""];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(t){for(var n=t[0];n<=t[1];++n)null!=e[n]&&(i[i.length]=We("numFmt",null,{numFmtId:n,formatCode:gn(e[n])}))}),1===i.length?"":(i[i.length]="",i[0]=We("numFmts",null,{count:i.length-2}).replace("/>",">"),i.join(""))}(e.SSF))&&(t[t.length]=n),t[t.length]='',t[t.length]='',t[t.length]='',t[t.length]='',(n=function ZGt(e){var i=[];return i[i.length]=We("cellXfs",null),e.forEach(function(t){i[i.length]=We("xf",null,t)}),i[i.length]="",2===i.length?"":(i[0]=We("cellXfs",null,{count:i.length-2}).replace("/>",">"),i.join(""))}(i.cellXfs))&&(t[t.length]=n),t[t.length]='',t[t.length]='',t[t.length]='',t.length>2&&(t[t.length]="",t[1]=t[1].replace("/>",">")),t.join("")}(e,i)),r.styles.push(o),dr(i.wbrels,-1,"styles."+t,hn.STY),e.vbaraw&&n&&(cn(s,o="xl/vbaProject.bin",e.vbaraw),r.vba.push(o),dr(i.wbrels,-1,"vbaProject.bin",hn.VBA)),cn(s,o="xl/metadata."+t,function HHt(){var e=[Bs];return e.push('\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'),e.join("")}()),r.metadata.push(o),dr(i.wbrels,-1,"metadata."+t,hn.XLMETA),M.length>1&&(cn(s,o="xl/persons/person.xml",eet(M)),r.people.push(o),dr(i.wbrels,-1,"persons/person.xml",hn.PEOPLE)),cn(s,"[Content_Types].xml",Jq(r,i)),cn(s,"_rels/.rels",v0(i.rels)),cn(s,"xl/_rels/workbook.xml.rels",v0(i.wbrels)),delete i.revssf,delete i.ssf,s}function lit(e,i){switch(i.type){case"base64":case"binary":break;case"buffer":case"array":i.type="";break;case"file":return f1(i.file,Oi.write(e,{type:_n?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");default:throw new Error("Unrecognized type "+i.type)}return Oi.write(e,i)}function iQt(e,i){switch(i.bookType){case"ods":return Ket(e,i);case"numbers":return function U$t(e,i){if(!i||!i.numbers)throw new Error("Must pass a `numbers` option -- check the README");var t=Oi.read(i.numbers,{type:"base64"}),n=function V$t(e){var i={},t=[];return e.FileIndex.map(function(n,r){return[n,e.FullPaths[r]]}).forEach(function(n){var r=n[0],s=n[1];2==r.type&&r.name.match(/\.iwa/)&&0==r.content[0]&&W1(X1(r.content)).forEach(function(o){t.push(o.id),i[o.id]={deps:[],location:s,type:Fn(o.messages[0].meta[1][0].data)}})}),e.FileIndex.forEach(function(n){n.name.match(/\.iwa/)&&0==n.content[0]&&W1(X1(n.content)).forEach(function(r){r.messages.forEach(function(s){[5,6].forEach(function(o){s.meta[o]&&s.meta[o].forEach(function(l){i[r.id].deps.push(Fn(l.data))})})})})}),i}(t),r=Dd(t,n,1);if(null==r)throw"Could not find message ".concat(1," in Numbers template");var s=up(ci(r.messages[0].data)[1],On);if(s.length>1)throw new Error("Template NUMBERS file must have exactly one sheet");return e.SheetNames.forEach(function(o,l){l>=1&&(function G$t(e,i,t){var n=-1,r=-1,s={};Tr(e,i,1,function(w,C){var M=ci(w.messages[0].data);n=On(ci(w.messages[0].data)[1][0].data),r=Ad({deps:[1],location:i[n].location,type:2},i),s[n]=r,To(w,r),M[1].push({type:2,data:_o(r)});var P=Dd(e,i,n);P.id=r,i[1].location==i[r].location?C.push(P):Tr(e,i,r,function(O,L){return L.push(P)}),w.messages[0].data=Ri(M)});var o=-1;Tr(e,i,r,function(w,C){for(var M=ci(w.messages[0].data),P=3;P<=69;++P)delete M[P];var O=up(M[2],On);O.forEach(function(U){return Xu(w,U)}),o=Ad({deps:[r],location:i[O[0]].location,type:i[O[0]].type},i),To(w,o),s[O[0]]=o,M[2]=[{type:2,data:_o(o)}];var L=Dd(e,i,O[0]);L.id=o,i[O[0]].location==i[r].location?C.push(L):(Tr(e,i,2,function(U){var X=ci(U.messages[0].data);sl(X,i,r,o),U.messages[0].data=Ri(X)}),Tr(e,i,o,function(U,X){return X.push(L)})),w.messages[0].data=Ri(M)});var l=-1;Tr(e,i,o,function(w,C){for(var M=ci(w.messages[0].data),P=ci(M[1][0].data),O=3;O<=69;++O)delete P[O];var L=On(P[2][0].data);P[2][0].data=_o(s[L]),M[1][0].data=Ri(P);var U=On(M[2][0].data);Xu(w,U),To(w,l=Ad({deps:[o],location:i[U].location,type:i[U].type},i)),s[U]=l,M[2][0].data=_o(l);var X=Dd(e,i,U);X.id=l,i[o].location==i[l].location?C.push(X):Tr(e,i,l,function(W,Z){return Z.push(X)}),w.messages[0].data=Ri(M)}),Tr(e,i,l,function(w,C){var M,P,O=ci(w.messages[0].data),U=Pc(O[1][0].data).replace(/-[A-Z0-9]*/,"-".concat(("0000"+t.toString(16)).slice(-4)));if(O[1][0].data=Go(U),[12,13,29,31,32,33,39,44,47,81,82,84].forEach(function(_t){return delete O[_t]}),O[45]){var W=On(ci(O[45][0].data)[1][0].data);Xu(w,W),delete O[45]}O[70]&&(null==(M=ci(O[70][0].data)[2])||M.forEach(function(_t){var Mt=ci(_t.data);[2,3].map(function(ft){return Mt[ft][0]}).forEach(function(ft){var dt=ci(ft.data);if(dt[8]){var pt=On(dt[8][0].data);Xu(w,pt)}})}),delete O[70]),[46,30,34,35,36,38,48,49,60,61,62,63,64,71,72,73,74,75,85,86,87,88,89].forEach(function(_t){if(O[_t]){var Mt=On(O[_t][0].data);delete O[_t],Xu(w,Mt)}});var rt=ci(O[4][0].data);[2,4,5,6,11,12,13,15,16,17,18,19,20,21,22].forEach(function(_t){var Mt;if(null!=(Mt=rt[_t])&&Mt[0]){var ft=On(rt[_t][0].data),dt=Ad({deps:[l],location:i[ft].location,type:i[ft].type},i);Xu(w,ft),To(w,dt),s[ft]=dt;var pt=Dd(e,i,ft);if(pt.id=dt,i[ft].location==i[l].location)C.push(pt);else{i[dt].location=i[ft].location.replace(ft.toString(),dt.toString()),i[dt].location==i[ft].location&&(i[dt].location=i[dt].location.replace(/\.iwa/,"-".concat(dt,".iwa"))),Oi.utils.cfb_add(e,i[dt].location,T0(_0([pt])));var bt=i[dt].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Tr(e,i,2,function(Tt){var Et=ci(Tt.messages[0].data);XN(Et,dt,bt),sl(Et,i,l,dt),Tt.messages[0].data=Ri(Et)})}rt[_t][0].data=_o(dt)}});var st=ci(rt[1][0].data);null==(P=st[2])||P.forEach(function(_t){var Mt=On(_t.data),ft=Ad({deps:[l],location:i[Mt].location,type:i[Mt].type},i);Xu(w,Mt),To(w,ft),s[Mt]=ft;var dt=Dd(e,i,Mt);if(dt.id=ft,i[Mt].location==i[l].location)C.push(dt);else{i[ft].location=i[Mt].location.replace(Mt.toString(),ft.toString()),i[ft].location==i[Mt].location&&(i[ft].location=i[ft].location.replace(/\.iwa/,"-".concat(ft,".iwa"))),Oi.utils.cfb_add(e,i[ft].location,T0(_0([dt])));var pt=i[ft].location.replace(/^Root Entry\//,"").replace(/^Index\//,"").replace(/\.iwa$/,"");Tr(e,i,2,function(bt){var Tt=ci(bt.messages[0].data);XN(Tt,ft,pt),sl(Tt,i,l,ft),bt.messages[0].data=Ri(Tt)})}_t.data=_o(ft)}),rt[1][0].data=Ri(st);var vt=ci(rt[3][0].data);vt[1].forEach(function(_t){var Mt=ci(_t.data),ft=On(Mt[2][0].data),dt=s[ft];if(!s[ft]){dt=Ad({deps:[l],location:"",type:i[ft].type},i),i[dt].location="Root Entry/Index/Tables/Tile-".concat(dt,".iwa"),s[ft]=dt;var pt=Dd(e,i,ft);pt.id=dt,Xu(w,ft),To(w,dt),Oi.utils.cfb_add(e,"/Index/Tables/Tile-".concat(dt,".iwa"),T0(_0([pt]))),Tr(e,i,2,function(bt){var Tt=ci(bt.messages[0].data);Tt[3].push({type:2,data:Ri([[],[{type:0,data:Si(dt)}],[{type:2,data:Go("Tables/Tile")}],[{type:2,data:Go("Tables/Tile-".concat(dt))}],[{type:2,data:new Uint8Array([2,0,0])}],[{type:2,data:new Uint8Array([2,0,0])}],[],[],[],[],[{type:0,data:Si(0)}],[],[{type:0,data:Si(0)}]])}),Tt[1]=[{type:0,data:Si(Math.max(dt+1,Fn(Tt[1][0].data)))}],sl(Tt,i,l,dt),bt.messages[0].data=Ri(Tt)})}Mt[2][0].data=_o(dt),_t.data=Ri(Mt)}),rt[3][0].data=Ri(vt),O[4][0].data=Ri(rt),w.messages[0].data=Ri(O)})}(t,n,l+1),r=Dd(t,n,1),s=up(ci(r.messages[0].data)[1],On)),function H$t(e,i,t,n,r,s){var o=[];Tr(e,i,s,function(C){var M=ci(C.messages[0].data);M[1]=[{type:2,data:Go(n)}],o=up(M[2],On),C.messages[0].data=Ri(M)});var w=On(ci(Dd(e,i,o[0]).messages[0].data)[2][0].data);Tr(e,i,w,function(C,M){return function W$t(e,i,t,n,r,s){if(!t["!ref"])throw new Error("Cannot export empty sheet to NUMBERS");var o=xa(t["!ref"]);o.s.r=o.s.c=0;var l=!1;o.e.c>999&&(l=!0,o.e.c=999),o.e.r>999999&&(l=!0,o.e.r=999999),l&&console.error("Truncating to ".concat(un(o)));var w=[];if(t["!data"])w=t["!data"];else{for(var C=[],M=0;M<=o.e.c;++M)C[M]=dn(M);for(var P=0;P<=o.e.r;++P){w[P]=[];var O=""+(P+1);for(M=0;M<=o.e.c;++M){var L=t[C[M]+O];L&&(w[P][M]=L)}}}var U={cmnt:[{a:"~54ee77S~",t:"... the people who are crazy enough to think they can change the world, are the ones who do."}],ferr:[],fmla:[],nfmt:[],ofmt:[],rsst:[{v:"~54ee77S~",l:"https://sheetjs.com/"}],sst:["~Sh33tJ5~"]},X=ci(n.messages[0].data);X[6][0].data=Si(o.e.r+1),X[7][0].data=Si(o.e.c+1),delete X[46];var W=ci(X[4][0].data),Z=On(ci(W[1][0].data)[2][0].data);Tr(e,i,Z,function(Kt,ke){var Ce,oi=ci(Kt.messages[0].data);if(null!=(Ce=oi?.[2])&&Ce[0])for(var ui=0;ui1){var Ne=On(W[19][0].data),Se={},Ei=0;Tr(e,i,Ne,function(Kt){var ke=ci(Kt.messages[0].data);ke[3]=[],U.cmnt.forEach(function(Ce,oi){if(0!=oi){var ui=[];Ce.replies&&Ce.replies.forEach(function(jt){Se[jt.a||""]||(Se[jt.a||""]=fp(e,212,[[],[{type:2,data:Go(jt.a||"")}],[{type:2,data:eit(++Ei)}],[],[{type:0,data:Si(0)}]],"/Index/Tables/DataList",i));var Xt=Se[jt.a||""],Ht=fp(e,3056,[[],[{type:2,data:Go(jt.t||"")}],[{type:2,data:Ri([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:_o(Xt)}]],"/Index/Tables/DataList",i);Tr(e,i,Ht,function(Te){return To(Te,Xt)}),ui.push(Ht),Tr(e,i,2,function(Te){var Pt=ci(Te.messages[0].data);sl(Pt,i,Ht,Xt),Te.messages[0].data=Ri(Pt)})}),Se[Ce.a||""]||(Se[Ce.a||""]=fp(e,212,[[],[{type:2,data:Go(Ce.a||"")}],[{type:2,data:eit(++Ei)}],[],[{type:0,data:Si(0)}]],"/Index/Tables/DataList",i));var ni=Se[Ce.a||""],Ft=fp(e,3056,[[],[{type:2,data:Go(Ce.t||"")}],[{type:2,data:Ri([[],[{type:1,data:new Uint8Array([0,0,0,128,116,109,182,65])}]])}],[{type:2,data:_o(ni)}],ui.map(function(jt){return{type:2,data:_o(jt)}}),[{type:2,data:Ri([[],[{type:0,data:Si(oi)}],[{type:0,data:Si(0)}]])}]],"/Index/Tables/DataList",i);Tr(e,i,Ft,function(jt){To(jt,ni),ui.forEach(function(Xt){return To(jt,Xt)})}),ke[3].push({type:2,data:Ri([[],[{type:0,data:Si(oi)}],[{type:0,data:Si(1)}],[],[],[],[],[],[],[],[{type:2,data:_o(Ft)}]])}),To(Kt,Ft),Tr(e,i,2,function(jt){var Xt=ci(jt.messages[0].data);sl(Xt,i,Ne,Ft),sl(Xt,i,Ft,ni),ui.length&&sl(Xt,i,Ft,ui),jt.messages[0].data=Ri(Xt)})}}),ke[2][0].data=Si(U.cmnt.length+1),Kt.messages[0].data=Ri(ke)})}X[4][0].data=Ri(W),n.messages[0].data=Ri(X)}(e,i,t,C,M,w)})}(t,n,e.Sheets[o],o,0,s[l])}),t}(e,i);case"xlsb":return function K$t(e,i){e&&!e.SSF&&(e.SSF=pr(ki)),e&&e.SSF&&(u0(),h1(e.SSF),i.revssf=WE(e.SSF),i.revssf[e.SSF[65535]]=0,i.ssf=e.SSF),i.rels={},i.wbrels={},i.Strings=[],i.Strings.Count=0,i.Strings.Unique=0,B1?i.revStrings=new Map:(i.revStrings={},i.revStrings.foo=[],delete i.revStrings.foo);var t="bin",r={workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""};YN(i=i||{});var s=WL(),o="",l=0;if(i.cellXfs=[],vf(i.cellXfs,{},{revssf:{General:0}}),e.Props||(e.Props={}),cn(s,o="docProps/core.xml",itt(e.Props,i)),r.coreprops.push(o),dr(i.rels,2,o,hn.CORE_PROPS),o="docProps/app.xml",!e.Props||!e.Props.SheetNames)if(e.Workbook&&e.Workbook.Sheets){for(var w=[],C=0;C0&&(cn(s,o="docProps/custom.xml",att(e.Custprops)),r.custprops.push(o),dr(i.rels,4,o,hn.CUST_PROPS));var M=["SheetJ5"];for(i.tcid=0,l=1;l<=e.SheetNames.length;++l){var P={"!id":{}},O=e.Sheets[e.SheetNames[l-1]];if(cn(s,o="xl/worksheets/sheet"+l+"."+t,Vjt(l-1,i,e,P)),r.sheets.push(o),dr(i.wbrels,-1,"worksheets/sheet"+l+"."+t,hn.WS[0]),O){var U=O["!comments"],X=!1,W="";if(U&&U.length>0){var Z=!1;U.forEach(function(st){st[1].forEach(function(vt){1==vt.T&&(Z=!0)})}),Z&&(cn(s,W="xl/threadedComments/threadedComment"+l+".xml",tet(U,M,i)),r.threadedcomments.push(W),dr(P,-1,"../threadedComments/threadedComment"+l+".xml",hn.TCMNT)),cn(s,W="xl/comments"+l+"."+t,s7t(U)),r.comments.push(W),dr(P,-1,"../comments"+l+"."+t,hn.CMNT),X=!0}O["!legacy"]&&X&&cn(s,"xl/drawings/vmlDrawing"+l+".vml",Jtt(l,O["!comments"])),delete O["!comments"],delete O["!legacy"]}P["!id"].rId1&&cn(s,S1(o),v0(P))}return null!=i.Strings&&i.Strings.length>0&&(cn(s,o="xl/sharedStrings."+t,function vGt(e){var i=po();Ee(i,159,function pGt(e,i){return i||(i=re(8)),i.write_shift(4,e.Count),i.write_shift(4,e.Unique),i}(e));for(var t=0;t1&&(cn(s,o="xl/persons/person.xml",eet(M)),r.people.push(o),dr(i.wbrels,-1,"persons/person.xml",hn.PEOPLE)),cn(s,"[Content_Types].xml",Jq(r,i)),cn(s,"_rels/.rels",v0(i.rels)),cn(s,"xl/_rels/workbook.bin.rels",v0(i.wbrels)),delete i.revssf,delete i.ssf,s}(e,i);default:return sit(e,i)}}function Md(e,i,t){t||(t="");var n=t+e;switch(i.type){case"base64":return BE(Cd(n));case"binary":return Cd(n);case"string":return e;case"file":return f1(i.file,n,"utf8");case"buffer":return _n?bd(n,"utf8"):typeof TextEncoder<"u"?(new TextEncoder).encode(n):Md(n,{type:"binary"}).split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}function yA(e,i){switch(i.type){case"string":case"base64":case"binary":for(var t="",n=0;n22)throw new Error("Bad Code Name: Worksheet"+o)}})}(e.SheetNames,e.Workbook&&e.Workbook.Sheets||[],!!e.vbaraw);for(var t=0;t255&&(t=95),s=t>>2,(n=e.charCodeAt(C++))>255&&(n=95),o=(3&t)<<4|n>>4,(r=e.charCodeAt(C++))>255&&(r=95),l=(15&n)<<2|r>>6,w=63&r,isNaN(n)?l=w=64:isNaN(r)&&(w=64),i+=ho.charAt(s)+ho.charAt(o)+ho.charAt(l)+ho.charAt(w);return i}(e);case"binary":case"string":return e;case"file":return f1(i.file,e,"binary");case"buffer":return _n?bd(e,"binary"):e.split("").map(function(t){return t.charCodeAt(0)})}throw new Error("Unrecognized type "+i.type)}(mit(e.Sheets[e.SheetNames[r]],t),t);case"csv":return Md(qN(e.Sheets[e.SheetNames[r]],t),t,"\ufeff");case"dif":return Md(ztt.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"dbf":return yA(wN.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"prn":return Md(y0.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"rtf":return Md(function NGt(e,i){var t=["{\\rtf1\\ansi"];if(!e["!ref"])return t[0]+"}";for(var r,n=Gn(e["!ref"]),s=null!=e["!data"],o=[],l=n.s.r;l<=n.e.r;++l){t.push("\\trowd\\trautofit1");for(var w=n.s.c;w<=n.e.c;++w)t.push("\\cellx"+(w+1));for(t.push("\\pard\\intbl"),s&&(o=e["!data"][l]||[]),w=n.s.c;w<=n.e.c;++w){var C=Tn({r:l,c:w});(r=s?o[w]:e[C])&&(null!=r.v||r.f&&!r.F)?(t.push(" "+(r.w||(Sd(r),r.w)||"").replace(/[\r\n]/g,"\\par ")),t.push("\\cell")):t.push(" \\cell")}t.push("\\pard\\intbl\\row")}return t.join("")+"}"}(e.Sheets[e.SheetNames[r]]),t);case"eth":return Md(Gtt.from_sheet(e.Sheets[e.SheetNames[r]],t),t);case"fods":return Md(Ket(e,t),t);case"wk1":return yA(lp.sheet_to_wk1(e.Sheets[e.SheetNames[r]],t),t);case"wk3":return yA(lp.book_to_wk3(e,t),t);case"biff2":t.biff||(t.biff=2);case"biff3":t.biff||(t.biff=3);case"biff4":return t.biff||(t.biff=4),yA(Fet(e,t),t);case"biff5":t.biff||(t.biff=5);case"biff8":case"xla":case"xls":return t.biff||(t.biff=8),function sQt(e,i){var t=i||{};return lit(function qYt(e,i){var t=i||{},n=Oi.utils.cfb_new({root:"R"}),r="/Workbook";switch(t.bookType||"xls"){case"xls":t.bookType="biff8";case"xla":t.bookType||(t.bookType="xla");case"biff8":r="/Workbook",t.biff=8;break;case"biff5":r="/Book",t.biff=5;break;default:throw new Error("invalid type "+t.bookType+" for XLS CFB")}return Oi.utils.cfb_add(n,r,Fet(e,t)),8==t.biff&&(e.Props||e.Custprops)&&function JYt(e,i){var o,t=[],n=[],r=[],s=0,l=cq(lN,"n"),w=cq(cN,"n");if(e.Props)for(o=Jr(e.Props),s=0;s-1||ntt.indexOf(r[s][0])>-1||null!=r[s][1]&&C.push(r[s]);n.length&&Oi.utils.cfb_add(i,"/\x05SummaryInformation",vtt(n,U1.SI,w,cN)),(t.length||C.length)&&Oi.utils.cfb_add(i,"/\x05DocumentSummaryInformation",vtt(t,U1.DSI,l,lN,C.length?C:null,U1.UDI))}(e,n),8==t.biff&&e.vbaraw&&function l7t(e,i){i.FullPaths.forEach(function(t,n){if(0!=n){var r=t.replace(/^[\/]*[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");"/"!==r.slice(-1)&&Oi.utils.cfb_add(e,r,i.FileIndex[n].content)}})}(n,Oi.read(e.vbaraw,{type:"string"==typeof e.vbaraw?"binary":"buffer"})),n}(e,t),t)}(e,t);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return function nQt(e,i){var t=pr(i||{});return function cit(e,i){var t={},n=_n?"nodebuffer":typeof Uint8Array<"u"?"array":"string";if(i.compression&&(t.compression="DEFLATE"),i.password)t.type=n;else switch(i.type){case"base64":t.type="base64";break;case"binary":t.type="string";break;case"string":throw new Error("'string' output type invalid for '"+i.bookType+"' files");case"buffer":case"file":t.type=n;break;default:throw new Error("Unrecognized type "+i.type)}var r=e.FullPaths?Oi.write(e,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[t.type]||t.type,compression:!!i.compression}):e.generate(t);if(typeof Deno<"u"&&"string"==typeof r){if("binary"==i.type||"base64"==i.type)return r;r=new Uint8Array(c1(r))}return i.password&&typeof encrypt_agile<"u"?lit(encrypt_agile(r,i.password),i):"file"===i.type?f1(i.file,r):"string"==i.type?gr(r):r}(iQt(e,t),t)}(e,t);default:throw new Error("Unrecognized bookType |"+t.bookType+"|")}}function uit(e,i,t,n,r,s,o){var l=Pn(t),w=o.defval,C=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),M=!0,P=null!=e["!data"],O=1===r?[]:{};if(1!==r)if(Object.defineProperty)try{Object.defineProperty(O,"__rowNum__",{value:t,enumerable:!1})}catch{O.__rowNum__=t}else O.__rowNum__=t;if(!P||e["!data"][t])for(var L=i.s.c;L<=i.e.c;++L){var U=P?(e["!data"][t]||[])[L]:e[n[L]+l];if(null!=U&&void 0!==U.t){var X=U.v;switch(U.t){case"z":if(null==X)break;continue;case"e":X=0==X?null:void 0;break;case"s":case"b":case"n":if(!U.z||!Dl(U.z)||"number"==typeof(X=Vu(X)))break;case"d":o&&(o.UTC||!1===o.raw)||(X=$m(new Date(X)));break;default:throw new Error("unrecognized type "+U.t)}if(null!=s[L]){if(null==X)if("e"==U.t&&null===X)O[s[L]]=null;else if(void 0!==w)O[s[L]]=w;else{if(!C||null!==X)continue;O[s[L]]=null}else O[s[L]]=("n"===U.t&&"boolean"==typeof o.rawNumbers?o.rawNumbers:C)?X:Sd(U,X,o);null!=X&&(M=!1)}}else{if(void 0===w)continue;null!=s[L]&&(O[s[L]]=w)}}return{row:O,isempty:M}}function JN(e,i){if(null==e||null==e["!ref"])return[];var t={t:"n",v:0},n=0,r=1,s=[],o=0,l="",w={s:{r:0,c:0},e:{r:0,c:0}},C=i||{},M=null!=C.range?C.range:e["!ref"];switch(1===C.header?n=1:"A"===C.header?n=2:Array.isArray(C.header)?n=3:null==C.header&&(n=0),typeof M){case"string":w=Gn(M);break;case"number":(w=Gn(e["!ref"])).s.r=M;break;default:w=M}n>0&&(r=0);var P=Pn(w.s.r),O=[],L=[],U=0,X=0,W=null!=e["!data"],Z=w.s.r,rt=0,st={};W&&!e["!data"][Z]&&(e["!data"][Z]=[]);var vt=C.skipHidden&&e["!cols"]||[],_t=C.skipHidden&&e["!rows"]||[];for(rt=w.s.c;rt<=w.e.c;++rt)if(!(vt[rt]||{}).hidden)switch(O[rt]=dn(rt),t=W?e["!data"][Z][rt]:e[O[rt]+P],n){case 1:s[rt]=rt-w.s.c;break;case 2:s[rt]=O[rt];break;case 3:s[rt]=C.header[rt-w.s.c];break;default:if(null==t&&(t={w:"__EMPTY",t:"s"}),l=o=Sd(t,null,C),X=st[o]||0){do{l=o+"_"+X++}while(st[l]);st[o]=X,st[l]=1}else st[o]=1;s[rt]=l}for(Z=w.s.r+r;Z<=w.e.r;++Z)if(!(_t[Z]||{}).hidden){var Mt=uit(e,w,Z,O,n,s,C);(!1===Mt.isempty||(1===n?!1!==C.blankrows:C.blankrows))&&(L[U++]=Mt.row)}return L.length=U,L}var hit=/"/g;function fit(e,i,t,n,r,s,o,l){for(var w=!0,C=[],M="",P=Pn(t),O=null!=e["!data"],L=O&&e["!data"][t]||[],U=i.s.c;U<=i.e.c;++U)if(n[U]){var X=O?L[U]:e[n[U]+P];if(null==X)M="";else if(null!=X.v){w=!1,M=""+(l.rawNumbers&&"n"==X.t?X.v:Sd(X,null,l));for(var W=0,Z=0;W!==M.length;++W)if((Z=M.charCodeAt(W))===r||Z===s||34===Z||l.forceQuotes){M='"'+M.replace(hit,'""')+'"';break}"ID"==M&&(M='"ID"')}else null==X.f||X.F?M="":(w=!1,(M="="+X.f).indexOf(",")>=0&&(M='"'+M.replace(hit,'""')+'"'));C.push(M)}if(l.strip)for(;""===C[C.length-1];)--C.length;return!1===l.blankrows&&w?null:C.join(o)}function qN(e,i){var t=[],n=i??{};if(null==e||null==e["!ref"])return"";for(var r=Gn(e["!ref"]),s=void 0!==n.FS?n.FS:",",o=s.charCodeAt(0),l=void 0!==n.RS?n.RS:"\n",w=l.charCodeAt(0),C="",M=[],P=n.skipHidden&&e["!cols"]||[],O=n.skipHidden&&e["!rows"]||[],L=r.s.c;L<=r.e.c;++L)(P[L]||{}).hidden||(M[L]=dn(L));for(var U=0,X=r.s.r;X<=r.e.r;++X)(O[X]||{}).hidden||null!=(C=fit(e,r,X,M,o,w,s,n))&&(C||!1!==n.blankrows)&&t.push((U++?l:"")+C);return t.join("")}function mit(e,i){i||(i={}),i.FS="\t",i.RS="\n";var t=qN(e,i);return typeof pn>"u"||"string"==i.type?t:"\xff\xfe"+pn.utils.encode(1200,t,"str")}function pit(e,i,t){var n=t||{},r=e?null!=e["!data"]:n.dense;null!=Ls&&null==r&&(r=Ls);var s=+!n.skipHeader,o=e||{};!e&&r&&(o["!data"]=[]);var l=0,w=0;if(o&&null!=n.origin)if("number"==typeof n.origin)l=n.origin;else{var C="string"==typeof n.origin?vr(n.origin):n.origin;l=C.r,w=C.c}var M={s:{c:0,r:0},e:{c:w,r:l+i.length-1+s}};if(o["!ref"]){var P=Gn(o["!ref"]);M.e.c=Math.max(M.e.c,P.e.c),M.e.r=Math.max(M.e.r,P.e.r),-1==l&&(M.e.r=(l=P.e.r+1)+i.length-1+s)}else-1==l&&(l=0,M.e.r=i.length-1+s);var O=n.header||[],L=0,U=[];i.forEach(function(W,Z){r&&!o["!data"][l+Z+s]&&(o["!data"][l+Z+s]=[]),r&&(U=o["!data"][l+Z+s]),Jr(W).forEach(function(rt){-1==(L=O.indexOf(rt))&&(O[L=O.length]=rt);var st=W[rt],vt="z",_t="",Mt=r?"":dn(w+L)+Pn(l+Z+s),ft=r?U[w+L]:o[Mt];!st||"object"!=typeof st||st instanceof Date?("number"==typeof st?vt="n":"boolean"==typeof st?vt="b":"string"==typeof st?vt="s":st instanceof Date?(vt="d",n.UTC||(st=XE(st)),n.cellDates||(vt="n",st=ms(st)),_t=null!=ft&&ft.z&&Dl(ft.z)?ft.z:n.dateNF||ki[14]):null===st&&n.nullError&&(vt="e",st=0),ft?(ft.t=vt,ft.v=st,delete ft.w,delete ft.R,_t&&(ft.z=_t)):r?U[w+L]=ft={t:vt,v:st}:o[Mt]=ft={t:vt,v:st},_t&&(ft.z=_t)):r?U[w+L]=st:o[Mt]=st})}),M.e.c=Math.max(M.e.c,w+O.length-1);var X=Pn(l);if(r&&!o["!data"][l]&&(o["!data"][l]=[]),s)for(L=0;L=65535)throw new Error("Too many worksheets");if(n&&e.SheetNames.indexOf(t)>=0&&t.length<32){var s=t.match(/\d+$/);r=s&&+s[0]||0;var o=s&&t.slice(0,s.index)||t;for(++r;r<=65535&&-1!=e.SheetNames.indexOf(t=o+r);++r);}if(Det(t),e.SheetNames.indexOf(t)>=0)throw new Error("Worksheet with name |"+t+"| already exists!");return e.SheetNames.push(t),e.Sheets[t]=i,t}var vit_json_to_sheet=function dQt(e,i){return pit(null,e,i)};let CQt=(()=>{class e{constructor(){}exportAsExcelFile(t,n){const o=j1({Sheets:{data:vit_json_to_sheet(t)},SheetNames:["data"]},{bookType:"xlsx",type:"array"});this.saveAsExcelFile(o,n)}saveAsExcelFile(t,n){const r=new Blob([t],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"});dd.saveAs(r,n+"_export_"+(new Date).getTime()+".xlsx")}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const SQt=["*",[["mat-toolbar-row"]]],EQt=["*","mat-toolbar-row"];let AQt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275dir=ce({type:e,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"],standalone:!0})}return e})(),DQt=(()=>{class e{constructor(t,n,r){this._elementRef=t,this._platform=n,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(ir),mt(Ni))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-toolbar"]],contentQueries:function(n,r,s){if(1&n&&An(s,AQt,5),2&n){let o;Be(o=Ve())&&(r._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:6,hostBindings:function(n,r){2&n&&(Ll(r.color?"mat-"+r.color:""),bi("mat-toolbar-multiple-rows",r._toolbarRows.length>0)("mat-toolbar-single-row",0===r._toolbarRows.length))},inputs:{color:"color"},exportAs:["matToolbar"],standalone:!0,features:[Vi],ngContentSelectors:EQt,decls:2,vars:0,template:function(n,r){1&n&&(Kn(SQt),xi(0),xi(1,1))},styles:[".mat-toolbar{background:var(--mat-toolbar-container-background-color);color:var(--mat-toolbar-container-text-color)}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font);font-size:var(--mat-toolbar-title-text-size);line-height:var(--mat-toolbar-title-text-line-height);font-weight:var(--mat-toolbar-title-text-weight);letter-spacing:var(--mat-toolbar-title-text-tracking);margin:0}.cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color:var(--mat-toolbar-container-text-color);--mdc-outlined-button-label-text-color:var(--mat-toolbar-container-text-color)}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height)}}"],encapsulation:2,changeDetection:0})}return e})(),MQt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})();const xit=["*"],IQt=["content"],RQt=[[["mat-drawer"]],[["mat-drawer-content"]],"*"],kQt=["mat-drawer","mat-drawer-content","*"];function PQt(e,i){if(1&e){const t=ve();tt(0,"div",1),Vt("click",function(){return Ut(t),zt(Ct()._onBackdropClicked())}),et()}2&e&&bi("mat-drawer-shown",Ct()._isShowingBackdrop())}function FQt(e,i){1&e&&(tt(0,"mat-drawer-content"),xi(1,2),et())}const OQt={transformDrawer:mr("transform",[Rn("open, open-instant",qe({transform:"none",visibility:"visible"})),Rn("void",qe({"box-shadow":"none",visibility:"hidden"})),on("void => open-instant",sn("0ms")),on("void <=> open, open-instant => void",sn("400ms cubic-bezier(0.25, 0.8, 0.25, 1)"))])},LQt=new ee("MAT_DRAWER_DEFAULT_AUTOSIZE",{providedIn:"root",factory:function NQt(){return!1}}),yit=new ee("MAT_DRAWER_CONTAINER");let e4=(()=>{class e extends lC{constructor(t,n,r,s,o){super(r,s,o),this._changeDetectorRef=t,this._container=n}ngAfterContentInit(){this._container._contentMarginChanges.subscribe(()=>{this._changeDetectorRef.markForCheck()})}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Mn),mt(Sn(()=>wit)),mt(si),mt(Ry),mt(ii))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-drawer-content"]],hostAttrs:[1,"mat-drawer-content"],hostVars:4,hostBindings:function(n,r){2&n&&Ds("margin-left",r._container._contentMargins.left,"px")("margin-right",r._container._contentMargins.right,"px")},standalone:!0,features:[fi([{provide:lC,useExisting:e}]),hi,Vi],ngContentSelectors:xit,decls:1,vars:0,template:function(n,r){1&n&&(Kn(),xi(0))},encapsulation:2,changeDetection:0})}return e})(),bit=(()=>{class e{get position(){return this._position}set position(t){(t="end"===t?"end":"start")!==this._position&&(this._isAttached&&this._updatePositionInParent(t),this._position=t,this.onPositionChanged.emit())}get mode(){return this._mode}set mode(t){this._mode=t,this._updateFocusTrapState(),this._modeChanged.next()}get disableClose(){return this._disableClose}set disableClose(t){this._disableClose=la(t)}get autoFocus(){return this._autoFocus??("side"===this.mode?"dialog":"first-tabbable")}set autoFocus(t){("true"===t||"false"===t||null==t)&&(t=la(t)),this._autoFocus=t}get opened(){return this._opened}set opened(t){this.toggle(la(t))}constructor(t,n,r,s,o,l,w,C){this._elementRef=t,this._focusTrapFactory=n,this._focusMonitor=r,this._platform=s,this._ngZone=o,this._interactivityChecker=l,this._doc=w,this._container=C,this._focusTrap=null,this._elementFocusedBeforeDrawerWasOpened=null,this._enableAnimations=!1,this._position="start",this._mode="over",this._disableClose=!1,this._opened=!1,this._animationStarted=new Pe,this._animationEnd=new Pe,this._animationState="void",this.openedChange=new De(!0),this._openedStream=this.openedChange.pipe(In(M=>M),Di(()=>{})),this.openedStart=this._animationStarted.pipe(In(M=>M.fromState!==M.toState&&0===M.toState.indexOf("open")),bT(void 0)),this._closedStream=this.openedChange.pipe(In(M=>!M),Di(()=>{})),this.closedStart=this._animationStarted.pipe(In(M=>M.fromState!==M.toState&&"void"===M.toState),bT(void 0)),this._destroyed=new Pe,this.onPositionChanged=new De,this._modeChanged=new Pe,this.openedChange.subscribe(M=>{M?(this._doc&&(this._elementFocusedBeforeDrawerWasOpened=this._doc.activeElement),this._takeFocus()):this._isFocusWithinDrawer()&&this._restoreFocus(this._openedVia||"program")}),this._ngZone.runOutsideAngular(()=>{Sc(this._elementRef.nativeElement,"keydown").pipe(In(M=>27===M.keyCode&&!this.disableClose&&!io(M)),Ui(this._destroyed)).subscribe(M=>this._ngZone.run(()=>{this.close(),M.stopPropagation(),M.preventDefault()}))}),this._animationEnd.pipe(eu((M,P)=>M.fromState===P.fromState&&M.toState===P.toState)).subscribe(M=>{const{fromState:P,toState:O}=M;(0===O.indexOf("open")&&"void"===P||"void"===O&&0===P.indexOf("open"))&&this.openedChange.emit(this._opened)})}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{const r=()=>{t.removeEventListener("blur",r),t.removeEventListener("mousedown",r),t.removeAttribute("tabindex")};t.addEventListener("blur",r),t.addEventListener("mousedown",r)})),t.focus(n)}_focusByCssSelector(t,n){let r=this._elementRef.nativeElement.querySelector(t);r&&this._forceFocus(r,n)}_takeFocus(){if(!this._focusTrap)return;const t=this._elementRef.nativeElement;switch(this.autoFocus){case!1:case"dialog":return;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(n=>{!n&&"function"==typeof this._elementRef.nativeElement.focus&&t.focus()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this.autoFocus)}}_restoreFocus(t){"dialog"!==this.autoFocus&&(this._elementFocusedBeforeDrawerWasOpened?this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened,t):this._elementRef.nativeElement.blur(),this._elementFocusedBeforeDrawerWasOpened=null)}_isFocusWithinDrawer(){const t=this._doc.activeElement;return!!t&&this._elementRef.nativeElement.contains(t)}ngAfterViewInit(){this._isAttached=!0,"end"===this._position&&this._updatePositionInParent("end"),this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._updateFocusTrapState())}ngAfterContentChecked(){this._platform.isBrowser&&(this._enableAnimations=!0)}ngOnDestroy(){this._focusTrap?.destroy(),this._anchor?.remove(),this._anchor=null,this._animationStarted.complete(),this._animationEnd.complete(),this._modeChanged.complete(),this._destroyed.next(),this._destroyed.complete()}open(t){return this.toggle(!0,t)}close(){return this.toggle(!1)}_closeViaBackdropClick(){return this._setOpen(!1,!0,"mouse")}toggle(t=!this.opened,n){t&&n&&(this._openedVia=n);const r=this._setOpen(t,!t&&this._isFocusWithinDrawer(),this._openedVia||"program");return t||(this._openedVia=null),r}_setOpen(t,n,r){return this._opened=t,t?this._animationState=this._enableAnimations?"open":"open-instant":(this._animationState="void",n&&this._restoreFocus(r)),this._updateFocusTrapState(),new Promise(s=>{this.openedChange.pipe(er(1)).subscribe(o=>s(o?"open":"close"))})}_getWidth(){return this._elementRef.nativeElement&&this._elementRef.nativeElement.offsetWidth||0}_updateFocusTrapState(){this._focusTrap&&(this._focusTrap.enabled=!!this._container?.hasBackdrop)}_updatePositionInParent(t){if(!this._platform.isBrowser)return;const n=this._elementRef.nativeElement,r=n.parentNode;"end"===t?(this._anchor||(this._anchor=this._doc.createComment("mat-drawer-anchor"),r.insertBefore(this._anchor,n)),r.appendChild(n)):this._anchor&&this._anchor.parentNode.insertBefore(n,this._anchor)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(si),mt(UR),mt(Ul),mt(ir),mt(ii),mt(QT),mt(Ni,8),mt(yit,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-drawer"]],viewQuery:function(n,r){if(1&n&&Mi(IQt,5),2&n){let s;Be(s=Ve())&&(r._content=s.first)}},hostAttrs:["tabIndex","-1",1,"mat-drawer"],hostVars:12,hostBindings:function(n,r){1&n&&G_("@transform.start",function(o){return r._animationStarted.next(o)})("@transform.done",function(o){return r._animationEnd.next(o)}),2&n&&(N_("@transform",r._animationState),Ti("align",null),bi("mat-drawer-end","end"===r.position)("mat-drawer-over","over"===r.mode)("mat-drawer-push","push"===r.mode)("mat-drawer-side","side"===r.mode)("mat-drawer-opened",r.opened))},inputs:{position:"position",mode:"mode",disableClose:"disableClose",autoFocus:"autoFocus",opened:"opened"},outputs:{openedChange:"openedChange",_openedStream:"opened",openedStart:"openedStart",_closedStream:"closed",closedStart:"closedStart",onPositionChanged:"positionChanged"},exportAs:["matDrawer"],standalone:!0,features:[Vi],ngContentSelectors:xit,decls:3,vars:0,consts:[["content",""],["cdkScrollable","",1,"mat-drawer-inner-container"]],template:function(n,r){1&n&&(Kn(),tt(0,"div",1,0),xi(2),et())},dependencies:[lC],encapsulation:2,data:{animation:[OQt.transformDrawer]},changeDetection:0})}return e})(),wit=(()=>{class e{get start(){return this._start}get end(){return this._end}get autosize(){return this._autosize}set autosize(t){this._autosize=la(t)}get hasBackdrop(){return this._drawerHasBackdrop(this._start)||this._drawerHasBackdrop(this._end)}set hasBackdrop(t){this._backdropOverride=null==t?null:la(t)}get scrollable(){return this._userContent||this._content}constructor(t,n,r,s,o,l=!1,w){this._dir=t,this._element=n,this._ngZone=r,this._changeDetectorRef=s,this._animationMode=w,this._drawers=new nh,this.backdropClick=new De,this._destroyed=new Pe,this._doCheckSubject=new Pe,this._contentMargins={left:null,right:null},this._contentMarginChanges=new Pe,t&&t.change.pipe(Ui(this._destroyed)).subscribe(()=>{this._validateDrawers(),this.updateContentMargins()}),o.change().pipe(Ui(this._destroyed)).subscribe(()=>this.updateContentMargins()),this._autosize=l}ngAfterContentInit(){this._allDrawers.changes.pipe(Ta(this._allDrawers),Ui(this._destroyed)).subscribe(t=>{this._drawers.reset(t.filter(n=>!n._container||n._container===this)),this._drawers.notifyOnChanges()}),this._drawers.changes.pipe(Ta(null)).subscribe(()=>{this._validateDrawers(),this._drawers.forEach(t=>{this._watchDrawerToggle(t),this._watchDrawerPosition(t),this._watchDrawerMode(t)}),(!this._drawers.length||this._isDrawerOpen(this._start)||this._isDrawerOpen(this._end))&&this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),this._ngZone.runOutsideAngular(()=>{this._doCheckSubject.pipe(tu(10),Ui(this._destroyed)).subscribe(()=>this.updateContentMargins())})}ngOnDestroy(){this._contentMarginChanges.complete(),this._doCheckSubject.complete(),this._drawers.destroy(),this._destroyed.next(),this._destroyed.complete()}open(){this._drawers.forEach(t=>t.open())}close(){this._drawers.forEach(t=>t.close())}updateContentMargins(){let t=0,n=0;if(this._left&&this._left.opened)if("side"==this._left.mode)t+=this._left._getWidth();else if("push"==this._left.mode){const r=this._left._getWidth();t+=r,n-=r}if(this._right&&this._right.opened)if("side"==this._right.mode)n+=this._right._getWidth();else if("push"==this._right.mode){const r=this._right._getWidth();n+=r,t-=r}t=t||null,n=n||null,(t!==this._contentMargins.left||n!==this._contentMargins.right)&&(this._contentMargins={left:t,right:n},this._ngZone.run(()=>this._contentMarginChanges.next(this._contentMargins)))}ngDoCheck(){this._autosize&&this._isPushed()&&this._ngZone.runOutsideAngular(()=>this._doCheckSubject.next())}_watchDrawerToggle(t){t._animationStarted.pipe(In(n=>n.fromState!==n.toState),Ui(this._drawers.changes)).subscribe(n=>{"open-instant"!==n.toState&&"NoopAnimations"!==this._animationMode&&this._element.nativeElement.classList.add("mat-drawer-transition"),this.updateContentMargins(),this._changeDetectorRef.markForCheck()}),"side"!==t.mode&&t.openedChange.pipe(Ui(this._drawers.changes)).subscribe(()=>this._setContainerClass(t.opened))}_watchDrawerPosition(t){t&&t.onPositionChanged.pipe(Ui(this._drawers.changes)).subscribe(()=>{this._ngZone.onMicrotaskEmpty.pipe(er(1)).subscribe(()=>{this._validateDrawers()})})}_watchDrawerMode(t){t&&t._modeChanged.pipe(Ui(Yr(this._drawers.changes,this._destroyed))).subscribe(()=>{this.updateContentMargins(),this._changeDetectorRef.markForCheck()})}_setContainerClass(t){const n=this._element.nativeElement.classList,r="mat-drawer-container-has-open";t?n.add(r):n.remove(r)}_validateDrawers(){this._start=this._end=null,this._drawers.forEach(t=>{"end"==t.position?this._end=t:this._start=t}),this._right=this._left=null,this._dir&&"rtl"===this._dir.value?(this._left=this._end,this._right=this._start):(this._left=this._start,this._right=this._end)}_isPushed(){return this._isDrawerOpen(this._start)&&"over"!=this._start.mode||this._isDrawerOpen(this._end)&&"over"!=this._end.mode}_onBackdropClicked(){this.backdropClick.emit(),this._closeModalDrawersViaBackdrop()}_closeModalDrawersViaBackdrop(){[this._start,this._end].filter(t=>t&&!t.disableClose&&this._drawerHasBackdrop(t)).forEach(t=>t._closeViaBackdropClick())}_isShowingBackdrop(){return this._isDrawerOpen(this._start)&&this._drawerHasBackdrop(this._start)||this._isDrawerOpen(this._end)&&this._drawerHasBackdrop(this._end)}_isDrawerOpen(t){return null!=t&&t.opened}_drawerHasBackdrop(t){return null==this._backdropOverride?!!t&&"side"!==t.mode:this._backdropOverride}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Ba,8),mt(si),mt(ii),mt(Mn),mt(ou),mt(LQt),mt(Nr,8))};static#e=this.\u0275cmp=je({type:e,selectors:[["mat-drawer-container"]],contentQueries:function(n,r,s){if(1&n&&(An(s,e4,5),An(s,bit,5)),2&n){let o;Be(o=Ve())&&(r._content=o.first),Be(o=Ve())&&(r._allDrawers=o)}},viewQuery:function(n,r){if(1&n&&Mi(e4,5),2&n){let s;Be(s=Ve())&&(r._userContent=s.first)}},hostAttrs:[1,"mat-drawer-container"],hostVars:2,hostBindings:function(n,r){2&n&&bi("mat-drawer-container-explicit-backdrop",r._backdropOverride)},inputs:{autosize:"autosize",hasBackdrop:"hasBackdrop"},outputs:{backdropClick:"backdropClick"},exportAs:["matDrawerContainer"],standalone:!0,features:[fi([{provide:yit,useExisting:e}]),Vi],ngContentSelectors:kQt,decls:4,vars:2,consts:[[1,"mat-drawer-backdrop",3,"mat-drawer-shown"],[1,"mat-drawer-backdrop",3,"click"]],template:function(n,r){1&n&&(Kn(RQt),Gt(0,PQt,1,2,"div",0),xi(1),xi(2,1),Gt(3,FQt,2,0,"mat-drawer-content")),2&n&&(xn(0,r.hasBackdrop?0:-1),lt(3),xn(3,r._content?-1:3))},dependencies:[e4],styles:['.mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);box-shadow:var(--mat-sidenav-container-elevation-shadow);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);width:var(--mat-sidenav-container-width);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*="visibility: hidden"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}'],encapsulation:2,changeDetection:0})}return e})(),BQt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,lu,lu,Ki]})}return e})();function VQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().navigate(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function UQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().setFhirServer(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function zQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setEdition(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.resource.version)}}function GQt(e,i){if(1&e&&(Wi(0),tt(1,"button",20),ut(2),et(),tt(3,"mat-menu",null,5)(5,"span",16),ut(6,"Versions / Releases"),et(),Gt(7,zQt,2,1,"button",15),et(),Xi()),2&e){const t=i.$implicit,n=qi(4);lt(),yt("matMenuTriggerFor",n),lt(),Ze(t.editionName),lt(5),yt("ngForOf",t.editions)}}function HQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct().setLanguage(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t)}}function WQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).navigate(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function XQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setFhirServer(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.name)}}function jQt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(3).setEdition(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t.resource.version)}}function YQt(e,i){if(1&e&&(Wi(0),tt(1,"button",20),ut(2),et(),tt(3,"mat-menu",null,5)(5,"span",16),ut(6,"Versions / Releases"),et(),Gt(7,jQt,2,1,"button",15),et(),Xi()),2&e){const t=i.$implicit,n=qi(4);lt(),yt("matMenuTriggerFor",n),lt(),Ze(t.editionName),lt(5),yt("ngForOf",t.editions)}}function $Qt(e,i){if(1&e){const t=ve();tt(0,"button",19),Vt("click",function(){const r=Ut(t).$implicit;return zt(Ct(2).setLanguage(r))}),ut(1),et()}if(2&e){const t=i.$implicit;lt(),Ze(t)}}function QQt(e,i){if(1&e){const t=ve();tt(0,"mat-toolbar")(1,"button",21),Vt("click",function(){return Ut(t),Ct(),zt(qi(2).toggle())}),tt(2,"mat-icon"),ut(3,"menu"),et()(),tt(4,"a",22),Vt("click",function(){return Ut(t),zt(Ct().navigate({url:"home",type:"internal"}))}),we(5,"img",23),et(),tt(6,"span",24),ut(7,"SNOMED CT Implementation Demos"),et(),tt(8,"span",25),ut(9,"Implementation Demos"),et(),we(10,"span",26),tt(11,"button",27),ut(12,"Select Demonstrator"),et(),tt(13,"mat-menu",14,6),Gt(15,WQt,2,1,"button",15),et(),tt(16,"button",28),ut(17),et(),tt(18,"mat-menu",null,7),Gt(20,XQt,2,1,"button",15),et(),tt(21,"button",28),ut(22),et(),tt(23,"mat-menu",14,8)(25,"span",16),ut(26,"Editions"),et(),Gt(27,YQt,8,3,"ng-container",17),et(),tt(28,"button",28),ut(29),et(),tt(30,"mat-menu",null,9),Gt(32,$Qt,2,1,"button",15),et(),tt(33,"a",29)(34,"mat-icon"),ut(35,"info"),et()()()}if(2&e){const t=qi(14),n=qi(19),r=qi(24),s=qi(31),o=Ct();lt(11),yt("matMenuTriggerFor",t),lt(4),yt("ngForOf",o.demos),lt(),yt("matMenuTriggerFor",n),lt(),Ye("FHIR Server: ",o.selectedServer.name,""),lt(3),yt("ngForOf",o.fhirServers),lt(),yt("matMenuTriggerFor",r),lt(),Ze(o.selectedEdition),lt(5),yt("ngForOf",o.editionsDetails),lt(),yt("matMenuTriggerFor",s),lt(),Ze(o.selectedLanguage),lt(3),yt("ngForOf",o.languages)}}let KQt=(()=>{class e{constructor(t,n,r,s,o,l){this.codingSpecService=t,this.excelService=n,this.terminologyService=r,this.router=s,this.menuService=o,this.activatedRoute=l,this.title="sct-implementation-demonstrator",this.bindingsForExport=[],this.editions=[],this.editionsDetails=[],this.languages=["da","de","en","es","et","fi","fr","nl","no","sv"],this.selectedEdition="Edition",this.selectedLanguage="en",this.fhirServers=[{name:"SNOMED Dev IS",url:"https://dev-is-browser.ihtsdotools.org/fhir"},{name:"SNOMED Public",url:"https://snowstorm.ihtsdotools.org/fhir"},{name:"SNOMED Dev 2",url:"https://snowstorm-temp.kaicode.io/fhir"},{name:"SNOMED Lite Demo",url:"https://snowstorm-lite.nw.r.appspot.com/fhir"}],this.selectedServer=this.fhirServers[1],this.embeddedMode=!1,this.demos=[],this.router.events.subscribe(w=>{w instanceof id&>ag("config","G-7SK998GPMX",{page_path:w.urlAfterRedirects})})}ngOnInit(){this.demos=this.menuService.getDemos(),this.setFhirServer(this.selectedServer),this.bindingsForExport=[];let t=this.codingSpecService.getCodingSpec();for(const n of t)for(const r of n.bindings)this.bindingsForExport.push({section:n.title,title:r.title,ecl:r.ecl.replace(/\s\s+/g," ")});this.activatedRoute.queryParams.subscribe(n=>{this.embeddedMode="true"===n.embedded,n.edition?this.updateCodeSystemOptions(n.edition):this.updateCodeSystemOptions()}),this.terminologyService.lang$.subscribe(n=>{this.selectedLanguage=n}),this.terminologyService.fhirUrlParam$.subscribe(n=>{this.editions?.length>0&&this.editions.forEach(r=>{r.resource.version===n&&(this.selectedEdition=r.resource.title?.replace("SNOMED CT release ",""))})})}navigate(t){"internal"===t.type?this.router.navigate([t.url],{queryParams:t.queryParams}):this.openInNewTab(t.url)}openInNewTab(t){window.open(t,"_blank")}updateCodeSystemOptions(t){this.terminologyService.getCodeSystems().subscribe(n=>{this.editionsDetails=[],this.editions=n.entry;let r=new Set;this.editions.forEach(o=>{r.add(o.resource.title)}),r.forEach(o=>{this.editionsDetails.push({editionName:o,editions:this.editions.filter(l=>l.resource.title.includes(o)).sort(this.compare)})});let s=this.editionsDetails.findIndex(o=>"International Edition"===o.editionName);t?this.editions.forEach(o=>{o.resource.version===t&&this.setEdition(o)}):this.setEdition(s>=0?this.editionsDetails[s].editions[0]:this.editions[0])})}compare(t,n){return t.resource.daten.resource.date?-1:0}setFhirServer(t){this.selectedServer=t,this.terminologyService.setSnowstormFhirBase(t.url),this.selectedEdition="Edition",this.editions=[],this.editionsDetails=[],this.updateCodeSystemOptions()}setEdition(t){this.selectedEdition=t.resource.title?.replace("SNOMED CT release ",""),this.terminologyService.setFhirUrlParam(t.resource.version)}setLanguage(t){this.selectedLanguage=t,this.terminologyService.setLang(t)}static#t=this.\u0275fac=function(n){return new(n||e)(mt(Q8t),mt(CQt),mt(ca),mt(Fo),mt(VJ),mt(Tc))};static#e=this.\u0275cmp=je({type:e,selectors:[["app-root"]],decls:28,vars:12,consts:[["drawer",""],["demosMenuN","matMenu"],["serverMenuN","matMenu"],["editionsMenuN","matMenu"],["menuN","matMenu"],["sub_menu","matMenu"],["demosMenu","matMenu"],["serverMenu","matMenu"],["editionsMenu","matMenu"],["menu","matMenu"],["autosize","",1,"example-container"],["mode","over",1,"example-sidenav"],[1,"flex","flex-col","justify-center"],["mat-button","",3,"matMenuTriggerFor"],[1,"wide-menu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],[1,"ml-4"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-icon-button","","id","menu-button",3,"click"],["href","javascript:void(0)",3,"click"],["src","assets/img/small_logo.png","id","logo"],["id","title"],["id","short-title"],[1,"example-spacer"],["mat-flat-button","","color","accent",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","color","primary",1,"bar-button",3,"matMenuTriggerFor"],["mat-flat-button","","href","https://github.com/IHTSDO/sct-implementation-demonstrator","target","_blank","color","primary","id","info-button"]],template:function(n,r){if(1&n&&(tt(0,"mat-drawer-container",10)(1,"mat-drawer",11,0)(3,"div",12)(4,"button",13),ut(5,"Select Demonstrator"),et(),tt(6,"mat-menu",14,1),Gt(8,VQt,2,1,"button",15),et(),tt(9,"button",13),ut(10),et(),tt(11,"mat-menu",null,2),Gt(13,UQt,2,1,"button",15),et(),tt(14,"button",13),ut(15),et(),tt(16,"mat-menu",14,3)(18,"span",16),ut(19,"Editions"),et(),Gt(20,GQt,8,3,"ng-container",17),et(),tt(21,"button",13),ut(22),et(),tt(23,"mat-menu",null,4),Gt(25,HQt,2,1,"button",15),et()()(),Gt(26,QQt,36,11,"mat-toolbar",18),we(27,"router-outlet"),et()),2&n){const s=qi(7),o=qi(12),l=qi(17),w=qi(24);lt(4),yt("matMenuTriggerFor",s),lt(4),yt("ngForOf",r.demos),lt(),yt("matMenuTriggerFor",o),lt(),Ye("FHIR Server: ",r.selectedServer.name,""),lt(3),yt("ngForOf",r.fhirServers),lt(),yt("matMenuTriggerFor",l),lt(),Ye("Edition: ",r.selectedEdition,""),lt(5),yt("ngForOf",r.editionsDetails),lt(),yt("matMenuTriggerFor",w),lt(),Ye("Language: ",r.selectedLanguage,""),lt(3),yt("ngForOf",r.languages),lt(),yt("ngIf",!r.embeddedMode)}},dependencies:[gs,Ms,oR,DQt,V1t,Sa,Oo,da,bl,Gl,cu,bit,wit],styles:[".mat-toolbar[_ngcontent-%COMP%]{background-color:#434a55;color:#fff;font-size:1.8rem;font-weight:700}button[_ngcontent-%COMP%]{font-weight:700;font-size:medium}.bar-button[_ngcontent-%COMP%]{margin-left:15px}#title[_ngcontent-%COMP%]{margin-left:15px;font-size:1.4rem}.example-spacer[_ngcontent-%COMP%]{flex:1 1 auto}a[_ngcontent-%COMP%]{margin-left:15px} .mat-mdc-menu-panel{max-width:-moz-fit-content!important;max-width:fit-content!important;overflow-x:hidden!important}.mat-mdc-unelevated-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-raised-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%] > .mat-icon[_ngcontent-%COMP%]{margin:0!important}#demo-selector[_ngcontent-%COMP%]{margin:5px 15px;padding:10px}#menu-button[_ngcontent-%COMP%], #short-title[_ngcontent-%COMP%]{display:none}#logo[_ngcontent-%COMP%]{height:4rem}@media (max-width: 768px){#title[_ngcontent-%COMP%]{display:none}#short-title[_ngcontent-%COMP%]{display:block;margin-left:15px;font-size:.9rem}#logo[_ngcontent-%COMP%]{height:3.5rem}#info-button[_ngcontent-%COMP%]{display:none}}@media (max-width: 1200px){.bar-button[_ngcontent-%COMP%]{display:none}#menu-button[_ngcontent-%COMP%]{display:block}}"]})}return e})();function _it(e){return new ue(3e3,!1)}function yf(e){switch(e.length){case 0:return new Dy;case 1:return e[0];default:return new VH(e)}}function Tit(e,i,t=new Map,n=new Map){const r=[],s=[];let o=-1,l=null;if(i.forEach(w=>{const C=w.get("offset"),M=C==o,P=M&&l||new Map;w.forEach((O,L)=>{let U=L,X=O;if("offset"!==L)switch(U=e.normalizePropertyName(U,r),X){case"!":X=t.get(L);break;case ru:X=n.get(L);break;default:X=e.normalizeStyleValue(L,U,X,r)}P.set(U,X)}),M||s.push(P),l=P,o=C}),r.length)throw function yKt(e){return new ue(3502,!1)}();return s}function n4(e,i,t,n){switch(i){case"start":e.onStart(()=>n(t&&r4(t,"start",e)));break;case"done":e.onDone(()=>n(t&&r4(t,"done",e)));break;case"destroy":e.onDestroy(()=>n(t&&r4(t,"destroy",e)))}}function r4(e,i,t){const s=s4(e.element,e.triggerName,e.fromState,e.toState,i||e.phaseName,t.totalTime??e.totalTime,!!t.disabled),o=e._data;return null!=o&&(s._data=o),s}function s4(e,i,t,n,r="",s=0,o){return{element:e,triggerName:i,fromState:t,toState:n,phaseName:r,totalTime:s,disabled:!!o}}function Rl(e,i,t){let n=e.get(i);return n||e.set(i,n=t),n}function Cit(e){const i=e.indexOf(":");return[e.substring(1,i),e.slice(i+1)]}const RKt=typeof document>"u"?null:document.documentElement;function a4(e){const i=e.parentNode||e.host||null;return i===RKt?null:i}let mp=null,Sit=!1;function Eit(e,i){for(;i;){if(i===e)return!0;i=a4(i)}return!1}function Ait(e,i,t){if(t)return Array.from(e.querySelectorAll(i));const n=e.querySelector(i);return n?[n]:[]}let o4=(()=>{class e{validateStyleProperty(t){return function PKt(e){mp||(mp=function FKt(){return typeof document<"u"?document.body:null}()||{},Sit=!!mp.style&&"WebkitAppearance"in mp.style);let i=!0;return mp.style&&!function kKt(e){return"ebkit"==e.substring(1,6)}(e)&&(i=e in mp.style,!i&&Sit&&(i="Webkit"+e.charAt(0).toUpperCase()+e.slice(1)in mp.style)),i}(t)}matchesElement(t,n){return!1}containsElement(t,n){return Eit(t,n)}getParentElement(t){return a4(t)}query(t,n,r){return Ait(t,n,r)}computeStyle(t,n,r){return r||""}animate(t,n,r,s,o,l=[],w){return new Dy(r,s)}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})();class l4{static#t=this.NOOP=new o4}class c4{}const LKt=1e3,d4="ng-enter",wA="ng-leave",_A="ng-trigger",TA=".ng-trigger",Mit="ng-animating",u4=".ng-animating";function ju(e){if("number"==typeof e)return e;const i=e.match(/^(-?[\.\d]+)(m?s)/);return!i||i.length<2?0:h4(parseFloat(i[1]),i[2])}function h4(e,i){return"s"===i?e*LKt:e}function CA(e,i,t){return e.hasOwnProperty("duration")?e:function BKt(e,i,t){let r,s=0,o="";if("string"==typeof e){const l=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===l)return i.push(_it()),{duration:0,delay:0,easing:""};r=h4(parseFloat(l[1]),l[2]);const w=l[3];null!=w&&(s=h4(parseFloat(w),l[4]));const C=l[5];C&&(o=C)}else r=e;if(!t){let l=!1,w=i.length;r<0&&(i.push(function ZQt(){return new ue(3100,!1)}()),l=!0),s<0&&(i.push(function JQt(){return new ue(3101,!1)}()),l=!0),l&&i.splice(w,0,_it())}return{duration:r,delay:s,easing:o}}(e,i,t)}function Id(e,i,t){i.forEach((n,r)=>{const s=m4(r);t&&!t.has(r)&&t.set(r,e.style[s]),e.style[s]=n})}function pp(e,i){i.forEach((t,n)=>{const r=m4(n);e.style[r]=""})}function Q1(e){return Array.isArray(e)?1==e.length?e[0]:function z1t(e,i=null){return{type:Zi.Sequence,steps:e,options:i}}(e):e}const f4=new RegExp("{{\\s*(.+?)\\s*}}","g");function Rit(e){let i=[];if("string"==typeof e){let t;for(;t=f4.exec(e);)i.push(t[1]);f4.lastIndex=0}return i}function K1(e,i,t){const n=`${e}`,r=n.replace(f4,(s,o)=>{let l=i[o];return null==l&&(t.push(function tKt(e){return new ue(3003,!1)}()),l=""),l.toString()});return r==n?e:r}const zKt=/-+([a-z0-9])/g;function m4(e){return e.replace(zKt,(...i)=>i[1].toUpperCase())}function kl(e,i,t){switch(i.type){case Zi.Trigger:return e.visitTrigger(i,t);case Zi.State:return e.visitState(i,t);case Zi.Transition:return e.visitTransition(i,t);case Zi.Sequence:return e.visitSequence(i,t);case Zi.Group:return e.visitGroup(i,t);case Zi.Animate:return e.visitAnimate(i,t);case Zi.Keyframes:return e.visitKeyframes(i,t);case Zi.Style:return e.visitStyle(i,t);case Zi.Reference:return e.visitReference(i,t);case Zi.AnimateChild:return e.visitAnimateChild(i,t);case Zi.AnimateRef:return e.visitAnimateRef(i,t);case Zi.Query:return e.visitQuery(i,t);case Zi.Stagger:return e.visitStagger(i,t);default:throw function eKt(e){return new ue(3004,!1)}()}}function p4(e,i){return window.getComputedStyle(e)[i]}const WKt=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class kit extends c4{normalizePropertyName(i,t){return m4(i)}normalizeStyleValue(i,t,n,r){let s="";const o=n.toString().trim();if(WKt.has(t)&&0!==n&&"0"!==n)if("number"==typeof n)s="px";else{const l=n.match(/^[+-]?[\d\.]+([a-z]*)$/);l&&0==l[1].length&&r.push(function iKt(e,i){return new ue(3005,!1)}())}return o+s}}const SA="*";const EA=new Set(["true","1"]),AA=new Set(["false","0"]);function Pit(e,i){const t=EA.has(e)||AA.has(e),n=EA.has(i)||AA.has(i);return(r,s)=>{let o=e==SA||e==r,l=i==SA||i==s;return!o&&t&&"boolean"==typeof r&&(o=r?EA.has(e):AA.has(e)),!l&&n&&"boolean"==typeof s&&(l=s?EA.has(i):AA.has(i)),o&&l}}const $Kt=new RegExp("s*:selfs*,?","g");function g4(e,i,t,n){return new QKt(e).build(i,t,n)}class QKt{constructor(i){this._driver=i}build(i,t,n){const r=new JKt(t);return this._resetContextStyleTimingState(r),kl(this,Q1(i),r)}_resetContextStyleTimingState(i){i.currentQuerySelector="",i.collectedStyles=new Map,i.collectedStyles.set("",new Map),i.currentTime=0}visitTrigger(i,t){let n=t.queryCount=0,r=t.depCount=0;const s=[],o=[];return"@"==i.name.charAt(0)&&t.errors.push(function nKt(){return new ue(3006,!1)}()),i.definitions.forEach(l=>{if(this._resetContextStyleTimingState(t),l.type==Zi.State){const w=l,C=w.name;C.toString().split(/\s*,\s*/).forEach(M=>{w.name=M,s.push(this.visitState(w,t))}),w.name=C}else if(l.type==Zi.Transition){const w=this.visitTransition(l,t);n+=w.queryCount,r+=w.depCount,o.push(w)}else t.errors.push(function rKt(){return new ue(3007,!1)}())}),{type:Zi.Trigger,name:i.name,states:s,transitions:o,queryCount:n,depCount:r,options:null}}visitState(i,t){const n=this.visitStyle(i.styles,t),r=i.options&&i.options.params||null;if(n.containsDynamicStyles){const s=new Set,o=r||{};n.styles.forEach(l=>{l instanceof Map&&l.forEach(w=>{Rit(w).forEach(C=>{o.hasOwnProperty(C)||s.add(C)})})}),s.size&&t.errors.push(function sKt(e,i){return new ue(3008,!1)}(0,s.values()))}return{type:Zi.State,name:i.name,style:n,options:r?{params:r}:null}}visitTransition(i,t){t.queryCount=0,t.depCount=0;const n=kl(this,Q1(i.animation),t),r=function XKt(e,i){const t=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(n=>function jKt(e,i,t){if(":"==e[0]){const w=function YKt(e,i){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}(e,t);if("function"==typeof w)return void i.push(w);e=w}const n=e.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==n||n.length<4)return t.push(function mKt(e){return new ue(3015,!1)}()),i;const r=n[1],s=n[2],o=n[3];i.push(Pit(r,o)),"<"==s[0]&&(r!=SA||o!=SA)&&i.push(Pit(o,r))}(n,t,i)):t.push(e),t}(i.expr,t.errors);return{type:Zi.Transition,matchers:r,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:gp(i.options)}}visitSequence(i,t){return{type:Zi.Sequence,steps:i.steps.map(n=>kl(this,n,t)),options:gp(i.options)}}visitGroup(i,t){const n=t.currentTime;let r=0;const s=i.steps.map(o=>{t.currentTime=n;const l=kl(this,o,t);return r=Math.max(r,t.currentTime),l});return t.currentTime=r,{type:Zi.Group,steps:s,options:gp(i.options)}}visitAnimate(i,t){const n=function tZt(e,i){if(e.hasOwnProperty("duration"))return e;if("number"==typeof e)return v4(CA(e,i).duration,0,"");const t=e;if(t.split(/\s+/).some(s=>"{"==s.charAt(0)&&"{"==s.charAt(1))){const s=v4(0,0,"");return s.dynamic=!0,s.strValue=t,s}const r=CA(t,i);return v4(r.duration,r.delay,r.easing)}(i.timings,t.errors);t.currentAnimateTimings=n;let r,s=i.styles?i.styles:qe({});if(s.type==Zi.Keyframes)r=this.visitKeyframes(s,t);else{let o=i.styles,l=!1;if(!o){l=!0;const C={};n.easing&&(C.easing=n.easing),o=qe(C)}t.currentTime+=n.duration+n.delay;const w=this.visitStyle(o,t);w.isEmptyStep=l,r=w}return t.currentAnimateTimings=null,{type:Zi.Animate,timings:n,style:r,options:null}}visitStyle(i,t){const n=this._makeStyleAst(i,t);return this._validateStyleAst(n,t),n}_makeStyleAst(i,t){const n=[],r=Array.isArray(i.styles)?i.styles:[i.styles];for(let l of r)"string"==typeof l?l===ru?n.push(l):t.errors.push(new ue(3002,!1)):n.push(new Map(Object.entries(l)));let s=!1,o=null;return n.forEach(l=>{if(l instanceof Map&&(l.has("easing")&&(o=l.get("easing"),l.delete("easing")),!s))for(let w of l.values())if(w.toString().indexOf("{{")>=0){s=!0;break}}),{type:Zi.Style,styles:n,easing:o,offset:i.offset,containsDynamicStyles:s,options:null}}_validateStyleAst(i,t){const n=t.currentAnimateTimings;let r=t.currentTime,s=t.currentTime;n&&s>0&&(s-=n.duration+n.delay),i.styles.forEach(o=>{"string"!=typeof o&&o.forEach((l,w)=>{const C=t.collectedStyles.get(t.currentQuerySelector),M=C.get(w);let P=!0;M&&(s!=r&&s>=M.startTime&&r<=M.endTime&&(t.errors.push(function oKt(e,i,t,n,r){return new ue(3010,!1)}()),P=!1),s=M.startTime),P&&C.set(w,{startTime:s,endTime:r}),t.options&&function UKt(e,i,t){const n=i.params||{},r=Rit(e);r.length&&r.forEach(s=>{n.hasOwnProperty(s)||t.push(function qQt(e){return new ue(3001,!1)}())})}(l,t.options,t.errors)})})}visitKeyframes(i,t){const n={type:Zi.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(function lKt(){return new ue(3011,!1)}()),n;let s=0;const o=[];let l=!1,w=!1,C=0;const M=i.steps.map(Z=>{const rt=this._makeStyleAst(Z,t);let st=null!=rt.offset?rt.offset:function qKt(e){if("string"==typeof e)return null;let i=null;if(Array.isArray(e))e.forEach(t=>{if(t instanceof Map&&t.has("offset")){const n=t;i=parseFloat(n.get("offset")),n.delete("offset")}});else if(e instanceof Map&&e.has("offset")){const t=e;i=parseFloat(t.get("offset")),t.delete("offset")}return i}(rt.styles),vt=0;return null!=st&&(s++,vt=rt.offset=st),w=w||vt<0||vt>1,l=l||vt0&&s{const st=O>0?rt==L?1:O*rt:o[rt],vt=st*W;t.currentTime=U+X.delay+vt,X.duration=vt,this._validateStyleAst(Z,t),Z.offset=st,n.styles.push(Z)}),n}visitReference(i,t){return{type:Zi.Reference,animation:kl(this,Q1(i.animation),t),options:gp(i.options)}}visitAnimateChild(i,t){return t.depCount++,{type:Zi.AnimateChild,options:gp(i.options)}}visitAnimateRef(i,t){return{type:Zi.AnimateRef,animation:this.visitReference(i.animation,t),options:gp(i.options)}}visitQuery(i,t){const n=t.currentQuerySelector,r=i.options||{};t.queryCount++,t.currentQuery=i;const[s,o]=function KKt(e){const i=!!e.split(/\s*,\s*/).find(t=>":self"==t);return i&&(e=e.replace($Kt,"")),e=e.replace(/@\*/g,TA).replace(/@\w+/g,t=>TA+"-"+t.slice(1)).replace(/:animating/g,u4),[e,i]}(i.selector);t.currentQuerySelector=n.length?n+" "+s:s,Rl(t.collectedStyles,t.currentQuerySelector,new Map);const l=kl(this,Q1(i.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:Zi.Query,selector:s,limit:r.limit||0,optional:!!r.optional,includeSelf:o,animation:l,originalSelector:i.selector,options:gp(i.options)}}visitStagger(i,t){t.currentQuery||t.errors.push(function hKt(){return new ue(3013,!1)}());const n="full"===i.timings?{duration:0,delay:0,easing:"full"}:CA(i.timings,t.errors,!0);return{type:Zi.Stagger,animation:kl(this,Q1(i.animation),t),timings:n,options:null}}}class JKt{constructor(i){this.errors=i,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function gp(e){return e?(e={...e}).params&&(e.params=function ZKt(e){return e?{...e}:null}(e.params)):e={},e}function v4(e,i,t){return{duration:e,delay:i,easing:t}}function x4(e,i,t,n,r,s,o=null,l=!1){return{type:1,element:e,keyframes:i,preStyleProps:t,postStyleProps:n,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:l}}class DA{constructor(){this._map=new Map}get(i){return this._map.get(i)||[]}append(i,t){let n=this._map.get(i);n||this._map.set(i,n=[]),n.push(...t)}has(i){return this._map.has(i)}clear(){this._map.clear()}}const nZt=new RegExp(":enter","g"),sZt=new RegExp(":leave","g");function y4(e,i,t,n,r,s=new Map,o=new Map,l,w,C=[]){return(new aZt).buildKeyframes(e,i,t,n,r,s,o,l,w,C)}class aZt{buildKeyframes(i,t,n,r,s,o,l,w,C,M=[]){C=C||new DA;const P=new b4(i,t,C,r,s,M,[]);P.options=w;const O=w.delay?ju(w.delay):0;P.currentTimeline.delayNextStep(O),P.currentTimeline.setStyles([o],null,P.errors,w),kl(this,n,P);const L=P.timelines.filter(U=>U.containsAnimation());if(L.length&&l.size){let U;for(let X=L.length-1;X>=0;X--){const W=L[X];if(W.element===t){U=W;break}}U&&!U.allowOnlyTimelineStyles()&&U.setStyles([l],null,P.errors,w)}return L.length?L.map(U=>U.buildKeyframes()):[x4(t,[],[],[],0,O,"",!1)]}visitTrigger(i,t){}visitState(i,t){}visitTransition(i,t){}visitAnimateChild(i,t){const n=t.subInstructions.get(t.element);if(n){const r=t.createSubContext(i.options),s=t.currentTimeline.currentTime,o=this._visitSubInstructions(n,r,r.options);s!=o&&t.transformIntoNewTimeline(o)}t.previousNode=i}visitAnimateRef(i,t){const n=t.createSubContext(i.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([i.options,i.animation.options],t,n),this.visitReference(i.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=i}_applyAnimationRefDelays(i,t,n){for(const r of i){const s=r?.delay;if(s){const o="number"==typeof s?s:ju(K1(s,r?.params??{},t.errors));n.delayNextStep(o)}}}_visitSubInstructions(i,t,n){let s=t.currentTimeline.currentTime;const o=null!=n.duration?ju(n.duration):null,l=null!=n.delay?ju(n.delay):null;return 0!==o&&i.forEach(w=>{const C=t.appendInstructionToTimeline(w,o,l);s=Math.max(s,C.duration+C.delay)}),s}visitReference(i,t){t.updateOptions(i.options,!0),kl(this,i.animation,t),t.previousNode=i}visitSequence(i,t){const n=t.subContextCount;let r=t;const s=i.options;if(s&&(s.params||s.delay)&&(r=t.createSubContext(s),r.transformIntoNewTimeline(),null!=s.delay)){r.previousNode.type==Zi.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=MA);const o=ju(s.delay);r.delayNextStep(o)}i.steps.length&&(i.steps.forEach(o=>kl(this,o,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=i}visitGroup(i,t){const n=[];let r=t.currentTimeline.currentTime;const s=i.options&&i.options.delay?ju(i.options.delay):0;i.steps.forEach(o=>{const l=t.createSubContext(i.options);s&&l.delayNextStep(s),kl(this,o,l),r=Math.max(r,l.currentTimeline.currentTime),n.push(l.currentTimeline)}),n.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(r),t.previousNode=i}_visitTiming(i,t){if(i.dynamic){const n=i.strValue;return CA(t.params?K1(n,t.params,t.errors):n,t.errors)}return{duration:i.duration,delay:i.delay,easing:i.easing}}visitAnimate(i,t){const n=t.currentAnimateTimings=this._visitTiming(i.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());const s=i.style;s.type==Zi.Keyframes?this.visitKeyframes(s,t):(t.incrementTime(n.duration),this.visitStyle(s,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=i}visitStyle(i,t){const n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();const s=r&&r.easing||i.easing;i.isEmptyStep?n.applyEmptyStep(s):n.setStyles(i.styles,s,t.errors,t.options),t.previousNode=i}visitKeyframes(i,t){const n=t.currentAnimateTimings,r=t.currentTimeline.duration,s=n.duration,l=t.createSubContext().currentTimeline;l.easing=n.easing,i.styles.forEach(w=>{l.forwardTime((w.offset||0)*s),l.setStyles(w.styles,w.easing,t.errors,t.options),l.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(l),t.transformIntoNewTimeline(r+s),t.previousNode=i}visitQuery(i,t){const n=t.currentTimeline.currentTime,r=i.options||{},s=r.delay?ju(r.delay):0;s&&(t.previousNode.type===Zi.Style||0==n&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=MA);let o=n;const l=t.invokeQuery(i.selector,i.originalSelector,i.limit,i.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=l.length;let w=null;l.forEach((C,M)=>{t.currentQueryIndex=M;const P=t.createSubContext(i.options,C);s&&P.delayNextStep(s),C===t.element&&(w=P.currentTimeline),kl(this,i.animation,P),P.currentTimeline.applyStylesToKeyframe(),o=Math.max(o,P.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),w&&(t.currentTimeline.mergeTimelineCollectedStyles(w),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=i}visitStagger(i,t){const n=t.parentContext,r=t.currentTimeline,s=i.timings,o=Math.abs(s.duration),l=o*(t.currentQueryTotal-1);let w=o*t.currentQueryIndex;switch(s.duration<0?"reverse":s.easing){case"reverse":w=l-w;break;case"full":w=n.currentStaggerTime}const M=t.currentTimeline;w&&M.delayNextStep(w);const P=M.currentTime;kl(this,i.animation,t),t.previousNode=i,n.currentStaggerTime=r.currentTime-P+(r.startTime-n.currentTimeline.startTime)}}const MA={};class b4{constructor(i,t,n,r,s,o,l,w){this._driver=i,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=s,this.errors=o,this.timelines=l,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=MA,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=w||new IA(this._driver,t,0),l.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(i,t){if(!i)return;const n=i;let r=this.options;null!=n.duration&&(r.duration=ju(n.duration)),null!=n.delay&&(r.delay=ju(n.delay));const s=n.params;if(s){let o=r.params;o||(o=this.options.params={}),Object.keys(s).forEach(l=>{(!t||!o.hasOwnProperty(l))&&(o[l]=K1(s[l],o,this.errors))})}}_copyOptions(){const i={};if(this.options){const t=this.options.params;if(t){const n=i.params={};Object.keys(t).forEach(r=>{n[r]=t[r]})}}return i}createSubContext(i=null,t,n){const r=t||this.element,s=new b4(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return s.previousNode=this.previousNode,s.currentAnimateTimings=this.currentAnimateTimings,s.options=this._copyOptions(),s.updateOptions(i),s.currentQueryIndex=this.currentQueryIndex,s.currentQueryTotal=this.currentQueryTotal,s.parentContext=this,this.subContextCount++,s}transformIntoNewTimeline(i){return this.previousNode=MA,this.currentTimeline=this.currentTimeline.fork(this.element,i),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(i,t,n){const r={duration:t??i.duration,delay:this.currentTimeline.currentTime+(n??0)+i.delay,easing:""},s=new oZt(this._driver,i.element,i.keyframes,i.preStyleProps,i.postStyleProps,r,i.stretchStartingKeyframe);return this.timelines.push(s),r}incrementTime(i){this.currentTimeline.forwardTime(this.currentTimeline.duration+i)}delayNextStep(i){i>0&&this.currentTimeline.delayNextStep(i)}invokeQuery(i,t,n,r,s,o){let l=[];if(r&&l.push(this.element),i.length>0){i=(i=i.replace(nZt,"."+this._enterClassName)).replace(sZt,"."+this._leaveClassName);let C=this._driver.query(this.element,i,1!=n);0!==n&&(C=n<0?C.slice(C.length+n,C.length):C.slice(0,n)),l.push(...C)}return!s&&0==l.length&&o.push(function fKt(e){return new ue(3014,!1)}()),l}}class IA{constructor(i,t,n,r){this._driver=i,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(i){const t=1===this._keyframes.size&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+i),t&&this.snapshotCurrentStyles()):this.startTime+=i}fork(i,t){return this.applyStylesToKeyframe(),new IA(this._driver,i,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(i){this.applyStylesToKeyframe(),this.duration=i,this._loadKeyframe()}_updateStyle(i,t){this._localTimelineStyles.set(i,t),this._globalTimelineStyles.set(i,t),this._styleSummary.set(i,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(i){i&&this._previousKeyframe.set("easing",i);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||ru),this._currentKeyframe.set(t,ru);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(i,t,n,r){t&&this._previousKeyframe.set("easing",t);const s=r&&r.params||{},o=function lZt(e,i){const t=new Map;let n;return e.forEach(r=>{if("*"===r){n??=i.keys();for(let s of n)t.set(s,ru)}else for(let[s,o]of r)t.set(s,o)}),t}(i,this._globalTimelineStyles);for(let[l,w]of o){const C=K1(w,s,n);this._pendingStyles.set(l,C),this._localTimelineStyles.has(l)||this._backFill.set(l,this._globalTimelineStyles.get(l)??ru),this._updateStyle(l,C)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((i,t)=>{this._currentKeyframe.set(t,i)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((i,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,i)}))}snapshotCurrentStyles(){for(let[i,t]of this._localTimelineStyles)this._pendingStyles.set(i,t),this._updateStyle(i,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const i=[];for(let t in this._currentKeyframe)i.push(t);return i}mergeTimelineCollectedStyles(i){i._styleSummary.forEach((t,n)=>{const r=this._styleSummary.get(n);(!r||t.time>r.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();const i=new Set,t=new Set,n=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((l,w)=>{const C=new Map([...this._backFill,...l]);C.forEach((M,P)=>{"!"===M?i.add(P):M===ru&&t.add(P)}),n||C.set("offset",w/this.duration),r.push(C)});const s=[...i.values()],o=[...t.values()];if(n){const l=r[0],w=new Map(l);l.set("offset",0),w.set("offset",1),r=[l,w]}return x4(this.element,r,s,o,this.duration,this.startTime,this.easing,!1)}}class oZt extends IA{constructor(i,t,n,r,s,o,l=!1){super(i,t,o.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=s,this._stretchStartingKeyframe=l,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let i=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){const s=[],o=n+t,l=t/o,w=new Map(i[0]);w.set("offset",0),s.push(w);const C=new Map(i[0]);C.set("offset",Lit(l)),s.push(C);const M=i.length-1;for(let P=1;P<=M;P++){let O=new Map(i[P]);const L=O.get("offset");O.set("offset",Lit((t+L*n)/o)),s.push(O)}n=o,t=0,r="",i=s}return x4(this.element,i,this.preStyleProps,this.postStyleProps,n,t,r,!0)}}function Lit(e,i=3){const t=Math.pow(10,i-1);return Math.round(e*t)/t}function Nit(e,i,t,n,r,s,o,l,w,C,M,P,O){return{type:0,element:e,triggerName:i,isRemovalTransition:r,fromState:t,fromStyles:s,toState:n,toStyles:o,timelines:l,queriedElements:w,preStyleProps:C,postStyleProps:M,totalTime:P,errors:O}}const w4={};class Bit{constructor(i,t,n){this._triggerName=i,this.ast=t,this._stateStyles=n}match(i,t,n,r){return function cZt(e,i,t,n,r){return e.some(s=>s(i,t,n,r))}(this.ast.matchers,i,t,n,r)}buildStyles(i,t,n){let r=this._stateStyles.get("*");return void 0!==i&&(r=this._stateStyles.get(i?.toString())||r),r?r.buildStyles(t,n):new Map}build(i,t,n,r,s,o,l,w,C,M){const P=[],O=this.ast.options&&this.ast.options.params||w4,U=this.buildStyles(n,l&&l.params||w4,P),X=w&&w.params||w4,W=this.buildStyles(r,X,P),Z=new Set,rt=new Map,st=new Map,vt="void"===r,_t={params:Vit(X,O),delay:this.ast.options?.delay},Mt=M?[]:y4(i,t,this.ast.animation,s,o,U,W,_t,C,P);let ft=0;return Mt.forEach(dt=>{ft=Math.max(dt.duration+dt.delay,ft)}),P.length?Nit(t,this._triggerName,n,r,vt,U,W,[],[],rt,st,ft,P):(Mt.forEach(dt=>{const pt=dt.element,bt=Rl(rt,pt,new Set);dt.preStyleProps.forEach(Et=>bt.add(Et));const Tt=Rl(st,pt,new Set);dt.postStyleProps.forEach(Et=>Tt.add(Et)),pt!==t&&Z.add(pt)}),Nit(t,this._triggerName,n,r,vt,U,W,Mt,[...Z.values()],rt,st,ft))}}function Vit(e,i){const t={...i};return Object.entries(e).forEach(([n,r])=>{null!=r&&(t[n]=r)}),t}class dZt{constructor(i,t,n){this.styles=i,this.defaultParams=t,this.normalizer=n}buildStyles(i,t){const n=new Map,r=Vit(i,this.defaultParams);return this.styles.styles.forEach(s=>{"string"!=typeof s&&s.forEach((o,l)=>{o&&(o=K1(o,r,t));const w=this.normalizer.normalizePropertyName(l,t);o=this.normalizer.normalizeStyleValue(l,w,o,t),n.set(l,o)})}),n}}class hZt{constructor(i,t,n){this.name=i,this.ast=t,this._normalizer=n,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{this.states.set(r.name,new dZt(r.style,r.options&&r.options.params||{},n))}),Uit(this.states,"true","1"),Uit(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new Bit(i,r,this.states))}),this.fallbackTransition=function fZt(e,i,t){return new Bit(e,{type:Zi.Transition,animation:{type:Zi.Sequence,steps:[],options:null},matchers:[(o,l)=>!0],options:null,queryCount:0,depCount:0},i)}(i,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(i,t,n,r){return this.transitionFactories.find(o=>o.match(i,t,n,r))||null}matchStyles(i,t,n){return this.fallbackTransition.buildStyles(i,t,n)}}function Uit(e,i,t){e.has(i)?e.has(t)||e.set(t,e.get(i)):e.has(t)&&e.set(i,e.get(t))}const mZt=new DA;class pZt{constructor(i,t,n){this.bodyNode=i,this._driver=t,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(i,t){const n=[],s=g4(this._driver,t,n,[]);if(n.length)throw function bKt(e){return new ue(3503,!1)}();this._animations.set(i,s)}_buildPlayer(i,t,n){const r=i.element,s=Tit(this._normalizer,i.keyframes,t,n);return this._driver.animate(r,s,i.duration,i.delay,i.easing,[],!0)}create(i,t,n={}){const r=[],s=this._animations.get(i);let o;const l=new Map;if(s?(o=y4(this._driver,t,s,d4,wA,new Map,new Map,n,mZt,r),o.forEach(M=>{const P=Rl(l,M.element,new Map);M.postStyleProps.forEach(O=>P.set(O,null))})):(r.push(function wKt(){return new ue(3300,!1)}()),o=[]),r.length)throw function _Kt(e){return new ue(3504,!1)}();l.forEach((M,P)=>{M.forEach((O,L)=>{M.set(L,this._driver.computeStyle(P,L,ru))})});const C=yf(o.map(M=>{const P=l.get(M.element);return this._buildPlayer(M,new Map,P)}));return this._playersById.set(i,C),C.onDestroy(()=>this.destroy(i)),this.players.push(C),C}destroy(i){const t=this._getPlayer(i);t.destroy(),this._playersById.delete(i);const n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(i){const t=this._playersById.get(i);if(!t)throw function TKt(e){return new ue(3301,!1)}();return t}listen(i,t,n,r){const s=s4(t,"","","");return n4(this._getPlayer(i),n,s,r),()=>{}}command(i,t,n,r){if("register"==n)return void this.register(i,r[0]);if("create"==n)return void this.create(i,t,r[0]||{});const s=this._getPlayer(i);switch(n){case"play":s.play();break;case"pause":s.pause();break;case"reset":s.reset();break;case"restart":s.restart();break;case"finish":s.finish();break;case"init":s.init();break;case"setPosition":s.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(i)}}}const zit="ng-animate-queued",_4="ng-animate-disabled",bZt=[],Git={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},wZt={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Fc="__ng_removed";class T4{get params(){return this.options.params}constructor(i,t=""){this.namespaceId=t;const n=i&&i.hasOwnProperty("value");if(this.value=function SZt(e){return e??null}(n?i.value:i),n){const{value:s,...o}=i;this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(i){const t=i.params;if(t){const n=this.options.params;Object.keys(t).forEach(r=>{null==n[r]&&(n[r]=t[r])})}}}const Z1="void",C4=new T4(Z1);class _Zt{constructor(i,t,n){this.id=i,this.hostElement=t,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+i,sc(t,this._hostClassName)}listen(i,t,n,r){if(!this._triggers.has(t))throw function CKt(e,i){return new ue(3302,!1)}();if(null==n||0==n.length)throw function SKt(e){return new ue(3303,!1)}();if(!function EZt(e){return"start"==e||"done"==e}(n))throw function EKt(e,i){return new ue(3400,!1)}();const s=Rl(this._elementListeners,i,[]),o={name:t,phase:n,callback:r};s.push(o);const l=Rl(this._engine.statesByElement,i,new Map);return l.has(t)||(sc(i,_A),sc(i,_A+"-"+t),l.set(t,C4)),()=>{this._engine.afterFlush(()=>{const w=s.indexOf(o);w>=0&&s.splice(w,1),this._triggers.has(t)||l.delete(t)})}}register(i,t){return!this._triggers.has(i)&&(this._triggers.set(i,t),!0)}_getTrigger(i){const t=this._triggers.get(i);if(!t)throw function AKt(e){return new ue(3401,!1)}();return t}trigger(i,t,n,r=!0){const s=this._getTrigger(t),o=new S4(this.id,t,i);let l=this._engine.statesByElement.get(i);l||(sc(i,_A),sc(i,_A+"-"+t),this._engine.statesByElement.set(i,l=new Map));let w=l.get(t);const C=new T4(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&w&&C.absorbOptions(w.options),l.set(t,C),w||(w=C4),C.value!==Z1&&w.value===C.value){if(!function MZt(e,i){const t=Object.keys(e),n=Object.keys(i);if(t.length!=n.length)return!1;for(let r=0;r{pp(i,W),Id(i,Z)})}return}const O=Rl(this._engine.playersByElement,i,[]);O.forEach(X=>{X.namespaceId==this.id&&X.triggerName==t&&X.queued&&X.destroy()});let L=s.matchTransition(w.value,C.value,i,C.params),U=!1;if(!L){if(!r)return;L=s.fallbackTransition,U=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:t,transition:L,fromState:w,toState:C,player:o,isFallbackTransition:U}),U||(sc(i,zit),o.onStart(()=>{S0(i,zit)})),o.onDone(()=>{let X=this.players.indexOf(o);X>=0&&this.players.splice(X,1);const W=this._engine.playersByElement.get(i);if(W){let Z=W.indexOf(o);Z>=0&&W.splice(Z,1)}}),this.players.push(o),O.push(o),o}deregister(i){this._triggers.delete(i),this._engine.statesByElement.forEach(t=>t.delete(i)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(r=>r.name!=i))})}clearElementCache(i){this._engine.statesByElement.delete(i),this._elementListeners.delete(i);const t=this._engine.playersByElement.get(i);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(i))}_signalRemovalForInnerTriggers(i,t){const n=this._engine.driver.query(i,TA,!0);n.forEach(r=>{if(r[Fc])return;const s=this._engine.fetchNamespacesByElement(r);s.size?s.forEach(o=>o.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(i,t,n,r){const s=this._engine.statesByElement.get(i),o=new Map;if(s){const l=[];if(s.forEach((w,C)=>{if(o.set(C,w.value),this._triggers.has(C)){const M=this.trigger(i,C,Z1,r);M&&l.push(M)}}),l.length)return this._engine.markElementAsRemoved(this.id,i,!0,t,o),n&&yf(l).onDone(()=>this._engine.processLeaveNode(i)),!0}return!1}prepareLeaveAnimationListeners(i){const t=this._elementListeners.get(i),n=this._engine.statesByElement.get(i);if(t&&n){const r=new Set;t.forEach(s=>{const o=s.name;if(r.has(o))return;r.add(o);const w=this._triggers.get(o).fallbackTransition,C=n.get(o)||C4,M=new T4(Z1),P=new S4(this.id,o,i);this._engine.totalQueuedPlayers++,this._queue.push({element:i,triggerName:o,transition:w,fromState:C,toState:M,player:P,isFallbackTransition:!0})})}}removeNode(i,t){const n=this._engine;if(i.childElementCount&&this._signalRemovalForInnerTriggers(i,t),this.triggerLeaveAnimation(i,t,!0))return;let r=!1;if(n.totalAnimations){const s=n.players.length?n.playersByQueriedElement.get(i):[];if(s&&s.length)r=!0;else{let o=i;for(;o=o.parentNode;)if(n.statesByElement.get(o)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(i),r)n.markElementAsRemoved(this.id,i,!1,t);else{const s=i[Fc];(!s||s===Git)&&(n.afterFlush(()=>this.clearElementCache(i)),n.destroyInnerAnimations(i),n._onRemovalComplete(i,t))}}insertNode(i,t){sc(i,this._hostClassName)}drainQueuedTransitions(i){const t=[];return this._queue.forEach(n=>{const r=n.player;if(r.destroyed)return;const s=n.element,o=this._elementListeners.get(s);o&&o.forEach(l=>{if(l.name==n.triggerName){const w=s4(s,n.triggerName,n.fromState.value,n.toState.value);w._data=i,n4(n.player,l.phase,w,l.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((n,r)=>{const s=n.transition.ast.depCount,o=r.transition.ast.depCount;return 0==s||0==o?s-o:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(i){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,i)}}class TZt{_onRemovalComplete(i,t){this.onRemovalComplete(i,t)}constructor(i,t,n,r){this.bodyNode=i,this.driver=t,this._normalizer=n,this.scheduler=r,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(s,o)=>{}}get queuedPlayers(){const i=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&i.push(n)})}),i}createNamespace(i,t){const n=new _Zt(i,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[i]=n}_balanceNamespaceList(i,t){const n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let o=!1,l=this.driver.getParentElement(t);for(;l;){const w=r.get(l);if(w){const C=n.indexOf(w);n.splice(C+1,0,i),o=!0;break}l=this.driver.getParentElement(l)}o||n.unshift(i)}else n.push(i);return r.set(t,i),i}register(i,t){let n=this._namespaceLookup[i];return n||(n=this.createNamespace(i,t)),n}registerTrigger(i,t,n){let r=this._namespaceLookup[i];r&&r.register(t,n)&&this.totalAnimations++}destroy(i,t){i&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{const n=this._fetchNamespace(i);this.namespacesByHostElement.delete(n.hostElement);const r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(t),delete this._namespaceLookup[i]}))}_fetchNamespace(i){return this._namespaceLookup[i]}fetchNamespacesByElement(i){const t=new Set,n=this.statesByElement.get(i);if(n)for(let r of n.values())if(r.namespaceId){const s=this._fetchNamespace(r.namespaceId);s&&t.add(s)}return t}trigger(i,t,n,r){if(RA(t)){const s=this._fetchNamespace(i);if(s)return s.trigger(t,n,r),!0}return!1}insertNode(i,t,n,r){if(!RA(t))return;const s=t[Fc];if(s&&s.setForRemoval){s.setForRemoval=!1,s.setForMove=!0;const o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(i){const o=this._fetchNamespace(i);o&&o.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(i){this.collectedEnterElements.push(i)}markElementAsDisabled(i,t){t?this.disabledNodes.has(i)||(this.disabledNodes.add(i),sc(i,_4)):this.disabledNodes.has(i)&&(this.disabledNodes.delete(i),S0(i,_4))}removeNode(i,t,n){if(RA(t)){this.scheduler?.notify();const r=i?this._fetchNamespace(i):null;r?r.removeNode(t,n):this.markElementAsRemoved(i,t,!1,n);const s=this.namespacesByHostElement.get(t);s&&s.id!==i&&s.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(i,t,n,r,s){this.collectedLeaveElements.push(t),t[Fc]={namespaceId:i,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:s}}listen(i,t,n,r,s){return RA(t)?this._fetchNamespace(i).listen(t,n,r,s):()=>{}}_buildInstruction(i,t,n,r,s){return i.transition.build(this.driver,i.element,i.fromState.value,i.toState.value,n,r,i.fromState.options,i.toState.options,t,s)}destroyInnerAnimations(i){let t=this.driver.query(i,TA,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(i,u4,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(i){const t=this.playersByElement.get(i);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(i){const t=this.playersByQueriedElement.get(i);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(i=>{if(this.players.length)return yf(this.players).onDone(()=>i());i()})}processLeaveNode(i){const t=i[Fc];if(t&&t.setForRemoval){if(i[Fc]=Git,t.namespaceId){this.destroyInnerAnimations(i);const n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(i)}this._onRemovalComplete(i,t.setForRemoval)}i.classList?.contains(_4)&&this.markElementAsDisabled(i,!1),this.driver.query(i,".ng-animate-disabled",!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(i=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){const n=this._whenQuietFns;this._whenQuietFns=[],t.length?yf(t).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(i){throw function DKt(e){return new ue(3402,!1)}()}_flushAnimations(i,t){const n=new DA,r=[],s=new Map,o=[],l=new Map,w=new Map,C=new Map,M=new Set;this.disabledNodes.forEach(fe=>{M.add(fe);const Qt=this.driver.query(fe,".ng-animate-queued",!0);for(let _e=0;_e{const _e=d4+X++;U.set(Qt,_e),fe.forEach(Ne=>sc(Ne,_e))});const W=[],Z=new Set,rt=new Set;for(let fe=0;feZ.add(Ne)):rt.add(Qt))}const st=new Map,vt=Xit(O,Array.from(Z));vt.forEach((fe,Qt)=>{const _e=wA+X++;st.set(Qt,_e),fe.forEach(Ne=>sc(Ne,_e))}),i.push(()=>{L.forEach((fe,Qt)=>{const _e=U.get(Qt);fe.forEach(Ne=>S0(Ne,_e))}),vt.forEach((fe,Qt)=>{const _e=st.get(Qt);fe.forEach(Ne=>S0(Ne,_e))}),W.forEach(fe=>{this.processLeaveNode(fe)})});const _t=[],Mt=[];for(let fe=this._namespaceList.length-1;fe>=0;fe--)this._namespaceList[fe].drainQueuedTransitions(t).forEach(_e=>{const Ne=_e.player,Se=_e.element;if(_t.push(Ne),this.collectedEnterElements.length){const ni=Se[Fc];if(ni&&ni.setForMove){if(ni.previousTriggersValues&&ni.previousTriggersValues.has(_e.triggerName)){const Ft=ni.previousTriggersValues.get(_e.triggerName),jt=this.statesByElement.get(_e.element);if(jt&&jt.has(_e.triggerName)){const Xt=jt.get(_e.triggerName);Xt.value=Ft,jt.set(_e.triggerName,Xt)}}return void Ne.destroy()}}const Ei=!P||!this.driver.containsElement(P,Se),Kt=st.get(Se),ke=U.get(Se),Ce=this._buildInstruction(_e,n,ke,Kt,Ei);if(Ce.errors&&Ce.errors.length)return void Mt.push(Ce);if(Ei)return Ne.onStart(()=>pp(Se,Ce.fromStyles)),Ne.onDestroy(()=>Id(Se,Ce.toStyles)),void r.push(Ne);if(_e.isFallbackTransition)return Ne.onStart(()=>pp(Se,Ce.fromStyles)),Ne.onDestroy(()=>Id(Se,Ce.toStyles)),void r.push(Ne);const oi=[];Ce.timelines.forEach(ni=>{ni.stretchStartingKeyframe=!0,this.disabledNodes.has(ni.element)||oi.push(ni)}),Ce.timelines=oi,n.append(Se,Ce.timelines),o.push({instruction:Ce,player:Ne,element:Se}),Ce.queriedElements.forEach(ni=>Rl(l,ni,[]).push(Ne)),Ce.preStyleProps.forEach((ni,Ft)=>{if(ni.size){let jt=w.get(Ft);jt||w.set(Ft,jt=new Set),ni.forEach((Xt,Ht)=>jt.add(Ht))}}),Ce.postStyleProps.forEach((ni,Ft)=>{let jt=C.get(Ft);jt||C.set(Ft,jt=new Set),ni.forEach((Xt,Ht)=>jt.add(Ht))})});if(Mt.length){const fe=[];Mt.forEach(Qt=>{fe.push(function MKt(e,i){return new ue(3505,!1)}())}),_t.forEach(Qt=>Qt.destroy()),this.reportError(fe)}const ft=new Map,dt=new Map;o.forEach(fe=>{const Qt=fe.element;n.has(Qt)&&(dt.set(Qt,Qt),this._beforeAnimationBuild(fe.player.namespaceId,fe.instruction,ft))}),r.forEach(fe=>{const Qt=fe.element;this._getPreviousPlayers(Qt,!1,fe.namespaceId,fe.triggerName,null).forEach(Ne=>{Rl(ft,Qt,[]).push(Ne),Ne.destroy()})});const pt=W.filter(fe=>Yit(fe,w,C)),bt=new Map;Wit(bt,this.driver,rt,C,ru).forEach(fe=>{Yit(fe,w,C)&&pt.push(fe)});const Et=new Map;L.forEach((fe,Qt)=>{Wit(Et,this.driver,new Set(fe),w,"!")}),pt.forEach(fe=>{const Qt=bt.get(fe),_e=Et.get(fe);bt.set(fe,new Map([...Qt?.entries()??[],..._e?.entries()??[]]))});const Dt=[],Le=[],ge={};o.forEach(fe=>{const{element:Qt,player:_e,instruction:Ne}=fe;if(n.has(Qt)){if(M.has(Qt))return _e.onDestroy(()=>Id(Qt,Ne.toStyles)),_e.disabled=!0,_e.overrideTotalTime(Ne.totalTime),void r.push(_e);let Se=ge;if(dt.size>1){let Kt=Qt;const ke=[];for(;Kt=Kt.parentNode;){const Ce=dt.get(Kt);if(Ce){Se=Ce;break}ke.push(Kt)}ke.forEach(Ce=>dt.set(Ce,Se))}const Ei=this._buildAnimation(_e.namespaceId,Ne,ft,s,Et,bt);if(_e.setRealPlayer(Ei),Se===ge)Dt.push(_e);else{const Kt=this.playersByElement.get(Se);Kt&&Kt.length&&(_e.parentPlayer=yf(Kt)),r.push(_e)}}else pp(Qt,Ne.fromStyles),_e.onDestroy(()=>Id(Qt,Ne.toStyles)),Le.push(_e),M.has(Qt)&&r.push(_e)}),Le.forEach(fe=>{const Qt=s.get(fe.element);if(Qt&&Qt.length){const _e=yf(Qt);fe.setRealPlayer(_e)}}),r.forEach(fe=>{fe.parentPlayer?fe.syncPlayerEvents(fe.parentPlayer):fe.destroy()});for(let fe=0;fe!Ei.destroyed);Se.length?AZt(this,Qt,Se):this.processLeaveNode(Qt)}return W.length=0,Dt.forEach(fe=>{this.players.push(fe),fe.onDone(()=>{fe.destroy();const Qt=this.players.indexOf(fe);this.players.splice(Qt,1)}),fe.play()}),Dt}afterFlush(i){this._flushFns.push(i)}afterFlushAnimationsDone(i){this._whenQuietFns.push(i)}_getPreviousPlayers(i,t,n,r,s){let o=[];if(t){const l=this.playersByQueriedElement.get(i);l&&(o=l)}else{const l=this.playersByElement.get(i);if(l){const w=!s||s==Z1;l.forEach(C=>{C.queued||!w&&C.triggerName!=r||o.push(C)})}}return(n||r)&&(o=o.filter(l=>!(n&&n!=l.namespaceId||r&&r!=l.triggerName))),o}_beforeAnimationBuild(i,t,n){const s=t.element,o=t.isRemovalTransition?void 0:i,l=t.isRemovalTransition?void 0:t.triggerName;for(const w of t.timelines){const C=w.element,M=C!==s,P=Rl(n,C,[]);this._getPreviousPlayers(C,M,o,l,t.toState).forEach(L=>{const U=L.getRealPlayer();U.beforeDestroy&&U.beforeDestroy(),L.destroy(),P.push(L)})}pp(s,t.fromStyles)}_buildAnimation(i,t,n,r,s,o){const l=t.triggerName,w=t.element,C=[],M=new Set,P=new Set,O=t.timelines.map(U=>{const X=U.element;M.add(X);const W=X[Fc];if(W&&W.removedBeforeQueried)return new Dy(U.duration,U.delay);const Z=X!==w,rt=function DZt(e){const i=[];return jit(e,i),i}((n.get(X)||bZt).map(ft=>ft.getRealPlayer())).filter(ft=>!!ft.element&&ft.element===X),st=s.get(X),vt=o.get(X),_t=Tit(this._normalizer,U.keyframes,st,vt),Mt=this._buildPlayer(U,_t,rt);if(U.subTimeline&&r&&P.add(X),Z){const ft=new S4(i,l,X);ft.setRealPlayer(Mt),C.push(ft)}return Mt});C.forEach(U=>{Rl(this.playersByQueriedElement,U.element,[]).push(U),U.onDone(()=>function CZt(e,i,t){let n=e.get(i);if(n){if(n.length){const r=n.indexOf(t);n.splice(r,1)}0==n.length&&e.delete(i)}return n}(this.playersByQueriedElement,U.element,U))}),M.forEach(U=>sc(U,Mit));const L=yf(O);return L.onDestroy(()=>{M.forEach(U=>S0(U,Mit)),Id(w,t.toStyles)}),P.forEach(U=>{Rl(r,U,[]).push(L)}),L}_buildPlayer(i,t,n){return t.length>0?this.driver.animate(i.element,t,i.duration,i.delay,i.easing,n):new Dy(i.duration,i.delay)}}class S4{constructor(i,t,n){this.namespaceId=i,this.triggerName=t,this.element=n,this._player=new Dy,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(i){this._containsRealPlayer||(this._player=i,this._queuedCallbacks.forEach((t,n)=>{t.forEach(r=>n4(i,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(i.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(i){this.totalTime=i}syncPlayerEvents(i){const t=this._player;t.triggerCallback&&i.onStart(()=>t.triggerCallback("start")),i.onDone(()=>this.finish()),i.onDestroy(()=>this.destroy())}_queueEvent(i,t){Rl(this._queuedCallbacks,i,[]).push(t)}onDone(i){this.queued&&this._queueEvent("done",i),this._player.onDone(i)}onStart(i){this.queued&&this._queueEvent("start",i),this._player.onStart(i)}onDestroy(i){this.queued&&this._queueEvent("destroy",i),this._player.onDestroy(i)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(i){this.queued||this._player.setPosition(i)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(i){const t=this._player;t.triggerCallback&&t.triggerCallback(i)}}function RA(e){return e&&1===e.nodeType}function Hit(e,i){const t=e.style.display;return e.style.display=i??"none",t}function Wit(e,i,t,n,r){const s=[];t.forEach(w=>s.push(Hit(w)));const o=[];n.forEach((w,C)=>{const M=new Map;w.forEach(P=>{const O=i.computeStyle(C,P,r);M.set(P,O),(!O||0==O.length)&&(C[Fc]=wZt,o.push(C))}),e.set(C,M)});let l=0;return t.forEach(w=>Hit(w,s[l++])),o}function Xit(e,i){const t=new Map;if(e.forEach(l=>t.set(l,[])),0==i.length)return t;const r=new Set(i),s=new Map;function o(l){if(!l)return 1;let w=s.get(l);if(w)return w;const C=l.parentNode;return w=t.has(C)?C:r.has(C)?1:o(C),s.set(l,w),w}return i.forEach(l=>{const w=o(l);1!==w&&t.get(w).push(l)}),t}function sc(e,i){e.classList?.add(i)}function S0(e,i){e.classList?.remove(i)}function AZt(e,i,t){yf(t).onDone(()=>e.processLeaveNode(i))}function jit(e,i){for(let t=0;tr.add(s)):i.set(e,n),t.delete(e),!0}class J1{constructor(i,t,n,r){this._driver=t,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(s,o)=>{},this._transitionEngine=new TZt(i.body,t,n,r),this._timelineEngine=new pZt(i.body,t,n),this._transitionEngine.onRemovalComplete=(s,o)=>this.onRemovalComplete(s,o)}registerTrigger(i,t,n,r,s){const o=i+"-"+r;let l=this._triggerCache[o];if(!l){const w=[],M=g4(this._driver,s,w,[]);if(w.length)throw function xKt(e,i){return new ue(3404,!1)}();l=function uZt(e,i,t){return new hZt(e,i,t)}(r,M,this._normalizer),this._triggerCache[o]=l}this._transitionEngine.registerTrigger(t,r,l)}register(i,t){this._transitionEngine.register(i,t)}destroy(i,t){this._transitionEngine.destroy(i,t)}onInsert(i,t,n,r){this._transitionEngine.insertNode(i,t,n,r)}onRemove(i,t,n){this._transitionEngine.removeNode(i,t,n)}disableAnimations(i,t){this._transitionEngine.markElementAsDisabled(i,t)}process(i,t,n,r){if("@"==n.charAt(0)){const[s,o]=Cit(n);this._timelineEngine.command(s,t,o,r)}else this._transitionEngine.trigger(i,t,n,r)}listen(i,t,n,r,s){if("@"==n.charAt(0)){const[o,l]=Cit(n);return this._timelineEngine.listen(o,t,l,s)}return this._transitionEngine.listen(i,t,n,r,s)}flush(i=-1){this._transitionEngine.flush(i)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(i){this._transitionEngine.afterFlushAnimationsDone(i)}}class q1{static#t=this.initialStylesByElement=new WeakMap;constructor(i,t,n){this._element=i,this._startStyles=t,this._endStyles=n,this._state=0;let r=q1.initialStylesByElement.get(i);r||q1.initialStylesByElement.set(i,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&Id(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Id(this._element,this._initialStyles),this._endStyles&&(Id(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(q1.initialStylesByElement.delete(this._element),this._startStyles&&(pp(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(pp(this._element,this._endStyles),this._endStyles=null),Id(this._element,this._initialStyles),this._state=3)}}function E4(e){let i=null;return e.forEach((t,n)=>{(function RZt(e){return"display"===e||"position"===e})(n)&&(i=i||new Map,i.set(n,t))}),i}class $it{constructor(i,t,n,r){this.element=i,this.keyframes=t,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(i=>i()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const i=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,i,this.options),this._finalKeyframe=i.length?i[i.length-1]:new Map;const t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(i){const t=[];return i.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(i,t,n){return i.animate(this._convertKeyframesToObject(t),n)}onStart(i){this._originalOnStartFns.push(i),this._onStartFns.push(i)}onDone(i){this._originalOnDoneFns.push(i),this._onDoneFns.push(i)}onDestroy(i){this._onDestroyFns.push(i)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(i=>i()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(i=>i()),this._onDestroyFns=[])}setPosition(i){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=i*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const i=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{"offset"!==r&&i.set(r,this._finished?n:p4(this.element,r))}),this.currentSnapshot=i}triggerCallback(i){const t="start"===i?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}}class Qit{validateStyleProperty(i){return!0}validateAnimatableStyleProperty(i){return!0}matchesElement(i,t){return!1}containsElement(i,t){return Eit(i,t)}getParentElement(i){return a4(i)}query(i,t,n){return Ait(i,t,n)}computeStyle(i,t,n){return p4(i,t)}animate(i,t,n,r,s,o=[]){const w={duration:n,delay:r,fill:0==r?"both":"forwards"};s&&(w.easing=s);const C=new Map,M=o.filter(L=>L instanceof $it);(function GKt(e,i){return 0===e||0===i})(n,r)&&M.forEach(L=>{L.currentSnapshot.forEach((U,X)=>C.set(X,U))});let P=function VKt(e){return e.length?e[0]instanceof Map?e:e.map(i=>new Map(Object.entries(i))):[]}(t).map(L=>new Map(L));P=function HKt(e,i,t){if(t.size&&i.length){let n=i[0],r=[];if(t.forEach((s,o)=>{n.has(o)||r.push(o),n.set(o,s)}),r.length)for(let s=1;so.set(l,p4(e,l)))}}return i}(i,P,C);const O=function IZt(e,i){let t=null,n=null;return Array.isArray(i)&&i.length?(t=E4(i[0]),i.length>1&&(n=E4(i[i.length-1]))):i instanceof Map&&(t=E4(i)),t||n?new q1(e,t,n):null}(i,P);return new $it(i,P,w,O)}}const Kit="@.disabled";class Zit{constructor(i,t,n,r){this.namespaceId=i,this.delegate=t,this.engine=n,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(i){this.delegate.destroyNode?.(i)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(i,t){return this.delegate.createElement(i,t)}createComment(i){return this.delegate.createComment(i)}createText(i){return this.delegate.createText(i)}appendChild(i,t){this.delegate.appendChild(i,t),this.engine.onInsert(this.namespaceId,t,i,!1)}insertBefore(i,t,n,r=!0){this.delegate.insertBefore(i,t,n),this.engine.onInsert(this.namespaceId,t,i,r)}removeChild(i,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(i,t){return this.delegate.selectRootElement(i,t)}parentNode(i){return this.delegate.parentNode(i)}nextSibling(i){return this.delegate.nextSibling(i)}setAttribute(i,t,n,r){this.delegate.setAttribute(i,t,n,r)}removeAttribute(i,t,n){this.delegate.removeAttribute(i,t,n)}addClass(i,t){this.delegate.addClass(i,t)}removeClass(i,t){this.delegate.removeClass(i,t)}setStyle(i,t,n,r){this.delegate.setStyle(i,t,n,r)}removeStyle(i,t,n){this.delegate.removeStyle(i,t,n)}setProperty(i,t,n){"@"==t.charAt(0)&&t==Kit?this.disableAnimations(i,!!n):this.delegate.setProperty(i,t,n)}setValue(i,t){this.delegate.setValue(i,t)}listen(i,t,n){return this.delegate.listen(i,t,n)}disableAnimations(i,t){this.engine.disableAnimations(i,t)}}class kZt extends Zit{constructor(i,t,n,r,s){super(t,n,r,s),this.factory=i,this.namespaceId=t}setProperty(i,t,n){"@"==t.charAt(0)?"."==t.charAt(1)&&t==Kit?this.disableAnimations(i,n=void 0===n||!!n):this.engine.process(this.namespaceId,i,t.slice(1),n):this.delegate.setProperty(i,t,n)}listen(i,t,n){if("@"==t.charAt(0)){const r=function PZt(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(i);let s=t.slice(1),o="";return"@"!=s.charAt(0)&&([s,o]=function FZt(e){const i=e.indexOf(".");return[e.substring(0,i),e.slice(i+1)]}(s)),this.engine.listen(this.namespaceId,r,s,o,l=>{this.factory.scheduleListenerCallback(l._data||-1,n,l)})}return this.delegate.listen(i,t,n)}}class OZt{constructor(i,t,n){this.delegate=i,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,s)=>{const o=s?.parentNode(r);o&&s.removeChild(o,r)}}createRenderer(i,t){const r=this.delegate.createRenderer(i,t);if(!i||!t?.data?.animation){const C=this._rendererCache;let M=C.get(r);return M||(M=new Zit("",r,this.engine,()=>C.delete(r)),C.set(r,M)),M}const s=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,i);const l=C=>{Array.isArray(C)?C.forEach(l):this.engine.registerTrigger(s,o,i,C.name,C)};return t.data.animation.forEach(l),new kZt(this,o,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(i,t,n){if(i>=0&&it(n));const r=this._animationCallbacksBuffer;0==r.length&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(s=>{const[o,l]=s;o(l)}),this._animationCallbacksBuffer=[]})}),r.push([t,n])}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}const Jit=[{provide:c4,useFactory:function NZt(){return new kit}},{provide:J1,useClass:(()=>{class e extends J1{constructor(t,n,r){super(t,n,r,me(g_,{optional:!0}))}ngOnDestroy(){this.flush()}static#t=this.\u0275fac=function(n){return new(n||e)(Jt(Ni),Jt(l4),Jt(c4))};static#e=this.\u0275prov=Ae({token:e,factory:e.\u0275fac})}return e})()},{provide:Q2,useFactory:function BZt(e,i,t){return new OZt(e,i,t)},deps:[RI,J1,ii]}],A4=[{provide:l4,useFactory:()=>new Qit},{provide:Nr,useValue:"BrowserAnimations"},...Jit],qit=[{provide:l4,useClass:o4},{provide:Nr,useValue:"NoopAnimations"},...Jit];let VZt=(()=>{class e{static withConfig(t){return{ngModule:e,providers:t.disableAnimations?qit:A4}}static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({providers:A4,imports:[qU]})}return e})(),UZt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Ki]})}return e})(),gJt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[LR,qc,Ki,Qg,DH,UZt]})}return e})(),EJt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e});static#i=this.\u0275inj=Pi({imports:[Ki,Qg]})}return e})();hm("firebase","10.12.3","app"),Aj({apiKey:"AIzaSyAFjiIuMBA1IpTrw__WdkQiK5PKht4_go8",authDomain:"snoguess-e4d1c.firebaseapp.com",projectId:"snoguess-e4d1c",storageBucket:"snoguess-e4d1c.appspot.com",messagingSenderId:"289449411190",appId:"1:289449411190:web:49ff68411f9e5148f11557"});let MJt=(()=>{class e{static#t=this.\u0275fac=function(n){return new(n||e)};static#e=this.\u0275mod=Li({type:e,bootstrap:[KQt]});static#i=this.\u0275inj=Pi({imports:[ubt,qU,QSt,Y8t,VZt,lAt,MQt,QR,$wt,l_t,Nwt,J2t,zC,OCt,m_t,zCt,zTt,jSt,__t,j_t,KW,Bk,eX,MEt,VAt,YAt,_At,rDt,gJt,t2t,Bk,BQt,EJt,g2t]})}return e})();pvt().bootstrapModule(MJt).catch(e=>console.error(e))},867:(Gs,kd,ps)=>{const Do=ps(293).a,de=ps(687).array;Gs.exports=class S{constructor(a={}){Object.assign(this,{list:a.emptyList&&[]||Array.prototype.concat.apply(Do,[de,a.list||[]]),exclude:a.exclude||[],splitRegex:a.splitRegex||/\b/,placeHolder:a.placeHolder||"*",regex:a.regex||/[^a-zA-Z0-9|\$|\@]|\^/g,replaceRegex:a.replaceRegex||/\w/g})}isProfane(a){return this.list.filter(b=>{const T=new RegExp(`\\b${b.replace(/(\W)/g,"\\$1")}\\b`,"gi");return!this.exclude.includes(b.toLowerCase())&&T.test(a)}).length>0||!1}replaceWord(a){return a.replace(this.regex,"").replace(this.replaceRegex,this.placeHolder)}clean(a){return a.split(this.splitRegex).map(b=>this.isProfane(b)?this.replaceWord(b):b).join(this.splitRegex.exec(a)[0])}addWords(){let a=Array.from(arguments);this.list.push(...a),a.map(b=>b.toLowerCase()).forEach(b=>{this.exclude.includes(b)&&this.exclude.splice(this.exclude.indexOf(b),1)})}removeWords(){this.exclude.push(...Array.from(arguments).map(a=>a.toLowerCase()))}}},402:Gs=>{Gs.exports=["4r5e","5h1t","5hit","a55","anal","anus","ar5e","arrse","arse","ass","ass-fucker","asses","assfucker","assfukka","asshole","assholes","asswhole","a_s_s","b!tch","b00bs","b17ch","b1tch","ballbag","balls","ballsack","bastard","beastial","beastiality","bellend","bestial","bestiality","bi+ch","biatch","bitch","bitcher","bitchers","bitches","bitchin","bitching","bloody","blow job","blowjob","blowjobs","boiolas","bollock","bollok","boner","boob","boobs","booobs","boooobs","booooobs","booooooobs","breasts","buceta","bugger","bum","bunny fucker","butt","butthole","buttmuch","buttplug","c0ck","c0cksucker","carpet muncher","cawk","chink","cipa","cl1t","clit","clitoris","clits","cnut","cock","cock-sucker","cockface","cockhead","cockmunch","cockmuncher","cocks","cocksuck","cocksucked","cocksucker","cocksucking","cocksucks","cocksuka","cocksukka","cok","cokmuncher","coksucka","coon","cox","crap","cum","cummer","cumming","cums","cumshot","cunilingus","cunillingus","cunnilingus","cunt","cuntlick","cuntlicker","cuntlicking","cunts","cyalis","cyberfuc","cyberfuck","cyberfucked","cyberfucker","cyberfuckers","cyberfucking","d1ck","damn","dick","dickhead","dildo","dildos","dink","dinks","dirsa","dlck","dog-fucker","doggin","dogging","donkeyribber","doosh","duche","dyke","ejaculate","ejaculated","ejaculates","ejaculating","ejaculatings","ejaculation","ejakulate","f u c k","f u c k e r","f4nny","fag","fagging","faggitt","faggot","faggs","fagot","fagots","fags","fanny","fannyflaps","fannyfucker","fanyy","fatass","fcuk","fcuker","fcuking","feck","fecker","felching","fellate","fellatio","fingerfuck","fingerfucked","fingerfucker","fingerfuckers","fingerfucking","fingerfucks","fistfuck","fistfucked","fistfucker","fistfuckers","fistfucking","fistfuckings","fistfucks","flange","fook","fooker","fuck","fucka","fucked","fucker","fuckers","fuckhead","fuckheads","fuckin","fucking","fuckings","fuckingshitmotherfucker","fuckme","fucks","fuckwhit","fuckwit","fudge packer","fudgepacker","fuk","fuker","fukker","fukkin","fuks","fukwhit","fukwit","fux","fux0r","f_u_c_k","gangbang","gangbanged","gangbangs","gaylord","gaysex","goatse","God","god-dam","god-damned","goddamn","goddamned","hardcoresex","hell","heshe","hoar","hoare","hoer","homo","hore","horniest","horny","hotsex","jack-off","jackoff","jap","jerk-off","jism","jiz","jizm","jizz","kawk","knob","knobead","knobed","knobend","knobhead","knobjocky","knobjokey","kock","kondum","kondums","kum","kummer","kumming","kums","kunilingus","l3i+ch","l3itch","labia","lust","lusting","m0f0","m0fo","m45terbate","ma5terb8","ma5terbate","masochist","master-bate","masterb8","masterbat*","masterbat3","masterbate","masterbation","masterbations","masturbate","mo-fo","mof0","mofo","mothafuck","mothafucka","mothafuckas","mothafuckaz","mothafucked","mothafucker","mothafuckers","mothafuckin","mothafucking","mothafuckings","mothafucks","mother fucker","motherfuck","motherfucked","motherfucker","motherfuckers","motherfuckin","motherfucking","motherfuckings","motherfuckka","motherfucks","muff","mutha","muthafecker","muthafuckker","muther","mutherfucker","n1gga","n1gger","nazi","nigg3r","nigg4h","nigga","niggah","niggas","niggaz","nigger","niggers","nob","nob jokey","nobhead","nobjocky","nobjokey","numbnuts","nutsack","orgasim","orgasims","orgasm","orgasms","p0rn","pawn","pecker","penis","penisfucker","phonesex","phuck","phuk","phuked","phuking","phukked","phukking","phuks","phuq","pigfucker","pimpis","piss","pissed","pisser","pissers","pisses","pissflaps","pissin","pissing","pissoff","poop","porn","porno","pornography","pornos","prick","pricks","pron","pube","pusse","pussi","pussies","pussy","pussys","rectum","retard","rimjaw","rimming","s hit","s.o.b.","sadist","schlong","screwing","scroat","scrote","scrotum","semen","sex","sh!+","sh!t","sh1t","shag","shagger","shaggin","shagging","shemale","shi+","shit","shitdick","shite","shited","shitey","shitfuck","shitfull","shithead","shiting","shitings","shits","shitted","shitter","shitters","shitting","shittings","shitty","skank","slut","sluts","smegma","smut","snatch","son-of-a-bitch","spac","spunk","s_h_i_t","t1tt1e5","t1tties","teets","teez","testical","testicle","tit","titfuck","tits","titt","tittie5","tittiefucker","titties","tittyfuck","tittywank","titwank","tosser","turd","tw4t","twat","twathead","twatty","twunt","twunter","v14gra","v1gra","vagina","viagra","vulva","w00se","wang","wank","wanker","wanky","whoar","whore","willies","willy","xrated","xxx"]},687:(Gs,kd,ps)=>{Gs.exports={object:ps(424),array:ps(402),regex:ps(658)}},424:Gs=>{Gs.exports={"4r5e":1,"5h1t":1,"5hit":1,a55:1,anal:1,anus:1,ar5e:1,arrse:1,arse:1,ass:1,"ass-fucker":1,asses:1,assfucker:1,assfukka:1,asshole:1,assholes:1,asswhole:1,a_s_s:1,"b!tch":1,b00bs:1,b17ch:1,b1tch:1,ballbag:1,balls:1,ballsack:1,bastard:1,beastial:1,beastiality:1,bellend:1,bestial:1,bestiality:1,"bi+ch":1,biatch:1,bitch:1,bitcher:1,bitchers:1,bitches:1,bitchin:1,bitching:1,bloody:1,"blow job":1,blowjob:1,blowjobs:1,boiolas:1,bollock:1,bollok:1,boner:1,boob:1,boobs:1,booobs:1,boooobs:1,booooobs:1,booooooobs:1,breasts:1,buceta:1,bugger:1,bum:1,"bunny fucker":1,butt:1,butthole:1,buttmuch:1,buttplug:1,c0ck:1,c0cksucker:1,"carpet muncher":1,cawk:1,chink:1,cipa:1,cl1t:1,clit:1,clitoris:1,clits:1,cnut:1,cock:1,"cock-sucker":1,cockface:1,cockhead:1,cockmunch:1,cockmuncher:1,cocks:1,cocksuck:1,cocksucked:1,cocksucker:1,cocksucking:1,cocksucks:1,cocksuka:1,cocksukka:1,cok:1,cokmuncher:1,coksucka:1,coon:1,cox:1,crap:1,cum:1,cummer:1,cumming:1,cums:1,cumshot:1,cunilingus:1,cunillingus:1,cunnilingus:1,cunt:1,cuntlick:1,cuntlicker:1,cuntlicking:1,cunts:1,cyalis:1,cyberfuc:1,cyberfuck:1,cyberfucked:1,cyberfucker:1,cyberfuckers:1,cyberfucking:1,d1ck:1,damn:1,dick:1,dickhead:1,dildo:1,dildos:1,dink:1,dinks:1,dirsa:1,dlck:1,"dog-fucker":1,doggin:1,dogging:1,donkeyribber:1,doosh:1,duche:1,dyke:1,ejaculate:1,ejaculated:1,ejaculates:1,ejaculating:1,ejaculatings:1,ejaculation:1,ejakulate:1,"f u c k":1,"f u c k e r":1,f4nny:1,fag:1,fagging:1,faggitt:1,faggot:1,faggs:1,fagot:1,fagots:1,fags:1,fanny:1,fannyflaps:1,fannyfucker:1,fanyy:1,fatass:1,fcuk:1,fcuker:1,fcuking:1,feck:1,fecker:1,felching:1,fellate:1,fellatio:1,fingerfuck:1,fingerfucked:1,fingerfucker:1,fingerfuckers:1,fingerfucking:1,fingerfucks:1,fistfuck:1,fistfucked:1,fistfucker:1,fistfuckers:1,fistfucking:1,fistfuckings:1,fistfucks:1,flange:1,fook:1,fooker:1,fuck:1,fucka:1,fucked:1,fucker:1,fuckers:1,fuckhead:1,fuckheads:1,fuckin:1,fucking:1,fuckings:1,fuckingshitmotherfucker:1,fuckme:1,fucks:1,fuckwhit:1,fuckwit:1,"fudge packer":1,fudgepacker:1,fuk:1,fuker:1,fukker:1,fukkin:1,fuks:1,fukwhit:1,fukwit:1,fux:1,fux0r:1,f_u_c_k:1,gangbang:1,gangbanged:1,gangbangs:1,gaylord:1,gaysex:1,goatse:1,God:1,"god-dam":1,"god-damned":1,goddamn:1,goddamned:1,hardcoresex:1,hell:1,heshe:1,hoar:1,hoare:1,hoer:1,homo:1,hore:1,horniest:1,horny:1,hotsex:1,"jack-off":1,jackoff:1,jap:1,"jerk-off":1,jism:1,jiz:1,jizm:1,jizz:1,kawk:1,knob:1,knobead:1,knobed:1,knobend:1,knobhead:1,knobjocky:1,knobjokey:1,kock:1,kondum:1,kondums:1,kum:1,kummer:1,kumming:1,kums:1,kunilingus:1,"l3i+ch":1,l3itch:1,labia:1,lust:1,lusting:1,m0f0:1,m0fo:1,m45terbate:1,ma5terb8:1,ma5terbate:1,masochist:1,"master-bate":1,masterb8:1,"masterbat*":1,masterbat3:1,masterbate:1,masterbation:1,masterbations:1,masturbate:1,"mo-fo":1,mof0:1,mofo:1,mothafuck:1,mothafucka:1,mothafuckas:1,mothafuckaz:1,mothafucked:1,mothafucker:1,mothafuckers:1,mothafuckin:1,mothafucking:1,mothafuckings:1,mothafucks:1,"mother fucker":1,motherfuck:1,motherfucked:1,motherfucker:1,motherfuckers:1,motherfuckin:1,motherfucking:1,motherfuckings:1,motherfuckka:1,motherfucks:1,muff:1,mutha:1,muthafecker:1,muthafuckker:1,muther:1,mutherfucker:1,n1gga:1,n1gger:1,nazi:1,nigg3r:1,nigg4h:1,nigga:1,niggah:1,niggas:1,niggaz:1,nigger:1,niggers:1,nob:1,"nob jokey":1,nobhead:1,nobjocky:1,nobjokey:1,numbnuts:1,nutsack:1,orgasim:1,orgasims:1,orgasm:1,orgasms:1,p0rn:1,pawn:1,pecker:1,penis:1,penisfucker:1,phonesex:1,phuck:1,phuk:1,phuked:1,phuking:1,phukked:1,phukking:1,phuks:1,phuq:1,pigfucker:1,pimpis:1,piss:1,pissed:1,pisser:1,pissers:1,pisses:1,pissflaps:1,pissin:1,pissing:1,pissoff:1,poop:1,porn:1,porno:1,pornography:1,pornos:1,prick:1,pricks:1,pron:1,pube:1,pusse:1,pussi:1,pussies:1,pussy:1,pussys:1,rectum:1,retard:1,rimjaw:1,rimming:1,"s hit":1,"s.o.b.":1,sadist:1,schlong:1,screwing:1,scroat:1,scrote:1,scrotum:1,semen:1,sex:1,"sh!+":1,"sh!t":1,sh1t:1,shag:1,shagger:1,shaggin:1,shagging:1,shemale:1,"shi+":1,shit:1,shitdick:1,shite:1,shited:1,shitey:1,shitfuck:1,shitfull:1,shithead:1,shiting:1,shitings:1,shits:1,shitted:1,shitter:1,shitters:1,shitting:1,shittings:1,shitty:1,skank:1,slut:1,sluts:1,smegma:1,smut:1,snatch:1,"son-of-a-bitch":1,spac:1,spunk:1,s_h_i_t:1,t1tt1e5:1,t1tties:1,teets:1,teez:1,testical:1,testicle:1,tit:1,titfuck:1,tits:1,titt:1,tittie5:1,tittiefucker:1,titties:1,tittyfuck:1,tittywank:1,titwank:1,tosser:1,turd:1,tw4t:1,twat:1,twathead:1,twatty:1,twunt:1,twunter:1,v14gra:1,v1gra:1,vagina:1,viagra:1,vulva:1,w00se:1,wang:1,wank:1,wanker:1,wanky:1,whoar:1,whore:1,willies:1,willy:1,xrated:1,xxx:1}},658:Gs=>{Gs.exports=/\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|retard|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi},578:function(Gs,kd){var ps,de;void 0!==(de="function"==typeof(ps=function(){"use strict";function k(h,c,u){var m=new XMLHttpRequest;m.open("GET",h),m.responseType="blob",m.onload=function(){f(m.response,c,u)},m.onerror=function(){console.error("could not download file")},m.send()}function a(h){var c=new XMLHttpRequest;c.open("HEAD",h,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function b(h){try{h.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),h.dispatchEvent(c)}}var T="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,g=T.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=T.saveAs||("object"!=typeof window||window!==T?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(h,c,u){var m=T.URL||T.webkitURL,d=document.createElement("a");d.download=c=c||h.name||"download",d.rel="noopener","string"==typeof h?(d.href=h,d.origin===location.origin?b(d):a(d.href)?k(h,c,u):b(d,d.target="_blank")):(d.href=m.createObjectURL(h),setTimeout(function(){m.revokeObjectURL(d.href)},4e4),setTimeout(function(){b(d)},0))}:"msSaveOrOpenBlob"in navigator?function(h,c,u){if(c=c||h.name||"download","string"!=typeof h)navigator.msSaveOrOpenBlob(function S(h,c){return typeof c>"u"?c={autoBom:!1}:"object"!=typeof c&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(h.type)?new Blob(["\ufeff",h],{type:h.type}):h}(h,u),c);else if(a(h))k(h,c,u);else{var m=document.createElement("a");m.href=h,m.target="_blank",setTimeout(function(){b(m)})}}:function(h,c,u,m){if((m=m||open("","_blank"))&&(m.document.title=m.document.body.innerText="downloading..."),"string"==typeof h)return k(h,c,u);var d="application/octet-stream"===h.type,p=/constructor/i.test(T.HTMLElement)||T.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||d&&p||g)&&typeof FileReader<"u"){var x=new FileReader;x.onloadend=function(){var E=x.result;E=v?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=E:location=E,m=null},x.readAsDataURL(h)}else{var y=T.URL||T.webkitURL,_=y.createObjectURL(h);m?m.location=_:location.href=_,m=null,setTimeout(function(){y.revokeObjectURL(_)},4e4)}});T.saveAs=f.saveAs=f,Gs.exports=f})?ps.apply(kd,[]):ps)&&(Gs.exports=de)},945:function(Gs){var Do;Do=()=>(()=>{var kd={50792:S=>{"use strict";var k=Object.prototype.hasOwnProperty,a="~";function b(){}function T(c,u,m){this.fn=c,this.context=u,this.once=m||!1}function g(c,u,m,d,p){if("function"!=typeof m)throw new TypeError("The listener must be a function");var v=new T(m,d||c,p),x=a?a+u:u;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],v]:c._events[x].push(v):(c._events[x]=v,c._eventsCount++),c}function f(c,u){0==--c._eventsCount?c._events=new b:delete c._events[u]}function h(){this._events=new b,this._eventsCount=0}Object.create&&(b.prototype=Object.create(null),(new b).__proto__||(a=!1)),h.prototype.eventNames=function(){var m,d,u=[];if(0===this._eventsCount)return u;for(d in m=this._events)k.call(m,d)&&u.push(a?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(m)):u},h.prototype.listeners=function(u){var d=this._events[a?a+u:u];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,v=d.length,x=new Array(v);p{var b=a(38829);S.exports=function(g,f,h,c){for(var u=g[0],m=1;m{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"angle",f,h,c,u)}},60757:S=>{S.exports=function(a,b,T){for(var g=0;g{S.exports=function(a,b,T){void 0===T&&(T=0);for(var g=T;g{S.exports=function(a,b,T){void 0===T&&(T=0);for(var g=a.length-1;g>=T;g--){var f=a[g],h=!0;for(var c in b)f[c]!==b[c]&&(h=!1);if(h)return f}return null}},94420:(S,k,a)=>{var b=a(11879),T=a(60461),g=a(95540),f=a(29747),c=new(a(41481))({sys:{queueDepthSort:f,events:{once:f}}},0,0,1,1).setOrigin(0,0);S.exports=function(m,d){void 0===d&&(d={});var p=d.hasOwnProperty("width"),v=d.hasOwnProperty("height"),x=g(d,"width",-1),y=g(d,"height",-1),_=g(d,"cellWidth",1),E=g(d,"cellHeight",_),A=g(d,"position",T.TOP_LEFT),D=g(d,"x",0),I=g(d,"y",0),R=0,F=0,N=x*_,V=y*E;c.setPosition(D,I),c.setSize(_,E);for(var B=0;B{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"alpha",f,h,c,u)}},67285:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"x",f,h,c,u)}},9074:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"x",f,c,m,d),b(g,"y",h,u,m,d)}},75222:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"y",f,h,c,u)}},22983:S=>{S.exports=function(a,b,T,g){void 0===T&&(T=0),void 0===g&&(g=6.28);for(var f=T,h=(g-T)/a.length,c=b.x,u=b.y,m=b.radius,d=0;d{S.exports=function(a,b,T,g){void 0===T&&(T=0),void 0===g&&(g=6.28);for(var f=T,h=(g-T)/a.length,c=b.width/2,u=b.height/2,m=0;m{var b=a(15258),T=a(26708);S.exports=function(f,h,c){var u;u=c?T(h,c,f.length):b(h,f.length);for(var m=0;m{var b=a(14649),T=a(86003),g=a(49498);S.exports=function(h,c,u){void 0===u&&(u=0);var m=b(c,!1,h.length);u>0?T(m,u):u<0&&g(m,Math.abs(u));for(var d=0;d{var b=a(84993);S.exports=function(g,f,h){var c=b({x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2},h),u=b({x1:f.x2,y1:f.y2,x2:f.x3,y2:f.y3},h),m=b({x1:f.x3,y1:f.y3,x2:f.x1,y2:f.y1},h);c.pop(),u.pop(),m.pop();for(var d=(c=c.concat(u,m)).length/g.length,p=0,v=0;v{S.exports=function(a,b,T){for(var g=0;g{S.exports=function(a,b,T,g,f,h){void 0===g&&(g=0),void 0===f&&(f=0),void 0===h&&(h=1);var c,u=0,m=a.length;if(1===h)for(c=f;c=0;c--)a[c][b]+=T+u*g,u++;return a}},43967:S=>{S.exports=function(a,b,T,g,f,h){void 0===g&&(g=0),void 0===f&&(f=0),void 0===h&&(h=1);var c,u=0,m=a.length;if(1===h)for(c=f;c=0;c--)a[c][b]=T+u*g,u++;return a}},88926:(S,k,a)=>{var b=a(28176);S.exports=function(g,f){for(var h=0;h{var b=a(24820);S.exports=function(g,f){for(var h=0;h{var b=a(65822);S.exports=function(g,f){for(var h=0;h{var b=a(26597);S.exports=function(g,f){for(var h=0;h{var b=a(90260);S.exports=function(g,f){for(var h=0;h{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"rotation",f,h,c,u)}},91051:(S,k,a)=>{var b=a(1163),T=a(20339);S.exports=function(f,h,c){for(var u=h.x,m=h.y,d=0;d{var b=a(1163);S.exports=function(g,f,h,c){var u=f.x,m=f.y;if(0===c)return g;for(var d=0;d{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"scaleX",f,h,c,u)}},94868:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"scaleX",f,c,m,d),b(g,"scaleY",h,u,m,d)}},95532:(S,k,a)=>{var b=a(66979);S.exports=function(g,f,h,c,u){return b(g,"scaleY",f,h,c,u)}},8689:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"alpha",f,h,c,u)}},2645:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c){return b(g,"blendMode",f,0,h,c)}},32372:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"depth",f,h,c,u)}},85373:S=>{S.exports=function(a,b,T){for(var g=0;g{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"originX",f,c,m,d),b(g,"originY",h,u,m,d),g.forEach(function(p){p.updateDisplayOrigin()}),g}},79939:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"rotation",f,h,c,u)}},2699:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"scaleX",f,c,m,d),b(g,"scaleY",h,u,m,d)}},98739:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scaleX",f,h,c,u)}},98476:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scaleY",f,h,c,u)}},6207:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"scrollFactorX",f,c,m,d),b(g,"scrollFactorY",h,u,m,d)}},6607:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scrollFactorX",f,h,c,u)}},72248:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"scrollFactorY",f,h,c,u)}},14036:S=>{S.exports=function(a,b,T,g,f){for(var h=0;h{var b=a(43967);S.exports=function(g,f,h,c){return b(g,"visible",f,0,h,c)}},77597:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"x",f,h,c,u)}},83194:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u,m,d){return null==h&&(h=f),b(g,"x",f,c,m,d),b(g,"y",h,u,m,d)}},67678:(S,k,a)=>{var b=a(43967);S.exports=function(g,f,h,c,u){return b(g,"y",f,h,c,u)}},35850:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=new b);var m,d,p=g.length;if(1===p)m=g[0].x,d=g[0].y,g[0].x=f,g[0].y=h;else{var v=1,x=0;0===c&&(x=p-1,v=p-2),m=g[x].x,d=g[x].y,g[x].x=f,g[x].y=h;for(var y=0;y=p||-1===v)){var _=g[v],E=_.x,A=_.y;_.x=m,_.y=d,m=E,d=A,0===c?v--:v++}}return u.x=m,u.y=d,u}},8628:(S,k,a)=>{var b=a(33680);S.exports=function(g){return b(g)}},21837:(S,k,a)=>{var b=a(7602);S.exports=function(g,f,h,c,u){void 0===u&&(u=!1);var d,m=Math.abs(c-h)/g.length;if(u)for(d=0;d{var b=a(54261);S.exports=function(g,f,h,c,u){void 0===u&&(u=!1);var d,m=Math.abs(c-h)/g.length;if(u)for(d=0;d{S.exports=function(a,b,T,g,f){if(void 0===f&&(f=!1),0===a.length)return a;if(1===a.length)return f?a[0][b]+=(g+T)/2:a[0][b]=(g+T)/2,a;var c,h=Math.abs(g-T)/(a.length-1);if(f)for(c=0;c{S.exports=function(a){for(var b=0;b{var b=a(15994);S.exports=function(g,f,h){void 0===h&&(h=0);for(var c=0;c{S.exports={AlignTo:a(11517),Angle:a(80318),Call:a(60757),GetFirst:a(69927),GetLast:a(32265),GridAlign:a(94420),IncAlpha:a(41721),IncX:a(67285),IncXY:a(9074),IncY:a(75222),PlaceOnCircle:a(22983),PlaceOnEllipse:a(95253),PlaceOnLine:a(88505),PlaceOnRectangle:a(41346),PlaceOnTriangle:a(11575),PlayAnimation:a(29953),PropertyValueInc:a(66979),PropertyValueSet:a(43967),RandomCircle:a(88926),RandomEllipse:a(33286),RandomLine:a(96e3),RandomRectangle:a(28789),RandomTriangle:a(97154),Rotate:a(20510),RotateAround:a(91051),RotateAroundDistance:a(76332),ScaleX:a(61619),ScaleXY:a(94868),ScaleY:a(95532),SetAlpha:a(8689),SetBlendMode:a(2645),SetDepth:a(32372),SetHitArea:a(85373),SetOrigin:a(81583),SetRotation:a(79939),SetScale:a(2699),SetScaleX:a(98739),SetScaleY:a(98476),SetScrollFactor:a(6207),SetScrollFactorX:a(6607),SetScrollFactorY:a(72248),SetTint:a(14036),SetVisible:a(50159),SetX:a(77597),SetXY:a(83194),SetY:a(67678),ShiftPosition:a(35850),Shuffle:a(8628),SmootherStep:a(21910),SmoothStep:a(21837),Spread:a(62054),ToggleVisible:a(79815),WrapInRectangle:a(39665)}},42099:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(74943),f=a(81957),h=a(41138),c=a(35154),u=a(90126),m=new T({initialize:function(p,v,x){this.manager=p,this.key=v,this.type="frame",this.frames=this.getFrames(p.textureManager,c(x,"frames",[]),c(x,"defaultTextureKey",null),c(x,"sortFrames",!0)),this.frameRate=c(x,"frameRate",null),this.duration=c(x,"duration",null),this.skipMissedFrames=c(x,"skipMissedFrames",!0),this.delay=c(x,"delay",0),this.repeat=c(x,"repeat",0),this.repeatDelay=c(x,"repeatDelay",0),this.yoyo=c(x,"yoyo",!1),this.showBeforeDelay=c(x,"showBeforeDelay",!1),this.showOnStart=c(x,"showOnStart",!1),this.hideOnComplete=c(x,"hideOnComplete",!1),this.randomFrame=c(x,"randomFrame",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(g.PAUSE_ALL,this.pause,this),this.manager.on(g.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(d,p,v,x){null===v&&null===x?(d.frameRate=24,d.duration=24/p*1e3):v&&null===x?(d.duration=v,d.frameRate=p/(v/1e3)):(d.frameRate=x,d.duration=p/x*1e3),d.msPerFrame=1e3/d.frameRate},addFrame:function(d){return this.addFrameAt(this.frames.length,d)},addFrameAt:function(d,p){var v=this.getFrames(this.manager.textureManager,p);if(v.length>0){if(0===d)this.frames=v.concat(this.frames);else if(d===this.frames.length)this.frames=this.frames.concat(v);else{var x=this.frames.slice(0,d),y=this.frames.slice(d);this.frames=x.concat(v,y)}this.updateFrameSequence()}return this},checkFrame:function(d){return d>=0&&d0){E.isLast=!0,E.nextFrame=y[0],y[0].prevFrame=E;var Q=1/(y.length-1);for(D=0;D0?d.inReverse&&d.forward?d.forward=!1:this.repeatAnimation(d):d.complete():this.updateAndGetNextTick(d,p.nextFrame)},handleYoyoFrame:function(d,p){if(p||(p=!1),d.inReverse===!p&&d.repeatCounter>0)return(0===d.repeatDelay||d.pendingRepeat)&&(d.forward=p),void this.repeatAnimation(d);d.inReverse===p||0!==d.repeatCounter?(d.forward=p,this.updateAndGetNextTick(d,p?d.currentFrame.nextFrame:d.currentFrame.prevFrame)):d.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(d){var p=d.currentFrame;p.isFirst?d.yoyo?this.handleYoyoFrame(d,!0):d.repeatCounter>0?(d.inReverse&&!d.forward||(d.forward=!0),this.repeatAnimation(d)):d.complete():this.updateAndGetNextTick(d,p.prevFrame)},updateAndGetNextTick:function(d,p){d.setCurrentFrame(p),this.getNextTick(d)},removeFrame:function(d){var p=this.frames.indexOf(d);return-1!==p&&this.removeFrameAt(p),this},removeFrameAt:function(d){return this.frames.splice(d,1),this.updateFrameSequence(),this},repeatAnimation:function(d){if(2===d._pendingStop){if(0===d._pendingStopValue)return d.stop();d._pendingStopValue--}d.repeatDelay>0&&!d.pendingRepeat?(d.pendingRepeat=!0,d.accumulator-=d.nextTick,d.nextTick+=d.repeatDelay):(d.repeatCounter--,d.setCurrentFrame(d.forward?d.currentFrame.nextFrame:d.currentFrame.prevFrame),d.isPlaying&&(this.getNextTick(d),d.handleRepeat()))},toJSON:function(){var d={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,randomFrame:this.randomFrame,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(p){d.frames.push(p.toJSON())}),d},updateFrameSequence:function(){for(var v,d=this.frames.length,p=1/(d-1),x=0;x1?(v.isLast=!0,v.prevFrame=this.frames[d-2],v.nextFrame=this.frames[0]):d>1&&(v.prevFrame=this.frames[x-1],v.nextFrame=this.frames[x+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(g.PAUSE_ALL,this.pause,this),this.manager.off(g.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var d=0;d{var T=new(a(83419))({initialize:function(f,h,c,u,m){void 0===m&&(m=!1),this.textureKey=f,this.textureFrame=h,this.index=c,this.frame=u,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=m},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});S.exports=T},60848:(S,k,a)=>{var b=a(42099),T=a(83419),g=a(90330),f=a(50792),h=a(74943),c=a(8443),u=a(95540),m=a(35154),d=a(36383),p=a(20283),v=a(41836),x=new T({Extends:f,initialize:function(_){f.call(this),this.game=_,this.textureManager=null,this.globalTimeScale=1,this.anims=new g,this.mixes=new g,this.paused=!1,this.name="AnimationManager",_.events.once(c.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(c.DESTROY,this.destroy,this)},addMix:function(y,_,E){var A=this.anims,D=this.mixes,I="string"==typeof y?y:y.key,R="string"==typeof _?_:_.key;if(A.has(I)&&A.has(R)){var F=D.get(I);F||(F={}),F[R]=E,D.set(I,F)}return this},removeMix:function(y,_){var E=this.mixes,A="string"==typeof y?y:y.key,D=E.get(A);if(D)if(_){var I="string"==typeof _?_:_.key;D.hasOwnProperty(I)&&delete D[I]}else _||E.delete(A);return this},getMix:function(y,_){var D="string"==typeof _?_:_.key,I=this.mixes.get("string"==typeof y?y:y.key);return I&&I.hasOwnProperty(D)?I[D]:0},add:function(y,_){return this.anims.has(y)?(console.warn("Animation key exists: "+y),this):(_.key=y,this.anims.set(y,_),this.emit(h.ADD_ANIMATION,y,_),this)},exists:function(y){return this.anims.has(y)},createFromAseprite:function(y,_,E){var A=[],D=this.game.cache.json.get(y);if(!D)return console.warn("No Aseprite data found for: "+y),A;var I=this,R=m(D,"meta",null),F=m(D,"frames",null);return R&&F&&m(R,"frameTags",[]).forEach(function(V){var B=[],H=u(V,"name",null),Q=u(V,"from",0),G=u(V,"to",0),K=u(V,"direction","forward");if(H&&(!_||_&&_.indexOf(H)>-1)){for(var q=0,at=Q;at<=G;at++){var ot=at.toString(),J=F[ot];if(J){var it=u(J,"duration",d.MAX_SAFE_INTEGER);B.push({key:y,frame:ot,duration:it}),q+=it}}"reverse"===K&&(B=B.reverse());var j,Y={key:H,frames:B,duration:q,yoyo:"pingpong"===K};E?E.anims&&(j=E.anims.create(Y)):j=I.create(Y),j&&A.push(j)}}),A},create:function(y){var _=y.key,E=!1;return _&&((E=this.get(_))?console.warn("AnimationManager key already exists: "+_):(E=new b(this,_,y),this.anims.set(_,E),this.emit(h.ADD_ANIMATION,_,E))),E},fromJSON:function(y,_){void 0===_&&(_=!1),_&&this.anims.clear(),"string"==typeof y&&(y=JSON.parse(y));var E=[];if(y.hasOwnProperty("anims")&&Array.isArray(y.anims)){for(var A=0;A{var b=a(42099),T=a(30976),g=a(83419),f=a(90330),h=a(74943),c=a(95540),u=new g({initialize:function(d){this.parent=d,this.animationManager=d.scene.sys.anims,this.animationManager.on(h.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.randomFrame=!1,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0},chain:function(m){var d=this.parent;if(void 0===m)return this.nextAnimsQueue.length=0,this.nextAnim=null,d;Array.isArray(m)||(m=[m]);for(var p=0;px&&(E=0),this.randomFrame&&(E=T(0,x-1));var A=v.frames[E];0===E&&!this.forward&&(A=v.getLastFrame()),this.currentFrame=A}else console.warn("Missing animation: "+p);return this.parent},pause:function(m){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==m&&this.setCurrentFrame(m),this.parent},resume:function(m){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==m&&this.setCurrentFrame(m),this.parent},playAfterDelay:function(m,d){if(this.isPlaying){var p=this.nextAnim;p&&this.nextAnimsQueue.unshift(p),this.nextAnim=m,this._pendingStop=1,this._pendingStopValue=d}else this.delayCounter=d,this.play(m,!0);return this.parent},playAfterRepeat:function(m,d){if(void 0===d&&(d=1),this.isPlaying){var p=this.nextAnim;p&&this.nextAnimsQueue.unshift(p),-1!==this.repeatCounter&&d>this.repeatCounter&&(d=this.repeatCounter),this.nextAnim=m,this._pendingStop=2,this._pendingStopValue=d}else this.play(m);return this.parent},play:function(m,d){void 0===d&&(d=!1);var p=this.currentAnim;if(d&&this.isPlaying&&p.key===("string"==typeof m?m:m.key))return this.parent;if(p&&this.isPlaying){var y=this.animationManager.getMix(p.key,m);if(y>0)return this.playAfterDelay(m,y)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(m)},playReverse:function(m,d){return void 0===d&&(d=!1),d&&this.isPlaying&&this.currentAnim.key===("string"==typeof m?m:m.key)?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(m))},startAnimation:function(m){this.load(m);var d=this.currentAnim,p=this.parent;return d&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,d.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame)),p},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(h.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(h.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(h.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(h.ANIMATION_COMPLETE,h.ANIMATION_COMPLETE_KEY)},emitEvents:function(m,d){var p=this.currentAnim;if(p){var v=this.currentFrame,x=this.parent,y=v.textureFrame;x.emit(m,p,v,x,y),d&&x.emit(d+p.key,p,v,x,y)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var m=this.currentFrame;if(!m)return 0;var d=m.progress;return this.inReverse&&(d*=-1),d},setProgress:function(m){return this.forward||(m=1-m),this.setCurrentFrame(this.currentAnim.getFrameByProgress(m)),this.parent},setRepeat:function(m){return this.repeatCounter=-1===m?Number.MAX_VALUE:m,this.parent},globalRemove:function(m,d){void 0===d&&(d=this.currentAnim),this.isPlaying&&d.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(m,d){void 0===m&&(m=!1),void 0===d&&(d=!1);var p=this.currentAnim,v=this.parent;return p?(d&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),p.getFirstTick(this),this.emitEvents(h.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!m,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(p.frames[0]),this.parent):v},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var m=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(m)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var m=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(m)}return this.parent},stopAfterDelay:function(m){return this._pendingStop=1,this._pendingStopValue=m,this.parent},stopAfterRepeat:function(m){return void 0===m&&(m=1),-1!==this.repeatCounter&&m>this.repeatCounter&&(m=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=m,this.parent},stopOnFrame:function(m){return this._pendingStop=3,this._pendingStopValue=m,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(m,d){var p=this.currentAnim;if(this.isPlaying&&p&&!p.paused){if(this.accumulator+=d*this.timeScale*this.animationManager.globalTimeScale,1===this._pendingStop&&(this._pendingStopValue-=d,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?p.nextFrame(this):p.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var v=0;do{this.forward?p.nextFrame(this):p.previousFrame(this),v++}while(this.isPlaying&&this.accumulator>this.nextTick&&v<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(m){var d=this.parent;return this.currentFrame=m,d.texture=m.frame.texture,d.frame=m.frame,d.isCropped&&d.frame.updateCropUVs(d._crop,d.flipX,d.flipY),m.setAlpha&&(d.alpha=m.alpha),d.setSizeToFrame(),d._originComponent&&(m.frame.customPivot?d.setOrigin(m.frame.pivotX,m.frame.pivotY):d.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(h.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===m&&this.stop()),d},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(m){return this.anims?this.anims.get(m):null},exists:function(m){return!!this.anims&&this.anims.has(m)},create:function(m){var d=m.key,p=!1;return d&&((p=this.get(d))?console.warn("Animation key already exists: "+d):(p=new b(this,d,m),this.anims||(this.anims=new f),this.anims.set(d,p))),p},createFromAseprite:function(m,d){return this.animationManager.createFromAseprite(m,d,this.parent)},generateFrameNames:function(m,d){return this.animationManager.generateFrameNames(m,d)},generateFrameNumbers:function(m,d){return this.animationManager.generateFrameNumbers(m,d)},remove:function(m){var d=this.get(m);return d&&(this.currentAnim===d&&this.stop(),this.anims.delete(m)),d},destroy:function(){this.animationManager.off(h.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});S.exports=u},57090:S=>{S.exports="add"},25312:S=>{S.exports="animationcomplete"},89580:S=>{S.exports="animationcomplete-"},52860:S=>{S.exports="animationrepeat"},63850:S=>{S.exports="animationrestart"},99085:S=>{S.exports="animationstart"},28087:S=>{S.exports="animationstop"},1794:S=>{S.exports="animationupdate"},52562:S=>{S.exports="pauseall"},57953:S=>{S.exports="remove"},68339:S=>{S.exports="resumeall"},74943:(S,k,a)=>{S.exports={ADD_ANIMATION:a(57090),ANIMATION_COMPLETE:a(25312),ANIMATION_COMPLETE_KEY:a(89580),ANIMATION_REPEAT:a(52860),ANIMATION_RESTART:a(63850),ANIMATION_START:a(99085),ANIMATION_STOP:a(28087),ANIMATION_UPDATE:a(1794),PAUSE_ALL:a(52562),REMOVE_ANIMATION:a(57953),RESUME_ALL:a(68339)}},60421:(S,k,a)=>{S.exports={Animation:a(42099),AnimationFrame:a(41138),AnimationManager:a(60848),AnimationState:a(9674),Events:a(74943)}},2161:(S,k,a)=>{var b=a(83419),T=a(90330),g=a(50792),f=a(24736),h=new b({initialize:function(){this.entries=new T,this.events=new g},add:function(c,u){return this.entries.set(c,u),this.events.emit(f.ADD,this,c,u),this},has:function(c){return this.entries.has(c)},exists:function(c){return this.entries.has(c)},get:function(c){return this.entries.get(c)},remove:function(c){var u=this.get(c);return u&&(this.entries.delete(c),this.events.emit(f.REMOVE,this,c,u.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});S.exports=h},24047:(S,k,a)=>{var b=a(2161),T=a(83419),g=a(8443),f=new T({initialize:function(c){this.game=c,this.binary=new b,this.bitmapFont=new b,this.json=new b,this.physics=new b,this.shader=new b,this.audio=new b,this.video=new b,this.text=new b,this.html=new b,this.obj=new b,this.tilemap=new b,this.xml=new b,this.custom={},this.game.events.once(g.DESTROY,this.destroy,this)},addCustom:function(h){return this.custom.hasOwnProperty(h)||(this.custom[h]=new b),this.custom[h]},destroy:function(){for(var h=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],c=0;c{S.exports="add"},59261:S=>{S.exports="remove"},24736:(S,k,a)=>{S.exports={ADD:a(51464),REMOVE:a(59261)}},83388:(S,k,a)=>{S.exports={BaseCache:a(2161),CacheManager:a(24047),Events:a(24736)}},71911:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(39506),f=a(50792),h=a(19715),c=a(87841),u=a(61340),m=a(80333),d=a(26099),p=new b({Extends:f,Mixins:[T.AlphaSingle,T.Visible],initialize:function(x,y,_,E){void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),f.call(this),this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new c,this.dirty=!0,this._x=x,this._y=y,this._width=_,this._height=E,this._bounds=new c,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new u,this.transparent=!0,this.backgroundColor=m("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new d(_/2,E/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0,this.renderRoundPixels=!0},addToRenderList:function(v){this.renderList.push(v)},setOrigin:function(v,x){return void 0===v&&(v=.5),void 0===x&&(x=v),this.originX=v,this.originY=x,this},getScroll:function(v,x,y){void 0===y&&(y=new d);var E=.5*this.height;return y.x=v-.5*this.width,y.y=x-E,this.useBounds&&(y.x=this.clampX(y.x),y.y=this.clampY(y.y)),y},centerOnX:function(v){var x=.5*this.width;return this.midPoint.x=v,this.scrollX=v-x,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(v){var x=.5*this.height;return this.midPoint.y=v,this.scrollY=v-x,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(v,x){return this.centerOnX(v),this.centerOnY(x),this},centerToBounds:function(){if(this.useBounds){var v=this._bounds,x=.5*this.width,y=.5*this.height;this.midPoint.set(v.centerX,v.centerY),this.scrollX=v.centerX-x,this.scrollY=v.centerY-y}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(v){if(this.disableCull)return v;var x=this.matrix.matrix,y=x[0],_=x[1],E=x[2],A=x[3],D=y*A-_*E;if(!D)return v;var I=x[4],R=x[5],F=this.scrollX,N=this.scrollY,H=this.y,Q=H+this.height,G=this.x,K=G+this.width,q=this.culledObjects,at=v.length;D=1/D,q.length=0;for(var ot=0;otG&&j*y+nt*E+IH&&j*_+nt*A+RE&&(v=E),v},clampY:function(v){var x=this._bounds,y=this.displayHeight,_=x.y+(y-this.height)/2,E=Math.max(_,_+x.height-y);return v<_?v=_:v>E&&(v=E),v},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(v){return void 0===v&&(v=0),this.rotation=g(v),this},setBackgroundColor:function(v){return void 0===v&&(v="rgba(0,0,0,0)"),this.backgroundColor=m(v),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(v,x,y,_,E){return void 0===E&&(E=!1),this._bounds.setTo(v,x,y,_),this.dirty=!0,this.useBounds=!0,E?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(v){void 0===v&&(v=new c);var x=this._bounds;return v.setTo(x.x,x.y,x.width,x.height),v},setName:function(v){return void 0===v&&(v=""),this.name=v,this},setPosition:function(v,x){return void 0===x&&(x=v),this.x=v,this.y=x,this},setRotation:function(v){return void 0===v&&(v=0),this.rotation=v,this},setRoundPixels:function(v){return this.roundPixels=v,this},setScene:function(v,x){void 0===x&&(x=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=v,this.isSceneCamera=x;var y=v.sys;return this.sceneManager=y.game.scene,this.scaleManager=y.scale,this.cameraManager=y.cameras,this.updateSystem(),this},setScroll:function(v,x){return void 0===x&&(x=v),this.scrollX=v,this.scrollY=x,this},setSize:function(v,x){return void 0===x&&(x=v),this.width=v,this.height=x,this},setViewport:function(v,x,y,_){return this.x=v,this.y=x,this.width=y,this.height=_,this},setZoom:function(v,x){return void 0===v&&(v=1),void 0===x&&(x=v),0===v&&(v=.001),0===x&&(x=.001),this.zoomX=v,this.zoomY=x,this},setMask:function(v,x){return void 0===x&&(x=!0),this.mask=v,this._maskCamera=x?this.cameraManager.default:this,this},clearMask:function(v){return void 0===v&&(v=!1),v&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var v={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(v.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),v},update:function(){},setIsSceneCamera:function(v){return this.isSceneCamera=v,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var v=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,x=this.sceneManager;v&&!this._customViewport?x.customViewports++:!v&&this._customViewport&&x.customViewports--,this.dirty=!0,this._customViewport=v}},destroy:function(){this.emit(h.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(v){this._x=v,this.updateSystem()}},y:{get:function(){return this._y},set:function(v){this._y=v,this.updateSystem()}},width:{get:function(){return this._width},set:function(v){this._width=v,this.updateSystem()}},height:{get:function(){return this._height},set:function(v){this._height=v,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(v){v!==this._scrollX&&(this._scrollX=v,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(v){v!==this._scrollY&&(this._scrollY=v,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(v){this._zoomX=v,this._zoomY=v,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(v){this._zoomX=v,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(v){this._zoomY=v,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(v){this._rotation=v,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});S.exports=p},38058:(S,k,a)=>{var b=a(71911),T=a(67502),g=a(45319),f=a(83419),h=a(31401),c=a(20052),u=a(19715),m=a(28915),d=a(87841),p=a(26099),v=new f({Extends:b,Mixins:[h.PostPipeline],initialize:function(y,_,E,A){b.call(this,y,_,E,A),this.initPostPipeline(),this.inputEnabled=!0,this.fadeEffect=new c.Fade(this),this.flashEffect=new c.Flash(this),this.shakeEffect=new c.Shake(this),this.panEffect=new c.Pan(this),this.rotateToEffect=new c.RotateTo(this),this.zoomEffect=new c.Zoom(this),this.lerp=new p(1,1),this.followOffset=new p,this.deadzone=null,this._follow=null},setDeadzone:function(x,y){if(void 0===x)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=x,this.deadzone.height=y):this.deadzone=new d(0,0,x,y),this._follow){var _=this.width/2,E=this.height/2,A=this._follow.x-this.followOffset.x,D=this._follow.y-this.followOffset.y;this.midPoint.set(A,D),this.scrollX=A-_,this.scrollY=D-E}T(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(x,y,_,E,A,D){return this.fadeEffect.start(!1,x,y,_,E,!0,A,D)},fadeOut:function(x,y,_,E,A,D){return this.fadeEffect.start(!0,x,y,_,E,!0,A,D)},fadeFrom:function(x,y,_,E,A,D,I){return this.fadeEffect.start(!1,x,y,_,E,A,D,I)},fade:function(x,y,_,E,A,D,I){return this.fadeEffect.start(!0,x,y,_,E,A,D,I)},flash:function(x,y,_,E,A,D,I){return this.flashEffect.start(x,y,_,E,A,D,I)},shake:function(x,y,_,E,A){return this.shakeEffect.start(x,y,_,E,A)},pan:function(x,y,_,E,A,D,I){return this.panEffect.start(x,y,_,E,A,D,I)},rotateTo:function(x,y,_,E,A,D,I){return this.rotateToEffect.start(x,y,_,E,A,D,I)},zoomTo:function(x,y,_,E,A,D){return this.zoomEffect.start(x,y,_,E,A,D)},preRender:function(){this.renderList.length=0;var x=this.width,y=this.height,_=.5*x,E=.5*y,A=this.zoomX,D=this.zoomY,I=this.matrix;this.renderRoundPixels=this.roundPixels&&Number.isInteger(A)&&Number.isInteger(D);var R=x*this.originX,F=y*this.originY,N=this._follow,V=this.deadzone,B=this.scrollX,H=this.scrollY;V&&T(V,this.midPoint.x,this.midPoint.y);var Q=!1;if(N&&!this.panEffect.isRunning){var G=this.lerp,K=N.x-this.followOffset.x,q=N.y-this.followOffset.y;V?(KV.right&&(B=m(B,B+(K-V.right),G.x)),qV.bottom&&(H=m(H,H+(q-V.bottom),G.y))):(B=m(B,K-R,G.x),H=m(H,q-F,G.y)),Q=!0}this.roundPixels&&(B=Math.floor(B),H=Math.floor(H)),this.useBounds&&(B=this.clampX(B),H=this.clampY(H)),this.scrollX=B,this.scrollY=H;var at=B+_,ot=H+E;this.midPoint.set(at,ot);var J=Math.floor(x/A+.5),it=Math.floor(y/D+.5),Y=Math.floor(at-J/2+.5),j=Math.floor(ot-it/2+.5);this.worldView.setTo(Y,j,J,it),I.applyITRS(Math.floor(this.x+R+.5),Math.floor(this.y+F+.5),this.rotation,A,D),I.translate(-R,-F),this.shakeEffect.preRender(),Q&&this.emit(u.FOLLOW_UPDATE,this,N)},setLerp:function(x,y){return void 0===x&&(x=1),void 0===y&&(y=x),this.lerp.set(x,y),this},setFollowOffset:function(x,y){return void 0===x&&(x=0),void 0===y&&(y=0),this.followOffset.set(x,y),this},startFollow:function(x,y,_,E,A,D){void 0===y&&(y=!1),void 0===_&&(_=1),void 0===E&&(E=_),void 0===A&&(A=0),void 0===D&&(D=A),this._follow=x,this.roundPixels=y,_=g(_,0,1),E=g(E,0,1),this.lerp.set(_,E),this.followOffset.set(A,D);var I=this.width/2,R=this.height/2,F=x.x-A,N=x.y-D;return this.midPoint.set(F,N),this.scrollX=F-I,this.scrollY=N-R,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(x,y){this.visible&&(this.rotateToEffect.update(x,y),this.panEffect.update(x,y),this.zoomEffect.update(x,y),this.shakeEffect.update(x,y),this.flashEffect.update(x,y),this.fadeEffect.update(x,y))},destroy:function(){this.resetFX(),b.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});S.exports=v},32743:(S,k,a)=>{var b=a(38058),T=a(83419),g=a(95540),f=a(37277),h=a(37303),c=a(97480),u=a(44594),m=new T({initialize:function(p){this.scene=p,this.systems=p.sys,this.roundPixels=p.sys.game.config.roundPixels,this.cameras=[],p.sys.events.once(u.BOOT,this.boot,this),p.sys.events.on(u.START,this.start,this)},boot:function(){var d=this.systems;d.settings.cameras?this.fromJSON(d.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new b(0,0,d.scale.width,d.scale.height).setScene(this.scene),d.game.scale.on(c.RESIZE,this.onResize,this),this.systems.events.once(u.DESTROY,this.destroy,this)},start:function(){if(!this.main){var d=this.systems;d.settings.cameras?this.fromJSON(d.settings.cameras):this.add(),this.main=this.cameras[0]}var p=this.systems.events;p.on(u.UPDATE,this.update,this),p.once(u.SHUTDOWN,this.shutdown,this)},add:function(d,p,v,x,y,_){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=this.scene.sys.scale.width),void 0===x&&(x=this.scene.sys.scale.height),void 0===y&&(y=!1),void 0===_&&(_="");var E=new b(d,p,v,x);return E.setName(_),E.setScene(this.scene),E.setRoundPixels(this.roundPixels),E.id=this.getNextID(),this.cameras.push(E),y&&(this.main=E),E},addExisting:function(d,p){return void 0===p&&(p=!1),-1===this.cameras.indexOf(d)?(d.id=this.getNextID(),d.setRoundPixels(this.roundPixels),this.cameras.push(d),p&&(this.main=d),d):null},getNextID:function(){for(var d=this.cameras,p=1,v=0;v<32;v++){for(var x=!1,y=0;y0){_.preRender();var E=this.getVisibleChildren(p.getChildren(),_);d.render(v,E,_)}}},getVisibleChildren:function(d,p){return d.filter(function(v){return v.willRender(p)})},resetAll:function(){for(var d=0;d{var b=a(45319),T=a(83419),g=a(19715),f=new T({initialize:function(c){this.camera=c,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0},start:function(h,c,u,m,d,p,v,x){return void 0===h&&(h=!0),void 0===c&&(c=1e3),void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=!1),void 0===v&&(v=null),void 0===x&&(x=this.camera.scene),!p&&this.isRunning||(this.isRunning=!0,this.isComplete=!1,this.duration=c,this.direction=h,this.progress=0,this.red=u,this.green=m,this.blue=d,this.alpha=h?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=v,this._onUpdateScope=x,this.camera.emit(h?g.FADE_OUT_START:g.FADE_IN_START,this.camera,this,c,u,m,d)),this.camera},update:function(h,c){this.isRunning&&(this._elapsed+=c,this.progress=b(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var b=a(45319),T=a(83419),g=a(19715),f=new T({initialize:function(c){this.camera=c,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0},start:function(h,c,u,m,d,p,v){return void 0===h&&(h=250),void 0===c&&(c=255),void 0===u&&(u=255),void 0===m&&(m=255),void 0===d&&(d=!1),void 0===p&&(p=null),void 0===v&&(v=this.camera.scene),!d&&this.isRunning||(this.isRunning=!0,this.duration=h,this.progress=0,this.red=c,this.green=u,this.blue=m,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v,this.camera.emit(g.FLASH_START,this.camera,this,h,c,u,m)),this.camera},update:function(h,c){this.isRunning&&(this._elapsed+=c,this.progress=b(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var b=a(45319),T=a(83419),g=a(62640),f=a(19715),h=a(26099),c=new T({initialize:function(m){this.camera=m,this.isRunning=!1,this.duration=0,this.source=new h,this.current=new h,this.destination=new h,this.progress=0,this._elapsed=0},start:function(u,m,d,p,v,x,y){void 0===d&&(d=1e3),void 0===p&&(p=g.Linear),void 0===v&&(v=!1),void 0===x&&(x=null),void 0===y&&(y=this.camera.scene);var _=this.camera;return!v&&this.isRunning||(this.isRunning=!0,this.duration=d,this.progress=0,this.source.set(_.scrollX,_.scrollY),this.destination.set(u,m),_.getScroll(u,m,this.current),"string"==typeof p&&g.hasOwnProperty(p)?this.ease=g[p]:"function"==typeof p&&(this.ease=p),this._elapsed=0,this._onUpdate=x,this._onUpdateScope=y,this.camera.emit(f.PAN_START,this.camera,this,d,u,m)),_},update:function(u,m){if(this.isRunning){this._elapsed+=m;var d=b(this._elapsed/this.duration,0,1);this.progress=d;var p=this.camera;if(this._elapsed{var b=a(45319),T=a(83419),g=a(19715),f=a(62640),h=new T({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.progress=0,this._elapsed=0,this.clockwise=!0,this.shortestPath=!1},start:function(c,u,m,d,p,v,x){void 0===m&&(m=1e3),void 0===d&&(d=f.Linear),void 0===p&&(p=!1),void 0===v&&(v=null),void 0===x&&(x=this.camera.scene),void 0===u&&(u=!1),this.shortestPath=u;var y=c;c<0?(y=-1*c,this.clockwise=!1):this.clockwise=!0;var _=360*Math.PI/180;y-=Math.floor(y/_)*_;var E=this.camera;if(!p&&this.isRunning)return E;if(this.isRunning=!0,this.duration=m,this.progress=0,this.source=E.rotation,this.destination=y,"string"==typeof d&&f.hasOwnProperty(d)?this.ease=f[d]:"function"==typeof d&&(this.ease=d),this._elapsed=0,this._onUpdate=v,this._onUpdateScope=x,this.shortestPath){var A,D;(A=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+_)-this.source)<(D=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+_)-this.destination)?this.clockwise=!0:A>D&&(this.clockwise=!1)}return this.camera.emit(g.ROTATE_START,this.camera,this,m,y),E},update:function(c,u){if(this.isRunning){this._elapsed+=u;var m=b(this._elapsed/this.duration,0,1);this.progress=m;var d=this.camera;if(this._elapsed=_?Math.abs(y-_):Math.abs(y+x)-_;var E;d.rotation=E=this.clockwise?d.rotation+v*p:d.rotation-v*p,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,d,m,E)}else d.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,d,m,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(g.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});S.exports=h},30330:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(19715),f=a(26099),h=new T({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.intensity=new f,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0},start:function(c,u,m,d,p){return void 0===c&&(c=100),void 0===u&&(u=.05),void 0===m&&(m=!1),void 0===d&&(d=null),void 0===p&&(p=this.camera.scene),!m&&this.isRunning||(this.isRunning=!0,this.duration=c,this.progress=0,"number"==typeof u?this.intensity.set(u):this.intensity.set(u.x,u.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=d,this._onUpdateScope=p,this.camera.emit(g.SHAKE_START,this.camera,this,c,u)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(c,u){if(this.isRunning)if(this._elapsed+=u,this.progress=b(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var b=a(45319),T=a(83419),g=a(62640),f=a(19715),h=new T({initialize:function(u){this.camera=u,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.progress=0,this._elapsed=0},start:function(c,u,m,d,p,v){void 0===u&&(u=1e3),void 0===m&&(m=g.Linear),void 0===d&&(d=!1),void 0===p&&(p=null),void 0===v&&(v=this.camera.scene);var x=this.camera;return!d&&this.isRunning||(this.isRunning=!0,this.duration=u,this.progress=0,this.source=x.zoom,this.destination=c,"string"==typeof m&&g.hasOwnProperty(m)?this.ease=g[m]:"function"==typeof m&&(this.ease=m),this._elapsed=0,this._onUpdate=p,this._onUpdateScope=v,this.camera.emit(f.ZOOM_START,this.camera,this,u,c)),x},update:function(c,u){this.isRunning&&(this._elapsed+=u,this.progress=b(this._elapsed/this.duration,0,1),this._elapsed{S.exports={Fade:a(5020),Flash:a(10662),Pan:a(20359),Shake:a(30330),RotateTo:a(34208),Zoom:a(45641)}},16438:S=>{S.exports="cameradestroy"},32726:S=>{S.exports="camerafadeincomplete"},87807:S=>{S.exports="camerafadeinstart"},45917:S=>{S.exports="camerafadeoutcomplete"},95666:S=>{S.exports="camerafadeoutstart"},47056:S=>{S.exports="cameraflashcomplete"},91261:S=>{S.exports="cameraflashstart"},45047:S=>{S.exports="followupdate"},81927:S=>{S.exports="camerapancomplete"},74264:S=>{S.exports="camerapanstart"},54419:S=>{S.exports="postrender"},79330:S=>{S.exports="prerender"},93183:S=>{S.exports="camerarotatecomplete"},80112:S=>{S.exports="camerarotatestart"},62252:S=>{S.exports="camerashakecomplete"},86017:S=>{S.exports="camerashakestart"},539:S=>{S.exports="camerazoomcomplete"},51892:S=>{S.exports="camerazoomstart"},19715:(S,k,a)=>{S.exports={DESTROY:a(16438),FADE_IN_COMPLETE:a(32726),FADE_IN_START:a(87807),FADE_OUT_COMPLETE:a(45917),FADE_OUT_START:a(95666),FLASH_COMPLETE:a(47056),FLASH_START:a(91261),FOLLOW_UPDATE:a(45047),PAN_COMPLETE:a(81927),PAN_START:a(74264),POST_RENDER:a(54419),PRE_RENDER:a(79330),ROTATE_COMPLETE:a(93183),ROTATE_START:a(80112),SHAKE_COMPLETE:a(62252),SHAKE_START:a(86017),ZOOM_COMPLETE:a(539),ZOOM_START:a(51892)}},87969:(S,k,a)=>{S.exports={Camera:a(38058),BaseCamera:a(71911),CameraManager:a(32743),Effects:a(20052),Events:a(19715)}},63091:(S,k,a)=>{var b=a(83419),T=a(35154),g=new b({initialize:function(h){this.camera=T(h,"camera",null),this.left=T(h,"left",null),this.right=T(h,"right",null),this.up=T(h,"up",null),this.down=T(h,"down",null),this.zoomIn=T(h,"zoomIn",null),this.zoomOut=T(h,"zoomOut",null),this.zoomSpeed=T(h,"zoomSpeed",.01),this.minZoom=T(h,"minZoom",.001),this.maxZoom=T(h,"maxZoom",1e3),this.speedX=0,this.speedY=0;var c=T(h,"speed",null);"number"==typeof c?(this.speedX=c,this.speedY=c):(this.speedX=T(h,"speed.x",0),this.speedY=T(h,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(f){return this.camera=f,this},update:function(f){if(this.active){void 0===f&&(f=1);var h=this.camera;this.up&&this.up.isDown?h.scrollY-=this.speedY*f|0:this.down&&this.down.isDown&&(h.scrollY+=this.speedY*f|0),this.left&&this.left.isDown?h.scrollX-=this.speedX*f|0:this.right&&this.right.isDown&&(h.scrollX+=this.speedX*f|0),this.zoomIn&&this.zoomIn.isDown?(h.zoom-=this.zoomSpeed,h.zoomthis.maxZoom&&(h.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});S.exports=g},58818:(S,k,a)=>{var b=a(83419),T=a(35154),g=new b({initialize:function(h){this.camera=T(h,"camera",null),this.left=T(h,"left",null),this.right=T(h,"right",null),this.up=T(h,"up",null),this.down=T(h,"down",null),this.zoomIn=T(h,"zoomIn",null),this.zoomOut=T(h,"zoomOut",null),this.zoomSpeed=T(h,"zoomSpeed",.01),this.minZoom=T(h,"minZoom",.001),this.maxZoom=T(h,"maxZoom",1e3),this.accelX=0,this.accelY=0;var c=T(h,"acceleration",null);"number"==typeof c?(this.accelX=c,this.accelY=c):(this.accelX=T(h,"acceleration.x",0),this.accelY=T(h,"acceleration.y",0)),this.dragX=0,this.dragY=0;var u=T(h,"drag",null);"number"==typeof u?(this.dragX=u,this.dragY=u):(this.dragX=T(h,"drag.x",0),this.dragY=T(h,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var m=T(h,"maxSpeed",null);"number"==typeof m?(this.maxSpeedX=m,this.maxSpeedY=m):(this.maxSpeedX=T(h,"maxSpeed.x",0),this.maxSpeedY=T(h,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(f){return this.camera=f,this},update:function(f){if(this.active){void 0===f&&(f=1);var h=this.camera;this._speedX>0?(this._speedX-=this.dragX*f,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*f,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*f,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*f,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this._zoom=this.zoomIn&&this.zoomIn.isDown?-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this.zoomSpeed:0,0!==this._speedX&&(h.scrollX-=this._speedX*f|0),0!==this._speedY&&(h.scrollY-=this._speedY*f|0),0!==this._zoom&&(h.zoom+=this._zoom,h.zoomthis.maxZoom&&(h.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});S.exports=g},38865:(S,k,a)=>{S.exports={FixedKeyControl:a(63091),SmoothedKeyControl:a(58818)}},26638:(S,k,a)=>{S.exports={Controls:a(38865),Scene2D:a(87969)}},8054:(S,k,a)=>{var b={VERSION:"3.87",LOG_VERSION:"v387",BlendModes:a(10312),ScaleModes:a(29795),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};S.exports=b},69547:(S,k,a)=>{var b=a(83419),T=a(8054),g=a(42363),f=a(82264),h=a(95540),c=a(35154),u=a(41212),m=a(29747),d=a(75508),p=a(36060),v=a(80333),x=new b({initialize:function(_){void 0===_&&(_={});var D=c(_,"scale",null);this.width=c(D,"width",1024,_),this.height=c(D,"height",768,_),this.zoom=c(D,"zoom",1,_),this.parent=c(D,"parent",void 0,_),this.scaleMode=c(D,D?"mode":"scaleMode",0,_),this.expandParent=c(D,"expandParent",!0,_),this.autoRound=c(D,"autoRound",!1,_),this.autoCenter=c(D,"autoCenter",0,_),this.resizeInterval=c(D,"resizeInterval",500,_),this.fullscreenTarget=c(D,"fullscreenTarget",null,_),this.minWidth=c(D,"min.width",0,_),this.maxWidth=c(D,"max.width",0,_),this.minHeight=c(D,"min.height",0,_),this.maxHeight=c(D,"max.height",0,_),this.snapWidth=c(D,"snap.width",0,_),this.snapHeight=c(D,"snap.height",0,_),this.renderType=c(_,"type",T.AUTO),this.canvas=c(_,"canvas",null),this.context=c(_,"context",null),this.canvasStyle=c(_,"canvasStyle",null),this.customEnvironment=c(_,"customEnvironment",!1),this.sceneConfig=c(_,"scene",null),this.seed=c(_,"seed",[(Date.now()*Math.random()).toString()]),d.RND=new d.RandomDataGenerator(this.seed),this.gameTitle=c(_,"title",""),this.gameURL=c(_,"url","https://phaser.io/"+T.LOG_VERSION),this.gameVersion=c(_,"version",""),this.autoFocus=c(_,"autoFocus",!0),this.stableSort=c(_,"stableSort",-1),-1===this.stableSort&&(this.stableSort=f.browser.es2019?1:0),f.features.stableSort=this.stableSort,this.domCreateContainer=c(_,"dom.createContainer",!1),this.domPointerEvents=c(_,"dom.pointerEvents","none"),this.inputKeyboard=c(_,"input.keyboard",!0),this.inputKeyboardEventTarget=c(_,"input.keyboard.target",window),this.inputKeyboardCapture=c(_,"input.keyboard.capture",[]),this.inputMouse=c(_,"input.mouse",!0),this.inputMouseEventTarget=c(_,"input.mouse.target",null),this.inputMousePreventDefaultDown=c(_,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=c(_,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=c(_,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=c(_,"input.mouse.preventDefaultWheel",!0),this.inputTouch=c(_,"input.touch",f.input.touch),this.inputTouchEventTarget=c(_,"input.touch.target",null),this.inputTouchCapture=c(_,"input.touch.capture",!0),this.inputActivePointers=c(_,"input.activePointers",1),this.inputSmoothFactor=c(_,"input.smoothFactor",0),this.inputWindowEvents=c(_,"input.windowEvents",!0),this.inputGamepad=c(_,"input.gamepad",!1),this.inputGamepadEventTarget=c(_,"input.gamepad.target",window),this.disableContextMenu=c(_,"disableContextMenu",!1),this.audio=c(_,"audio",{}),this.hideBanner=!1===c(_,"banner",null),this.hidePhaser=c(_,"banner.hidePhaser",!1),this.bannerTextColor=c(_,"banner.text","#ffffff"),this.bannerBackgroundColor=c(_,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=c(_,"fps",null),this.disablePreFX=c(_,"disablePreFX",!1),this.disablePostFX=c(_,"disablePostFX",!1);var I=c(_,"render",null);this.pipeline=c(I,"pipeline",null,_),this.autoMobilePipeline=c(I,"autoMobilePipeline",!0,_),this.defaultPipeline=c(I,"defaultPipeline",p.MULTI_PIPELINE,_),this.antialias=c(I,"antialias",!0,_),this.antialiasGL=c(I,"antialiasGL",!0,_),this.mipmapFilter=c(I,"mipmapFilter","",_),this.desynchronized=c(I,"desynchronized",!1,_),this.roundPixels=c(I,"roundPixels",!1,_),this.pixelArt=c(I,"pixelArt",1!==this.zoom,_),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=c(I,"transparent",!1,_),this.clearBeforeRender=c(I,"clearBeforeRender",!0,_),this.preserveDrawingBuffer=c(I,"preserveDrawingBuffer",!1,_),this.premultipliedAlpha=c(I,"premultipliedAlpha",!0,_),this.failIfMajorPerformanceCaveat=c(I,"failIfMajorPerformanceCaveat",!1,_),this.powerPreference=c(I,"powerPreference","default",_),this.batchSize=c(I,"batchSize",4096,_),this.maxTextures=c(I,"maxTextures",-1,_),this.maxLights=c(I,"maxLights",10,_);var R=c(_,"backgroundColor",0);this.backgroundColor=v(R),this.transparent&&(this.backgroundColor=v(0),this.backgroundColor.alpha=0),this.preBoot=c(_,"callbacks.preBoot",m),this.postBoot=c(_,"callbacks.postBoot",m),this.physics=c(_,"physics",{}),this.defaultPhysicsSystem=c(this.physics,"default",!1),this.loaderBaseURL=c(_,"loader.baseURL",""),this.loaderPath=c(_,"loader.path",""),this.loaderMaxParallelDownloads=c(_,"loader.maxParallelDownloads",f.os.android?6:32),this.loaderCrossOrigin=c(_,"loader.crossOrigin",void 0),this.loaderResponseType=c(_,"loader.responseType",""),this.loaderAsync=c(_,"loader.async",!0),this.loaderUser=c(_,"loader.user",""),this.loaderPassword=c(_,"loader.password",""),this.loaderTimeout=c(_,"loader.timeout",0),this.loaderMaxRetries=c(_,"loader.maxRetries",2),this.loaderWithCredentials=c(_,"loader.withCredentials",!1),this.loaderImageLoadType=c(_,"loader.imageLoadType","XHR"),this.loaderLocalScheme=c(_,"loader.localScheme",["file://","capacitor://"]),this.glowFXQuality=c(_,"fx.glow.quality",.1),this.glowFXDistance=c(_,"fx.glow.distance",10),this.installGlobalPlugins=[],this.installScenePlugins=[];var F=c(_,"plugins",null),N=g.DefaultScene;F&&(Array.isArray(F)?this.defaultPlugins=F:u(F)&&(this.installGlobalPlugins=h(F,"global",[]),this.installScenePlugins=h(F,"scene",[]),Array.isArray(F.default)?N=F.default:Array.isArray(F.defaultMerge)&&(N=N.concat(F.defaultMerge)))),this.defaultPlugins=N;var V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=c(_,"images.default",V+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=c(_,"images.missing",V+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=c(_,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=T.WEBGL:window.FORCE_CANVAS&&(this.renderType=T.CANVAS))}});S.exports=x},86054:(S,k,a)=>{var b=a(20623),T=a(27919),g=a(8054),f=a(89357);S.exports=function(c){var u=c.config;if((u.customEnvironment||u.canvas)&&u.renderType===g.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!u.customEnvironment&&!u.canvas&&u.renderType!==g.HEADLESS)if(u.renderType===g.AUTO&&(u.renderType=f.webGL?g.WEBGL:g.CANVAS),u.renderType===g.WEBGL){if(!f.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(u.renderType!==g.CANVAS)throw new Error("Unknown value for renderer type: "+u.renderType);if(!f.canvas)throw new Error("Cannot create Canvas context, aborting.")}u.antialias||T.disableSmoothing();var v,x,m=c.scale.baseSize,d=m.width,p=m.height;u.canvas?(c.canvas=u.canvas,c.canvas.width=d,c.canvas.height=p):c.canvas=T.create(c,d,p,u.renderType),u.canvasStyle&&(c.canvas.style=u.canvasStyle),u.antialias||b.setCrisp(c.canvas),u.renderType!==g.HEADLESS&&(v=a(68627),x=a(74797),u.renderType===g.WEBGL?c.renderer=new x(c):(c.renderer=new v(c),c.context=c.renderer.gameContext))}},96391:(S,k,a)=>{var b=a(8054);S.exports=function(g){var f=g.config;if(!f.hideBanner){var h="WebGL";f.renderType===b.CANVAS?h="Canvas":f.renderType===b.HEADLESS&&(h="Headless");var m,c=f.audio,u=g.device.audio;if(m=u.webAudio&&!c.disableWebAudio?"Web Audio":c.noAudio||!u.webAudio&&!u.audioData?"No Audio":"HTML5 Audio",g.device.browser.ie)window.console&&console.log("Phaser v"+b.VERSION+" / https://phaser.io");else{var v,d="",p=[d];Array.isArray(f.bannerBackgroundColor)?(f.bannerBackgroundColor.forEach(function(y){d=d.concat("%c "),p.push("background: "+y),v=y}),p[p.length-1]="color: "+f.bannerTextColor+"; background: "+v):(d=d.concat("%c "),p.push("color: "+f.bannerTextColor+"; background: "+f.bannerBackgroundColor)),p.push("background: transparent"),f.gameTitle&&(d=d.concat(f.gameTitle),f.gameVersion&&(d=d.concat(" v"+f.gameVersion)),f.hidePhaser||(d=d.concat(" / "))),f.hidePhaser||(d=d.concat("Phaser v"+b.VERSION+" ("+h+" | "+m+")")),d=d.concat(" %c "+f.gameURL),p[0]=d,console.log.apply(console,p)}}}},50127:(S,k,a)=>{var b=a(40366),T=a(60848),g=a(24047),f=a(27919),h=a(83419),c=a(69547),u=a(83719),m=a(86054),d=a(45893),p=a(96391),v=a(82264),x=a(57264),y=a(50792),_=a(8443),E=a(7003),A=a(37277),D=a(77332),I=a(76531),R=a(60903),F=a(69442),N=a(17130),V=a(65898),B=a(51085),H=a(14747),G=new h({initialize:function(q){this.config=new c(q),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new y,this.anims=new T(this),this.textures=new N(this),this.cache=new g(this),this.registry=new d(this,new y),this.input=new E(this,this.config),this.scene=new R(this,this.config.sceneConfig),this.device=v,this.scale=new I(this,this.config),this.sound=null,this.sound=H.create(this),this.loop=new V(this,this.config.fps),this.plugins=new D(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,this.isPaused=!1,x(this.boot.bind(this))},boot:function(){A.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),m(this),u(this),p(this),b(this.canvas,this.config.parent),this.textures.once(F.READY,this.texturesReady,this),this.events.emit(_.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(_.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.loop.start(this.renderer?this.step.bind(this):this.headlessStep.bind(this)),B(this);var K=this.events;K.on(_.HIDDEN,this.onHidden,this),K.on(_.VISIBLE,this.onVisible,this),K.on(_.BLUR,this.onBlur,this),K.on(_.FOCUS,this.onFocus,this)},step:function(K,q){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var at=this.events;at.emit(_.PRE_STEP,K,q),at.emit(_.STEP,K,q),this.scene.update(K,q),at.emit(_.POST_STEP,K,q);var ot=this.renderer;ot.preRender(),at.emit(_.PRE_RENDER,ot,K,q),this.scene.render(ot),ot.postRender(),at.emit(_.POST_RENDER,ot,K,q)}},headlessStep:function(K,q){if(this.pendingDestroy)return this.runDestroy();if(!this.isPaused){var at=this.events;at.emit(_.PRE_STEP,K,q),at.emit(_.STEP,K,q),this.scene.update(K,q),at.emit(_.POST_STEP,K,q),this.scene.isProcessing=!1,at.emit(_.PRE_RENDER,null,K,q),at.emit(_.POST_RENDER,null,K,q)}},onHidden:function(){this.loop.pause(),this.events.emit(_.PAUSE)},pause:function(){var K=this.isPaused;this.isPaused=!0,K||this.events.emit(_.PAUSE)},onVisible:function(){this.loop.resume(),this.events.emit(_.RESUME,this.loop.pauseDuration)},resume:function(){var K=this.isPaused;this.isPaused=!1,K&&this.events.emit(_.RESUME,0)},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(K,q){void 0===q&&(q=!1),this.pendingDestroy=!0,this.removeCanvas=K,this.noReturn=q},runDestroy:function(){this.scene.destroy(),this.events.emit(_.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(f.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});S.exports=G},65898:(S,k,a)=>{var b=a(83419),T=a(35154),g=a(29747),f=a(43092),h=new b({initialize:function(u,m){this.game=u,this.raf=new f,this.started=!1,this.running=!1,this.minFps=T(m,"min",5),this.targetFps=T(m,"target",60),this.fpsLimit=T(m,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=g,this.forceSetTimeOut=T(m,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this.pauseDuration=0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=T(m,"deltaHistory",10),this.panicMax=T(m,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=T(m,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.pauseDuration=this.time-this._pauseTime,this.startTime+=this.pauseDuration},resetDelta:function(){var c=window.performance.now();this.time=c,this.lastTime=c,this.nextFpsUpdate=c+1e3,this.framesThisSecond=0;for(var u=0;u0||!this.inFocus)&&(this._coolDown--,c=Math.min(c,this._target)),c>this._min&&(c=m[u],c=Math.min(c,this._min)),m[u]=c,this.deltaIndex++,this.deltaIndex>=d&&(this.deltaIndex=0);for(var p=0,v=0;v=this.nextFpsUpdate&&this.updateFPS(c),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(c,this.delta),this.delta=0),this.lastTime=c,this.frame++},step:function(c){this.now=c;var u=Math.max(0,c-this.lastTime);this.rawDelta=u,this.time+=this.rawDelta,this.smoothStep&&(u=this.smoothDelta(u)),this.delta=u,c>=this.nextFpsUpdate&&this.updateFPS(c),this.framesThisSecond++,this.callback(c,u),this.lastTime=c,this.frame++},tick:function(){var c=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(c):this.step(c)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(c){void 0===c&&(c=!1);var u=window.performance.now();if(!this.running){c&&(this.startTime+=-this.lastTime+(this.lastTime+u));var m=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(m,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=u+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});S.exports=h},51085:(S,k,a)=>{var b=a(8443);S.exports=function(g){var f,h=g.events;void 0!==document.hidden?f="visibilitychange":["webkit","moz","ms"].forEach(function(m){void 0!==document[m+"Hidden"]&&(document.hidden=function(){return document[m+"Hidden"]},f=m+"visibilitychange")}),f&&document.addEventListener(f,function(m){document.hidden||"pause"===m.type?h.emit(b.HIDDEN):h.emit(b.VISIBLE)},!1),window.onblur=function(){h.emit(b.BLUR)},window.onfocus=function(){h.emit(b.FOCUS)},window.focus&&g.config.autoFocus&&window.focus()}},97217:S=>{S.exports="blur"},47548:S=>{S.exports="boot"},19814:S=>{S.exports="contextlost"},68446:S=>{S.exports="destroy"},41700:S=>{S.exports="focus"},25432:S=>{S.exports="hidden"},65942:S=>{S.exports="pause"},59211:S=>{S.exports="postrender"},47789:S=>{S.exports="poststep"},39066:S=>{S.exports="prerender"},460:S=>{S.exports="prestep"},16175:S=>{S.exports="ready"},42331:S=>{S.exports="resume"},11966:S=>{S.exports="step"},32969:S=>{S.exports="systemready"},94830:S=>{S.exports="visible"},8443:(S,k,a)=>{S.exports={BLUR:a(97217),BOOT:a(47548),CONTEXT_LOST:a(19814),DESTROY:a(68446),FOCUS:a(41700),HIDDEN:a(25432),PAUSE:a(65942),POST_RENDER:a(59211),POST_STEP:a(47789),PRE_RENDER:a(39066),PRE_STEP:a(460),READY:a(16175),RESUME:a(42331),STEP:a(11966),SYSTEM_READY:a(32969),VISIBLE:a(94830)}},42857:(S,k,a)=>{S.exports={Config:a(69547),CreateRenderer:a(86054),DebugHeader:a(96391),Events:a(8443),TimeStep:a(65898),VisibilityHandler:a(51085)}},99584:(S,k,a)=>{var b=a(5290),T=a(27919),g=a(35154);S.exports=function(h){var c=g(h,"data",[]),u=g(h,"canvas",null),m=g(h,"palette",b),d=g(h,"pixelWidth",1),p=g(h,"pixelHeight",d),v=g(h,"resizeCanvas",!0),x=g(h,"clearCanvas",!0),y=g(h,"preRender",null),_=g(h,"postRender",null),E=Math.floor(Math.abs(c[0].length*d)),A=Math.floor(Math.abs(c.length*p));u||(u=T.create2D(this,E,A),v=!1,x=!1),v&&(u.width=E,u.height=A);var D=u.getContext("2d",{willReadFrequently:!0});x&&D.clearRect(0,0,E,A),y&&y(u,D);for(var I=0;I{S.exports={GenerateTexture:a(99584),Palettes:a(57763)}},5290:S=>{S.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},23816:S=>{S.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},9866:S=>{S.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},77552:S=>{S.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},92259:S=>{S.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},57763:(S,k,a)=>{S.exports={ARNE16:a(5290),C64:a(23816),CGA:a(9866),JMP:a(77552),MSX:a(92259)}},46728:(S,k,a)=>{var b=a(83419),T=a(36316),g=a(80021),f=a(26099),h=new b({Extends:g,initialize:function(u,m,d,p){g.call(this,"CubicBezierCurve"),Array.isArray(u)&&(p=new f(u[6],u[7]),d=new f(u[4],u[5]),m=new f(u[2],u[3]),u=new f(u[0],u[1])),this.p0=u,this.p1=m,this.p2=d,this.p3=p},getStartPoint:function(c){return void 0===c&&(c=new f),c.copy(this.p0)},getResolution:function(c){return c},getPoint:function(c,u){void 0===u&&(u=new f);var m=this.p0,d=this.p1,p=this.p2,v=this.p3;return u.set(T(c,m.x,d.x,p.x,v.x),T(c,m.y,d.y,p.y,v.y))},draw:function(c,u){void 0===u&&(u=32);var m=this.getPoints(u);c.beginPath(),c.moveTo(this.p0.x,this.p0.y);for(var d=1;d{var b=a(83419),T=a(19217),g=a(87841),f=a(26099),h=new b({initialize:function(u){this.type=u,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new f,this._tmpVec2B=new f},draw:function(c,u){return void 0===u&&(u=32),c.strokePoints(this.getPoints(u))},getBounds:function(c,u){c||(c=new g),void 0===u&&(u=16);var m=this.getLength();u>m&&(u=m/2);var d=Math.max(1,Math.round(m/u));return T(this.getSpacedPoints(d),c)},getDistancePoints:function(c){var u=this.getLength(),m=Math.max(1,u/c);return this.getSpacedPoints(m)},getEndPoint:function(c){return void 0===c&&(c=new f),this.getPointAt(1,c)},getLength:function(){var c=this.getLengths();return c[c.length-1]},getLengths:function(c){if(void 0===c&&(c=this.arcLengthDivisions),this.cacheArcLengths.length===c+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var m,u=[],d=this.getPoint(0,this._tmpVec2A),p=0;u.push(0);for(var v=1;v<=c;v++)p+=(m=this.getPoint(v/c,this._tmpVec2B)).distance(d),u.push(p),d.copy(m);return this.cacheArcLengths=u,u},getPointAt:function(c,u){var m=this.getUtoTmapping(c);return this.getPoint(m,u)},getPoints:function(c,u,m){void 0===m&&(m=[]),c||(c=u?this.getLength()/u:this.defaultDivisions);for(var d=0;d<=c;d++)m.push(this.getPoint(d/c));return m},getRandomPoint:function(c){return void 0===c&&(c=new f),this.getPoint(Math.random(),c)},getSpacedPoints:function(c,u,m){void 0===m&&(m=[]),c||(c=u?this.getLength()/u:this.defaultDivisions);for(var d=0;d<=c;d++){var p=this.getUtoTmapping(d/c,null,c);m.push(this.getPoint(p))}return m},getStartPoint:function(c){return void 0===c&&(c=new f),this.getPointAt(0,c)},getTangent:function(c,u){void 0===u&&(u=new f);var m=1e-4,d=c-m,p=c+m;return d<0&&(d=0),p>1&&(p=1),this.getPoint(d,this._tmpVec2A),this.getPoint(p,u),u.subtract(this._tmpVec2A).normalize()},getTangentAt:function(c,u){var m=this.getUtoTmapping(c);return this.getTangent(m,u)},getTFromDistance:function(c,u){return c<=0?0:this.getUtoTmapping(0,c,u)},getUtoTmapping:function(c,u,m){var x,d=this.getLengths(m),p=0,v=d.length;x=u?Math.min(u,d[v-1]):c*d[v-1];for(var E,y=0,_=v-1;y<=_;)if((E=d[p=Math.floor(y+(_-y)/2)]-x)<0)y=p+1;else{if(!(E>0)){_=p;break}_=p-1}if(d[p=_]===x)return p/(v-1);var A=d[p];return(p+(x-A)/(d[p+1]-A))/(v-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});S.exports=h},73825:(S,k,a)=>{var b=a(83419),T=a(80021),g=a(39506),f=a(35154),h=a(43396),c=a(26099),u=new b({Extends:T,initialize:function(d,p,v,x,y,_,E,A){if("object"==typeof d){var D=d;d=f(D,"x",0),p=f(D,"y",0),v=f(D,"xRadius",0),x=f(D,"yRadius",v),y=f(D,"startAngle",0),_=f(D,"endAngle",360),E=f(D,"clockwise",!1),A=f(D,"rotation",0)}else void 0===x&&(x=v),void 0===y&&(y=0),void 0===_&&(_=360),void 0===E&&(E=!1),void 0===A&&(A=0);T.call(this,"EllipseCurve"),this.p0=new c(d,p),this._xRadius=v,this._yRadius=x,this._startAngle=g(y),this._endAngle=g(_),this._clockwise=E,this._rotation=g(A)},getStartPoint:function(m){return void 0===m&&(m=new c),this.getPoint(0,m)},getResolution:function(m){return 2*m},getPoint:function(m,d){void 0===d&&(d=new c);for(var p=2*Math.PI,v=this._endAngle-this._startAngle,x=Math.abs(v)p;)v-=p;v{var b=a(83419),T=a(80021),g=a(19217),f=a(87841),h=a(26099),c=new b({Extends:T,initialize:function(m,d){T.call(this,"LineCurve"),Array.isArray(m)&&(d=new h(m[2],m[3]),m=new h(m[0],m[1])),this.p0=m,this.p1=d,this.arcLengthDivisions=1},getBounds:function(u){return void 0===u&&(u=new f),g([this.p0,this.p1],u)},getStartPoint:function(u){return void 0===u&&(u=new h),u.copy(this.p0)},getResolution:function(u){return void 0===u&&(u=1),u},getPoint:function(u,m){return void 0===m&&(m=new h),1===u?m.copy(this.p1):(m.copy(this.p1).subtract(this.p0).scale(u).add(this.p0),m)},getPointAt:function(u,m){return this.getPoint(u,m)},getTangent:function(u,m){return void 0===m&&(m=new h),m.copy(this.p1).subtract(this.p0).normalize(),m},getUtoTmapping:function(u,m,d){var p;if(m){var v=this.getLengths(d),x=v[v.length-1];p=Math.min(m,x)/x}else p=u;return p},draw:function(u){return u.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),u},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});c.fromJSON=function(u){var m=u.points,d=new h(m[0],m[1]),p=new h(m[2],m[3]);return new c(d,p)},S.exports=c},14744:(S,k,a)=>{var b=a(83419),T=a(80021),g=a(32112),f=a(26099),h=new b({Extends:T,initialize:function(u,m,d){T.call(this,"QuadraticBezierCurve"),Array.isArray(u)&&(d=new f(u[4],u[5]),m=new f(u[2],u[3]),u=new f(u[0],u[1])),this.p0=u,this.p1=m,this.p2=d},getStartPoint:function(c){return void 0===c&&(c=new f),c.copy(this.p0)},getResolution:function(c){return c},getPoint:function(c,u){void 0===u&&(u=new f);var m=this.p0,d=this.p1,p=this.p2;return u.set(g(c,m.x,d.x,p.x),g(c,m.y,d.y,p.y))},draw:function(c,u){void 0===u&&(u=32);var m=this.getPoints(u);c.beginPath(),c.moveTo(this.p0.x,this.p0.y);for(var d=1;d{var b=a(87842),T=a(83419),g=a(80021),f=a(26099),h=new T({Extends:g,initialize:function(u){void 0===u&&(u=[]),g.call(this,"SplineCurve"),this.points=[],this.addPoints(u)},addPoints:function(c){for(var u=0;um.length-2?m.length-1:p+1],E=m[p>m.length-3?m.length-1:p+2];return u.set(b(v,x.x,y.x,_.x,E.x),b(v,x.y,y.y,_.y,E.y))},toJSON:function(){for(var c=[],u=0;u{S.exports={Path:a(46669),MoveTo:a(68618),CubicBezier:a(46728),Curve:a(80021),Ellipse:a(73825),Line:a(33951),QuadraticBezier:a(14744),Spline:a(42534)}},68618:(S,k,a)=>{var b=a(83419),T=a(26099),g=new b({initialize:function(h,c){this.active=!1,this.p0=new T(h,c)},getPoint:function(f,h){return void 0===h&&(h=new T),h.copy(this.p0)},getPointAt:function(f,h){return this.getPoint(f,h)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});S.exports=g},46669:(S,k,a)=>{var b=a(83419),T=a(46728),g=a(73825),f=a(39429),h=a(33951),c=a(68618),u=a(14744),m=a(87841),d=a(42534),p=a(26099),v=a(36383),x=new b({initialize:function(_,E){void 0===_&&(_=0),void 0===E&&(E=0),this.name="",this.defaultDivisions=12,this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new p,this._tmpVec2A=new p,this._tmpVec2B=new p,"object"==typeof _?this.fromJSON(_):this.startPoint.set(_,E)},add:function(y){return this.curves.push(y),this},circleTo:function(y,_,E){return void 0===_&&(_=!1),this.ellipseTo(y,y,0,360,_,E)},closePath:function(){var y=this.curves[0].getPoint(0),_=this.curves[this.curves.length-1].getPoint(1);return y.equals(_)||this.curves.push(new h(_,y)),this},cubicBezierTo:function(y,_,E,A,D,I){var F,N,V,R=this.getEndPoint();return y instanceof p?(F=y,N=_,V=E):(F=new p(E,A),N=new p(D,I),V=new p(y,_)),this.add(new T(R,F,N,V))},quadraticBezierTo:function(y,_,E,A){var I,R,D=this.getEndPoint();return y instanceof p?(I=y,R=_):(I=new p(E,A),R=new p(y,_)),this.add(new u(D,I,R))},draw:function(y,_){for(var E=0;E=_)return this.curves[A];A++}return null},getEndPoint:function(y){return void 0===y&&(y=new p),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,y):y.copy(this.startPoint),y},getLength:function(){var y=this.getCurveLengths();return y[y.length-1]},getPoint:function(y,_){void 0===_&&(_=new p);for(var E=y*this.getLength(),A=this.getCurveLengths(),D=0;D=E){var I=A[D]-E,R=this.curves[D],F=R.getLength();return R.getPointAt(0===F?0:1-I/F,_)}D++}return null},getPoints:function(y,_){!y&&!_&&(y=this.defaultDivisions);for(var A,E=[],D=0;D1&&!E[E.length-1].equals(E[0])&&E.push(E[0]),E},getRandomPoint:function(y){return void 0===y&&(y=new p),this.getPoint(Math.random(),y)},getSpacedPoints:function(y){void 0===y&&(y=40);for(var _=[],E=0;E<=y;E++)_.push(this.getPoint(E/y));return this.autoClose&&_.push(_[0]),_},getStartPoint:function(y){return void 0===y&&(y=new p),y.copy(this.startPoint)},getTangent:function(y,_){void 0===_&&(_=new p);for(var E=y*this.getLength(),A=this.getCurveLengths(),D=0;D=E){var I=A[D]-E,R=this.curves[D],F=R.getLength();return R.getTangentAt(0===F?0:1-I/F,_)}D++}return null},lineTo:function(y,_){y instanceof p?this._tmpVec2B.copy(y):"object"==typeof y?this._tmpVec2B.setFromObject(y):this._tmpVec2B.set(y,_);var E=this.getEndPoint(this._tmpVec2A);return this.add(new h([E.x,E.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(y){return y.unshift(this.getEndPoint()),this.add(new d(y))},moveTo:function(y,_){return this.add(y instanceof p?new c(y.x,y.y):new c(y,_))},toJSON:function(){for(var y=[],_=0;_{var b=a(83419),T=a(24882),g=new b({initialize:function(h,c){this.parent=h,this.events=c,c||(this.events=h.events?h.events:h),this.list={},this.values={},this._frozen=!1,!h.hasOwnProperty("sys")&&this.events&&this.events.once(T.DESTROY,this.destroy,this)},get:function(f){var h=this.list;if(Array.isArray(f)){for(var c=[],u=0;u{var b=a(83419),T=a(45893),g=a(37277),f=a(44594),h=new b({Extends:T,initialize:function(u){T.call(this,u,u.sys.events),this.scene=u,this.systems=u.sys,u.sys.events.once(f.BOOT,this.boot,this),u.sys.events.on(f.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(f.DESTROY,this.destroy,this)},start:function(){this.events.once(f.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(f.SHUTDOWN,this.shutdown,this)},destroy:function(){T.prototype.destroy.call(this),this.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});g.register("DataManagerPlugin",h,"data"),S.exports=h},10700:S=>{S.exports="changedata"},93608:S=>{S.exports="changedata-"},60883:S=>{S.exports="destroy"},69780:S=>{S.exports="removedata"},22166:S=>{S.exports="setdata"},24882:(S,k,a)=>{S.exports={CHANGE_DATA:a(10700),CHANGE_DATA_KEY:a(93608),DESTROY:a(60883),REMOVE_DATA:a(69780),SET_DATA:a(22166)}},44965:(S,k,a)=>{S.exports={DataManager:a(45893),DataManagerPlugin:a(63646),Events:a(24882)}},7098:(S,k,a)=>{var b=a(84148),T={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};S.exports=function g(){if("function"==typeof importScripts)return T;T.audioData=!!window.Audio,T.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var f=document.createElement("audio"),h=!!f.canPlayType;try{if(h){var c=function(d,p){var v=f.canPlayType("audio/"+d).replace(/^no$/,"");return p?!(!v&&!f.canPlayType("audio/"+p).replace(/^no$/,"")):!!v};if(T.ogg=c('ogg; codecs="vorbis"'),T.opus=c('ogg; codecs="opus"',"opus"),T.mp3=c("mpeg"),T.wav=c("wav"),T.m4a=c("x-m4a"),T.aac=c("aac"),T.flac=c("flac","x-flac"),T.webm=c('webm; codecs="vorbis"'),""!==f.canPlayType('audio/mp4; codecs="ec-3"'))if(b.edge)T.dolby=!0;else if(b.safari&&b.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var u=parseInt(RegExp.$1,10),m=parseInt(RegExp.$2,10);(10===u&&m>=11||u>10)&&(T.dolby=!0)}}}catch{}return T}()},84148:(S,k,a)=>{var b=a(25892),T={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};S.exports=function g(){var f=navigator.userAgent;return/Edg\/\d+/.test(f)?(T.edge=!0,T.es2019=!0):/OPR/.test(f)?(T.opera=!0,T.es2019=!0):/Chrome\/(\d+)/.test(f)&&!b.windowsPhone?(T.chrome=!0,T.chromeVersion=parseInt(RegExp.$1,10),T.es2019=T.chromeVersion>69):/Firefox\D+(\d+)/.test(f)?(T.firefox=!0,T.firefoxVersion=parseInt(RegExp.$1,10),T.es2019=T.firefoxVersion>10):/AppleWebKit\/(?!.*CriOS)/.test(f)&&b.iOS?(T.mobileSafari=!0,T.es2019=!0):/MSIE (\d+\.\d+);/.test(f)?(T.ie=!0,T.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+(\.\d+)?) Safari/.test(f)&&!b.windowsPhone?(T.safari=!0,T.safariVersion=parseInt(RegExp.$1,10),T.es2019=T.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(f)&&(T.ie=!0,T.trident=!0,T.tridentVersion=parseInt(RegExp.$1,10),T.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(f)&&(T.silk=!0),T}()},89289:(S,k,a)=>{var b=a(27919),T={supportInverseAlpha:!1,supportNewBlendModes:!1};S.exports=function h(){return"function"!=typeof importScripts&&void 0!==document&&(T.supportNewBlendModes=function g(){var c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",u="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",m=new Image;return m.onload=function(){var d=new Image;d.onload=function(){var v=b.create2D(d,6).getContext("2d",{willReadFrequently:!0});if(v.globalCompositeOperation="multiply",v.drawImage(m,0,0),v.drawImage(d,2,0),!v.getImageData(2,0,1,1))return!1;var x=v.getImageData(2,0,1,1).data;b.remove(d),T.supportNewBlendModes=255===x[0]&&0===x[1]&&0===x[2]},d.src=c+"/wCKxvRF"+u},m.src=c+"AP804Oa6"+u,!1}(),T.supportInverseAlpha=function f(){var u=b.create2D(this,2).getContext("2d",{willReadFrequently:!0});u.fillStyle="rgba(10, 20, 30, 0.5)",u.fillRect(0,0,1,1);var m=u.getImageData(0,0,1,1);if(null===m)return!1;u.putImageData(m,1,0);var d=u.getImageData(1,0,1,1),p=d.data[0]===m.data[0]&&d.data[1]===m.data[1]&&d.data[2]===m.data[2]&&d.data[3]===m.data[3];return b.remove(this),p}()),T}()},89357:(S,k,a)=>{var b=a(25892),T=a(84148),g=a(27919),f={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};S.exports=function c(){if("function"==typeof importScripts)return f;f.canvas=!!window.CanvasRenderingContext2D;try{f.localStorage=!!localStorage.getItem}catch{f.localStorage=!1}f.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),f.fileSystem=!!window.requestFileSystem;var u=!1;return f.webGL=function(){if(window.WebGLRenderingContext)try{var d=g.createWebGL(this),p=d.getContext("webgl")||d.getContext("experimental-webgl"),v=g.create2D(this),y=v.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return u=y.data instanceof Uint8ClampedArray,g.remove(d),g.remove(v),!!p}catch{return!1}return!1}(),f.worker=!!window.Worker,f.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,f.getUserMedia=f.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,T.firefox&&T.firefoxVersion<21&&(f.getUserMedia=!1),!b.iOS&&(T.ie||T.firefox||T.chrome)&&(f.canvasBitBltShift=!0),(T.safari||T.mobileSafari)&&(f.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(f.vibration=!0),typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint32Array<"u"&&(f.littleEndian=function h(){var u=new ArrayBuffer(4),m=new Uint8Array(u),d=new Uint32Array(u);return m[0]=161,m[1]=178,m[2]=195,m[3]=212,3569595041===d[0]||2712847316!==d[0]&&null}()),f.support32bit=typeof ArrayBuffer<"u"&&typeof Uint8ClampedArray<"u"&&typeof Int32Array<"u"&&null!==f.littleEndian&&u,f}()},91639:S=>{var k={available:!1,cancel:"",keyboard:!1,request:""};S.exports=function a(){if("function"==typeof importScripts)return k;var b,T="Fullscreen",g="FullScreen",f=["request"+T,"request"+g,"webkitRequest"+T,"webkitRequest"+g,"msRequest"+T,"msRequest"+g,"mozRequest"+g,"mozRequest"+T];for(b=0;b{var b=a(84148),T={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};S.exports=function g(){return"function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(T.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(T.mspointer=!0),navigator.getGamepads&&(T.gamepads=!0),"onwheel"in window||b.ie&&"WheelEvent"in window?T.wheelEvent="wheel":"onmousewheel"in window?T.wheelEvent="mousewheel":b.firefox&&"MouseScrollEvent"in window&&(T.wheelEvent="DOMMouseScroll")),T}()},25892:S=>{var k={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};S.exports=function a(){if("function"==typeof importScripts)return k;var b=navigator.userAgent;/Windows/.test(b)?k.windows=!0:/Mac OS/.test(b)&&!/like Mac OS/.test(b)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(k.iOS=!0,k.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),k.iOSVersion=parseInt(RegExp.$1,10)):k.macOS=!0:/Android/.test(b)?k.android=!0:/Linux/.test(b)?k.linux=!0:/iP[ao]d|iPhone/i.test(b)?(k.iOS=!0,navigator.appVersion.match(/OS (\d+)/),k.iOSVersion=parseInt(RegExp.$1,10),k.iPhone=-1!==b.toLowerCase().indexOf("iphone"),k.iPad=-1!==b.toLowerCase().indexOf("ipad")):/Kindle/.test(b)||/\bKF[A-Z][A-Z]+/.test(b)||/Silk.*Mobile Safari/.test(b)?k.kindle=!0:/CrOS/.test(b)&&(k.chromeOS=!0),(/Windows Phone/i.test(b)||/IEMobile/i.test(b))&&(k.android=!1,k.iOS=!1,k.macOS=!1,k.windows=!0,k.windowsPhone=!0);var T=/Silk/.test(b);return(k.windows||k.macOS||k.linux&&!T||k.chromeOS)&&(k.desktop=!0),(k.windowsPhone||/Windows NT/i.test(b)&&/Touch/i.test(b))&&(k.desktop=!1),navigator.standalone&&(k.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(k.cordova=!0),void 0!==window.ejecta&&(k.ejecta=!0)),typeof process<"u"&&process.versions&&process.versions.node&&(k.node=!0),k.node&&"object"==typeof process.versions&&(k.nodeWebkit=!!process.versions["node-webkit"],k.electron=!!process.versions.electron),/Crosswalk/.test(b)&&(k.crosswalk=!0),k.pixelRatio=window.devicePixelRatio||1,k}()},43267:(S,k,a)=>{var b=a(95540),T={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};S.exports=function g(){if("function"==typeof importScripts)return T;var f=document.createElement("video"),h=!!f.canPlayType,c=/^no$/;try{h&&(f.canPlayType('video/ogg; codecs="theora"').replace(c,"")&&(T.ogg=!0),f.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(c,"")&&(T.h264=!0,T.mp4=!0),f.canPlayType("video/x-m4v").replace(c,"")&&(T.m4v=!0),f.canPlayType('video/webm; codecs="vp8, vorbis"').replace(c,"")&&(T.webm=!0),f.canPlayType('video/webm; codecs="vp9"').replace(c,"")&&(T.vp9=!0),f.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(c,"")&&(T.hls=!0))}catch{}return f.parentNode&&f.parentNode.removeChild(f),T.getVideoURL=function(u){Array.isArray(u)||(u=[u]);for(var m=0;m{S.exports={os:a(25892),browser:a(84148),features:a(89357),input:a(31784),audio:a(7098),video:a(43267),fullscreen:a(91639),canvasFeatures:a(89289)}},89422:(S,k,a)=>{var b=a(83419),T=new Float32Array(20),g=new b({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(f){return this._matrix.set(f),this._dirty=!0,this},reset:function(){var f=this._matrix;return f.fill(0),f[0]=1,f[6]=1,f[12]=1,f[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var f=this._data;return this._dirty&&(f.set(this._matrix),f[4]/=255,f[9]/=255,f[14]/=255,f[19]/=255,this._dirty=!1),f},brightness:function(f,h){return void 0===f&&(f=0),void 0===h&&(h=!1),this.multiply([f,0,0,0,0,0,f,0,0,0,0,0,f,0,0,0,0,0,1,0],h)},saturate:function(f,h){void 0===f&&(f=0),void 0===h&&(h=!1);var c=2*f/3+1,u=-.5*(c-1);return this.multiply([c,u,u,0,0,u,c,u,0,0,u,u,c,0,0,0,0,0,1,0],h)},desaturate:function(f){return void 0===f&&(f=!1),this.saturate(-1,f)},hue:function(f,h){void 0===f&&(f=0),void 0===h&&(h=!1),f=f/180*Math.PI;var c=Math.cos(f),u=Math.sin(f),m=.213,d=.715,p=.072;return this.multiply([m+c*(1-m)+u*-m,d+c*-d+u*-d,p+c*-p+u*(1-p),0,0,m+c*-m+.143*u,d+c*(1-d)+.14*u,p+c*-p+-.283*u,0,0,m+c*-m+-.787*u,d+c*-d+u*d,p+c*(1-p)+u*p,0,0,0,0,0,1,0],h)},grayscale:function(f,h){return void 0===f&&(f=1),void 0===h&&(h=!1),this.saturate(-f,h)},blackWhite:function(f){return void 0===f&&(f=!1),this.multiply(g.BLACK_WHITE,f)},contrast:function(f,h){void 0===f&&(f=0),void 0===h&&(h=!1);var c=f+1,u=-.5*(c-1);return this.multiply([c,0,0,0,u,0,c,0,0,u,0,0,c,0,u,0,0,0,1,0],h)},negative:function(f){return void 0===f&&(f=!1),this.multiply(g.NEGATIVE,f)},desaturateLuminance:function(f){return void 0===f&&(f=!1),this.multiply(g.DESATURATE_LUMINANCE,f)},sepia:function(f){return void 0===f&&(f=!1),this.multiply(g.SEPIA,f)},night:function(f,h){return void 0===f&&(f=.1),void 0===h&&(h=!1),this.multiply([-2*f,-f,0,0,0,-f,0,f,0,0,0,f,2*f,0,0,0,0,0,1,0],h)},lsd:function(f){return void 0===f&&(f=!1),this.multiply(g.LSD,f)},brown:function(f){return void 0===f&&(f=!1),this.multiply(g.BROWN,f)},vintagePinhole:function(f){return void 0===f&&(f=!1),this.multiply(g.VINTAGE,f)},kodachrome:function(f){return void 0===f&&(f=!1),this.multiply(g.KODACHROME,f)},technicolor:function(f){return void 0===f&&(f=!1),this.multiply(g.TECHNICOLOR,f)},polaroid:function(f){return void 0===f&&(f=!1),this.multiply(g.POLAROID,f)},shiftToBGR:function(f){return void 0===f&&(f=!1),this.multiply(g.SHIFT_BGR,f)},multiply:function(f,h){void 0===h&&(h=!1),h||this.reset();var c=this._matrix,u=T;return u.set(c),c.set([u[0]*f[0]+u[1]*f[5]+u[2]*f[10]+u[3]*f[15],u[0]*f[1]+u[1]*f[6]+u[2]*f[11]+u[3]*f[16],u[0]*f[2]+u[1]*f[7]+u[2]*f[12]+u[3]*f[17],u[0]*f[3]+u[1]*f[8]+u[2]*f[13]+u[3]*f[18],u[0]*f[4]+u[1]*f[9]+u[2]*f[14]+u[3]*f[19]+u[4],u[5]*f[0]+u[6]*f[5]+u[7]*f[10]+u[8]*f[15],u[5]*f[1]+u[6]*f[6]+u[7]*f[11]+u[8]*f[16],u[5]*f[2]+u[6]*f[7]+u[7]*f[12]+u[8]*f[17],u[5]*f[3]+u[6]*f[8]+u[7]*f[13]+u[8]*f[18],u[5]*f[4]+u[6]*f[9]+u[7]*f[14]+u[8]*f[19]+u[9],u[10]*f[0]+u[11]*f[5]+u[12]*f[10]+u[13]*f[15],u[10]*f[1]+u[11]*f[6]+u[12]*f[11]+u[13]*f[16],u[10]*f[2]+u[11]*f[7]+u[12]*f[12]+u[13]*f[17],u[10]*f[3]+u[11]*f[8]+u[12]*f[13]+u[13]*f[18],u[10]*f[4]+u[11]*f[9]+u[12]*f[14]+u[13]*f[19]+u[14],u[15]*f[0]+u[16]*f[5]+u[17]*f[10]+u[18]*f[15],u[15]*f[1]+u[16]*f[6]+u[17]*f[11]+u[18]*f[16],u[15]*f[2]+u[16]*f[7]+u[17]*f[12]+u[18]*f[17],u[15]*f[3]+u[16]*f[8]+u[17]*f[13]+u[18]*f[18],u[15]*f[4]+u[16]*f[9]+u[17]*f[14]+u[18]*f[19]+u[19]]),this._dirty=!0,this}});g.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],g.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],g.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],g.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],g.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],g.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],g.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],g.KODACHROME=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],g.TECHNICOLOR=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],g.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],g.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],S.exports=g},51767:(S,k,a)=>{var b=a(83419),T=a(29747),g=new b({initialize:function(h,c,u){this._rgb=[0,0,0],this.onChangeCallback=T,this.dirty=!1,this.set(h,c,u)},set:function(f,h,c){return void 0===f&&(f=0),void 0===h&&(h=0),void 0===c&&(c=0),this._rgb=[f,h,c],this.onChange(),this},equals:function(f,h,c){var u=this._rgb;return u[0]===f&&u[1]===h&&u[2]===c},onChange:function(){this.dirty=!0;var f=this._rgb;this.onChangeCallback.call(this,f[0],f[1],f[2])},r:{get:function(){return this._rgb[0]},set:function(f){this._rgb[0]=f,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(f){this._rgb[1]=f,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(f){this._rgb[2]=f,this.onChange()}},destroy:function(){this.onChangeCallback=null}});S.exports=g},60461:S=>{S.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},54312:(S,k,a)=>{var b=a(62235),T=a(35893),g=a(86327),f=a(88417);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},46768:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(86327),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},35827:(S,k,a)=>{var b=a(62235),T=a(54380),g=a(86327),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},46871:(S,k,a)=>{var b=a(66786),T=a(35893),g=a(7702);S.exports=function(h,c,u,m){return void 0===u&&(u=0),void 0===m&&(m=0),b(h,T(c)+u,g(c)+m),h}},5198:(S,k,a)=>{var b=a(7702),T=a(26541),g=a(20786),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},11879:(S,k,a)=>{var b=a(60461),T=[];T[b.BOTTOM_CENTER]=a(54312),T[b.BOTTOM_LEFT]=a(46768),T[b.BOTTOM_RIGHT]=a(35827),T[b.CENTER]=a(46871),T[b.LEFT_CENTER]=a(5198),T[b.RIGHT_CENTER]=a(80503),T[b.TOP_CENTER]=a(89698),T[b.TOP_LEFT]=a(922),T[b.TOP_RIGHT]=a(21373),T[b.LEFT_BOTTOM]=T[b.BOTTOM_LEFT],T[b.LEFT_TOP]=T[b.TOP_LEFT],T[b.RIGHT_BOTTOM]=T[b.BOTTOM_RIGHT],T[b.RIGHT_TOP]=T[b.TOP_RIGHT],S.exports=function(f,h,c,u,m){return T[c](f,h,u,m)}},80503:(S,k,a)=>{var b=a(7702),T=a(54380),g=a(20786),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},89698:(S,k,a)=>{var b=a(35893),T=a(17717),g=a(88417),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)+m),f(c,T(u)-d),c}},922:(S,k,a)=>{var b=a(26541),T=a(17717),g=a(385),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)-m),f(c,T(u)-d),c}},21373:(S,k,a)=>{var b=a(54380),T=a(17717),g=a(40136),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)+m),f(c,T(u)-d),c}},91660:(S,k,a)=>{S.exports={BottomCenter:a(54312),BottomLeft:a(46768),BottomRight:a(35827),Center:a(46871),LeftCenter:a(5198),QuickSet:a(11879),RightCenter:a(80503),TopCenter:a(89698),TopLeft:a(922),TopRight:a(21373)}},71926:(S,k,a)=>{var b=a(60461),T=a(79291),g={In:a(91660),To:a(16694)};g=T(!1,g,b),S.exports=g},21578:(S,k,a)=>{var b=a(62235),T=a(35893),g=a(88417),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,T(u)+m),f(c,b(u)+d),c}},10210:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(385),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,T(u)-m),f(c,b(u)+d),c}},82341:(S,k,a)=>{var b=a(62235),T=a(54380),g=a(40136),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,T(u)+m),f(c,b(u)+d),c}},87958:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(86327),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},40080:(S,k,a)=>{var b=a(7702),T=a(26541),g=a(20786),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)-m),g(c,b(u)+d),c}},88466:(S,k,a)=>{var b=a(26541),T=a(17717),g=a(40136),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)-m),f(c,T(u)-d),c}},38829:(S,k,a)=>{var b=a(60461),T=[];T[b.BOTTOM_CENTER]=a(21578),T[b.BOTTOM_LEFT]=a(10210),T[b.BOTTOM_RIGHT]=a(82341),T[b.LEFT_BOTTOM]=a(87958),T[b.LEFT_CENTER]=a(40080),T[b.LEFT_TOP]=a(88466),T[b.RIGHT_BOTTOM]=a(19211),T[b.RIGHT_CENTER]=a(34609),T[b.RIGHT_TOP]=a(48741),T[b.TOP_CENTER]=a(49440),T[b.TOP_LEFT]=a(81288),T[b.TOP_RIGHT]=a(61323),S.exports=function(f,h,c,u,m){return T[c](f,h,u,m)}},19211:(S,k,a)=>{var b=a(62235),T=a(54380),g=a(86327),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},34609:(S,k,a)=>{var b=a(7702),T=a(54380),g=a(20786),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,T(u)+m),g(c,b(u)+d),c}},48741:(S,k,a)=>{var b=a(54380),T=a(17717),g=a(385),f=a(66737);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),g(c,b(u)+m),f(c,T(u)-d),c}},49440:(S,k,a)=>{var b=a(35893),T=a(17717),g=a(86327),f=a(88417);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,b(u)+m),g(c,T(u)-d),c}},81288:(S,k,a)=>{var b=a(26541),T=a(17717),g=a(86327),f=a(385);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,b(u)-m),g(c,T(u)-d),c}},61323:(S,k,a)=>{var b=a(54380),T=a(17717),g=a(86327),f=a(40136);S.exports=function(c,u,m,d){return void 0===m&&(m=0),void 0===d&&(d=0),f(c,b(u)+m),g(c,T(u)-d),c}},16694:(S,k,a)=>{S.exports={BottomCenter:a(21578),BottomLeft:a(10210),BottomRight:a(82341),LeftBottom:a(87958),LeftCenter:a(40080),LeftTop:a(88466),QuickSet:a(38829),RightBottom:a(19211),RightCenter:a(34609),RightTop:a(48741),TopCenter:a(49440),TopLeft:a(81288),TopRight:a(61323)}},66786:(S,k,a)=>{var b=a(88417),T=a(20786);S.exports=function(f,h,c){return b(f,h),T(f,c)}},62235:S=>{S.exports=function(a){return a.y+a.height-a.height*a.originY}},72873:(S,k,a)=>{var b=a(62235),T=a(26541),g=a(54380),f=a(17717),h=a(87841);S.exports=function(u,m){void 0===m&&(m=new h);var d=T(u),p=f(u);return m.x=d,m.y=p,m.width=g(u)-d,m.height=b(u)-p,m}},35893:S=>{S.exports=function(a){return a.x-a.width*a.originX+.5*a.width}},7702:S=>{S.exports=function(a){return a.y-a.height*a.originY+.5*a.height}},26541:S=>{S.exports=function(a){return a.x-a.width*a.originX}},87431:S=>{S.exports=function(a){return a.width*a.originX}},46928:S=>{S.exports=function(a){return a.height*a.originY}},54380:S=>{S.exports=function(a){return a.x+a.width-a.width*a.originX}},17717:S=>{S.exports=function(a){return a.y-a.height*a.originY}},86327:S=>{S.exports=function(a,b){return a.y=b-a.height+a.height*a.originY,a}},88417:S=>{S.exports=function(a,b){return a.x=b+a.width*a.originX-.5*a.width,a}},20786:S=>{S.exports=function(a,b){return a.y=b+a.height*a.originY-.5*a.height,a}},385:S=>{S.exports=function(a,b){return a.x=b+a.width*a.originX,a}},40136:S=>{S.exports=function(a,b){return a.x=b-a.width+a.width*a.originX,a}},66737:S=>{S.exports=function(a,b){return a.y=b+a.height*a.originY,a}},58724:(S,k,a)=>{S.exports={CenterOn:a(66786),GetBottom:a(62235),GetBounds:a(72873),GetCenterX:a(35893),GetCenterY:a(7702),GetLeft:a(26541),GetOffsetX:a(87431),GetOffsetY:a(46928),GetRight:a(54380),GetTop:a(17717),SetBottom:a(86327),SetCenterX:a(88417),SetCenterY:a(20786),SetLeft:a(385),SetRight:a(40136),SetTop:a(66737)}},20623:S=>{S.exports={setCrisp:function(a){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach(function(T){a.style["image-rendering"]=T}),a.style.msInterpolationMode="nearest-neighbor",a},setBicubic:function(a){return a.style["image-rendering"]="auto",a.style.msInterpolationMode="bicubic",a}}},27919:(S,k,a)=>{var c,d,v,b=a(8054),T=a(68703),g=[],f=!1;S.exports=(v=function(){var E=0;return g.forEach(function(A){A.parent&&E++}),E},{create2D:function(E,A,D){return c(E,A,D,b.CANVAS)},create:c=function(E,A,D,I,R){void 0===A&&(A=1),void 0===D&&(D=1),void 0===I&&(I=b.CANVAS),void 0===R&&(R=!1);var F,N=d(I);return null===N?(N={parent:E,canvas:document.createElement("canvas"),type:I},I===b.CANVAS&&g.push(N),F=N.canvas):(N.parent=E,F=N.canvas),R&&(N.parent=F),F.width=A,F.height=D,f&&I===b.CANVAS&&T.disable(F.getContext("2d",{willReadFrequently:!1})),F},createWebGL:function(E,A,D){return c(E,A,D,b.WEBGL)},disableSmoothing:function(){f=!0},enableSmoothing:function(){f=!1},first:d=function(E){if(void 0===E&&(E=b.CANVAS),E===b.WEBGL)return null;for(var A=0;A{var b,k="";S.exports={disable:function(h){return""===k&&(k=b(h)),k&&(h[k]=!1),h},enable:function(h){return""===k&&(k=b(h)),k&&(h[k]=!0),h},getPrefix:b=function(h){for(var c=["i","webkitI","msI","mozI","oI"],u=0;u{S.exports=function(a,b){return void 0===b&&(b="none"),a.style.msTouchAction=b,a.style["ms-touch-action"]=b,a.style["touch-action"]=b,a}},91610:S=>{S.exports=function(a,b){return void 0===b&&(b="none"),["-webkit-","-khtml-","-moz-","-ms-",""].forEach(function(g){a.style[g+"user-select"]=b}),a.style["-webkit-touch-callout"]=b,a.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",a}},26253:(S,k,a)=>{S.exports={CanvasInterpolation:a(20623),CanvasPool:a(27919),Smoothing:a(68703),TouchAction:a(65208),UserSelect:a(91610)}},40987:(S,k,a)=>{var b=a(83419),T=a(37589),g=a(1e3),f=a(7537),h=a(87837),c=new b({initialize:function(m,d,p,v){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(m,d,p,v)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(u,m,d,p,v){return void 0===p&&(p=255),void 0===v&&(v=!0),this._locked=!0,this.red=u,this.green=m,this.blue=d,this.alpha=p,this._locked=!1,this.update(v)},setGLTo:function(u,m,d,p){return void 0===p&&(p=1),this._locked=!0,this.redGL=u,this.greenGL=m,this.blueGL=d,this.alphaGL=p,this._locked=!1,this.update(!0)},setFromRGB:function(u){return this._locked=!0,this.red=u.r,this.green=u.g,this.blue=u.b,u.hasOwnProperty("a")&&(this.alpha=u.a),this._locked=!1,this.update(!0)},setFromHSV:function(u,m,d){return f(u,m,d,this)},update:function(u){if(void 0===u&&(u=!1),this._locked)return this;var m=this.r,d=this.g,p=this.b,v=this.a;return this._color=T(m,d,p),this._color32=g(m,d,p,v),this._rgba="rgba("+m+","+d+","+p+","+v/255+")",u&&h(m,d,p,this),this},updateHSV:function(){return h(this.r,this.g,this.b,this),this},clone:function(){return new c(this.r,this.g,this.b,this.a)},gray:function(u){return this.setTo(u,u,u)},random:function(u,m){void 0===u&&(u=0),void 0===m&&(m=255);var d=Math.floor(u+Math.random()*(m-u)),p=Math.floor(u+Math.random()*(m-u)),v=Math.floor(u+Math.random()*(m-u));return this.setTo(d,p,v)},randomGray:function(u,m){void 0===u&&(u=0),void 0===m&&(m=255);var d=Math.floor(u+Math.random()*(m-u));return this.setTo(d,d,d)},saturate:function(u){return this.s+=u/100,this},desaturate:function(u){return this.s-=u/100,this},lighten:function(u){return this.v+=u/100,this},darken:function(u){return this.v-=u/100,this},brighten:function(u){var m=this.r,d=this.g,p=this.b;return m=Math.max(0,Math.min(255,m-Math.round(-u/100*255))),d=Math.max(0,Math.min(255,d-Math.round(-u/100*255))),p=Math.max(0,Math.min(255,p-Math.round(-u/100*255))),this.setTo(m,d,p)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(u){this.gl[0]=Math.min(Math.abs(u),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(u){this.gl[1]=Math.min(Math.abs(u),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(u){this.gl[2]=Math.min(Math.abs(u),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(u){this.gl[3]=Math.min(Math.abs(u),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(u){u=Math.floor(Math.abs(u)),this.r=Math.min(u,255),this.gl[0]=u/255,this.update(!0)}},green:{get:function(){return this.g},set:function(u){u=Math.floor(Math.abs(u)),this.g=Math.min(u,255),this.gl[1]=u/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(u){u=Math.floor(Math.abs(u)),this.b=Math.min(u,255),this.gl[2]=u/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(u){u=Math.floor(Math.abs(u)),this.a=Math.min(u,255),this.gl[3]=u/255,this.update()}},h:{get:function(){return this._h},set:function(u){this._h=u,f(u,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(u){this._s=u,f(this._h,u,this._v,this)}},v:{get:function(){return this._v},set:function(u){this._v=u,f(this._h,this._s,u,this)}}});S.exports=c},92728:(S,k,a)=>{var b=a(37589);S.exports=function(g){void 0===g&&(g=1024);var c,f=[],h=255,u=255,m=0,d=0;for(c=0;c<=h;c++)f.push({r:u,g:c,b:d,color:b(u,c,d)});for(m=255,c=h;c>=0;c--)f.push({r:c,g:m,b:d,color:b(c,m,d)});for(u=0,c=0;c<=h;c++,m--)f.push({r:u,g:m,b:c,color:b(u,m,c)});for(m=0,d=255,c=0;c<=h;c++,d--,u++)f.push({r:u,g:m,b:d,color:b(u,m,d)});if(1024===g)return f;var p=[],v=0,x=1024/g;for(c=0;c{S.exports=function(a){var b={r:a>>16&255,g:a>>8&255,b:255&a,a:255};return a>16777215&&(b.a=a>>>24),b}},62957:S=>{S.exports=function(a){var b=a.toString(16);return 1===b.length?"0"+b:b}},37589:S=>{S.exports=function(a,b,T){return a<<16|b<<8|T}},1e3:S=>{S.exports=function(a,b,T,g){return g<<24|a<<16|b<<8|T}},62183:(S,k,a)=>{var b=a(40987),T=a(89528);S.exports=function(f,h,c){var u=c,m=c,d=c;if(0!==h){var p=c<.5?c*(1+h):c+h-c*h,v=2*c-p;u=T(v,p,f+1/3),m=T(v,p,f),d=T(v,p,f-1/3)}return(new b).setGLTo(u,m,d,1)}},27939:(S,k,a)=>{var b=a(7537);S.exports=function(g,f){void 0===g&&(g=1),void 0===f&&(f=1);for(var h=[],c=0;c<=359;c++)h.push(b(c/359,g,f));return h}},7537:(S,k,a)=>{var b=a(37589);function T(f,h,c,u){var m=(f+6*h)%6,d=Math.min(m,4-m,1);return Math.round(255*(u-u*c*Math.max(0,d)))}S.exports=function(f,h,c,u){void 0===h&&(h=1),void 0===c&&(c=1);var m=T(5,f,h,c),d=T(3,f,h,c),p=T(1,f,h,c);return u?u.setTo?u.setTo(m,d,p,u.alpha,!0):(u.r=m,u.g=d,u.b=p,u.color=b(m,d,p),u):{r:m,g:d,b:p,color:b(m,d,p)}}},70238:(S,k,a)=>{var b=a(40987);S.exports=function(g){var f=new b;g=g.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,function(d,p,v,x){return p+p+v+v+x+x});var h=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(g);if(h){var c=parseInt(h[1],16),u=parseInt(h[2],16),m=parseInt(h[3],16);f.setTo(c,u,m)}return f}},89528:S=>{S.exports=function(a,b,T){return T<0&&(T+=1),T>1&&(T-=1),T<.16666666666666666?a+6*(b-a)*T:T<.5?b:T<.6666666666666666?a+(b-a)*(.6666666666666666-T)*6:a}},30100:(S,k,a)=>{var b=a(40987),T=a(90664);S.exports=function(f){var h=T(f);return new b(h.r,h.g,h.b,h.a)}},90664:S=>{S.exports=function(a){return a>16777215?{a:a>>>24,r:a>>16&255,g:a>>8&255,b:255&a}:{a:255,r:a>>16&255,g:a>>8&255,b:255&a}}},13699:(S,k,a)=>{var b=a(28915),T=function(h,c,u,m,d,p,v,x){void 0===v&&(v=100),void 0===x&&(x=0);var y=x/v;return{r:b(h,m,y),g:b(c,d,y),b:b(u,p,y)}};S.exports={RGBWithRGB:T,ColorWithRGB:function(h,c,u,m,d,p){return void 0===d&&(d=100),void 0===p&&(p=0),T(h.r,h.g,h.b,c,u,m,d,p)},ColorWithColor:function(h,c,u,m){return void 0===u&&(u=100),void 0===m&&(m=0),T(h.r,h.g,h.b,c.r,c.g,c.b,u,m)}}},68957:(S,k,a)=>{var b=a(40987);S.exports=function(g){return new b(g.r,g.g,g.b,g.a)}},87388:(S,k,a)=>{var b=a(40987);S.exports=function(g){var f=new b,h=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(g.toLowerCase());if(h){var c=parseInt(h[1],10),u=parseInt(h[2],10),m=parseInt(h[3],10),d=void 0!==h[4]?parseFloat(h[4]):1;f.setTo(c,u,m,255*d)}return f}},87837:S=>{S.exports=function(a,b,T,g){void 0===g&&(g={h:0,s:0,v:0}),a/=255,b/=255,T/=255;var f=Math.min(a,b,T),h=Math.max(a,b,T),c=h-f,u=0,m=0===h?0:c/h,d=h;return h!==f&&(h===a?u=(b-T)/c+(b{var b=a(62957);S.exports=function(g,f,h,c,u){return void 0===c&&(c=255),void 0===u&&(u="#"),"#"===u?"#"+((1<<24)+(g<<16)+(f<<8)+h).toString(16).slice(1,7):"0x"+b(c)+b(g)+b(f)+b(h)}},85386:(S,k,a)=>{var b=a(30976),T=a(40987);S.exports=function(f,h){return void 0===f&&(f=0),void 0===h&&(h=255),new T(b(f,h),b(f,h),b(f,h))}},80333:(S,k,a)=>{var b=a(70238),T=a(30100),g=a(68957),f=a(87388);S.exports=function(c){switch(typeof c){case"string":return"rgb"===c.substr(0,3).toLowerCase()?f(c):b(c);case"number":return T(c);case"object":return g(c)}}},3956:(S,k,a)=>{var b=a(40987);b.ColorSpectrum=a(92728),b.ColorToRGBA=a(91588),b.ComponentToHex=a(62957),b.GetColor=a(37589),b.GetColor32=a(1e3),b.HexStringToColor=a(70238),b.HSLToColor=a(62183),b.HSVColorWheel=a(27939),b.HSVToRGB=a(7537),b.HueToComponent=a(89528),b.IntegerToColor=a(30100),b.IntegerToRGB=a(90664),b.Interpolate=a(13699),b.ObjectToColor=a(68957),b.RandomRGB=a(85386),b.RGBStringToColor=a(87388),b.RGBToHSV=a(87837),b.RGBToString=a(75723),b.ValueToColor=a(80333),S.exports=b},27460:(S,k,a)=>{S.exports={Align:a(71926),BaseShader:a(73894),Bounds:a(58724),Canvas:a(26253),Color:a(3956),ColorMatrix:a(89422),Masks:a(69781),RGB:a(51767)}},6858:(S,k,a)=>{var b=a(83419),T=a(39429),g=new b({initialize:function(h,c,u,m,d,p){c||(c=h.sys.make.image({x:u,y:m,key:d,frame:p,add:!1})),this.bitmapMask=c,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(f){this.bitmapMask=f},preRenderWebGL:function(f,h,c){f.pipelines.BITMAPMASK_PIPELINE.beginMask(this,h,c)},postRenderWebGL:function(f,h,c){f.pipelines.BITMAPMASK_PIPELINE.endMask(this,h,c)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});T.register("bitmapMask",function(f,h,c,u,m){return new g(this.scene,f,h,c,u,m)}),S.exports=g},80661:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.geometryMask=h,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(g){return this.geometryMask=g,this},setInvertAlpha:function(g){return void 0===g&&(g=!0),this.invertAlpha=g,this},preRenderWebGL:function(g,f,h){var c=g.gl;g.flush(),0===g.maskStack.length&&(c.enable(c.STENCIL_TEST),c.clear(c.STENCIL_BUFFER_BIT),g.maskCount=0),g.currentCameraMask.mask!==this&&(g.currentMask.mask=this),g.maskStack.push({mask:this,camera:h}),this.applyStencil(g,h,!0),g.maskCount++},applyStencil:function(g,f,h){var c=g.gl,u=this.geometryMask,m=g.maskCount;c.colorMask(!1,!1,!1,!1),h?(c.stencilFunc(c.EQUAL,m,255),c.stencilOp(c.KEEP,c.KEEP,c.INCR),m++):(c.stencilFunc(c.EQUAL,m+1,255),c.stencilOp(c.KEEP,c.KEEP,c.DECR)),this.level=m,u.renderWebGL(g,u,f),g.flush(),c.colorMask(!0,!0,!0,!0),c.stencilOp(c.KEEP,c.KEEP,c.KEEP),c.stencilFunc(this.invertAlpha?c.NOTEQUAL:c.EQUAL,m,255)},postRenderWebGL:function(g){var f=g.gl;g.maskStack.pop(),g.maskCount--,g.flush();var h=g.currentMask;if(0===g.maskStack.length)h.mask=null,f.disable(f.STENCIL_TEST);else{var c=g.maskStack[g.maskStack.length-1];c.mask.applyStencil(g,c.camera,!1),g.currentCameraMask.mask!==c.mask?(h.mask=c.mask,h.camera=c.camera):h.mask=null}},preRenderCanvas:function(g,f,h){var c=this.geometryMask;g.currentContext.save(),c.renderCanvas(g,c,h,null,null,!0),g.currentContext.clip()},postRenderCanvas:function(g){g.currentContext.restore()},destroy:function(){this.geometryMask=null}});S.exports=T},69781:(S,k,a)=>{S.exports={BitmapMask:a(6858),GeometryMask:a(80661)}},73894:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u){(!h||""===h)&&(h=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),(!c||""===c)&&(c=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===u&&(u=null),this.key=f,this.fragmentSrc=h,this.vertexSrc=c,this.uniforms=u}});S.exports=T},40366:S=>{S.exports=function(a,b){var T;if(b)"string"==typeof b?T=document.getElementById(b):"object"==typeof b&&1===b.nodeType&&(T=b);else if(a.parentElement||null===b)return a;return T||(T=document.body),T.appendChild(a),a}},83719:(S,k,a)=>{var b=a(40366);S.exports=function(g){var f=g.config;if(f.parent&&f.domCreateContainer){var h=document.createElement("div");h.style.cssText=["display: block;","width: "+g.scale.width+"px;","height: "+g.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+f.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),g.domContainer=h,b(h,f.parent)}}},57264:(S,k,a)=>{var b=a(25892);S.exports=function(g){if("complete"!==document.readyState&&"interactive"!==document.readyState){var f=function(){document.removeEventListener("deviceready",f,!0),document.removeEventListener("DOMContentLoaded",f,!0),window.removeEventListener("load",f,!0),g()};document.body?b.cordova?document.addEventListener("deviceready",f,!1):(document.addEventListener("DOMContentLoaded",f,!0),window.addEventListener("load",f,!0)):window.setTimeout(f,20)}else g()}},57811:S=>{S.exports=function(a){if(!a)return window.innerHeight;var b=Math.abs(window.orientation),T={w:0,h:0},g=document.createElement("div");return g.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(g),T.w=90===b?g.offsetHeight:window.innerWidth,T.h=90===b?window.innerWidth:g.offsetHeight,document.documentElement.removeChild(g),g=null,90!==Math.abs(window.orientation)?T.h:T.w}},45818:(S,k,a)=>{var b=a(13560);S.exports=function(g,f){var h=window.screen,c=!!h&&(h.orientation||h.mozOrientation||h.msOrientation);return c&&"string"==typeof c.type?c.type:"string"==typeof c?c:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?b.ORIENTATION.PORTRAIT:b.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?b.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?b.ORIENTATION.LANDSCAPE:void 0:f>g?b.ORIENTATION.PORTRAIT:b.ORIENTATION.LANDSCAPE}},74403:S=>{S.exports=function(a){var b;return""!==a&&("string"==typeof a?b=document.getElementById(a):a&&1===a.nodeType&&(b=a)),b||(b=document.body),b}},56836:S=>{S.exports=function(a){var b="";try{window.DOMParser?b=(new DOMParser).parseFromString(a,"text/xml"):(b=new ActiveXObject("Microsoft.XMLDOM")).loadXML(a)}catch{b=null}return b&&b.documentElement&&!b.getElementsByTagName("parsererror").length?b:null}},35846:S=>{S.exports=function(a){a.parentNode&&a.parentNode.removeChild(a)}},43092:(S,k,a)=>{var b=a(83419),T=a(29747),g=new b({initialize:function(){this.isRunning=!1,this.callback=T,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var h=this;this.step=function c(u){h.callback(u),h.isRunning&&(h.timeOutID=window.requestAnimationFrame(c))},this.stepTimeout=function c(){h.isRunning&&(h.timeOutID=window.setTimeout(c,h.delay)),h.callback(window.performance.now())}},start:function(f,h,c){this.isRunning||(this.callback=f,this.isSetTimeOut=h,this.delay=c,this.isRunning=!0,this.timeOutID=h?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=T}});S.exports=g},84902:(S,k,a)=>{var b={AddToDOM:a(40366),DOMContentLoaded:a(57264),GetInnerHeight:a(57811),GetScreenOrientation:a(45818),GetTarget:a(74403),ParseXML:a(56836),RemoveFromDOM:a(35846),RequestAnimationFrame:a(43092)};S.exports=b},47565:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(37277),f=new b({Extends:T,initialize:function(){T.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});g.register("EventEmitter",f,"events"),S.exports=f},93055:(S,k,a)=>{S.exports={EventEmitter:a(47565)}},20122:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u){void 0===u&&(u=1),T.call(this,g.BARREL,c),this.amount=u}});S.exports=f},32251:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x){void 0===m&&(m=1),void 0===d&&(d=1),void 0===p&&(p=1),void 0===v&&(v=1),void 0===x&&(x=4),T.call(this,g.BLOOM,c),this.steps=x,this.offsetX=m,this.offsetY=d,this.blurStrength=p,this.strength=v,this.glcolor=[1,1,1],null!=u&&(this.color=u)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},9047:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x){void 0===u&&(u=0),void 0===m&&(m=2),void 0===d&&(d=2),void 0===p&&(p=1),void 0===x&&(x=4),T.call(this,g.BLUR,c),this.quality=u,this.x=m,this.y=d,this.steps=x,this.strength=p,this.glcolor=[1,1,1],null!=v&&(this.color=v)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},27885:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y){void 0===u&&(u=.5),void 0===m&&(m=1),void 0===d&&(d=.2),void 0===p&&(p=!1),void 0===v&&(v=1),void 0===x&&(x=1),void 0===y&&(y=1),T.call(this,g.BOKEH,c),this.radius=u,this.amount=m,this.contrast=d,this.isTiltShift=p,this.strength=y,this.blurX=v,this.blurY=x}});S.exports=f},12578:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v){void 0===u&&(u=8),void 0===p&&(p=1),void 0===v&&(v=.005),T.call(this,g.CIRCLE,c),this.scale=p,this.feather=v,this.thickness=u,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=m&&(this.color=m),null!=d&&(this.backgroundColor=d)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}},backgroundColor:{get:function(){var h=this.glcolor2;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor2;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(h){this.glcolor2[3]=h}}});S.exports=f},15802:(S,k,a)=>{var b=a(83419),T=a(89422),g=a(14811),f=new b({Extends:T,initialize:function(c){T.call(this),this.type=g.COLOR_MATRIX,this.gameObject=c,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});S.exports=f},72898:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.type=f,this.gameObject=h,this.active=!0},setActive:function(g){return this.active=g,this},destroy:function(){this.gameObject=null,this.active=!1}});S.exports=T},44553:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d){void 0===u&&(u="__WHITE"),void 0===m&&(m=.005),void 0===d&&(d=.005),T.call(this,g.DISPLACEMENT,c),this.x=m,this.y=d,this.setTexture(u)},setTexture:function(h){var c=this.gameObject.scene.sys.textures.getFrame(h);return c&&(this.glTexture=c.glTexture),this}});S.exports=f},68531:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===m&&(m=4),void 0===d&&(d=0),void 0===p&&(p=!1),T.call(this,g.GLOW,c),this.outerStrength=m,this.innerStrength=d,this.knockout=p,this.glcolor=[1,1,1,1],void 0!==u&&(this.color=u)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},37102:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y,_){void 0===d&&(d=.2),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=1),void 0===_&&(_=0),T.call(this,g.GRADIENT,c),this.alpha=d,this.size=_,this.fromX=p,this.fromY=v,this.toX=x,this.toY=y,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=u&&(this.color1=u),null!=m&&(this.color2=m)},color1:{get:function(){var h=this.glcolor1;return(h[0]<<16)+(h[1]<<8)+(0|h[2])},set:function(h){var c=this.glcolor1;c[0]=h>>16&255,c[1]=h>>8&255,c[2]=255&h}},color2:{get:function(){var h=this.glcolor2;return(h[0]<<16)+(h[1]<<8)+(0|h[2])},set:function(h){var c=this.glcolor2;c[0]=h>>16&255,c[1]=h>>8&255,c[2]=255&h}}});S.exports=f},86886:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u){void 0===u&&(u=1),T.call(this,g.PIXELATE,c),this.amount=u}});S.exports=f},92322:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=.1),void 0===p&&(p=1),void 0===x&&(x=6),void 0===y&&(y=1),T.call(this,g.SHADOW,c),this.x=u,this.y=m,this.decay=d,this.power=p,this.glcolor=[0,0,0,1],this.samples=x,this.intensity=y,void 0!==v&&(this.color=v)},color:{get:function(){var h=this.glcolor;return(255*h[0]<<16)+(255*h[1]<<8)+(255*h[2]|0)},set:function(h){var c=this.glcolor;c[0]=(h>>16&255)/255,c[1]=(h>>8&255)/255,c[2]=(255&h)/255}}});S.exports=f},39563:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===u&&(u=.5),void 0===m&&(m=.5),void 0===d&&(d=3),void 0===p&&(p=!1),T.call(this,g.SHINE,c),this.speed=u,this.lineWidth=m,this.gradient=d,this.reveal=p}});S.exports=f},56448:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===u&&(u=.5),void 0===m&&(m=.5),void 0===d&&(d=.5),void 0===p&&(p=.5),T.call(this,g.VIGNETTE,c),this.x=u,this.y=m,this.radius=d,this.strength=p}});S.exports=f},38433:(S,k,a)=>{var b=a(83419),T=a(72898),g=a(14811),f=new b({Extends:T,initialize:function(c,u,m,d,p){void 0===u&&(u=.1),void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=!1),T.call(this,g.WIPE,c),this.progress=0,this.wipeWidth=u,this.direction=m,this.axis=d,this.reveal=p}});S.exports=f},14811:S=>{S.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},66064:(S,k,a)=>{var b=a(79291),T=a(14811),g={Barrel:a(20122),Controller:a(72898),Bloom:a(32251),Blur:a(9047),Bokeh:a(27885),Circle:a(12578),ColorMatrix:a(15802),Displacement:a(44553),Glow:a(68531),Gradient:a(37102),Pixelate:a(86886),Shadow:a(92322),Shine:a(39563),Vignette:a(56448),Wipe:a(38433)};g=b(!1,g,T),S.exports=g},25305:(S,k,a)=>{var b=a(10312),T=a(23568);S.exports=function(f,h,c){h.x=T(c,"x",0),h.y=T(c,"y",0),h.depth=T(c,"depth",0),h.flipX=T(c,"flipX",!1),h.flipY=T(c,"flipY",!1);var u=T(c,"scale",null);"number"==typeof u?h.setScale(u):null!==u&&(h.scaleX=T(u,"x",1),h.scaleY=T(u,"y",1));var m=T(c,"scrollFactor",null);"number"==typeof m?h.setScrollFactor(m):null!==m&&(h.scrollFactorX=T(m,"x",1),h.scrollFactorY=T(m,"y",1)),h.rotation=T(c,"rotation",0);var d=T(c,"angle",null);null!==d&&(h.angle=d),h.alpha=T(c,"alpha",1);var p=T(c,"origin",null);if("number"==typeof p)h.setOrigin(p);else if(null!==p){var v=T(p,"x",.5),x=T(p,"y",.5);h.setOrigin(v,x)}return h.blendMode=T(c,"blendMode",b.NORMAL),h.visible=T(c,"visible",!0),T(c,"add",!0)&&f.sys.displayList.add(h),h.preUpdate&&f.sys.updateList.add(h),h}},13059:(S,k,a)=>{var b=a(23568);S.exports=function(g,f){var h=b(f,"anims",null);if(null===h)return g;if("string"==typeof h)g.anims.play(h);else if("object"==typeof h){var c=g.anims,u=b(h,"key",void 0);if(u){var m=b(h,"startFrame",void 0),d=b(h,"delay",0),p=b(h,"repeat",0),v=b(h,"repeatDelay",0),x=b(h,"yoyo",!1),y=b(h,"play",!1),_=b(h,"delayedPlay",0),E={key:u,delay:d,repeat:p,repeatDelay:v,yoyo:x,startFrame:m};y?c.play(E):_>0?c.playAfterDelay(E,_):c.load(E)}}return g}},8050:(S,k,a)=>{var b=a(83419),T=a(73162),g=a(37277),f=a(51708),h=a(44594),c=a(19186),u=new b({Extends:T,initialize:function(d){T.call(this,d),this.sortChildrenFlag=!1,this.scene=d,this.systems=d.sys,this.events=d.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},addChildCallback:function(m){m.displayList&&m.displayList!==this&&m.removeFromDisplayList(),m.parentContainer&&m.parentContainer.remove(m),m.displayList||(this.queueDepthSort(),m.displayList=this,m.emit(f.ADDED_TO_SCENE,m,this.scene),this.events.emit(h.ADDED_TO_SCENE,m,this.scene))},removeChildCallback:function(m){this.queueDepthSort(),m.displayList=null,m.emit(f.REMOVED_FROM_SCENE,m,this.scene),this.events.emit(h.REMOVED_FROM_SCENE,m,this.scene)},start:function(){this.events.once(h.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(c(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(m,d){return m._depth-d._depth},getChildren:function(){return this.list},shutdown:function(){for(var m=this.list;m.length;)m[0].destroy(!0);this.events.off(h.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(h.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});g.register("DisplayList",u,"displayList"),S.exports=u},95643:(S,k,a)=>{var b=a(83419),T=a(53774),g=a(45893),f=a(50792),h=a(51708),c=a(44594),u=new b({Extends:f,initialize:function(d,p){f.call(this),this.scene=d,this.displayList=null,this.type=p,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(h.ADDED_TO_SCENE,this.addedToScene,this),this.on(h.REMOVED_FROM_SCENE,this.removedFromScene,this),d.sys.queueDepthSort()},setActive:function(m){return this.active=m,this},setName:function(m){return this.name=m,this},setState:function(m){return this.state=m,this},setDataEnabled:function(){return this.data||(this.data=new g(this)),this},setData:function(m,d){return this.data||(this.data=new g(this)),this.data.set(m,d),this},incData:function(m,d){return this.data||(this.data=new g(this)),this.data.inc(m,d),this},toggleData:function(m){return this.data||(this.data=new g(this)),this.data.toggle(m),this},getData:function(m){return this.data||(this.data=new g(this)),this.data.get(m)},setInteractive:function(m,d,p){return this.scene.sys.input.enable(this,m,d,p),this},disableInteractive:function(m){return void 0===m&&(m=!1),this.scene.sys.input.disable(this,m),this},removeInteractive:function(m){return void 0===m&&(m=!1),this.scene.sys.input.clear(this),m&&this.scene.sys.input.resetCursor(),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return T(this)},willRender:function(m){return!(this.displayList&&this.displayList.active&&!this.displayList.willRender(m)||u.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&m.id)},getIndexList:function(){for(var m=this,d=this.parentContainer,p=[];d&&(p.unshift(d.getIndex(m)),m=d,d.parentContainer);)d=d.parentContainer;return p.unshift(this.displayList?this.displayList.getIndex(m):this.scene.sys.displayList.getIndex(m)),p},addToDisplayList:function(m){return void 0===m&&(m=this.scene.sys.displayList),this.displayList&&this.displayList!==m&&this.removeFromDisplayList(),m.exists(this)||(this.displayList=m,m.add(this,!0),m.queueDepthSort(),this.emit(h.ADDED_TO_SCENE,this,this.scene),m.events.emit(c.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var m=this.displayList||this.scene.sys.displayList;return m&&m.exists(this)&&(m.remove(this,!0),m.queueDepthSort(),this.displayList=null,this.emit(h.REMOVED_FROM_SCENE,this,this.scene),m.events.emit(c.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},getDisplayList:function(){var m=null;return this.parentContainer?m=this.parentContainer.list:this.displayList&&(m=this.displayList.list),m},destroy:function(m){!this.scene||this.ignoreDestroy||(void 0===m&&(m=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(h.DESTROY,this,m),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});u.RENDER_MASK=15,S.exports=u},44603:(S,k,a)=>{var b=a(83419),T=a(37277),g=a(44594),f=new b({initialize:function(c){this.scene=c,this.systems=c.sys,this.events=c.sys.events,this.events.once(g.BOOT,this.boot,this),this.events.on(g.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(g.DESTROY,this.destroy,this)},start:function(){this.events.once(g.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(g.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});f.register=function(h,c){f.prototype.hasOwnProperty(h)||(f.prototype[h]=c)},f.remove=function(h){f.prototype.hasOwnProperty(h)&&delete f.prototype[h]},T.register("GameObjectCreator",f,"make"),S.exports=f},39429:(S,k,a)=>{var b=a(83419),T=a(37277),g=a(44594),f=new b({initialize:function(c){this.scene=c,this.systems=c.sys,this.events=c.sys.events,this.events.once(g.BOOT,this.boot,this),this.events.on(g.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(g.DESTROY,this.destroy,this)},start:function(){this.events.once(g.SHUTDOWN,this.shutdown,this)},existing:function(h){return(h.renderCanvas||h.renderWebGL)&&this.displayList.add(h),h.preUpdate&&this.updateList.add(h),h},shutdown:function(){this.events.off(g.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});f.register=function(h,c){f.prototype.hasOwnProperty(h)||(f.prototype[h]=c)},f.remove=function(h){f.prototype.hasOwnProperty(h)&&delete f.prototype[h]},T.register("GameObjectFactory",f,"add"),S.exports=f},91296:(S,k,a)=>{var b=a(61340),T=new b,g=new b,f=new b,h={camera:T,sprite:g,calc:f};S.exports=function(u,m,d){var p=T,v=g,x=f;return v.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),p.copyFrom(m.matrix),d?(p.multiplyWithOffset(d,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),v.e=u.x,v.f=u.y):(v.e-=m.scrollX*u.scrollFactorX,v.f-=m.scrollY*u.scrollFactorY),p.multiply(v,x),h}},45027:(S,k,a)=>{var b=a(83419),T=a(25774),g=a(37277),f=a(44594),h=new b({Extends:T,initialize:function(u){T.call(this),this.checkQueue=!0,this.scene=u,this.systems=u.sys,u.sys.events.once(f.BOOT,this.boot,this),u.sys.events.on(f.START,this.start,this)},boot:function(){this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){var c=this.systems.events;c.on(f.PRE_UPDATE,this.update,this),c.on(f.UPDATE,this.sceneUpdate,this),c.once(f.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(c,u){for(var m=this._active,d=m.length,p=0;p{S.exports=function(a,b,T,g,f,h,c,u,m,d,p,v,x,y,_){var E=T.x-b.displayOriginX+f,A=T.y-b.displayOriginY+h,D=E+T.w,I=A+T.h,R=c.a,F=c.b,N=c.c,V=c.d,B=c.e,H=c.f,Q=E*R+A*N+B,G=E*F+A*V+H,K=E*R+I*N+B,q=E*F+I*V+H,at=D*R+I*N+B,ot=D*F+I*V+H,J=D*R+A*N+B,it=D*F+A*V+H;u&&(Q=Math.round(Q),G=Math.round(G),K=Math.round(K),q=Math.round(q),at=Math.round(at),ot=Math.round(ot),J=Math.round(J),it=Math.round(it)),a.batchQuad(b,Q,G,K,q,at,ot,J,it,g.u0,g.v0,g.u1,g.v1,m,d,p,v,x,y,_)}},53048:S=>{S.exports=function(a,b,T,g){if(void 0===T&&(T=!1),void 0===g)return{local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var Y,j,nt,f=a.text,h=f.length,c=a.maxWidth,u=a.wordWrapCharCode,m=Number.MAX_VALUE,d=Number.MAX_VALUE,p=0,v=0,x=a.fontData.chars,y=a.fontData.lineHeight,_=a.letterSpacing,E=a.lineSpacing,A=0,D=0,I=0,R=null,F=a._align,N=0,V=0,B=a.fontSize/a.fontData.size,H=B*a.scaleX,Q=B*a.scaleY,G=null,K=0,q=[],at=Number.MAX_VALUE,ot=0,J=0,it=0,ht=[],gt=[],wt=null,St=function(Fr,cs){for(var Dn=0,xr=0;xr0){nt=f.split("\n");var Bt=[];for(Y=0;YN&&(m=N),d>(V=D)&&(d=V);var _i=N+R.xAdvance,be=V+y;p<_i&&(p=_i),vot&&(ot=it),itot&&(ot=it),it0)for(var Ke=0;Ke{var b=a(21859);S.exports=function(g,f,h,c,u,m,d){var p=g.sys.textures.get(h),v=p.get(c),x=g.sys.cache.xml.get(u);if(v&&x){var y=b(x,v,m,d,p);return g.sys.cache.bitmapFont.add(f,{data:y,texture:h,frame:c,fromAtlas:!0}),!0}return!1}},6925:(S,k,a)=>{var b=a(35154);S.exports=function(g,f){var h=f.width,c=f.height,u=Math.floor(h/2),m=Math.floor(c/2),d=b(f,"chars","");if(""!==d){var p=b(f,"image",""),v=g.sys.textures.getFrame(p),x=v.cutX,y=v.cutY,_=v.source.width,E=v.source.height,A=b(f,"offset.x",0),D=b(f,"offset.y",0),I=b(f,"spacing.x",0),R=b(f,"spacing.y",0),F=b(f,"lineSpacing",0),N=b(f,"charsPerRow",null);null===N&&(N=_/h)>d.length&&(N=d.length);for(var V=A,B=D,H={retroFont:!0,font:p,size:h,lineHeight:c+F,chars:{}},Q=0,G=0;G{function k(b,T){return parseInt(b.getAttribute(T),10)}S.exports=function(b,T,g,f,h){void 0===g&&(g=0),void 0===f&&(f=0);var c=T.cutX,u=T.cutY,m=T.source.width,d=T.source.height,p=T.sourceIndex,v={},x=b.getElementsByTagName("info")[0],y=b.getElementsByTagName("common")[0];v.font=x.getAttribute("face"),v.size=k(x,"size"),v.lineHeight=k(y,"lineHeight")+f,v.chars={};var _=b.getElementsByTagName("char"),E=void 0!==T&&T.trimmed;if(E)var A=T.height,D=T.width;for(var I=0;I<_.length;I++){var R=_[I],F=k(R,"id"),N=String.fromCharCode(F),V=k(R,"x"),B=k(R,"y"),H=k(R,"width"),Q=k(R,"height");E&&(V{var b=a(87662),T=a(79291),g={Parse:a(6925)};g=T(!1,g,b),S.exports=g},87662:S=>{S.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},2638:(S,k,a)=>{var b=a(22186),T=a(83419),g=a(12310),f=new T({Extends:b,Mixins:[g],initialize:function(c,u,m,d,p,v,x){b.call(this,c,u,m,d,p,v,x),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(h,c){return this.cropWidth=h,this.cropHeight=c,this},setDisplayCallback:function(h){return this.displayCallback=h,this},setScrollX:function(h){return this.scrollX=h,this},setScrollY:function(h){return this.scrollY=h,this}});S.exports=f},86741:(S,k,a)=>{var b=a(20926);S.exports=function(g,f,h,c){var u=f._text,m=u.length,d=g.currentContext;if(0!==m&&b(g,d,f,h,c)){h.addToRenderList(f);var p=f.fromAtlas?f.frame:f.texture.frames.__BASE,v=f.displayCallback,x=f.callbackData,y=f.fontData.chars,_=f.fontData.lineHeight,E=f._letterSpacing,A=0,D=0,I=0,R=null,F=0,N=0,V=0,B=0,H=0,Q=0,G=null,K=0,q=f.frame.source.image,at=p.cutX,ot=p.cutY,J=0,it=0,Y=f._fontSize/f.fontData.size,j=f._align,nt=0,ht=0;f.getTextBounds(!1);var gt=f._bounds.lines;1===j?ht=(gt.longest-gt.lengths[0])/2:2===j&&(ht=gt.longest-gt.lengths[0]),d.translate(-f.displayOriginX,-f.displayOriginY);var wt=h.roundPixels;f.cropWidth>0&&f.cropHeight>0&&(d.beginPath(),d.rect(0,0,f.cropWidth,f.cropHeight),d.clip());for(var St=0;St{var b=a(2638),T=a(25305),g=a(44603),f=a(23568);g.register("dynamicBitmapText",function(h,c){void 0===h&&(h={});var u=f(h,"font",""),m=f(h,"text",""),d=f(h,"size",!1),p=new b(this.scene,0,0,u,m,d);return void 0!==c&&(h.add=c),T(this.scene,p,h),p})},72566:(S,k,a)=>{var b=a(2638);a(39429).register("dynamicBitmapText",function(g,f,h,c,u){return this.displayList.add(new b(this.scene,g,f,h,c,u))})},12310:(S,k,a)=>{var T,g;a(29747),T=a(73482),g=a(86741),S.exports={renderWebGL:T,renderCanvas:g}},73482:(S,k,a)=>{var b=a(91296),T=a(61340),g=a(70554),f=new T;S.exports=function(c,u,m,d){var p=u.text,v=p.length;if(0!==v){m.addToRenderList(u);var x=c.pipelines.set(u.pipeline,u),y=b(u,m,d);c.pipelines.preBatch(u);var _=y.sprite,E=y.calc,A=f,D=u.cropWidth>0||u.cropHeight>0;D&&(x.flush(),c.pushScissor(E.tx,E.ty,u.cropWidth*E.scaleX,u.cropHeight*E.scaleY));var J,j,R=u.frame.glTexture,F=u.tintFill,N=g.getTintAppendFloatAlpha(u.tintTopLeft,m.alpha*u._alphaTL),V=g.getTintAppendFloatAlpha(u.tintTopRight,m.alpha*u._alphaTR),B=g.getTintAppendFloatAlpha(u.tintBottomLeft,m.alpha*u._alphaBL),H=g.getTintAppendFloatAlpha(u.tintBottomRight,m.alpha*u._alphaBR),Q=x.setGameObject(u),G=0,K=0,q=0,at=0,ot=u.letterSpacing,it=0,Y=0,nt=u.scrollX,ht=u.scrollY,gt=u.fontData,wt=gt.chars,St=gt.lineHeight,Bt=u.fontSize/gt.size,Yt=0,$t=u._align,qt=0,ne=0,le=u.getTextBounds(!1);u.maxWidth>0&&(v=(p=le.wrappedText).length);var Me=u._bounds.lines;1===$t?ne=(Me.longest-Me.lengths[0])/2:2===$t&&(ne=Me.longest-Me.lengths[0]);for(var pi=m.roundPixels,Ie=u.displayCallback,_i=u.callbackData,be=0;be{var b=a(83419),T=a(45319),g=a(31401),f=a(95643),h=a(53048),c=a(61327),u=a(21859),m=a(87841),d=a(18658),p=new b({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Texture,g.Tint,g.Transform,g.Visible,d],initialize:function(x,y,_,E,A,D,I){void 0===A&&(A=""),void 0===I&&(I=0),f.call(this,x,"BitmapText"),this.font=E;var R=this.scene.sys.cache.bitmapFont.get(E);if(!R)throw new Error("Invalid BitmapText key: "+E);this.fontData=R.data,this._text="",this._fontSize=D||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=I,this._bounds=h(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=R.fromAtlas,this.setTexture(R.texture,R.frame),this.setPosition(y,_),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(),this.setText(A)},setLeftAlign:function(){return this._align=p.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=p.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=p.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(v){return this._fontSize=v,this._dirty=!0,this},setLetterSpacing:function(v){return void 0===v&&(v=0),this._letterSpacing=v,this._dirty=!0,this},setLineSpacing:function(v){return void 0===v&&(v=0),this.lineSpacing=v,this},setText:function(v){return!v&&0!==v&&(v=""),Array.isArray(v)&&(v=v.join("\n")),v!==this.text&&(this._text=v.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(v,x,y,_){return void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=.5),this.dropShadowX=v,this.dropShadowY=x,this.dropShadowColor=y,this.dropShadowAlpha=_,this},setCharacterTint:function(v,x,y,_,E,A,D){void 0===v&&(v=0),void 0===x&&(x=1),void 0===y&&(y=!1),void 0===_&&(_=-1),void 0===E&&(E=_,A=_,D=_);var I=this.text.length;-1===x&&(x=I),v<0&&(v=I+v),v=T(v,0,I-1);for(var R=T(v+x,v,I),F=this.charColors,N=v;N{var b=a(20926);S.exports=function(g,f,h,c){var u=f._text,m=u.length,d=g.currentContext;if(0!==m&&b(g,d,f,h,c)){h.addToRenderList(f);var p=f.fromAtlas?f.frame:f.texture.frames.__BASE,v=f.fontData.chars,x=f.fontData.lineHeight,y=f._letterSpacing,_=f._lineSpacing,E=0,A=0,D=0,I=null,R=0,F=0,N=0,V=0,B=0,H=0,Q=null,G=0,K=p.source.image,q=p.cutX,at=p.cutY,ot=f._fontSize/f.fontData.size,J=f._align,it=0,Y=0,j=f.getTextBounds(!1);f.maxWidth>0&&(m=(u=j.wrappedText).length);var nt=f._bounds.lines;1===J?Y=(nt.longest-nt.lengths[0])/2:2===J&&(Y=nt.longest-nt.lengths[0]),d.translate(-f.displayOriginX,-f.displayOriginY);for(var ht=h.roundPixels,gt=0;gt{var b=a(22186),T=a(25305),g=a(44603),f=a(23568),h=a(35154);g.register("bitmapText",function(c,u){void 0===c&&(c={});var m=h(c,"font",""),d=f(c,"text",""),p=f(c,"size",!1),v=h(c,"align",0),x=new b(this.scene,0,0,m,d,p,v);return void 0!==u&&(c.add=u),T(this.scene,x,c),x})},34914:(S,k,a)=>{var b=a(22186);a(39429).register("bitmapText",function(g,f,h,c,u,m){return this.displayList.add(new b(this.scene,g,f,h,c,u,m))})},18658:(S,k,a)=>{var T,g;a(29747),T=a(33590),g=a(37289),S.exports={renderWebGL:T,renderCanvas:g}},33590:(S,k,a)=>{var b=a(3217),T=a(91296),g=a(70554);S.exports=function(h,c,u,m){if(0!==c._text.length){u.addToRenderList(c);var v=h.pipelines.set(c.pipeline,c),x=T(c,u,m).calc;h.pipelines.preBatch(c);var Q,G,K,y=u.roundPixels,_=u.alpha,E=c.charColors,A=c.tintFill,D=g.getTintAppendFloatAlpha,I=D(c.tintTopLeft,_*c._alphaTL),R=D(c.tintTopRight,_*c._alphaTR),F=D(c.tintBottomLeft,_*c._alphaBL),N=D(c.tintBottomRight,_*c._alphaBR),V=c.frame.glTexture,B=v.setGameObject(c),q=c.getTextBounds(!1).characters,at=c.dropShadowX,ot=c.dropShadowY;if(0!==at||0!==ot){var it=c.dropShadowColor,Y=c.dropShadowAlpha,j=D(it,_*Y*c._alphaTL),nt=D(it,_*Y*c._alphaTR),ht=D(it,_*Y*c._alphaBL),gt=D(it,_*Y*c._alphaBR);for(Q=0;Q{var b=a(48011),T=a(46590),g=a(83419),f=a(31401),h=a(4327),c=a(95643),u=a(73162),m=new g({Extends:c,Mixins:[f.Alpha,f.BlendMode,f.Depth,f.Mask,f.Pipeline,f.PostPipeline,f.ScrollFactor,f.Size,f.Texture,f.Transform,f.Visible,b],initialize:function(p,v,x,y,_){c.call(this,p,"Blitter"),this.setTexture(y,_),this.setPosition(v,x),this.initPipeline(),this.initPostPipeline(),this.children=new u,this.renderList=[],this.dirty=!1},create:function(d,p,v,x,y){void 0===x&&(x=!0),void 0===y&&(y=this.children.length),void 0===v?v=this.frame:v instanceof h||(v=this.texture.get(v));var _=new T(this,d,p,v,x);return this.children.addAt(_,y,!1),this.dirty=!0,_},createFromCallback:function(d,p,v,x){for(var y=this.createMultiple(p,v,x),_=0;_0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});S.exports=m},72396:S=>{S.exports=function(a,b,T,g){var f=b.getRenderList();if(0!==f.length){var h=a.currentContext,c=T.alpha*b.alpha;if(0!==c){T.addToRenderList(b),h.globalCompositeOperation=a.blendModes[b.blendMode],h.imageSmoothingEnabled=!b.frame.source.scaleMode;var u=b.x-T.scrollX*b.scrollFactorX,m=b.y-T.scrollY*b.scrollFactorY;h.save(),g&&g.copyToContext(h);for(var d=T.roundPixels,p=0;p0&&_.height>0&&(h.save(),h.translate(v.x+u,v.y+m),h.scale(D,I),h.drawImage(y.source.image,_.x,_.y,_.width,_.height,E,A,_.width,_.height),h.restore())):(d&&(E=Math.round(E),A=Math.round(A)),_.width>0&&_.height>0&&h.drawImage(y.source.image,_.x,_.y,_.width,_.height,E+v.x+u,A+v.y+m,_.width,_.height)))}h.restore()}}}},9403:(S,k,a)=>{var b=a(6107),T=a(25305),g=a(44603),f=a(23568);g.register("blitter",function(h,c){void 0===h&&(h={});var u=f(h,"key",null),m=f(h,"frame",null),d=new b(this.scene,0,0,u,m);return void 0!==c&&(h.add=c),T(this.scene,d,h),d})},12709:(S,k,a)=>{var b=a(6107);a(39429).register("blitter",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},48011:(S,k,a)=>{var T,g;a(29747),T=a(99485),g=a(72396),S.exports={renderWebGL:T,renderCanvas:g}},99485:(S,k,a)=>{var b=a(61340),T=a(70554),g=new b;S.exports=function(h,c,u,m){var d=c.getRenderList(),p=u.alpha*c.alpha;if(0!==d.length&&0!==p){u.addToRenderList(c);var v=h.pipelines.set(this.pipeline,c),x=u.scrollX*c.scrollFactorX,y=u.scrollY*c.scrollFactorY,_=g.copyFrom(u.matrix);m&&(_.multiplyWithOffset(m,-x,-y),x=0,y=0);var E=c.x-x,A=c.y-y,D=-1,R=u.roundPixels;h.pipelines.preBatch(c);for(var F=0;F{var b=a(83419),T=a(4327),g=new b({initialize:function(h,c,u,m,d){this.parent=h,this.x=c,this.y=u,this.frame=m,this.data={},this.tint=16777215,this._visible=d,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(f){return this.frame=void 0===f?this.parent.frame:f instanceof T&&f.texture===this.parent.texture?f:this.parent.texture.get(f),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(f,h,c){return this.x=f,this.y=h,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,c&&this.setFrame(c),this},setPosition:function(f,h){return this.x=f,this.y=h,this},setFlipX:function(f){return this.flipX=f,this},setFlipY:function(f){return this.flipY=f,this},setFlip:function(f,h){return this.flipX=f,this.flipY=h,this},setVisible:function(f){return this.visible=f,this},setAlpha:function(f){return this.alpha=f,this},setTint:function(f){return this.tint=f,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(f){this.parent.dirty|=this._visible!==f,this._visible=f}},alpha:{get:function(){return this._alpha},set:function(f){this.parent.dirty|=this._alpha>0!=f>0,this._alpha=f}}});S.exports=g},16005:(S,k,a)=>{var b=a(45319);S.exports={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(f,h,c,u){return void 0===f&&(f=1),void 0===h?this.alpha=f:(this._alphaTL=b(f,0,1),this._alphaTR=b(h,0,1),this._alphaBL=b(c,0,1),this._alphaBR=b(u,0,1)),this},alpha:{get:function(){return this._alpha},set:function(f){var h=b(f,0,1);this._alpha=h,this._alphaTL=h,this._alphaTR=h,this._alphaBL=h,this._alphaBR=h,0===h?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(f){var h=b(f,0,1);this._alphaTL=h,0!==h&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(f){var h=b(f,0,1);this._alphaTR=h,0!==h&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(f){var h=b(f,0,1);this._alphaBL=h,0!==h&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(f){var h=b(f,0,1);this._alphaBR=h,0!==h&&(this.renderFlags|=2)}}}},88509:(S,k,a)=>{var b=a(45319);S.exports={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(f){return void 0===f&&(f=1),this.alpha=f,this},alpha:{get:function(){return this._alpha},set:function(f){var h=b(f,0,1);this._alpha=h,0===h?this.renderFlags&=-3:this.renderFlags|=2}}}},90065:(S,k,a)=>{var b=a(10312);S.exports={_blendMode:b.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(g){"string"==typeof g&&(g=b[g]),(g|=0)>=-1&&(this._blendMode=g)}},setBlendMode:function(g){return this.blendMode=g,this}}},94215:S=>{S.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(a){this.scaleX=a/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(a){this.scaleY=a/this.height}},setSize:function(a,b){return this.width=a,this.height=b,this},setDisplaySize:function(a,b){return this.displayWidth=a,this.displayHeight=b,this}}},61683:S=>{S.exports={texture:null,frame:null,isCropped:!1,setCrop:function(a,b,T,g){return void 0===a?this.isCropped=!1:this.frame&&("number"==typeof a?this.frame.setCropUVs(this._crop,a,b,T,g,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,a.x,a.y,a.width,a.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},89272:(S,k,a)=>{var b=a(37105);S.exports={_depth:0,depth:{get:function(){return this._depth},set:function(g){this.displayList&&this.displayList.queueDepthSort(),this._depth=g}},setDepth:function(g){return void 0===g&&(g=0),this.depth=g,this},setToTop:function(){var g=this.getDisplayList();return g&&b.BringToTop(g,this),this},setToBack:function(){var g=this.getDisplayList();return g&&b.SendToBack(g,this),this},setAbove:function(g){var f=this.getDisplayList();return f&&g&&b.MoveAbove(f,this,g),this},setBelow:function(g){var f=this.getDisplayList();return f&&g&&b.MoveBelow(f,this,g),this}}},47059:(S,k,a)=>{var b=a(83419),T=a(66064),g=a(19133),f=new b({initialize:function(c,u){this.gameObject=c,this.isPost=u,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(h){return void 0===h&&(h=0),this.padding=h,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(h){if(!this.isPost){var c=this.gameObject.scene.sys.renderer;c&&c.pipelines?(this.gameObject.pipeline=c.pipelines.FX_PIPELINE,void 0!==h&&(this.padding=h),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var h=this.list,c=0;c{S.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(a){return this.flipX=a,this},setFlipY:function(a){return this.flipY=a,this},setFlip:function(a,b){return this.flipX=a,this.flipY=b,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},8004:(S,k,a)=>{var b=a(87841),T=a(11520),g=a(26099);S.exports={prepareBoundsOutput:function(h,c){return void 0===c&&(c=!1),0!==this.rotation&&T(h,this.x,this.y,this.rotation),c&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(h.x,h.y,h),h},getCenter:function(h,c){return void 0===h&&(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,c)},getTopLeft:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,c)},getTopCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,c)},getTopRight:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(h,c)},getLeftCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,c)},getRightCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(h,c)},getBottomLeft:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,c)},getBottomCenter:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,c)},getBottomRight:function(h,c){return h||(h=new g),h.x=this.x-this.displayWidth*this.originX+this.displayWidth,h.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(h,c)},getBounds:function(h){var c,u,m,d,p,v,x,y;if(void 0===h&&(h=new b),this.parentContainer){var _=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(h),_.transformPoint(h.x,h.y,h),c=h.x,u=h.y,this.getTopRight(h),_.transformPoint(h.x,h.y,h),m=h.x,d=h.y,this.getBottomLeft(h),_.transformPoint(h.x,h.y,h),p=h.x,v=h.y,this.getBottomRight(h),_.transformPoint(h.x,h.y,h),x=h.x,y=h.y}else this.getTopLeft(h),c=h.x,u=h.y,this.getTopRight(h),m=h.x,d=h.y,this.getBottomLeft(h),p=h.x,v=h.y,this.getBottomRight(h),x=h.x,y=h.y;return h.x=Math.min(c,m,p,x),h.y=Math.min(u,d,v,y),h.width=Math.max(c,m,p,x)-h.x,h.height=Math.max(u,d,v,y)-h.y,h}}},8573:(S,k,a)=>{var b=a(6858),T=a(80661);S.exports={mask:null,setMask:function(f){return this.mask=f,this},clearMask:function(f){return void 0===f&&(f=!1),f&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(f,h,c,u,m){return void 0===f&&(this.texture||this.shader||this.geom)&&(f=this),new b(this.scene,f,h,c,u,m)},createGeometryMask:function(f){return void 0===f&&("Graphics"===this.type||this.geom)&&(f=this),new T(this.scene,f)}}},27387:S=>{S.exports={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(a){this._displayOriginX=a,this.originX=a/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(a){this._displayOriginY=a,this.originY=a/this.height}},setOrigin:function(a,b){return void 0===a&&(a=.5),void 0===b&&(b=a),this.originX=a,this.originY=b,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(a,b){return void 0===a&&(a=0),void 0===b&&(b=a),this.displayOriginX=a,this.displayOriginY=b,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}}},37640:(S,k,a)=>{var b=a(39506),T=a(57355),g=a(35154),f=a(86353),h=a(26099);S.exports={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:f.PLAYING_FORWARD,setPath:function(u,m){void 0===m&&(m=this.pathConfig);var d=this.pathTween;return d&&d.isPlaying()&&d.stop(),this.path=u,m&&this.startFollow(m),this},setRotateToPath:function(u,m){return void 0===m&&(m=0),this.rotateToPath=u,this.pathRotationOffset=m,this},isFollowing:function(){var u=this.pathTween;return u&&u.isPlaying()},startFollow:function(u,m){void 0===u&&(u={}),void 0===m&&(m=0);var d=this.pathTween;d&&d.isPlaying()&&d.stop(),"number"==typeof u&&(u={duration:u}),u.from=g(u,"from",0),u.to=g(u,"to",1);var p=T(u,"positionOnPath",!1);this.rotateToPath=T(u,"rotateToPath",!1),this.pathRotationOffset=g(u,"rotationOffset",0);var v=g(u,"startAt",m);if(v&&(u.onStart=function(y){var _=y.data[0];_.progress=v,_.elapsed=_.duration*v;var E=_.ease(_.progress);_.current=_.start+(_.end-_.start)*E,_.setTargetValue()}),this.pathOffset||(this.pathOffset=new h(this.x,this.y)),this.pathVector||(this.pathVector=new h),this.pathDelta||(this.pathDelta=new h),this.pathDelta.reset(),u.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(u),this.path.getStartPoint(this.pathOffset),p&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=f.PLAYING_FORWARD,this.rotateToPath){var x=this.path.getPoint(.1);this.rotation=Math.atan2(x.y-this.y,x.x-this.x)+b(this.pathRotationOffset)}return this.pathConfig=u,this},pauseFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.pause(),this},resumeFollow:function(){var u=this.pathTween;return u&&u.isPaused()&&u.resume(),this},stopFollow:function(){var u=this.pathTween;return u&&u.isPlaying()&&u.stop(),this},pathUpdate:function(){var u=this.pathTween;if(u&&u.data){var m=u.data[0],d=this.pathDelta,p=this.pathVector;if(d.copy(p).negate(),m.state===f.COMPLETE)return this.path.getPoint(m.end,p),d.add(p),p.add(this.pathOffset),void this.setPosition(p.x,p.y);if(m.state!==f.PLAYING_FORWARD&&m.state!==f.PLAYING_BACKWARD)return;this.path.getPoint(u.getValue(),p),d.add(p),p.add(this.pathOffset);var v=this.x,x=this.y;this.setPosition(p.x,p.y);var y=this.x-v,_=this.y-x;if(0===y&&0===_)return;if(m.state!==this._prevDirection)return void(this._prevDirection=m.state);this.rotateToPath&&(this.rotation=Math.atan2(_,y)+b(this.pathRotationOffset))}}}},72699:(S,k,a)=>{var b=a(62644);S.exports={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(g){this.pipelineData={};var f=this.scene.sys.renderer;if(!f)return!1;var h=f.pipelines;if(h){void 0===g&&(g=h.default);var c=h.get(g);if(c)return this.defaultPipeline=c,this.pipeline=c,!0}return!1},setPipeline:function(g,f,h){var c=this.scene.sys.renderer;if(!c)return this;var u=c.pipelines;if(u){var m=u.get(g);m&&(this.pipeline=m),f&&(this.pipelineData=h?b(f):f)}return this},setPipelineData:function(g,f){var h=this.pipelineData;return void 0===f?delete h[g]:h[g]=f,this},resetPipeline:function(g){return void 0===g&&(g=!1),this.pipeline=this.defaultPipeline,g&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return null===this.pipeline?null:this.pipeline.name}}},17581:(S,k,a)=>{var b=a(62644),T=a(47059),g=a(19133);S.exports={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(h){this.postPipelines=[],this.postPipelineData={},this.postFX=new T(this,!0),h&&(this.preFX=new T(this,!1))},setPostPipeline:function(h,c,u){var m=this.scene.sys.renderer;if(!m)return this;var d=m.pipelines;if(d){Array.isArray(h)||(h=[h]);for(var p=0;p0,this},setPostPipelineData:function(h,c){var u=this.postPipelineData;return void 0===c?delete u[h]:u[h]=c,this},getPostPipeline:function(h){for(var c="string"==typeof h,u=this.postPipelines,m=[],d=0;d=0;m--){var d=u[m];(c&&d.name===h||!c&&d===h)&&(d.destroy(),g(u,m))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}}},80227:S=>{S.exports={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(a,b){return void 0===b&&(b=a),this.scrollFactorX=a,this.scrollFactorY=b,this}}},16736:S=>{S.exports={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(a){this.scaleX=a/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(a){this.scaleY=a/this.frame.realHeight}},setSizeToFrame:function(a){a||(a=this.frame),this.width=a.realWidth,this.height=a.realHeight;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},setSize:function(a,b){return this.width=a,this.height=b,this},setDisplaySize:function(a,b){return this.displayWidth=a,this.displayHeight=b,this}}},37726:(S,k,a)=>{var b=a(4327);S.exports={texture:null,frame:null,isCropped:!1,setTexture:function(f,h,c,u){return this.texture=this.scene.sys.textures.get(f),this.setFrame(h,c,u)},setFrame:function(f,h,c){return void 0===h&&(h=!0),void 0===c&&(c=!0),f instanceof b?(this.texture=this.scene.sys.textures.get(f.texture.key),this.frame=f):this.frame=this.texture.get(f),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&c&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}}},79812:(S,k,a)=>{var b=a(4327);S.exports={texture:null,frame:null,isCropped:!1,setCrop:function(f,h,c,u){return void 0===f?this.isCropped=!1:this.frame&&("number"==typeof f?this.frame.setCropUVs(this._crop,f,h,c,u,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,f.x,f.y,f.width,f.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(f,h){return this.texture=this.scene.sys.textures.get(f),this.setFrame(h)},setFrame:function(f,h,c){return void 0===h&&(h=!0),void 0===c&&(c=!0),f instanceof b?(this.texture=this.scene.sys.textures.get(f.texture.key),this.frame=f):this.frame=this.texture.get(f),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&h&&this.setSizeToFrame(),this._originComponent&&c&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}}},27472:S=>{S.exports={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(a,b,T,g){return void 0===a&&(a=16777215),void 0===b&&(b=a,T=a,g=a),this.tintTopLeft=a,this.tintTopRight=b,this.tintBottomLeft=T,this.tintBottomRight=g,this.tintFill=!1,this},setTintFill:function(a,b,T,g){return this.setTint(a,b,T,g),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(a){this.setTint(a,a,a,a)}},isTinted:{get:function(){var a=16777215;return this.tintFill||this.tintTopLeft!==a||this.tintTopRight!==a||this.tintBottomLeft!==a||this.tintBottomRight!==a}}}},53774:S=>{S.exports=function(a){var b={name:a.name,type:a.type,x:a.x,y:a.y,depth:a.depth,scale:{x:a.scaleX,y:a.scaleY},origin:{x:a.originX,y:a.originY},flipX:a.flipX,flipY:a.flipY,rotation:a.rotation,alpha:a.alpha,visible:a.visible,blendMode:a.blendMode,textureKey:"",frameKey:"",data:{}};return a.texture&&(b.textureKey=a.texture.key,b.frameKey=a.frame.name),b}},16901:(S,k,a)=>{var b=a(36383),T=a(61340),g=a(85955),f=a(86554),h=a(30954),c=a(26099);S.exports={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(d){this._scaleX=d,this._scaleY=d,0===d?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(d){this._scaleX=d,0===d?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(d){this._scaleY=d,0===d?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return h(this._rotation*b.RAD_TO_DEG)},set:function(d){this.rotation=h(d)*b.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(d){this._rotation=f(d)}},setPosition:function(d,p,v,x){return void 0===d&&(d=0),void 0===p&&(p=d),void 0===v&&(v=0),void 0===x&&(x=0),this.x=d,this.y=p,this.z=v,this.w=x,this},copyPosition:function(d){return void 0!==d.x&&(this.x=d.x),void 0!==d.y&&(this.y=d.y),void 0!==d.z&&(this.z=d.z),void 0!==d.w&&(this.w=d.w),this},setRandomPosition:function(d,p,v,x){return void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=this.scene.sys.scale.width),void 0===x&&(x=this.scene.sys.scale.height),this.x=d+Math.random()*v,this.y=p+Math.random()*x,this},setRotation:function(d){return void 0===d&&(d=0),this.rotation=d,this},setAngle:function(d){return void 0===d&&(d=0),this.angle=d,this},setScale:function(d,p){return void 0===d&&(d=1),void 0===p&&(p=d),this.scaleX=d,this.scaleY=p,this},setX:function(d){return void 0===d&&(d=0),this.x=d,this},setY:function(d){return void 0===d&&(d=0),this.y=d,this},setZ:function(d){return void 0===d&&(d=0),this.z=d,this},setW:function(d){return void 0===d&&(d=0),this.w=d,this},getLocalTransformMatrix:function(d){return void 0===d&&(d=new T),d.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(d,p){void 0===d&&(d=new T);var v=this.parentContainer;if(!v)return this.getLocalTransformMatrix(d);for(p||(p=new T),d.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);v;)p.applyITRS(v.x,v.y,v._rotation,v._scaleX,v._scaleY),p.multiply(d,d),v=v.parentContainer;return d},getLocalPoint:function(d,p,v,x){v||(v=new c),x||(x=this.scene.sys.cameras.main);var y=x.scrollX,_=x.scrollY,E=d+y*this.scrollFactorX-y,A=p+_*this.scrollFactorY-_;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(E,A,v):g(E,A,this.x,this.y,this.rotation,this.scaleX,this.scaleY,v),this._originComponent&&(v.x+=this._displayOriginX,v.y+=this._displayOriginY),v},getParentRotation:function(){for(var d=0,p=this.parentContainer;p;)d+=p.rotation,p=p.parentContainer;return d}}},61340:(S,k,a)=>{var b=a(83419),T=a(36383),g=a(26099),f=new b({initialize:function(c,u,m,d,p,v){void 0===c&&(c=1),void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=1),void 0===p&&(p=0),void 0===v&&(v=0),this.matrix=new Float32Array([c,u,m,d,p,v,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(h){this.matrix[0]=h}},b:{get:function(){return this.matrix[1]},set:function(h){this.matrix[1]=h}},c:{get:function(){return this.matrix[2]},set:function(h){this.matrix[2]=h}},d:{get:function(){return this.matrix[3]},set:function(h){this.matrix[3]=h}},e:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},f:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},tx:{get:function(){return this.matrix[4]},set:function(h){this.matrix[4]=h}},ty:{get:function(){return this.matrix[5]},set:function(h){this.matrix[5]=h}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var h=this.matrix,c=h[0],u=h[1],m=h[2],d=h[3];return c||u?u>0?Math.acos(c/this.scaleX):-Math.acos(c/this.scaleX):m||d?T.TAU-(d>0?Math.acos(-m/this.scaleY):-Math.acos(m/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var h=this.matrix;return h[0]=1,h[1]=0,h[2]=0,h[3]=1,h[4]=0,h[5]=0,this},translate:function(h,c){var u=this.matrix;return u[4]=u[0]*h+u[2]*c+u[4],u[5]=u[1]*h+u[3]*c+u[5],this},scale:function(h,c){var u=this.matrix;return u[0]*=h,u[1]*=h,u[2]*=c,u[3]*=c,this},rotate:function(h){var c=Math.sin(h),u=Math.cos(h),m=this.matrix,d=m[0],p=m[1],v=m[2],x=m[3];return m[0]=d*u+v*c,m[1]=p*u+x*c,m[2]=d*-c+v*u,m[3]=p*-c+x*u,this},multiply:function(h,c){var u=this.matrix,m=h.matrix,d=u[0],p=u[1],v=u[2],x=u[3],y=u[4],_=u[5],E=m[0],A=m[1],D=m[2],I=m[3],R=m[4],F=m[5],N=void 0===c?u:c.matrix;return N[0]=E*d+A*v,N[1]=E*p+A*x,N[2]=D*d+I*v,N[3]=D*p+I*x,N[4]=R*d+F*v+y,N[5]=R*p+F*x+_,N},multiplyWithOffset:function(h,c,u){var m=this.matrix,d=h.matrix,p=m[0],v=m[1],x=m[2],y=m[3],A=c*p+u*x+m[4],D=c*v+u*y+m[5],I=d[0],R=d[1],F=d[2],N=d[3],V=d[4],B=d[5];return m[0]=I*p+R*x,m[1]=I*v+R*y,m[2]=F*p+N*x,m[3]=F*v+N*y,m[4]=V*p+B*x+A,m[5]=V*v+B*y+D,this},transform:function(h,c,u,m,d,p){var v=this.matrix,x=v[0],y=v[1],_=v[2],E=v[3],A=v[4],D=v[5];return v[0]=h*x+c*_,v[1]=h*y+c*E,v[2]=u*x+m*_,v[3]=u*y+m*E,v[4]=d*x+p*_+A,v[5]=d*y+p*E+D,this},transformPoint:function(h,c,u){void 0===u&&(u={x:0,y:0});var m=this.matrix,p=m[1],x=m[3],_=m[5];return u.x=h*m[0]+c*m[2]+m[4],u.y=h*p+c*x+_,u},invert:function(){var h=this.matrix,c=h[0],u=h[1],m=h[2],d=h[3],p=h[4],v=h[5],x=c*d-u*m;return h[0]=d/x,h[1]=-u/x,h[2]=-m/x,h[3]=c/x,h[4]=(m*v-d*p)/x,h[5]=-(c*v-u*p)/x,this},copyFrom:function(h){var c=this.matrix;return c[0]=h.a,c[1]=h.b,c[2]=h.c,c[3]=h.d,c[4]=h.e,c[5]=h.f,this},copyFromArray:function(h){var c=this.matrix;return c[0]=h[0],c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],this},copyToContext:function(h){var c=this.matrix;return h.transform(c[0],c[1],c[2],c[3],c[4],c[5]),h},setToContext:function(h){return h.setTransform(this),h},copyToArray:function(h){var c=this.matrix;return void 0===h?h=[c[0],c[1],c[2],c[3],c[4],c[5]]:(h[0]=c[0],h[1]=c[1],h[2]=c[2],h[3]=c[3],h[4]=c[4],h[5]=c[5]),h},setTransform:function(h,c,u,m,d,p){var v=this.matrix;return v[0]=h,v[1]=c,v[2]=u,v[3]=m,v[4]=d,v[5]=p,this},decomposeMatrix:function(){var h=this.decomposedMatrix,c=this.matrix,u=c[0],m=c[1],d=c[2],p=c[3],v=u*p-m*d;if(h.translateX=c[4],h.translateY=c[5],u||m){var x=Math.sqrt(u*u+m*m);h.rotation=m>0?Math.acos(u/x):-Math.acos(u/x),h.scaleX=x,h.scaleY=v/x}else if(d||p){var y=Math.sqrt(d*d+p*p);h.rotation=.5*Math.PI-(p>0?Math.acos(-d/y):-Math.acos(d/y)),h.scaleX=v/y,h.scaleY=y}else h.rotation=0,h.scaleX=0,h.scaleY=0;return h},applyITRS:function(h,c,u,m,d){var p=this.matrix,v=Math.sin(u),x=Math.cos(u);return p[4]=h,p[5]=c,p[0]=x*m,p[1]=v*m,p[2]=-v*d,p[3]=x*d,this},applyInverse:function(h,c,u){void 0===u&&(u=new g);var m=this.matrix,d=m[0],p=m[1],v=m[2],x=m[3],y=m[4],_=m[5],E=1/(d*x+v*-p);return u.x=x*E*h+-v*E*c+(_*v-y*x)*E,u.y=d*E*c+-p*E*h+(-_*d+y*p)*E,u},setQuad:function(h,c,u,m,d,p){void 0===d&&(d=!1),void 0===p&&(p=this.quad);var v=this.matrix,x=v[0],y=v[1],_=v[2],E=v[3],A=v[4],D=v[5],I=h*x+c*_+A,R=h*y+c*E+D,F=h*x+m*_+A,N=h*y+m*E+D,V=u*x+m*_+A,B=u*y+m*E+D,H=u*x+c*_+A,Q=u*y+c*E+D;if(d){var G=Math.floor(I+.5),K=Math.floor(R+.5),q=G-I,at=K-R;p[0]=G,p[1]=K,p[2]=F+q,p[3]=N+at,p[4]=V+q,p[5]=B+at,p[6]=H+q,p[7]=Q+at}else p[0]=I,p[1]=R,p[2]=F,p[3]=N,p[4]=V,p[5]=B,p[6]=H,p[7]=Q;return p},getX:function(h,c){return h*this.a+c*this.c+this.e},getY:function(h,c){return h*this.b+c*this.d+this.f},getXRound:function(h,c,u){var m=this.getX(h,c);return u&&(m=Math.floor(m+.5)),m},getYRound:function(h,c,u){var m=this.getY(h,c);return u&&(m=Math.floor(m+.5)),m},getCSSMatrix:function(){var h=this.matrix;return"matrix("+h[0]+","+h[1]+","+h[2]+","+h[3]+","+h[4]+","+h[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});S.exports=f},59715:S=>{S.exports={_visible:!0,visible:{get:function(){return this._visible},set:function(b){b?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(b){return this.visible=b,this}}},31401:(S,k,a)=>{S.exports={Alpha:a(16005),AlphaSingle:a(88509),BlendMode:a(90065),ComputedSize:a(94215),Crop:a(61683),Depth:a(89272),Flip:a(54434),FX:a(47059),GetBounds:a(8004),Mask:a(8573),Origin:a(27387),PathFollower:a(37640),Pipeline:a(72699),PostPipeline:a(17581),ScrollFactor:a(80227),Size:a(16736),Texture:a(37726),TextureCrop:a(79812),Tint:a(27472),ToJSON:a(53774),Transform:a(16901),TransformMatrix:a(61340),Visible:a(59715)}},31559:(S,k,a)=>{var b=a(37105),T=a(10312),g=a(83419),f=a(31401),h=a(51708),c=a(95643),u=a(87841),m=a(29959),d=a(36899),p=a(26099),v=new f.TransformMatrix,x=new g({Extends:c,Mixins:[f.AlphaSingle,f.BlendMode,f.ComputedSize,f.Depth,f.Mask,f.PostPipeline,f.Transform,f.Visible,m],initialize:function(_,E,A,D){c.call(this,_,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new f.TransformMatrix,this._sortKey="",this._sysEvents=_.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(E,A),this.setBlendMode(T.SKIP_CHECK),D&&this.add(D)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(y){return void 0===y&&(y=!0),this.exclusive=y,this},getBounds:function(y){if(void 0===y&&(y=new u),y.setTo(this.x,this.y,0,0),this.parentContainer){var E=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);y.setTo(E.x,E.y,0,0)}if(this.list.length>0){var A=this.list,D=new u,I=!1;y.setEmpty();for(var R=0;R-1},setAll:function(y,_,E,A){return b.SetAll(this.list,y,_,E,A),this},each:function(y,_){var A,E=[null],D=this.list.slice(),I=D.length;for(A=2;A0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.list=[]},onChildDestroyed:function(y){b.Remove(this.list,y),this.exclusive&&(y.parentContainer=null,y.removedFromScene())}});S.exports=x},53584:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b);var f=b.list;if(0!==f.length){var h=b.localTransform;g?(h.loadIdentity(),h.multiply(g),h.translate(b.x,b.y),h.rotate(b.rotation),h.scale(b.scaleX,b.scaleY)):h.applyITRS(b.x,b.y,b.rotation,b.scaleX,b.scaleY);var c=-1!==b.blendMode;c||a.setBlendMode(0);var u=b._alpha,m=b.scrollFactorX,d=b.scrollFactorY;b.mask&&b.mask.preRenderCanvas(a,null,T);for(var p=0;p{var b=a(25305),T=a(31559),g=a(44603),f=a(23568),h=a(95540);g.register("container",function(c,u){void 0===c&&(c={});var m=f(c,"x",0),d=f(c,"y",0),p=h(c,"children",null),v=new T(this.scene,m,d,p);return void 0!==u&&(c.add=u),b(this.scene,v,c),v})},24961:(S,k,a)=>{var b=a(31559);a(39429).register("container",function(g,f,h){return this.displayList.add(new b(this.scene,g,f,h))})},29959:(S,k,a)=>{var T,g;a(29747),T=a(72249),g=a(53584),S.exports={renderWebGL:T,renderCanvas:g}},72249:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b);var f=b.list,h=f.length;if(0!==h){var c=b.localTransform;g?(c.loadIdentity(),c.multiply(g),c.translate(b.x,b.y),c.rotate(b.rotation),c.scale(b.scaleX,b.scaleY)):c.applyITRS(b.x,b.y,b.rotation,b.scaleX,b.scaleY),a.pipelines.preBatch(b);var u=-1!==b.blendMode;u||a.setBlendMode(0);for(var m=b.alpha,d=b.scrollFactorX,p=b.scrollFactorY,v=0;v{S.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},3069:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(441),f=a(95643),h=a(41212),c=a(35846),u=a(44594),m=a(61369),d=new b({Extends:f,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Origin,T.ScrollFactor,T.Transform,T.Visible,g],initialize:function(v,x,y,_,E,A){f.call(this,v,"DOMElement"),this.parent=v.sys.game.domContainer,this.cache=v.sys.cache.html,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new m,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(x,y),"string"==typeof _?"#"===_[0]?this.setElement(_.substr(1),E,A):this.createElement(_,E,A):_&&this.setElement(_,E,A),v.sys.events.on(u.SLEEP,this.handleSceneEvent,this),v.sys.events.on(u.WAKE,this.handleSceneEvent,this),v.sys.events.on(u.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(p){var v=this.node;v&&(v.style.display=p.settings.visible?"block":"none")},setSkew:function(p,v){return void 0===p&&(p=0),void 0===v&&(v=p),this.skewX=p,this.skewY=v,this},setPerspective:function(p){return this.parent.style.perspective=p+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(p){this.parent.style.perspective=p+"px"}},addListener:function(p){if(this.node){p=p.split(" ");for(var v=0;v{var b=a(47407),T=a(95643),g=a(61340),f=new g,h=new g,c=new g;S.exports=function(m,d,p,v){if(d.node){var x=d.node.style;if(!x||!d.scene.sys.settings.visible||T.RENDER_MASK!==d.renderFlags||0!==d.cameraFilter&&d.cameraFilter&p.id||d.parentContainer&&!d.parentContainer.willRender())return void(x.display="none");var _=d.parentContainer,E=p.alpha*d.alpha;_&&(E*=_.alpha);var A=f,D=h,I=c,R=0,F=0,N="0%",V="0%";v?(D.applyITRS(d.x-(R=d.width*d.scaleX*d.originX),d.y-(F=d.height*d.scaleY*d.originY),d.rotation,d.scaleX,d.scaleY),A.copyFrom(p.matrix),A.multiplyWithOffset(v,-p.scrollX*d.scrollFactorX,-p.scrollY*d.scrollFactorY),D.e=d.x-R,D.f=d.y-F,A.multiply(D,I)):(R=d.width*d.originX,F=d.height*d.originY,D.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY),A.copyFrom(p.matrix),N=100*d.originX+"%",V=100*d.originY+"%",D.e-=p.scrollX*d.scrollFactorX,D.f-=p.scrollY*d.scrollFactorY,A.multiply(D,I),I.e-=R,I.f-=F),d.transformOnly||(x.display="block",x.opacity=E,x.zIndex=d._depth,x.pointerEvents=d.pointerEvents,x.mixBlendMode=b[d._blendMode]),x.transform=I.getCSSMatrix()+" skew("+d.skewX+"rad, "+d.skewY+"rad) rotate3d("+d.rotate3d.x+","+d.rotate3d.y+","+d.rotate3d.z+","+d.rotate3d.w+d.rotate3dAngle+")",x.transformOrigin=N+" "+V}}},2611:(S,k,a)=>{var b=a(3069);a(39429).register("dom",function(g,f,h,c,u){var m=new b(this.scene,g,f,h,c,u);return this.displayList.add(m),m})},441:(S,k,a)=>{var T,g;a(29747),T=a(49381),g=a(49381),S.exports={renderWebGL:T,renderCanvas:g}},62980:S=>{S.exports="addedtoscene"},41337:S=>{S.exports="destroy"},44947:S=>{S.exports="removedfromscene"},49358:S=>{S.exports="complete"},35163:S=>{S.exports="created"},97249:S=>{S.exports="error"},19483:S=>{S.exports="locked"},56059:S=>{S.exports="loop"},26772:S=>{S.exports="metadata"},64437:S=>{S.exports="playing"},83411:S=>{S.exports="play"},75780:S=>{S.exports="seeked"},67799:S=>{S.exports="seeking"},63500:S=>{S.exports="stalled"},55541:S=>{S.exports="stop"},53208:S=>{S.exports="textureready"},4992:S=>{S.exports="unlocked"},12:S=>{S.exports="unsupported"},51708:(S,k,a)=>{S.exports={ADDED_TO_SCENE:a(62980),DESTROY:a(41337),REMOVED_FROM_SCENE:a(44947),VIDEO_COMPLETE:a(49358),VIDEO_CREATED:a(35163),VIDEO_ERROR:a(97249),VIDEO_LOCKED:a(19483),VIDEO_LOOP:a(56059),VIDEO_METADATA:a(26772),VIDEO_PLAY:a(83411),VIDEO_PLAYING:a(64437),VIDEO_SEEKED:a(75780),VIDEO_SEEKING:a(67799),VIDEO_STALLED:a(63500),VIDEO_STOP:a(55541),VIDEO_TEXTURE:a(53208),VIDEO_UNLOCKED:a(4992),VIDEO_UNSUPPORTED:a(12)}},42421:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(64993),h=new b({Extends:g,Mixins:[T.Alpha,T.BlendMode,T.Depth,T.Flip,T.Origin,T.ScrollFactor,T.Size,T.Texture,T.Tint,T.Transform,T.Visible,f],initialize:function(u){g.call(this,u,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});S.exports=h},70217:()=>{},56315:(S,k,a)=>{var b=a(42421);a(39429).register("extern",function(){var g=new b(this.scene);return this.displayList.add(g),g})},64993:(S,k,a)=>{var T,g;a(29747),T=a(80287),g=a(70217),S.exports={renderWebGL:T,renderCanvas:g}},80287:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){g.pipelines.clear();var u=b(f,h,c).calc;f.render.call(f,g,h,u),g.pipelines.rebind()}},85592:S=>{S.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},43831:(S,k,a)=>{var b=a(71911),T=a(83419),g=a(85592),f=a(31401),h=a(8497),c=a(95643),u=a(95540),m=a(35154),d=a(36383),p=a(84503),v=new T({Extends:c,Mixins:[f.AlphaSingle,f.BlendMode,f.Depth,f.Mask,f.Pipeline,f.PostPipeline,f.Transform,f.Visible,f.ScrollFactor,p],initialize:function(y,_){var E=m(_,"x",0),A=m(_,"y",0);c.call(this,y,"Graphics"),this.setPosition(E,A),this.initPipeline(),this.initPostPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.lineStyle(1,0,0),this.fillStyle(0,0),this.setDefaultStyles(_)},setDefaultStyles:function(x){return m(x,"lineStyle",null)&&(this.defaultStrokeWidth=m(x,"lineStyle.width",1),this.defaultStrokeColor=m(x,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(x,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(x,"fillStyle",null)&&(this.defaultFillColor=m(x,"fillStyle.color",16777215),this.defaultFillAlpha=m(x,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(x,y,_){return void 0===_&&(_=1),this.commandBuffer.push(g.LINE_STYLE,x,y,_),this._lineWidth=x,this},fillStyle:function(x,y){return void 0===y&&(y=1),this.commandBuffer.push(g.FILL_STYLE,x,y),this},fillGradientStyle:function(x,y,_,E,A,D,I,R){return void 0===A&&(A=1),void 0===D&&(D=A),void 0===I&&(I=A),void 0===R&&(R=A),this.commandBuffer.push(g.GRADIENT_FILL_STYLE,A,D,I,R,x,y,_,E),this},lineGradientStyle:function(x,y,_,E,A,D){return void 0===D&&(D=1),this.commandBuffer.push(g.GRADIENT_LINE_STYLE,x,D,y,_,E,A),this},beginPath:function(){return this.commandBuffer.push(g.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(g.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(g.FILL_PATH),this},fill:function(){return this.commandBuffer.push(g.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(g.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(g.STROKE_PATH),this},fillCircleShape:function(x){return this.fillCircle(x.x,x.y,x.radius)},strokeCircleShape:function(x){return this.strokeCircle(x.x,x.y,x.radius)},fillCircle:function(x,y,_){return this.beginPath(),this.arc(x,y,_,0,d.PI2),this.fillPath(),this},strokeCircle:function(x,y,_){return this.beginPath(),this.arc(x,y,_,0,d.PI2),this.strokePath(),this},fillRectShape:function(x){return this.fillRect(x.x,x.y,x.width,x.height)},strokeRectShape:function(x){return this.strokeRect(x.x,x.y,x.width,x.height)},fillRect:function(x,y,_,E){return this.commandBuffer.push(g.FILL_RECT,x,y,_,E),this},strokeRect:function(x,y,_,E){var A=this._lineWidth/2,D=x-A,I=x+A;return this.beginPath(),this.moveTo(x,y),this.lineTo(x,y+E),this.strokePath(),this.beginPath(),this.moveTo(x+_,y),this.lineTo(x+_,y+E),this.strokePath(),this.beginPath(),this.moveTo(D,y),this.lineTo(I+_,y),this.strokePath(),this.beginPath(),this.moveTo(D,y+E),this.lineTo(I+_,y+E),this.strokePath(),this},fillRoundedRect:function(x,y,_,E,A){void 0===A&&(A=20);var D=A,I=A,R=A,F=A;"number"!=typeof A&&(D=u(A,"tl",20),I=u(A,"tr",20),R=u(A,"bl",20),F=u(A,"br",20));var N=D>=0,V=I>=0,B=R>=0,H=F>=0;return D=Math.abs(D),I=Math.abs(I),R=Math.abs(R),F=Math.abs(F),this.beginPath(),this.moveTo(x+D,y),this.lineTo(x+_-I,y),V?this.arc(x+_-I,y+I,I,-d.TAU,0):this.arc(x+_,y,I,Math.PI,d.TAU,!0),this.lineTo(x+_,y+E-F),H?this.arc(x+_-F,y+E-F,F,0,d.TAU):this.arc(x+_,y+E,F,-d.TAU,Math.PI,!0),this.lineTo(x+R,y+E),B?this.arc(x+R,y+E-R,R,d.TAU,Math.PI):this.arc(x,y+E,R,0,-d.TAU,!0),this.lineTo(x,y+D),N?this.arc(x+D,y+D,D,-Math.PI,-d.TAU):this.arc(x,y,D,d.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(x,y,_,E,A){void 0===A&&(A=20);var D=A,I=A,R=A,F=A,N=Math.min(_,E)/2;"number"!=typeof A&&(D=u(A,"tl",20),I=u(A,"tr",20),R=u(A,"bl",20),F=u(A,"br",20));var V=D>=0,B=I>=0,H=R>=0,Q=F>=0;return D=Math.min(Math.abs(D),N),I=Math.min(Math.abs(I),N),R=Math.min(Math.abs(R),N),F=Math.min(Math.abs(F),N),this.beginPath(),this.moveTo(x+D,y),this.lineTo(x+_-I,y),this.moveTo(x+_-I,y),B?this.arc(x+_-I,y+I,I,-d.TAU,0):this.arc(x+_,y,I,Math.PI,d.TAU,!0),this.lineTo(x+_,y+E-F),this.moveTo(x+_,y+E-F),Q?this.arc(x+_-F,y+E-F,F,0,d.TAU):this.arc(x+_,y+E,F,-d.TAU,Math.PI,!0),this.lineTo(x+R,y+E),this.moveTo(x+R,y+E),H?this.arc(x+R,y+E-R,R,d.TAU,Math.PI):this.arc(x,y+E,R,0,-d.TAU,!0),this.lineTo(x,y+D),this.moveTo(x,y+D),V?this.arc(x+D,y+D,D,-Math.PI,-d.TAU):this.arc(x,y,D,d.TAU,0,!0),this.strokePath(),this},fillPointShape:function(x,y){return this.fillPoint(x.x,x.y,y)},fillPoint:function(x,y,_){return!_||_<1?_=1:(x-=_/2,y-=_/2),this.commandBuffer.push(g.FILL_RECT,x,y,_,_),this},fillTriangleShape:function(x){return this.fillTriangle(x.x1,x.y1,x.x2,x.y2,x.x3,x.y3)},strokeTriangleShape:function(x){return this.strokeTriangle(x.x1,x.y1,x.x2,x.y2,x.x3,x.y3)},fillTriangle:function(x,y,_,E,A,D){return this.commandBuffer.push(g.FILL_TRIANGLE,x,y,_,E,A,D),this},strokeTriangle:function(x,y,_,E,A,D){return this.commandBuffer.push(g.STROKE_TRIANGLE,x,y,_,E,A,D),this},strokeLineShape:function(x){return this.lineBetween(x.x1,x.y1,x.x2,x.y2)},lineBetween:function(x,y,_,E){return this.beginPath(),this.moveTo(x,y),this.lineTo(_,E),this.strokePath(),this},lineTo:function(x,y){return this.commandBuffer.push(g.LINE_TO,x,y),this},moveTo:function(x,y){return this.commandBuffer.push(g.MOVE_TO,x,y),this},strokePoints:function(x,y,_,E){void 0===y&&(y=!1),void 0===_&&(_=!1),void 0===E&&(E=x.length),this.beginPath(),this.moveTo(x[0].x,x[0].y);for(var A=1;A-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(x,y,_){var E=this.scene.sys,A=E.game.renderer;void 0===y&&(y=E.scale.width),void 0===_&&(_=E.scale.height),v.TargetCamera.setScene(this.scene),v.TargetCamera.setViewport(0,0,y,_),v.TargetCamera.scrollX=this.x,v.TargetCamera.scrollY=this.y;var D,I,R={willReadFrequently:!0};if("string"==typeof x)if(E.textures.exists(x)){var F=(D=E.textures.get(x)).getSourceImage();F instanceof HTMLCanvasElement&&(I=F.getContext("2d",R))}else I=(D=E.textures.createCanvas(x,y,_)).getSourceImage().getContext("2d",R);else x instanceof HTMLCanvasElement&&(I=x.getContext("2d",R));return I&&(this.renderCanvas(A,this,v.TargetCamera,null,I,!1),D&&D.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});v.TargetCamera=new b,S.exports=v},32768:(S,k,a)=>{var b=a(85592),T=a(20926);S.exports=function(f,h,c,u,m,d){var p=h.commandBuffer,v=p.length,x=m||f.currentContext;if(0!==v&&T(f,x,h,c,u)){c.addToRenderList(h);var E=0,A=0,D=1;x.beginPath();for(var N=0;N>>16)+","+((65280&E)>>>8)+","+(255&E)+","+p[N+3]+")",x.lineWidth=D,N+=3;break;case b.FILL_STYLE:x.fillStyle="rgba("+((16711680&(A=p[N+1]))>>>16)+","+((65280&A)>>>8)+","+(255&A)+","+p[N+2]+")",N+=2;break;case b.BEGIN_PATH:x.beginPath();break;case b.CLOSE_PATH:x.closePath();break;case b.FILL_PATH:d||x.fill();break;case b.STROKE_PATH:d||x.stroke();break;case b.FILL_RECT:d?x.rect(p[N+1],p[N+2],p[N+3],p[N+4]):x.fillRect(p[N+1],p[N+2],p[N+3],p[N+4]),N+=4;break;case b.FILL_TRIANGLE:x.beginPath(),x.moveTo(p[N+1],p[N+2]),x.lineTo(p[N+3],p[N+4]),x.lineTo(p[N+5],p[N+6]),x.closePath(),d||x.fill(),N+=6;break;case b.STROKE_TRIANGLE:x.beginPath(),x.moveTo(p[N+1],p[N+2]),x.lineTo(p[N+3],p[N+4]),x.lineTo(p[N+5],p[N+6]),x.closePath(),d||x.stroke(),N+=6;break;case b.LINE_TO:x.lineTo(p[N+1],p[N+2]),N+=2;break;case b.MOVE_TO:x.moveTo(p[N+1],p[N+2]),N+=2;break;case b.LINE_FX_TO:x.lineTo(p[N+1],p[N+2]),N+=5;break;case b.MOVE_FX_TO:x.moveTo(p[N+1],p[N+2]),N+=5;break;case b.SAVE:x.save();break;case b.RESTORE:x.restore();break;case b.TRANSLATE:x.translate(p[N+1],p[N+2]),N+=2;break;case b.SCALE:x.scale(p[N+1],p[N+2]),N+=2;break;case b.ROTATE:x.rotate(p[N+1]),N+=1;break;case b.GRADIENT_FILL_STYLE:N+=5;break;case b.GRADIENT_LINE_STYLE:N+=6}x.restore()}}},87079:(S,k,a)=>{var b=a(44603),T=a(43831);b.register("graphics",function(g,f){void 0===g&&(g={}),void 0!==f&&(g.add=f);var h=new T(this.scene,g);return g.add&&this.scene.sys.displayList.add(h),h})},1201:(S,k,a)=>{var b=a(43831);a(39429).register("graphics",function(g){return this.displayList.add(new b(this.scene,g))})},84503:(S,k,a)=>{var T,g;a(29747),T=a(77545),a(32768),g=a(32768),S.exports={renderWebGL:T,renderCanvas:g}},77545:(S,k,a)=>{var b=a(85592),T=a(91296),g=a(61340),f=a(70554),h=function(p,v,x){this.x=p,this.y=v,this.width=x},c=function(p,v,x){this.points=[],this.pointsLength=1,this.points[0]=new h(p,v,x)},u=[],m=new g;S.exports=function(p,v,x,y){if(0!==v.commandBuffer.length){x.addToRenderList(v);var _=p.pipelines.set(v.pipeline,v);p.pipelines.preBatch(v);for(var K,E=T(v,x,y).calc,A=m.loadIdentity(),D=v.commandBuffer,I=x.alpha*v.alpha,R=1,F=_.fillTint,N=_.strokeTint,V=0,B=0,H=0,G=2*Math.PI,q=[],at=0,ot=!0,J=null,it=f.getTintAppendFloatAlpha,Y=0;Y0&&(be=be%G-G):be>G?be=G:be<0&&(be=G+be%G),null===J&&(J=new c(Me+Math.cos(_i)*Ie,pi+Math.sin(_i)*Ie,R),q.push(J),le+=.01);le<1+Ke;)H=be*le+_i,V=Me+Math.cos(H)*Ie,B=pi+Math.sin(H)*Ie,J.points.push(new h(V,B,R)),le+=.01;H=be+_i,V=Me+Math.cos(H)*Ie,B=pi+Math.sin(H)*Ie,J.points.push(new h(V,B,R));break;case b.FILL_RECT:_.batchFillRect(D[++Y],D[++Y],D[++Y],D[++Y],A,E);break;case b.FILL_TRIANGLE:_.batchFillTriangle(D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],A,E);break;case b.STROKE_TRIANGLE:_.batchStrokeTriangle(D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],D[++Y],R,A,E);break;case b.LINE_TO:null!==J?J.points.push(new h(D[++Y],D[++Y],R)):(J=new c(D[++Y],D[++Y],R),q.push(J));break;case b.MOVE_TO:J=new c(D[++Y],D[++Y],R),q.push(J);break;case b.SAVE:u.push(A.copyToArray());break;case b.RESTORE:A.copyFromArray(u.pop());break;case b.TRANSLATE:Me=D[++Y],pi=D[++Y],A.translate(Me,pi);break;case b.SCALE:Me=D[++Y],pi=D[++Y],A.scale(Me,pi);break;case b.ROTATE:A.rotate(D[++Y])}p.pipelines.postBatch(v)}}},26479:(S,k,a)=>{var b=a(61061),T=a(83419),g=a(51708),f=a(50792),h=a(46710),c=a(95540),u=a(35154),m=a(97022),d=a(41212),p=a(88492),v=a(35072),x=a(68287),y=new T({Extends:f,initialize:function(E,A,D){f.call(this),D?A&&!Array.isArray(A)&&(A=[A]):Array.isArray(A)?d(A[0])&&(D=A,A=null):d(A)&&(D=A,A=null),this.scene=E,this.children=new v,this.isParent=!0,this.type="Group",this.classType=c(D,"classType",x),this.name=c(D,"name",""),this.active=c(D,"active",!0),this.maxSize=c(D,"maxSize",-1),this.defaultKey=c(D,"defaultKey",null),this.defaultFrame=c(D,"defaultFrame",null),this.runChildUpdate=c(D,"runChildUpdate",!1),this.createCallback=c(D,"createCallback",null),this.removeCallback=c(D,"removeCallback",null),this.createMultipleCallback=c(D,"createMultipleCallback",null),this.internalCreateCallback=c(D,"internalCreateCallback",null),this.internalRemoveCallback=c(D,"internalRemoveCallback",null),A&&this.addMultiple(A),D&&this.createMultiple(D),this.on(g.ADDED_TO_SCENE,this.addedToScene,this),this.on(g.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(_,E,A,D,I,R){if(void 0===_&&(_=0),void 0===E&&(E=0),void 0===A&&(A=this.defaultKey),void 0===D&&(D=this.defaultFrame),void 0===I&&(I=!0),void 0===R&&(R=!0),this.isFull())return null;var F=new this.classType(this.scene,_,E,A,D);return F.addToDisplayList(this.scene.sys.displayList),F.addToUpdateList(),F.visible=I,F.setActive(R),this.add(F),F},createMultiple:function(_){if(this.isFull())return[];Array.isArray(_)||(_=[_]);var E=[];if(_[0].key)for(var A=0;A<_.length;A++){var D=this.createFromConfig(_[A]);E=E.concat(D)}return E},createFromConfig:function(_){if(this.isFull())return[];this.classType=c(_,"classType",this.classType);var E=c(_,"key",void 0),A=c(_,"frame",null),D=c(_,"visible",!0),I=c(_,"active",!0),R=[];if(void 0===E)return R;Array.isArray(E)||(E=[E]),Array.isArray(A)||(A=[A]);var F=c(_,"repeat",0),N=c(_,"randomKey",!1),V=c(_,"randomFrame",!1),B=c(_,"yoyo",!1),H=c(_,"quantity",!1),Q=c(_,"frameQuantity",1),G=c(_,"max",0),K=p(E,A,{max:G,qty:H||Q,random:N,randomB:V,repeat:F,yoyo:B});_.createCallback&&(this.createCallback=_.createCallback),_.removeCallback&&(this.removeCallback=_.removeCallback),_.internalCreateCallback&&(this.internalCreateCallback=_.internalCreateCallback),_.internalRemoveCallback&&(this.internalRemoveCallback=_.internalRemoveCallback);for(var q=0;q=0;H--)if((B=G[H]).active===A){if(++Q===E)break}else B=null;return B?("number"==typeof I&&(B.x=I),"number"==typeof R&&(B.y=R),B):D?this.create(I,R,F,N,V):null},get:function(_,E,A,D,I){return this.getFirst(!1,!0,_,E,A,D,I)},getFirstAlive:function(_,E,A,D,I,R){return this.getFirst(!0,_,E,A,D,I,R)},getFirstDead:function(_,E,A,D,I,R){return this.getFirst(!1,_,E,A,D,I,R)},playAnimation:function(_,E){return b.PlayAnimation(this.children.entries,_,E),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(_){void 0===_&&(_=!0);for(var E=0,A=0;A{var b=a(44603),T=a(26479);b.register("group",function(g){return new T(this.scene,null,g)})},3385:(S,k,a)=>{var b=a(26479);a(39429).register("group",function(g,f){return this.updateList.add(new b(this.scene,g,f))})},88571:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(59819),h=new b({Extends:g,Mixins:[T.Alpha,T.BlendMode,T.Depth,T.Flip,T.GetBounds,T.Mask,T.Origin,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Size,T.TextureCrop,T.Tint,T.Transform,T.Visible,f],initialize:function(u,m,d,p,v){g.call(this,u,"Image"),this._crop=this.resetCropObject(),this.setTexture(p,v),this.setPosition(m,d),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=h},40652:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),a.batchSprite(b,b.frame,T,g)}},82459:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(88571);T.register("image",function(h,c){void 0===h&&(h={});var u=g(h,"key",null),m=g(h,"frame",null),d=new f(this.scene,0,0,u,m);return void 0!==c&&(h.add=c),b(this.scene,d,h),d})},2117:(S,k,a)=>{var b=a(88571);a(39429).register("image",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},59819:(S,k,a)=>{var T,g;a(29747),T=a(99517),g=a(40652),S.exports={renderWebGL:T,renderCanvas:g}},99517:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),this.pipeline.batchSprite(b,T,g)}},77856:(S,k,a)=>{var b={Events:a(51708),DisplayList:a(8050),GameObjectCreator:a(44603),GameObjectFactory:a(39429),UpdateList:a(45027),Components:a(31401),GetCalcMatrix:a(91296),BuildGameObject:a(25305),BuildGameObjectAnimation:a(13059),GameObject:a(95643),BitmapText:a(22186),Blitter:a(6107),Bob:a(46590),Container:a(31559),DOMElement:a(3069),DynamicBitmapText:a(2638),Extern:a(42421),Graphics:a(43831),Group:a(26479),Image:a(88571),Layer:a(93595),Particles:a(18404),PathFollower:a(1159),RenderTexture:a(591),RetroFont:a(196),Rope:a(77757),Sprite:a(68287),Text:a(50171),GetTextSize:a(14220),MeasureText:a(79557),TextStyle:a(35762),TileSprite:a(20839),Zone:a(41481),Video:a(18471),Shape:a(17803),Arc:a(23629),Curve:a(89),Ellipse:a(19921),Grid:a(30479),IsoBox:a(61475),IsoTriangle:a(16933),Line:a(57847),Polygon:a(24949),Rectangle:a(74561),Star:a(55911),Triangle:a(36931),Factories:{Blitter:a(12709),Container:a(24961),DOMElement:a(2611),DynamicBitmapText:a(72566),Extern:a(56315),Graphics:a(1201),Group:a(3385),Image:a(2117),Layer:a(20005),Particles:a(676),PathFollower:a(90145),RenderTexture:a(60505),Rope:a(96819),Sprite:a(46409),StaticBitmapText:a(34914),Text:a(68005),TileSprite:a(91681),Zone:a(84175),Video:a(89025),Arc:a(42563),Curve:a(40511),Ellipse:a(1543),Grid:a(34137),IsoBox:a(3933),IsoTriangle:a(49803),Line:a(2481),Polygon:a(64827),Rectangle:a(87959),Star:a(93697),Triangle:a(45245)},Creators:{Blitter:a(9403),Container:a(77143),DynamicBitmapText:a(11164),Graphics:a(87079),Group:a(94975),Image:a(82459),Layer:a(25179),Particles:a(92730),RenderTexture:a(34495),Rope:a(26209),Sprite:a(15567),StaticBitmapText:a(57336),Text:a(71259),TileSprite:a(14167),Zone:a(95261),Video:a(11511)}};b.Shader=a(20071),b.Mesh=a(4703),b.NineSlice=a(28103),b.PointLight=a(80321),b.Plane=a(33663),b.Factories.Shader=a(74177),b.Factories.Mesh=a(9225),b.Factories.NineSlice=a(47521),b.Factories.PointLight=a(71255),b.Factories.Plane=a(30985),b.Creators.Shader=a(54935),b.Creators.Mesh=a(20527),b.Creators.NineSlice=a(28279),b.Creators.PointLight=a(39829),b.Creators.Plane=a(56015),b.Light=a(41432),b.LightsManager=a(61356),b.LightsPlugin=a(88992),S.exports=b},93595:(S,k,a)=>{var b=a(10312),T=a(83419),g=a(31401),f=a(53774),h=a(45893),c=a(50792),u=a(51708),m=a(73162),d=a(33963),p=a(44594),v=a(19186),x=new T({Extends:m,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Mask,g.PostPipeline,g.Visible,c,d],initialize:function(_,E){m.call(this,_),c.call(this),this.scene=_,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=_.sys,this.events=_.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPostPipeline(),this.clearAlpha(),this.setBlendMode(b.SKIP_CHECK),E&&this.add(E),_.sys.queueDepthSort()},setActive:function(y){return this.active=y,this},setName:function(y){return this.name=y,this},setState:function(y){return this.state=y,this},setDataEnabled:function(){return this.data||(this.data=new h(this)),this},setData:function(y,_){return this.data||(this.data=new h(this)),this.data.set(y,_),this},incData:function(y,_){return this.data||(this.data=new h(this)),this.data.inc(y,_),this},toggleData:function(y){return this.data||(this.data=new h(this)),this.data.toggle(y),this},getData:function(y){return this.data||(this.data=new h(this)),this.data.get(y)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return f(this)},willRender:function(y){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&y.id)},getIndexList:function(){for(var y=this,_=this.parentContainer,E=[];_&&(E.unshift(_.getIndex(y)),y=_,_.parentContainer);)_=_.parentContainer;return E.unshift(this.displayList.getIndex(y)),E},addChildCallback:function(y){var _=y.displayList;_&&_!==this&&y.removeFromDisplayList(),y.displayList||(this.queueDepthSort(),y.displayList=this,y.emit(u.ADDED_TO_SCENE,y,this.scene),this.events.emit(p.ADDED_TO_SCENE,y,this.scene))},removeChildCallback:function(y){this.queueDepthSort(),y.displayList=null,y.emit(u.REMOVED_FROM_SCENE,y,this.scene),this.events.emit(p.REMOVED_FROM_SCENE,y,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(v(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(y,_){return y._depth-_._depth},getChildren:function(){return this.list},addToDisplayList:function(y){return void 0===y&&(y=this.scene.sys.displayList),this.displayList&&this.displayList!==y&&this.removeFromDisplayList(),y.exists(this)||(this.displayList=y,y.add(this,!0),y.queueDepthSort(),this.emit(u.ADDED_TO_SCENE,this,this.scene),y.events.emit(p.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var y=this.displayList||this.scene.sys.displayList;return y.exists(this)&&(y.remove(this,!0),y.queueDepthSort(),this.displayList=null,this.emit(u.REMOVED_FROM_SCENE,this,this.scene),y.events.emit(p.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(y){if(this.scene&&!this.ignoreDestroy){this.emit(u.DESTROY,this);for(var _=this.list;_.length;)_[0].destroy(y);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0,!1),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});S.exports=x},2956:S=>{S.exports=function(a,b,T){var g=b.list;if(0!==g.length){b.depthSort();var f=-1!==b.blendMode;f||a.setBlendMode(0);var h=b._alpha;b.mask&&b.mask.preRenderCanvas(a,null,T);for(var c=0;c{var b=a(25305),T=a(93595),g=a(44603),f=a(23568);g.register("layer",function(h,c){void 0===h&&(h={});var u=f(h,"children",null),m=new T(this.scene,u);return void 0!==c&&(h.add=c),b(this.scene,m,h),m})},20005:(S,k,a)=>{var b=a(93595);a(39429).register("layer",function(g){return this.displayList.add(new b(this.scene,g))})},33963:(S,k,a)=>{var T,g;a(29747),T=a(15869),g=a(2956),S.exports={renderWebGL:T,renderCanvas:g}},15869:S=>{S.exports=function(a,b,T){var g=b.list,f=g.length;if(0!==f){b.depthSort(),a.pipelines.preBatch(b);var h=-1!==b.blendMode;h||a.setBlendMode(0);for(var c=b.alpha,u=0;u{var b=a(96503),T=a(83419),g=a(31401),f=a(51767),h=a(70554),c=new T({Extends:b,Mixins:[g.Origin,g.ScrollFactor,g.Visible],initialize:function(m,d,p,v,x,y,_){b.call(this,m,d,p),this.color=new f(v,x,y),this.intensity=_,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(p)},displayWidth:{get:function(){return this.diameter},set:function(u){this.diameter=u}},displayHeight:{get:function(){return this.diameter},set:function(u){this.diameter=u}},width:{get:function(){return this.diameter},set:function(u){this.diameter=u}},height:{get:function(){return this.diameter},set:function(u){this.diameter=u}},willRender:function(u){return!(c.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&u.id)},setColor:function(u){var m=h.getFloatsFromUintRGB(u);return this.color.set(m[0],m[1],m[2]),this},setIntensity:function(u){return this.intensity=u,this},setRadius:function(u){return this.radius=u,this}});c.RENDER_MASK=15,S.exports=c},61356:(S,k,a)=>{var b=a(81491),T=a(83419),g=a(20339),f=a(41432),h=a(80321),c=a(51767),u=a(19133),m=a(19186),d=a(70554),p=new T({initialize:function(){this.lights=[],this.ambientColor=new c(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(v,x,y,_,E,A){return this.systems.displayList.add(new h(this.scene,v,x,y,_,E,A))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(v){for(var x=this.lights,y=v.worldView,_=[],E=0;Ethis.maxLights&&(m(_,this.sortByDistance),_=_.slice(0,this.maxLights)),this.visibleLights=_.length,_},sortByDistance:function(v,x){return v.distance>=x.distance},setAmbientColor:function(v){var x=d.getFloatsFromUintRGB(v);return this.ambientColor.set(x[0],x[1],x[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(v,x,y,_,E){void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=128),void 0===_&&(_=16777215),void 0===E&&(E=1);var A=d.getFloatsFromUintRGB(_),D=new f(v,x,y,A[0],A[1],A[2],E);return this.lights.push(D),D},removeLight:function(v){var x=this.lights.indexOf(v);return x>=0&&u(this.lights,x),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});S.exports=p},88992:(S,k,a)=>{var b=a(83419),T=a(61356),g=a(37277),f=a(44594),h=new b({Extends:T,initialize:function(u){this.scene=u,this.systems=u.sys,u.sys.settings.isBooted||u.sys.events.once(f.BOOT,this.boot,this),T.call(this)},boot:function(){var c=this.systems.events;c.on(f.SHUTDOWN,this.shutdown,this),c.on(f.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});g.register("LightsPlugin",h,"lights"),S.exports=h},4703:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(39506),f=a(83997),h=a(95643),c=a(34684),u=a(92515),m=a(91296),d=a(37867),p=a(29807),v=a(43396),x=a(19186),y=a(25836),_=a(39318),E=new b({Extends:h,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Mask,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Size,T.Texture,T.Transform,T.Visible,p],initialize:function(D,I,R,F,N,V,B,H,Q,G,K,q){void 0===I&&(I=0),void 0===R&&(R=0),void 0===F&&(F="__WHITE"),h.call(this,D,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new y,this.modelScale=new y(1,1,1),this.modelRotation=new y,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new d,this.viewPosition=new y,this.viewMatrix=new d,this.projectionMatrix=new d,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1,this.displayOriginX=0,this.displayOriginY=0;var at=D.sys.renderer;this.setPosition(I,R),this.setTexture(F,N),this.setSize(at.width,at.height),this.initPipeline(),this.initPostPipeline(),this.setPerspective(at.width,at.height),V&&this.addVertices(V,B,H,Q,G,K,q)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(A){return this.viewPosition.addScale(y.LEFT,A),this.dirtyCache[10]=1,this},panY:function(A){return this.viewPosition.y+=y.DOWN.y*A,this.dirtyCache[10]=1,this},panZ:function(A){return this.viewPosition.z+=A,this.dirtyCache[10]=1,this},setPerspective:function(A,D,I,R,F){return void 0===I&&(I=45),void 0===R&&(R=.01),void 0===F&&(F=1e3),this.fov=I,this.projectionMatrix.perspective(g(I),A/D,R,F),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(A,D,I,R){return void 0===A&&(A=this.scene.sys.renderer.getAspectRatio()),void 0===D&&(D=1),void 0===I&&(I=-1e3),void 0===R&&(R=1e3),this.fov=0,this.projectionMatrix.ortho(-A,A,-D,D,I,R),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach(function(A){A.destroy()}),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(A,D,I,R,F,N,V,B,H){var G,Q=this.scene.sys.cache.obj.get(A);return Q&&(G=c(Q,this,D,I,R,F,N,V,B,H)),(!G||0===G.verts.length)&&console.warn("Mesh.addVerticesFromObj data empty:",A),this},sortByDepth:function(A,D){return A.depth-D.depth},depthSort:function(){return x(this.faces,this.sortByDepth),this},addVertex:function(A,D,I,R,F,N,V){var B=new _(A,D,I,R,F,N,V);return this.vertices.push(B),B},addFace:function(A,D,I){var R=new f(A,D,I);return this.faces.push(R),this.dirtyCache[9]=-1,R},addVertices:function(A,D,I,R,F,N,V){var B=u(A,D,I,R,F,N,V);return B?(this.faces=this.faces.concat(B.faces),this.vertices=this.vertices.concat(B.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(A){return this.faces[A]},hasFaceAt:function(A,D,I){void 0===I&&(I=this.scene.sys.cameras.main);for(var R=m(this,I).calc,F=this.faces,N=0;N{S.exports=function(){}},20527:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(35154),h=a(4703);T.register("mesh",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=g(c,"frame",null),p=f(c,"vertices",[]),v=f(c,"uvs",[]),x=f(c,"indicies",[]),y=f(c,"containsZ",!1),_=f(c,"normals",[]),E=f(c,"colors",16777215),A=f(c,"alphas",1),D=new h(this.scene,0,0,m,d,p,v,x,y,_,E,A);return void 0!==u&&(c.add=u),b(this.scene,D,c),D})},9225:(S,k,a)=>{var b=a(4703);a(39429).register("mesh",function(g,f,h,c,u,m,d,p,v,x,y){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p,v,x,y))})},29807:(S,k,a)=>{var T,g;a(29747),T=a(48833),g=a(36488),S.exports={renderWebGL:T,renderCanvas:g}},48833:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){var u=f.faces,m=u.length;if(0!==m){h.addToRenderList(f);var d=g.pipelines.set(f.pipeline,f),p=b(f,h,c).calc;g.pipelines.preBatch(f);for(var v=d.setGameObject(f),x=d.vertexViewF32,y=d.vertexViewU32,_=d.vertexCount*d.currentShader.vertexComponentCount-1,E=f.tintFill,A=[],D=f.debugCallback,I=p.a,R=p.b,F=p.c,N=p.d,V=p.e,B=p.f,H=f.viewPosition.z,Q=f.hideCCW,G=h.roundPixels,K=h.alpha*f.alpha,q=0,at=0;at{var b=a(83419),T=a(31401),g=a(95643),f=a(78023),h=a(39318),c=new b({Extends:g,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.GetBounds,T.Mask,T.Origin,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Texture,T.Transform,T.Visible,f],initialize:function(m,d,p,v,x,y,_,E,A,D,I){g.call(this,m,"NineSlice"),this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.tint=16777215,this.tintFill=!1;var R=m.textures.getFrame(v,x);this.is3Slice=!D&&!I,R&&R.scale9&&(this.is3Slice=R.is3Slice);for(var F=this.is3Slice?18:54,N=0;N{var b=a(25305),T=a(44603),g=a(23568),f=a(35154),h=a(28103);T.register("nineslice",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=g(c,"frame",null),p=f(c,"width",256),v=f(c,"height",256),x=f(c,"leftWidth",10),y=f(c,"rightWidth",10),_=f(c,"topHeight",0),E=f(c,"bottomHeight",0),A=new h(this.scene,0,0,m,d,p,v,x,y,_,E);return void 0!==u&&(c.add=u),b(this.scene,A,c),A})},47521:(S,k,a)=>{var b=a(28103);a(39429).register("nineslice",function(g,f,h,c,u,m,d,p,v,x){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p,v,x))})},78023:(S,k,a)=>{var T,g=a(29747);T=a(52230),S.exports={renderWebGL:T,renderCanvas:g}},52230:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){var m=h.vertices,d=m.length;if(0!==d){c.addToRenderList(h);var p=f.pipelines.set(h.pipeline,h),v=b(h,c,u,!1).calc;f.pipelines.preBatch(h);var x=p.setGameObject(h),y=p.vertexViewF32,_=p.vertexViewU32,E=p.vertexCount*p.currentShader.vertexComponentCount-1,A=c.roundPixels,D=h.tintFill,R=T.getTintAppendFloatAlpha(h.tint,c.alpha*h.alpha),F=p.vertexAvailable(),N=-1;F{var b=a(83419),T=a(44777),g=a(37589),f=a(6113),h=a(91389),c=a(90664),u=new b({Extends:T,initialize:function(d){T.call(this,d,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var m=this.propertyValue,d=m,p=this.defaultEmit,v=this.defaultUpdate;if(9===this.method){this.start=m[0],this.ease=f("Linear"),this.interpolation=h("linear"),p=this.easedValueEmit,v=this.easeValueUpdate,d=m[0],this.active=!0;for(var x=0;x{var b=a(30976),T=a(45319),g=a(83419),f=a(99472),h=a(6113),c=a(95540),u=a(91389),m=a(77720),d=a(15994),p=new g({initialize:function(x,y,_){void 0===_&&(_=!1),this.propertyKey=x,this.propertyValue=y,this.defaultValue=y,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=_,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0},loadConfig:function(v,x){void 0===v&&(v={}),x&&(this.propertyKey=x),this.propertyValue=c(v,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(v){var x;switch(this.method){case 1:case 3:case 8:x=v;break;case 2:this.propertyValue.indexOf(v)>=0&&(x=v);break;case 4:x=m(v,(this.end-this.start)/this.steps),this.counter=x;break;case 5:case 6:case 7:x=T(v,this.start,this.end);break;case 9:x=this.start[0]}return this.current=x,this},getMethod:function(){var v=this.propertyValue;if(null===v)return 0;var x=typeof v;if("number"===x)return 1;if(Array.isArray(v))return 2;if("function"===x)return 3;if("object"===x){if(this.hasBoth(v,"start","end"))return this.has(v,"steps")?4:5;if(this.hasBoth(v,"min","max"))return 6;if(this.has(v,"random"))return 7;if(this.hasEither(v,"onEmit","onUpdate"))return 8;if(this.hasEither(v,"values","interpolation"))return 9}return 0},setMethods:function(){var v=this.propertyValue,x=v,y=this.defaultEmit,_=this.defaultUpdate;switch(this.method){case 1:y=this.staticValueEmit;break;case 2:y=this.randomStaticValueEmit,x=v[0];break;case 3:this._onEmit=v,y=this.proxyEmit;break;case 4:this.start=v.start,this.end=v.end,this.steps=v.steps,this.counter=this.start,this.yoyo=!!this.has(v,"yoyo")&&v.yoyo,this.direction=0,y=this.steppedEmit,x=this.start;break;case 5:this.start=v.start,this.end=v.end;var E=this.has(v,"ease")?v.ease:"Linear";this.ease=h(E,v.easeParams),y=this.has(v,"random")&&v.random?this.randomRangedValueEmit:this.easedValueEmit,_=this.easeValueUpdate,x=this.start;break;case 6:this.start=v.min,this.end=v.max,y=this.has(v,"int")&&v.int?this.randomRangedIntEmit:this.randomRangedValueEmit,x=this.start;break;case 7:var A=v.random;Array.isArray(A)&&(this.start=A[0],this.end=A[1]),y=this.randomRangedIntEmit,x=this.start;break;case 8:this._onEmit=this.has(v,"onEmit")?v.onEmit:this.defaultEmit,this._onUpdate=this.has(v,"onUpdate")?v.onUpdate:this.defaultUpdate,y=this.proxyEmit,_=this.proxyUpdate;break;case 9:this.start=v.values;var D=this.has(v,"ease")?v.ease:"Linear";this.ease=h(D,v.easeParams),this.interpolation=u(v.interpolation),y=this.easedValueEmit,_=this.easeValueUpdate,x=this.start[0]}return this.onEmit=y,this.onUpdate=_,this.current=x,this},has:function(v,x){return v.hasOwnProperty(x)},hasBoth:function(v,x,y){return v.hasOwnProperty(x)&&v.hasOwnProperty(y)},hasEither:function(v,x,y){return v.hasOwnProperty(x)||v.hasOwnProperty(y)},defaultEmit:function(v,x,y){return y},defaultUpdate:function(v,x,y,_){return _},proxyEmit:function(v,x,y){var _=this._onEmit(v,x,y);return this.current=_,_},proxyUpdate:function(v,x,y,_){var E=this._onUpdate(v,x,y,_);return this.current=E,E},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var v=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[v],this.current},randomRangedValueEmit:function(v,x){var y=f(this.start,this.end);return v&&v.data[x]&&(v.data[x].min=y,v.data[x].max=this.end),this.current=y,y},randomRangedIntEmit:function(v,x){var y=b(this.start,this.end);return v&&v.data[x]&&(v.data[x].min=y,v.data[x].max=this.end),this.current=y,y},steppedEmit:function(){var v=this.counter,x=v,y=(this.end-this.start)/this.steps;return this.yoyo?(0===this.direction?(x+=y)>=this.end&&(x=this.end-(x-this.end),this.direction=1):(x-=y)<=this.start&&(x=this.start+(this.start-x),this.direction=0),this.counter=x):this.counter=d(x+y,this.start,this.end),this.current=v,v},easedValueEmit:function(v,x){if(v&&v.data[x]){var y=v.data[x];y.min=this.start,y.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(v,x,y){var E,_=v.data[x],A=this.ease(y);return E=this.interpolation?this.interpolation(this.start,A):(_.max-_.min)*A+_.min,this.current=E,E},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});S.exports=p},24502:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(20286),f=new b({Extends:g,initialize:function(c,u,m,d,p){if("object"==typeof c){var v=c;c=T(v,"x",0),u=T(v,"y",0),m=T(v,"power",0),d=T(v,"epsilon",100),p=T(v,"gravity",50)}else void 0===c&&(c=0),void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=100),void 0===p&&(p=50);g.call(this,c,u,!0),this._gravity=p,this._power=m*p,this._epsilon=d*d},update:function(h,c){var u=this.x-h.x,m=this.y-h.y,d=u*u+m*m;if(0!==d){var p=Math.sqrt(d);d{var b=a(9674),T=a(45319),g=a(83419),f=a(39506),h=a(87841),c=a(11520),u=a(26099),m=new g({initialize:function(p){this.emitter=p,this.texture=null,this.frame=null,this.x=0,this.y=0,this.worldPosition=new u,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.holdCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=p.scene,this.anims=null,this.emitter.anims.length>0&&(this.anims=new b(this)),this.bounds=new h},emit:function(d,p,v,x,y,_){return this.emitter.emit(d,p,v,x,y,_)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(d,p){void 0===d&&(d=0),void 0===p&&(p=0),this.x=d,this.y=p},fire:function(d,p){var v=this.emitter,x=v.ops,y=v.getAnim();if(y?this.anims.play(y):(this.frame=v.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(v.getEmitZone(this),this.x+=void 0===d?x.x.onEmit(this,"x"):x.x.steps>0?d+x.x.onEmit(this,"x"):d,this.y+=void 0===p?x.y.onEmit(this,"y"):x.y.steps>0?p+x.y.onEmit(this,"y"):p,this.life=x.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=x.delay.onEmit(this,"delay"),this.holdCurrent=x.hold.onEmit(this,"hold"),this.scaleX=x.scaleX.onEmit(this,"scaleX"),this.scaleY=x.scaleY.active?x.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=x.rotate.onEmit(this,"rotate"),this.rotation=f(this.angle),v.worldMatrix.transformPoint(this.x,this.y,this.worldPosition),0===this.delayCurrent&&v.getDeathZone(this))return this.lifeCurrent=0,!1;var _=x.speedX.onEmit(this,"speedX"),E=x.speedY.active?x.speedY.onEmit(this,"speedY"):_;if(v.radial){var A=f(x.angle.onEmit(this,"angle"));this.velocityX=Math.cos(A)*Math.abs(_),this.velocityY=Math.sin(A)*Math.abs(E)}else if(v.moveTo){var D=x.moveToX.onEmit(this,"moveToX"),I=x.moveToY.onEmit(this,"moveToY"),R=this.life/1e3;this.velocityX=(D-this.x)/R,this.velocityY=(I-this.y)/R}else this.velocityX=_,this.velocityY=E;return v.acceleration&&(this.accelerationX=x.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=x.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=x.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=x.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=x.bounce.onEmit(this,"bounce"),this.alpha=x.alpha.onEmit(this,"alpha"),this.tint=x.color.active?x.color.onEmit(this,"tint"):x.tint.onEmit(this,"tint"),!0},update:function(d,p,v){if(this.lifeCurrent<=0)return!(this.holdCurrent>0)||(this.holdCurrent-=d,this.holdCurrent<=0);if(this.delayCurrent>0)return this.delayCurrent-=d,!1;this.anims&&this.anims.update(0,d);var x=this.emitter,y=x.ops,_=1-this.lifeCurrent/this.life;if(this.lifeT=_,this.x=y.x.onUpdate(this,"x",_,this.x),this.y=y.y.onUpdate(this,"y",_,this.y),x.moveTo){var E=y.moveToX.onUpdate(this,"moveToX",_,x.moveToX),A=y.moveToY.onUpdate(this,"moveToY",_,x.moveToY),D=this.lifeCurrent/1e3;this.velocityX=(E-this.x)/D,this.velocityY=(A-this.y)/D}return this.computeVelocity(x,d,p,v,_),this.scaleX=y.scaleX.onUpdate(this,"scaleX",_,this.scaleX),this.scaleY=y.scaleY.active?y.scaleY.onUpdate(this,"scaleY",_,this.scaleY):this.scaleX,this.angle=y.rotate.onUpdate(this,"rotate",_,this.angle),this.rotation=f(this.angle),x.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=T(y.alpha.onUpdate(this,"alpha",_,this.alpha),0,1),this.tint=y.color.active?y.color.onUpdate(this,"color",_,this.tint):y.tint.onUpdate(this,"tint",_,this.tint),this.lifeCurrent-=d,this.lifeCurrent<=0&&this.holdCurrent<=0)},computeVelocity:function(d,p,v,x,y){var _=d.ops,E=this.velocityX,A=this.velocityY,D=_.accelerationX.onUpdate(this,"accelerationX",y,this.accelerationX),I=_.accelerationY.onUpdate(this,"accelerationY",y,this.accelerationY),R=_.maxVelocityX.onUpdate(this,"maxVelocityX",y,this.maxVelocityX),F=_.maxVelocityY.onUpdate(this,"maxVelocityY",y,this.maxVelocityY);this.bounce=_.bounce.onUpdate(this,"bounce",y,this.bounce),A+=d.gravityY*v+I*v,E=T(E+=d.gravityX*v+D*v,-R,R),A=T(A,-F,F),this.velocityX=E,this.velocityY=A,this.x+=E*v,this.y+=A*v,d.worldMatrix.transformPoint(this.x,this.y,this.worldPosition);for(var N=0;N{var b=a(83419),T=a(20286),g=a(87841),f=new b({Extends:T,initialize:function(c,u,m,d,p,v,x,y){void 0===p&&(p=!0),void 0===v&&(v=!0),void 0===x&&(x=!0),void 0===y&&(y=!0),T.call(this,c,u,!0),this.bounds=new g(c,u,m,d),this.collideLeft=p,this.collideRight=v,this.collideTop=x,this.collideBottom=y},update:function(h){var c=this.bounds,u=-h.bounce,m=h.worldPosition;m.xc.right&&this.collideRight&&(h.x-=m.x-c.right,h.velocityX*=u),m.yc.bottom&&this.collideBottom&&(h.y-=m.y-c.bottom,h.velocityY*=u)}});S.exports=f},31600:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(53774),f=a(43459),h=a(26388),c=a(19909),u=a(76472),m=a(44777),d=a(20696),p=a(95643),v=a(95540),x=a(26546),y=a(24502),_=a(1985),E=a(97022),A=a(86091),D=a(73162),I=a(20074),R=a(269),F=a(56480),N=a(69601),V=a(68875),B=a(87841),H=a(59996),Q=a(72905),G=a(90668),K=a(19186),q=a(61340),at=a(26099),ot=a(15994),J=["active","advance","blendMode","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],it=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","hold","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],Y=new b({Extends:p,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Mask,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Texture,T.Transform,T.Visible,G],initialize:function(nt,ht,gt,wt,St){p.call(this,nt,"ParticleEmitter"),this.particleClass=F,this.config=null,this.ops={accelerationX:new m("accelerationX",0),accelerationY:new m("accelerationY",0),alpha:new m("alpha",1),angle:new m("angle",{min:0,max:360},!0),bounce:new m("bounce",0),color:new u("color"),delay:new m("delay",0,!0),hold:new m("hold",0,!0),lifespan:new m("lifespan",1e3,!0),maxVelocityX:new m("maxVelocityX",1e4),maxVelocityY:new m("maxVelocityY",1e4),moveToX:new m("moveToX",0),moveToY:new m("moveToY",0),quantity:new m("quantity",1,!0),rotate:new m("rotate",0),scaleX:new m("scaleX",1),scaleY:new m("scaleY",1),speedX:new m("speedX",0,!0),speedY:new m("speedY",0,!0),tint:new m("tint",16777215),x:new m("x",0),y:new m("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.follow=null,this.followOffset=new at,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this.skipping=!1,this.worldMatrix=new q,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new D(this),this.tintFill=!1,this.initPipeline(),this.initPostPipeline(),this.setPosition(ht,gt),this.setTexture(wt),St&&this.setConfig(St)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},setConfig:function(j){if(!j)return this;this.config=j;var nt=0,ht="",gt=this.ops;for(nt=0;nt=this.animQuantity&&(this.animCounter=0,this.currentAnim=ot(this.currentAnim+1,0,nt)),ht},setAnim:function(j,nt,ht){void 0===nt&&(nt=!0),void 0===ht&&(ht=1),this.randomAnim=nt,this.animQuantity=ht,this.currentAnim=0;var gt=typeof j;if(this.anims.length=0,Array.isArray(j))this.anims=this.anims.concat(j);else if("string"===gt)this.anims.push(j);else if("object"===gt){var wt=j;(j=v(wt,"anims",null))&&(this.anims=this.anims.concat(j));var St=v(wt,"cycle",!1);this.randomAnim=!St,this.animQuantity=v(wt,"quantity",ht)}return 1===this.anims.length&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(j){return void 0===j&&(j=!0),this.radial=j,this},addParticleBounds:function(j,nt,ht,gt,wt,St,Bt,Yt){if("object"==typeof j){var $t=j;j=$t.x,nt=$t.y,ht=E($t,"w")?$t.w:$t.width,gt=E($t,"h")?$t.h:$t.height}return this.addParticleProcessor(new N(j,nt,ht,gt,wt,St,Bt,Yt))},setParticleSpeed:function(j,nt){return void 0===nt&&(nt=j),this.ops.speedX.onChange(j),j===nt?this.ops.speedY.active=!1:this.ops.speedY.onChange(nt),this.radial=!0,this},setParticleScale:function(j,nt){return void 0===j&&(j=1),void 0===nt&&(nt=j),this.ops.scaleX.onChange(j),this.ops.scaleY.onChange(nt),this},setParticleGravity:function(j,nt){return this.gravityX=j,this.gravityY=nt,this},setParticleAlpha:function(j){return this.ops.alpha.onChange(j),this},setParticleTint:function(j){return this.ops.tint.onChange(j),this},setEmitterAngle:function(j){return this.ops.angle.onChange(j),this},setParticleLifespan:function(j){return this.ops.lifespan.onChange(j),this},setQuantity:function(j){return this.quantity=j,this},setFrequency:function(j,nt){return this.frequency=j,this.flowCounter=j>0?j:0,nt&&(this.quantity=nt),this},addDeathZone:function(j){Array.isArray(j)||(j=[j]);for(var nt,ht=[],gt=0;gt-1&&(this.zoneTotal++,this.zoneTotal===gt.total&&(this.zoneTotal=0,this.zoneIndex++,this.zoneIndex===ht&&(this.zoneIndex=0)))}},getDeathZone:function(j){for(var nt=this.deathZones,ht=0;ht=0&&(this.zoneIndex=nt),this},addParticleProcessor:function(j){return this.processors.exists(j)||(j.emitter&&j.emitter.removeParticleProcessor(j),this.processors.add(j),j.emitter=this),j},removeParticleProcessor:function(j){return this.processors.exists(j)&&(this.processors.remove(j,!0),j.emitter=null),j},getProcessors:function(){return this.processors.getAll("active",!0)},createGravityWell:function(j){return this.addParticleProcessor(new y(j))},reserve:function(j){var nt=this.dead;if(this.maxParticles>0){var ht=this.getParticleCount();ht+j>this.maxParticles&&(j=this.maxParticles-(ht+j))}for(var gt=0;gt0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(j,nt){return void 0===j?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof j&&(this.emitCallback=j,nt&&(this.emitCallbackScope=nt)),this},onParticleDeath:function(j,nt){return void 0===j?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof j&&(this.deathCallback=j,nt&&(this.deathCallbackScope=nt)),this},killAll:function(){for(var j=this.dead,nt=this.alive;nt.length>0;)j.push(nt.pop());return this},forEachAlive:function(j,nt){for(var ht=this.alive,gt=ht.length,wt=0;wt0&&this.fastForward(j),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==nt&&(this.duration=Math.abs(nt)),this.emit(d.START,this)),this},stop:function(j){return void 0===j&&(j=!1),this.emitting&&(this.emitting=!1,j&&this.killAll(),this.emit(d.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(j,nt){return void 0===j&&(j=""),void 0===nt&&(nt=this.true),this.sortProperty=j,this.sortOrderAsc=nt,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(j){return this.sortCallback=""!==this.sortProperty?this.depthSortCallback:null,this},depthSort:function(){return K(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(j,nt){var ht=this.sortProperty;return this.sortOrderAsc?j[ht]-nt[ht]:nt[ht]-j[ht]},flow:function(j,nt,ht){return void 0===nt&&(nt=1),this.emitting=!1,this.frequency=j,this.quantity=nt,void 0!==ht&&(this.stopAfter=ht),this.start()},explode:function(j,nt,ht){this.frequency=-1,this.resetCounters(-1,!0);var gt=this.emitParticle(j,nt,ht);return this.emit(d.EXPLODE,this,gt),gt},emitParticleAt:function(j,nt,ht){return this.emitParticle(ht,j,nt)},emitParticle:function(j,nt,ht){if(!this.atLimit()){void 0===j&&(j=this.ops.quantity.onEmit());for(var gt=this.dead,wt=this.stopAfter,St=this.follow?this.follow.x+this.followOffset.x:nt,Bt=this.follow?this.follow.y+this.followOffset.y:ht,Yt=0;Yt0&&(this.stopCounter++,this.stopCounter>=wt)||this.atLimit())break}return $t}},fastForward:function(j,nt){void 0===nt&&(nt=1e3/60);var ht=0;for(this.skipping=!0;ht0){var ne=this.deathCallback,le=this.deathCallbackScope;for(Bt=$t-1;Bt>=0;Bt--){var Me=Yt[Bt];wt.splice(Me.index,1),St.push(Me.particle),ne&&ne.call(le,Me.particle),Me.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=nt;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=nt,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===wt.length&&(this.completeFlag=0,this.emit(d.COMPLETE,this))},overlap:function(j){for(var nt=this.getWorldTransformMatrix(),ht=this.alive,gt=ht.length,wt=[],St=0;St0){var qt=0;for(this.skipping=!0;qt0&&A(gt,j,j),gt},createEmitter:function(){throw new Error("createEmitter removed. See ParticleEmitter docs for info")},particleX:{get:function(){return this.ops.x.current},set:function(j){this.ops.x.onChange(j)}},particleY:{get:function(){return this.ops.y.current},set:function(j){this.ops.y.onChange(j)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(j){this.ops.accelerationX.onChange(j)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(j){this.ops.accelerationY.onChange(j)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(j){this.ops.maxVelocityX.onChange(j)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(j){this.ops.maxVelocityY.onChange(j)}},speed:{get:function(){return this.ops.speedX.current},set:function(j){this.ops.speedX.onChange(j),this.ops.speedY.onChange(j)}},speedX:{get:function(){return this.ops.speedX.current},set:function(j){this.ops.speedX.onChange(j)}},speedY:{get:function(){return this.ops.speedY.current},set:function(j){this.ops.speedY.onChange(j)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(j){this.ops.moveToX.onChange(j)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(j){this.ops.moveToY.onChange(j)}},bounce:{get:function(){return this.ops.bounce.current},set:function(j){this.ops.bounce.onChange(j)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(j){this.ops.scaleX.onChange(j)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(j){this.ops.scaleY.onChange(j)}},particleColor:{get:function(){return this.ops.color.current},set:function(j){this.ops.color.onChange(j)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(j){this.ops.color.setEase(j)}},particleTint:{get:function(){return this.ops.tint.current},set:function(j){this.ops.tint.onChange(j)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(j){this.ops.alpha.onChange(j)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(j){this.ops.lifespan.onChange(j)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(j){this.ops.angle.onChange(j)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(j){this.ops.rotate.onChange(j)}},quantity:{get:function(){return this.ops.quantity.current},set:function(j){this.ops.quantity.onChange(j)}},delay:{get:function(){return this.ops.delay.current},set:function(j){this.ops.delay.onChange(j)}},hold:{get:function(){return this.ops.hold.current},set:function(j){this.ops.hold.onChange(j)}},flowCounter:{get:function(){return this.counters[0]},set:function(j){this.counters[0]=j}},frameCounter:{get:function(){return this.counters[1]},set:function(j){this.counters[1]=j}},animCounter:{get:function(){return this.counters[2]},set:function(j){this.counters[2]=j}},elapsed:{get:function(){return this.counters[3]},set:function(j){this.counters[3]=j}},stopCounter:{get:function(){return this.counters[4]},set:function(j){this.counters[4]=j}},completeFlag:{get:function(){return this.counters[5]},set:function(j){this.counters[5]=j}},zoneIndex:{get:function(){return this.counters[6]},set:function(j){this.counters[6]=j}},zoneTotal:{get:function(){return this.counters[7]},set:function(j){this.counters[7]=j}},currentFrame:{get:function(){return this.counters[8]},set:function(j){this.counters[8]=j}},currentAnim:{get:function(){return this.counters[9]},set:function(j){this.counters[9]=j}},preDestroy:function(){this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var j,nt=this.ops;for(j=0;j{var b=a(59996),T=a(61340),g=new T,f=new T,h=new T,c=new T;S.exports=function(m,d,p,v){var x=g,y=f,_=h,E=c;v?(E.loadIdentity(),E.multiply(v),E.translate(d.x,d.y),E.rotate(d.rotation),E.scale(d.scaleX,d.scaleY)):E.applyITRS(d.x,d.y,d.rotation,d.scaleX,d.scaleY);var A=m.currentContext,D=p.roundPixels,I=p.alpha,R=d.alpha,F=d.alive,N=F.length,V=d.viewBounds;if(d.visible&&0!==N&&(!V||b(V,p.worldView))){d.sortCallback&&d.depthSort(),p.addToRenderList(d);var B=d.scrollFactorX,H=d.scrollFactorY;A.save(),A.globalCompositeOperation=m.blendModes[d.blendMode];for(var Q=0;Q0&&at.height>0){var ot=-q.halfWidth,J=-q.halfHeight;A.globalAlpha=K,A.save(),y.setToContext(A),D&&(ot=Math.round(ot),J=Math.round(J)),A.imageSmoothingEnabled=!q.source.scaleMode,A.drawImage(q.source.image,at.x,at.y,at.width,at.height,ot,J,at.width,at.height),A.restore()}}}A.restore()}}},92730:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(95540),h=a(31600);T.register("particles",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=f(c,"config",null),p=new h(this.scene,0,0,m);return void 0!==u&&(c.add=u),b(this.scene,p,c),d&&p.setConfig(d),p})},676:(S,k,a)=>{var b=a(39429),T=a(31600);b.register("particles",function(g,f,h,c){return void 0!==g&&"string"==typeof g&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new T(this.scene,g,f,h,c))})},90668:(S,k,a)=>{var T,g;a(29747),T=a(21188),g=a(9871),S.exports={renderWebGL:T,renderCanvas:g}},21188:(S,k,a)=>{var b=a(59996),T=a(61340),g=a(70554),f=new T,h=new T,c=new T,u=new T;S.exports=function(d,p,v,x){var y=d.pipelines.set(p.pipeline),_=f,E=h,A=c,D=u;x?(D.loadIdentity(),D.multiply(x),D.translate(p.x,p.y),D.rotate(p.rotation),D.scale(p.scaleX,p.scaleY)):D.applyITRS(p.x,p.y,p.rotation,p.scaleX,p.scaleY);var I=g.getTintAppendFloatAlpha,R=v.alpha,F=p.alpha;d.pipelines.preBatch(p);var N=p.alive,V=N.length,B=p.viewBounds;if(0!==V&&(!B||b(B,v.worldView))){p.sortCallback&&p.depthSort(),v.addToRenderList(p),_.copyFrom(v.matrix),_.multiplyWithOffset(D,-v.scrollX*p.scrollFactorX,-v.scrollY*p.scrollFactorY),d.setBlendMode(p.blendMode),p.mask&&(p.mask.preRenderWebGL(d,p,v),d.pipelines.set(p.pipeline));for(var Q,G,H=p.tintFill,K=0;K{var T=new(a(83419))({initialize:function(f,h,c){void 0===f&&(f=0),void 0===h&&(h=0),void 0===c&&(c=!0),this.x=f,this.y=h,this.active=c},update:function(){},destroy:function(){this.emitter=null}});S.exports=T},9774:S=>{S.exports="complete"},812:S=>{S.exports="deathzone"},30522:S=>{S.exports="explode"},96695:S=>{S.exports="start"},18677:S=>{S.exports="stop"},20696:(S,k,a)=>{S.exports={COMPLETE:a(9774),DEATH_ZONE:a(812),EXPLODE:a(30522),START:a(96695),STOP:a(18677)}},18404:(S,k,a)=>{S.exports={EmitterColorOp:a(76472),EmitterOp:a(44777),Events:a(20696),GravityWell:a(24502),Particle:a(56480),ParticleBounds:a(69601),ParticleEmitter:a(31600),ParticleProcessor:a(20286),Zones:a(21024)}},26388:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.source=f,this.killOnEnter=h},willKill:function(g){var f=this.source.contains(g.x,g.y);return f&&this.killOnEnter||!f&&!this.killOnEnter}});S.exports=T},19909:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u,m,d){void 0===u&&(u=!1),void 0===m&&(m=!0),void 0===d&&(d=-1),this.source=f,this.points=[],this.quantity=h,this.stepRate=c,this.yoyo=u,this.counter=-1,this.seamless=m,this._length=0,this._direction=0,this.total=d,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var g=this.points[0],f=this.points[this.points.length-1];g.x===f.x&&g.y===f.y&&this.points.pop()}var h=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(g){return this.source=g,this.updateSource()},getPoint:function(g){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var f=this.points[this.counter];f&&(g.x=f.x,g.y=f.y)}});S.exports=T},68875:(S,k,a)=>{var b=a(83419),T=a(26099),g=new b({initialize:function(h){this.source=h,this._tempVec=new T,this.total=-1},getPoint:function(f){var h=this._tempVec;this.source.getRandomPoint(h),f.x=h.x,f.y=h.y}});S.exports=g},21024:(S,k,a)=>{S.exports={DeathZone:a(26388),EdgeZone:a(19909),RandomZone:a(68875)}},1159:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(68287),f=new b({Extends:g,Mixins:[T.PathFollower],initialize:function(c,u,m,d,p,v){g.call(this,c,m,d,p,v),this.path=u},preUpdate:function(h,c){this.anims.update(h,c),this.pathUpdate(h)}});S.exports=f},90145:(S,k,a)=>{var b=a(39429),T=a(1159);b.register("follower",function(g,f,h,c,u){var m=new T(this.scene,g,f,h,c,u);return this.displayList.add(m),this.updateList.add(m),m})},33663:(S,k,a)=>{var b=a(9674),T=a(83419),g=a(48803),f=a(90664),h=a(4703),c=a(45650),u=new T({Extends:h,initialize:function(d,p,v,x,y,_,E,A){x||(x="__DEFAULT"),h.call(this,d,p,v,x,y),this.type="Plane",this.anims=new b(this),this._checkerboard=null,this.hideCCW=!1,this.setGridSize(_,E,A),this.setSizeToFrame(!1),this.setViewHeight()},originX:{get:function(){return.5}},originY:{get:function(){return.5}},setGridSize:function(m,d,p){void 0===m&&(m=8),void 0===d&&(d=8),void 0===p&&(p=!1);var v=!1;return p&&(v=!0),this.gridWidth=m,this.gridHeight=d,this.isTiled=p,this.clear(),g({mesh:this,widthSegments:m,heightSegments:d,isOrtho:!1,tile:p,flipY:v}),this},setSizeToFrame:function(m){void 0===m&&(m=!0);var d=this.frame;if(this.setPerspective(this.width/d.width,this.height/d.height),this._checkerboard&&this._checkerboard!==this.texture&&this.removeCheckerboard(),!m)return this;var D,I,p=this.gridWidth,v=this.gridHeight,x=this.vertices,y=d.u0,_=d.u1,E=d.v0,A=d.v1,R=0;if(this.isTiled)for(E=d.v1,A=d.v0,I=0;I7&&D>7?E.push(y.r,y.g,y.b,p):E.push(_.r,_.g,_.b,v);var I=this.scene.sys.textures.addUint8Array(c(),new Uint8Array(E),16,16);return this.removeCheckerboard(),this.setTexture(I),this.setSizeToFrame(),this.setViewHeight(x),this},removeCheckerboard:function(){this._checkerboard&&(this._checkerboard.destroy(),this._checkerboard=null)},play:function(m,d){return this.anims.play(m,d)},playReverse:function(m,d){return this.anims.playReverse(m,d)},playAfterDelay:function(m,d){return this.anims.playAfterDelay(m,d)},playAfterRepeat:function(m,d){return this.anims.playAfterRepeat(m,d)},stop:function(){return this.anims.stop()},stopAfterDelay:function(m){return this.anims.stopAfterDelay(m)},stopAfterRepeat:function(m){return this.anims.stopAfterRepeat(m)},stopOnFrame:function(m){return this.anims.stopOnFrame(m)},preUpdate:function(m,d){h.prototype.preUpdate.call(this,m,d),this.anims.update(m,d)},preDestroy:function(){this.clear(),this.removeCheckerboard(),this.anims.destroy(),this.anims=void 0,this.debugCallback=null,this.debugGraphic=null}});S.exports=u},56015:(S,k,a)=>{var b=a(25305),T=a(13059),g=a(44603),f=a(23568),h=a(35154),c=a(33663);g.register("plane",function(u,m){void 0===u&&(u={});var d=f(u,"key",null),p=f(u,"frame",null),v=h(u,"width",8),x=h(u,"height",8),y=h(u,"tile",!1),_=new c(this.scene,0,0,d,p,v,x,y);void 0!==m&&(u.add=m);var E=h(u,"checkerboard",null);if(E){var A=h(E,"color1",16777215),D=h(E,"color2",255),I=h(E,"alpha1",255),R=h(E,"alpha2",255),F=h(E,"height",128);_.createCheckerboard(A,D,I,R,F)}return b(this.scene,_,u),T(_,u),_})},30985:(S,k,a)=>{var b=a(33663);a(39429).register("plane",function(g,f,h,c,u,m,d){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d))})},80321:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(30100),h=a(36060),c=a(67277),u=new b({Extends:g,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.Mask,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Transform,T.Visible,c],initialize:function(d,p,v,x,y,_,E){void 0===x&&(x=16777215),void 0===y&&(y=128),void 0===_&&(_=1),void 0===E&&(E=.1),g.call(this,d,"PointLight"),this.initPipeline(h.POINTLIGHT_PIPELINE),this.initPostPipeline(),this.setPosition(p,v),this.color=f(x),this.intensity=_,this.attenuation=E,this.width=2*y,this.height=2*y,this._radius=y},radius:{get:function(){return this._radius},set:function(m){this._radius=m,this.width=2*m,this.height=2*m}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});S.exports=u},39829:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(80321);T.register("pointlight",function(h,c){void 0===h&&(h={});var u=g(h,"color",16777215),m=g(h,"radius",128),d=g(h,"intensity",1),p=g(h,"attenuation",.1),v=new f(this.scene,0,0,u,m,d,p);return void 0!==c&&(h.add=c),b(this.scene,v,h),v})},71255:(S,k,a)=>{var b=a(39429),T=a(80321);b.register("pointlight",function(g,f,h,c,u,m){return this.displayList.add(new T(this.scene,g,f,h,c,u,m))})},67277:(S,k,a)=>{var T,g=a(29747);T=a(57787),S.exports={renderWebGL:T,renderCanvas:g}},57787:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){h.addToRenderList(f);var u=g.pipelines.set(f.pipeline),m=b(f,h,c).calc,v=-f._radius,x=-f._radius,y=v+f.width,_=x+f.height,E=m.getX(0,0),A=m.getY(0,0),D=m.getX(v,x),I=m.getY(v,x),R=m.getX(v,_),F=m.getY(v,_),N=m.getX(y,_),V=m.getY(y,_),B=m.getX(y,x),H=m.getY(y,x);g.pipelines.preBatch(f),u.batchPointLight(f,h,D,I,R,F,N,V,B,H,E,A),g.pipelines.postBatch(f)}},591:(S,k,a)=>{var b=a(83419),T=a(81320),g=a(88571),f=new b({Extends:g,initialize:function(c,u,m,d,p){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=32),void 0===p&&(p=32);var v=new T(c.sys.textures,"",d,p);g.call(this,c,u,m,v),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(h,c){this.width=h,this.height=c,this.texture.setSize(h,c),this.updateDisplayOrigin();var u=this.input;return u&&!u.customHitArea&&(u.hitArea.width=h,u.hitArea.height=c),this},resize:function(h,c){return this.setSize(h,c),this},saveTexture:function(h){var c=this.texture;return c.key=h,c.manager.addDynamicTexture(c)&&(this._saved=!0),c},fill:function(h,c,u,m,d,p){return this.texture.fill(h,c,u,m,d,p),this},clear:function(){return this.texture.clear(),this},stamp:function(h,c,u,m,d){return this.texture.stamp(h,c,u,m,d),this},erase:function(h,c,u){return this.texture.erase(h,c,u),this},draw:function(h,c,u,m,d){return this.texture.draw(h,c,u,m,d),this},drawFrame:function(h,c,u,m,d,p){return this.texture.drawFrame(h,c,u,m,d,p),this},repeat:function(h,c,u,m,d,p,v,x,y){return this.texture.repeat(h,c,u,m,d,p,v,x,y),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(h,c,u,m,d){return this.texture.batchDraw(h,c,u,m,d),this},batchDrawFrame:function(h,c,u,m,d,p){return this.texture.batchDrawFrame(h,c,u,m,d,p),this},endDraw:function(h){return this.texture.endDraw(h),this},snapshotArea:function(h,c,u,m,d,p,v){return this.texture.snapshotArea(h,c,u,m,d,p,v),this},snapshot:function(h,c,u){return this.snapshotArea(0,0,this.width,this.height,h,c,u)},snapshotPixel:function(h,c,u){return this.snapshotArea(h,c,1,1,u,"pixel")},preDestroy:function(){this.camera=null,this._saved||this.texture.destroy()}});S.exports=f},34495:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(591);T.register("renderTexture",function(h,c){void 0===h&&(h={});var u=g(h,"x",0),m=g(h,"y",0),d=g(h,"width",32),p=g(h,"height",32),v=new f(this.scene,u,m,d,p);return void 0!==c&&(h.add=c),b(this.scene,v,h),v})},60505:(S,k,a)=>{var b=a(39429),T=a(591);b.register("renderTexture",function(g,f,h,c){return this.displayList.add(new T(this.scene,g,f,h,c))})},77757:(S,k,a)=>{var b=a(9674),T=a(83419),g=a(31401),f=a(95643),h=a(36060),c=a(38745),u=a(26099),m=new T({Extends:f,Mixins:[g.AlphaSingle,g.BlendMode,g.Depth,g.Flip,g.Mask,g.Pipeline,g.PostPipeline,g.Size,g.Texture,g.Transform,g.Visible,g.ScrollFactor,c],initialize:function(p,v,x,y,_,E,A,D,I){void 0===y&&(y="__DEFAULT"),void 0===E&&(E=2),void 0===A&&(A=!0),f.call(this,p,"Rope"),this.anims=new b(this),this.points=E,this.tintFill="__DEFAULT"===y,this.dirty=!1,this.horizontal=A,this._flipX=!1,this._flipY=!1,this._perp=new u,this.debugCallback=null,this.debugGraphic=null,this.setTexture(y,_),this.setPosition(v,x),this.setSizeToFrame(),this.initPipeline(h.ROPE_PIPELINE),this.initPostPipeline(),Array.isArray(E)&&this.resizeArrays(E.length),this.setPoints(E,D,I),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(d,p){var v=this.anims.currentFrame;this.anims.update(d,p),this.anims.currentFrame!==v&&(this.updateUVs(),this.updateVertices())},play:function(d,p,v){return this.anims.play(d,p,v),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(d,p,v){return void 0===d&&(d=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(d,p,v))},setVertical:function(d,p,v){return void 0===d&&(d=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(d,p,v)):this},setTintFill:function(d){return void 0===d&&(d=!1),this.tintFill=d,this},setAlphas:function(d,p){var v=this.points.length;if(v<1)return this;var x=this.alphas;void 0===d?d=[1]:!Array.isArray(d)&&void 0===p&&(d=[d]);var y,_=0;if(void 0!==p)for(y=0;y(_=2*y)&&(E=d[_]),x[_]=E,d.length>_+1&&(E=d[_+1]),x[_+1]=E}return this},setColors:function(d){var p=this.points.length;if(p<1)return this;var v=this.colors;void 0===d?d=[16777215]:Array.isArray(d)||(d=[d]);var x,y=0;if(d.length===p)for(x=0;x(y=2*x)&&(_=d[y]),v[y]=_,d.length>y+1&&(_=d[y+1]),v[y+1]=_}return this},setPoints:function(d,p,v){if(void 0===d&&(d=2),"number"==typeof d){var y,_,E,x=d;if(x<2&&(x=2),d=[],this.horizontal)for(E=-this.frame.halfWidth,_=this.frame.width/(x-1),y=0;y{S.exports=function(){}},26209:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(35154),h=a(77757);T.register("rope",function(c,u){void 0===c&&(c={});var m=g(c,"key",null),d=g(c,"frame",null),p=g(c,"horizontal",!0),v=f(c,"points",void 0),x=f(c,"colors",void 0),y=f(c,"alphas",void 0),_=new h(this.scene,0,0,m,d,v,p,x,y);return void 0!==u&&(c.add=u),b(this.scene,_,c),_})},96819:(S,k,a)=>{var b=a(77757);a(39429).register("rope",function(g,f,h,c,u,m,d,p){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p))})},38745:(S,k,a)=>{var T,g;a(29747),T=a(20439),g=a(95262),S.exports={renderWebGL:T,renderCanvas:g}},20439:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline,h),d=b(h,c,u).calc,p=h.vertices,v=h.uv,x=h.colors,y=h.alphas,_=h.alpha,E=T.getTintAppendFloatAlpha,A=c.roundPixels,D=p.length,I=Math.floor(.5*D);m.flush(),f.pipelines.preBatch(h);var R=m.setGameObject(h),F=m.vertexViewF32,N=m.vertexViewU32,V=m.vertexCount*m.currentShader.vertexComponentCount-1,B=0,H=h.tintFill;h.dirty&&h.updateVertices();for(var Q=h.debugCallback,G=[],K=0;K{var b=a(83419),T=a(31401),g=a(95643),f=a(95540),h=a(79291),c=a(61622),u=a(25479),m=a(61340),d=a(95428),p=a(92503),v=new b({Extends:g,Mixins:[T.ComputedSize,T.Depth,T.GetBounds,T.Mask,T.Origin,T.ScrollFactor,T.Transform,T.Visible,u],initialize:function(y,_,E,A,D,I,R,F){void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=128),void 0===I&&(I=128),g.call(this,y,"Shader"),this.blendMode=-1;var N=y.sys.renderer;this.renderer=N,this.gl=N.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=N.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this._deferSetShader=null,this._deferProjOrtho=null,this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new m,this._tempMatrix2=new m,this._tempMatrix3=new m,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=N.width,this._rendererHeight=N.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(E,A),this.setSize(D,I),this.setOrigin(.5,.5),this.setShader(_,R,F),this.renderer.on(p.RESTORE_WEBGL,this.onContextRestored,this)},willRender:function(x){return!!this.renderToTexture||!(g.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&x.id)},setRenderToTexture:function(x,y){if(void 0===y&&(y=!1),!this.renderToTexture){var _=this.width,E=this.height,A=this.renderer;this.glTexture=A.createTextureFromSource(null,_,E,0),this.framebuffer=A.createFramebuffer(_,E,this.glTexture,!1),this._rendererWidth=_,this._rendererHeight=E,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),x&&(this.texture=this.scene.sys.textures.addGLTexture(x,this.glTexture))}return this.shader&&(A.pipelines.clear(),this.load(),this.flush(),A.pipelines.rebind()),this},setShader:function(x,y,_){if(this.renderer.contextLost)return this._deferSetShader={key:x,textures:y,textureData:_},this;if(void 0===y&&(y=[]),"string"==typeof x){var E=this.scene.sys.cache.shader;if(!E.has(x))return console.warn("Shader missing: "+x),this;this.shader=E.get(x)}else this.shader=x;var A=this.gl,D=this.renderer;this.program&&D.deleteProgram(this.program);var I=D.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);A.uniformMatrix4fv(A.getUniformLocation(I.webGLProgram,"uViewMatrix"),!1,this.viewMatrix),A.uniformMatrix4fv(A.getUniformLocation(I.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),A.uniform2f(A.getUniformLocation(I.webGLProgram,"uResolution"),this.width,this.height),this.program=I;var R=new Date,F={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[R.getFullYear(),R.getMonth(),R.getDate(),60*R.getHours()*60+60*R.getMinutes()+R.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.uniforms=this.shader.uniforms?h(!0,{},this.shader.uniforms,F):F;for(var N=0;N<4;N++)y[N]&&this.setSampler2D("iChannel"+N,y[N],N,_);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(x){return this.pointer=x,this},projOrtho:function(x,y,_,E){if(this.renderer.contextLost)this._deferProjOrtho={left:x,right:y,bottom:_,top:E};else{var I=1/(x-y),R=1/(_-E),N=this.projectionMatrix;N[0]=-2*I,N[5]=-2*R,N[10]=-.001,N[12]=(x+y)*I,N[13]=(E+_)*R,N[14]=-0;var V=this.program,B=this.gl;this.renderer.setProgram(V),B.uniformMatrix4fv(B.getUniformLocation(V.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=y,this._rendererHeight=_}},initUniforms:function(){var x=this.renderer.glFuncMap,y=this.program;for(var _ in this._textureCount=0,this.uniforms){var E=this.uniforms[_],A=E.type,D=x[A];E.uniformLocation=this.renderer.createUniformLocation(y,_),"sampler2D"!==A&&(E.glMatrix=D.matrix,E.glValueLength=D.length,E.glFunc=D.func)}},setSampler2DBuffer:function(x,y,_,E,A,D){void 0===A&&(A=0),void 0===D&&(D={});var I=this.uniforms[x];return I.value=y,D.width=_,D.height=E,I.textureData=D,this._textureCount=A,this.initSampler2D(I),this},setSampler2D:function(x,y,_,E){void 0===_&&(_=0);var A=this.scene.sys.textures;if(A.exists(y)){var D=A.getFrame(y);if(D.glTexture&&D.glTexture.isRenderTexture)return this.setSampler2DBuffer(x,D.glTexture,D.width,D.height,_,E);var I=this.uniforms[x],R=D.source;I.textureKey=y,I.source=R.image,I.value=D.glTexture,R.isGLTexture&&(E||(E={}),E.width=R.width,E.height=R.height),E&&(I.textureData=E),this._textureCount=_,this.initSampler2D(I)}return this},setUniform:function(x,y){return c(this.uniforms,x,y),this},getUniform:function(x){return f(this.uniforms,x,null)},setChannel0:function(x,y){return this.setSampler2D("iChannel0",x,0,y)},setChannel1:function(x,y){return this.setSampler2D("iChannel1",x,1,y)},setChannel2:function(x,y){return this.setSampler2D("iChannel2",x,2,y)},setChannel3:function(x,y){return this.setSampler2D("iChannel3",x,3,y)},initSampler2D:function(x){if(x.value){var y=x.textureData;if(y&&!x.value.isRenderTexture){var _=this.gl,E=x.value,A=_[f(y,"magFilter","linear").toUpperCase()],D=_[f(y,"minFilter","linear").toUpperCase()],I=_[f(y,"wrapS","repeat").toUpperCase()],R=_[f(y,"wrapT","repeat").toUpperCase()],F=_[f(y,"format","rgba").toUpperCase()],N=f(y,"flipY",!1),V=f(y,"width",E.width),B=f(y,"height",E.height),H=f(y,"source",E.pixels);y.repeat&&(I=_.REPEAT,R=_.REPEAT),y.width&&(H=null),E.update(H,V,B,N,I,R,D,A,F)}this.renderer.setProgram(this.program),this._textureCount++}},syncUniforms:function(){var _,E,A,D,I,x=this.gl,y=this.uniforms,R=0;for(var F in y)A=(_=y[F]).glFunc,E=_.glValueLength,D=_.uniformLocation,null!==(I=_.value)&&(1===E?_.glMatrix?A.call(x,D.webGLUniformLocation,_.transpose,I):A.call(x,D.webGLUniformLocation,I):2===E?A.call(x,D.webGLUniformLocation,I.x,I.y):3===E?A.call(x,D.webGLUniformLocation,I.x,I.y,I.z):4===E?A.call(x,D.webGLUniformLocation,I.x,I.y,I.z,I.w):"sampler2D"===_.type&&(x.activeTexture(x.TEXTURE0+R),x.bindTexture(x.TEXTURE_2D,I.webGLTexture),x.uniform1i(D.webGLUniformLocation,R),R++))},load:function(x){var y=this.gl,_=this.width,E=this.height,A=this.renderer,D=this.program,I=this.viewMatrix;if(!this.renderToTexture){var R=-this._displayOriginX,F=-this._displayOriginY;I[0]=x[0],I[1]=x[1],I[4]=x[2],I[5]=x[3],I[8]=x[4],I[9]=x[5],I[12]=I[0]*R+I[4]*F,I[13]=I[1]*R+I[5]*F}y.useProgram(D.webGLProgram),y.uniformMatrix4fv(y.getUniformLocation(D.webGLProgram,"uViewMatrix"),!1,I),y.uniformMatrix4fv(y.getUniformLocation(D.webGLProgram,"uProjectionMatrix"),!1,this.projectionMatrix),y.uniform2f(y.getUniformLocation(D.webGLProgram,"uResolution"),this.width,this.height);var N=this.uniforms,V=N.resolution;V.value.x=_,V.value.y=E,N.time.value=A.game.loop.getDuration();var B=this.pointer;if(B){var H=N.mouse,G=1-B.y/E;H.value.x=(B.x/_).toFixed(2),H.value.y=G.toFixed(2)}this.syncUniforms()},flush:function(){var x=this.width,y=this.height,_=this.program,E=this.gl,A=this.vertexBuffer,D=this.renderer,I=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(D.setFramebuffer(this.framebuffer),E.clearColor(0,0,0,0),E.clear(E.COLOR_BUFFER_BIT)),E.bindBuffer(E.ARRAY_BUFFER,A.webGLBuffer);var R=E.getAttribLocation(_.webGLProgram,"inPosition");-1!==R&&(E.enableVertexAttribArray(R),E.vertexAttribPointer(R,2,E.FLOAT,!1,I,0));var F=this.vertexViewF32;F[3]=y,F[4]=x,F[5]=y,F[8]=x,F[9]=y,F[10]=x,E.bufferSubData(E.ARRAY_BUFFER,0,this.bytes.subarray(0,6*I)),E.drawArrays(E.TRIANGLES,0,6),this.renderToTexture&&D.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},onContextRestored:function(){if(null!==this._deferSetShader){var x=this._deferSetShader.key,y=this._deferSetShader.textures,_=this._deferSetShader.textureData;this._deferSetShader=null,this.setShader(x,y,_)}if(null!==this._deferProjOrtho){var E=this._deferProjOrtho.left,A=this._deferProjOrtho.right,D=this._deferProjOrtho.bottom,I=this._deferProjOrtho.top;this._deferProjOrtho=null,this.projOrtho(E,A,D,I)}},preDestroy:function(){var x=this.renderer;x.off(p.RESTORE_WEBGL,this.onContextRestored,this),x.deleteProgram(this.program),x.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(x.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null),d(this.uniforms,function(y){x.deleteUniformLocation(y.uniformLocation),y.uniformLocation=null})}});S.exports=v},80464:S=>{S.exports=function(){}},54935:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(20071);T.register("shader",function(h,c){void 0===h&&(h={});var u=g(h,"key",null),m=g(h,"x",0),d=g(h,"y",0),p=g(h,"width",128),v=g(h,"height",128),x=new f(this.scene,u,m,d,p,v);return void 0!==c&&(h.add=c),b(this.scene,x,h),x})},74177:(S,k,a)=>{var b=a(20071);a(39429).register("shader",function(g,f,h,c,u,m,d){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d))})},25479:(S,k,a)=>{var T,g;a(29747),T=a(19257),g=a(80464),S.exports={renderWebGL:T,renderCanvas:g}},19257:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c){if(f.shader){if(h.addToRenderList(f),g.pipelines.clear(),f.renderToTexture)f.load(),f.flush();else{var u=b(f,h,c).calc;(g.width!==f._rendererWidth||g.height!==f._rendererHeight)&&f.projOrtho(0,g.width,g.height,0),f.load(u.matrix),f.flush()}g.pipelines.rebind()}}},10441:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c,u,m){for(var d=b.getTintAppendFloatAlpha(h.fillColor,h.fillAlpha*c),p=h.pathData,v=h.pathIndexes,x=0;x{S.exports=function(a,b,T,g){var f=T||b.fillColor;a.fillStyle="rgba("+((16711680&f)>>>16)+","+((65280&f)>>>8)+","+(255&f)+","+(g||b.fillAlpha)+")"}},75177:S=>{S.exports=function(a,b,T,g){var f=T||b.strokeColor;a.strokeStyle="rgba("+((16711680&f)>>>16)+","+((65280&f)>>>8)+","+(255&f)+","+(g||b.strokeAlpha)+")",a.lineWidth=b.lineWidth}},17803:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(95643),f=a(23031),h=new b({Extends:g,Mixins:[T.AlphaSingle,T.BlendMode,T.Depth,T.GetBounds,T.Mask,T.Origin,T.Pipeline,T.PostPipeline,T.ScrollFactor,T.Transform,T.Visible],initialize:function(u,m,d){void 0===m&&(m="Shape"),g.call(this,u,m),this.geom=d,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new f,this.width=0,this.height=0,this.initPipeline(),this.initPostPipeline()},setFillStyle:function(c,u){return void 0===u&&(u=1),void 0===c?this.isFilled=!1:(this.fillColor=c,this.fillAlpha=u,this.isFilled=!0),this},setStrokeStyle:function(c,u,m){return void 0===m&&(m=1),void 0===c?this.isStroked=!1:(this.lineWidth=c,this.strokeColor=u,this.strokeAlpha=m,this.isStroked=!0),this},setClosePath:function(c){return this.closePath=c,this},setSize:function(c,u){return this.width=c,this.height=u,this},setDisplaySize:function(c,u){return this.displayWidth=c,this.displayHeight=u,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(c){this.scaleX=c/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(c){this.scaleY=c/this.height}}});S.exports=h},34682:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c,u){var m=g.strokeTint,d=b.getTintAppendFloatAlpha(f.strokeColor,f.strokeAlpha*h);m.TL=d,m.TR=d,m.BL=d,m.BR=d;var p=f.pathData,v=p.length-1,x=f.lineWidth,y=x/2,_=p[0]-c,E=p[1]-u;f.closePath||(v-=2);for(var A=2;A{var b=a(13609),T=a(83419),g=a(39506),f=a(94811),h=a(96503),c=a(36383),u=a(17803),m=new T({Extends:u,Mixins:[b],initialize:function(p,v,x,y,_,E,A,D,I){void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=128),void 0===_&&(_=0),void 0===E&&(E=360),void 0===A&&(A=!1),u.call(this,p,"Arc",new h(0,0,y)),this._startAngle=_,this._endAngle=E,this._anticlockwise=A,this._iterations=.01,this.setPosition(v,x);var R=2*this.geom.radius;this.setSize(R,R),void 0!==D&&this.setFillStyle(D,I),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(d){this._iterations=d,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(d){this.geom.radius=d;var p=2*d;this.setSize(p,p),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(d){this._startAngle=d,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(d){this._endAngle=d,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(d){this._anticlockwise=d,this.updateData()}},setRadius:function(d){return this.radius=d,this},setIterations:function(d){return void 0===d&&(d=.01),this.iterations=d,this},setStartAngle:function(d,p){return this._startAngle=d,void 0!==p&&(this._anticlockwise=p),this.updateData()},setEndAngle:function(d,p){return this._endAngle=d,void 0!==p&&(this._anticlockwise=p),this.updateData()},updateData:function(){var d=this._iterations,p=d,v=this.geom.radius,x=g(this._startAngle),y=g(this._endAngle),E=v,A=v;y-=x,this._anticlockwise?y<-c.PI2?y=-c.PI2:y>0&&(y=y%c.PI2-c.PI2):y>c.PI2?y=c.PI2:y<0&&(y=c.PI2+y%c.PI2);for(var I,D=[E+Math.cos(x)*v,A+Math.sin(x)*v];p<1;)I=y*p+x,D.push(E+Math.cos(I)*v,A+Math.sin(I)*v),p+=d;return I=y+x,D.push(E+Math.cos(I)*v,A+Math.sin(I)*v),D.push(E+Math.cos(x)*v,A+Math.sin(x)*v),this.pathIndexes=f(D),this.pathData=D,this}});S.exports=m},42542:(S,k,a)=>{var b=a(39506),T=a(65960),g=a(75177),f=a(20926);S.exports=function(c,u,m,d){m.addToRenderList(u);var p=c.currentContext;if(f(c,p,u,m,d)){var v=u.radius;p.beginPath(),p.arc(v-u.originX*(2*v),v-u.originY*(2*v),v,b(u._startAngle),b(u._endAngle),u.anticlockwise),u.closePath&&p.closePath(),u.isFilled&&(T(p,u),p.fill()),u.isStroked&&(g(p,u),p.stroke()),p.restore()}}},42563:(S,k,a)=>{var b=a(23629),T=a(39429);T.register("arc",function(g,f,h,c,u,m,d,p){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d,p))}),T.register("circle",function(g,f,h,c,u){return this.displayList.add(new b(this.scene,g,f,h,0,360,!1,c,u))})},13609:(S,k,a)=>{var T,g;a(29747),T=a(41447),g=a(42542),S.exports={renderWebGL:T,renderCanvas:g}},41447:(S,k,a)=>{var b=a(91296),T=a(10441),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=b(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&T(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},89:(S,k,a)=>{var b=a(83419),T=a(33141),g=a(94811),f=a(87841),h=a(17803),c=new b({Extends:h,Mixins:[T],initialize:function(m,d,p,v,x,y){void 0===d&&(d=0),void 0===p&&(p=0),h.call(this,m,"Curve",v),this._smoothness=32,this._curveBounds=new f,this.closePath=!1,this.setPosition(d,p),void 0!==x&&this.setFillStyle(x,y),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){var u=this._curveBounds,m=this._smoothness;this.geom.getBounds(u,m),this.setSize(u.width,u.height),this.updateDisplayOrigin();for(var d=[],p=this.geom.getPoints(m),v=0;v{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX+c._curveBounds.x,v=c._displayOriginY+c._curveBounds.y,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(39429),T=a(89);b.register("curve",function(g,f,h,c,u){return this.displayList.add(new T(this.scene,g,f,h,c,u))})},33141:(S,k,a)=>{var T,g;a(29747),T=a(53987),g=a(3170),S.exports={renderWebGL:T,renderCanvas:g}},53987:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX+c._curveBounds.x,y=c._displayOriginY+c._curveBounds.y,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},19921:(S,k,a)=>{var b=a(83419),T=a(94811),g=a(54205),f=a(8497),h=a(17803),c=new b({Extends:h,Mixins:[g],initialize:function(m,d,p,v,x,y,_){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=128),void 0===x&&(x=128),h.call(this,m,"Ellipse",new f(v/2,x/2,v,x)),this._smoothness=64,this.setPosition(d,p),this.width=v,this.height=x,void 0!==y&&this.setFillStyle(y,_),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(u){this._smoothness=u,this.updateData()}},setSize:function(u,m){return this.width=u,this.height=m,this.geom.setPosition(u/2,m/2),this.geom.setSize(u,m),this.updateDisplayOrigin(),this.updateData()},setSmoothness:function(u){return this._smoothness=u,this.updateData()},updateData:function(){for(var u=[],m=this.geom.getPoints(this._smoothness),d=0;d{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(19921);a(39429).register("ellipse",function(g,f,h,c,u,m){return this.displayList.add(new b(this.scene,g,f,h,c,u,m))})},54205:(S,k,a)=>{var T,g;a(29747),T=a(19467),g=a(7930),S.exports={renderWebGL:T,renderCanvas:g}},19467:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},30479:(S,k,a)=>{var b=a(83419),T=a(17803),g=a(26015),f=new b({Extends:T,Mixins:[g],initialize:function(c,u,m,d,p,v,x,y,_,E,A){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=128),void 0===p&&(p=128),void 0===v&&(v=32),void 0===x&&(x=32),T.call(this,c,"Grid",null),this.cellWidth=v,this.cellHeight=x,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.setPosition(u,m),this.setSize(d,p),this.setFillStyle(y,_),void 0!==E&&this.setOutlineStyle(E,A),this.updateDisplayOrigin()},setFillStyle:function(h,c){return void 0===c&&(c=1),void 0===h?this.showCells=!1:(this.fillColor=h,this.fillAlpha=c,this.showCells=!0),this},setAltFillStyle:function(h,c){return void 0===c&&(c=1),void 0===h?this.showAltCells=!1:(this.altFillColor=h,this.altFillAlpha=c,this.showAltCells=!0),this},setOutlineStyle:function(h,c){return void 0===c&&(c=1),void 0===h?this.showOutline=!1:(this.outlineFillColor=h,this.outlineFillAlpha=c,this.showOutline=!0),this}});S.exports=f},49912:(S,k,a)=>{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=-c._displayOriginX,v=-c._displayOriginY,x=u.alpha*c.alpha,y=c.width,_=c.height,E=c.cellWidth,A=c.cellHeight,D=Math.ceil(y/E),I=Math.ceil(_/A),R=E,F=A,N=E-(D*E-y),V=A-(I*A-_),H=c.showAltCells,Q=c.showOutline,G=0,K=0,q=0;if(Q&&(R--,F--,N===E&&N--,V===A&&V--),c.showCells&&c.fillAlpha>0)for(b(d,c),K=0;K0)for(b(d,c,c.altFillColor,c.altFillAlpha*x),K=0;K0){for(T(d,c,c.outlineFillColor,c.outlineFillAlpha*x),G=1;G{var b=a(39429),T=a(30479);b.register("grid",function(g,f,h,c,u,m,d,p,v,x){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p,v,x))})},26015:(S,k,a)=>{var T,g;a(29747),T=a(46161),g=a(49912),S.exports={renderWebGL:T,renderCanvas:g}},46161:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline),d=b(h,c,u);m.calcMatrix.copyFrom(d.calc).translate(-h._displayOriginX,-h._displayOriginY);var V,B,v=c.alpha*h.alpha,x=h.width,y=h.height,_=h.cellWidth,E=h.cellHeight,A=Math.ceil(x/_),D=Math.ceil(y/E),I=_,R=E,F=_-(A*_-x),N=E-(D*E-y),H=h.showCells,Q=h.showAltCells,G=h.showOutline,K=0,q=0,at=0;if(G&&(I--,R--,F===_&&F--,N===E&&N--),f.pipelines.preBatch(h),H&&h.fillAlpha>0)for(V=m.fillTint,B=T.getTintAppendFloatAlpha(h.fillColor,h.fillAlpha*v),V.TL=B,V.TR=B,V.BL=B,V.BR=B,q=0;q0)for(V=m.fillTint,B=T.getTintAppendFloatAlpha(h.altFillColor,h.altFillAlpha*v),V.TL=B,V.TR=B,V.BL=B,V.BR=B,q=0;q0){var it=m.strokeTint,Y=T.getTintAppendFloatAlpha(h.outlineFillColor,h.outlineFillAlpha*v);for(it.TL=Y,it.TR=Y,it.BL=Y,it.BR=Y,K=1;K{var b=a(99651),T=a(83419),g=a(17803),f=new T({Extends:g,Mixins:[b],initialize:function(c,u,m,d,p,v,x,y){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=48),void 0===p&&(p=32),void 0===v&&(v=15658734),void 0===x&&(x=10066329),void 0===y&&(y=13421772),g.call(this,c,"IsoBox",null),this.projection=4,this.fillTop=v,this.fillLeft=x,this.fillRight=y,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(u,m),this.setSize(d,p),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setFaces:function(h,c,u){return void 0===h&&(h=!0),void 0===c&&(c=!0),void 0===u&&(u=!0),this.showTop=h,this.showLeft=c,this.showRight=u,this},setFillStyle:function(h,c,u){return this.fillTop=h,this.fillLeft=c,this.fillRight=u,this.isFilled=!0,this}});S.exports=f},11508:(S,k,a)=>{var b=a(65960),T=a(20926);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.currentContext;if(T(f,m,h,c,u)&&h.isFilled){var d=h.width,p=h.height,v=d/2,x=d/h.projection;h.showTop&&(b(m,h,h.fillTop),m.beginPath(),m.moveTo(-v,-p),m.lineTo(0,-x-p),m.lineTo(v,-p),m.lineTo(v,-1),m.lineTo(0,x-1),m.lineTo(-v,-1),m.lineTo(-v,-p),m.fill()),h.showLeft&&(b(m,h,h.fillLeft),m.beginPath(),m.moveTo(-v,0),m.lineTo(0,x),m.lineTo(0,x-p),m.lineTo(-v,-p),m.lineTo(-v,0),m.fill()),h.showRight&&(b(m,h,h.fillRight),m.beginPath(),m.moveTo(v,0),m.lineTo(0,x),m.lineTo(0,x-p),m.lineTo(v,-p),m.lineTo(v,0),m.fill()),m.restore()}}},3933:(S,k,a)=>{var b=a(39429),T=a(61475);b.register("isobox",function(g,f,h,c,u,m,d){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d))})},99651:(S,k,a)=>{var T,g;a(29747),T=a(68149),g=a(11508),S.exports={renderWebGL:T,renderCanvas:g}},68149:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var A,D,I,R,F,N,V,B,H,m=f.pipelines.set(h.pipeline),d=b(h,c,u),p=m.calcMatrix.copyFrom(d.calc),v=h.width,x=h.height,y=v/2,_=v/h.projection,E=c.alpha*h.alpha;h.isFilled&&(f.pipelines.preBatch(h),h.showTop&&(A=T.getTintAppendFloatAlpha(h.fillTop,E),D=p.getX(-y,-x),I=p.getY(-y,-x),R=p.getX(0,-_-x),F=p.getY(0,-_-x),N=p.getX(y,-x),V=p.getY(y,-x),B=p.getX(0,_-x),H=p.getY(0,_-x),m.batchQuad(h,D,I,R,F,N,V,B,H,0,0,1,1,A,A,A,A,2)),h.showLeft&&(A=T.getTintAppendFloatAlpha(h.fillLeft,E),D=p.getX(-y,0),I=p.getY(-y,0),R=p.getX(0,_),F=p.getY(0,_),N=p.getX(0,_-x),V=p.getY(0,_-x),B=p.getX(-y,-x),H=p.getY(-y,-x),m.batchQuad(h,D,I,R,F,N,V,B,H,0,0,1,1,A,A,A,A,2)),h.showRight&&(A=T.getTintAppendFloatAlpha(h.fillRight,E),D=p.getX(y,0),I=p.getY(y,0),R=p.getX(0,_),F=p.getY(0,_),N=p.getX(0,_-x),V=p.getY(0,_-x),B=p.getX(y,-x),H=p.getY(y,-x),m.batchQuad(h,D,I,R,F,N,V,B,H,0,0,1,1,A,A,A,A,2)),f.pipelines.postBatch(h))}},16933:(S,k,a)=>{var b=a(83419),T=a(60561),g=a(17803),f=new b({Extends:g,Mixins:[T],initialize:function(c,u,m,d,p,v,x,y,_){void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d=48),void 0===p&&(p=32),void 0===v&&(v=!1),void 0===x&&(x=15658734),void 0===y&&(y=10066329),void 0===_&&(_=13421772),g.call(this,c,"IsoTriangle",null),this.projection=4,this.fillTop=x,this.fillLeft=y,this.fillRight=_,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=v,this.isFilled=!0,this.setPosition(u,m),this.setSize(d,p),this.updateDisplayOrigin()},setProjection:function(h){return this.projection=h,this},setReversed:function(h){return this.isReversed=h,this},setFaces:function(h,c,u){return void 0===h&&(h=!0),void 0===c&&(c=!0),void 0===u&&(u=!0),this.showTop=h,this.showLeft=c,this.showRight=u,this},setFillStyle:function(h,c,u){return this.fillTop=h,this.fillLeft=c,this.fillRight=u,this.isFilled=!0,this}});S.exports=f},79590:(S,k,a)=>{var b=a(65960),T=a(20926);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.currentContext;if(T(f,m,h,c,u)&&h.isFilled){var d=h.width,p=h.height,v=d/2,x=d/h.projection,y=h.isReversed;h.showTop&&y&&(b(m,h,h.fillTop),m.beginPath(),m.moveTo(-v,-p),m.lineTo(0,-x-p),m.lineTo(v,-p),m.lineTo(0,x-p),m.fill()),h.showLeft&&(b(m,h,h.fillLeft),m.beginPath(),y?(m.moveTo(-v,-p),m.lineTo(0,x),m.lineTo(0,x-p)):(m.moveTo(-v,0),m.lineTo(0,x),m.lineTo(0,x-p)),m.fill()),h.showRight&&(b(m,h,h.fillRight),m.beginPath(),y?(m.moveTo(v,-p),m.lineTo(0,x),m.lineTo(0,x-p)):(m.moveTo(v,0),m.lineTo(0,x),m.lineTo(0,x-p)),m.fill()),m.restore()}}},49803:(S,k,a)=>{var b=a(39429),T=a(16933);b.register("isotriangle",function(g,f,h,c,u,m,d,p){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p))})},60561:(S,k,a)=>{var T,g;a(29747),T=a(51503),g=a(79590),S.exports={renderWebGL:T,renderCanvas:g}},51503:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline),d=b(h,c,u),p=m.calcMatrix.copyFrom(d.calc),v=h.width,x=h.height,y=v/2,_=v/h.projection,E=h.isReversed,A=c.alpha*h.alpha;if(h.isFilled){var D,I,R,F,N,V,B;if(f.pipelines.preBatch(h),h.showTop&&E){D=T.getTintAppendFloatAlpha(h.fillTop,A),I=p.getX(-y,-x),R=p.getY(-y,-x),F=p.getX(0,-_-x),N=p.getY(0,-_-x),V=p.getX(y,-x),B=p.getY(y,-x);var H=p.getX(0,_-x),Q=p.getY(0,_-x);m.batchQuad(h,I,R,F,N,V,B,H,Q,0,0,1,1,D,D,D,D,2)}h.showLeft&&(D=T.getTintAppendFloatAlpha(h.fillLeft,A),E?(I=p.getX(-y,-x),R=p.getY(-y,-x),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)):(I=p.getX(-y,0),R=p.getY(-y,0),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)),m.batchTri(h,I,R,F,N,V,B,0,0,1,1,D,D,D,2)),h.showRight&&(D=T.getTintAppendFloatAlpha(h.fillRight,A),E?(I=p.getX(y,-x),R=p.getY(y,-x),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)):(I=p.getX(y,0),R=p.getY(y,0),F=p.getX(0,_),N=p.getY(0,_),V=p.getX(0,_-x),B=p.getY(0,_-x)),m.batchTri(h,I,R,F,N,V,B,0,0,1,1,D,D,D,2)),f.pipelines.postBatch(h)}}},57847:(S,k,a)=>{var b=a(83419),T=a(17803),g=a(23031),f=a(36823),h=new b({Extends:T,Mixins:[f],initialize:function(u,m,d,p,v,x,y,_,E){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=128),void 0===y&&(y=0),T.call(this,u,"Line",new g(p,v,x,y));var A=Math.max(1,this.geom.right-this.geom.left),D=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(m,d),this.setSize(A,D),void 0!==_&&this.setStrokeStyle(1,_,E),this.updateDisplayOrigin()},setLineWidth:function(c,u){return void 0===u&&(u=c),this._startWidth=c,this._endWidth=u,this.lineWidth=c,this},setTo:function(c,u,m,d){return this.geom.setTo(c,u,m,d),this}});S.exports=h},17440:(S,k,a)=>{var b=a(75177),T=a(20926);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.currentContext;if(T(f,m,h,c,u)){var d=h._displayOriginX,p=h._displayOriginY;h.isStroked&&(b(m,h),m.beginPath(),m.moveTo(h.geom.x1-d,h.geom.y1-p),m.lineTo(h.geom.x2-d,h.geom.y2-p),m.stroke()),m.restore()}}},2481:(S,k,a)=>{var b=a(39429),T=a(57847);b.register("line",function(g,f,h,c,u,m,d,p){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p))})},36823:(S,k,a)=>{var T,g;a(29747),T=a(77385),g=a(17440),S.exports={renderWebGL:T,renderCanvas:g}},77385:(S,k,a)=>{var b=a(91296),T=a(70554);S.exports=function(f,h,c,u){c.addToRenderList(h);var m=f.pipelines.set(h.pipeline),d=b(h,c,u);m.calcMatrix.copyFrom(d.calc);var p=h._displayOriginX,v=h._displayOriginY,x=c.alpha*h.alpha;if(f.pipelines.preBatch(h),h.isStroked){var y=m.strokeTint,_=T.getTintAppendFloatAlpha(h.strokeColor,h.strokeAlpha*x);y.TL=_,y.TR=_,y.BL=_,y.BR=_,m.batchLine(h.geom.x1-p,h.geom.y1-v,h.geom.x2-p,h.geom.y2-v,h._startWidth/2,h._endWidth/2,1,0,!1,d.sprite,d.camera)}f.pipelines.postBatch(h)}},24949:(S,k,a)=>{var b=a(90273),T=a(83419),g=a(94811),f=a(13829),h=a(25717),c=a(17803),u=a(5469),m=new T({Extends:c,Mixins:[b],initialize:function(p,v,x,y,_,E){void 0===v&&(v=0),void 0===x&&(x=0),c.call(this,p,"Polygon",new h(y));var A=f(this.geom);this.setPosition(v,x),this.setSize(A.width,A.height),void 0!==_&&this.setFillStyle(_,E),this.updateDisplayOrigin(),this.updateData()},smooth:function(d){void 0===d&&(d=1);for(var p=0;p{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(39429),T=a(24949);b.register("polygon",function(g,f,h,c,u){return this.displayList.add(new T(this.scene,g,f,h,c,u))})},90273:(S,k,a)=>{var T,g;a(29747),T=a(73695),g=a(38710),S.exports={renderWebGL:T,renderCanvas:g}},73695:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},74561:(S,k,a)=>{var b=a(83419),T=a(87841),g=a(17803),f=a(95597),h=new b({Extends:g,Mixins:[f],initialize:function(u,m,d,p,v,x,y){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=128),void 0===v&&(v=128),g.call(this,u,"Rectangle",new T(0,0,p,v)),this.setPosition(m,d),this.setSize(p,v),void 0!==x&&this.setFillStyle(x,y),this.updateDisplayOrigin(),this.updateData()},setSize:function(c,u){this.width=c,this.height=u,this.geom.setSize(c,u),this.updateData(),this.updateDisplayOrigin();var m=this.input;return m&&!m.customHitArea&&(m.hitArea.width=c,m.hitArea.height=u),this},updateData:function(){var c=[],u=this.geom,m=this._tempLine;return u.getLineA(m),c.push(m.x1,m.y1,m.x2,m.y2),u.getLineB(m),c.push(m.x2,m.y2),u.getLineC(m),c.push(m.x2,m.y2),u.getLineD(m),c.push(m.x2,m.y2),this.pathData=c,this}});S.exports=h},48682:(S,k,a)=>{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY;c.isFilled&&(b(d,c),d.fillRect(-p,-v,c.width,c.height)),c.isStroked&&(T(d,c),d.beginPath(),d.rect(-p,-v,c.width,c.height),d.stroke()),d.restore()}}},87959:(S,k,a)=>{var b=a(39429),T=a(74561);b.register("rectangle",function(g,f,h,c,u,m){return this.displayList.add(new T(this.scene,g,f,h,c,u,m))})},95597:(S,k,a)=>{var T,g;a(29747),T=a(52059),g=a(48682),S.exports={renderWebGL:T,renderCanvas:g}},52059:(S,k,a)=>{var b=a(91296),T=a(34682),g=a(70554);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=b(c,u,m);d.calcMatrix.copyFrom(p.calc);var v=c._displayOriginX,x=c._displayOriginY,y=u.alpha*c.alpha;if(h.pipelines.preBatch(c),c.isFilled){var _=d.fillTint,E=g.getTintAppendFloatAlpha(c.fillColor,c.fillAlpha*y);_.TL=E,_.TR=E,_.BL=E,_.BR=E,d.batchFillRect(-v,-x,c.width,c.height)}c.isStroked&&T(d,c,y,v,x),h.pipelines.postBatch(c)}},55911:(S,k,a)=>{var b=a(81991),T=a(83419),g=a(94811),f=a(17803),h=new T({Extends:f,Mixins:[b],initialize:function(u,m,d,p,v,x,y,_){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=5),void 0===v&&(v=32),void 0===x&&(x=64),f.call(this,u,"Star",null),this._points=p,this._innerRadius=v,this._outerRadius=x,this.setPosition(m,d),this.setSize(2*x,2*x),void 0!==y&&this.setFillStyle(y,_),this.updateDisplayOrigin(),this.updateData()},setPoints:function(c){return this._points=c,this.updateData()},setInnerRadius:function(c){return this._innerRadius=c,this.updateData()},setOuterRadius:function(c){return this._outerRadius=c,this.updateData()},points:{get:function(){return this._points},set:function(c){this._points=c,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(c){this._innerRadius=c,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(c){this._outerRadius=c,this.updateData()}},updateData:function(){var c=[],u=this._points,m=this._innerRadius,d=this._outerRadius,p=Math.PI/2*3,v=Math.PI/u,x=d,y=d;c.push(x,y+-d);for(var _=0;_{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.pathData,y=x.length-1,_=x[0]-p,E=x[1]-v;d.beginPath(),d.moveTo(_,E),c.closePath||(y-=2);for(var A=2;A{var b=a(55911);a(39429).register("star",function(g,f,h,c,u,m,d){return this.displayList.add(new b(this.scene,g,f,h,c,u,m,d))})},81991:(S,k,a)=>{var T,g;a(29747),T=a(57017),g=a(64272),S.exports={renderWebGL:T,renderCanvas:g}},57017:(S,k,a)=>{var b=a(10441),T=a(91296),g=a(34682);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=T(c,u,m),v=d.calcMatrix.copyFrom(p.calc),x=c._displayOriginX,y=c._displayOriginY,_=u.alpha*c.alpha;h.pipelines.preBatch(c),c.isFilled&&b(d,v,c,_,x,y),c.isStroked&&g(d,c,_,x,y),h.pipelines.postBatch(c)}},36931:(S,k,a)=>{var b=a(83419),T=a(17803),g=a(16483),f=a(96195),h=new b({Extends:T,Mixins:[f],initialize:function(u,m,d,p,v,x,y,_,E,A,D){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=128),void 0===x&&(x=64),void 0===y&&(y=0),void 0===_&&(_=128),void 0===E&&(E=128),T.call(this,u,"Triangle",new g(p,v,x,y,_,E));var I=this.geom.right-this.geom.left,R=this.geom.bottom-this.geom.top;this.setPosition(m,d),this.setSize(I,R),void 0!==A&&this.setFillStyle(A,D),this.updateDisplayOrigin(),this.updateData()},setTo:function(c,u,m,d,p,v){return this.geom.setTo(c,u,m,d,p,v),this.updateData()},updateData:function(){var c=[],u=this.geom,m=this._tempLine;return u.getLineA(m),c.push(m.x1,m.y1,m.x2,m.y2),u.getLineB(m),c.push(m.x2,m.y2),u.getLineC(m),c.push(m.x2,m.y2),this.pathData=c,this}});S.exports=h},85172:(S,k,a)=>{var b=a(65960),T=a(75177),g=a(20926);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.currentContext;if(g(h,d,c,u,m)){var p=c._displayOriginX,v=c._displayOriginY,x=c.geom.x1-p,y=c.geom.y1-v,_=c.geom.x2-p,E=c.geom.y2-v,A=c.geom.x3-p,D=c.geom.y3-v;d.beginPath(),d.moveTo(x,y),d.lineTo(_,E),d.lineTo(A,D),d.closePath(),c.isFilled&&(b(d,c),d.fill()),c.isStroked&&(T(d,c),d.stroke()),d.restore()}}},45245:(S,k,a)=>{var b=a(39429),T=a(36931);b.register("triangle",function(g,f,h,c,u,m,d,p,v,x){return this.displayList.add(new T(this.scene,g,f,h,c,u,m,d,p,v,x))})},96195:(S,k,a)=>{var T,g;a(29747),T=a(83253),g=a(85172),S.exports={renderWebGL:T,renderCanvas:g}},83253:(S,k,a)=>{var b=a(91296),T=a(34682),g=a(70554);S.exports=function(h,c,u,m){u.addToRenderList(c);var d=h.pipelines.set(c.pipeline),p=b(c,u,m);d.calcMatrix.copyFrom(p.calc);var v=c._displayOriginX,x=c._displayOriginY,y=u.alpha*c.alpha;if(h.pipelines.preBatch(c),c.isFilled){var _=d.fillTint,E=g.getTintAppendFloatAlpha(c.fillColor,c.fillAlpha*y);_.TL=E,_.TR=E,_.BL=E,_.BR=E,d.batchFillTriangle(c.geom.x1-v,c.geom.y1-x,c.geom.x2-v,c.geom.y2-x,c.geom.x3-v,c.geom.y3-x,p.sprite,p.camera)}c.isStroked&&T(d,c,y,v,x),h.pipelines.postBatch(c)}},68287:(S,k,a)=>{var b=a(9674),T=a(83419),g=a(31401),f=a(95643),h=a(92751),c=new T({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Size,g.TextureCrop,g.Tint,g.Transform,g.Visible,h],initialize:function(m,d,p,v,x){f.call(this,m,"Sprite"),this._crop=this.resetCropObject(),this.anims=new b(this),this.setTexture(v,x),this.setPosition(d,p),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(u,m){this.anims.update(u,m)},play:function(u,m){return this.anims.play(u,m)},playReverse:function(u,m){return this.anims.playReverse(u,m)},playAfterDelay:function(u,m){return this.anims.playAfterDelay(u,m)},playAfterRepeat:function(u,m){return this.anims.playAfterRepeat(u,m)},chain:function(u){return this.anims.chain(u)},stop:function(){return this.anims.stop()},stopAfterDelay:function(u){return this.anims.stopAfterDelay(u)},stopAfterRepeat:function(u){return this.anims.stopAfterRepeat(u)},stopOnFrame:function(u){return this.anims.stopOnFrame(u)},toJSON:function(){return g.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});S.exports=c},76552:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),a.batchSprite(b,b.frame,T,g)}},15567:(S,k,a)=>{var b=a(25305),T=a(13059),g=a(44603),f=a(23568),h=a(68287);g.register("sprite",function(c,u){void 0===c&&(c={});var m=f(c,"key",null),d=f(c,"frame",null),p=new h(this.scene,0,0,m,d);return void 0!==u&&(c.add=u),b(this.scene,p,c),T(p,c),p})},46409:(S,k,a)=>{var b=a(39429),T=a(68287);b.register("sprite",function(g,f,h,c){return this.displayList.add(new T(this.scene,g,f,h,c))})},92751:(S,k,a)=>{var T,g;a(29747),T=a(9409),g=a(76552),S.exports={renderWebGL:T,renderCanvas:g}},9409:S=>{S.exports=function(a,b,T,g){T.addToRenderList(b),b.pipeline.batchSprite(b,T,g)}},14220:S=>{S.exports=function(a,b,T){var f=a.context,h=a.style,c=[],u=0,m=T.length;h.maxLines>0&&h.maxLines1&&(v+=d*(x.length-1))}h.wordWrap&&(v-=f.measureText(" ").width),c[p]=Math.ceil(v),u=Math.max(u,c[p])}var _=b.fontSize+h.strokeThickness,E=_*m,A=a.lineSpacing;return m>1&&(E+=A*(m-1)),{width:u,height:E,lines:m,lineWidths:c,lineSpacing:A,lineHeight:_}}},79557:(S,k,a)=>{var b=a(27919);S.exports=function(g){var f=b.create(this),h=f.getContext("2d",{willReadFrequently:!0});g.syncFont(f,h);var c=h.measureText(g.testString);if("actualBoundingBoxAscent"in c){var u=c.actualBoundingBoxAscent,m=c.actualBoundingBoxDescent;return b.remove(f),{ascent:u,descent:m,fontSize:u+m}}var d=Math.ceil(c.width*g.baselineX),p=d,v=2*p;p=p*g.baselineY|0,f.width=d,f.height=v,h.fillStyle="#f00",h.fillRect(0,0,d,v),h.font=g._font,h.textBaseline="alphabetic",h.fillStyle="#000",h.fillText(g.testString,0,p);var x={ascent:0,descent:0,fontSize:0},y=h.getImageData(0,0,d,v);if(!y)return x.ascent=p,x.descent=p+6,x.fontSize=x.ascent+x.descent,b.remove(f),x;var D,I,_=y.data,E=_.length,A=4*d,R=0,F=!1;for(D=0;Dp;D--){for(I=0;I{var b=a(40366),T=a(27919),g=a(83419),f=a(31401),h=a(95643),c=a(14220),u=a(35154),m=a(35846),d=a(61771),p=a(35762),v=a(45650),x=new g({Extends:h,Mixins:[f.Alpha,f.BlendMode,f.ComputedSize,f.Crop,f.Depth,f.Flip,f.GetBounds,f.Mask,f.Origin,f.Pipeline,f.PostPipeline,f.ScrollFactor,f.Tint,f.Transform,f.Visible,d],initialize:function(_,E,A,D,I){void 0===E&&(E=0),void 0===A&&(A=0),h.call(this,_,"Text"),this.renderer=_.sys.renderer,this.setPosition(E,A),this.setOrigin(0,0),this.initPipeline(),this.initPostPipeline(!0),this.canvas=T.create(this),this.style=new p(this,I),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.letterSpacing=0,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this._textureKey=v(),this.texture=_.sys.textures.addCanvas(this._textureKey,this.canvas),this.context=this.texture.context,this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(D),I&&I.padding&&this.setPadding(I.padding),I&&I.lineSpacing&&this.setLineSpacing(I.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",b(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(y){var _=this.style;if(_.wordWrapCallback){var E=_.wordWrapCallback.call(_.wordWrapCallbackScope,y,this);return Array.isArray(E)&&(E=E.join("\n")),E}return _.wordWrapWidth?_.wordWrapUseAdvanced?this.advancedWordWrap(y,this.context,this.style.wordWrapWidth):this.basicWordWrap(y,this.context,this.style.wordWrapWidth):y},advancedWordWrap:function(y,_,E){for(var A="",D=y.replace(/ +/gi," ").split(this.splitRegExp),I=D.length,R=0;RB){if(0===Q){for(var at=K;at.length&&(at=at.slice(0,-1),!((q=_.measureText(at).width)<=B)););if(!at.length)throw new Error("wordWrapWidth < a single character");var ot=G.substr(at.length);H[Q]=ot,N+=at}var it=H.slice(H[Q].length?Q:Q+1).join(" ").replace(/[ \n]*$/gi,"");D.splice(R+1,0,it),I=D.length;break}N+=K,B-=q}A+=N.replace(/[ \n]*$/gi,"")+"\n"}}return A.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(y,_,E){for(var A="",D=y.split(this.splitRegExp),I=D.length-1,R=_.measureText(" ").width,F=0;F<=I;F++){for(var N=E,V=D[F].split(" "),B=V.length-1,H=0;H<=B;H++){var Q=V[H],G=_.measureText(Q).width,K=G;HN&&H>0&&(A+="\n",N=E),A+=Q,H0&&(G+=F.lineSpacing*K),E.rtl)Q=B-Q-N.left-N.right;else if("right"===E.align)Q+=V-F.lineWidths[K];else if("center"===E.align)Q+=(V-F.lineWidths[K])/2;else if("justify"===E.align&&F.lineWidths[K]/F.width>=.85){for(var at=F.width-F.lineWidths[K],ot=_.measureText(" ").width,J=R[K].trim(),it=J.split(" "),Y=Math.floor((at+=(R[K].length-J.length)*ot)/ot),j=0;Y>0;)it[j]+=" ",j=(j+1)%(it.length-1||1),--Y;R[K]=it.join(" ")}this.autoRound&&(Q=Math.round(Q),G=Math.round(G));var nt=this.letterSpacing;if(E.strokeThickness&&0===nt&&(E.syncShadow(_,E.shadowStroke),_.strokeText(R[K],Q,G)),E.color)if(E.syncShadow(_,E.shadowFill),0!==nt)for(var ht=0,gt=R[K].split(""),wt=0;wt{S.exports=function(a,b,T,g){0===b.width||0===b.height||(T.addToRenderList(b),a.batchSprite(b,b.frame,T,g))}},71259:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(50171);T.register("text",function(h,c){void 0===h&&(h={});var u=g(h,"text",""),m=g(h,"style",null),d=g(h,"padding",null);null!==d&&(m.padding=d);var p=new f(this.scene,0,0,u,m);return void 0!==c&&(h.add=c),b(this.scene,p,h),p.autoRound=g(h,"autoRound",!0),p.resolution=g(h,"resolution",1),p})},68005:(S,k,a)=>{var b=a(50171);a(39429).register("text",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},61771:(S,k,a)=>{var T,g;a(29747),T=a(34397),g=a(79724),S.exports={renderWebGL:T,renderCanvas:g}},35762:(S,k,a)=>{var b=a(83419),T=a(23568),g=a(35154),f=a(79557),h={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|M\xc3\u2030qgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},c=new b({initialize:function(m,d){this.parent=m,this.setStyle(d,!1,!0)},setStyle:function(u,m,d){for(var p in void 0===m&&(m=!0),void 0===d&&(d=!1),h){var v=d?h[p][1]:this[p];this[p]="wordWrapCallback"===p||"wordWrapCallbackScope"===p?g(u,h[p][0],v):u&&"fontSize"===p&&"number"==typeof u.fontSize?u.fontSize.toString()+"px":T(u,h[p][0],v)}var x=g(u,"font",null);null!==x&&this.setFont(x,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var y=g(u,"fill",null);null!==y&&(this.color=y);var _=g(u,"metrics",!1);return _?this.metrics={ascent:g(_,"ascent",0),descent:g(_,"descent",0),fontSize:g(_,"fontSize",0)}:(m||!this.metrics)&&(this.metrics=f(this)),m?this.parent.updateText():this.parent},syncFont:function(u,m){m.font=this._font},syncStyle:function(u,m){m.textBaseline="alphabetic",m.fillStyle=this.color,m.strokeStyle=this.stroke,m.lineWidth=this.strokeThickness,m.lineCap="round",m.lineJoin="round"},syncShadow:function(u,m){m?(u.shadowOffsetX=this.shadowOffsetX,u.shadowOffsetY=this.shadowOffsetY,u.shadowColor=this.shadowColor,u.shadowBlur=this.shadowBlur):(u.shadowOffsetX=0,u.shadowOffsetY=0,u.shadowColor=0,u.shadowBlur=0)},update:function(u){return u&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=f(this)),this.parent.updateText()},setFont:function(u,m){void 0===m&&(m=!0);var d=u,p="",v="";if("string"!=typeof u)d=g(u,"fontFamily","Courier"),p=g(u,"fontSize","16px"),v=g(u,"fontStyle","");else{var x=u.split(" "),y=0;v=x.length>2?x[y++]:"",p=x[y++]||"16px",d=x[y++]||"Courier"}return(d!==this.fontFamily||p!==this.fontSize||v!==this.fontStyle)&&(this.fontFamily=d,this.fontSize=p,this.fontStyle=v,m&&this.update(!0)),this.parent},setFontFamily:function(u){return this.fontFamily!==u&&(this.fontFamily=u,this.update(!0)),this.parent},setFontStyle:function(u){return this.fontStyle!==u&&(this.fontStyle=u,this.update(!0)),this.parent},setFontSize:function(u){return"number"==typeof u&&(u=u.toString()+"px"),this.fontSize!==u&&(this.fontSize=u,this.update(!0)),this.parent},setTestString:function(u){return this.testString=u,this.update(!0)},setFixedSize:function(u,m){return this.fixedWidth=u,this.fixedHeight=m,u&&(this.parent.width=u),m&&(this.parent.height=m),this.update(!1)},setBackgroundColor:function(u){return this.backgroundColor=u,this.update(!1)},setFill:function(u){return this.color=u,this.update(!1)},setColor:function(u){return this.color=u,this.update(!1)},setResolution:function(u){return this.resolution=u,this.update(!1)},setStroke:function(u,m){return void 0===m&&(m=this.strokeThickness),void 0===u&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):(this.stroke!==u||this.strokeThickness!==m)&&(this.stroke=u,this.strokeThickness=m,this.update(!0)),this.parent},setShadow:function(u,m,d,p,v,x){return void 0===u&&(u=0),void 0===m&&(m=0),void 0===d&&(d="#000"),void 0===p&&(p=0),void 0===v&&(v=!1),void 0===x&&(x=!0),this.shadowOffsetX=u,this.shadowOffsetY=m,this.shadowColor=d,this.shadowBlur=p,this.shadowStroke=v,this.shadowFill=x,this.update(!1)},setShadowOffset:function(u,m){return void 0===u&&(u=0),void 0===m&&(m=u),this.shadowOffsetX=u,this.shadowOffsetY=m,this.update(!1)},setShadowColor:function(u){return void 0===u&&(u="#000"),this.shadowColor=u,this.update(!1)},setShadowBlur:function(u){return void 0===u&&(u=0),this.shadowBlur=u,this.update(!1)},setShadowStroke:function(u){return this.shadowStroke=u,this.update(!1)},setShadowFill:function(u){return this.shadowFill=u,this.update(!1)},setWordWrapWidth:function(u,m){return void 0===m&&(m=!1),this.wordWrapWidth=u,this.wordWrapUseAdvanced=m,this.update(!1)},setWordWrapCallback:function(u,m){return void 0===m&&(m=null),this.wordWrapCallback=u,this.wordWrapCallbackScope=m,this.update(!1)},setAlign:function(u){return void 0===u&&(u="left"),this.align=u,this.update(!1)},setMaxLines:function(u){return void 0===u&&(u=0),this.maxLines=u,this.update(!1)},getTextMetrics:function(){var u=this.metrics;return{ascent:u.ascent,descent:u.descent,fontSize:u.fontSize}},toJSON:function(){var u={};for(var m in h)u[m]=this[m];return u.metrics=this.getTextMetrics(),u},destroy:function(){this.parent=void 0}});S.exports=c},34397:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c){if(0!==f.width&&0!==f.height){h.addToRenderList(f);var u=f.frame,m=u.width,d=u.height,p=b.getTintAppendFloatAlpha,v=g.pipelines.set(f.pipeline,f),x=v.setTexture2D(u.glTexture,f);v.batchTexture(f,u.glTexture,m,d,f.x,f.y,m/f.style.resolution,d/f.style.resolution,f.scaleX,f.scaleY,f.rotation,f.flipX,f.flipY,f.scrollFactorX,f.scrollFactorY,f.displayOriginX,f.displayOriginY,0,0,m,d,p(f.tintTopLeft,h.alpha*f._alphaTL),p(f.tintTopRight,h.alpha*f._alphaTR),p(f.tintBottomLeft,h.alpha*f._alphaBL),p(f.tintBottomRight,h.alpha*f._alphaBR),f.tintFill,0,0,h,c,!1,x)}}},20839:(S,k,a)=>{var b=a(27919),T=a(83419),g=a(31401),f=a(95643),h=a(98439),c=a(68703),u=a(56295),m=a(45650),d=a(26099),v=new T({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Crop,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.Tint,g.Transform,g.Visible,u],initialize:function(y,_,E,A,D,I,R){var F=y.sys.renderer;f.call(this,y,"TileSprite");var N=y.sys.textures.get(I),V=N.get(R);V.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed texture"),V=(N=y.sys.textures.get("__MISSING")).get()),"DynamicTexture"===N.type&&(console.warn("TileSprite cannot use Dynamic Texture"),V=(N=y.sys.textures.get("__MISSING")).get()),A&&D?(A=Math.floor(A),D=Math.floor(D)):(A=A||V.width,D=D||V.height),this._tilePosition=new d,this._tileScale=new d(1,1),this.dirty=!1,this.renderer=F,this.canvas=b.create(this,A,D),this.context=this.canvas.getContext("2d",{willReadFrequently:!1}),this.displayTexture=N,this.displayFrame=V,this._crop=this.resetCropObject(),this._textureKey=m(),this.texture=y.sys.textures.addCanvas(this._textureKey,this.canvas),this.frame=this.texture.get(),this.potWidth=h(V.width),this.potHeight=h(V.height),this.fillCanvas=b.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d",{willReadFrequently:!1}),this.fillPattern=null,this.setPosition(_,E),this.setSize(A,D),this.setFrame(R),this.setOriginFromFrame(),this.initPipeline(),this.initPostPipeline(!0)},setTexture:function(x,y){return this.displayTexture=this.scene.sys.textures.get(x),this.setFrame(y)},setFrame:function(x){var y=this.displayTexture.get(x);return this.potWidth=h(y.width),this.potHeight=h(y.height),this.canvas.width=0,y.cutWidth&&y.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=y,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(x,y){return void 0!==x&&(this.tilePositionX=x),void 0!==y&&(this.tilePositionY=y),this},setTileScale:function(x,y){return void 0===x&&(x=this.tileScaleX),void 0===y&&(y=x),this.tileScaleX=x,this.tileScaleY=y,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var x=this.displayFrame;if(x.source.isRenderTexture||x.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var y=this.fillContext,_=this.fillCanvas,E=this.potWidth,A=this.potHeight;(!this.renderer||!this.renderer.gl)&&(E=x.cutWidth,A=x.cutHeight),y.clearRect(0,0,E,A),_.width=E,_.height=A,y.drawImage(x.source.image,x.cutX,x.cutY,x.cutWidth,x.cutHeight,0,0,E,A),this.fillPattern=this.renderer&&this.renderer.gl?this.renderer.canvasToTexture(_,this.fillPattern):y.createPattern(_,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var x=this.canvas;if((x.width!==this.width||x.height!==this.height)&&(x.width=this.width,x.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var y=this.context;this.scene.sys.game.config.antialias||c.disable(y);var _=this._tileScale.x,E=this._tileScale.y,A=this._tilePosition.x,D=this._tilePosition.y;y.clearRect(0,0,this.width,this.height),y.save(),y.scale(_,E),y.translate(-A,-D),y.fillStyle=this.fillPattern,y.fillRect(A,D,this.width/_,this.height/E),y.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),b.remove(this.canvas),b.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null;var x=this.texture;x&&x.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(x){this._tilePosition.x=x,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(x){this._tilePosition.y=x,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(x){this._tileScale.x=x,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(x){this._tileScale.y=x,this.dirty=!0}}});S.exports=v},46992:S=>{S.exports=function(a,b,T,g){b.updateCanvas(),T.addToRenderList(b),a.batchSprite(b,b.frame,T,g)}},14167:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(20839);T.register("tileSprite",function(h,c){void 0===h&&(h={});var u=g(h,"x",0),m=g(h,"y",0),d=g(h,"width",512),p=g(h,"height",512),v=g(h,"key",""),x=g(h,"frame",""),y=new f(this.scene,u,m,d,p,v,x);return void 0!==c&&(h.add=c),b(this.scene,y,h),y})},91681:(S,k,a)=>{var b=a(20839);a(39429).register("tileSprite",function(g,f,h,c,u,m){return this.displayList.add(new b(this.scene,g,f,h,c,u,m))})},56295:(S,k,a)=>{var T,g;a(29747),T=a(18553),g=a(46992),S.exports={renderWebGL:T,renderCanvas:g}},18553:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h,c){f.updateCanvas();var u=f.width,m=f.height;if(0!==u&&0!==m){h.addToRenderList(f);var d=b.getTintAppendFloatAlpha,p=g.pipelines.set(f.pipeline,f),v=p.setTexture2D(f.fillPattern,f);p.batchTexture(f,f.fillPattern,f.displayFrame.width*f.tileScaleX,f.displayFrame.height*f.tileScaleY,f.x,f.y,u,m,f.scaleX,f.scaleY,f.rotation,f.flipX,f.flipY,f.scrollFactorX,f.scrollFactorY,f.originX*u,f.originY*m,0,0,u,m,d(f.tintTopLeft,h.alpha*f._alphaTL),d(f.tintTopRight,h.alpha*f._alphaTR),d(f.tintBottomLeft,h.alpha*f._alphaBL),d(f.tintBottomRight,h.alpha*f._alphaBR),f.tintFill,f.tilePositionX%f.displayFrame.width/f.displayFrame.width,f.tilePositionY%f.displayFrame.height/f.displayFrame.height,h,c,!1,v)}}},18471:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(31401),f=a(51708),h=a(8443),c=a(95643),u=a(36383),m=a(14463),d=a(45650),p=a(10247),v=new T({Extends:c,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.ScrollFactor,g.TextureCrop,g.Tint,g.Transform,g.Visible,p],initialize:function(y,_,E,A){c.call(this,y,"Video"),this.flipY=!1,this._key=d(),this.touchLocked=!1,this.playWhenUnlocked=!1,this.frameReady=!1,this.isStalled=!1,this.failedPlayAttempts=0,this.retry=0,this.retryInterval=500,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={ended:this.completeHandler.bind(this),legacy:this.legacyPlayHandler.bind(this),playing:this.playingHandler.bind(this),seeked:this.seekedHandler.bind(this),seeking:this.seekingHandler.bind(this),stalled:this.stalledHandler.bind(this),suspend:this.stalledHandler.bind(this),waiting:this.stalledHandler.bind(this)},this._loadCallbackHandler=this.loadErrorHandler.bind(this),this._metadataCallbackHandler=this.metadataHandler.bind(this),this._crop=this.resetCropObject(),this.markers={},this._markerIn=0,this._markerOut=0,this._playingMarker=!1,this._lastUpdate=0,this.cacheKey="",this.isSeeking=!1,this._playCalled=!1,this._getFrame=!1,this._rfvCallbackId=0;var D=y.sys.game;this._device=D.device.video,this.setPosition(_,E),this.setSize(256,256),this.initPipeline(),this.initPostPipeline(!0),D.events.on(h.PAUSE,this.globalPause,this),D.events.on(h.RESUME,this.globalResume,this);var I=y.sys.sound;I&&I.on(m.GLOBAL_MUTE,this.globalMute,this),A&&this.load(A)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},load:function(x){var y=this.scene.sys.cache.video.get(x);return y?(this.cacheKey=x,this.loadHandler(y.url,y.noAudio,y.crossOrigin)):console.warn("No video in cache for key: "+x),this},changeSource:function(x,y,_,E,A){void 0===y&&(y=!0),void 0===_&&(_=!1),this.cacheKey!==x&&(this.load(x),y&&this.play(_,E,A))},getVideoKey:function(){return this.cacheKey},loadURL:function(x,y,_){void 0===y&&(y=!1);var E=this._device.getVideoURL(x);return E?(this.cacheKey="",this.loadHandler(E.url,y,_)):console.warn("No supported video format found for "+x),this},loadMediaStream:function(x,y,_){return this.loadHandler(null,y,_,x)},loadHandler:function(x,y,_,E){y||(y=!1);var A=this.video;if(A?(this.removeLoadEventHandlers(),this.stop()):((A=document.createElement("video")).controls=!1,A.setAttribute("playsinline","playsinline"),A.setAttribute("preload","auto"),A.setAttribute("disablePictureInPicture","true")),y?(A.muted=!0,A.defaultMuted=!0,A.setAttribute("autoplay","autoplay")):(A.muted=!1,A.defaultMuted=!1,A.removeAttribute("autoplay")),_?A.setAttribute("crossorigin",_):A.removeAttribute("crossorigin"),E)if("srcObject"in A)try{A.srcObject=E}catch(I){if("TypeError"!==I.name)throw I;A.src=URL.createObjectURL(E)}else A.src=URL.createObjectURL(E);else A.src=x;this.retry=0,this.video=A,this._playCalled=!1,A.load(),this.addLoadEventHandlers();var D=this.scene.sys.textures.get(this._key);return this.setTexture(D),this},requestVideoFrame:function(x,y){var _=this.video;if(_){var E=y.width,A=y.height,D=this.videoTexture,I=this.videoTextureSource,R=!D||I.source!==_;R?(this._codePaused=_.paused,this._codeMuted=_.muted,D?(I.source=_,I.width=E,I.height=A,D.get().setSize(E,A)):((D=this.scene.sys.textures.create(this._key,_,E,A)).add("__BASE",0,0,0,E,A),this.setTexture(D),this.videoTexture=D,this.videoTextureSource=D.source[0],this.videoTextureSource.setFlipY(this.flipY),this.emit(f.VIDEO_TEXTURE,this,D)),this.setSizeToFrame(),this.updateDisplayOrigin()):I.update(),this.isStalled=!1,this.metadata=y;var F=y.mediaTime;R&&(this._lastUpdate=F,this.emit(f.VIDEO_CREATED,this,E,A),this.frameReady||(this.frameReady=!0,this.emit(f.VIDEO_PLAY,this))),this._playingMarker?F>=this._markerOut&&(_.loop?(_.currentTime=this._markerIn,this.emit(f.VIDEO_LOOP,this)):(this.stop(!1),this.emit(f.VIDEO_COMPLETE,this))):F-1&&_>y&&_=0&&!isNaN(_)&&_>y&&(this.markers[x]=[y,_]),this},playMarker:function(x,y){var _=this.markers[x];return _&&this.play(y,_[0],_[1]),this},removeMarker:function(x){return delete this.markers[x],this},snapshot:function(x,y){return void 0===x&&(x=this.width),void 0===y&&(y=this.height),this.snapshotArea(0,0,this.width,this.height,x,y)},snapshotArea:function(x,y,_,E,A,D){void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=this.width),void 0===E&&(E=this.height),void 0===A&&(A=_),void 0===D&&(D=E);var I=this.video,R=this.snapshotTexture;return R?(R.setSize(A,D),I&&R.context.drawImage(I,x,y,_,E,0,0,A,D)):(R=this.scene.sys.textures.createCanvas(d(),A,D),this.snapshotTexture=R,I&&R.context.drawImage(I,x,y,_,E,0,0,A,D)),R.update()},saveSnapshotTexture:function(x){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,x):this.snapshotTexture=this.scene.sys.textures.createCanvas(x,this.width,this.height),this.snapshotTexture},playSuccess:function(){if(this._playCalled){this.addEventHandlers(),this._codePaused=!1,this.touchLocked&&(this.touchLocked=!1,this.emit(f.VIDEO_UNLOCKED,this));var x=this.scene.sys.sound;x&&x.mute&&this.setMute(!0),this._markerIn>-1&&(this.video.currentTime=this._markerIn)}},playError:function(x){var y=x.name;"NotAllowedError"===y?(this.touchLocked=!0,this.playWhenUnlocked=!0,this.failedPlayAttempts=1,this.emit(f.VIDEO_LOCKED,this)):"NotSupportedError"===y?(this.stop(!1),this.emit(f.VIDEO_UNSUPPORTED,this,x)):(this.stop(!1),this.emit(f.VIDEO_ERROR,this,x))},legacyPlayHandler:function(){var x=this.video;x&&(this.playSuccess(),x.removeEventListener("playing",this._callbacks.legacy))},playingHandler:function(){this.isStalled=!1,this.emit(f.VIDEO_PLAYING,this)},loadErrorHandler:function(x){this.stop(!1),this.emit(f.VIDEO_ERROR,this,x)},metadataHandler:function(x){this.emit(f.VIDEO_METADATA,this,x)},setSizeToFrame:function(x){x||(x=this.frame),this.width=x.realWidth,this.height=x.realHeight,1!==this.scaleX&&(this.scaleX=this.displayWidth/this.width),1!==this.scaleY&&(this.scaleY=this.displayHeight/this.height);var y=this.input;return y&&!y.customHitArea&&(y.hitArea.width=this.width,y.hitArea.height=this.height),this},stalledHandler:function(x){this.isStalled=!0,this.emit(f.VIDEO_STALLED,this,x)},completeHandler:function(){this._playCalled=!1,this.emit(f.VIDEO_COMPLETE,this)},preUpdate:function(x,y){!this.video||!this._playCalled||this.touchLocked&&this.playWhenUnlocked&&(this.retry+=y,this.retry>=this.retryInterval&&(this.createPlayPromise(!1),this.retry=0))},seekTo:function(x){var y=this.video;if(y){var _=y.duration;_===1/0||isNaN(_)||this.setCurrentTime(_*x)}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(x){var y=this.video;if(y){if("string"==typeof x){var _=x[0],E=parseFloat(x.substr(1));"+"===_?x=y.currentTime+E:"-"===_&&(x=y.currentTime-E)}y.currentTime=x}return this},seekingHandler:function(){this.isSeeking=!0,this.emit(f.VIDEO_SEEKING,this)},seekedHandler:function(){this.isSeeking=!1,this.emit(f.VIDEO_SEEKED,this)},getProgress:function(){var x=this.video;if(x){var y=x.duration;if(y!==1/0&&!isNaN(y))return x.currentTime/y}return-1},getDuration:function(){return this.video?this.video.duration:0},setMute:function(x){void 0===x&&(x=!0),this._codeMuted=x;var y=this.video;return y&&(y.muted=!!this._systemMuted||x),this},isMuted:function(){return this._codeMuted},globalMute:function(x,y){this._systemMuted=y;var _=this.video;_&&(_.muted=!!this._codeMuted||y)},globalPause:function(){this._systemPaused=!0,this.video&&!this.video.ended&&(this.removeEventHandlers(),this.video.pause())},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&!this.video.ended&&this.createPlayPromise()},setPaused:function(x){void 0===x&&(x=!0);var y=this.video;return this._codePaused=x,y&&!y.ended&&(x?y.paused||(this.removeEventHandlers(),y.pause()):x||(this._playCalled?y.paused&&!this._systemPaused&&this.createPlayPromise():this.play())),this},pause:function(){return this.setPaused(!0)},resume:function(){return this.setPaused(!1)},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(x){return void 0===x&&(x=1),this.video&&(this.video.volume=b(x,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(x){return this.video&&(this.video.playbackRate=x),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(x){return void 0===x&&(x=!0),this.video&&(this.video.loop=x),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this._playCalled&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(x,y){return void 0===y&&(y=!1),this.videoTexture&&(this.scene.sys.textures.renameTexture(this._key,x),this.videoTextureSource.setFlipY(y)),this._key=x,this.flipY=y,!!this.videoTexture},stop:function(x){void 0===x&&(x=!0);var y=this.video;return y&&(this.removeEventHandlers(),y.cancelVideoFrameCallback(this._rfvCallbackId),y.pause()),this.retry=0,this._playCalled=!1,x&&this.emit(f.VIDEO_STOP,this),this},removeVideoElement:function(){var x=this.video;if(x){for(x.parentNode&&x.parentNode.removeChild(x);x.hasChildNodes();)x.removeChild(x.firstChild);x.removeAttribute("autoplay"),x.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(!1),this.removeLoadEventHandlers(),this.removeVideoElement();var x=this.scene.sys.game.events;x.off(h.PAUSE,this.globalPause,this),x.off(h.RESUME,this.globalResume,this);var y=this.scene.sys.sound;y&&y.off(m.GLOBAL_MUTE,this.globalMute,this)}});S.exports=v},58352:S=>{S.exports=function(a,b,T,g){b.videoTexture&&(T.addToRenderList(b),a.batchSprite(b,b.frame,T,g))}},11511:(S,k,a)=>{var b=a(25305),T=a(44603),g=a(23568),f=a(18471);T.register("video",function(h,c){void 0===h&&(h={});var u=g(h,"key",null),m=new f(this.scene,0,0,u);return void 0!==c&&(h.add=c),b(this.scene,m,h),m})},89025:(S,k,a)=>{var b=a(18471);a(39429).register("video",function(g,f,h){return this.displayList.add(new b(this.scene,g,f,h))})},10247:(S,k,a)=>{var T,g;a(29747),T=a(29849),g=a(58352),S.exports={renderWebGL:T,renderCanvas:g}},29849:S=>{S.exports=function(a,b,T,g){b.videoTexture&&(T.addToRenderList(b),b.pipeline.batchSprite(b,T,g))}},41481:(S,k,a)=>{var b=a(10312),T=a(96503),g=a(87902),f=a(83419),h=a(31401),c=a(95643),u=a(87841),m=a(37303),d=new f({Extends:c,Mixins:[h.Depth,h.GetBounds,h.Origin,h.Transform,h.ScrollFactor,h.Visible],initialize:function(v,x,y,_,E){void 0===_&&(_=1),void 0===E&&(E=_),c.call(this,v,"Zone"),this.setPosition(x,y),this.width=_,this.height=E,this.blendMode=b.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(p){this.scaleX=p/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(p){this.scaleY=p/this.height}},setSize:function(p,v,x){void 0===x&&(x=!0),this.width=p,this.height=v,this.updateDisplayOrigin();var y=this.input;return x&&y&&!y.customHitArea&&(y.hitArea.width=p,y.hitArea.height=v),this},setDisplaySize:function(p,v){return this.displayWidth=p,this.displayHeight=v,this},setCircleDropZone:function(p){return this.setDropZone(new T(0,0,p),g)},setRectangleDropZone:function(p,v){return this.setDropZone(new u(0,0,p,v),m)},setDropZone:function(p,v){return this.input||this.setInteractive(p,v,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(p,v,x){x.addToRenderList(v)},renderWebGL:function(p,v,x){x.addToRenderList(v)}});S.exports=d},95261:(S,k,a)=>{var b=a(44603),T=a(23568),g=a(41481);b.register("zone",function(f){var h=T(f,"x",0),c=T(f,"y",0),u=T(f,"width",1),m=T(f,"height",u);return new g(this.scene,h,c,u,m)})},84175:(S,k,a)=>{var b=a(41481);a(39429).register("zone",function(g,f,h,c){return this.displayList.add(new b(this.scene,g,f,h,c))})},95166:S=>{S.exports=function(a){return a.radius>0?Math.PI*a.radius*a.radius:0}},96503:(S,k,a)=>{var b=a(83419),T=a(87902),g=a(26241),f=a(79124),h=a(23777),c=a(28176),u=new b({initialize:function(d,p,v){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),this.type=h.CIRCLE,this.x=d,this.y=p,this._radius=v,this._diameter=2*v},contains:function(m,d){return T(this,m,d)},getPoint:function(m,d){return g(this,m,d)},getPoints:function(m,d,p){return f(this,m,d,p)},getRandomPoint:function(m){return c(this,m)},setTo:function(m,d,p){return this.x=m,this.y=d,this._radius=p,this._diameter=2*p,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(m,d){return void 0===d&&(d=m),this.x=m,this.y=d,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(m){this._radius=m,this._diameter=2*m}},diameter:{get:function(){return this._diameter},set:function(m){this._diameter=m,this._radius=.5*m}},left:{get:function(){return this.x-this._radius},set:function(m){this.x=m+this._radius}},right:{get:function(){return this.x+this._radius},set:function(m){this.x=m-this._radius}},top:{get:function(){return this.y-this._radius},set:function(m){this.y=m+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(m){this.y=m-this._radius}}});S.exports=u},71562:S=>{S.exports=function(a){return Math.PI*a.radius*2}},92110:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){return void 0===h&&(h=new b),h.x=g.x+g.radius*Math.cos(f),h.y=g.y+g.radius*Math.sin(f),h}},42250:(S,k,a)=>{var b=a(96503);S.exports=function(g){return new b(g.x,g.y,g.radius)}},87902:S=>{S.exports=function(a,b,T){return a.radius>0&&b>=a.left&&b<=a.right&&T>=a.top&&T<=a.bottom&&(a.x-b)*(a.x-b)+(a.y-T)*(a.y-T)<=a.radius*a.radius}},5698:(S,k,a)=>{var b=a(87902);S.exports=function(g,f){return b(g,f.x,f.y)}},70588:(S,k,a)=>{var b=a(87902);S.exports=function(g,f){return b(g,f.x,f.y)&&b(g,f.right,f.y)&&b(g,f.x,f.bottom)&&b(g,f.right,f.bottom)}},26394:S=>{S.exports=function(a,b){return b.setTo(a.x,a.y,a.radius)}},76278:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y&&a.radius===b.radius}},2074:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.left,f.y=g.top,f.width=g.diameter,f.height=g.diameter,f}},26241:(S,k,a)=>{var b=a(92110),T=a(62945),g=a(36383),f=a(2141);S.exports=function(c,u,m){void 0===m&&(m=new f);var d=T(u,0,g.PI2);return b(c,d,m)}},79124:(S,k,a)=>{var b=a(71562),T=a(92110),g=a(62945),f=a(36383);S.exports=function(c,u,m,d){void 0===d&&(d=[]),!u&&m>0&&(u=b(c)/m);for(var p=0;p{S.exports=function(a,b,T){return a.x+=b,a.y+=T,a}},39212:S=>{S.exports=function(a,b){return a.x+=b.x,a.y+=b.y,a}},28176:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=2*Math.PI*Math.random(),c=Math.random()+Math.random(),u=c>1?2-c:c,m=u*Math.cos(h),d=u*Math.sin(h);return f.x=g.x+m*g.radius,f.y=g.y+d*g.radius,f}},88911:(S,k,a)=>{var b=a(96503);b.Area=a(95166),b.Circumference=a(71562),b.CircumferencePoint=a(92110),b.Clone=a(42250),b.Contains=a(87902),b.ContainsPoint=a(5698),b.ContainsRect=a(70588),b.CopyFrom=a(26394),b.Equals=a(76278),b.GetBounds=a(2074),b.GetPoint=a(26241),b.GetPoints=a(79124),b.Offset=a(50884),b.OffsetPoint=a(39212),b.Random=a(28176),S.exports=b},23777:S=>{S.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},78874:S=>{S.exports=function(a){return a.isEmpty()?0:a.getMajorRadius()*a.getMinorRadius()*Math.PI}},92990:S=>{S.exports=function(a){var b=a.width/2,T=a.height/2,g=Math.pow(b-T,2)/Math.pow(b+T,2);return Math.PI*(b+T)*(1+3*g/(10+Math.sqrt(4-3*g)))}},79522:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){void 0===h&&(h=new b);var u=g.height/2;return h.x=g.x+g.width/2*Math.cos(f),h.y=g.y+u*Math.sin(f),h}},58102:(S,k,a)=>{var b=a(8497);S.exports=function(g){return new b(g.x,g.y,g.width,g.height)}},81154:S=>{S.exports=function(a,b,T){if(a.width<=0||a.height<=0)return!1;var g=(b-a.x)/a.width,f=(T-a.y)/a.height;return(g*=g)+(f*=f)<.25}},46662:(S,k,a)=>{var b=a(81154);S.exports=function(g,f){return b(g,f.x,f.y)}},1632:(S,k,a)=>{var b=a(81154);S.exports=function(g,f){return b(g,f.x,f.y)&&b(g,f.right,f.y)&&b(g,f.x,f.bottom)&&b(g,f.right,f.bottom)}},65534:S=>{S.exports=function(a,b){return b.setTo(a.x,a.y,a.width,a.height)}},8497:(S,k,a)=>{var b=a(83419),T=a(81154),g=a(90549),f=a(48320),h=a(23777),c=a(24820),u=new b({initialize:function(d,p,v,x){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),this.type=h.ELLIPSE,this.x=d,this.y=p,this.width=v,this.height=x},contains:function(m,d){return T(this,m,d)},getPoint:function(m,d){return g(this,m,d)},getPoints:function(m,d,p){return f(this,m,d,p)},getRandomPoint:function(m){return c(this,m)},setTo:function(m,d,p,v){return this.x=m,this.y=d,this.width=p,this.height=v,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(m,d){return void 0===d&&(d=m),this.x=m,this.y=d,this},setSize:function(m,d){return void 0===d&&(d=m),this.width=m,this.height=d,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(m){this.x=m+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(m){this.x=m-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(m){this.y=m+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(m){this.y=m-this.height/2}}});S.exports=u},36146:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}},23694:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.left,f.y=g.top,f.width=g.width,f.height=g.height,f}},90549:(S,k,a)=>{var b=a(79522),T=a(62945),g=a(36383),f=a(2141);S.exports=function(c,u,m){void 0===m&&(m=new f);var d=T(u,0,g.PI2);return b(c,d,m)}},48320:(S,k,a)=>{var b=a(92990),T=a(79522),g=a(62945),f=a(36383);S.exports=function(c,u,m,d){void 0===d&&(d=[]),!u&&m>0&&(u=b(c)/m);for(var p=0;p{S.exports=function(a,b,T){return a.x+=b,a.y+=T,a}},44808:S=>{S.exports=function(a,b){return a.x+=b.x,a.y+=b.y,a}},24820:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=Math.random()*Math.PI*2,c=Math.sqrt(Math.random());return f.x=g.x+c*Math.cos(h)*g.width/2,f.y=g.y+c*Math.sin(h)*g.height/2,f}},49203:(S,k,a)=>{var b=a(8497);b.Area=a(78874),b.Circumference=a(92990),b.CircumferencePoint=a(79522),b.Clone=a(58102),b.Contains=a(81154),b.ContainsPoint=a(46662),b.ContainsRect=a(1632),b.CopyFrom=a(65534),b.Equals=a(36146),b.GetBounds=a(23694),b.GetPoint=a(90549),b.GetPoints=a(48320),b.Offset=a(73424),b.OffsetPoint=a(44808),b.Random=a(24820),S.exports=b},55738:(S,k,a)=>{var b=a(23777),T=a(79291),g={Circle:a(88911),Ellipse:a(49203),Intersects:a(91865),Line:a(2529),Mesh:a(73090),Point:a(43711),Polygon:a(58423),Rectangle:a(93232),Triangle:a(84435)};g=T(!1,g,b),S.exports=g},2044:(S,k,a)=>{var b=a(20339);S.exports=function(g,f){return b(g.x,g.y,f.x,f.y)<=g.radius+f.radius}},81491:S=>{S.exports=function(a,b){var T=b.width/2,g=b.height/2,f=Math.abs(a.x-b.x-T),h=Math.abs(a.y-b.y-g);if(f>T+a.radius||h>g+a.radius)return!1;if(f<=T||h<=g)return!0;var m=f-T,d=h-g;return m*m+d*d<=a.radius*a.radius}},63376:(S,k,a)=>{var b=a(2141),T=a(2044);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var y,_,A,D,u=f.x,m=f.y,d=f.radius,p=h.x,v=h.y,x=h.radius;if(m===v)0==(A=(_=-2*v)*_-4*(y=1)*(p*p+(D=(x*x-d*d-p*p+u*u)/(2*(u-p)))*D-2*p*D+v*v-x*x))?c.push(new b(D,-_/(2*y))):A>0&&(c.push(new b(D,(-_+Math.sqrt(A))/(2*y))),c.push(new b(D,(-_-Math.sqrt(A))/(2*y))));else{var I=(u-p)/(m-v),R=(x*x-d*d-p*p+u*u-v*v+m*m)/(2*(m-v));0==(A=(_=2*m*I-2*R*I-2*u)*_-4*(y=I*I+1)*(u*u+m*m+R*R-d*d-2*m*R))?c.push(new b(D=-_/(2*y),R-D*I)):A>0&&(D=(-_+Math.sqrt(A))/(2*y),c.push(new b(D,R-D*I)),D=(-_-Math.sqrt(A))/(2*y),c.push(new b(D,R-D*I)))}}return c}},97439:(S,k,a)=>{var b=a(4042),T=a(81491);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var u=h.getLineA(),m=h.getLineB(),d=h.getLineC(),p=h.getLineD();b(u,f,c),b(m,f,c),b(d,f,c),b(p,f,c)}return c}},4042:(S,k,a)=>{var b=a(2141),T=a(80462);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var V,B,u=f.x1,m=f.y1,y=h.radius,_=f.x2-u,E=f.y2-m,A=u-h.x,D=m-h.y,I=_*_+E*E,R=2*(_*A+E*D),N=R*R-4*I*(A*A+D*D-y*y);if(0===N){var H=-R/(2*I);V=u+H*_,B=m+H*E,H>=0&&H<=1&&c.push(new b(V,B))}else if(N>0){var Q=(-R-Math.sqrt(N))/(2*I);V=u+Q*_,B=m+Q*E,Q>=0&&Q<=1&&c.push(new b(V,B));var G=(-R+Math.sqrt(N))/(2*I);V=u+G*_,B=m+G*E,G>=0&&G<=1&&c.push(new b(V,B))}}return c}},36100:(S,k,a)=>{var b=a(25836);S.exports=function(g,f,h,c){void 0===h&&(h=!1);var F,N,V,u=g.x1,m=g.y1,v=f.x1,x=f.y1,E=g.x2-u,A=g.y2-m,D=f.x2-v,I=f.y2-x,R=E*I-A*D;if(0===R)return null;if(h){if(F=(E*(x-m)+A*(u-v))/(D*A-I*E),0!==E)N=(v+D*F-u)/E;else{if(0===A)return null;N=(x+I*F-m)/A}if(N<0||F<0||F>1)return null;V=N}else{if(N=((m-x)*E-(u-v)*A)/R,(F=((v-u)*I-(x-m)*D)/R)<0||F>1||N<0||N>1)return null;V=F}return void 0===c&&(c=new b),c.set(u+E*V,m+A*V,V)}},3073:(S,k,a)=>{var b=a(36100),T=a(23031),g=a(25836),f=new T,h=new g;S.exports=function(u,m,d,p){void 0===d&&(d=!1),void 0===p&&(p=new g);var v=!1;p.set(),h.set();for(var x=m[m.length-1],y=0;y{var b=a(25836),T=a(61369),g=a(3073),f=new b;S.exports=function(c,u,m,d){void 0===d&&(d=new T),Array.isArray(u)||(u=[u]);var p=!1;d.set(),f.set();for(var v=0;v{var b=a(2141),T=a(76112),g=a(92773);S.exports=function(h,c,u){if(void 0===u&&(u=[]),g(h,c))for(var m=c.getLineA(),d=c.getLineB(),p=c.getLineC(),v=c.getLineD(),x=[new b,new b,new b,new b],y=[T(m,h,x[0]),T(d,h,x[1]),T(p,h,x[2]),T(v,h,x[3])],_=0;_<4;_++)y[_]&&u.push(x[_]);return u}},71147:(S,k,a)=>{var b=a(61369),T=a(56362),f=new(a(23031));function h(m,d,p,v,x){var y=Math.cos(m),_=Math.sin(m);f.setTo(d,p,d+y,p+_);var E=T(f,v,!0);E&&x.push(new b(E.x,E.y,m,E.w))}function c(m,d){return m.z-d.z}S.exports=function(m,d,p){Array.isArray(p)||(p=[p]);for(var v=[],x=[],y=0;y{var b=a(87841),T=a(59996);S.exports=function(f,h,c){return void 0===c&&(c=new b),T(f,h)&&(c.x=Math.max(f.x,h.x),c.y=Math.max(f.y,h.y),c.width=Math.min(f.right,h.right)-c.x,c.height=Math.min(f.bottom,h.bottom)-c.y),c}},52784:(S,k,a)=>{var b=a(60646),T=a(59996);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var u=f.getLineA(),m=f.getLineB(),d=f.getLineC(),p=f.getLineD();b(u,h,c),b(m,h,c),b(d,h,c),b(p,h,c)}return c}},26341:(S,k,a)=>{var b=a(89265),T=a(60646);S.exports=function(f,h,c){if(void 0===c&&(c=[]),b(f,h)){var u=h.getLineA(),m=h.getLineB(),d=h.getLineC();T(u,f,c),T(m,f,c),T(d,f,c)}return c}},38720:(S,k,a)=>{var b=a(4042),T=a(67636);S.exports=function(f,h,c){if(void 0===c&&(c=[]),T(f,h)){var u=f.getLineA(),m=f.getLineB(),d=f.getLineC();b(u,h,c),b(m,h,c),b(d,h,c)}return c}},13882:(S,k,a)=>{var b=a(2141),T=a(2822),g=a(76112);S.exports=function(h,c,u){if(void 0===u&&(u=[]),T(h,c))for(var m=h.getLineA(),d=h.getLineB(),p=h.getLineC(),v=[new b,new b,new b],x=[g(m,c,v[0]),g(d,c,v[1]),g(p,c,v[2])],y=0;y<3;y++)x[y]&&u.push(v[y]);return u}},75636:(S,k,a)=>{var b=a(82944),T=a(13882);S.exports=function(f,h,c){if(void 0===c&&(c=[]),b(f,h)){var u=h.getLineA(),m=h.getLineB(),d=h.getLineC();T(f,u,c),T(f,m,c),T(f,d,c)}return c}},80462:(S,k,a)=>{var b=a(87902),g=new(a(2141));S.exports=function(h,c,u){if(void 0===u&&(u=g),b(c,h.x1,h.y1))return u.x=h.x1,u.y=h.y1,!0;if(b(c,h.x2,h.y2))return u.x=h.x2,u.y=h.y2,!0;var m=h.x2-h.x1,d=h.y2-h.y1,x=m*m+d*d,y=m,_=d;if(x>0){var E=((c.x-h.x1)*m+(c.y-h.y1)*d)/x;y*=E,_*=E}return u.x=h.x1+y,u.y=h.y1+_,y*y+_*_<=x&&y*m+_*d>=0&&b(c,u.x,u.y)}},76112:S=>{S.exports=function(a,b,T){var g=a.x1,f=a.y1,h=a.x2,c=a.y2,u=b.x1,m=b.y1,d=b.x2,p=b.y2;if(g===h&&f===c||u===d&&m===p)return!1;var v=(p-m)*(h-g)-(d-u)*(c-f);if(0===v)return!1;var x=((d-u)*(f-m)-(p-m)*(g-u))/v,y=((h-g)*(f-m)-(c-f)*(g-u))/v;return!(x<0||x>1||y<0||y>1||(T&&(T.x=g+x*(h-g),T.y=f+x*(c-f)),0))}},92773:S=>{S.exports=function(a,b){var T=a.x1,g=a.y1,f=a.x2,h=a.y2,c=b.x,u=b.y,m=b.right,d=b.bottom,p=0;if(T>=c&&T<=m&&g>=u&&g<=d||f>=c&&f<=m&&h>=u&&h<=d)return!0;if(T=c){if((p=g+(h-g)*(c-T)/(f-T))>u&&p<=d)return!0}else if(T>m&&f<=m&&(p=g+(h-g)*(m-T)/(f-T))>=u&&p<=d)return!0;if(g=u){if((p=T+(f-T)*(u-g)/(h-g))>=c&&p<=m)return!0}else if(g>d&&h<=d&&(p=T+(f-T)*(d-g)/(h-g))>=c&&p<=m)return!0;return!1}},16204:S=>{S.exports=function(a,b,T){void 0===T&&(T=1);var g=b.x1,f=b.y1,h=b.x2,c=b.y2,u=a.x,m=a.y,d=(h-g)*(h-g)+(c-f)*(c-f);if(0===d)return!1;var p=((u-g)*(h-g)+(m-f)*(c-f))/d;return p<0?Math.sqrt((g-u)*(g-u)+(f-m)*(f-m))<=T:p>=0&&p<=1?Math.abs(((f-m)*(h-g)-(g-u)*(c-f))/d)*Math.sqrt(d)<=T:Math.sqrt((h-u)*(h-u)+(c-m)*(c-m))<=T}},14199:(S,k,a)=>{var b=a(16204);S.exports=function(g,f){if(!b(g,f))return!1;var h=Math.min(f.x1,f.x2),c=Math.max(f.x1,f.x2),u=Math.min(f.y1,f.y2),m=Math.max(f.y1,f.y2);return g.x>=h&&g.x<=c&&g.y>=u&&g.y<=m}},59996:S=>{S.exports=function(a,b){return!(a.width<=0||a.height<=0||b.width<=0||b.height<=0||a.rightb.right||a.y>b.bottom)}},89265:(S,k,a)=>{var b=a(76112),T=a(37303),g=a(48653),f=a(77493);S.exports=function(c,u){if(u.left>c.right||u.rightc.bottom||u.bottom0}},84411:S=>{S.exports=function(a,b,T,g,f,h){return void 0===h&&(h=0),!(b>a.right+h||Ta.bottom+h||f{var b=a(80462),T=a(10690);S.exports=function(f,h){return!(f.left>h.right||f.righth.bottom||f.bottom{var b=a(76112);S.exports=function(g,f){return!!(g.contains(f.x1,f.y1)||g.contains(f.x2,f.y2)||b(g.getLineA(),f)||b(g.getLineB(),f)||b(g.getLineC(),f))}},82944:(S,k,a)=>{var b=a(48653),T=a(71694),g=a(76112);S.exports=function(h,c){if(h.left>c.right||h.rightc.bottom||h.bottom0||(y=T(c),(_=b(h,y,!0)).length>0)}},91865:(S,k,a)=>{S.exports={CircleToCircle:a(2044),CircleToRectangle:a(81491),GetCircleToCircle:a(63376),GetCircleToRectangle:a(97439),GetLineToCircle:a(4042),GetLineToLine:a(36100),GetLineToPoints:a(3073),GetLineToPolygon:a(56362),GetLineToRectangle:a(60646),GetRaysFromPointToPolygon:a(71147),GetRectangleIntersection:a(68389),GetRectangleToRectangle:a(52784),GetRectangleToTriangle:a(26341),GetTriangleToCircle:a(38720),GetTriangleToLine:a(13882),GetTriangleToTriangle:a(75636),LineToCircle:a(80462),LineToLine:a(76112),LineToRectangle:a(92773),PointToLine:a(16204),PointToLineSegment:a(14199),RectangleToRectangle:a(59996),RectangleToTriangle:a(89265),RectangleToValues:a(84411),TriangleToCircle:a(67636),TriangleToLine:a(2822),TriangleToTriangle:a(82944)}},91938:S=>{S.exports=function(a){return Math.atan2(a.y2-a.y1,a.x2-a.x1)}},84993:S=>{S.exports=function(a,b,T){void 0===b&&(b=1),void 0===T&&(T=[]);var g=Math.round(a.x1),f=Math.round(a.y1),h=Math.round(a.x2),c=Math.round(a.y2),u=Math.abs(h-g),m=Math.abs(c-f),d=g-m&&(v-=m,g+=d),y{S.exports=function(a,b,T){var g=b-(a.x1+a.x2)/2,f=T-(a.y1+a.y2)/2;return a.x1+=g,a.y1+=f,a.x2+=g,a.y2+=f,a}},31116:(S,k,a)=>{var b=a(23031);S.exports=function(g){return new b(g.x1,g.y1,g.x2,g.y2)}},59944:S=>{S.exports=function(a,b){return b.setTo(a.x1,a.y1,a.x2,a.y2)}},59220:S=>{S.exports=function(a,b){return a.x1===b.x1&&a.y1===b.y1&&a.x2===b.x2&&a.y2===b.y2}},78177:(S,k,a)=>{var b=a(35001);S.exports=function(g,f,h){void 0===h&&(h=f);var c=b(g),u=g.x2-g.x1,m=g.y2-g.y1;return f&&(g.x1=g.x1-u/c*f,g.y1=g.y1-m/c*f),h&&(g.x2=g.x2+u/c*h,g.y2=g.y2+m/c*h),g}},26708:(S,k,a)=>{var b=a(52816),T=a(6113),g=a(2141);S.exports=function(h,c,u,m,d){void 0===m&&(m=0),void 0===d&&(d=[]);var A,D,p=[],v=h.x1,x=h.y1,y=h.x2-v,_=h.y2-x,E=T(c,d),I=u-1;for(A=0;A0){var R=p[0],F=[R];for(A=1;A=m&&(F.push(N),R=N)}var V=p[p.length-1];return b(R,V){var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=(g.x1+g.x2)/2,f.y=(g.y1+g.y2)/2,f}},99569:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){void 0===h&&(h=new b);var c=g.x1,u=g.y1,m=g.x2,d=g.y2,p=(m-c)*(m-c)+(d-u)*(d-u);if(0===p)return h;var v=((f.x-c)*(m-c)+(f.y-u)*(d-u))/p;return h.x=c+v*(m-c),h.y=u+v*(d-u),h}},34638:(S,k,a)=>{var b=a(36383),T=a(91938),g=a(2141);S.exports=function(h,c){void 0===c&&(c=new g);var u=T(h)-b.TAU;return c.x=Math.cos(u),c.y=Math.sin(u),c}},13151:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){return void 0===h&&(h=new b),h.x=g.x1+(g.x2-g.x1)*f,h.y=g.y1+(g.y2-g.y1)*f,h}},15258:(S,k,a)=>{var b=a(35001),T=a(2141);S.exports=function(f,h,c,u){void 0===u&&(u=[]),!h&&c>0&&(h=b(f)/c);for(var m=f.x1,d=f.y1,p=f.x2,v=f.y2,x=0;x{S.exports=function(a,b){var T=a.x1,g=a.y1,f=a.x2,h=a.y2,c=(f-T)*(f-T)+(h-g)*(h-g);return 0!==c&&Math.abs(((g-b.y)*(f-T)-(T-b.x)*(h-g))/c)*Math.sqrt(c)}},98770:S=>{S.exports=function(a){return Math.abs(a.y1-a.y2)}},35001:S=>{S.exports=function(a){return Math.sqrt((a.x2-a.x1)*(a.x2-a.x1)+(a.y2-a.y1)*(a.y2-a.y1))}},23031:(S,k,a)=>{var b=a(83419),T=a(13151),g=a(15258),f=a(23777),h=a(65822),c=a(26099),u=new b({initialize:function(d,p,v,x){void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),this.type=f.LINE,this.x1=d,this.y1=p,this.x2=v,this.y2=x},getPoint:function(m,d){return T(this,m,d)},getPoints:function(m,d,p){return g(this,m,d,p)},getRandomPoint:function(m){return h(this,m)},setTo:function(m,d,p,v){return void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),this.x1=m,this.y1=d,this.x2=p,this.y2=v,this},setFromObjects:function(m,d){return this.x1=m.x,this.y1=m.y,this.x2=d.x,this.y2=d.y,this},getPointA:function(m){return void 0===m&&(m=new c),m.set(this.x1,this.y1),m},getPointB:function(m){return void 0===m&&(m=new c),m.set(this.x2,this.y2),m},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(m){this.x1<=this.x2?this.x1=m:this.x2=m}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(m){this.x1>this.x2?this.x1=m:this.x2=m}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(m){this.y1<=this.y2?this.y1=m:this.y2=m}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(m){this.y1>this.y2?this.y1=m:this.y2=m}}});S.exports=u},64795:(S,k,a)=>{var b=a(36383),T=a(15994),g=a(91938);S.exports=function(h){var c=g(h)-b.TAU;return T(c,-Math.PI,Math.PI)}},52616:(S,k,a)=>{var b=a(36383),T=a(91938);S.exports=function(f){return Math.cos(T(f)-b.TAU)}},87231:(S,k,a)=>{var b=a(36383),T=a(91938);S.exports=function(f){return Math.sin(T(f)-b.TAU)}},89662:S=>{S.exports=function(a,b,T){return a.x1+=b,a.y1+=T,a.x2+=b,a.y2+=T,a}},71165:S=>{S.exports=function(a){return-(a.x2-a.x1)/(a.y2-a.y1)}},65822:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=Math.random();return f.x=g.x1+h*(g.x2-g.x1),f.y=g.y1+h*(g.y2-g.y1),f}},69777:(S,k,a)=>{var b=a(91938),T=a(64795);S.exports=function(f,h){return 2*T(h)-Math.PI-b(f)}},39706:(S,k,a)=>{var b=a(64400);S.exports=function(g,f){return b(g,(g.x1+g.x2)/2,(g.y1+g.y2)/2,f)}},82585:(S,k,a)=>{var b=a(64400);S.exports=function(g,f,h){return b(g,f.x,f.y,h)}},64400:S=>{S.exports=function(a,b,T,g){var f=Math.cos(g),h=Math.sin(g),c=a.x1-b,u=a.y1-T;return a.x1=c*f-u*h+b,a.y1=c*h+u*f+T,a.x2=(c=a.x2-b)*f-(u=a.y2-T)*h+b,a.y2=c*h+u*f+T,a}},62377:S=>{S.exports=function(a,b,T,g,f){return a.x1=b,a.y1=T,a.x2=b+Math.cos(g)*f,a.y2=T+Math.sin(g)*f,a}},71366:S=>{S.exports=function(a){return(a.y2-a.y1)/(a.x2-a.x1)}},10809:S=>{S.exports=function(a){return Math.abs(a.x1-a.x2)}},2529:(S,k,a)=>{var b=a(23031);b.Angle=a(91938),b.BresenhamPoints=a(84993),b.CenterOn=a(36469),b.Clone=a(31116),b.CopyFrom=a(59944),b.Equals=a(59220),b.Extend=a(78177),b.GetEasedPoints=a(26708),b.GetMidPoint=a(32125),b.GetNearestPoint=a(99569),b.GetNormal=a(34638),b.GetPoint=a(13151),b.GetPoints=a(15258),b.GetShortestDistance=a(26408),b.Height=a(98770),b.Length=a(35001),b.NormalAngle=a(64795),b.NormalX=a(52616),b.NormalY=a(87231),b.Offset=a(89662),b.PerpSlope=a(71165),b.Random=a(65822),b.ReflectAngle=a(69777),b.Rotate=a(39706),b.RotateAroundPoint=a(82585),b.RotateAroundXY=a(64400),b.SetToAngle=a(62377),b.Slope=a(71366),b.Width=a(10809),S.exports=b},83997:(S,k,a)=>{var b=a(83419),T=a(87841),g=a(26099);function f(c,u,m,d){var p=c-m,v=u-d;return Math.sqrt(p*p+v*v)}var h=new b({initialize:function(u,m,d){this.vertex1=u,this.vertex2=m,this.vertex3=d,this.bounds=new T,this._inCenter=new g},getInCenter:function(c){void 0===c&&(c=!0);var p,v,x,y,_,E,u=this.vertex1,m=this.vertex2,d=this.vertex3;c?(p=u.x,v=u.y,x=m.x,y=m.y,_=d.x,E=d.y):(p=u.vx,v=u.vy,x=m.vx,y=m.vy,_=d.vx,E=d.vy);var A=f(_,E,x,y),D=f(p,v,_,E),I=f(x,y,p,v),R=A+D+I;return this._inCenter.set((p*A+x*D+_*I)/R,(v*A+y*D+E*I)/R)},contains:function(c,u,m){var d=this.vertex1,p=this.vertex2,v=this.vertex3,x=d.vx,y=d.vy,_=p.vx,E=p.vy,A=v.vx,D=v.vy;if(m){var I=m.a,R=m.b,F=m.c,N=m.d,V=m.e,B=m.f;x=d.vx*I+d.vy*F+V,y=d.vx*R+d.vy*N+B,_=p.vx*I+p.vy*F+V,E=p.vx*R+p.vy*N+B,A=v.vx*I+v.vy*F+V,D=v.vx*R+v.vy*N+B}var H=A-x,Q=D-y,G=_-x,K=E-y,q=c-x,at=u-y,ot=H*H+Q*Q,J=H*G+Q*K,it=H*q+Q*at,Y=G*G+K*K,j=G*q+K*at,nt=ot*Y-J*J,ht=0===nt?0:1/nt,gt=(Y*it-J*j)*ht,wt=(ot*j-J*it)*ht;return gt>=0&&wt>=0&>+wt<1},isCounterClockwise:function(c){var u=this.vertex1,m=this.vertex2,d=this.vertex3,p=(m.vx-u.vx)*(d.vy-u.vy)-(m.vy-u.vy)*(d.vx-u.vx);return c<=0?p>=0:p<0},load:function(c,u,m,d,p){return m=this.vertex1.load(c,u,m,d,p),m=this.vertex2.load(c,u,m,d,p),this.vertex3.load(c,u,m,d,p)},transformCoordinatesLocal:function(c,u,m,d){return this.vertex1.transformCoordinatesLocal(c,u,m,d),this.vertex2.transformCoordinatesLocal(c,u,m,d),this.vertex3.transformCoordinatesLocal(c,u,m,d),this},updateBounds:function(){var c=this.vertex1,u=this.vertex2,m=this.vertex3,d=this.bounds;return d.x=Math.min(c.vx,u.vx,m.vx),d.y=Math.min(c.vy,u.vy,m.vy),d.width=Math.max(c.vx,u.vx,m.vx)-d.x,d.height=Math.max(c.vy,u.vy,m.vy)-d.y,this},isInView:function(c,u,m,d,p,v,x,y,_,E,A){this.update(d,p,v,x,y,_,E,A);var D=this.vertex1,I=this.vertex2,R=this.vertex3;if(D.ta<=0&&I.ta<=0&&R.ta<=0||u&&!this.isCounterClockwise(m))return!1;var F=this.bounds;return F.x=Math.min(D.tx,I.tx,R.tx),F.y=Math.min(D.ty,I.ty,R.ty),F.width=Math.max(D.tx,I.tx,R.tx)-F.x,F.height=Math.max(D.ty,I.ty,R.ty)-F.y,!(F.width<=0||F.height<=0||c.width<=0||c.height<=0||F.rightc.x+c.width||F.y>c.y+c.height)},scrollUV:function(c,u){return this.vertex1.scrollUV(c,u),this.vertex2.scrollUV(c,u),this.vertex3.scrollUV(c,u),this},scaleUV:function(c,u){return this.vertex1.scaleUV(c,u),this.vertex2.scaleUV(c,u),this.vertex3.scaleUV(c,u),this},setColor:function(c){return this.vertex1.color=c,this.vertex2.color=c,this.vertex3.color=c,this},update:function(c,u,m,d,p,v,x,y){return this.vertex1.update(u,m,d,p,v,x,y,c),this.vertex2.update(u,m,d,p,v,x,y,c),this.vertex3.update(u,m,d,p,v,x,y,c),this},translate:function(c,u){void 0===u&&(u=0);var m=this.vertex1,d=this.vertex2,p=this.vertex3;return m.x+=c,m.y+=u,d.x+=c,d.y+=u,p.x+=c,p.y+=u,this},x:{get:function(){return this.getInCenter().x},set:function(c){var u=this.getInCenter();this.translate(c-u.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(c){var u=this.getInCenter();this.translate(0,c-u.y)}},alpha:{get:function(){return(this.vertex1.alpha+this.vertex2.alpha+this.vertex3.alpha)/3},set:function(c){this.vertex1.alpha=c,this.vertex2.alpha=c,this.vertex3.alpha=c}},depth:{get:function(){return(this.vertex1.vz+this.vertex2.vz+this.vertex3.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});S.exports=h},48803:(S,k,a)=>{var b=a(83997),T=a(95540),g=a(37867),f=a(25836),h=a(39318),c=new f,u=new f,m=new g;S.exports=function(p){var it,v=T(p,"mesh"),x=T(p,"texture",null),y=T(p,"frame"),_=T(p,"width",1),E=T(p,"height",_),A=T(p,"widthSegments",1),D=T(p,"heightSegments",A),I=T(p,"x",0),R=T(p,"y",0),F=T(p,"z",0),N=T(p,"rotateX",0),V=T(p,"rotateY",0),B=T(p,"rotateZ",0),H=T(p,"zIsUp",!0),Q=T(p,"isOrtho",!!v&&v.dirtyCache[11]),G=T(p,"colors",[16777215]),K=T(p,"alphas",[1]),q=T(p,"tile",!1),at=T(p,"flipY",!1),ot=T(p,"width",null),J={faces:[],verts:[]};if(c.set(I,R,F),u.set(N,V,B),m.fromRotationXYTranslation(u,c,H),!x&&v)x=v.texture,y||(it=v.frame);else if(v&&"string"==typeof x)x=v.scene.sys.textures.get(x);else if(!x)return J;it||(it=x.get(y)),!ot&&Q&&x&&v&&(_=it.width/v.height,E=it.height/v.height);var qt,ne,Y=_/2,j=E/2,nt=Math.floor(A),ht=Math.floor(D),gt=nt+1,wt=ht+1,St=_/nt,Bt=E/ht,Yt=[],$t=[],le=0,Me=1,pi=0,Ie=1;it&&(le=it.u0,Me=it.u1,at?(pi=it.v1,Ie=it.v0):(pi=it.v0,Ie=it.v1));var _i=Me-le,be=Ie-pi;for(ne=0;ne{var b=a(83997),T=a(37867),g=a(25836),f=a(39318),h=new g,c=new g,u=new T;S.exports=function(d,p,v,x,y,_,E,A,D,I){void 0===v&&(v=1),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=0),void 0===I&&(I=!0);var R={faces:[],verts:[]},F=d.materials;h.set(x,y,_),c.set(E,A,D),u.fromRotationXYTranslation(c,h,I);for(var N=0;N{var b=a(83997),T=a(39318);S.exports=function(f,h,c,u,m,d,p,v){if(void 0===u&&(u=!1),void 0===d&&(d=16777215),void 0===p&&(p=1),void 0===v&&(v=!1),f.length===h.length||u){var y,I,N,V,B,x={faces:[],vertices:[]},H=u?3:2,Q=Array.isArray(d),G=Array.isArray(p);if(Array.isArray(c)&&c.length>0)for(y=0;y{var k=!0,a="untitled",b="",T="";function g(_){var E=_.indexOf("#");return E>-1?_.substring(0,E):_}function f(_){return 0===_.models.length&&_.models.push({faces:[],name:a,textureCoords:[],vertexNormals:[],vertices:[]}),b="",_.models[_.models.length-1]}function h(_,E){E.models.push({faces:[],name:_.length>=2?_[1]:a,textureCoords:[],vertexNormals:[],vertices:[]}),b=""}function c(_){2===_.length&&(b=_[1])}function u(_,E){var A=_.length,D=A>=2?parseFloat(_[1]):0,I=A>=3?parseFloat(_[2]):0,R=A>=4?parseFloat(_[3]):0;f(E).vertices.push({x:D,y:I,z:R})}function m(_,E){var A=_.length,D=A>=2?parseFloat(_[1]):0,I=A>=3?parseFloat(_[2]):0,R=A>=4?parseFloat(_[3]):0;isNaN(D)&&(D=0),isNaN(I)&&(I=0),isNaN(R)&&(R=0),k&&(I=1-I),f(E).textureCoords.push({u:D,v:I,w:R})}function d(_,E){var A=_.length,D=A>=2?parseFloat(_[1]):0,I=A>=3?parseFloat(_[2]):0,R=A>=4?parseFloat(_[3]):0;f(E).vertexNormals.push({x:D,y:I,z:R})}function p(_,E){var A=_.length-1;if(!(A<3)){for(var D={group:b,material:T,vertices:[]},I=0;I3)){var V=0,B=0,H=0;V=parseInt(F[0],10),N>1&&""!==F[1]&&(B=parseInt(F[1],10)),N>2&&(H=parseInt(F[2],10)),0!==V&&(V<0&&(V=f(E).vertices.length+1+V),D.vertices.push({textureCoordsIndex:B-=1,vertexIndex:V-=1,vertexNormalIndex:H-=1}))}}f(E).faces.push(D)}}function v(_,E){_.length>=2&&E.materialLibraries.push(_[1])}function x(_){_.length>=2&&(T=_[1])}S.exports=function(_,E){void 0===E&&(E=!0),k=E;var A={materials:{},materialLibraries:[],models:[]};b="",T="";for(var D=_.split("\n"),I=0;I{var b=a(37589);S.exports=function(g){for(var f={},h=g.split("\n"),c="",u=0;u=2?Math.floor(255*d[2]):p,x=d.length>=3?Math.floor(255*d[3]):p;f[c]=b(p,v,x)}}}return f}},92570:S=>{S.exports=function(a,b,T,g){var f,h;if(void 0===T&&void 0===g){var c=a.getInCenter();f=c.x,h=c.y}var u=Math.cos(b),m=Math.sin(b),d=a.vertex1,p=a.vertex2,v=a.vertex3,x=d.x-f,y=d.y-h;d.set(x*u-y*m+f,x*m+y*u+h),p.set((x=p.x-f)*u-(y=p.y-h)*m+f,x*m+y*u+h),v.set((x=v.x-f)*u-(y=v.y-h)*m+f,x*m+y*u+h)}},39318:(S,k,a)=>{var b=a(83419),T=a(70554),g=a(25836),f=new b({Extends:g,initialize:function(c,u,m,d,p,v,x,y,_,E){void 0===v&&(v=16777215),void 0===x&&(x=1),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),g.call(this,c,u,m),this.vx=0,this.vy=0,this.vz=0,this.nx=y,this.ny=_,this.nz=E,this.u=d,this.v=p,this.color=v,this.alpha=x,this.tx=0,this.ty=0,this.ta=0,this.tu=d,this.tv=p},setUVs:function(h,c){return this.u=h,this.v=c,this.tu=h,this.tv=c,this},scrollUV:function(h,c){return this.tu+=h,this.tv+=c,this},scaleUV:function(h,c){return this.tu=this.u*h,this.tv=this.v*c,this},transformCoordinatesLocal:function(h,c,u,m){var d=this.x,p=this.y,v=this.z,x=h.val,_=d*x[1]+p*x[5]+v*x[9]+x[13],E=d*x[2]+p*x[6]+v*x[10]+x[14],A=d*x[3]+p*x[7]+v*x[11]+x[15];this.vx=(d*x[0]+p*x[4]+v*x[8]+x[12])/A*c,this.vy=-_/A*u,this.vz=m<=0?E/A:-E/A},resize:function(h,c,u,m,d,p){return this.x=h,this.y=c,this.vx=this.x*u,this.vy=-this.y*m,this.vz=0,d<.5?this.vx+=u*(.5-d):d>.5&&(this.vx-=u*(d-.5)),p<.5?this.vy+=m*(.5-p):p>.5&&(this.vy-=m*(p-.5)),this},update:function(h,c,u,m,d,p,v,x){var y=this.vx*h+this.vy*u+d,_=this.vx*c+this.vy*m+p;return v&&(y=Math.round(y),_=Math.round(_)),this.tx=y,this.ty=_,this.ta=this.alpha*x,this},load:function(h,c,u,m,d){return h[++u]=this.tx,h[++u]=this.ty,h[++u]=this.tu,h[++u]=this.tv,h[++u]=m,h[++u]=d,c[++u]=T.getTintAppendFloatAlpha(this.color,this.ta),u}});S.exports=f},73090:(S,k,a)=>{var b={Face:a(83997),GenerateGridVerts:a(48803),GenerateObjVerts:a(34684),GenerateVerts:a(92515),ParseObj:a(85048),ParseObjMaterial:a(61485),RotateFace:a(92570),Vertex:a(39318)};S.exports=b},96550:S=>{S.exports=function(a){return a.setTo(Math.ceil(a.x),Math.ceil(a.y))}},99706:(S,k,a)=>{var b=a(2141);S.exports=function(g){return new b(g.x,g.y)}},68010:S=>{S.exports=function(a,b){return b.setTo(a.x,a.y)}},27814:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y}},73565:S=>{S.exports=function(a){return a.setTo(Math.floor(a.x),Math.floor(a.y))}},87555:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){if(void 0===f&&(f=new b),!Array.isArray(g))throw new Error("GetCentroid points argument must be an array");var h=g.length;if(h<1)throw new Error("GetCentroid points array must not be empty");if(1===h)f.x=g[0].x,f.y=g[0].y;else{for(var c=0;c{S.exports=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)}},44405:S=>{S.exports=function(a){return a.x*a.x+a.y*a.y}},20873:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){void 0===f&&(f=new b);for(var h=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,m=Number.POSITIVE_INFINITY,d=0;dh&&(h=p.x),p.xu&&(u=p.y),p.y{var b=a(2141);S.exports=function(g,f,h,c){return void 0===h&&(h=0),void 0===c&&(c=new b),c.x=g.x+(f.x-g.x)*h,c.y=g.y+(f.y-g.y)*h,c}},55767:S=>{S.exports=function(a){return a.setTo(a.y,a.x)}},79432:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.setTo(-g.x,-g.y)}},2141:(S,k,a)=>{var b=a(83419),T=a(23777),g=new b({initialize:function(h,c){void 0===h&&(h=0),void 0===c&&(c=h),this.type=T.POINT,this.x=h,this.y=c},setTo:function(f,h){return void 0===f&&(f=0),void 0===h&&(h=f),this.x=f,this.y=h,this}});S.exports=g},72930:(S,k,a)=>{var b=a(2141),T=a(44405);S.exports=function(f,h,c){void 0===c&&(c=new b);var m=(f.x*h.x+f.y*h.y)/T(h);return 0!==m&&(c.x=m*h.x,c.y=m*h.y),c}},62880:(S,k,a)=>{var b=a(2141);S.exports=function(g,f,h){void 0===h&&(h=new b);var c=g.x*f.x+g.y*f.y;return 0!==c&&(h.x=c*f.x,h.y=c*f.y),h}},15093:(S,k,a)=>{var b=a(28793);S.exports=function(g,f){if(0!==g.x||0!==g.y){var h=b(g);g.x/=h,g.y/=h}return g.x*=f,g.y*=f,g}},43711:(S,k,a)=>{var b=a(2141);b.Ceil=a(96550),b.Clone=a(99706),b.CopyFrom=a(68010),b.Equals=a(27814),b.Floor=a(73565),b.GetCentroid=a(87555),b.GetMagnitude=a(28793),b.GetMagnitudeSq=a(44405),b.GetRectangleFromPoints=a(20873),b.Interpolate=a(26152),b.Invert=a(55767),b.Negative=a(79432),b.Project=a(72930),b.ProjectUnit=a(62880),b.SetMagnitude=a(15093),S.exports=b},12306:(S,k,a)=>{var b=a(25717);S.exports=function(g){return new b(g.points)}},63814:S=>{S.exports=function(a,b,T){for(var g=!1,f=-1,h=a.points.length-1;++f{var b=a(63814);S.exports=function(g,f){return b(g,f.x,f.y)}},94811:S=>{"use strict";function k(J,it,Y){Y=Y||2;var wt,St,Bt,Yt,$t,qt,ne,j=it&&it.length,nt=j?it[0]*Y:J.length,ht=a(J,0,nt,Y,!0),gt=[];if(!ht||ht.next===ht.prev)return gt;if(j&&(ht=function u(J,it,Y,j){var ht,gt,Bt,nt=[];for(ht=0,gt=it.length;ht80*Y){wt=Bt=J[0],St=Yt=J[1];for(var le=Y;leBt&&(Bt=$t),qt>Yt&&(Yt=qt);ne=0!==(ne=Math.max(Bt-wt,Yt-St))?32767/ne:0}return T(ht,gt,Y,wt,St,ne,0),gt}function a(J,it,Y,j,nt){var ht,gt;if(nt===ot(J,it,Y,j)>0)for(ht=it;ht=it;ht-=j)gt=K(ht,J[ht],J[ht+1],gt);return gt&&R(gt,gt.next)&&(q(gt),gt=gt.next),gt}function b(J,it){if(!J)return J;it||(it=J);var j,Y=J;do{if(j=!1,Y.steiner||!R(Y,Y.next)&&0!==I(Y.prev,Y,Y.next))Y=Y.next;else{if(q(Y),(Y=it=Y.prev)===Y.next)break;j=!0}}while(j||Y!==it);return it}function T(J,it,Y,j,nt,ht,gt){if(J){!gt&&ht&&function x(J,it,Y,j){var nt=J;do{0===nt.z&&(nt.z=_(nt.x,nt.y,it,Y,j)),nt.prevZ=nt.prev,nt.nextZ=nt.next,nt=nt.next}while(nt!==J);nt.prevZ.nextZ=null,nt.prevZ=null,function y(J){var it,Y,j,nt,ht,gt,wt,St,Bt=1;do{for(Y=J,J=null,ht=null,gt=0;Y;){for(gt++,j=Y,wt=0,it=0;it0||St>0&&j;)0!==wt&&(0===St||!j||Y.z<=j.z)?(nt=Y,Y=Y.nextZ,wt--):(nt=j,j=j.nextZ,St--),ht?ht.nextZ=nt:J=nt,nt.prevZ=ht,ht=nt;Y=j}ht.nextZ=null,Bt*=2}while(gt>1)}(nt)}(J,j,nt,ht);for(var St,Bt,wt=J;J.prev!==J.next;)if(St=J.prev,Bt=J.next,ht?f(J,j,nt,ht):g(J))it.push(St.i/Y|0),it.push(J.i/Y|0),it.push(Bt.i/Y|0),q(J),J=Bt.next,wt=Bt.next;else if((J=Bt)===wt){gt?1===gt?T(J=h(b(J),it,Y),it,Y,j,nt,ht,2):2===gt&&c(J,it,Y,j,nt,ht):T(b(J),it,Y,j,nt,ht,1);break}}}function g(J){var it=J.prev,Y=J,j=J.next;if(I(it,Y,j)>=0)return!1;for(var nt=it.x,ht=Y.x,gt=j.x,wt=it.y,St=Y.y,Bt=j.y,Yt=ntht?nt>gt?nt:gt:ht>gt?ht:gt,ne=wt>St?wt>Bt?wt:Bt:St>Bt?St:Bt,le=j.next;le!==it;){if(le.x>=Yt&&le.x<=qt&&le.y>=$t&&le.y<=ne&&A(nt,wt,ht,St,gt,Bt,le.x,le.y)&&I(le.prev,le,le.next)>=0)return!1;le=le.next}return!0}function f(J,it,Y,j){var nt=J.prev,ht=J,gt=J.next;if(I(nt,ht,gt)>=0)return!1;for(var wt=nt.x,St=ht.x,Bt=gt.x,Yt=nt.y,$t=ht.y,qt=gt.y,ne=wtSt?wt>Bt?wt:Bt:St>Bt?St:Bt,pi=Yt>$t?Yt>qt?Yt:qt:$t>qt?$t:qt,Ie=_(ne,le,it,Y,j),_i=_(Me,pi,it,Y,j),be=J.prevZ,ri=J.nextZ;be&&be.z>=Ie&&ri&&ri.z<=_i;){if(be.x>=ne&&be.x<=Me&&be.y>=le&&be.y<=pi&&be!==nt&&be!==gt&&A(wt,Yt,St,$t,Bt,qt,be.x,be.y)&&I(be.prev,be,be.next)>=0||(be=be.prevZ,ri.x>=ne&&ri.x<=Me&&ri.y>=le&&ri.y<=pi&&ri!==nt&&ri!==gt&&A(wt,Yt,St,$t,Bt,qt,ri.x,ri.y)&&I(ri.prev,ri,ri.next)>=0))return!1;ri=ri.nextZ}for(;be&&be.z>=Ie;){if(be.x>=ne&&be.x<=Me&&be.y>=le&&be.y<=pi&&be!==nt&&be!==gt&&A(wt,Yt,St,$t,Bt,qt,be.x,be.y)&&I(be.prev,be,be.next)>=0)return!1;be=be.prevZ}for(;ri&&ri.z<=_i;){if(ri.x>=ne&&ri.x<=Me&&ri.y>=le&&ri.y<=pi&&ri!==nt&&ri!==gt&&A(wt,Yt,St,$t,Bt,qt,ri.x,ri.y)&&I(ri.prev,ri,ri.next)>=0)return!1;ri=ri.nextZ}return!0}function h(J,it,Y){var j=J;do{var nt=j.prev,ht=j.next.next;!R(nt,ht)&&F(nt,j,j.next,ht)&&H(nt,ht)&&H(ht,nt)&&(it.push(nt.i/Y|0),it.push(j.i/Y|0),it.push(ht.i/Y|0),q(j),q(j.next),j=J=ht),j=j.next}while(j!==J);return b(j)}function c(J,it,Y,j,nt,ht){var gt=J;do{for(var wt=gt.next.next;wt!==gt.prev;){if(gt.i!==wt.i&&D(gt,wt)){var St=G(gt,wt);return gt=b(gt,gt.next),St=b(St,St.next),T(gt,it,Y,j,nt,ht,0),void T(St,it,Y,j,nt,ht,0)}wt=wt.next}gt=gt.next}while(gt!==J)}function m(J,it){return J.x-it.x}function d(J,it){var Y=function p(J,it){var gt,Y=it,j=J.x,nt=J.y,ht=-1/0;do{if(nt<=Y.y&&nt>=Y.next.y&&Y.next.y!==Y.y){var wt=Y.x+(nt-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(wt<=j&&wt>ht&&(ht=wt,gt=Y.x=Y.x&&Y.x>=Bt&&j!==Y.x&&A(ntgt.x||Y.x===gt.x&&v(gt,Y)))&&(gt=Y,$t=qt)),Y=Y.next}while(Y!==St);return gt}(J,it);if(!Y)return it;var j=G(Y,J);return b(j,j.next),b(Y,Y.next)}function v(J,it){return I(J.prev,J,it.prev)<0&&I(it.next,J,J.next)<0}function _(J,it,Y,j,nt){return(J=1431655765&((J=858993459&((J=252645135&((J=16711935&((J=(J-Y)*nt|0)|J<<8))|J<<4))|J<<2))|J<<1))|(it=1431655765&((it=858993459&((it=252645135&((it=16711935&((it=(it-j)*nt|0)|it<<8))|it<<4))|it<<2))|it<<1))<<1}function E(J){var it=J,Y=J;do{(it.x=(J-gt)*(ht-wt)&&(J-gt)*(j-wt)>=(Y-gt)*(it-wt)&&(Y-gt)*(ht-wt)>=(nt-gt)*(j-wt)}function D(J,it){return J.next.i!==it.i&&J.prev.i!==it.i&&!function B(J,it){var Y=J;do{if(Y.i!==J.i&&Y.next.i!==J.i&&Y.i!==it.i&&Y.next.i!==it.i&&F(Y,Y.next,J,it))return!0;Y=Y.next}while(Y!==J);return!1}(J,it)&&(H(J,it)&&H(it,J)&&function Q(J,it){var Y=J,j=!1,nt=(J.x+it.x)/2,ht=(J.y+it.y)/2;do{Y.y>ht!=Y.next.y>ht&&Y.next.y!==Y.y&&nt<(Y.next.x-Y.x)*(ht-Y.y)/(Y.next.y-Y.y)+Y.x&&(j=!j),Y=Y.next}while(Y!==J);return j}(J,it)&&(I(J.prev,J,it.prev)||I(J,it.prev,it))||R(J,it)&&I(J.prev,J,J.next)>0&&I(it.prev,it,it.next)>0)}function I(J,it,Y){return(it.y-J.y)*(Y.x-it.x)-(it.x-J.x)*(Y.y-it.y)}function R(J,it){return J.x===it.x&&J.y===it.y}function F(J,it,Y,j){var nt=V(I(J,it,Y)),ht=V(I(J,it,j)),gt=V(I(Y,j,J)),wt=V(I(Y,j,it));return!!(nt!==ht&>!==wt||0===nt&&N(J,Y,it)||0===ht&&N(J,j,it)||0===gt&&N(Y,J,j)||0===wt&&N(Y,it,j))}function N(J,it,Y){return it.x<=Math.max(J.x,Y.x)&&it.x>=Math.min(J.x,Y.x)&&it.y<=Math.max(J.y,Y.y)&&it.y>=Math.min(J.y,Y.y)}function V(J){return J>0?1:J<0?-1:0}function H(J,it){return I(J.prev,J,J.next)<0?I(J,it,J.next)>=0&&I(J,J.prev,it)>=0:I(J,it,J.prev)<0||I(J,J.next,it)<0}function G(J,it){var Y=new at(J.i,J.x,J.y),j=new at(it.i,it.x,it.y),nt=J.next,ht=it.prev;return J.next=it,it.prev=J,Y.next=nt,nt.prev=Y,j.next=Y,Y.prev=j,ht.next=j,j.prev=ht,j}function K(J,it,Y,j){var nt=new at(J,it,Y);return j?(nt.next=j.next,nt.prev=j,j.next.prev=nt,j.next=nt):(nt.prev=nt,nt.next=nt),nt}function q(J){J.next.prev=J.prev,J.prev.next=J.next,J.prevZ&&(J.prevZ.nextZ=J.nextZ),J.nextZ&&(J.nextZ.prevZ=J.prevZ)}function at(J,it,Y){this.i=J,this.x=it,this.y=Y,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ot(J,it,Y,j){for(var nt=0,ht=it,gt=Y-j;ht0&&Y.holes.push(j+=J[nt-1].length)}return Y},S.exports=k},13829:(S,k,a)=>{var b=a(87841);S.exports=function(g,f){void 0===f&&(f=new b);for(var d,h=1/0,c=1/0,u=-h,m=-c,p=0;p{S.exports=function(a,b){void 0===b&&(b=[]);for(var T=0;T{var b=a(35001),T=a(23031),g=a(30052);S.exports=function(h,c,u,m){void 0===m&&(m=[]);var d=h.points,p=g(h);!c&&u>0&&(c=p/u);for(var v=0;vy+I)){var R=D.getPoint((x-y)/I);m.push(R);break}y+=I}return m}},30052:(S,k,a)=>{var b=a(35001),T=a(23031);S.exports=function(f){for(var h=f.points,c=0,u=0;u{var b=a(83419),T=a(63814),g=a(9564),f=a(23777),h=new b({initialize:function(u){this.type=f.POLYGON,this.area=0,this.points=[],u&&this.setTo(u)},contains:function(c,u){return T(this,c,u)},setTo:function(c){if(this.area=0,this.points=[],"string"==typeof c&&(c=c.split(" ")),!Array.isArray(c))return this;for(var u,m=0;m{S.exports=function(a){return a.points.reverse(),a}},29524:S=>{function k(h,c){var u=h.x-c.x,m=h.y-c.y;return u*u+m*m}function a(h,c,u){var m=c.x,d=c.y,p=u.x-m,v=u.y-d;if(0!==p||0!==v){var x=((h.x-m)*p+(h.y-d)*v)/(p*p+v*v);x>1?(m=u.x,d=u.y):x>0&&(m+=p*x,d+=v*x)}return(p=h.x-m)*p+(v=h.y-d)*v}function T(h,c,u,m,d){for(var v,p=m,x=c+1;xp&&(v=x,p=y)}p>m&&(v-c>1&&T(h,c,v,m,d),d.push(h[v]),u-v>1&&T(h,v,u,m,d))}function g(h,c){var u=h.length-1,m=[h[0]];return T(h,0,u,c,m),m.push(h[u]),m}S.exports=function(h,c,u){void 0===c&&(c=1),void 0===u&&(u=!1);var m=h.points;if(m.length>2){var d=c*c;u||(m=function b(h,c){for(var d,u=h[0],m=[u],p=1,v=h.length;pc&&(m.push(d),u=d);return u!==d&&m.push(d),m}(m,d)),h.setTo(g(m,d))}return h}},5469:S=>{var k=function(b,T){return b[0]=T[0],b[1]=T[1],b};S.exports=function(b){var T,g=[],f=b.points;for(T=0;T0&&h.push(k([0,0],g[0])),T=0;T1&&h.push(k([0,0],g[g.length-1])),b.setTo(h)}},24709:S=>{S.exports=function(a,b,T){for(var g=a.points,f=0;f{var b=a(25717);b.Clone=a(12306),b.Contains=a(63814),b.ContainsPoint=a(99338),b.Earcut=a(94811),b.GetAABB=a(13829),b.GetNumberArray=a(26173),b.GetPoints=a(9564),b.Perimeter=a(30052),b.Reverse=a(8133),b.Simplify=a(29524),b.Smooth=a(5469),b.Translate=a(24709),S.exports=b},62224:S=>{S.exports=function(a){return a.width*a.height}},98615:S=>{S.exports=function(a){return a.x=Math.ceil(a.x),a.y=Math.ceil(a.y),a}},31688:S=>{S.exports=function(a){return a.x=Math.ceil(a.x),a.y=Math.ceil(a.y),a.width=Math.ceil(a.width),a.height=Math.ceil(a.height),a}},67502:S=>{S.exports=function(a,b,T){return a.x=b-a.width/2,a.y=T-a.height/2,a}},65085:(S,k,a)=>{var b=a(87841);S.exports=function(g){return new b(g.x,g.y,g.width,g.height)}},37303:S=>{S.exports=function(a,b,T){return!(a.width<=0||a.height<=0)&&a.x<=b&&a.x+a.width>=b&&a.y<=T&&a.y+a.height>=T}},96553:(S,k,a)=>{var b=a(37303);S.exports=function(g,f){return b(g,f.x,f.y)}},70273:S=>{S.exports=function(a,b){return!(b.width*b.height>a.width*a.height)&&b.x>a.x&&b.xa.x&&b.righta.y&&b.ya.y&&b.bottom{S.exports=function(a,b){return b.setTo(a.x,a.y,a.width,a.height)}},77493:S=>{S.exports=function(a,b){return void 0===b&&(b=[]),b.push({x:a.x,y:a.y}),b.push({x:a.right,y:a.y}),b.push({x:a.right,y:a.bottom}),b.push({x:a.x,y:a.bottom}),b}},9219:S=>{S.exports=function(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}},53751:(S,k,a)=>{var b=a(8249);S.exports=function(g,f){var h=b(g);return h{var b=a(8249);S.exports=function(g,f){var h=b(g);return h>b(f)?g.setSize(f.height*h,f.height):g.setSize(f.width,f.width/h),g.setPosition(f.centerX-g.width/2,f.centerY-g.height/2)}},80774:S=>{S.exports=function(a){return a.x=Math.floor(a.x),a.y=Math.floor(a.y),a}},83859:S=>{S.exports=function(a){return a.x=Math.floor(a.x),a.y=Math.floor(a.y),a.width=Math.floor(a.width),a.height=Math.floor(a.height),a}},19217:(S,k,a)=>{var b=a(87841),T=a(36383);S.exports=function(f,h){if(void 0===h&&(h=new b),0===f.length)return h;for(var p,v,x,c=Number.MAX_VALUE,u=Number.MAX_VALUE,m=T.MIN_SAFE_INTEGER,d=T.MIN_SAFE_INTEGER,y=0;y{var b=a(87841);S.exports=function(g,f,h,c,u){return void 0===u&&(u=new b),u.setTo(Math.min(g,h),Math.min(f,c),Math.abs(g-h),Math.abs(f-c))}},8249:S=>{S.exports=function(a){return 0===a.height?NaN:a.width/a.height}},27165:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.centerX,f.y=g.centerY,f}},20812:(S,k,a)=>{var b=a(13019),T=a(2141);S.exports=function(f,h,c){if(void 0===c&&(c=new T),h<=0||h>=1)return c.x=f.x,c.y=f.y,c;var u=b(f)*h;return h>.5?(u-=f.width+f.height)<=f.width?(c.x=f.right-u,c.y=f.bottom):(c.x=f.x,c.y=f.bottom-(u-f.width)):u<=f.width?(c.x=f.x+u,c.y=f.y):(c.x=f.right,c.y=f.y+(u-f.width)),c}},34819:(S,k,a)=>{var b=a(20812),T=a(13019);S.exports=function(f,h,c,u){void 0===u&&(u=[]),!h&&c>0&&(h=T(f)/c);for(var m=0;m{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.width,f.y=g.height,f}},86091:(S,k,a)=>{var b=a(67502);S.exports=function(g,f,h){var c=g.centerX,u=g.centerY;return g.setSize(g.width+2*f,g.height+2*h),b(g,c,u)}},53951:(S,k,a)=>{var b=a(87841),T=a(59996);S.exports=function(f,h,c){return void 0===c&&(c=new b),T(f,h)?(c.x=Math.max(f.x,h.x),c.y=Math.max(f.y,h.y),c.width=Math.min(f.right,h.right)-c.x,c.height=Math.min(f.bottom,h.bottom)-c.y):c.setEmpty(),c}},14649:(S,k,a)=>{var b=a(13019),T=a(2141);S.exports=function(f,h,c,u){if(void 0===u&&(u=[]),!h&&!c)return u;h?c=Math.round(b(f)/h):h=b(f)/c;for(var m=f.x,d=f.y,p=0,v=0;v=f.right&&(p=1,d+=m-f.right,m=f.right);break;case 1:(d+=h)>=f.bottom&&(p=2,m-=d-f.bottom,d=f.bottom);break;case 2:(m-=h)<=f.left&&(p=3,d-=f.left-m,m=f.left);break;case 3:(d-=h)<=f.top&&(p=0,d=f.top)}return u}},33595:S=>{S.exports=function(a,b){for(var T=a.x,g=a.right,f=a.y,h=a.bottom,c=0;c{S.exports=function(a,b){var T=Math.min(a.x,b.x),g=Math.max(a.right,b.right);a.x=T,a.width=g-T;var f=Math.min(a.y,b.y),h=Math.max(a.bottom,b.bottom);return a.y=f,a.height=h-f,a}},92171:S=>{S.exports=function(a,b,T){var g=Math.min(a.x,b),f=Math.max(a.right,b);a.x=g,a.width=f-g;var h=Math.min(a.y,T),c=Math.max(a.bottom,T);return a.y=h,a.height=c-h,a}},42981:S=>{S.exports=function(a,b,T){return a.x+=b,a.y+=T,a}},46907:S=>{S.exports=function(a,b){return a.x+=b.x,a.y+=b.y,a}},60170:S=>{S.exports=function(a,b){return a.xb.x&&a.yb.y}},13019:S=>{S.exports=function(a){return 2*(a.width+a.height)}},85133:(S,k,a)=>{var b=a(2141),T=a(39506);S.exports=function(f,h,c){void 0===c&&(c=new b),h=T(h);var u=Math.sin(h),m=Math.cos(h),d=m>0?f.width/2:f.width/-2,p=u>0?f.height/2:f.height/-2;return Math.abs(d*u){var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=g.x+Math.random()*g.width,f.y=g.y+Math.random()*g.height,f}},86470:(S,k,a)=>{var b=a(30976),T=a(70273),g=a(2141);S.exports=function(h,c,u){if(void 0===u&&(u=new g),T(h,c))switch(b(0,3)){case 0:u.x=h.x+Math.random()*(c.right-h.x),u.y=h.y+Math.random()*(c.top-h.y);break;case 1:u.x=c.x+Math.random()*(h.right-c.x),u.y=c.bottom+Math.random()*(h.bottom-c.bottom);break;case 2:u.x=h.x+Math.random()*(c.x-h.x),u.y=c.y+Math.random()*(h.bottom-c.y);break;case 3:u.x=c.right+Math.random()*(h.right-c.right),u.y=h.y+Math.random()*(c.bottom-h.y)}return u}},87841:(S,k,a)=>{var b=a(83419),T=a(37303),g=a(20812),f=a(34819),h=a(23777),c=a(23031),u=a(26597),m=new b({initialize:function(p,v,x,y){void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),this.type=h.RECTANGLE,this.x=p,this.y=v,this.width=x,this.height=y},contains:function(d,p){return T(this,d,p)},getPoint:function(d,p){return g(this,d,p)},getPoints:function(d,p,v){return f(this,d,p,v)},getRandomPoint:function(d){return u(this,d)},setTo:function(d,p,v,x){return this.x=d,this.y=p,this.width=v,this.height=x,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(d,p){return void 0===p&&(p=d),this.x=d,this.y=p,this},setSize:function(d,p){return void 0===p&&(p=d),this.width=d,this.height=p,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(d){return void 0===d&&(d=new c),d.setTo(this.x,this.y,this.right,this.y),d},getLineB:function(d){return void 0===d&&(d=new c),d.setTo(this.right,this.y,this.right,this.bottom),d},getLineC:function(d){return void 0===d&&(d=new c),d.setTo(this.right,this.bottom,this.x,this.bottom),d},getLineD:function(d){return void 0===d&&(d=new c),d.setTo(this.x,this.bottom,this.x,this.y),d},left:{get:function(){return this.x},set:function(d){this.width=d>=this.right?0:this.right-d,this.x=d}},right:{get:function(){return this.x+this.width},set:function(d){this.width=d<=this.x?0:d-this.x}},top:{get:function(){return this.y},set:function(d){this.height=d>=this.bottom?0:this.bottom-d,this.y=d}},bottom:{get:function(){return this.y+this.height},set:function(d){this.height=d<=this.y?0:d-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(d){this.x=d-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(d){this.y=d-this.height/2}}});S.exports=m},94845:S=>{S.exports=function(a,b){return a.width===b.width&&a.height===b.height}},31730:S=>{S.exports=function(a,b,T){return void 0===T&&(T=b),a.width*=b,a.height*=T,a}},36899:(S,k,a)=>{var b=a(87841);S.exports=function(g,f,h){void 0===h&&(h=new b);var c=Math.min(g.x,f.x),u=Math.min(g.y,f.y),m=Math.max(g.right,f.right)-c,d=Math.max(g.bottom,f.bottom)-u;return h.setTo(c,u,m,d)}},93232:(S,k,a)=>{var b=a(87841);b.Area=a(62224),b.Ceil=a(98615),b.CeilAll=a(31688),b.CenterOn=a(67502),b.Clone=a(65085),b.Contains=a(37303),b.ContainsPoint=a(96553),b.ContainsRect=a(70273),b.CopyFrom=a(43459),b.Decompose=a(77493),b.Equals=a(9219),b.FitInside=a(53751),b.FitOutside=a(16088),b.Floor=a(80774),b.FloorAll=a(83859),b.FromPoints=a(19217),b.FromXY=a(9477),b.GetAspectRatio=a(8249),b.GetCenter=a(27165),b.GetPoint=a(20812),b.GetPoints=a(34819),b.GetSize=a(51313),b.Inflate=a(86091),b.Intersection=a(53951),b.MarchingAnts=a(14649),b.MergePoints=a(33595),b.MergeRect=a(20074),b.MergeXY=a(92171),b.Offset=a(42981),b.OffsetPoint=a(46907),b.Overlaps=a(60170),b.Perimeter=a(13019),b.PerimeterPoint=a(85133),b.Random=a(26597),b.RandomOutside=a(86470),b.SameDimensions=a(94845),b.Scale=a(31730),b.Union=a(36899),S.exports=b},41658:S=>{S.exports=function(a){var b=a.x1,T=a.y1;return Math.abs(((a.x3-b)*(a.y2-T)-(a.x2-b)*(a.y3-T))/2)}},39208:(S,k,a)=>{var b=a(16483);S.exports=function(g,f,h){var c=h*(Math.sqrt(3)/2);return new b(g,f,g+h/2,f+c,g-h/2,f+c)}},39545:(S,k,a)=>{var b=a(94811),T=a(16483);S.exports=function(f,h,c,u,m){void 0===h&&(h=null),void 0===c&&(c=1),void 0===u&&(u=1),void 0===m&&(m=[]);for(var p,v,x,d=b(f,h),R=0;R{var b=a(16483);S.exports=function(g,f,h,c){return void 0===c&&(c=h),new b(g,f,g,f-c,g+h,f)}},23707:(S,k,a)=>{var b=a(97523),T=a(13584);S.exports=function(f,h,c,u){void 0===u&&(u=b);var m=u(f);return T(f,h-m.x,c-m.y)}},97523:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){return void 0===f&&(f=new b),f.x=(g.x1+g.x2+g.x3)/3,f.y=(g.y1+g.y2+g.y3)/3,f}},24951:(S,k,a)=>{var b=a(26099);function T(f,h,c,u){return f*u-h*c}S.exports=function(f,h){void 0===h&&(h=new b);var c=f.x3,u=f.y3,m=f.x1-c,d=f.y1-u,p=f.x2-c,v=f.y2-u,x=2*T(m,d,p,v),y=T(d,m*m+d*d,v,p*p+v*v),_=T(m,m*m+d*d,p,p*p+v*v);return h.x=c-y/x,h.y=u+_/x,h}},85614:(S,k,a)=>{var b=a(96503);S.exports=function(g,f){void 0===f&&(f=new b);var I,R,h=g.x1,c=g.y1,u=g.x2,m=g.y2,d=g.x3,p=g.y3,v=u-h,x=m-c,y=d-h,_=p-c,E=v*(h+u)+x*(c+m),A=y*(h+d)+_*(c+p),D=2*(v*(p-m)-x*(d-u));if(Math.abs(D)<1e-6){var F=Math.min(h,u,d),N=Math.min(c,m,p);I=.5*(Math.max(h,u,d)-F),R=.5*(Math.max(c,m,p)-N),f.x=F+I,f.y=N+R,f.radius=Math.sqrt(I*I+R*R)}else f.x=(_*E-x*A)/D,f.y=(v*A-y*E)/D,I=f.x-h,R=f.y-c,f.radius=Math.sqrt(I*I+R*R);return f}},74422:(S,k,a)=>{var b=a(16483);S.exports=function(g){return new b(g.x1,g.y1,g.x2,g.y2,g.x3,g.y3)}},10690:S=>{S.exports=function(a,b,T){var g=a.x3-a.x1,f=a.y3-a.y1,h=a.x2-a.x1,c=a.y2-a.y1,u=b-a.x1,m=T-a.y1,d=g*g+f*f,p=g*h+f*c,v=g*u+f*m,x=h*h+c*c,y=h*u+c*m,_=d*x-p*p,E=0===_?0:1/_,A=(x*v-p*y)*E,D=(d*y-p*v)*E;return A>=0&&D>=0&&A+D<1}},48653:S=>{S.exports=function(a,b,T,g){void 0===T&&(T=!1),void 0===g&&(g=[]);for(var y,_,E,A,D,I,f=a.x3-a.x1,h=a.y3-a.y1,c=a.x2-a.x1,u=a.y2-a.y1,m=f*f+h*h,d=f*c+h*u,p=c*c+u*u,v=m*p-d*d,x=0===v?0:1/v,R=a.x1,F=a.y1,N=0;N=0&&_>=0&&y+_<1&&(g.push({x:b[N].x,y:b[N].y}),T)));N++);return g}},96006:(S,k,a)=>{var b=a(10690);S.exports=function(g,f){return b(g,f.x,f.y)}},71326:S=>{S.exports=function(a,b){return b.setTo(a.x1,a.y1,a.x2,a.y2,a.x3,a.y3)}},71694:S=>{S.exports=function(a,b){return void 0===b&&(b=[]),b.push({x:a.x1,y:a.y1}),b.push({x:a.x2,y:a.y2}),b.push({x:a.x3,y:a.y3}),b}},33522:S=>{S.exports=function(a,b){return a.x1===b.x1&&a.y1===b.y1&&a.x2===b.x2&&a.y2===b.y2&&a.x3===b.x3&&a.y3===b.y3}},20437:(S,k,a)=>{var b=a(2141),T=a(35001);S.exports=function(f,h,c){void 0===c&&(c=new b);var u=f.getLineA(),m=f.getLineB(),d=f.getLineC();if(h<=0||h>=1)return c.x=u.x1,c.y=u.y1,c;var p=T(u),v=T(m),x=T(d),_=(p+v+x)*h,E=0;return _p+v?(c.x=d.x1+(d.x2-d.x1)*(E=(_-=p+v)/x),c.y=d.y1+(d.y2-d.y1)*E):(c.x=m.x1+(m.x2-m.x1)*(E=(_-=p)/v),c.y=m.y1+(m.y2-m.y1)*E),c}},80672:(S,k,a)=>{var b=a(35001),T=a(2141);S.exports=function(f,h,c,u){void 0===u&&(u=[]);var m=f.getLineA(),d=f.getLineB(),p=f.getLineC(),v=b(m),x=b(d),y=b(p),_=v+x+y;!h&&c>0&&(h=_/c);for(var E=0;Ev+x?(I.x=p.x1+(p.x2-p.x1)*(D=(A-=v+x)/y),I.y=p.y1+(p.y2-p.y1)*D):(I.x=d.x1+(d.x2-d.x1)*(D=(A-=v)/x),I.y=d.y1+(d.y2-d.y1)*D),u.push(I)}return u}},39757:(S,k,a)=>{var b=a(2141);function T(f,h,c,u){var m=f-c,d=h-u;return Math.sqrt(m*m+d*d)}S.exports=function(f,h){void 0===h&&(h=new b);var c=f.x1,u=f.y1,m=f.x2,d=f.y2,p=f.x3,v=f.y3,x=T(p,v,m,d),y=T(c,u,p,v),_=T(m,d,c,u),E=x+y+_;return h.x=(c*x+m*y+p*_)/E,h.y=(u*x+d*y+v*_)/E,h}},13584:S=>{S.exports=function(a,b,T){return a.x1+=b,a.y1+=T,a.x2+=b,a.y2+=T,a.x3+=b,a.y3+=T,a}},1376:(S,k,a)=>{var b=a(35001);S.exports=function(g){var f=g.getLineA(),h=g.getLineB(),c=g.getLineC();return b(f)+b(h)+b(c)}},90260:(S,k,a)=>{var b=a(2141);S.exports=function(g,f){void 0===f&&(f=new b);var h=g.x2-g.x1,c=g.y2-g.y1,u=g.x3-g.x1,m=g.y3-g.y1,d=Math.random(),p=Math.random();return d+p>=1&&(d=1-d,p=1-p),f.x=g.x1+(h*d+u*p),f.y=g.y1+(c*d+m*p),f}},52172:(S,k,a)=>{var b=a(99614),T=a(39757);S.exports=function(f,h){var c=T(f);return b(f,c.x,c.y,h)}},49907:(S,k,a)=>{var b=a(99614);S.exports=function(g,f,h){return b(g,f.x,f.y,h)}},99614:S=>{S.exports=function(a,b,T,g){var f=Math.cos(g),h=Math.sin(g),c=a.x1-b,u=a.y1-T;return a.x1=c*f-u*h+b,a.y1=c*h+u*f+T,a.x2=(c=a.x2-b)*f-(u=a.y2-T)*h+b,a.y2=c*h+u*f+T,a.x3=(c=a.x3-b)*f-(u=a.y3-T)*h+b,a.y3=c*h+u*f+T,a}},16483:(S,k,a)=>{var b=a(83419),T=a(10690),g=a(20437),f=a(80672),h=a(23777),c=a(23031),u=a(90260),m=new b({initialize:function(p,v,x,y,_,E){void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),void 0===E&&(E=0),this.type=h.TRIANGLE,this.x1=p,this.y1=v,this.x2=x,this.y2=y,this.x3=_,this.y3=E},contains:function(d,p){return T(this,d,p)},getPoint:function(d,p){return g(this,d,p)},getPoints:function(d,p,v){return f(this,d,p,v)},getRandomPoint:function(d){return u(this,d)},setTo:function(d,p,v,x,y,_){return void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=0),void 0===_&&(_=0),this.x1=d,this.y1=p,this.x2=v,this.y2=x,this.x3=y,this.y3=_,this},getLineA:function(d){return void 0===d&&(d=new c),d.setTo(this.x1,this.y1,this.x2,this.y2),d},getLineB:function(d){return void 0===d&&(d=new c),d.setTo(this.x2,this.y2,this.x3,this.y3),d},getLineC:function(d){return void 0===d&&(d=new c),d.setTo(this.x3,this.y3,this.x1,this.y1),d},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(d){var p;this.x1-=p=this.x1<=this.x2&&this.x1<=this.x3?this.x1-d:this.x2<=this.x1&&this.x2<=this.x3?this.x2-d:this.x3-d,this.x2-=p,this.x3-=p}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(d){var p;this.x1-=p=this.x1>=this.x2&&this.x1>=this.x3?this.x1-d:this.x2>=this.x1&&this.x2>=this.x3?this.x2-d:this.x3-d,this.x2-=p,this.x3-=p}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(d){var p;this.y1-=p=this.y1<=this.y2&&this.y1<=this.y3?this.y1-d:this.y2<=this.y1&&this.y2<=this.y3?this.y2-d:this.y3-d,this.y2-=p,this.y3-=p}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(d){var p;this.y1-=p=this.y1>=this.y2&&this.y1>=this.y3?this.y1-d:this.y2>=this.y1&&this.y2>=this.y3?this.y2-d:this.y3-d,this.y2-=p,this.y3-=p}}});S.exports=m},84435:(S,k,a)=>{var b=a(16483);b.Area=a(41658),b.BuildEquilateral=a(39208),b.BuildFromPolygon=a(39545),b.BuildRight=a(90301),b.CenterOn=a(23707),b.Centroid=a(97523),b.CircumCenter=a(24951),b.CircumCircle=a(85614),b.Clone=a(74422),b.Contains=a(10690),b.ContainsArray=a(48653),b.ContainsPoint=a(96006),b.CopyFrom=a(71326),b.Decompose=a(71694),b.Equals=a(33522),b.GetPoint=a(20437),b.GetPoints=a(80672),b.InCenter=a(39757),b.Perimeter=a(1376),b.Offset=a(13584),b.Random=a(90260),b.Rotate=a(52172),b.RotateAroundPoint=a(49907),b.RotateAroundXY=a(99614),S.exports=b},74457:S=>{S.exports=function(a,b,T){return{gameObject:a,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:b,hitAreaCallback:T,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragStartCamera:null,dragX:0,dragY:0}}},84409:S=>{S.exports=function(a,b){return function(T,g,f,h){var c=a.getPixelAlpha(g,f,h.texture.key,h.frame.name);return c&&c>=b}}},7003:(S,k,a)=>{var b=a(83419),T=a(93301),g=a(50792),f=a(8214),h=a(8443),c=a(78970),u=a(85098),m=a(42515),d=a(36210),p=a(61340),v=a(85955),x=new b({initialize:function(_,E){this.game=_,this.config=E,this.enabled=!0,this.events=new g,this.isOver=!0,this.defaultCursor="",this.keyboard=E.inputKeyboard?new c(this):null,this.mouse=E.inputMouse?new u(this):null,this.touch=E.inputTouch?new d(this):null,this.pointers=[],this.pointersTotal=E.inputActivePointers;for(var A=0;A<=this.pointersTotal;A++){var D=new m(this,A);D.smoothFactor=E.inputSmoothFactor,this.pointers.push(D)}this.mousePointer=E.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new p,this._tempMatrix2=new p,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],_.events.once(h.BOOT,this.boot,this)},boot:function(){var y=this.game,_=y.events;this.canvas=y.canvas,this.scaleManager=y.scale,this.events.emit(f.MANAGER_BOOT),_.on(h.PRE_RENDER,this.preRender,this),_.once(h.DESTROY,this.destroy,this)},setCanvasOver:function(y){this.isOver=!0,this.events.emit(f.GAME_OVER,y)},setCanvasOut:function(y){this.isOver=!1,this.events.emit(f.GAME_OUT,y)},preRender:function(){var y=this.game.loop.now,_=this.game.loop.delta,E=this.game.scene.getScenes(!0,!0);this.time=y,this.events.emit(f.MANAGER_UPDATE);for(var A=0;A10&&(y=10-this.pointersTotal);for(var E=0;E{var b=a(96503),T=a(87902),g=a(83419),f=a(93301),h=a(74457),c=a(84409),u=a(20339),m=a(8497),d=a(81154),p=a(8214),v=a(50792),x=a(95540),y=a(23777),_=a(89639),E=a(41212),A=a(37277),D=a(87841),I=a(37303),R=a(44594),F=a(16483),N=a(10690),V=new g({Extends:v,initialize:function(H){v.call(this),this.scene=H,this.systems=H.sys,this.settings=H.sys.settings,this.manager=H.sys.game.input,this.pluginEvents=new v,this.enabled=!0,_.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var Q={cancelled:!1};this._eventContainer={stopPropagation:function(){Q.cancelled=!0}},this._eventData=Q,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,H.sys.events.once(R.BOOT,this.boot,this),H.sys.events.on(R.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(R.DESTROY,this.destroy,this),this.pluginEvents.emit(p.BOOT)},start:function(){var B=this.systems.events;B.on(R.TRANSITION_START,this.transitionIn,this),B.on(R.TRANSITION_OUT,this.transitionOut,this),B.on(R.TRANSITION_COMPLETE,this.transitionComplete,this),B.on(R.PRE_UPDATE,this.preUpdate,this),B.once(R.SHUTDOWN,this.shutdown,this),this.manager.events.on(p.GAME_OUT,this.onGameOut,this),this.manager.events.on(p.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(p.START)},onGameOver:function(B){this.isActive()&&this.emit(p.GAME_OVER,B.timeStamp,B)},onGameOut:function(B){this.isActive()&&this.emit(p.GAME_OUT,B.timeStamp,B)},preUpdate:function(){this.pluginEvents.emit(p.PRE_UPDATE);var B=this._pendingRemoval,H=this._pendingInsertion,Q=B.length;if(0!==Q||0!==H.length){for(var K=this._list,q=0;q-1&&(K.splice(ot,1),this.clear(at,!0))}this._pendingRemoval.length=0,this._list=K.concat(H.splice(0))}},isActive:function(){return this.manager&&this.manager.enabled&&this.enabled&&this.scene.sys.canInput()},setCursor:function(B){this.manager&&this.manager.setCursor(B)},resetCursor:function(){this.manager&&this.manager.resetCursor(null,!0)},updatePoll:function(B,H){if(!this.isActive())return!1;if(this.pluginEvents.emit(p.UPDATE,B,H),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var Q,K=this.manager.pointers;for(Q=0;Q0){if(this._pollTimer-=H,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var at=!1;for(Q=0;Q0&&(at=!0)}return at},update:function(B,H){if(!this.isActive())return!1;for(var Q=!1,G=0;G0&&(Q=!0)}return this._updatedThisFrame=!0,Q},clear:function(B,H){void 0===H&&(H=!1),this.disable(B);var Q=B.input;Q&&(this.removeDebug(B),this.manager.resetCursor(Q),Q.gameObject=void 0,Q.target=void 0,Q.hitArea=void 0,Q.hitAreaCallback=void 0,Q.callbackContext=void 0,B.input=null),H||this.queueForRemoval(B);var G=this._draggable.indexOf(B);return G>-1&&this._draggable.splice(G,1),B},disable:function(B,H){void 0===H&&(H=!1);var Q=B.input;Q&&(Q.enabled=!1,Q.dragState=0);for(var ot,G=this._drag,K=this._over,q=this.manager,at=0;at-1&&G[at].splice(ot,1),(ot=K[at].indexOf(B))>-1&&K[at].splice(ot,1);return H&&this.resetCursor(),this},enable:function(B,H,Q,G){return void 0===G&&(G=!1),B.input?B.input.enabled=!0:this.setHitArea(B,H,Q),B.input&&G&&!B.input.dropZone&&(B.input.dropZone=G),this},hitTestPointer:function(B){for(var H=this.cameras.getCamerasBelowPointer(B),Q=0;Q0)return B.camera=G,K}return B.camera=H[0],[]},processDownEvents:function(B){var H=0,Q=this._temp,G=this._eventData,K=this._eventContainer;G.cancelled=!1;for(var q=0;q0&&u(B.x,B.y,B.downX,B.downY)>=K||G>0&&H>=B.downTime+G)&&(Q=!0),Q)return this.setDragState(B,3),this.processDragStartList(B)},processDragStartList:function(B){if(3!==this.getDragState(B))return 0;var H=this._drag[B.id];H.length>1&&(H=H.slice(0));for(var Q=0;Q1&&(this.sortGameObjects(Q,B),this.topOnly&&Q.splice(1)),this._drag[B.id]=Q,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(B,3),this.processDragStartList(B)):(this.setDragState(B,2),0))},processDragMoveEvent:function(B){if(2===this.getDragState(B)&&this.processDragThresholdEvent(B,this.manager.game.loop.now),4!==this.getDragState(B))return 0;var H=this._tempZones,Q=this._drag[B.id];Q.length>1&&(Q=Q.slice(0));for(var G=0;G0?(K.emit(p.GAMEOBJECT_DRAG_LEAVE,B,at),this.emit(p.DRAG_LEAVE,B,K,at),q.target=H[0],K.emit(p.GAMEOBJECT_DRAG_ENTER,B,at=q.target),this.emit(p.DRAG_ENTER,B,K,at)):(K.emit(p.GAMEOBJECT_DRAG_LEAVE,B,at),this.emit(p.DRAG_LEAVE,B,K,at),H[0]?(q.target=H[0],K.emit(p.GAMEOBJECT_DRAG_ENTER,B,at=q.target),this.emit(p.DRAG_ENTER,B,K,at)):q.target=null)}else!at&&H[0]&&(q.target=H[0],K.emit(p.GAMEOBJECT_DRAG_ENTER,B,at=q.target),this.emit(p.DRAG_ENTER,B,K,at));var J,it,Y=B.positionToCamera(q.dragStartCamera);if(K.parentContainer){var j=Y.x-q.dragStartXGlobal,nt=Y.y-q.dragStartYGlobal,ht=K.getParentRotation(),gt=j*Math.cos(ht)+nt*Math.sin(ht),wt=nt*Math.cos(ht)-j*Math.sin(ht);J=(gt*=1/K.parentContainer.scaleX)+q.dragStartX,it=(wt*=1/K.parentContainer.scaleY)+q.dragStartY}else J=Y.x-q.dragX,it=Y.y-q.dragY;K.emit(p.GAMEOBJECT_DRAG,B,J,it),this.emit(p.DRAG,B,K,J,it)}return Q.length},processDragUpEvent:function(B){var H=this._drag[B.id];H.length>1&&(H=H.slice(0));for(var Q=0;Q0){var q=this.manager,at=this._eventData,ot=this._eventContainer;at.cancelled=!1;for(var J=0;J0){var K=this.manager,q=this._eventData,at=this._eventContainer;q.cancelled=!1,this.sortGameObjects(H,B);for(var ot=0;ot0){for(this.sortGameObjects(K,B),Q=0;Q0){for(this.sortGameObjects(q,B),Q=0;Q-1&&this._draggable.splice(K,1)}return this},makePixelPerfect:function(B){return void 0===B&&(B=1),c(this.systems.textures,B)},setHitArea:function(B,H,Q){if(void 0===H)return this.setHitAreaFromTexture(B);Array.isArray(B)||(B=[B]);var G=!1,K=!1,q=!1,at=!1,ot=!1,J=!0;if(E(H)&&Object.keys(H).length){var it=H;if(!B.some(function(wt){return wt.hasOwnProperty("faces")})){H=x(it,"hitArea",null),Q=x(it,"hitAreaCallback",null),ot=x(it,"pixelPerfect",!1);var j=x(it,"alphaTolerance",1);ot&&(H={},Q=this.makePixelPerfect(j))}G=x(it,"draggable",!1),K=x(it,"dropZone",!1),q=x(it,"cursor",!1),at=x(it,"useHandCursor",!1),(!H||!Q)&&(this.setHitAreaFromTexture(B),J=!1)}else"function"==typeof H&&!Q&&(Q=H,H={});for(var nt=0;nt{var b=a(35154),T={};S.exports={register:function(f,h,c,u,m){T[f]={plugin:h,mapping:c,settingsKey:u,configKey:m}},getPlugin:function(f){return T[f]},install:function(f){var h=f.scene.sys,c=h.settings.input,u=h.game.config;for(var m in T){var d=T[m].plugin,p=T[m].mapping;b(c,T[m].settingsKey,u[T[m].configKey])&&(f[p]=new d(f))}},remove:function(f){T.hasOwnProperty(f)&&delete T[f]}}},42515:(S,k,a)=>{var b=a(31040),T=a(83419),g=a(20339),f=a(43855),h=a(47235),c=a(26099),u=a(25892),m=new T({initialize:function(p,v){this.manager=p,this.id=v,this.camera=null,this.button=0,this.buttons=0,this.position=new c,this.prevPosition=new c,this.midPoint=new c(-1,-1),this.velocity=new c,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===v,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(d){var p=d.getWorldPoint(this.x,this.y);return this.worldX=p.x,this.worldY=p.y,this},positionToCamera:function(d,p){return d.getWorldPoint(this.x,this.y,p)},updateMotion:function(){var d=this.position.x,p=this.position.y,v=this.midPoint.x,x=this.midPoint.y;if(d!==v||p!==x){var y=h(this.motionFactor,v,d),_=h(this.motionFactor,x,p);f(y,d,.1)&&(y=d),f(_,p,.1)&&(_=p),this.midPoint.set(y,_);var E=d-y,A=p-_;this.velocity.set(E,A),this.angle=b(y,_,d,p),this.distance=Math.sqrt(E*E+A*A)}},up:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.button=d.button,this.upElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),0===d.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=d.timeStamp,this.wasTouch=!1)},down:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.button=d.button,this.downElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),0===d.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),u.macOS&&d.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=d.timeStamp),this.wasTouch=!1},move:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.manager.transformPointer(this,d.pageX,d.pageY,!0),this.locked&&(this.movementX=d.movementX||d.mozMovementX||d.webkitMovementX||0,this.movementY=d.movementY||d.mozMovementY||d.webkitMovementY||0),this.moveTime=d.timeStamp,this.wasTouch=!1},wheel:function(d){"buttons"in d&&(this.buttons=d.buttons),this.event=d,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.deltaX=d.deltaX,this.deltaY=d.deltaY,this.deltaZ=d.deltaZ,this.wasTouch=!1},touchstart:function(d,p){d.pointerId&&(this.pointerId=d.pointerId),this.identifier=d.identifier,this.target=d.target,this.active=!0,this.buttons=1,this.event=p,this.downElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=p.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(d,p){this.event=p,this.manager.transformPointer(this,d.pageX,d.pageY,!0),this.moveTime=p.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(d,p){this.buttons=0,this.event=p,this.upElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=p.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(d,p){this.buttons=0,this.event=p,this.upElement=d.target,this.manager.transformPointer(this,d.pageX,d.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=p.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.buttons?0===this.button&&!this.isDown:0===this.button},rightButtonReleased:function(){return 0===this.buttons?2===this.button&&!this.isDown:2===this.button},middleButtonReleased:function(){return 0===this.buttons?1===this.button&&!this.isDown:1===this.button},backButtonReleased:function(){return 0===this.buttons?3===this.button&&!this.isDown:3===this.button},forwardButtonReleased:function(){return 0===this.buttons?4===this.button&&!this.isDown:4===this.button},getDistance:function(){return this.isDown?g(this.downX,this.downY,this.x,this.y):g(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?b(this.downX,this.downY,this.x,this.y):b(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(d,p){void 0===d&&(d=10),void 0===p&&(p=[]);for(var v=this.prevPosition.x,x=this.prevPosition.y,y=this.position.x,_=this.position.y,E=0;E{S.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},7179:S=>{S.exports="boot"},85375:S=>{S.exports="destroy"},39843:S=>{S.exports="dragend"},23388:S=>{S.exports="dragenter"},16133:S=>{S.exports="drag"},27829:S=>{S.exports="dragleave"},53904:S=>{S.exports="dragover"},56058:S=>{S.exports="dragstart"},2642:S=>{S.exports="drop"},88171:S=>{S.exports="gameobjectdown"},36147:S=>{S.exports="dragend"},71692:S=>{S.exports="dragenter"},96149:S=>{S.exports="drag"},81285:S=>{S.exports="dragleave"},74048:S=>{S.exports="dragover"},21322:S=>{S.exports="dragstart"},49378:S=>{S.exports="drop"},86754:S=>{S.exports="gameobjectmove"},86433:S=>{S.exports="gameobjectout"},60709:S=>{S.exports="gameobjectover"},24081:S=>{S.exports="pointerdown"},11172:S=>{S.exports="pointermove"},18907:S=>{S.exports="pointerout"},95579:S=>{S.exports="pointerover"},35368:S=>{S.exports="pointerup"},26972:S=>{S.exports="wheel"},47078:S=>{S.exports="gameobjectup"},73802:S=>{S.exports="gameobjectwheel"},56718:S=>{S.exports="gameout"},25936:S=>{S.exports="gameover"},27503:S=>{S.exports="boot"},50852:S=>{S.exports="process"},96438:S=>{S.exports="update"},59152:S=>{S.exports="pointerlockchange"},47777:S=>{S.exports="pointerdown"},27957:S=>{S.exports="pointerdownoutside"},19444:S=>{S.exports="pointermove"},54251:S=>{S.exports="pointerout"},18667:S=>{S.exports="pointerover"},27192:S=>{S.exports="pointerup"},24652:S=>{S.exports="pointerupoutside"},45132:S=>{S.exports="wheel"},44512:S=>{S.exports="preupdate"},15757:S=>{S.exports="shutdown"},41637:S=>{S.exports="start"},93802:S=>{S.exports="update"},8214:(S,k,a)=>{S.exports={BOOT:a(7179),DESTROY:a(85375),DRAG_END:a(39843),DRAG_ENTER:a(23388),DRAG:a(16133),DRAG_LEAVE:a(27829),DRAG_OVER:a(53904),DRAG_START:a(56058),DROP:a(2642),GAME_OUT:a(56718),GAME_OVER:a(25936),GAMEOBJECT_DOWN:a(88171),GAMEOBJECT_DRAG_END:a(36147),GAMEOBJECT_DRAG_ENTER:a(71692),GAMEOBJECT_DRAG:a(96149),GAMEOBJECT_DRAG_LEAVE:a(81285),GAMEOBJECT_DRAG_OVER:a(74048),GAMEOBJECT_DRAG_START:a(21322),GAMEOBJECT_DROP:a(49378),GAMEOBJECT_MOVE:a(86754),GAMEOBJECT_OUT:a(86433),GAMEOBJECT_OVER:a(60709),GAMEOBJECT_POINTER_DOWN:a(24081),GAMEOBJECT_POINTER_MOVE:a(11172),GAMEOBJECT_POINTER_OUT:a(18907),GAMEOBJECT_POINTER_OVER:a(95579),GAMEOBJECT_POINTER_UP:a(35368),GAMEOBJECT_POINTER_WHEEL:a(26972),GAMEOBJECT_UP:a(47078),GAMEOBJECT_WHEEL:a(73802),MANAGER_BOOT:a(27503),MANAGER_PROCESS:a(50852),MANAGER_UPDATE:a(96438),POINTER_DOWN:a(47777),POINTER_DOWN_OUTSIDE:a(27957),POINTER_MOVE:a(19444),POINTER_OUT:a(54251),POINTER_OVER:a(18667),POINTER_UP:a(27192),POINTER_UP_OUTSIDE:a(24652),POINTER_WHEEL:a(45132),POINTERLOCK_CHANGE:a(59152),PRE_UPDATE:a(44512),SHUTDOWN:a(15757),START:a(41637),UPDATE:a(93802)}},97421:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h){this.pad=f,this.events=f.events,this.index=h,this.value=0,this.threshold=.1},update:function(g){this.value=g},getValue:function(){return Math.abs(this.value){var b=a(83419),T=a(92734),g=new b({initialize:function(h,c){this.pad=h,this.events=h.manager,this.index=c,this.value=0,this.threshold=1,this.pressed=!1},update:function(f){this.value=f;var h=this.pad,c=this.index;f>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(T.BUTTON_DOWN,h,this,f),this.pad.emit(T.GAMEPAD_BUTTON_DOWN,c,f,this)):this.pressed&&(this.pressed=!1,this.events.emit(T.BUTTON_UP,h,this,f),this.pad.emit(T.GAMEPAD_BUTTON_UP,c,f,this))},destroy:function(){this.pad=null,this.events=null}});S.exports=g},99125:(S,k,a)=>{var b=a(97421),T=a(28884),g=a(83419),f=a(50792),h=a(26099),c=new g({Extends:f,initialize:function(m,d){f.call(this),this.manager=m,this.pad=d,this.id=d.id,this.index=d.index;for(var p=[],v=0;v=2&&(this.leftStick.set(x[0].getValue(),x[1].getValue()),v>=4&&this.rightStick.set(x[2].getValue(),x[3].getValue()))}},destroy:function(){var u;for(this.removeAllListeners(),this.manager=null,this.pad=null,u=0;u{var b=a(83419),T=a(50792),g=a(92734),f=a(99125),h=a(35154),c=a(89639),u=a(8214),m=new b({Extends:T,initialize:function(p){T.call(this),this.scene=p.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=p,this.enabled=!0,this.gamepads=[],this.queue=[],p.pluginEvents.once(u.BOOT,this.boot,this),p.pluginEvents.on(u.START,this.start,this)},boot:function(){var d=this.scene.sys.game,p=this.settings.input,v=d.config;this.enabled=h(p,"gamepad",v.inputGamepad)&&d.device.input.gamepads,this.target=h(p,"gamepad.target",v.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(u.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(u.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var d=this,p=this.target,v=function(x){x.defaultPrevented||!d.isActive()||(d.refreshPads(),d.queue.push(x))};this.onGamepadHandler=v,p.addEventListener("gamepadconnected",v,!1),p.addEventListener("gamepaddisconnected",v,!1),this.sceneInputPlugin.pluginEvents.on(u.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(u.UPDATE,this.update);for(var d=0;d{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},65294:S=>{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},90089:S=>{S.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},64894:(S,k,a)=>{S.exports={DUALSHOCK_4:a(65294),SNES_USB:a(89651),XBOX_360:a(90089)}},46008:S=>{S.exports="down"},7629:S=>{S.exports="up"},42206:S=>{S.exports="connected"},86544:S=>{S.exports="disconnected"},94784:S=>{S.exports="down"},14325:S=>{S.exports="up"},92734:(S,k,a)=>{S.exports={BUTTON_DOWN:a(46008),BUTTON_UP:a(7629),CONNECTED:a(42206),DISCONNECTED:a(86544),GAMEPAD_BUTTON_DOWN:a(94784),GAMEPAD_BUTTON_UP:a(14325)}},48646:(S,k,a)=>{S.exports={Axis:a(97421),Button:a(28884),Events:a(92734),Gamepad:a(99125),GamepadPlugin:a(56654),Configs:a(64894)}},14350:(S,k,a)=>{var b=a(93301),T=a(79291),g={CreatePixelPerfectHandler:a(84409),CreateInteractiveObject:a(74457),Events:a(8214),Gamepad:a(48646),InputManager:a(7003),InputPlugin:a(48205),InputPluginCache:a(89639),Keyboard:a(51442),Mouse:a(87078),Pointer:a(42515),Touch:a(95618)};g=T(!1,g,b),S.exports=g},78970:(S,k,a)=>{var b=a(72905),T=a(83419),g=a(8443),f=a(8214),h=a(46032),c=a(29747),u=new T({initialize:function(d){this.manager=d,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.onKeyDown=c,this.onKeyUp=c,d.events.once(f.MANAGER_BOOT,this.boot,this)},boot:function(){var m=this.manager.config;this.enabled=m.inputKeyboard,this.target=m.inputKeyboardEventTarget,this.addCapture(m.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(g.POST_STEP,this.postUpdate,this)},startListeners:function(){var m=this;this.onKeyDown=function(p){!p.defaultPrevented&&m.enabled&&m.manager&&(m.queue.push(p),m.manager.events.emit(f.MANAGER_PROCESS),m.preventDefault&&!(p.altKey||p.ctrlKey||p.shiftKey||p.metaKey)&&m.captures.indexOf(p.keyCode)>-1&&p.preventDefault())},this.onKeyUp=function(p){!p.defaultPrevented&&m.enabled&&m.manager&&(m.queue.push(p),m.manager.events.emit(f.MANAGER_PROCESS),m.preventDefault&&!(p.altKey||p.ctrlKey||p.shiftKey||p.metaKey)&&m.captures.indexOf(p.keyCode)>-1&&p.preventDefault())};var d=this.target;d&&(d.addEventListener("keydown",this.onKeyDown,!1),d.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var m=this.target;m.removeEventListener("keydown",this.onKeyDown,!1),m.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(m){"string"==typeof m&&(m=m.split(",")),Array.isArray(m)||(m=[m]);for(var d=this.captures,p=0;p0},removeCapture:function(m){"string"==typeof m&&(m=m.split(",")),Array.isArray(m)||(m=[m]);for(var d=this.captures,p=0;p0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(g.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});S.exports=u},28846:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(95922),f=a(8443),h=a(35154),c=a(8214),u=a(89639),m=a(30472),d=a(46032),p=a(87960),v=a(74600),x=a(44594),y=a(56583),_=new b({Extends:T,initialize:function(A){T.call(this),this.game=A.systems.game,this.scene=A.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=A,this.manager=A.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,A.pluginEvents.once(c.BOOT,this.boot,this),A.pluginEvents.on(c.START,this.start,this)},boot:function(){var E=this.settings.input;this.enabled=h(E,"keyboard",!0);var A=h(E,"keyboard.capture",null);A&&this.addCaptures(A),this.sceneInputPlugin.pluginEvents.once(c.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(c.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(c.SHUTDOWN,this.shutdown,this),this.game.events.on(f.BLUR,this.resetKeys,this),this.scene.sys.events.on(x.PAUSE,this.resetKeys,this),this.scene.sys.events.on(x.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(E){return this.manager.addCapture(E),this},removeCapture:function(E){return this.manager.removeCapture(E),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:d.UP,down:d.DOWN,left:d.LEFT,right:d.RIGHT,space:d.SPACE,shift:d.SHIFT})},addKeys:function(E,A,D){void 0===A&&(A=!0),void 0===D&&(D=!1);var I={};if("string"==typeof E){E=E.split(",");for(var R=0;R-1?I[R]=E:I[E.keyCode]=E,A&&this.addCapture(E.keyCode),E.setEmitOnRepeat(D),E}return"string"==typeof E&&(E=d[E.toUpperCase()]),I[E]||(I[E]=new m(this,E),A&&this.addCapture(E),I[E].setEmitOnRepeat(D)),I[E]},removeKey:function(E,A,D){void 0===A&&(A=!1),void 0===D&&(D=!1);var R,I=this.keys;if(E instanceof m){var F=I.indexOf(E);F>-1&&(R=this.keys[F],this.keys[F]=void 0)}else"string"==typeof E&&(E=d[E.toUpperCase()]);return I[E]&&(R=I[E],I[E]=void 0),R&&(R.plugin=null,D&&this.removeCapture(R.keyCode),A&&R.destroy()),this},removeAllKeys:function(E,A){void 0===E&&(E=!1),void 0===A&&(A=!1);for(var D=this.keys,I=0;IE._tick)return E._tick=D,!0}return!1},update:function(){var E=this.manager.queue,A=E.length;if(this.isActive()&&0!==A)for(var D=this.keys,I=0;I{S.exports=function(a,b){return b.timeLastMatched=a.timeStamp,b.index++,b.index===b.size||(b.current=b.keyCodes[b.index],!1)}},87960:(S,k,a)=>{var b=a(83419),T=a(95922),g=a(95540),f=a(68769),h=a(92803),c=new b({initialize:function(m,d,p){if(void 0===p&&(p={}),d.length<2)return!1;this.manager=m,this.enabled=!0,this.keyCodes=[];for(var v=0;v{var b=a(66970);S.exports=function(g,f){if(f.matched)return!0;var h=!1,c=!1;return g.keyCode===f.current&&(f.index>0&&f.maxKeyDelay>0?g.timeStamp<=f.timeLastMatched+f.maxKeyDelay&&(c=!0,h=b(g,f)):(c=!0,h=b(g,f))),!c&&f.resetOnWrongKey&&(f.index=0,f.current=f.keyCodes[0]),h&&(f.timeLastMatched=g.timeStamp,f.matched=!0,f.timeMatched=g.timeStamp),h}},92803:S=>{S.exports=function(a){return a.current=a.keyCodes[0],a.index=0,a.timeLastMatched=0,a.matched=!1,a.timeMatched=0,a}},92612:S=>{S.exports="keydown"},23345:S=>{S.exports="keyup"},21957:S=>{S.exports="keycombomatch"},44743:S=>{S.exports="down"},3771:S=>{S.exports="keydown-"},46358:S=>{S.exports="keyup-"},75674:S=>{S.exports="up"},95922:(S,k,a)=>{S.exports={ANY_KEY_DOWN:a(92612),ANY_KEY_UP:a(23345),COMBO_MATCH:a(21957),DOWN:a(44743),KEY_DOWN:a(3771),KEY_UP:a(46358),UP:a(75674)}},51442:(S,k,a)=>{S.exports={Events:a(95922),KeyboardManager:a(78970),KeyboardPlugin:a(28846),Key:a(30472),KeyCodes:a(46032),KeyCombo:a(87960),AdvanceKeyCombo:a(66970),ProcessKeyCombo:a(68769),ResetKeyCombo:a(92803),JustDown:a(90229),JustUp:a(38796),DownDuration:a(37015),UpDuration:a(41170)}},37015:S=>{S.exports=function(a,b){return void 0===b&&(b=50),a.isDown&&a.plugin.game.loop.time-a.timeDown{S.exports=function(a){return!!a._justDown&&(a._justDown=!1,!0)}},38796:S=>{S.exports=function(a){return!!a._justUp&&(a._justUp=!1,!0)}},30472:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(95922),f=new b({Extends:T,initialize:function(c,u){T.call(this),this.plugin=c,this.keyCode=u,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(h){return this.emitOnRepeat=h,this},onDown:function(h){this.originalEvent=h,this.enabled&&(this.altKey=h.altKey,this.ctrlKey=h.ctrlKey,this.shiftKey=h.shiftKey,this.metaKey=h.metaKey,this.location=h.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(g.DOWN,this,h):(this.isDown=!0,this.isUp=!1,this.timeDown=h.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(g.DOWN,this,h)))},onUp:function(h){this.originalEvent=h,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=h.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(g.UP,this,h))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});S.exports=f},46032:S=>{S.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},74600:(S,k,a)=>{var b=a(46032),T={};for(var g in b)T[b[g]]=g;S.exports=T},41170:S=>{S.exports=function(a,b){return void 0===b&&(b=50),a.isUp&&a.plugin.game.loop.time-a.timeUp{var b=a(83419),T=a(89357),g=a(8214),f=a(29747),h=new b({initialize:function(u){this.manager=u,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.locked=!1,this.onMouseMove=f,this.onMouseDown=f,this.onMouseUp=f,this.onMouseDownWindow=f,this.onMouseUpWindow=f,this.onMouseOver=f,this.onMouseOut=f,this.onMouseWheel=f,this.pointerLockChange=f,this.isTop=!0,u.events.once(g.MANAGER_BOOT,this.boot,this)},boot:function(){var c=this.manager.config;this.enabled=c.inputMouse,this.target=c.inputMouseEventTarget,this.passive=c.inputMousePassive,this.preventDefaultDown=c.inputMousePreventDefaultDown,this.preventDefaultUp=c.inputMousePreventDefaultUp,this.preventDefaultMove=c.inputMousePreventDefaultMove,this.preventDefaultWheel=c.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,c.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(c){return c.preventDefault(),!1}),this},requestPointerLock:function(){if(T.pointerLock){var c=this.target;c.requestPointerLock=c.requestPointerLock||c.mozRequestPointerLock||c.webkitRequestPointerLock,c.requestPointerLock()}},releasePointerLock:function(){T.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var c=this.target;if(c){var u=this,m=this.manager,d=m.canvas,p=window&&window.focus&&m.game.config.autoFocus;this.onMouseMove=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&(m.onMouseMove(x),u.preventDefaultMove&&x.preventDefault())},this.onMouseDown=function(x){p&&window.focus(),!x.defaultPrevented&&u.enabled&&m&&m.enabled&&(m.onMouseDown(x),u.preventDefaultDown&&x.target===d&&x.preventDefault())},this.onMouseDownWindow=function(x){x.sourceCapabilities&&x.sourceCapabilities.firesTouchEvents||!x.defaultPrevented&&u.enabled&&m&&m.enabled&&x.target!==d&&m.onMouseDown(x)},this.onMouseUp=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&(m.onMouseUp(x),u.preventDefaultUp&&x.target===d&&x.preventDefault())},this.onMouseUpWindow=function(x){x.sourceCapabilities&&x.sourceCapabilities.firesTouchEvents||!x.defaultPrevented&&u.enabled&&m&&m.enabled&&x.target!==d&&m.onMouseUp(x)},this.onMouseOver=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&m.setCanvasOver(x)},this.onMouseOut=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&m.setCanvasOut(x)},this.onMouseWheel=function(x){!x.defaultPrevented&&u.enabled&&m&&m.enabled&&m.onMouseWheel(x),u.preventDefaultWheel&&x.target===d&&x.preventDefault()};var v={passive:!0};if(c.addEventListener("mousemove",this.onMouseMove),c.addEventListener("mousedown",this.onMouseDown),c.addEventListener("mouseup",this.onMouseUp),c.addEventListener("mouseover",this.onMouseOver,v),c.addEventListener("mouseout",this.onMouseOut,v),c.addEventListener("wheel",this.onMouseWheel,this.preventDefaultWheel?{passive:!1}:v),window&&m.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,v),window.top.addEventListener("mouseup",this.onMouseUpWindow,v)}catch{window.addEventListener("mousedown",this.onMouseDownWindow,v),window.addEventListener("mouseup",this.onMouseUpWindow,v),this.isTop=!1}T.pointerLock&&(this.pointerLockChange=function(x){var y=u.target;u.locked=document.pointerLockElement===y||document.mozPointerLockElement===y||document.webkitPointerLockElement===y,m.onPointerLockChange(x)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var c=this.target;c.removeEventListener("mousemove",this.onMouseMove),c.removeEventListener("mousedown",this.onMouseDown),c.removeEventListener("mouseup",this.onMouseUp),c.removeEventListener("mouseover",this.onMouseOver),c.removeEventListener("mouseout",this.onMouseOut),window&&((c=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),c.removeEventListener("mouseup",this.onMouseUpWindow)),T.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});S.exports=h},87078:(S,k,a)=>{S.exports={MouseManager:a(85098)}},36210:(S,k,a)=>{var b=a(83419),T=a(8214),g=a(29747),f=new b({initialize:function(c){this.manager=c,this.capture=!0,this.enabled=!1,this.onTouchStart=g,this.onTouchStartWindow=g,this.onTouchMove=g,this.onTouchEnd=g,this.onTouchEndWindow=g,this.onTouchCancel=g,this.onTouchCancelWindow=g,this.isTop=!0,c.events.once(T.MANAGER_BOOT,this.boot,this)},boot:function(){var h=this.manager.config;this.enabled=h.inputTouch,this.target=h.inputTouchEventTarget,this.capture=h.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,h.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",function(h){return h.preventDefault(),!1}),this},startListeners:function(){var h=this.target;if(h){var c=this,u=this.manager,m=u.canvas,d=window&&window.focus&&u.game.config.autoFocus;this.onTouchMove=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchMove(y),c.capture&&y.cancelable&&y.preventDefault())},this.onTouchStart=function(y){d&&window.focus(),!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchStart(y),c.capture&&y.cancelable&&y.target===m&&y.preventDefault())},this.onTouchStartWindow=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&y.target!==m&&u.onTouchStart(y)},this.onTouchEnd=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchEnd(y),c.capture&&y.cancelable&&y.target===m&&y.preventDefault())},this.onTouchEndWindow=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&y.target!==m&&u.onTouchEnd(y)},this.onTouchCancel=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&(u.onTouchCancel(y),c.capture&&y.preventDefault())},this.onTouchCancelWindow=function(y){!y.defaultPrevented&&c.enabled&&u&&u.enabled&&u.onTouchCancel(y)};var p=this.capture,v={passive:!0},x={passive:!1};if(h.addEventListener("touchstart",this.onTouchStart,p?x:v),h.addEventListener("touchmove",this.onTouchMove,p?x:v),h.addEventListener("touchend",this.onTouchEnd,p?x:v),h.addEventListener("touchcancel",this.onTouchCancel,p?x:v),window&&u.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,x),window.top.addEventListener("touchend",this.onTouchEndWindow,x),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,x)}catch{window.addEventListener("touchstart",this.onTouchStartWindow,x),window.addEventListener("touchend",this.onTouchEndWindow,x),window.addEventListener("touchcancel",this.onTouchCancelWindow,x),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var h=this.target;h.removeEventListener("touchstart",this.onTouchStart),h.removeEventListener("touchmove",this.onTouchMove),h.removeEventListener("touchend",this.onTouchEnd),h.removeEventListener("touchcancel",this.onTouchCancel),window&&((h=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),h.removeEventListener("touchend",this.onTouchEndWindow),h.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});S.exports=f},95618:(S,k,a)=>{S.exports={TouchManager:a(36210)}},41299:(S,k,a)=>{var b=a(83419),T=a(23906),g=a(54899),f=a(95540),h=a(98356),c=a(3374),u=a(84376),m=a(92638),d=new b({initialize:function(v,x){if(this.loader=v,this.cache=f(x,"cache",!1),this.type=f(x,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=f(x,"key",!1);var y=this.key;if(v.prefix&&""!==v.prefix&&(this.key=v.prefix+y),!this.key)throw new Error("Invalid File key: "+this.key);var _=f(x,"url");void 0===_?_=v.path+y+"."+f(x,"extension",""):"string"==typeof _&&!_.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)&&(_=v.path+_),this.url=_,this.src="",this.xhrSettings=m(f(x,"responseType",void 0)),f(x,"xhrSettings",!1)&&(this.xhrSettings=c(this.xhrSettings,f(x,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?T.FILE_POPULATED:T.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=f(x,"config",{}),this.base64="string"==typeof _&&0===_.indexOf("data:"),this.retryAttempts=f(x,"maxRetries",v.maxRetries)},setLink:function(p){this.linkFile=p,p.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){if(this.state===T.FILE_POPULATED)this.loader.nextFile(this,!0);else{if(this.state=T.FILE_LOADING,this.src=h(this,this.loader.baseURL),!this.src)throw new Error("URL Error in File: "+this.key+" from: "+this.url);0===this.src.indexOf("data:")&&(this.base64=!0),this.xhrLoader=u(this,this.loader.xhr)}},onLoad:function(p,v){var x=p.responseURL&&this.loader.localSchemes.some(function(E){return 0===p.responseURL.indexOf(E)}),_=!(v.target&&200!==v.target.status)||x&&0===v.target.status;4===p.readyState&&p.status>=400&&p.status<=599&&(_=!1),this.state=T.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,_)},onBase64Load:function(p){this.xhrLoader=p,this.state=T.FILE_LOADED,this.percentComplete=1,this.loader.emit(g.FILE_PROGRESS,this,this.percentComplete),this.loader.nextFile(this,!0)},onError:function(){this.resetXHR(),this.retryAttempts>0?(this.retryAttempts--,this.load()):this.loader.nextFile(this,!1)},onProgress:function(p){p.lengthComputable&&(this.bytesLoaded=p.loaded,this.bytesTotal=p.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(g.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=T.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=T.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=T.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(p){if(this.state!==T.FILE_PENDING_DESTROY){void 0===p&&(p=this.data);var v=this.key,x=this.type;this.loader.emit(g.FILE_COMPLETE,v,x,p),this.loader.emit(g.FILE_KEY_COMPLETE+x+"-"+v,v,x,p),this.loader.flagForRemoval(this),this.state=T.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});d.createObjectURL=function(p,v,x){if("function"==typeof URL)p.src=URL.createObjectURL(v);else{var y=new FileReader;y.onload=function(){p.removeAttribute("crossOrigin"),p.src="data:"+(v.type||x)+";base64,"+y.result.split(",")[1]},y.onerror=p.onerror,y.readAsDataURL(v)}},d.revokeObjectURL=function(p){"function"==typeof URL&&URL.revokeObjectURL(p.src)},S.exports=d},74099:S=>{var k={};S.exports={install:function(b){for(var T in k)b[T]=k[T]},register:function(b,T){k[b]=T},destroy:function(){k={}}}},98356:S=>{S.exports=function(a,b){return!!a.url&&(a.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?a.url:b+a.url)}},74261:(S,k,a)=>{var b=a(83419),T=a(23906),g=a(35072),f=a(50792),h=a(54899),c=a(74099),u=a(95540),m=a(35154),d=a(41212),p=a(37277),v=a(44594),x=a(92638),y=new b({Extends:f,initialize:function(E){f.call(this);var A=E.sys.game.config,D=E.sys.settings.loader;this.scene=E,this.systems=E.sys,this.cacheManager=E.sys.cache,this.textureManager=E.sys.textures,this.sceneManager=E.sys.game.scene,c.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(u(D,"baseURL",A.loaderBaseURL)),this.setPath(u(D,"path",A.loaderPath)),this.setPrefix(u(D,"prefix",A.loaderPrefix)),this.maxParallelDownloads=u(D,"maxParallelDownloads",A.loaderMaxParallelDownloads),this.xhr=x(u(D,"responseType",A.loaderResponseType),u(D,"async",A.loaderAsync),u(D,"user",A.loaderUser),u(D,"password",A.loaderPassword),u(D,"timeout",A.loaderTimeout),u(D,"withCredentials",A.loaderWithCredentials)),this.crossOrigin=u(D,"crossOrigin",A.loaderCrossOrigin),this.imageLoadType=u(D,"imageLoadType",A.loaderImageLoadType),this.localSchemes=u(D,"localScheme",A.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new g,this.inflight=new g,this.queue=new g,this._deleteQueue=new g,this.totalFailed=0,this.totalComplete=0,this.state=T.LOADER_IDLE,this.multiKeyIndex=0,this.maxRetries=u(D,"maxRetries",A.loaderMaxRetries),E.sys.events.once(v.BOOT,this.boot,this),E.sys.events.on(v.START,this.pluginStart,this)},boot:function(){this.systems.events.once(v.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(v.SHUTDOWN,this.shutdown,this)},setBaseURL:function(_){return void 0===_&&(_=""),""!==_&&"/"!==_.substr(-1)&&(_=_.concat("/")),this.baseURL=_,this},setPath:function(_){return void 0===_&&(_=""),""!==_&&"/"!==_.substr(-1)&&(_=_.concat("/")),this.path=_,this},setPrefix:function(_){return void 0===_&&(_=""),this.prefix=_,this},setCORS:function(_){return this.crossOrigin=_,this},addFile:function(_){Array.isArray(_)||(_=[_]);for(var E=0;E<_.length;E++){var A=_[E];this.keyExists(A)||(this.list.set(A),this.emit(h.ADD,A.key,A.type,this,A),this.isLoading()&&(this.totalToLoad++,this.updateProgress()))}},keyExists:function(_){var E=_.hasCacheConflict();return E||this.list.iterate(function(A){if(A.type===_.type&&A.key===_.key)return E=!0,!1}),!E&&this.isLoading()&&(this.inflight.iterate(function(A){if(A.type===_.type&&A.key===_.key)return E=!0,!1}),this.queue.iterate(function(A){if(A.type===_.type&&A.key===_.key)return E=!0,!1})),E},addPack:function(_,E){if("string"==typeof E){var A=m(_,E);A&&(_={packKey:A})}var D=0,I=this.baseURL,R=this.path,F=this.prefix;for(var N in _)if(Object.prototype.hasOwnProperty.call(_,N)){var V=_[N],B=u(V,"baseURL",I),H=u(V,"path",R),Q=u(V,"prefix",F),G=u(V,"files",null),K=u(V,"defaultType","void");if(Array.isArray(G)){this.setBaseURL(B),this.setPath(H),this.setPrefix(Q);for(var q=0;q0},removePack:function(_,E){var F,A=this.systems.anims,D=this.cacheManager,I=this.textureManager,R={animation:"json",aseprite:"json",audio:"audio",audioSprite:"audio",binary:"binary",bitmapFont:"bitmapFont",css:null,glsl:"shader",html:"html",json:"json",obj:"obj",plugin:null,scenePlugin:null,script:null,spine:"json",text:"text",tilemapCSV:"tilemap",tilemapImpact:"tilemap",tilemapTiledJSON:"tilemap",video:"video",xml:"xml"};if(d(_))F=_;else if(!(F=D.json.get(_)))return void console.warn("Asset Pack not found in JSON cache:",_);for(var N in E&&(F={_:F[E]}),F){var V=F[N],B=u(V,"prefix",""),H=u(V,"files"),Q=u(V,"defaultType");if(Array.isArray(H))for(var G=0;G0&&this.inflight.size{var b=a(79291),T=a(92638);S.exports=function(f,h){var c=void 0===f?T():b({},f);if(h)for(var u in h)void 0!==h[u]&&(c[u]=h[u]);return c}},26430:(S,k,a)=>{var b=a(83419),T=a(23906),g=a(54899),f=new b({initialize:function(c,u,m,d){var p=[];d.forEach(function(y){y&&p.push(y)}),this.loader=c,this.type=u,this.key=m,c.prefix&&""!==c.prefix&&(this.key=c.prefix+this.key),this.multiKeyIndex=c.multiKeyIndex++,this.files=p,this.state=T.FILE_PENDING,this.complete=!1,this.pending=p.length,this.failed=0,this.config={},this.baseURL=c.baseURL,this.path=c.path,this.prefix=c.prefix;for(var x=0;x{var b=a(3374);S.exports=function(g,f){var h=b(f,g.xhrSettings);if(!g.base64){var m=new XMLHttpRequest;if(m.open("GET",g.src,h.async,h.user,h.password),m.responseType=g.xhrSettings.responseType,m.timeout=h.timeout,h.headers)for(var d in h.headers)m.setRequestHeader(d,h.headers[d]);return h.header&&h.headerValue&&m.setRequestHeader(h.header,h.headerValue),h.requestedWith&&m.setRequestHeader("X-Requested-With",h.requestedWith),h.overrideMimeType&&m.overrideMimeType(h.overrideMimeType),h.withCredentials&&(m.withCredentials=!0),m.onload=g.onLoad.bind(g,m),m.onerror=g.onError.bind(g,m),m.onprogress=g.onProgress.bind(g),m.ontimeout=g.onError.bind(g,m),m.send(),m}var c=g.url.split(";base64,").pop()||g.url.split(",").pop(),u={responseText:atob(c)};g.onBase64Load(u)}},92638:S=>{S.exports=function(a,b,T,g,f,h){return void 0===a&&(a=""),void 0===b&&(b=!0),void 0===T&&(T=""),void 0===g&&(g=""),void 0===f&&(f=0),void 0===h&&(h=!1),{responseType:a,async:b,user:T,password:g,timeout:f,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:h}}},23906:S=>{S.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},42155:S=>{S.exports="addfile"},38991:S=>{S.exports="complete"},27540:S=>{S.exports="filecomplete"},87464:S=>{S.exports="filecomplete-"},94486:S=>{S.exports="loaderror"},13035:S=>{S.exports="load"},38144:S=>{S.exports="fileprogress"},97520:S=>{S.exports="postprocess"},85595:S=>{S.exports="progress"},55680:S=>{S.exports="start"},54899:(S,k,a)=>{S.exports={ADD:a(42155),COMPLETE:a(38991),FILE_COMPLETE:a(27540),FILE_KEY_COMPLETE:a(87464),FILE_LOAD_ERROR:a(94486),FILE_LOAD:a(13035),FILE_PROGRESS:a(38144),POST_PROCESS:a(97520),PROGRESS:a(85595),START:a(55680)}},14135:(S,k,a)=>{var b=a(83419),T=a(74099),g=a(518),f=a(54899),h=new b({Extends:g,initialize:function(u,m,d,p,v){g.call(this,u,m,d,p,v),this.type="animationJSON"},onProcess:function(){this.loader.once(f.POST_PROCESS,this.onLoadComplete,this),g.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});T.register("animation",function(c,u,m,d){if(Array.isArray(c))for(var p=0;p{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(518),u=a(26430),m=new b({Extends:u,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new c(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","json"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new c(p,v,y,E);u.call(this,p,"atlasjson",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0],p=this.files[1];this.loader.textureManager.addAtlas(d.key,d.data,p.data,this.files[2]?this.files[2].data:null),p.addToCache(),this.complete=!0}}});T.register("aseprite",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(518),u=a(26430),m=new b({Extends:u,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new c(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","json"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new c(p,v,y,E);u.call(this,p,"atlasjson",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0];this.loader.textureManager.addAtlas(d.key,d.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});T.register("atlas",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(26430),u=a(57318),m=new b({Extends:c,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new u(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","xml"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new u(p,v,y,E);c.call(this,p,"atlasxml",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0];this.loader.textureManager.addAtlasXML(d.key,d.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});T.register("atlasXML",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(89749),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y,_){if(u(v)){var E=v;v=h(E,"key"),y=h(E,"xhrSettings"),_=h(E,"context",_)}g.call(this,p,{type:"audio",cache:p.cacheManager.audio,extension:x.type,responseType:"arraybuffer",key:v,url:x.url,xhrSettings:y,config:{context:_}})},onProcess:function(){this.state=T.FILE_PROCESSING;var d=this;this.config.context.decodeAudioData(this.xhrLoader.response,function(p){d.data=p,d.onProcessComplete()},function(p){console.error("Error decoding audio: "+d.key+" - ",p?p.message:null),d.onProcessError()}),this.config.context=null}});m.create=function(d,p,v,x,y){var _=d.systems.game,E=_.config.audio,A=_.device.audio;u(p)&&(v=h(p,"url",[]),x=h(p,"config",{}));var D=m.getAudioURL(_,v);return D?A.webAudio&&!E.disableWebAudio?new m(d,p,D,y,_.sound.context):new c(d,p,D,x):(console.warn('No audio URLs for "%s" can play on this device',p),null)},m.getAudioURL=function(d,p){Array.isArray(p)||(p=[p]);for(var v=0;v{var b=a(21097),T=a(83419),g=a(74099),f=a(95540),h=a(41212),c=a(518),u=a(26430),m=new T({Extends:u,initialize:function(p,v,x,y,_,E,A){if(h(v)){var D=v;v=f(D,"key"),x=f(D,"jsonURL"),y=f(D,"audioURL"),_=f(D,"audioConfig"),E=f(D,"audioXhrSettings"),A=f(D,"jsonXhrSettings")}var I;if(y){var R=b.create(p,v,y,_,E);R&&(I=new c(p,v,x,A),u.call(this,p,"audiosprite",v,[R,I]),this.config.resourceLoad=!1)}else I=new c(p,v,x,A),u.call(this,p,"audiosprite",v,[I]),this.config.resourceLoad=!0,this.config.audioConfig=_,this.config.audioXhrSettings=E},onFileComplete:function(d){if(-1!==this.files.indexOf(d)&&(this.pending--,this.config.resourceLoad&&"json"===d.type&&d.data.hasOwnProperty("resources"))){var v=d.data.resources,x=f(this.config,"audioConfig"),y=f(this.config,"audioXhrSettings"),_=b.create(this.loader,d.key,v,x,y);_&&(this.addToMultiFile(_),this.loader.addFile(_))}},addToCache:function(){if(this.isReadyToProcess()){var p=this.files[1];this.files[0].addToCache(),p.addToCache(),this.complete=!0}}});g.register("audioSprite",function(d,p,v,x,y,_){var I,E=this.systems.game,A=E.config.audio,D=E.device.audio;if(A&&A.noAudio||!D.webAudio&&!D.audioData)return this;if(Array.isArray(d))for(var R=0;R{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y){var _="bin";if(c(p)){var E=p;p=h(E,"key"),v=h(E,"url"),x=h(E,"xhrSettings"),_=h(E,"extension",_),y=h(E,"dataType",y)}g.call(this,d,{type:"binary",cache:d.cacheManager.binary,extension:_,responseType:"arraybuffer",key:p,url:v,xhrSettings:x,config:{dataType:y}})},onProcess:function(){this.state=T.FILE_PROCESSING;var m=this.config.dataType;this.data=m?new m(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});f.register("binary",function(m,d,p,v){if(Array.isArray(m))for(var x=0;x{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(26430),u=a(21859),m=a(57318),d=new b({Extends:c,initialize:function(v,x,y,_,E,A){var D,I;if(h(x)){var R=x;x=g(R,"key"),D=new f(v,{key:x,url:g(R,"textureURL"),extension:g(R,"textureExtension","png"),normalMap:g(R,"normalMap"),xhrSettings:g(R,"textureXhrSettings")}),I=new m(v,{key:x,url:g(R,"fontDataURL"),extension:g(R,"fontDataExtension","xml"),xhrSettings:g(R,"fontDataXhrSettings")})}else D=new f(v,x,y,E),I=new m(v,x,_,A);c.call(this,v,"bitmapfont",x,D.linkFile?[D,I,D.linkFile]:[D,I])},addToCache:function(){if(this.isReadyToProcess()){var p=this.files[0],v=this.files[1];p.addToCache();var x=p.cache.get(p.key),y=u(v.data,p.cache.getFrame(p.key),0,0,x);this.loader.cacheManager.bitmapFont.add(p.key,{data:y,texture:p.key,frame:null}),this.complete=!0}}});T.register("bitmapFont",function(p,v,x,y,_){var E;if(Array.isArray(p))for(var A=0;A{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="css";if(c(p)){var _=p;p=h(_,"key"),v=h(_,"url"),x=h(_,"xhrSettings"),y=h(_,"extension",y)}g.call(this,d,{type:"script",cache:!1,extension:y,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});f.register("css",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(38734),T=a(85722),g=a(83419),f=a(74099),h=a(95540),c=a(19550),u=a(41212),m=a(518),d=a(31403),p=a(46975),v=a(59327),x=a(26430),y=a(82038),_=a(55222),E=new g({Extends:x,initialize:function(D,I,R,F){if(R.multiAtlasURL){var N=new m(D,{key:I,url:R.multiAtlasURL,xhrSettings:F,config:R});x.call(this,D,"texture",I,[N])}else{var V=R.textureURL.substr(R.textureURL.length-3);R.type||(R.type="ktx"===V.toLowerCase()?"KTX":"PVR");var B=new T(D,{key:I,url:R.textureURL,extension:V,xhrSettings:F,config:R});if(R.atlasURL){var H=new m(D,{key:I,url:R.atlasURL,xhrSettings:F,config:R});x.call(this,D,"texture",I,[B,H])}else x.call(this,D,"texture",I,[B])}this.config=R},onFileComplete:function(A){if(-1!==this.files.indexOf(A)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===A.type&&A.data.hasOwnProperty("textures")){var I=A.data.textures,R=this.config,F=this.loader,N=F.baseURL,V=F.path,B=F.prefix,H=h(R,"multiBaseURL",this.baseURL),Q=h(R,"multiPath",this.path),G=h(R,"prefix",this.prefix),K=h(R,"textureXhrSettings");H&&F.setBaseURL(H),Q&&F.setPath(Q),G&&F.setPrefix(G);for(var q=0;q{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(98356),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y,_,E){var A="ttf";if(u(v)){var D=v;v=h(D,"key"),x=h(D,"url"),y=h(D,"format","truetype"),_=h(D,"descriptors",null),E=h(D,"xhrSettings"),A=h(D,"extension",A)}else void 0===y&&(y="truetype");g.call(this,p,{type:"font",cache:!1,extension:A,responseType:"text",key:v,url:x,xhrSettings:E}),this.data={format:y,descriptors:_},this.state=T.FILE_POPULATED},onProcess:function(){this.state=T.FILE_PROCESSING,this.src=c(this,this.loader.baseURL);var d,p=this.key,v="url("+this.src+') format("'+this.data.format+'")';d=this.data.descriptors?new FontFace(p,v,this.data.descriptors):new FontFace(p,v);var x=this;d.load().then(function(){document.fonts.add(d),document.body.classList.add("fonts-loaded"),x.onProcessComplete()}).catch(function(){console.warn("Font failed to load",v),x.onProcessComplete()})}});f.register("font",function(d,p,v,x,y){if(Array.isArray(d))for(var _=0;_{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(73894),m=new b({Extends:g,initialize:function(p,v,x,y,_){var E="glsl";if(c(v)){var A=v;v=h(A,"key"),x=h(A,"url"),y=h(A,"shaderType","fragment"),_=h(A,"xhrSettings"),E=h(A,"extension",E)}else void 0===y&&(y="fragment");g.call(this,p,{type:"glsl",cache:p.cacheManager.shader,extension:E,responseType:"text",key:v,url:x,config:{shaderType:y},xhrSettings:_})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var d=this.data.split("\n"),p=this.extractBlock(d,0);if(p)for(;p;){var v=this.getShaderName(p.header),x=this.getShaderType(p.header),y=this.getShaderUniforms(p.header),_=p.shader;if(this.cache.has(v)){var E=this.cache.get(v);"fragment"===x?E.fragmentSrc=_:E.vertexSrc=_,E.uniforms||(E.uniforms=y)}else this.cache.add(v,"fragment"===x?new u(v,_,"",y):new u(v,"",_,y));p=this.extractBlock(d,p.offset)}else this.cache.add(this.key,"fragment"===this.config.shaderType?new u(this.key,this.data):new u(this.key,"",this.data))},getShaderName:function(d){for(var p=0;p{var b=a(83419),T=a(54899),g=a(41299),f=a(95540),h=a(98356),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){if(c(p)){var y=p;p=f(y,"key"),x=f(y,"config",x)}g.call(this,d,{type:"audio",cache:d.cacheManager.audio,extension:v.type,key:p,url:v.url,config:x}),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var m=0;m{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="html";if(c(p)){var _=p;p=h(_,"key"),v=h(_,"url"),x=h(_,"xhrSettings"),y=h(_,"extension",y)}g.call(this,d,{type:"text",cache:d.cacheManager.html,extension:y,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});f.register("html",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y,_){void 0===x&&(x=512),void 0===y&&(y=512);var E="html";if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),_=h(A,"xhrSettings"),E=h(A,"extension",E),x=h(A,"width",x),y=h(A,"height",y)}g.call(this,d,{type:"html",cache:d.textureManager,extension:E,responseType:"text",key:p,url:v,xhrSettings:_,config:{width:x,height:y}})},onProcess:function(){this.state=T.FILE_PROCESSING;var m=this.config.width,d=this.config.height,p=[];p.push(''),p.push(''),p.push(''),p.push(this.xhrLoader.responseText),p.push(""),p.push(""),p.push("");var v=[p.join("\n")],x=this;try{var y=new window.Blob(v,{type:"image/svg+xml;charset=utf-8"})}catch{return x.state=T.FILE_ERRORED,void x.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){g.revokeObjectURL(x.data),x.onProcessComplete()},this.data.onerror=function(){g.revokeObjectURL(x.data),x.onProcessError()},g.createObjectURL(this.data,y,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});f.register("htmlTexture",function(m,d,p,v,x){if(Array.isArray(m))for(var y=0;y{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(98356),m=new b({Extends:g,initialize:function d(p,v,x,y,_){var A,E="png";if(c(v)){var D=v;v=h(D,"key"),x=h(D,"url"),A=h(D,"normalMap"),y=h(D,"xhrSettings"),E=h(D,"extension",E),_=h(D,"frameConfig")}if(Array.isArray(x)&&(A=x[1],x=x[0]),g.call(this,p,{type:"image",cache:p.textureManager,extension:E,responseType:"blob",key:v,url:x,xhrSettings:y,config:_}),A){var R=new d(p,this.key,A,y,_);R.type="normalMap",this.setLink(R),p.addFile(R)}this.useImageElementLoad="HTMLImageElement"===p.imageLoadType||this.base64,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var d=this;this.data.onload=function(){g.revokeObjectURL(d.data),d.onProcessComplete()},this.data.onerror=function(){g.revokeObjectURL(d.data),d.onProcessError()},g.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var d=this.state;this.state=T.FILE_PROCESSING,d===T.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){this.state=T.FILE_LOADING,this.src=u(this,this.loader.baseURL),this.data=new Image,this.data.crossOrigin=this.crossOrigin;var d=this;this.data.onload=function(){d.state=T.FILE_LOADED,d.loader.nextFile(d,!0)},this.data.onerror=function(){d.loader.nextFile(d,!1)},this.data.src=this.src},addToCache:function(){var d=this.linkFile;d?d.state>=T.FILE_COMPLETE&&("spritesheet"===d.type?d.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,d.data,this.data):this.cache.addImage(this.key,this.data,d.data)):this.cache.addImage(this.key,this.data)}});f.register("image",function(d,p,v){if(Array.isArray(d))for(var x=0;x{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(35154),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y,_){var E="json";if(u(v)){var A=v;v=h(A,"key"),x=h(A,"url"),y=h(A,"xhrSettings"),E=h(A,"extension",E),_=h(A,"dataKey",_)}g.call(this,p,{type:"json",cache:p.cacheManager.json,extension:E,responseType:"text",key:v,url:x,xhrSettings:y,config:_}),u(x)&&(this.data=_?c(x,_):x,this.state=T.FILE_POPULATED)},onProcess:function(){if(this.state!==T.FILE_POPULATED){this.state=T.FILE_PROCESSING;try{var d=JSON.parse(this.xhrLoader.responseText)}catch(v){throw this.onProcessError(),v}var p=this.config;this.data="string"==typeof p?c(d,p,d):d}this.onProcessComplete()}});f.register("json",function(d,p,v,x){if(Array.isArray(d))for(var y=0;y{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(518),u=a(26430),m=new b({Extends:u,initialize:function(p,v,x,y,_,E,A){if(h(v)){var D=v;v=g(D,"key"),x=g(D,"url",!1)?g(D,"url"):g(D,"atlasURL"),E=g(D,"xhrSettings"),y=g(D,"path"),_=g(D,"baseURL"),A=g(D,"textureXhrSettings")}var I=new c(p,v,x,E);u.call(this,p,"multiatlas",v,[I]),this.config.path=y,this.config.baseURL=_,this.config.textureXhrSettings=A},onFileComplete:function(d){if(-1!==this.files.indexOf(d)&&(this.pending--,"json"===d.type&&d.data.hasOwnProperty("textures"))){var v=d.data.textures,x=this.config,y=this.loader,_=y.baseURL,E=y.path,A=y.prefix,D=g(x,"baseURL",this.baseURL),I=g(x,"path",this.path),R=g(x,"prefix",this.prefix),F=g(x,"textureXhrSettings");y.setBaseURL(D),y.setPath(I),y.setPrefix(R);for(var N=0;N{var b=a(83419),T=a(74099),g=a(95540),f=a(41212),h=a(26430),c=a(34328),u=new b({Extends:h,initialize:function(d,p,v,x){var y="js",_=[];if(f(p)){var E=p;p=g(E,"key"),v=g(E,"url"),x=g(E,"xhrSettings"),y=g(E,"extension",y)}Array.isArray(v)||(v=[v]);for(var A=0;A{var b=a(83419),T=a(74099),g=a(95540),f=a(41212),h=a(26430),c=a(85048),u=a(61485),m=a(78776),d=new b({Extends:h,initialize:function(v,x,y,_,E,A){var D,I,R=v.cacheManager.obj;if(f(x)){var F=x;x=g(F,"key"),D=new m(v,{key:x,type:"obj",cache:R,url:g(F,"url"),extension:g(F,"extension","obj"),xhrSettings:g(F,"xhrSettings"),config:{flipUV:g(F,"flipUV",E)}}),(_=g(F,"matURL"))&&(I=new m(v,{key:x,type:"mat",cache:R,url:_,extension:g(F,"matExtension","mat"),xhrSettings:g(F,"xhrSettings")}))}else D=new m(v,{key:x,url:y,type:"obj",cache:R,extension:"obj",xhrSettings:A,config:{flipUV:E}}),_&&(I=new m(v,{key:x,url:_,type:"mat",cache:R,extension:"mat",xhrSettings:A}));h.call(this,v,"obj",x,[D,I])},addToCache:function(){if(this.isReadyToProcess()){var p=this.files[0],v=this.files[1],x=c(p.data,p.config.flipUV);v&&(x.materials=u(v.data)),p.cache.add(p.key,x),this.complete=!0}}});T.register("obj",function(p,v,x,y,_){var E;if(Array.isArray(p))for(var A=0;A{var b=a(83419),T=a(23906),g=a(74099),f=a(518),h=new b({Extends:f,initialize:function(u,m,d,p,v){f.call(this,u,m,d,p,v),this.type="packfile"},onProcess:function(){if(this.state!==T.FILE_POPULATED&&(this.state=T.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var c={};c[this.config]=this.data,this.data=c}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});g.register("pack",function(c,u,m,d){if(Array.isArray(c))for(var p=0;p{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y,_){var E="js";if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),_=h(A,"xhrSettings"),E=h(A,"extension",E),x=h(A,"start"),y=h(A,"mapping")}g.call(this,d,{type:"plugin",cache:!1,extension:E,responseType:"text",key:p,url:v,xhrSettings:_,config:{start:x,mapping:y}}),"function"==typeof v&&(this.data=v,this.state=T.FILE_POPULATED)},onProcess:function(){var m=this.loader.systems.plugins,d=this.config,p=h(d,"start",!1),v=h(d,"mapping",null);if(this.state===T.FILE_POPULATED)m.install(this.key,this.data,p,v);else{this.state=T.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var x=m.install(this.key,window[this.key],p,v);(p||v)&&(this.loader.systems[v]=x,this.loader.scene[v]=x)}this.onProcessComplete()}});f.register("plugin",function(m,d,p,v,x){if(Array.isArray(m))for(var y=0;y{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y){var _="svg";if(c(p)){var E=p;p=h(E,"key"),v=h(E,"url"),x=h(E,"svgConfig",{}),y=h(E,"xhrSettings"),_=h(E,"extension",_)}var A={type:"svg",cache:d.textureManager,extension:_,responseType:"text",key:p,url:v,xhrSettings:y,config:{width:h(x,"width"),height:h(x,"height"),scale:h(x,"scale")}};g.call(this,d,A)},onProcess:function(){this.state=T.FILE_PROCESSING;var m=this.xhrLoader.responseText,d=[m],p=this.config.width,v=this.config.height,x=this.config.scale;t:if(p&&v||x){var E=(new DOMParser).parseFromString(m,"text/xml").getElementsByTagName("svg")[0],A=E.hasAttribute("viewBox"),D=parseFloat(E.getAttribute("width")),I=parseFloat(E.getAttribute("height"));if(!A&&D&&I)E.setAttribute("viewBox","0 0 "+D+" "+I);else if(A&&!D&&!I){var R=E.getAttribute("viewBox").split(/\s+|,/);D=R[2],I=R[3]}if(x){if(!D||!I)break t;p=D*x,v=I*x}E.setAttribute("width",p.toString()+"px"),E.setAttribute("height",v.toString()+"px"),d=[(new XMLSerializer).serializeToString(E)]}try{var F=new window.Blob(d,{type:"image/svg+xml;charset=utf-8"})}catch{return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var N=this,V=!1;this.data.onload=function(){V||g.revokeObjectURL(N.data),N.onProcessComplete()},this.data.onerror=function(){V?N.onProcessError():(V=!0,g.revokeObjectURL(N.data),N.data.src="data:image/svg+xml,"+encodeURIComponent(d.join("")))},g.createObjectURL(this.data,F,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});f.register("svg",function(m,d,p,v){if(Array.isArray(m))for(var x=0;x{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="js";if(c(p)){var _=p;p=h(_,"key"),v=h(_,"url"),x=h(_,"xhrSettings"),y=h(_,"extension",y)}g.call(this,d,{type:"text",extension:y,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var m=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),d=eval;this.loader.sceneManager.add(this.key,d(m)),this.complete=!0}});f.register("sceneFile",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y,_){var E="js";if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),_=h(A,"xhrSettings"),E=h(A,"extension",E),x=h(A,"systemKey"),y=h(A,"sceneKey")}g.call(this,d,{type:"scenePlugin",cache:!1,extension:E,responseType:"text",key:p,url:v,xhrSettings:_,config:{systemKey:x,sceneKey:y}}),"function"==typeof v&&(this.data=v,this.state=T.FILE_POPULATED)},onProcess:function(){var m=this.loader.systems.plugins,d=this.config,p=this.key,v=h(d,"systemKey",p),x=h(d,"sceneKey",p);this.state===T.FILE_POPULATED?m.installScenePlugin(v,this.data,x,this.loader.scene,!0):(this.state=T.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),m.installScenePlugin(v,window[this.key],x,this.loader.scene,!0)),this.onProcessComplete()}});f.register("scenePlugin",function(m,d,p,v,x){if(Array.isArray(m))for(var y=0;y{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x,y){var _="js";if(c(p)){var E=p;p=h(E,"key"),v=h(E,"url"),x=h(E,"type","script"),y=h(E,"xhrSettings"),_=h(E,"extension",_)}else void 0===x&&(x="script");g.call(this,d,{type:x,cache:!1,extension:_,responseType:"text",key:p,url:v,xhrSettings:y})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});f.register("script",function(m,d,p,v){if(Array.isArray(m))for(var x=0;x{var b=a(83419),T=a(23906),g=a(74099),f=a(19550),h=new b({Extends:f,initialize:function(u,m,d,p,v){f.call(this,u,m,d,v,p),this.type="spritesheet"},addToCache:function(){var c=this.linkFile;c?c.state>=T.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addSpriteSheet(this.key,c.data,this.config,this.data):this.cache.addSpriteSheet(this.key,this.data,this.config,c.data)):this.cache.addSpriteSheet(this.key,this.data,this.config)}});g.register("spritesheet",function(c,u,m,d){if(Array.isArray(c))for(var p=0;p{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=new b({Extends:g,initialize:function(d,p,v,x){var y="text",_="txt",E=d.cacheManager.text;if(c(p)){var A=p;p=h(A,"key"),v=h(A,"url"),x=h(A,"xhrSettings"),_=h(A,"extension",_),y=h(A,"type",y),E=h(A,"cache",E)}g.call(this,d,{type:y,cache:E,extension:_,responseType:"text",key:p,url:v,xhrSettings:x})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});f.register("text",function(m,d,p){if(Array.isArray(m))for(var v=0;v{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(80341),m=new b({Extends:g,initialize:function(p,v,x,y){var _="csv";if(c(v)){var E=v;v=h(E,"key"),x=h(E,"url"),y=h(E,"xhrSettings"),_=h(E,"extension",_)}g.call(this,p,{type:"tilemapCSV",cache:p.cacheManager.tilemap,extension:_,responseType:"text",key:v,url:x,xhrSettings:y}),this.tilemapFormat=u.CSV},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){this.cache.add(this.key,{format:this.tilemapFormat,data:this.data})}});f.register("tilemapCSV",function(d,p,v){if(Array.isArray(d))for(var x=0;x{var b=a(83419),T=a(74099),g=a(518),f=a(80341),h=new b({Extends:g,initialize:function(u,m,d,p){g.call(this,u,m,d,p),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){this.cache.add(this.key,{format:f.WELTMEISTER,data:this.data})}});T.register("tilemapImpact",function(c,u,m){if(Array.isArray(c))for(var d=0;d{var b=a(83419),T=a(74099),g=a(518),f=a(80341),h=new b({Extends:g,initialize:function(u,m,d,p){g.call(this,u,m,d,p),this.type="tilemapJSON",this.cache=u.cacheManager.tilemap},addToCache:function(){this.cache.add(this.key,{format:f.TILED_JSON,data:this.data})}});T.register("tilemapTiledJSON",function(c,u,m){if(Array.isArray(c))for(var d=0;d{var b=a(83419),T=a(74099),g=a(95540),f=a(19550),h=a(41212),c=a(26430),u=a(78776),m=new b({Extends:c,initialize:function(p,v,x,y,_,E){var A,D;if(h(v)){var I=v;v=g(I,"key"),A=new f(p,{key:v,url:g(I,"textureURL"),extension:g(I,"textureExtension","png"),normalMap:g(I,"normalMap"),xhrSettings:g(I,"textureXhrSettings")}),D=new u(p,{key:v,url:g(I,"atlasURL"),extension:g(I,"atlasExtension","txt"),xhrSettings:g(I,"atlasXhrSettings")})}else A=new f(p,v,x,_),D=new u(p,v,y,E);c.call(this,p,"unityatlas",v,A.linkFile?[A,D,A.linkFile]:[A,D])},addToCache:function(){if(this.isReadyToProcess()){var d=this.files[0];this.loader.textureManager.addUnityAtlas(d.key,d.data,this.files[1].data,this.files[2]?this.files[2].data:null),this.complete=!0}}});T.register("unityAtlas",function(d,p,v,x,y){var _;if(Array.isArray(d))for(var E=0;E{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(98356),c=a(95540),u=a(41212),m=new b({Extends:g,initialize:function(p,v,x,y){if(void 0===y&&(y=!1),u(v)){var _=v;v=c(_,"key"),x=c(_,"url",[]),y=c(_,"noAudio",!1)}var E=p.systems.game.device.video.getVideoURL(x);E||console.warn("VideoFile: No supported format for "+v),g.call(this,p,{type:"video",cache:p.cacheManager.video,extension:E.type,key:v,url:E.url,config:{noAudio:y}})},onProcess:function(){this.data={url:this.src,noAudio:this.config.noAudio,crossOrigin:this.crossOrigin},this.onProcessComplete()},load:function(){this.src=h(this,this.loader.baseURL),this.state=T.FILE_LOADED,this.loader.nextFile(this,!0)}});f.register("video",function(d,p,v){if(Array.isArray(d))for(var x=0;x{var b=a(83419),T=a(23906),g=a(41299),f=a(74099),h=a(95540),c=a(41212),u=a(56836),m=new b({Extends:g,initialize:function(p,v,x,y){var _="xml";if(c(v)){var E=v;v=h(E,"key"),x=h(E,"url"),y=h(E,"xhrSettings"),_=h(E,"extension",_)}g.call(this,p,{type:"xml",cache:p.cacheManager.xml,extension:_,responseType:"text",key:v,url:x,xhrSettings:y})},onProcess:function(){this.state=T.FILE_PROCESSING,this.data=u(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});f.register("xml",function(d,p,v){if(Array.isArray(d))for(var x=0;x{S.exports={AnimationJSONFile:a(14135),AsepriteFile:a(76272),AtlasJSONFile:a(38734),AtlasXMLFile:a(74599),AudioFile:a(21097),AudioSpriteFile:a(89524),BinaryFile:a(85722),BitmapFontFile:a(97025),CompressedTextureFile:a(69559),CSSFile:a(16024),FontFile:a(87674),GLSLFile:a(47931),HTML5AudioFile:a(89749),HTMLFile:a(88470),HTMLTextureFile:a(14643),ImageFile:a(19550),JSONFile:a(518),MultiAtlasFile:a(59327),MultiScriptFile:a(99297),OBJFile:a(41846),PackFile:a(58610),PluginFile:a(48988),SceneFile:a(88423),ScenePluginFile:a(56812),ScriptFile:a(34328),SpriteSheetFile:a(85035),SVGFile:a(67397),TextFile:a(78776),TilemapCSVFile:a(49477),TilemapImpactFile:a(40807),TilemapJSONFile:a(56775),UnityAtlasFile:a(25771),VideoFile:a(33720),XMLFile:a(57318)}},57777:(S,k,a)=>{var b=a(23906),T=a(79291),g={Events:a(54899),FileTypes:a(64589),File:a(41299),FileTypesManager:a(74099),GetURL:a(98356),LoaderPlugin:a(74261),MergeXHRSettings:a(3374),MultiFile:a(26430),XHRLoader:a(84376),XHRSettings:a(92638)};g=T(!1,g,b),S.exports=g},53307:S=>{S.exports=function(a){for(var b=0,T=0;T{var b=a(6411);S.exports=function(g,f){return b(g)/b(f)/b(g-f)}},30976:S=>{S.exports=function(a,b){return Math.floor(Math.random()*(b-a+1)+a)}},87842:S=>{S.exports=function(a,b,T,g,f){var h=.5*(g-b),c=.5*(f-T),u=a*a;return(2*T-2*g+h+c)*(a*u)+(-3*T+3*g-2*h-c)*u+h*a+T}},26302:S=>{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=10);var g=Math.pow(T,-b);return Math.ceil(a*g)/g}},45319:S=>{S.exports=function(a,b,T){return Math.max(b,Math.min(T,a))}},39506:(S,k,a)=>{var b=a(36383);S.exports=function(g){return g*b.DEG_TO_RAD}},61241:S=>{S.exports=function(a,b){return Math.abs(a-b)}},38857:(S,k,a)=>{var b=a(45319),T=a(83419),g=a(37867),f=a(29747),h=new g,c=new T({initialize:function u(m,d,p,v){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v=u.DefaultOrder),this._x=m,this._y=d,this._z=p,this._order=v,this.onChangeCallback=f},x:{get:function(){return this._x},set:function(u){this._x=u,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(u){this._y=u,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(u){this._z=u,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(u){this._order=u,this.onChangeCallback(this)}},set:function(u,m,d,p){return void 0===p&&(p=this._order),this._x=u,this._y=m,this._z=d,this._order=p,this.onChangeCallback(this),this},copy:function(u){return this.set(u.x,u.y,u.z,u.order)},setFromQuaternion:function(u,m,d){return void 0===m&&(m=this._order),void 0===d&&(d=!1),h.fromQuat(u),this.setFromRotationMatrix(h,m,d)},setFromRotationMatrix:function(u,m,d){void 0===m&&(m=this._order),void 0===d&&(d=!1);var p=u.val,v=p[0],x=p[4],y=p[8],_=p[1],E=p[5],A=p[9],D=p[2],I=p[6],R=p[10],F=0,N=0,V=0,B=.99999;switch(m){case"XYZ":N=Math.asin(b(y,-1,1)),Math.abs(y){S.exports=function(a){if(0===a)return 1;for(var b=a;--a;)b*=a;return b}},99472:S=>{S.exports=function(a,b){return Math.random()*(b-a)+a}},77623:S=>{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=10);var g=Math.pow(T,-b);return Math.floor(a*g)/g}},62945:(S,k,a)=>{var b=a(45319);S.exports=function(g,f,h){return(h-f)*(g=b(g,0,1))+f}},38265:S=>{S.exports=function(a,b){return a/b/1e3}},78702:S=>{S.exports=function(a){return a==parseFloat(a)?!(a%2):void 0}},94883:S=>{S.exports=function(a){return a===parseFloat(a)?!(a%2):void 0}},28915:S=>{S.exports=function(a,b,T){return(b-a)*T+a}},94908:S=>{S.exports=function(a,b,T){return void 0===T&&(T=0),a.clone().lerp(b,T)}},94434:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){this.val=new Float32Array(9),f?this.copy(f):this.identity()},clone:function(){return new T(this)},set:function(g){return this.copy(g)},copy:function(g){var f=this.val,h=g.val;return f[0]=h[0],f[1]=h[1],f[2]=h[2],f[3]=h[3],f[4]=h[4],f[5]=h[5],f[6]=h[6],f[7]=h[7],f[8]=h[8],this},fromMat4:function(g){var f=g.val,h=this.val;return h[0]=f[0],h[1]=f[1],h[2]=f[2],h[3]=f[4],h[4]=f[5],h[5]=f[6],h[6]=f[8],h[7]=f[9],h[8]=f[10],this},fromArray:function(g){var f=this.val;return f[0]=g[0],f[1]=g[1],f[2]=g[2],f[3]=g[3],f[4]=g[4],f[5]=g[5],f[6]=g[6],f[7]=g[7],f[8]=g[8],this},identity:function(){var g=this.val;return g[0]=1,g[1]=0,g[2]=0,g[3]=0,g[4]=1,g[5]=0,g[6]=0,g[7]=0,g[8]=1,this},transpose:function(){var g=this.val,f=g[1],h=g[2],c=g[5];return g[1]=g[3],g[2]=g[6],g[3]=f,g[5]=g[7],g[6]=h,g[7]=c,this},invert:function(){var g=this.val,f=g[0],h=g[1],c=g[2],u=g[3],m=g[4],d=g[5],p=g[6],v=g[7],x=g[8],y=x*m-d*v,_=-x*u+d*p,E=v*u-m*p,A=f*y+h*_+c*E;return A?(g[0]=y*(A=1/A),g[1]=(-x*h+c*v)*A,g[2]=(d*h-c*m)*A,g[3]=_*A,g[4]=(x*f-c*p)*A,g[5]=(-d*f+c*u)*A,g[6]=E*A,g[7]=(-v*f+h*p)*A,g[8]=(m*f-h*u)*A,this):null},adjoint:function(){var g=this.val,f=g[0],h=g[1],c=g[2],u=g[3],m=g[4],d=g[5],p=g[6],v=g[7],x=g[8];return g[0]=m*x-d*v,g[1]=c*v-h*x,g[2]=h*d-c*m,g[3]=d*p-u*x,g[4]=f*x-c*p,g[5]=c*u-f*d,g[6]=u*v-m*p,g[7]=h*p-f*v,g[8]=f*m-h*u,this},determinant:function(){var g=this.val,u=g[3],m=g[4],d=g[5],p=g[6],v=g[7],x=g[8];return g[0]*(x*m-d*v)+g[1]*(-x*u+d*p)+g[2]*(v*u-m*p)},multiply:function(g){var f=this.val,h=f[0],c=f[1],u=f[2],m=f[3],d=f[4],p=f[5],v=f[6],x=f[7],y=f[8],_=g.val,E=_[0],A=_[1],D=_[2],I=_[3],R=_[4],F=_[5],N=_[6],V=_[7],B=_[8];return f[0]=E*h+A*m+D*v,f[1]=E*c+A*d+D*x,f[2]=E*u+A*p+D*y,f[3]=I*h+R*m+F*v,f[4]=I*c+R*d+F*x,f[5]=I*u+R*p+F*y,f[6]=N*h+V*m+B*v,f[7]=N*c+V*d+B*x,f[8]=N*u+V*p+B*y,this},translate:function(g){var f=this.val,h=g.x,c=g.y;return f[6]=h*f[0]+c*f[3]+f[6],f[7]=h*f[1]+c*f[4]+f[7],f[8]=h*f[2]+c*f[5]+f[8],this},rotate:function(g){var f=this.val,h=f[0],c=f[1],u=f[2],m=f[3],d=f[4],p=f[5],v=Math.sin(g),x=Math.cos(g);return f[0]=x*h+v*m,f[1]=x*c+v*d,f[2]=x*u+v*p,f[3]=x*m-v*h,f[4]=x*d-v*c,f[5]=x*p-v*u,this},scale:function(g){var f=this.val,h=g.x,c=g.y;return f[0]=h*f[0],f[1]=h*f[1],f[2]=h*f[2],f[3]=c*f[3],f[4]=c*f[4],f[5]=c*f[5],this},fromQuat:function(g){var f=g.x,h=g.y,c=g.z,u=g.w,m=f+f,d=h+h,p=c+c,v=f*m,x=f*d,y=f*p,_=h*d,E=h*p,A=c*p,D=u*m,I=u*d,R=u*p,F=this.val;return F[0]=1-(_+A),F[3]=x+R,F[6]=y-I,F[1]=x-R,F[4]=1-(v+A),F[7]=E+D,F[2]=y+I,F[5]=E-D,F[8]=1-(v+_),this},normalFromMat4:function(g){var f=g.val,h=this.val,c=f[0],u=f[1],m=f[2],d=f[3],p=f[4],v=f[5],x=f[6],y=f[7],_=f[8],E=f[9],A=f[10],D=f[11],I=f[12],R=f[13],F=f[14],N=f[15],V=c*v-u*p,B=c*x-m*p,H=c*y-d*p,Q=u*x-m*v,G=u*y-d*v,K=m*y-d*x,q=_*R-E*I,at=_*F-A*I,ot=_*N-D*I,J=E*F-A*R,it=E*N-D*R,Y=A*N-D*F,j=V*Y-B*it+H*J+Q*ot-G*at+K*q;return j?(h[0]=(v*Y-x*it+y*J)*(j=1/j),h[1]=(x*ot-p*Y-y*at)*j,h[2]=(p*it-v*ot+y*q)*j,h[3]=(m*it-u*Y-d*J)*j,h[4]=(c*Y-m*ot+d*at)*j,h[5]=(u*ot-c*it-d*q)*j,h[6]=(R*K-F*G+N*Q)*j,h[7]=(F*H-I*K-N*B)*j,h[8]=(I*G-R*H+N*V)*j,this):null}});S.exports=T},37867:(S,k,a)=>{var b=a(83419),T=a(25836),g=1e-6,f=new b({initialize:function(v){this.val=new Float32Array(16),v?this.copy(v):this.identity()},clone:function(){return new f(this)},set:function(p){return this.copy(p)},setValues:function(p,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q){var G=this.val;return G[0]=p,G[1]=v,G[2]=x,G[3]=y,G[4]=_,G[5]=E,G[6]=A,G[7]=D,G[8]=I,G[9]=R,G[10]=F,G[11]=N,G[12]=V,G[13]=B,G[14]=H,G[15]=Q,this},copy:function(p){var v=p.val;return this.setValues(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15])},fromArray:function(p){return this.setValues(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(p,v,x){var _=h.fromQuat(x).val,E=v.x,A=v.y,D=v.z;return this.setValues(_[0]*E,_[1]*E,_[2]*E,0,_[4]*A,_[5]*A,_[6]*A,0,_[8]*D,_[9]*D,_[10]*D,0,p.x,p.y,p.z,1)},xyz:function(p,v,x){this.identity();var y=this.val;return y[12]=p,y[13]=v,y[14]=x,this},scaling:function(p,v,x){this.zero();var y=this.val;return y[0]=p,y[5]=v,y[10]=x,y[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var p=this.val,v=p[1],x=p[2],y=p[3],_=p[6],E=p[7],A=p[11];return p[1]=p[4],p[2]=p[8],p[3]=p[12],p[4]=v,p[6]=p[9],p[7]=p[13],p[8]=x,p[9]=_,p[11]=p[14],p[12]=y,p[13]=E,p[14]=A,this},getInverse:function(p){return this.copy(p),this.invert()},invert:function(){var p=this.val,v=p[0],x=p[1],y=p[2],_=p[3],E=p[4],A=p[5],D=p[6],I=p[7],R=p[8],F=p[9],N=p[10],V=p[11],B=p[12],H=p[13],Q=p[14],G=p[15],K=v*A-x*E,q=v*D-y*E,at=v*I-_*E,ot=x*D-y*A,J=x*I-_*A,it=y*I-_*D,Y=R*H-F*B,j=R*Q-N*B,nt=R*G-V*B,ht=F*Q-N*H,gt=F*G-V*H,wt=N*G-V*Q,St=K*wt-q*gt+at*ht+ot*nt-J*j+it*Y;return St?this.setValues((A*wt-D*gt+I*ht)*(St=1/St),(y*gt-x*wt-_*ht)*St,(H*it-Q*J+G*ot)*St,(N*J-F*it-V*ot)*St,(D*nt-E*wt-I*j)*St,(v*wt-y*nt+_*j)*St,(Q*at-B*it-G*q)*St,(R*it-N*at+V*q)*St,(E*gt-A*nt+I*Y)*St,(x*nt-v*gt-_*Y)*St,(B*J-H*at+G*K)*St,(F*at-R*J-V*K)*St,(A*j-E*ht-D*Y)*St,(v*ht-x*j+y*Y)*St,(H*q-B*ot-Q*K)*St,(R*ot-F*q+N*K)*St):this},adjoint:function(){var p=this.val,v=p[0],x=p[1],y=p[2],_=p[3],E=p[4],A=p[5],D=p[6],I=p[7],R=p[8],F=p[9],N=p[10],V=p[11],B=p[12],H=p[13],Q=p[14],G=p[15];return this.setValues(A*(N*G-V*Q)-F*(D*G-I*Q)+H*(D*V-I*N),-(x*(N*G-V*Q)-F*(y*G-_*Q)+H*(y*V-_*N)),x*(D*G-I*Q)-A*(y*G-_*Q)+H*(y*I-_*D),-(x*(D*V-I*N)-A*(y*V-_*N)+F*(y*I-_*D)),-(E*(N*G-V*Q)-R*(D*G-I*Q)+B*(D*V-I*N)),v*(N*G-V*Q)-R*(y*G-_*Q)+B*(y*V-_*N),-(v*(D*G-I*Q)-E*(y*G-_*Q)+B*(y*I-_*D)),v*(D*V-I*N)-E*(y*V-_*N)+R*(y*I-_*D),E*(F*G-V*H)-R*(A*G-I*H)+B*(A*V-I*F),-(v*(F*G-V*H)-R*(x*G-_*H)+B*(x*V-_*F)),v*(A*G-I*H)-E*(x*G-_*H)+B*(x*I-_*A),-(v*(A*V-I*F)-E*(x*V-_*F)+R*(x*I-_*A)),-(E*(F*Q-N*H)-R*(A*Q-D*H)+B*(A*N-D*F)),v*(F*Q-N*H)-R*(x*Q-y*H)+B*(x*N-y*F),-(v*(A*Q-D*H)-E*(x*Q-y*H)+B*(x*D-y*A)),v*(A*N-D*F)-E*(x*N-y*F)+R*(x*D-y*A))},determinant:function(){var p=this.val,v=p[0],x=p[1],y=p[2],_=p[3],E=p[4],A=p[5],D=p[6],I=p[7],R=p[8],F=p[9],N=p[10],V=p[11],B=p[12],H=p[13],Q=p[14],G=p[15];return(v*A-x*E)*(N*G-V*Q)-(v*D-y*E)*(F*G-V*H)+(v*I-_*E)*(F*Q-N*H)+(x*D-y*A)*(R*G-V*B)-(x*I-_*A)*(R*Q-N*B)+(y*I-_*D)*(R*H-F*B)},multiply:function(p){var v=this.val,x=v[0],y=v[1],_=v[2],E=v[3],A=v[4],D=v[5],I=v[6],R=v[7],F=v[8],N=v[9],V=v[10],B=v[11],H=v[12],Q=v[13],G=v[14],K=v[15],q=p.val,at=q[0],ot=q[1],J=q[2],it=q[3];return v[0]=at*x+ot*A+J*F+it*H,v[1]=at*y+ot*D+J*N+it*Q,v[2]=at*_+ot*I+J*V+it*G,v[3]=at*E+ot*R+J*B+it*K,v[4]=(at=q[4])*x+(ot=q[5])*A+(J=q[6])*F+(it=q[7])*H,v[5]=at*y+ot*D+J*N+it*Q,v[6]=at*_+ot*I+J*V+it*G,v[7]=at*E+ot*R+J*B+it*K,v[8]=(at=q[8])*x+(ot=q[9])*A+(J=q[10])*F+(it=q[11])*H,v[9]=at*y+ot*D+J*N+it*Q,v[10]=at*_+ot*I+J*V+it*G,v[11]=at*E+ot*R+J*B+it*K,v[12]=(at=q[12])*x+(ot=q[13])*A+(J=q[14])*F+(it=q[15])*H,v[13]=at*y+ot*D+J*N+it*Q,v[14]=at*_+ot*I+J*V+it*G,v[15]=at*E+ot*R+J*B+it*K,this},multiplyLocal:function(p){var v=this.val,x=p.val;return this.setValues(v[0]*x[0]+v[1]*x[4]+v[2]*x[8]+v[3]*x[12],v[0]*x[1]+v[1]*x[5]+v[2]*x[9]+v[3]*x[13],v[0]*x[2]+v[1]*x[6]+v[2]*x[10]+v[3]*x[14],v[0]*x[3]+v[1]*x[7]+v[2]*x[11]+v[3]*x[15],v[4]*x[0]+v[5]*x[4]+v[6]*x[8]+v[7]*x[12],v[4]*x[1]+v[5]*x[5]+v[6]*x[9]+v[7]*x[13],v[4]*x[2]+v[5]*x[6]+v[6]*x[10]+v[7]*x[14],v[4]*x[3]+v[5]*x[7]+v[6]*x[11]+v[7]*x[15],v[8]*x[0]+v[9]*x[4]+v[10]*x[8]+v[11]*x[12],v[8]*x[1]+v[9]*x[5]+v[10]*x[9]+v[11]*x[13],v[8]*x[2]+v[9]*x[6]+v[10]*x[10]+v[11]*x[14],v[8]*x[3]+v[9]*x[7]+v[10]*x[11]+v[11]*x[15],v[12]*x[0]+v[13]*x[4]+v[14]*x[8]+v[15]*x[12],v[12]*x[1]+v[13]*x[5]+v[14]*x[9]+v[15]*x[13],v[12]*x[2]+v[13]*x[6]+v[14]*x[10]+v[15]*x[14],v[12]*x[3]+v[13]*x[7]+v[14]*x[11]+v[15]*x[15])},premultiply:function(p){return this.multiplyMatrices(p,this)},multiplyMatrices:function(p,v){var x=p.val,y=v.val,_=x[0],E=x[4],A=x[8],D=x[12],I=x[1],R=x[5],F=x[9],N=x[13],V=x[2],B=x[6],H=x[10],Q=x[14],G=x[3],K=x[7],q=x[11],at=x[15],ot=y[0],J=y[4],it=y[8],Y=y[12],j=y[1],nt=y[5],ht=y[9],gt=y[13],wt=y[2],St=y[6],Bt=y[10],Yt=y[14],$t=y[3],qt=y[7],ne=y[11],le=y[15];return this.setValues(_*ot+E*j+A*wt+D*$t,I*ot+R*j+F*wt+N*$t,V*ot+B*j+H*wt+Q*$t,G*ot+K*j+q*wt+at*$t,_*J+E*nt+A*St+D*qt,I*J+R*nt+F*St+N*qt,V*J+B*nt+H*St+Q*qt,G*J+K*nt+q*St+at*qt,_*it+E*ht+A*Bt+D*ne,I*it+R*ht+F*Bt+N*ne,V*it+B*ht+H*Bt+Q*ne,G*it+K*ht+q*Bt+at*ne,_*Y+E*gt+A*Yt+D*le,I*Y+R*gt+F*Yt+N*le,V*Y+B*gt+H*Yt+Q*le,G*Y+K*gt+q*Yt+at*le)},translate:function(p){return this.translateXYZ(p.x,p.y,p.z)},translateXYZ:function(p,v,x){var y=this.val;return y[12]=y[0]*p+y[4]*v+y[8]*x+y[12],y[13]=y[1]*p+y[5]*v+y[9]*x+y[13],y[14]=y[2]*p+y[6]*v+y[10]*x+y[14],y[15]=y[3]*p+y[7]*v+y[11]*x+y[15],this},scale:function(p){return this.scaleXYZ(p.x,p.y,p.z)},scaleXYZ:function(p,v,x){var y=this.val;return y[0]=y[0]*p,y[1]=y[1]*p,y[2]=y[2]*p,y[3]=y[3]*p,y[4]=y[4]*v,y[5]=y[5]*v,y[6]=y[6]*v,y[7]=y[7]*v,y[8]=y[8]*x,y[9]=y[9]*x,y[10]=y[10]*x,y[11]=y[11]*x,this},makeRotationAxis:function(p,v){var x=Math.cos(v),y=Math.sin(v),_=1-x,E=p.x,A=p.y,D=p.z,I=_*E,R=_*A;return this.setValues(I*E+x,I*A-y*D,I*D+y*A,0,I*A+y*D,R*A+x,R*D-y*E,0,I*D-y*A,R*D+y*E,_*D*D+x,0,0,0,0,1)},rotate:function(p,v){var x=this.val,y=v.x,_=v.y,E=v.z,A=Math.sqrt(y*y+_*_+E*E);if(Math.abs(A){S.exports=function(a,b,T){return Math.min(a+b,T)}},50040:S=>{S.exports=function(a){var b=a.length;if(0===b)return 0;a.sort(function(g,f){return g-f});var T=Math.floor(b/2);return b%2==0?(a[T]+a[T-1])/2:a[T]}},37204:S=>{S.exports=function(a,b,T){return Math.max(a-b,T)}},65201:S=>{S.exports=function(a,b,T,g){void 0===T&&(T=b+1);var f=(a-b)/(T-b);return f>1?void 0!==g?(f=(g-a)/(g-T))<0&&(f=0):f=1:f<0&&(f=0),f}},15746:(S,k,a)=>{var b=a(83419),T=a(94434),g=a(29747),f=a(25836),h=1e-6,c=new Int8Array([1,2,0]),u=new Float32Array([0,0,0]),m=new f(1,0,0),d=new f(0,1,0),p=new f,v=new T,x=new b({initialize:function(_,E,A,D){this.onChangeCallback=g,this.set(_,E,A,D)},x:{get:function(){return this._x},set:function(y){this._x=y,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(y){this._y=y,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(y){this._z=y,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(y){this._w=y,this.onChangeCallback(this)}},copy:function(y){return this.set(y)},set:function(y,_,E,A,D){return void 0===D&&(D=!0),"object"==typeof y?(this._x=y.x||0,this._y=y.y||0,this._z=y.z||0,this._w=y.w||0):(this._x=y||0,this._y=_||0,this._z=E||0,this._w=A||0),D&&this.onChangeCallback(this),this},add:function(y){return this._x+=y.x,this._y+=y.y,this._z+=y.z,this._w+=y.w,this.onChangeCallback(this),this},subtract:function(y){return this._x-=y.x,this._y-=y.y,this._z-=y.z,this._w-=y.w,this.onChangeCallback(this),this},scale:function(y){return this._x*=y,this._y*=y,this._z*=y,this._w*=y,this.onChangeCallback(this),this},length:function(){var y=this.x,_=this.y,E=this.z,A=this.w;return Math.sqrt(y*y+_*_+E*E+A*A)},lengthSq:function(){var y=this.x,_=this.y,E=this.z,A=this.w;return y*y+_*_+E*E+A*A},normalize:function(){var y=this.x,_=this.y,E=this.z,A=this.w,D=y*y+_*_+E*E+A*A;return D>0&&(D=1/Math.sqrt(D),this._x=y*D,this._y=_*D,this._z=E*D,this._w=A*D),this.onChangeCallback(this),this},dot:function(y){return this.x*y.x+this.y*y.y+this.z*y.z+this.w*y.w},lerp:function(y,_){void 0===_&&(_=0);var E=this.x,A=this.y,D=this.z,I=this.w;return this.set(E+_*(y.x-E),A+_*(y.y-A),D+_*(y.z-D),I+_*(y.w-I))},rotationTo:function(y,_){var E=y.x*_.x+y.y*_.y+y.z*_.z;return E<-.999999?(p.copy(m).cross(y).length().999999?this.set(0,0,0,1):(p.copy(y).cross(_),this._x=p.x,this._y=p.y,this._z=p.z,this._w=1+E,this.normalize())},setAxes:function(y,_,E){var A=v.val;return A[0]=_.x,A[3]=_.y,A[6]=_.z,A[1]=E.x,A[4]=E.y,A[7]=E.z,A[2]=-y.x,A[5]=-y.y,A[8]=-y.z,this.fromMat3(v).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(y,_){_*=.5;var E=Math.sin(_);return this.set(E*y.x,E*y.y,E*y.z,Math.cos(_))},multiply:function(y){var _=this.x,E=this.y,A=this.z,D=this.w,I=y.x,R=y.y,F=y.z,N=y.w;return this.set(_*N+D*I+E*F-A*R,E*N+D*R+A*I-_*F,A*N+D*F+_*R-E*I,D*N-_*I-E*R-A*F)},slerp:function(y,_){var E=this.x,A=this.y,D=this.z,I=this.w,R=y.x,F=y.y,N=y.z,V=y.w,B=E*R+A*F+D*N+I*V;B<0&&(B=-B,R=-R,F=-F,N=-N,V=-V);var H=1-_,Q=_;if(1-B>h){var G=Math.acos(B),K=Math.sin(G);H=Math.sin((1-_)*G)/K,Q=Math.sin(_*G)/K}return this.set(H*E+Q*R,H*A+Q*F,H*D+Q*N,H*I+Q*V)},invert:function(){var y=this.x,_=this.y,E=this.z,A=this.w,D=y*y+_*_+E*E+A*A,I=D?1/D:0;return this.set(-y*I,-_*I,-E*I,A*I)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(y){y*=.5;var _=this.x,E=this.y,A=this.z,D=this.w,I=Math.sin(y),R=Math.cos(y);return this.set(_*R+D*I,E*R+A*I,A*R-E*I,D*R-_*I)},rotateY:function(y){y*=.5;var _=this.x,E=this.y,A=this.z,D=this.w,I=Math.sin(y),R=Math.cos(y);return this.set(_*R-A*I,E*R+D*I,A*R+_*I,D*R-E*I)},rotateZ:function(y){y*=.5;var _=this.x,E=this.y,A=this.z,D=this.w,I=Math.sin(y),R=Math.cos(y);return this.set(_*R+E*I,E*R-_*I,A*R+D*I,D*R-A*I)},calculateW:function(){var y=this.x,_=this.y,E=this.z;return this.w=-Math.sqrt(1-y*y-_*_-E*E),this},setFromEuler:function(y,_){var E=y.x/2,A=y.y/2,D=y.z/2,I=Math.cos(E),R=Math.cos(A),F=Math.cos(D),N=Math.sin(E),V=Math.sin(A),B=Math.sin(D);switch(y.order){case"XYZ":this.set(N*R*F+I*V*B,I*V*F-N*R*B,I*R*B+N*V*F,I*R*F-N*V*B,_);break;case"YXZ":this.set(N*R*F+I*V*B,I*V*F-N*R*B,I*R*B-N*V*F,I*R*F+N*V*B,_);break;case"ZXY":this.set(N*R*F-I*V*B,I*V*F+N*R*B,I*R*B+N*V*F,I*R*F-N*V*B,_);break;case"ZYX":this.set(N*R*F-I*V*B,I*V*F+N*R*B,I*R*B-N*V*F,I*R*F+N*V*B,_);break;case"YZX":this.set(N*R*F+I*V*B,I*V*F+N*R*B,I*R*B-N*V*F,I*R*F-N*V*B,_);break;case"XZY":this.set(N*R*F-I*V*B,I*V*F-N*R*B,I*R*B+N*V*F,I*R*F+N*V*B,_)}return this},setFromRotationMatrix:function(y){var Q,_=y.val,E=_[0],A=_[4],D=_[8],I=_[1],R=_[5],F=_[9],N=_[2],V=_[6],B=_[10],H=E+R+B;return H>0?(Q=.5/Math.sqrt(H+1),this.set((V-F)*Q,(D-N)*Q,(I-A)*Q,.25/Q)):E>R&&E>B?(Q=2*Math.sqrt(1+E-R-B),this.set(.25*Q,(A+I)/Q,(D+N)/Q,(V-F)/Q)):R>B?(Q=2*Math.sqrt(1+R-E-B),this.set((A+I)/Q,.25*Q,(F+V)/Q,(D-N)/Q)):(Q=2*Math.sqrt(1+B-E-R),this.set((D+N)/Q,(F+V)/Q,.25*Q,(I-A)/Q)),this},fromMat3:function(y){var A,_=y.val,E=_[0]+_[4]+_[8];if(E>0)A=Math.sqrt(E+1),this.w=.5*A,this._x=(_[7]-_[5])*(A=.5/A),this._y=(_[2]-_[6])*A,this._z=(_[3]-_[1])*A;else{var D=0;_[4]>_[0]&&(D=1),_[8]>_[3*D+D]&&(D=2);var I=c[D],R=c[I];A=Math.sqrt(_[3*D+D]-_[3*I+I]-_[3*R+R]+1),u[D]=.5*A,u[I]=(_[3*I+D]+_[3*D+I])*(A=.5/A),u[R]=(_[3*R+D]+_[3*D+R])*A,this._x=u[0],this._y=u[1],this._z=u[2],this._w=(_[3*R+I]-_[3*I+R])*A}return this.onChangeCallback(this),this}});S.exports=x},43396:(S,k,a)=>{var b=a(36383);S.exports=function(g){return g*b.RAD_TO_DEG}},74362:S=>{S.exports=function(a,b){void 0===b&&(b=1);var T=2*Math.random()*Math.PI;return a.x=Math.cos(T)*b,a.y=Math.sin(T)*b,a}},60706:S=>{S.exports=function(a,b){void 0===b&&(b=1);var T=2*Math.random()*Math.PI,g=2*Math.random()-1,f=Math.sqrt(1-g*g)*b;return a.x=Math.cos(T)*f,a.y=Math.sin(T)*f,a.z=g*b,a}},67421:S=>{S.exports=function(a,b){return void 0===b&&(b=1),a.x=(2*Math.random()-1)*b,a.y=(2*Math.random()-1)*b,a.z=(2*Math.random()-1)*b,a.w=(2*Math.random()-1)*b,a}},36305:S=>{S.exports=function(a,b){var T=a.x,g=a.y;return a.x=T*Math.cos(b)-g*Math.sin(b),a.y=T*Math.sin(b)+g*Math.cos(b),a}},11520:S=>{S.exports=function(a,b,T,g){var f=Math.cos(g),h=Math.sin(g),c=a.x-b,u=a.y-T;return a.x=c*f-u*h+b,a.y=c*h+u*f+T,a}},1163:S=>{S.exports=function(a,b,T,g,f){var h=g+Math.atan2(a.y-T,a.x-b);return a.x=b+f*Math.cos(h),a.y=T+f*Math.sin(h),a}},70336:S=>{S.exports=function(a,b,T,g,f){return a.x=b+f*Math.cos(g),a.y=T+f*Math.sin(g),a}},72678:(S,k,a)=>{var b=a(25836),T=a(37867),g=a(15746),f=new T,h=new g,c=new b;S.exports=function(m,d,p){return h.setAxisAngle(d,p),f.fromRotationTranslation(h,c.set(0,0,0)),m.transformMat4(f)}},2284:S=>{S.exports=function(a){return a>0?Math.ceil(a):Math.floor(a)}},41013:S=>{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=10);var g=Math.pow(T,-b);return Math.round(a*g)/g}},16922:S=>{S.exports=function(a,b,T,g){void 0===b&&(b=1),void 0===T&&(T=1),void 0===g&&(g=1),g*=Math.PI/a;for(var f=[],h=[],c=0;c{S.exports=function(a,b,T){return a<=b?0:a>=T?1:(a=(a-b)/(T-b))*a*(3-2*a)}},54261:S=>{S.exports=function(a,b,T){return(a=Math.max(0,Math.min(1,(a-b)/(T-b))))*a*a*(a*(6*a-15)+10)}},44408:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c){void 0===c&&(c=new b);var u=0,m=0;return g>0&&g<=f*h&&(u=g>f-1?g-(m=Math.floor(g/f))*f:g),c.set(u,m)}},85955:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m,d,p){void 0===p&&(p=new b);var v=Math.sin(u),x=Math.cos(u),y=x*m,_=v*m,E=-v*d,A=x*d,D=1/(y*A+E*-_);return p.x=A*D*g+-E*D*f+(c*E-h*A)*D,p.y=y*D*f+-_*D*g+(-c*y+h*_)*D,p}},26099:(S,k,a)=>{var b=a(83419),T=a(43855),g=new b({initialize:function(h,c){this.x=0,this.y=0,"object"==typeof h?(this.x=h.x||0,this.y=h.y||0):(void 0===c&&(c=h),this.x=h||0,this.y=c||0)},clone:function(){return new g(this.x,this.y)},copy:function(f){return this.x=f.x||0,this.y=f.y||0,this},setFromObject:function(f){return this.x=f.x||0,this.y=f.y||0,this},set:function(f,h){return void 0===h&&(h=f),this.x=f,this.y=h,this},setTo:function(f,h){return this.set(f,h)},setToPolar:function(f,h){return null==h&&(h=1),this.x=Math.cos(f)*h,this.y=Math.sin(f)*h,this},equals:function(f){return this.x===f.x&&this.y===f.y},fuzzyEquals:function(f,h){return T(this.x,f.x,h)&&T(this.y,f.y,h)},angle:function(){var f=Math.atan2(this.y,this.x);return f<0&&(f+=2*Math.PI),f},setAngle:function(f){return this.setToPolar(f,this.length())},add:function(f){return this.x+=f.x,this.y+=f.y,this},subtract:function(f){return this.x-=f.x,this.y-=f.y,this},multiply:function(f){return this.x*=f.x,this.y*=f.y,this},scale:function(f){return isFinite(f)?(this.x*=f,this.y*=f):(this.x=0,this.y=0),this},divide:function(f){return this.x/=f.x,this.y/=f.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(f){var h=f.x-this.x,c=f.y-this.y;return Math.sqrt(h*h+c*c)},distanceSq:function(f){var h=f.x-this.x,c=f.y-this.y;return h*h+c*c},length:function(){var f=this.x,h=this.y;return Math.sqrt(f*f+h*h)},setLength:function(f){return this.normalize().scale(f)},lengthSq:function(){var f=this.x,h=this.y;return f*f+h*h},normalize:function(){var f=this.x,h=this.y,c=f*f+h*h;return c>0&&(c=1/Math.sqrt(c),this.x=f*c,this.y=h*c),this},normalizeRightHand:function(){var f=this.x;return this.x=-1*this.y,this.y=f,this},normalizeLeftHand:function(){var f=this.x;return this.x=this.y,this.y=-1*f,this},dot:function(f){return this.x*f.x+this.y*f.y},cross:function(f){return this.x*f.y-this.y*f.x},lerp:function(f,h){void 0===h&&(h=0);var c=this.x,u=this.y;return this.x=c+h*(f.x-c),this.y=u+h*(f.y-u),this},transformMat3:function(f){var h=this.x,c=this.y,u=f.val;return this.x=u[0]*h+u[3]*c+u[6],this.y=u[1]*h+u[4]*c+u[7],this},transformMat4:function(f){var h=this.x,c=this.y,u=f.val;return this.x=u[0]*h+u[4]*c+u[12],this.y=u[1]*h+u[5]*c+u[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(f){var h=this.length();return h&&h>f&&this.scale(f/h),this},reflect:function(f){return f=f.clone().normalize(),this.subtract(f.scale(2*this.dot(f)))},mirror:function(f){return this.reflect(f).negate()},rotate:function(f){var h=Math.cos(f),c=Math.sin(f);return this.set(h*this.x-c*this.y,c*this.x+h*this.y)},project:function(f){var h=this.dot(f)/f.dot(f);return this.copy(f).scale(h)}});g.ZERO=new g,g.RIGHT=new g(1,0),g.LEFT=new g(-1,0),g.UP=new g(0,-1),g.DOWN=new g(0,1),g.ONE=new g(1,1),S.exports=g},25836:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c){this.x=0,this.y=0,this.z=0,"object"==typeof f?(this.x=f.x||0,this.y=f.y||0,this.z=f.z||0):(this.x=f||0,this.y=h||0,this.z=c||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(g){return this.x=Math.min(this.x,g.x),this.y=Math.min(this.y,g.y),this.z=Math.min(this.z,g.z),this},max:function(g){return this.x=Math.max(this.x,g.x),this.y=Math.max(this.y,g.y),this.z=Math.max(this.z,g.z),this},clone:function(){return new T(this.x,this.y,this.z)},addVectors:function(g,f){return this.x=g.x+f.x,this.y=g.y+f.y,this.z=g.z+f.z,this},subVectors:function(g,f){return this.x=g.x-f.x,this.y=g.y-f.y,this.z=g.z-f.z,this},crossVectors:function(g,f){var h=g.x,c=g.y,u=g.z,m=f.x,d=f.y,p=f.z;return this.x=c*p-u*d,this.y=u*m-h*p,this.z=h*d-c*m,this},equals:function(g){return this.x===g.x&&this.y===g.y&&this.z===g.z},copy:function(g){return this.x=g.x,this.y=g.y,this.z=g.z||0,this},set:function(g,f,h){return"object"==typeof g?(this.x=g.x||0,this.y=g.y||0,this.z=g.z||0):(this.x=g||0,this.y=f||0,this.z=h||0),this},setFromMatrixPosition:function(g){return this.fromArray(g.val,12)},setFromMatrixColumn:function(g,f){return this.fromArray(g.val,4*f)},fromArray:function(g,f){return void 0===f&&(f=0),this.x=g[f],this.y=g[f+1],this.z=g[f+2],this},add:function(g){return this.x+=g.x,this.y+=g.y,this.z+=g.z||0,this},addScalar:function(g){return this.x+=g,this.y+=g,this.z+=g,this},addScale:function(g,f){return this.x+=g.x*f,this.y+=g.y*f,this.z+=g.z*f||0,this},subtract:function(g){return this.x-=g.x,this.y-=g.y,this.z-=g.z||0,this},multiply:function(g){return this.x*=g.x,this.y*=g.y,this.z*=g.z||1,this},scale:function(g){return isFinite(g)?(this.x*=g,this.y*=g,this.z*=g):(this.x=0,this.y=0,this.z=0),this},divide:function(g){return this.x/=g.x,this.y/=g.y,this.z/=g.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0;return Math.sqrt(f*f+h*h+c*c)},distanceSq:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0;return f*f+h*h+c*c},length:function(){var g=this.x,f=this.y,h=this.z;return Math.sqrt(g*g+f*f+h*h)},lengthSq:function(){var g=this.x,f=this.y,h=this.z;return g*g+f*f+h*h},normalize:function(){var g=this.x,f=this.y,h=this.z,c=g*g+f*f+h*h;return c>0&&(c=1/Math.sqrt(c),this.x=g*c,this.y=f*c,this.z=h*c),this},dot:function(g){return this.x*g.x+this.y*g.y+this.z*g.z},cross:function(g){var f=this.x,h=this.y,c=this.z,u=g.x,m=g.y,d=g.z;return this.x=h*d-c*m,this.y=c*u-f*d,this.z=f*m-h*u,this},lerp:function(g,f){void 0===f&&(f=0);var h=this.x,c=this.y,u=this.z;return this.x=h+f*(g.x-h),this.y=c+f*(g.y-c),this.z=u+f*(g.z-u),this},applyMatrix3:function(g){var f=this.x,h=this.y,c=this.z,u=g.val;return this.x=u[0]*f+u[3]*h+u[6]*c,this.y=u[1]*f+u[4]*h+u[7]*c,this.z=u[2]*f+u[5]*h+u[8]*c,this},applyMatrix4:function(g){var f=this.x,h=this.y,c=this.z,u=g.val,m=1/(u[3]*f+u[7]*h+u[11]*c+u[15]);return this.x=(u[0]*f+u[4]*h+u[8]*c+u[12])*m,this.y=(u[1]*f+u[5]*h+u[9]*c+u[13])*m,this.z=(u[2]*f+u[6]*h+u[10]*c+u[14])*m,this},transformMat3:function(g){var f=this.x,h=this.y,c=this.z,u=g.val;return this.x=f*u[0]+h*u[3]+c*u[6],this.y=f*u[1]+h*u[4]+c*u[7],this.z=f*u[2]+h*u[5]+c*u[8],this},transformMat4:function(g){var f=this.x,h=this.y,c=this.z,u=g.val;return this.x=u[0]*f+u[4]*h+u[8]*c+u[12],this.y=u[1]*f+u[5]*h+u[9]*c+u[13],this.z=u[2]*f+u[6]*h+u[10]*c+u[14],this},transformCoordinates:function(g){var f=this.x,h=this.y,c=this.z,u=g.val,d=f*u[1]+h*u[5]+c*u[9]+u[13],p=f*u[2]+h*u[6]+c*u[10]+u[14],v=f*u[3]+h*u[7]+c*u[11]+u[15];return this.x=(f*u[0]+h*u[4]+c*u[8]+u[12])/v,this.y=d/v,this.z=p/v,this},transformQuat:function(g){var f=this.x,h=this.y,c=this.z,u=g.x,m=g.y,d=g.z,p=g.w,v=p*f+m*c-d*h,x=p*h+d*f-u*c,y=p*c+u*h-m*f,_=-u*f-m*h-d*c;return this.x=v*p+_*-u+x*-d-y*-m,this.y=x*p+_*-m+y*-u-v*-d,this.z=y*p+_*-d+v*-m-x*-u,this},project:function(g){var f=this.x,h=this.y,c=this.z,u=g.val,d=u[1],p=u[2],y=u[5],_=u[6],D=u[9],I=u[10],N=u[13],V=u[14],H=1/(f*u[3]+h*u[7]+c*u[11]+u[15]);return this.x=(f*u[0]+h*u[4]+c*u[8]+u[12])*H,this.y=(f*d+h*y+c*D+N)*H,this.z=(f*p+h*_+c*I+V)*H,this},projectViewMatrix:function(g,f){return this.applyMatrix4(g).applyMatrix4(f)},unprojectViewMatrix:function(g,f){return this.applyMatrix4(g).applyMatrix4(f)},unproject:function(g,f){var m=g.w,p=m-this.y-1-g.y,v=this.z;return this.x=2*(this.x-g.x)/g.z-1,this.y=2*p/m-1,this.z=2*v-1,this.project(f)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});T.ZERO=new T,T.RIGHT=new T(1,0,0),T.LEFT=new T(-1,0,0),T.UP=new T(0,-1,0),T.DOWN=new T(0,1,0),T.FORWARD=new T(0,0,1),T.BACK=new T(0,0,-1),T.ONE=new T(1,1,1),S.exports=T},61369:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof f?(this.x=f.x||0,this.y=f.y||0,this.z=f.z||0,this.w=f.w||0):(this.x=f||0,this.y=h||0,this.z=c||0,this.w=u||0)},clone:function(){return new T(this.x,this.y,this.z,this.w)},copy:function(g){return this.x=g.x,this.y=g.y,this.z=g.z||0,this.w=g.w||0,this},equals:function(g){return this.x===g.x&&this.y===g.y&&this.z===g.z&&this.w===g.w},set:function(g,f,h,c){return"object"==typeof g?(this.x=g.x||0,this.y=g.y||0,this.z=g.z||0,this.w=g.w||0):(this.x=g||0,this.y=f||0,this.z=h||0,this.w=c||0),this},add:function(g){return this.x+=g.x,this.y+=g.y,this.z+=g.z||0,this.w+=g.w||0,this},subtract:function(g){return this.x-=g.x,this.y-=g.y,this.z-=g.z||0,this.w-=g.w||0,this},scale:function(g){return this.x*=g,this.y*=g,this.z*=g,this.w*=g,this},length:function(){var g=this.x,f=this.y,h=this.z,c=this.w;return Math.sqrt(g*g+f*f+h*h+c*c)},lengthSq:function(){var g=this.x,f=this.y,h=this.z,c=this.w;return g*g+f*f+h*h+c*c},normalize:function(){var g=this.x,f=this.y,h=this.z,c=this.w,u=g*g+f*f+h*h+c*c;return u>0&&(u=1/Math.sqrt(u),this.x=g*u,this.y=f*u,this.z=h*u,this.w=c*u),this},dot:function(g){return this.x*g.x+this.y*g.y+this.z*g.z+this.w*g.w},lerp:function(g,f){void 0===f&&(f=0);var h=this.x,c=this.y,u=this.z,m=this.w;return this.x=h+f*(g.x-h),this.y=c+f*(g.y-c),this.z=u+f*(g.z-u),this.w=m+f*(g.w-m),this},multiply:function(g){return this.x*=g.x,this.y*=g.y,this.z*=g.z||1,this.w*=g.w||1,this},divide:function(g){return this.x/=g.x,this.y/=g.y,this.z/=g.z||1,this.w/=g.w||1,this},distance:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0,u=g.w-this.w||0;return Math.sqrt(f*f+h*h+c*c+u*u)},distanceSq:function(g){var f=g.x-this.x,h=g.y-this.y,c=g.z-this.z||0,u=g.w-this.w||0;return f*f+h*h+c*c+u*u},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(g){var f=this.x,h=this.y,c=this.z,u=this.w,m=g.val;return this.x=m[0]*f+m[4]*h+m[8]*c+m[12]*u,this.y=m[1]*f+m[5]*h+m[9]*c+m[13]*u,this.z=m[2]*f+m[6]*h+m[10]*c+m[14]*u,this.w=m[3]*f+m[7]*h+m[11]*c+m[15]*u,this},transformQuat:function(g){var f=this.x,h=this.y,c=this.z,u=g.x,m=g.y,d=g.z,p=g.w,v=p*f+m*c-d*h,x=p*h+d*f-u*c,y=p*c+u*h-m*f,_=-u*f-m*h-d*c;return this.x=v*p+_*-u+x*-d-y*-m,this.y=x*p+_*-m+y*-u-v*-d,this.z=y*p+_*-d+v*-m-x*-u,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});T.prototype.sub=T.prototype.subtract,T.prototype.mul=T.prototype.multiply,T.prototype.div=T.prototype.divide,T.prototype.dist=T.prototype.distance,T.prototype.distSq=T.prototype.distanceSq,T.prototype.len=T.prototype.length,T.prototype.lenSq=T.prototype.lengthSq,S.exports=T},60417:S=>{S.exports=function(a,b,T){return Math.abs(a-b)<=T}},15994:S=>{S.exports=function(a,b,T){var g=T-b;return b+((a-b)%g+g)%g}},31040:S=>{S.exports=function(a,b,T,g){return Math.atan2(g-b,T-a)}},55495:S=>{S.exports=function(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}},128:S=>{S.exports=function(a,b){return Math.atan2(b.x-a.x,b.y-a.y)}},41273:S=>{S.exports=function(a,b,T,g){return Math.atan2(T-a,g-b)}},1432:(S,k,a)=>{var b=a(36383);S.exports=function(g){return g>Math.PI&&(g-=b.PI2),Math.abs(((g+b.TAU)%b.PI2-b.PI2)%b.PI2)}},12407:S=>{S.exports=function(a){return(a%=2*Math.PI)>=0?a:a+2*Math.PI}},53993:(S,k,a)=>{var b=a(99472);S.exports=function(){return b(-Math.PI,Math.PI)}},86564:(S,k,a)=>{var b=a(99472);S.exports=function(){return b(-180,180)}},90154:(S,k,a)=>{var b=a(12407);S.exports=function(g){return b(g+Math.PI)}},48736:(S,k,a)=>{var b=a(36383);S.exports=function(g,f,h){return void 0===h&&(h=.05),g===f||(Math.abs(f-g)<=h||Math.abs(f-g)>=b.PI2-h?g=f:(Math.abs(f-g)>Math.PI&&(fg?g+=h:f{S.exports=function(a,b){var T=b-a;return 0===T?0:T-360*Math.floor((T- -180)/360)}},86554:(S,k,a)=>{var b=a(15994);S.exports=function(g){return b(g,-Math.PI,Math.PI)}},30954:(S,k,a)=>{var b=a(15994);S.exports=function(g){return b(g,-180,180)}},25588:(S,k,a)=>{S.exports={Between:a(31040),BetweenPoints:a(55495),BetweenPointsY:a(128),BetweenY:a(41273),CounterClockwise:a(1432),Normalize:a(12407),Random:a(53993),RandomDegrees:a(86564),Reverse:a(90154),RotateTo:a(48736),ShortestBetween:a(61430),Wrap:a(86554),WrapDegrees:a(30954)}},36383:S=>{var k={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};S.exports=k},20339:S=>{S.exports=function(a,b,T,g){var f=a-T,h=b-g;return Math.sqrt(f*f+h*h)}},52816:S=>{S.exports=function(a,b){var T=a.x-b.x,g=a.y-b.y;return Math.sqrt(T*T+g*g)}},64559:S=>{S.exports=function(a,b){var T=a.x-b.x,g=a.y-b.y;return T*T+g*g}},82340:S=>{S.exports=function(a,b,T,g){return Math.max(Math.abs(a-T),Math.abs(b-g))}},14390:S=>{S.exports=function(a,b,T,g,f){return void 0===f&&(f=2),Math.sqrt(Math.pow(T-a,f)+Math.pow(g-b,f))}},2243:S=>{S.exports=function(a,b,T,g){return Math.abs(a-T)+Math.abs(b-g)}},89774:S=>{S.exports=function(a,b,T,g){var f=a-T,h=b-g;return f*f+h*h}},50994:(S,k,a)=>{S.exports={Between:a(20339),BetweenPoints:a(52816),BetweenPointsSquared:a(64559),Chebyshev:a(82340),Power:a(14390),Snake:a(2243),Squared:a(89774)}},62640:(S,k,a)=>{var b=a(54178),T=a(41521),g=a(79980),f=a(85433),h=a(99140),c=a(48857),u=a(81596),m=a(59133),d=a(98516),p=a(35248),v=a(82500),x=a(49752);S.exports={Power0:u,Power1:m.Out,Power2:f.Out,Power3:d.Out,Power4:p.Out,Linear:u,Quad:m.Out,Cubic:f.Out,Quart:d.Out,Quint:p.Out,Sine:v.Out,Expo:c.Out,Circ:g.Out,Elastic:h.Out,Back:b.Out,Bounce:T.Out,Stepped:x,"Quad.easeIn":m.In,"Cubic.easeIn":f.In,"Quart.easeIn":d.In,"Quint.easeIn":p.In,"Sine.easeIn":v.In,"Expo.easeIn":c.In,"Circ.easeIn":g.In,"Elastic.easeIn":h.In,"Back.easeIn":b.In,"Bounce.easeIn":T.In,"Quad.easeOut":m.Out,"Cubic.easeOut":f.Out,"Quart.easeOut":d.Out,"Quint.easeOut":p.Out,"Sine.easeOut":v.Out,"Expo.easeOut":c.Out,"Circ.easeOut":g.Out,"Elastic.easeOut":h.Out,"Back.easeOut":b.Out,"Bounce.easeOut":T.Out,"Quad.easeInOut":m.InOut,"Cubic.easeInOut":f.InOut,"Quart.easeInOut":d.InOut,"Quint.easeInOut":p.InOut,"Sine.easeInOut":v.InOut,"Expo.easeInOut":c.InOut,"Circ.easeInOut":g.InOut,"Elastic.easeInOut":h.InOut,"Back.easeInOut":b.InOut,"Bounce.easeInOut":T.InOut}},1639:S=>{S.exports=function(a,b){return void 0===b&&(b=1.70158),a*a*((b+1)*a-b)}},50099:S=>{S.exports=function(a,b){void 0===b&&(b=1.70158);var T=1.525*b;return(a*=2)<1?a*a*((T+1)*a-T)*.5:.5*((a-=2)*a*((T+1)*a+T)+2)}},41286:S=>{S.exports=function(a,b){return void 0===b&&(b=1.70158),--a*a*((b+1)*a+b)+1}},54178:(S,k,a)=>{S.exports={In:a(1639),Out:a(41286),InOut:a(50099)}},59590:S=>{S.exports=function(a){return(a=1-a)<.36363636363636365?1-7.5625*a*a:a<.7272727272727273?1-(7.5625*(a-=.5454545454545454)*a+.75):a<.9090909090909091?1-(7.5625*(a-=.8181818181818182)*a+.9375):1-(7.5625*(a-=.9545454545454546)*a+.984375)}},41788:S=>{S.exports=function(a){var b=!1;return a<.5?(a=1-2*a,b=!0):a=2*a-1,a<.36363636363636365?a*=7.5625*a:a=a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375,b?.5*(1-a):.5*a+.5}},69905:S=>{S.exports=function(a){return a<.36363636363636365?7.5625*a*a:a<.7272727272727273?7.5625*(a-=.5454545454545454)*a+.75:a<.9090909090909091?7.5625*(a-=.8181818181818182)*a+.9375:7.5625*(a-=.9545454545454546)*a+.984375}},41521:(S,k,a)=>{S.exports={In:a(59590),Out:a(69905),InOut:a(41788)}},91861:S=>{S.exports=function(a){return 1-Math.sqrt(1-a*a)}},4177:S=>{S.exports=function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)}},57512:S=>{S.exports=function(a){return Math.sqrt(1- --a*a)}},79980:(S,k,a)=>{S.exports={In:a(91861),Out:a(57512),InOut:a(4177)}},51150:S=>{S.exports=function(a){return a*a*a}},82820:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a:.5*((a-=2)*a*a+2)}},35033:S=>{S.exports=function(a){return--a*a*a+1}},85433:(S,k,a)=>{S.exports={In:a(51150),Out:a(35033),InOut:a(82820)}},69965:S=>{S.exports=function(a,b,T){if(void 0===b&&(b=.1),void 0===T&&(T=.1),0===a)return 0;if(1===a)return 1;var g=T/4;return b<1?b=1:g=T*Math.asin(1/b)/(2*Math.PI),-b*Math.pow(2,10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/T)}},50665:S=>{S.exports=function(a,b,T){if(void 0===b&&(b=.1),void 0===T&&(T=.1),0===a)return 0;if(1===a)return 1;var g=T/4;return b<1?b=1:g=T*Math.asin(1/b)/(2*Math.PI),(a*=2)<1?b*Math.pow(2,10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/T)*-.5:b*Math.pow(2,-10*(a-=1))*Math.sin((a-g)*(2*Math.PI)/T)*.5+1}},7744:S=>{S.exports=function(a,b,T){if(void 0===b&&(b=.1),void 0===T&&(T=.1),0===a)return 0;if(1===a)return 1;var g=T/4;return b<1?b=1:g=T*Math.asin(1/b)/(2*Math.PI),b*Math.pow(2,-10*a)*Math.sin((a-g)*(2*Math.PI)/T)+1}},99140:(S,k,a)=>{S.exports={In:a(69965),Out:a(7744),InOut:a(50665)}},24590:S=>{S.exports=function(a){return Math.pow(2,10*(a-1))-.001}},87844:S=>{S.exports=function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))}},89433:S=>{S.exports=function(a){return 1-Math.pow(2,-10*a)}},48857:(S,k,a)=>{S.exports={In:a(24590),Out:a(89433),InOut:a(87844)}},48820:(S,k,a)=>{S.exports={Back:a(54178),Bounce:a(41521),Circular:a(79980),Cubic:a(85433),Elastic:a(99140),Expo:a(48857),Linear:a(81596),Quadratic:a(59133),Quartic:a(98516),Quintic:a(35248),Sine:a(82500),Stepped:a(49752)}},7147:S=>{S.exports=function(a){return a}},81596:(S,k,a)=>{S.exports=a(7147)},34826:S=>{S.exports=function(a){return a*a}},20544:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a:-.5*(--a*(a-2)-1)}},92029:S=>{S.exports=function(a){return a*(2-a)}},59133:(S,k,a)=>{S.exports={In:a(34826),Out:a(92029),InOut:a(20544)}},64413:S=>{S.exports=function(a){return a*a*a*a}},78137:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a*a:-.5*((a-=2)*a*a*a-2)}},45840:S=>{S.exports=function(a){return 1- --a*a*a*a}},98516:(S,k,a)=>{S.exports={In:a(64413),Out:a(45840),InOut:a(78137)}},87745:S=>{S.exports=function(a){return a*a*a*a*a}},16509:S=>{S.exports=function(a){return(a*=2)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)}},17868:S=>{S.exports=function(a){return--a*a*a*a*a+1}},35248:(S,k,a)=>{S.exports={In:a(87745),Out:a(17868),InOut:a(16509)}},80461:S=>{S.exports=function(a){return 0===a?0:1===a?1:1-Math.cos(a*Math.PI/2)}},34025:S=>{S.exports=function(a){return 0===a?0:1===a?1:.5*(1-Math.cos(Math.PI*a))}},52768:S=>{S.exports=function(a){return 0===a?0:1===a?1:Math.sin(a*Math.PI/2)}},82500:(S,k,a)=>{S.exports={In:a(80461),Out:a(52768),InOut:a(34025)}},72251:S=>{S.exports=function(a,b){return void 0===b&&(b=1),a<=0?0:a>=1?1:1/b*(1+(b*a|0))}},49752:(S,k,a)=>{S.exports=a(72251)},75698:S=>{S.exports=function(a,b){return void 0===b&&(b=1e-4),Math.ceil(a-b)}},43855:S=>{S.exports=function(a,b,T){return void 0===T&&(T=1e-4),Math.abs(a-b){S.exports=function(a,b){return void 0===b&&(b=1e-4),Math.floor(a+b)}},5470:S=>{S.exports=function(a,b,T){return void 0===T&&(T=1e-4),a>b-T}},94977:S=>{S.exports=function(a,b,T){return void 0===T&&(T=1e-4),a{S.exports={Ceil:a(75698),Equal:a(43855),Floor:a(25777),GreaterThan:a(5470),LessThan:a(94977)}},75508:(S,k,a)=>{var b=a(36383),T=a(79291),g={Angle:a(25588),Distance:a(50994),Easing:a(48820),Fuzzy:a(48379),Interpolation:a(38289),Pow2:a(49001),Snap:a(73697),RandomDataGenerator:a(28453),Average:a(53307),Bernstein:a(85710),Between:a(30976),CatmullRom:a(87842),CeilTo:a(26302),Clamp:a(45319),DegToRad:a(39506),Difference:a(61241),Euler:a(38857),Factorial:a(6411),FloatBetween:a(99472),FloorTo:a(77623),FromPercent:a(62945),GetSpeed:a(38265),IsEven:a(78702),IsEvenStrict:a(94883),Linear:a(28915),LinearXY:a(94908),MaxAdd:a(86883),Median:a(50040),MinSub:a(37204),Percent:a(65201),RadToDeg:a(43396),RandomXY:a(74362),RandomXYZ:a(60706),RandomXYZW:a(67421),Rotate:a(36305),RotateAround:a(11520),RotateAroundDistance:a(1163),RotateTo:a(70336),RoundAwayFromZero:a(2284),RoundTo:a(41013),SinCosTableGenerator:a(16922),SmootherStep:a(54261),SmoothStep:a(7602),ToXY:a(44408),TransformXY:a(85955),Within:a(60417),Wrap:a(15994),Vector2:a(26099),Vector3:a(25836),Vector4:a(61369),Matrix3:a(94434),Matrix4:a(37867),Quaternion:a(15746),RotateVec3:a(72678)};g=T(!1,g,b),S.exports=g},89318:(S,k,a)=>{var b=a(85710);S.exports=function(g,f){for(var h=0,c=g.length-1,u=0;u<=c;u++)h+=Math.pow(1-f,c-u)*Math.pow(f,u)*g[u]*b(c,u);return h}},77259:(S,k,a)=>{var b=a(87842);S.exports=function(g,f){var h=g.length-1,c=h*f,u=Math.floor(c);return g[0]===g[h]?(f<0&&(u=Math.floor(c=h*(1+f))),b(c-u,g[(u-1+h)%h],g[u],g[(u+1)%h],g[(u+2)%h])):f<0?g[0]-(b(-c,g[0],g[0],g[1],g[1])-g[0]):f>1?g[h]-(b(c-h,g[h],g[h],g[h-1],g[h-1])-g[h]):b(c-u,g[u?u-1:0],g[u],g[h{S.exports=function(f,h,c,u,m){return function k(f,h){var c=1-f;return c*c*c*h}(f,h)+function a(f,h){var c=1-f;return 3*c*c*f*h}(f,c)+function b(f,h){return 3*(1-f)*f*f*h}(f,u)+function T(f,h){return f*f*f*h}(f,m)}},28392:(S,k,a)=>{var b=a(28915);S.exports=function(g,f){var h=g.length-1,c=h*f,u=Math.floor(c);return f<0?b(g[0],g[1],c):f>1?b(g[h],g[h-1],h-c):b(g[u],g[u+1>h?h:u+1],c-u)}},32112:S=>{S.exports=function(g,f,h,c){return function k(g,f){var h=1-g;return h*h*f}(g,f)+function a(g,f){return 2*(1-g)*g*f}(g,h)+function b(g,f){return g*g*f}(g,c)}},47235:(S,k,a)=>{var b=a(7602);S.exports=function(g,f,h){return f+(h-f)*b(g,0,1)}},50178:(S,k,a)=>{var b=a(54261);S.exports=function(g,f,h){return f+(h-f)*b(g,0,1)}},38289:(S,k,a)=>{S.exports={Bezier:a(89318),CatmullRom:a(77259),CubicBezier:a(36316),Linear:a(28392),QuadraticBezier:a(32112),SmoothStep:a(47235),SmootherStep:a(50178)}},98439:S=>{S.exports=function(a){var b=Math.log(a)/.6931471805599453;return 1<{S.exports=function(a,b){return a>0&&!(a&a-1)&&b>0&&!(b&b-1)}},81230:S=>{S.exports=function(a){return a>0&&!(a&a-1)}},49001:(S,k,a)=>{S.exports={GetNext:a(98439),IsSize:a(50030),IsValue:a(81230)}},28453:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){void 0===f&&(f=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],f&&this.init(f)},rnd:function(){var g=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|g,this.s0=this.s1,this.s1=this.s2,this.s2=g-this.c,this.s2},hash:function(g){var f,h=this.n;g=g.toString();for(var c=0;c>>0,h=(f*=h)>>>0,h+=4294967296*(f-=h);return this.n=h,2.3283064365386963e-10*(h>>>0)},init:function(g){"string"==typeof g?this.state(g):this.sow(g)},sow:function(g){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,g)for(var f=0;f0;h--){var c=Math.floor(this.frac()*(h+1)),u=g[c];g[c]=g[h],g[h]=u}return g}});S.exports=T},63448:S=>{S.exports=function(a,b,T,g){return void 0===T&&(T=0),0===b?a:(a-=T,a=b*Math.ceil(a/b),g?(T+a)/b:T+a)}},56583:S=>{S.exports=function(a,b,T,g){return void 0===T&&(T=0),0===b?a:(a-=T,a=b*Math.floor(a/b),g?(T+a)/b:T+a)}},77720:S=>{S.exports=function(a,b,T,g){return void 0===T&&(T=0),0===b?a:(a-=T,a=b*Math.round(a/b),g?(T+a)/b:T+a)}},73697:(S,k,a)=>{S.exports={Ceil:a(63448),Floor:a(56583),To:a(77720)}},85454:(S,k,a)=>{a(63595);var b=a(8054),T=a(79291),g={Actions:a(61061),Animations:a(60421),BlendModes:a(10312),Cache:a(83388),Cameras:a(26638),Core:a(42857),Class:a(83419),Create:a(15822),Curves:a(25410),Data:a(44965),Display:a(27460),DOM:a(84902),Events:a(93055),FX:a(66064),Game:a(50127),GameObjects:a(77856),Geom:a(55738),Input:a(14350),Loader:a(57777),Math:a(75508),Physics:a(44563),Plugins:a(18922),Renderer:a(36909),Scale:a(93364),ScaleModes:a(29795),Scene:a(97482),Scenes:a(62194),Structs:a(41392),Textures:a(27458),Tilemaps:a(62501),Time:a(90291),Tweens:a(43066),Utils:a(91799)};g.Sound=a(23717),g=T(!1,g,b),S.exports=g,a.g.Phaser=g},71289:(S,k,a)=>{var b=a(83419),T=a(92209),g=a(88571),f=new b({Extends:g,Mixins:[T.Acceleration,T.Angular,T.Bounce,T.Collision,T.Debug,T.Drag,T.Enable,T.Friction,T.Gravity,T.Immovable,T.Mass,T.Pushable,T.Size,T.Velocity],initialize:function(c,u,m,d,p){g.call(this,c,u,m,d,p),this.body=null}});S.exports=f},86689:(S,k,a)=>{var b=a(83419),T=a(39506),g=a(20339),f=a(89774),h=a(66022),c=a(95540),u=a(46975),m=a(72441),d=a(47956),p=a(37277),v=a(44594),x=a(26099),y=a(82248),_=new b({initialize:function(A){this.scene=A,this.systems=A.sys,this.config=this.getConfig(),this._category=1,A.sys.events.once(v.BOOT,this.boot,this),A.sys.events.on(v.START,this.start,this)},boot:function(){this.world=new y(this.scene,this.config),this.add=new h(this.world),this.systems.events.once(v.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new y(this.scene,this.config),this.add=new h(this.world));var E=this.systems.events;c(this.config,"customUpdate",!1)||E.on(v.UPDATE,this.world.update,this.world),E.on(v.POST_UPDATE,this.world.postUpdate,this.world),E.once(v.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(v.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(v.UPDATE,this.world.update,this.world)},getConfig:function(){var E=this.systems.game.config.physics;return u(c(this.systems.settings.physics,"arcade",{}),c(E,"arcade",{}))},nextCategory:function(){return this._category=this._category<<1,this._category},overlap:function(E,A,D,I,R){return void 0===D&&(D=null),void 0===I&&(I=null),void 0===R&&(R=D),this.world.collideObjects(E,A,D,I,R,!0)},collide:function(E,A,D,I,R){return void 0===D&&(D=null),void 0===I&&(I=null),void 0===R&&(R=D),this.world.collideObjects(E,A,D,I,R,!1)},collideTiles:function(E,A,D,I,R){return this.world.collideTiles(E,A,D,I,R)},overlapTiles:function(E,A,D,I,R){return this.world.overlapTiles(E,A,D,I,R)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(E,A,D,I,R,F){void 0===I&&(I=60);var N=Math.atan2(D-E.y,A-E.x);return E.body.acceleration.setToPolar(N,I),void 0!==R&&void 0!==F&&E.body.maxVelocity.set(R,F),N},accelerateToObject:function(E,A,D,I,R){return this.accelerateTo(E,A.x,A.y,D,I,R)},closest:function(E,A){A||(A=this.world.bodies.entries);for(var D=Number.MAX_VALUE,I=null,R=E.x,F=E.y,N=A.length,V=0;VD&&(I=B,D=Q)}}return I},moveTo:function(E,A,D,I,R){void 0===I&&(I=60),void 0===R&&(R=0);var F=Math.atan2(D-E.y,A-E.x);return R>0&&(I=g(E.x,E.y,A,D)/(R/1e3)),E.body.velocity.setToPolar(F,I),F},moveToObject:function(E,A,D,I){return this.moveTo(E,A.x,A.y,D,I)},velocityFromAngle:function(E,A,D){return void 0===A&&(A=60),void 0===D&&(D=new x),D.setToPolar(T(E),A)},velocityFromRotation:function(E,A,D){return void 0===A&&(A=60),void 0===D&&(D=new x),D.setToPolar(E,A)},overlapRect:function(E,A,D,I,R,F){return d(this.world,E,A,D,I,R,F)},overlapCirc:function(E,A,D,I,R){return m(this.world,E,A,D,I,R)},shutdown:function(){if(this.world){var E=this.systems.events;E.off(v.UPDATE,this.world.update,this.world),E.off(v.POST_UPDATE,this.world.postUpdate,this.world),E.off(v.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null,this._category=1}},destroy:function(){this.shutdown(),this.scene.sys.events.off(v.START,this.start,this),this.scene=null,this.systems=null}});p.register("ArcadePhysics",_,"arcadePhysics"),S.exports=_},13759:(S,k,a)=>{var b=a(83419),T=a(92209),g=a(68287),f=new b({Extends:g,Mixins:[T.Acceleration,T.Angular,T.Bounce,T.Collision,T.Debug,T.Drag,T.Enable,T.Friction,T.Gravity,T.Immovable,T.Mass,T.Pushable,T.Size,T.Velocity],initialize:function(c,u,m,d,p){g.call(this,c,u,m,d,p),this.body=null}});S.exports=f},37742:(S,k,a)=>{var b=a(83419),T=a(78389),g=a(37747),f=a(63012),h=a(43396),c=a(87841),u=a(37303),m=a(95829),d=a(26099),p=new b({Mixins:[T],initialize:function(x,y){var _=64,E=64,D=void 0!==y;D&&y.displayWidth&&(_=y.displayWidth,E=y.displayHeight),D||(y={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=x,this.gameObject=D?y:void 0,this.isBody=!0,this.transform={x:y.x,y:y.y,rotation:y.angle,scaleX:y.scaleX,scaleY:y.scaleY,displayOriginX:y.displayOriginX,displayOriginY:y.displayOriginY},this.debugShowBody=x.defaults.debugShowBody,this.debugShowVelocity=x.defaults.debugShowVelocity,this.debugBodyColor=x.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new d,this.position=new d(y.x-y.scaleX*y.displayOriginX,y.y-y.scaleY*y.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=y.angle,this.preRotation=y.angle,this.width=_,this.height=E,this.sourceWidth=_,this.sourceHeight=E,y.frame&&(this.sourceWidth=y.frame.realWidth,this.sourceHeight=y.frame.realHeight),this.halfWidth=Math.abs(_/2),this.halfHeight=Math.abs(E/2),this.center=new d(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new d,this.newVelocity=new d,this.deltaMax=new d,this.acceleration=new d,this.allowDrag=!0,this.drag=new d,this.allowGravity=!0,this.gravity=new d,this.bounce=new d,this.worldBounce=null,this.customBoundsRectangle=x.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new d(1e4,1e4),this.maxSpeed=-1,this.friction=new d(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=g.FACING_NONE,this.immovable=!1,this.pushable=!0,this.slideFactor=new d(1,1),this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=m(!1),this.touching=m(!0),this.wasTouching=m(!0),this.blocked=m(!0),this.syncBounds=!1,this.physicsType=g.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._sx=y.scaleX,this._sy=y.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new c,this.directControl=!1,this.autoFrame=this.position.clone()},updateBounds:function(){var v=this.gameObject,x=this.transform;if(v.parentContainer){var y=v.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);x.x=y.tx,x.y=y.ty,x.rotation=h(y.rotation),x.scaleX=y.scaleX,x.scaleY=y.scaleY,x.displayOriginX=v.displayOriginX,x.displayOriginY=v.displayOriginY}else x.x=v.x,x.y=v.y,x.rotation=v.angle,x.scaleX=v.scaleX,x.scaleY=v.scaleY,x.displayOriginX=v.displayOriginX,x.displayOriginY=v.displayOriginY;var _=!1;if(this.syncBounds){var E=v.getBounds(this._bounds);this.width=E.width,this.height=E.height,_=!0}else{var A=Math.abs(x.scaleX),D=Math.abs(x.scaleY);(this._sx!==A||this._sy!==D)&&(this.width=this.sourceWidth*A,this.height=this.sourceHeight*D,this._sx=A,this._sy=D,_=!0)}_&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var v=this.transform;this.position.x=v.x+v.scaleX*(this.offset.x-v.displayOriginX),this.position.y=v.y+v.scaleY*(this.offset.y-v.displayOriginY),this.updateCenter()},resetFlags:function(v){void 0===v&&(v=!1);var x=this.wasTouching,y=this.touching,_=this.blocked;v?m(!0,x):(x.none=y.none,x.up=y.up,x.down=y.down,x.left=y.left,x.right=y.right),m(!0,y),m(!0,_),this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(v,x){if(v&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves){var y=this.position;this.prev.x=y.x,this.prev.y=y.y,this.prevFrame.x=y.x,this.prevFrame.y=y.y}v&&this.update(x)},update:function(v){var x=this.prev,y=this.position,_=this.velocity;if(x.set(y.x,y.y),!this.moves)return this._dx=y.x-x.x,void(this._dy=y.y-x.y);if(this.directControl){var E=this.autoFrame;_.set((y.x-E.x)/v,(y.y-E.y)/v),this.world.updateMotion(this,v),this._dx=y.x-E.x,this._dy=y.y-E.y}else this.world.updateMotion(this,v),this.newVelocity.set(_.x*v,_.y*v),y.add(this.newVelocity),this._dx=y.x-x.x,this._dy=y.y-x.y;var A=_.x,D=_.y;if(this.updateCenter(),this.angle=Math.atan2(D,A),this.speed=Math.sqrt(A*A+D*D),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds){var I=this.blocked;this.world.emit(f.WORLD_BOUNDS,this,I.up,I.down,I.left,I.right)}},postUpdate:function(){var v=this.position,x=v.x-this.prevFrame.x,y=v.y-this.prevFrame.y,_=this.gameObject;if(this.moves){var E=this.deltaMax.x,A=this.deltaMax.y;0!==E&&0!==x&&(x<0&&x<-E?x=-E:x>0&&x>E&&(x=E)),0!==A&&0!==y&&(y<0&&y<-A?y=-A:y>0&&y>A&&(y=A)),_&&(_.x+=x,_.y+=y)}x<0?this.facing=g.FACING_LEFT:x>0&&(this.facing=g.FACING_RIGHT),y<0?this.facing=g.FACING_UP:y>0&&(this.facing=g.FACING_DOWN),this.allowRotation&&_&&(_.angle+=this.deltaZ()),this._tx=x,this._ty=y,this.autoFrame.set(v.x,v.y)},setBoundsRectangle:function(v){return this.customBoundsRectangle=v||this.world.bounds,this},checkWorldBounds:function(){var v=this.position,x=this.velocity,y=this.blocked,_=this.customBoundsRectangle,E=this.world.checkCollision,A=this.worldBounce?-this.worldBounce.x:-this.bounce.x,D=this.worldBounce?-this.worldBounce.y:-this.bounce.y,I=!1;return v.x<_.x&&E.left?(v.x=_.x,x.x*=A,y.left=!0,I=!0):this.right>_.right&&E.right&&(v.x=_.right-this.width,x.x*=A,y.right=!0,I=!0),v.y<_.y&&E.up?(v.y=_.y,x.y*=D,y.up=!0,I=!0):this.bottom>_.bottom&&E.down&&(v.y=_.bottom-this.height,x.y*=D,y.down=!0,I=!0),I&&(this.blocked.none=!1,this.updateCenter()),I},setOffset:function(v,x){return void 0===x&&(x=v),this.offset.set(v,x),this},setGameObject:function(v,x){return void 0===x&&(x=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=v,v.body&&(v.body=this),this.setSize(),this.world.add(this),this.enable=x,this},setSize:function(v,x,y){void 0===y&&(y=!0);var _=this.gameObject;return _&&(!v&&_.frame&&(v=_.frame.realWidth),!x&&_.frame&&(x=_.frame.realHeight)),this.sourceWidth=v,this.sourceHeight=x,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),y&&_&&_.getCenter&&this.offset.set((_.width-v)/2,(_.height-x)/2),this.isCircle=!1,this.radius=0,this},setCircle:function(v,x,y){return void 0===x&&(x=this.offset.x),void 0===y&&(y=this.offset.y),v>0?(this.isCircle=!0,this.radius=v,this.sourceWidth=2*v,this.sourceHeight=2*v,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(x,y),this.updateCenter()):this.isCircle=!1,this},reset:function(v,x){this.stop();var y=this.gameObject;y&&(y.setPosition(v,x),this.rotation=y.angle,this.preRotation=y.angle);var _=this.position;y&&y.getTopLeft?y.getTopLeft(_):_.set(v,x),this.prev.copy(_),this.prevFrame.copy(_),this.autoFrame.copy(_),y&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(v){return v.x=this.x,v.y=this.y,v.right=this.right,v.bottom=this.bottom,v},hitTest:function(v,x){return this.isCircle?this.radius>0&&v>=this.left&&v<=this.right&&x>=this.top&&x<=this.bottom&&(this.center.x-v)*(this.center.x-v)+(this.center.y-x)*(this.center.y-x)<=this.radius*this.radius:u(this,v,x)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(v){var x=this.position,y=x.x+this.halfWidth,_=x.y+this.halfHeight;this.debugShowBody&&(v.lineStyle(v.defaultStrokeWidth,this.debugBodyColor),this.isCircle?v.strokeCircle(y,_,this.width/2):(this.checkCollision.up&&v.lineBetween(x.x,x.y,x.x+this.width,x.y),this.checkCollision.right&&v.lineBetween(x.x+this.width,x.y,x.x+this.width,x.y+this.height),this.checkCollision.down&&v.lineBetween(x.x,x.y+this.height,x.x+this.width,x.y+this.height),this.checkCollision.left&&v.lineBetween(x.x,x.y,x.x,x.y+this.height))),this.debugShowVelocity&&(v.lineStyle(v.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),v.lineBetween(y,_,y+this.velocity.x/2,_+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setDirectControl:function(v){return void 0===v&&(v=!0),this.directControl=v,this},setCollideWorldBounds:function(v,x,y,_){void 0===v&&(v=!0),this.collideWorldBounds=v;var E=void 0!==x,A=void 0!==y;return(E||A)&&(this.worldBounce||(this.worldBounce=new d),E&&(this.worldBounce.x=x),A&&(this.worldBounce.y=y)),void 0!==_&&(this.onWorldBounds=_),this},setVelocity:function(v,x){return this.velocity.set(v,x),v=this.velocity.x,x=this.velocity.y,this.speed=Math.sqrt(v*v+x*x),this},setVelocityX:function(v){return this.setVelocity(v,this.velocity.y)},setVelocityY:function(v){return this.setVelocity(this.velocity.x,v)},setMaxVelocity:function(v,x){return this.maxVelocity.set(v,x),this},setMaxVelocityX:function(v){return this.maxVelocity.x=v,this},setMaxVelocityY:function(v){return this.maxVelocity.y=v,this},setMaxSpeed:function(v){return this.maxSpeed=v,this},setSlideFactor:function(v,x){return this.slideFactor.set(v,x),this},setBounce:function(v,x){return this.bounce.set(v,x),this},setBounceX:function(v){return this.bounce.x=v,this},setBounceY:function(v){return this.bounce.y=v,this},setAcceleration:function(v,x){return this.acceleration.set(v,x),this},setAccelerationX:function(v){return this.acceleration.x=v,this},setAccelerationY:function(v){return this.acceleration.y=v,this},setAllowDrag:function(v){return void 0===v&&(v=!0),this.allowDrag=v,this},setAllowGravity:function(v){return void 0===v&&(v=!0),this.allowGravity=v,this},setAllowRotation:function(v){return void 0===v&&(v=!0),this.allowRotation=v,this},setDrag:function(v,x){return this.drag.set(v,x),this},setDamping:function(v){return this.useDamping=v,this},setDragX:function(v){return this.drag.x=v,this},setDragY:function(v){return this.drag.y=v,this},setGravity:function(v,x){return this.gravity.set(v,x),this},setGravityX:function(v){return this.gravity.x=v,this},setGravityY:function(v){return this.gravity.y=v,this},setFriction:function(v,x){return this.friction.set(v,x),this},setFrictionX:function(v){return this.friction.x=v,this},setFrictionY:function(v){return this.friction.y=v,this},setAngularVelocity:function(v){return this.angularVelocity=v,this},setAngularAcceleration:function(v){return this.angularAcceleration=v,this},setAngularDrag:function(v){return this.angularDrag=v,this},setMass:function(v){return this.mass=v,this},setImmovable:function(v){return void 0===v&&(v=!0),this.immovable=v,this},setEnable:function(v){return void 0===v&&(v=!0),this.enable=v,this},processX:function(v,x,y,_){this.x+=v,this.updateCenter(),null!==x&&(this.velocity.x=x*this.slideFactor.x);var E=this.blocked;y&&(E.left=!0,E.none=!1),_&&(E.right=!0,E.none=!1)},processY:function(v,x,y,_){this.y+=v,this.updateCenter(),null!==x&&(this.velocity.y=x*this.slideFactor.y);var E=this.blocked;y&&(E.up=!0,E.none=!1),_&&(E.down=!0,E.none=!1)},x:{get:function(){return this.position.x},set:function(v){this.position.x=v}},y:{get:function(){return this.position.y},set:function(v){this.position.y=v}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});S.exports=p},79342:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u,m,d,p){this.world=f,this.name="",this.active=!0,this.overlapOnly=h,this.object1=c,this.object2=u,this.collideCallback=m,this.processCallback=d,this.callbackContext=p},setName:function(g){return this.name=g,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});S.exports=T},66022:(S,k,a)=>{var b=a(71289),T=a(13759),g=a(37742),f=a(83419),h=a(37747),c=a(60758),u=a(72624),m=a(71464),d=new f({initialize:function(v){this.world=v,this.scene=v.scene,this.sys=v.scene.sys},collider:function(p,v,x,y,_){return this.world.addCollider(p,v,x,y,_)},overlap:function(p,v,x,y,_){return this.world.addOverlap(p,v,x,y,_)},existing:function(p,v){return this.world.enableBody(p,v?h.STATIC_BODY:h.DYNAMIC_BODY),p},staticImage:function(p,v,x,y){var _=new b(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.world.enableBody(_,h.STATIC_BODY),_},image:function(p,v,x,y){var _=new b(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.world.enableBody(_,h.DYNAMIC_BODY),_},staticSprite:function(p,v,x,y){var _=new T(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.sys.updateList.add(_),this.world.enableBody(_,h.STATIC_BODY),_},sprite:function(p,v,x,y){var _=new T(this.scene,p,v,x,y);return this.sys.displayList.add(_),this.sys.updateList.add(_),this.world.enableBody(_,h.DYNAMIC_BODY),_},staticGroup:function(p,v){return this.sys.updateList.add(new m(this.world,this.world.scene,p,v))},group:function(p,v){return this.sys.updateList.add(new c(this.world,this.world.scene,p,v))},body:function(p,v,x,y){var _=new g(this.world);return _.position.set(p,v),x&&y&&_.setSize(x,y),this.world.add(_,h.DYNAMIC_BODY),_},staticBody:function(p,v,x,y){var _=new u(this.world);return _.position.set(p,v),x&&y&&_.setSize(x,y),this.world.add(_,h.STATIC_BODY),_},destroy:function(){this.world=null,this.scene=null,this.sys=null}});S.exports=d},79599:S=>{S.exports=function(a){var b=0;if(Array.isArray(a))for(var T=0;T{var b=a(37747);S.exports=function(g,f,h,c){var u=0,m=g.deltaAbsX()+f.deltaAbsX()+c;return 0===g._dx&&0===f._dx?(g.embedded=!0,f.embedded=!0):g._dx>f._dx?(u=g.right-f.x)>m&&!h||!1===g.checkCollision.right||!1===f.checkCollision.left?u=0:(g.touching.none=!1,g.touching.right=!0,f.touching.none=!1,f.touching.left=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.right=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.left=!0)):g._dxm&&!h||!1===g.checkCollision.left||!1===f.checkCollision.right?u=0:(g.touching.none=!1,g.touching.left=!0,f.touching.none=!1,f.touching.right=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.left=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.right=!0))),g.overlapX=u,f.overlapX=u,u}},45170:(S,k,a)=>{var b=a(37747);S.exports=function(g,f,h,c){var u=0,m=g.deltaAbsY()+f.deltaAbsY()+c;return 0===g._dy&&0===f._dy?(g.embedded=!0,f.embedded=!0):g._dy>f._dy?(u=g.bottom-f.y)>m&&!h||!1===g.checkCollision.down||!1===f.checkCollision.up?u=0:(g.touching.none=!1,g.touching.down=!0,f.touching.none=!1,f.touching.up=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.down=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.up=!0)):g._dym&&!h||!1===g.checkCollision.up||!1===f.checkCollision.down?u=0:(g.touching.none=!1,g.touching.up=!0,f.touching.none=!1,f.touching.down=!0,f.physicsType===b.STATIC_BODY&&!h&&(g.blocked.none=!1,g.blocked.up=!0),g.physicsType===b.STATIC_BODY&&!h&&(f.blocked.none=!1,f.blocked.down=!0))),g.overlapY=u,f.overlapY=u,u}},60758:(S,k,a)=>{var b=a(13759),T=a(83419),g=a(78389),f=a(37747),h=a(95540),c=a(26479),u=a(41212),m=new T({Extends:c,Mixins:[g],initialize:function(p,v,x,y){if(x||y)if(u(x))y=x,x=null,y.internalCreateCallback=this.createCallbackHandler,y.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(x)&&u(x[0])){var _=this;x.forEach(function(E){E.internalCreateCallback=_.createCallbackHandler,E.internalRemoveCallback=_.removeCallbackHandler,E.classType=h(E,"classType",b)}),y=null}else y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=p,y&&(y.classType=h(y,"classType",b)),this.physicsType=f.DYNAMIC_BODY,this.collisionCategory=1,this.collisionMask=2147483647,this.defaults={setCollideWorldBounds:h(y,"collideWorldBounds",!1),setBoundsRectangle:h(y,"customBoundsRectangle",null),setAccelerationX:h(y,"accelerationX",0),setAccelerationY:h(y,"accelerationY",0),setAllowDrag:h(y,"allowDrag",!0),setAllowGravity:h(y,"allowGravity",!0),setAllowRotation:h(y,"allowRotation",!0),setDamping:h(y,"useDamping",!1),setBounceX:h(y,"bounceX",0),setBounceY:h(y,"bounceY",0),setDragX:h(y,"dragX",0),setDragY:h(y,"dragY",0),setEnable:h(y,"enable",!0),setGravityX:h(y,"gravityX",0),setGravityY:h(y,"gravityY",0),setFrictionX:h(y,"frictionX",0),setFrictionY:h(y,"frictionY",0),setMaxSpeed:h(y,"maxSpeed",-1),setMaxVelocityX:h(y,"maxVelocityX",1e4),setMaxVelocityY:h(y,"maxVelocityY",1e4),setVelocityX:h(y,"velocityX",0),setVelocityY:h(y,"velocityY",0),setAngularVelocity:h(y,"angularVelocity",0),setAngularAcceleration:h(y,"angularAcceleration",0),setAngularDrag:h(y,"angularDrag",0),setMass:h(y,"mass",1),setImmovable:h(y,"immovable",!1)},c.call(this,v,x,y),this.type="PhysicsGroup"},createCallbackHandler:function(d){d.body||this.world.enableBody(d,f.DYNAMIC_BODY);var p=d.body;for(var v in this.defaults)p[v](this.defaults[v])},removeCallbackHandler:function(d){d.body&&this.world.disableBody(d)},setVelocity:function(d,p,v){void 0===v&&(v=0);for(var x=this.getChildren(),y=0;y{var k,a,b,T,g,f,h,c,u,m,d,p,v,x,y,_,E,D=function(){return m&&y&&a.blocked.right?(k.processX(-E,h,!1,!0),1):u&&_&&a.blocked.left?(k.processX(E,h,!0),1):v&&_&&k.blocked.right?(a.processX(-E,c,!1,!0),2):p&&y&&k.blocked.left?(a.processX(E,c,!0),2):0},R=function(V){if(b&&T)E*=.5,0===V||3===V?(k.processX(E,g),a.processX(-E,f)):(k.processX(-E,g),a.processX(E,f));else if(b&&!T)0===V||3===V?k.processX(E,h,!0):k.processX(-E,h,!1,!0);else if(!b&&T)0===V||3===V?a.processX(-E,c,!1,!0):a.processX(E,c,!0);else{var B=.5*E;0===V?x?(k.processX(E,0,!0),a.processX(0,null,!1,!0)):v?(k.processX(B,0,!0),a.processX(-B,0,!1,!0)):(k.processX(B,a.velocity.x,!0),a.processX(-B,null,!1,!0)):1===V?d?(k.processX(0,null,!1,!0),a.processX(E,0,!0)):m?(k.processX(-B,0,!1,!0),a.processX(B,0,!0)):(k.processX(-B,null,!1,!0),a.processX(B,k.velocity.x,!0)):2===V?x?(k.processX(-E,0,!1,!0),a.processX(0,null,!0)):p?(k.processX(-B,0,!1,!0),a.processX(B,0,!0)):(k.processX(-B,a.velocity.x,!1,!0),a.processX(B,null,!0)):3===V&&(d?(k.processX(0,null,!0),a.processX(-E,0,!1,!0)):u?(k.processX(B,0,!0),a.processX(-B,0,!1,!0)):(k.processX(B,a.velocity.y,!0),a.processX(-B,null,!1,!0)))}return!0};S.exports={BlockCheck:D,Check:function(){var V=k.velocity.x,B=a.velocity.x,H=Math.sqrt(B*B*a.mass/k.mass)*(B>0?1:-1),Q=Math.sqrt(V*V*k.mass/a.mass)*(V>0?1:-1),G=.5*(H+Q);return g=G+(H-=G)*k.bounce.x,f=G+(Q-=G)*a.bounce.x,u&&_?R(0):p&&y?R(1):m&&y?R(2):!(!v||!_)&&R(3)},Set:function(V,B,H){var Q=(k=V).velocity.x,G=(a=B).velocity.x;return b=k.pushable,u=k._dx<0,m=k._dx>0,d=0===k._dx,y=Math.abs(k.right-a.x)<=Math.abs(a.right-k.x),h=G-Q*k.bounce.x,T=a.pushable,p=a._dx<0,v=a._dx>0,x=0===a._dx,_=!y,c=Q-G*a.bounce.x,E=Math.abs(H),D()},Run:R,RunImmovableBody1:function(V){1===V?a.velocity.x=0:y?a.processX(E,c,!0):a.processX(-E,c,!1,!0),k.moves&&(a.y+=(k.directControl?k.y-k.autoFrame.y:k.y-k.prev.y)*k.friction.y,a._dy=a.y-a.prev.y)},RunImmovableBody2:function(V){2===V?k.velocity.x=0:_?k.processX(E,h,!0):k.processX(-E,h,!1,!0),a.moves&&(k.y+=(a.directControl?a.y-a.autoFrame.y:a.y-a.prev.y)*a.friction.y,k._dy=k.y-k.prev.y)}}},47962:S=>{var k,a,b,T,g,f,h,c,u,m,d,p,v,x,y,_,E,D=function(){return m&&y&&a.blocked.down?(k.processY(-E,h,!1,!0),1):u&&_&&a.blocked.up?(k.processY(E,h,!0),1):v&&_&&k.blocked.down?(a.processY(-E,c,!1,!0),2):p&&y&&k.blocked.up?(a.processY(E,c,!0),2):0},R=function(V){if(b&&T)E*=.5,0===V||3===V?(k.processY(E,g),a.processY(-E,f)):(k.processY(-E,g),a.processY(E,f));else if(b&&!T)0===V||3===V?k.processY(E,h,!0):k.processY(-E,h,!1,!0);else if(!b&&T)0===V||3===V?a.processY(-E,c,!1,!0):a.processY(E,c,!0);else{var B=.5*E;0===V?x?(k.processY(E,0,!0),a.processY(0,null,!1,!0)):v?(k.processY(B,0,!0),a.processY(-B,0,!1,!0)):(k.processY(B,a.velocity.y,!0),a.processY(-B,null,!1,!0)):1===V?d?(k.processY(0,null,!1,!0),a.processY(E,0,!0)):m?(k.processY(-B,0,!1,!0),a.processY(B,0,!0)):(k.processY(-B,null,!1,!0),a.processY(B,k.velocity.y,!0)):2===V?x?(k.processY(-E,0,!1,!0),a.processY(0,null,!0)):p?(k.processY(-B,0,!1,!0),a.processY(B,0,!0)):(k.processY(-B,a.velocity.y,!1,!0),a.processY(B,null,!0)):3===V&&(d?(k.processY(0,null,!0),a.processY(-E,0,!1,!0)):u?(k.processY(B,0,!0),a.processY(-B,0,!1,!0)):(k.processY(B,a.velocity.y,!0),a.processY(-B,null,!1,!0)))}return!0};S.exports={BlockCheck:D,Check:function(){var V=k.velocity.y,B=a.velocity.y,H=Math.sqrt(B*B*a.mass/k.mass)*(B>0?1:-1),Q=Math.sqrt(V*V*k.mass/a.mass)*(V>0?1:-1),G=.5*(H+Q);return g=G+(H-=G)*k.bounce.y,f=G+(Q-=G)*a.bounce.y,u&&_?R(0):p&&y?R(1):m&&y?R(2):!(!v||!_)&&R(3)},Set:function(V,B,H){var Q=(k=V).velocity.y,G=(a=B).velocity.y;return b=k.pushable,u=k._dy<0,m=k._dy>0,d=0===k._dy,y=Math.abs(k.bottom-a.y)<=Math.abs(a.bottom-k.y),h=G-Q*k.bounce.y,T=a.pushable,p=a._dy<0,v=a._dy>0,x=0===a._dy,_=!y,c=Q-G*a.bounce.y,E=Math.abs(H),D()},Run:R,RunImmovableBody1:function(V){1===V?a.velocity.y=0:y?a.processY(E,c,!0):a.processY(-E,c,!1,!0),k.moves&&(a.x+=(k.directControl?k.x-k.autoFrame.x:k.x-k.prev.x)*k.friction.x,a._dx=a.x-a.prev.x)},RunImmovableBody2:function(V){2===V?k.velocity.y=0:_?k.processY(E,h,!0):k.processY(-E,h,!1,!0),a.moves&&(k.x+=(a.directControl?a.x-a.autoFrame.x:a.x-a.prev.x)*a.friction.x,k._dx=k.x-k.prev.x)}}},14087:(S,k,a)=>{var b=a(64897),T=a(3017);S.exports=function(f,h,c,u,m){void 0===m&&(m=b(f,h,c,u));var d=f.immovable,p=h.immovable;if(c||0===m||d&&p||f.customSeparateX||h.customSeparateX)return 0!==m||f.embedded&&h.embedded;var v=T.Set(f,h,m);return d||p?(d?T.RunImmovableBody1(v):p&&T.RunImmovableBody2(v),!0):v>0||T.Check()}},89936:(S,k,a)=>{var b=a(45170),T=a(47962);S.exports=function(f,h,c,u,m){void 0===m&&(m=b(f,h,c,u));var d=f.immovable,p=h.immovable;if(c||0===m||d&&p||f.customSeparateY||h.customSeparateY)return 0!==m||f.embedded&&h.embedded;var v=T.Set(f,h,m);return d||p?(d?T.RunImmovableBody1(v):p&&T.RunImmovableBody2(v),!0):v>0||T.Check()}},95829:S=>{S.exports=function(a,b){return void 0===b&&(b={}),b.none=a,b.up=!1,b.down=!1,b.left=!1,b.right=!1,a||(b.up=!0,b.down=!0,b.left=!0,b.right=!0),b}},72624:(S,k,a)=>{var b=a(87902),T=a(83419),g=a(78389),f=a(37747),h=a(37303),c=a(95829),u=a(26099),m=new T({Mixins:[g],initialize:function(p,v){var x=64,y=64,E=void 0!==v;E&&v.displayWidth&&(x=v.displayWidth,y=v.displayHeight),E||(v={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=p,this.gameObject=E?v:void 0,this.isBody=!0,this.debugShowBody=p.defaults.debugShowStaticBody,this.debugBodyColor=p.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new u,this.position=new u(v.x-x*v.originX,v.y-y*v.originY),this.width=x,this.height=y,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new u(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=u.ZERO,this.allowGravity=!1,this.gravity=u.ZERO,this.bounce=u.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision=c(!1),this.touching=c(!0),this.wasTouching=c(!0),this.blocked=c(!0),this.physicsType=f.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,this._dx=0,this._dy=0},setGameObject:function(d,p){return d&&d!==this.gameObject&&(this.gameObject.body=null,d.body=this,this.gameObject=d),p&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var d=this.gameObject;return d.getTopLeft(this.position),this.width=d.displayWidth,this.height=d.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(d,p){return void 0===p&&(p=d),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(d,p),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(d,p,v){void 0===v&&(v=!0);var x=this.gameObject;if(x&&x.frame&&(d||(d=x.frame.realWidth),p||(p=x.frame.realHeight)),this.world.staticTree.remove(this),this.width=d,this.height=p,this.halfWidth=Math.floor(d/2),this.halfHeight=Math.floor(p/2),v&&x&&x.getCenter){var y=x.displayWidth/2,_=x.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(y-this.halfWidth,_-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(d,p,v){return void 0===p&&(p=this.offset.x),void 0===v&&(v=this.offset.y),d>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=d,this.width=2*d,this.height=2*d,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(p,v),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(d,p){var v=this.gameObject;void 0===d&&(d=v.x),void 0===p&&(p=v.y),this.world.staticTree.remove(this),v.setPosition(d,p),v.getTopLeft(this.position),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(d){return d.x=this.x,d.y=this.y,d.right=this.right,d.bottom=this.bottom,d},hitTest:function(d,p){return this.isCircle?b(this,d,p):h(this,d,p)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(d){var p=this.position,v=p.x+this.halfWidth,x=p.y+this.halfHeight;this.debugShowBody&&(d.lineStyle(d.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?d.strokeCircle(v,x,this.width/2):d.strokeRect(p.x,p.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(d){return d<=0&&(d=.1),this.mass=d,this},x:{get:function(){return this.position.x},set:function(d){this.world.staticTree.remove(this),this.position.x=d,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(d){this.world.staticTree.remove(this),this.position.y=d,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});S.exports=m},71464:(S,k,a)=>{var b=a(13759),T=a(83419),g=a(78389),f=a(37747),h=a(95540),c=a(26479),u=a(41212),m=new T({Extends:c,Mixins:[g],initialize:function(p,v,x,y){x||y?u(x)?(y=x,x=null,y.internalCreateCallback=this.createCallbackHandler,y.internalRemoveCallback=this.removeCallbackHandler,y.createMultipleCallback=this.createMultipleCallbackHandler,y.classType=h(y,"classType",b)):Array.isArray(x)&&u(x[0])?(y=x,x=null,y.forEach(function(_){_.internalCreateCallback=this.createCallbackHandler,_.internalRemoveCallback=this.removeCallbackHandler,_.createMultipleCallback=this.createMultipleCallbackHandler,_.classType=h(_,"classType",b)})):y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:y={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:b},this.world=p,this.physicsType=f.STATIC_BODY,this.collisionCategory=1,this.collisionMask=1,c.call(this,v,x,y),this.type="StaticPhysicsGroup"},createCallbackHandler:function(d){d.body||this.world.enableBody(d,f.STATIC_BODY)},removeCallbackHandler:function(d){d.body&&this.world.disableBody(d)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var d=this.children.entries,p=0;p{var b=a(55495),T=a(37742),g=a(45319),f=a(83419),h=a(79342),c=a(37747),u=a(20339),m=a(52816),d=a(50792),p=a(63012),v=a(43855),x=a(5470),y=a(94977),_=a(64897),E=a(45170),A=a(96523),D=a(35154),I=a(36383),R=a(25774),F=a(96602),N=a(87841),V=a(59542),B=a(40012),H=a(14087),Q=a(89936),G=a(35072),K=a(72624),q=a(2483),at=a(61340),ot=a(26099),J=a(15994),it=new f({Extends:d,initialize:function(j,nt){d.call(this),this.scene=j,this.bodies=new G,this.staticBodies=new G,this.pendingDestroy=new G,this.colliders=new R,this.gravity=new ot(D(nt,"gravity.x",0),D(nt,"gravity.y",0)),this.bounds=new N(D(nt,"x",0),D(nt,"y",0),D(nt,"width",j.sys.scale.width),D(nt,"height",j.sys.scale.height)),this.checkCollision={up:D(nt,"checkCollision.up",!0),down:D(nt,"checkCollision.down",!0),left:D(nt,"checkCollision.left",!0),right:D(nt,"checkCollision.right",!0)},this.fps=D(nt,"fps",60),this.fixedStep=D(nt,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=D(nt,"timeScale",1),this.OVERLAP_BIAS=D(nt,"overlapBias",4),this.TILE_BIAS=D(nt,"tileBias",16),this.forceX=D(nt,"forceX",!1),this.isPaused=D(nt,"isPaused",!1),this._total=0,this.drawDebug=D(nt,"debug",!1),this.defaults={debugShowBody:D(nt,"debugShowBody",!0),debugShowStaticBody:D(nt,"debugShowStaticBody",!0),debugShowVelocity:D(nt,"debugShowVelocity",!0),bodyDebugColor:D(nt,"debugBodyColor",16711935),staticBodyDebugColor:D(nt,"debugStaticBodyColor",255),velocityDebugColor:D(nt,"debugVelocityColor",65280)},this.maxEntries=D(nt,"maxEntries",16),this.useTree=D(nt,"useTree",!0),this.tree=new V(this.maxEntries),this.staticTree=new V(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new at,this._tempMatrix2=new at,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(Y,j){void 0===j&&(j=c.DYNAMIC_BODY),Array.isArray(Y)||(Y=[Y]);for(var nt=0;nt=gt;for(this.fixedStep||(ht=.001*j,Bt=!0,this._elapsed=0),nt=0;nt=gt;)this._elapsed-=gt,this.step(ht)}},step:function(Y){var j,nt,ht=this.bodies.entries,gt=ht.length;for(j=0;j0){var Yt=this.tree,$t=this.staticTree;for(ht=(nt=Bt.entries).length,Y=0;Y-1&&Y.velocity.length()>ne&&(Y.velocity.normalize().scale(ne),qt=ne),Y.speed=qt},separate:function(Y,j,nt,ht,gt){var wt,St,Bt=!1,Yt=!0;if(!Y.enable||!j.enable||Y.checkCollision.none||j.checkCollision.none||!this.intersects(Y,j)||nt&&!1===nt.call(ht,Y.gameObject||Y,j.gameObject||j))return Bt;if(Y.isCircle||j.isCircle){var $t=this.separateCircle(Y,j,gt);$t.result?(Bt=!0,Yt=!1):(wt=$t.x,St=$t.y,Yt=!0)}if(Yt){var qt=!1,ne=!1,le=this.OVERLAP_BIAS;gt?(qt=H(Y,j,gt,le,wt),ne=Q(Y,j,gt,le,St)):this.forceX||Math.abs(this.gravity.y+Y.gravity.y)ri&&(ne=u(Me,pi,ri,be)-Ie):pi>Ke&&(Me<_i?ne=u(Me,pi,_i,Ke)-Ie:Me>ri&&(ne=u(Me,pi,ri,Ke)-Ie)),ne*=-1}else ne=Y.halfWidth+j.halfWidth-m(wt,St);Y.overlapR=ne,j.overlapR=ne;var zi=b(wt,St),Cn=(ne+I.EPSILON)*Math.cos(zi),sr=(ne+I.EPSILON)*Math.sin(zi),vn={overlap:ne,result:!1,x:Cn,y:sr};if(nt&&(!le||le&&0!==ne))return vn.result=!0,vn;if(!le&&0===ne||Bt&&Yt||Y.customSeparateX||j.customSeparateX)return vn.x=void 0,vn.y=void 0,vn;var bn=!Y.pushable&&!j.pushable;if(le){var cs=wt.y-St.y,Dn=Math.sqrt(Math.pow(wt.x-St.x,2)+Math.pow(cs,2)),xr=(St.x-wt.x)/Dn||0,ts=(St.y-wt.y)/Dn||0,Hs=2*($t.x*xr+$t.y*ts-qt.x*xr-qt.y*ts)/(Y.mass+j.mass);(Bt||Yt||!Y.pushable||!j.pushable)&&(Hs*=2),!Bt&&Y.pushable&&($t.x=$t.x-Hs/Y.mass*xr,$t.y=$t.y-Hs/Y.mass*ts,$t.multiply(Y.bounce)),!Yt&&j.pushable&&(qt.x=qt.x+Hs/j.mass*xr,qt.y=qt.y+Hs/j.mass*ts,qt.multiply(j.bounce)),!Bt&&!Yt&&(Cn*=.5,sr*=.5),!Bt||Y.pushable||bn?(Y.x-=Cn,Y.y-=sr,Y.updateCenter()):(!Yt||j.pushable||bn)&&(j.x+=Cn,j.y+=sr,j.updateCenter()),vn.result=!0}else!Bt||Y.pushable||bn?(Y.x-=Cn,Y.y-=sr,Y.updateCenter()):(!Yt||j.pushable||bn)&&(j.x+=Cn,j.y+=sr,j.updateCenter()),vn.x=void 0,vn.y=void 0;return vn},intersects:function(Y,j){return Y!==j&&(Y.isCircle||j.isCircle?Y.isCircle?j.isCircle?m(Y.center,j.center)<=Y.halfWidth+j.halfWidth:this.circleBodyIntersects(Y,j):this.circleBodyIntersects(j,Y):!(Y.right<=j.left||Y.bottom<=j.top||Y.left>=j.right||Y.top>=j.bottom))},circleBodyIntersects:function(Y,j){var nt=g(Y.center.x,j.left,j.right),ht=g(Y.center.y,j.top,j.bottom);return(Y.center.x-nt)*(Y.center.x-nt)+(Y.center.y-ht)*(Y.center.y-ht)<=Y.halfWidth*Y.halfWidth},overlap:function(Y,j,nt,ht,gt){return void 0===nt&&(nt=null),void 0===ht&&(ht=null),void 0===gt&&(gt=nt),this.collideObjects(Y,j,nt,ht,gt,!0)},collide:function(Y,j,nt,ht,gt){return void 0===nt&&(nt=null),void 0===ht&&(ht=null),void 0===gt&&(gt=nt),this.collideObjects(Y,j,nt,ht,gt,!1)},collideObjects:function(Y,j,nt,ht,gt,wt){var St,Bt;Y.isParent&&(void 0===Y.physicsType||void 0===j||Y===j)&&(Y=Y.children.entries),j&&j.isParent&&void 0===j.physicsType&&(j=j.children.entries);var Yt=Array.isArray(Y),$t=Array.isArray(j);if(this._total=0,Yt||$t)if(!Yt&&$t)for(St=0;St0},collideHandler:function(Y,j,nt,ht,gt,wt){if(void 0===j&&Y.isParent)return this.collideGroupVsGroup(Y,Y,nt,ht,gt,wt);if(!Y||!j)return!1;if(Y.body||Y.isBody){if(j.body||j.isBody)return this.collideSpriteVsSprite(Y,j,nt,ht,gt,wt);if(j.isParent)return this.collideSpriteVsGroup(Y,j,nt,ht,gt,wt);if(j.isTilemap)return this.collideSpriteVsTilemapLayer(Y,j,nt,ht,gt,wt)}else if(Y.isParent){if(j.body||j.isBody)return this.collideSpriteVsGroup(j,Y,nt,ht,gt,wt);if(j.isParent)return this.collideGroupVsGroup(Y,j,nt,ht,gt,wt);if(j.isTilemap)return this.collideGroupVsTilemapLayer(Y,j,nt,ht,gt,wt)}else if(Y.isTilemap){if(j.body||j.isBody)return this.collideSpriteVsTilemapLayer(j,Y,nt,ht,gt,wt);if(j.isParent)return this.collideGroupVsTilemapLayer(j,Y,nt,ht,gt,wt)}},canCollide:function(Y,j){return Y&&j&&!!(Y.collisionMask&j.collisionCategory)&&!!(j.collisionMask&Y.collisionCategory)},collideSpriteVsSprite:function(Y,j,nt,ht,gt,wt){var St=Y.isBody?Y:Y.body,Bt=j.isBody?j:j.body;return!!this.canCollide(St,Bt)&&(this.separate(St,Bt,ht,gt,wt)&&(nt&&nt.call(gt,Y,j),this._total++),!0)},collideSpriteVsGroup:function(Y,j,nt,ht,gt,wt){var Bt,Yt,$t,St=Y.isBody?Y:Y.body;if(0!==j.getLength()&&St&&St.enable&&!St.checkCollision.none&&this.canCollide(St,j))if(this.useTree||j.physicsType===c.STATIC_BODY){var qt=this.treeMinMax;qt.minX=St.left,qt.minY=St.top,qt.maxX=St.right,qt.maxY=St.bottom;var ne=j.physicsType===c.DYNAMIC_BODY?this.tree.search(qt):this.staticTree.search(qt);for(Yt=ne.length,Bt=0;Bt{S.exports={setAcceleration:function(a,b){return this.body.acceleration.set(a,b),this},setAccelerationX:function(a){return this.body.acceleration.x=a,this},setAccelerationY:function(a){return this.body.acceleration.y=a,this}}},59023:S=>{S.exports={setAngularVelocity:function(a){return this.body.angularVelocity=a,this},setAngularAcceleration:function(a){return this.body.angularAcceleration=a,this},setAngularDrag:function(a){return this.body.angularDrag=a,this}}},62069:S=>{S.exports={setBounce:function(a,b){return this.body.bounce.set(a,b),this},setBounceX:function(a){return this.body.bounce.x=a,this},setBounceY:function(a){return this.body.bounce.y=a,this},setCollideWorldBounds:function(a,b,T,g){return this.body.setCollideWorldBounds(a,b,T,g),this}}},78389:(S,k,a)=>{var b=a(79599);S.exports={setCollisionCategory:function(g){return(this.body?this.body:this).collisionCategory=g,this},willCollideWith:function(g){return!!((this.body?this.body:this).collisionMask&g)},addCollidesWith:function(g){var f=this.body?this.body:this;return f.collisionMask=f.collisionMask|g,this},removeCollidesWith:function(g){var f=this.body?this.body:this;return f.collisionMask=f.collisionMask&~g,this},setCollidesWith:function(g){return(this.body?this.body:this).collisionMask=b(g),this},resetCollisionCategory:function(){var g=this.body?this.body:this;return g.collisionCategory=1,g.collisionMask=2147483647,this}}},87118:S=>{S.exports={setDebug:function(a,b,T){return this.debugShowBody=a,this.debugShowVelocity=b,this.debugBodyColor=T,this},setDebugBodyColor:function(a){return this.body.debugBodyColor=a,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(a){this.body.debugShowBody=a}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(a){this.body.debugShowVelocity=a}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(a){this.body.debugBodyColor=a}}}},52819:S=>{S.exports={setDrag:function(a,b){return this.body.drag.set(a,b),this},setDragX:function(a){return this.body.drag.x=a,this},setDragY:function(a){return this.body.drag.y=a,this},setDamping:function(a){return this.body.useDamping=a,this}}},4074:S=>{S.exports={setDirectControl:function(a){return this.body.setDirectControl(a),this},enableBody:function(a,b,T,g,f){return a&&this.body.reset(b,T),g&&(this.body.gameObject.active=!0),f&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(a,b){return void 0===a&&(a=!1),void 0===b&&(b=!1),this.body.stop(),this.body.enable=!1,a&&(this.body.gameObject.active=!1),b&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}}},40831:S=>{S.exports={setFriction:function(a,b){return this.body.friction.set(a,b),this},setFrictionX:function(a){return this.body.friction.x=a,this},setFrictionY:function(a){return this.body.friction.y=a,this}}},26775:S=>{S.exports={setGravity:function(a,b){return this.body.gravity.set(a,b),this},setGravityX:function(a){return this.body.gravity.x=a,this},setGravityY:function(a){return this.body.gravity.y=a,this}}},9437:S=>{S.exports={setImmovable:function(a){return void 0===a&&(a=!0),this.body.immovable=a,this}}},30621:S=>{S.exports={setMass:function(a){return this.body.mass=a,this}}},72441:(S,k,a)=>{var b=a(47956),T=a(96503),g=a(2044),f=a(81491);S.exports=function(c,u,m,d,p,v){var x=b(c,u-d,m-d,2*d,2*d,p,v);if(0===x.length)return x;for(var y=new T(u,m,d),_=new T,E=[],A=0;A{S.exports=function(a,b,T,g,f,h,c){void 0===h&&(h=!0),void 0===c&&(c=!1);var u=[],m=[],d=a.treeMinMax;if(d.minX=b,d.minY=T,d.maxX=b+g,d.maxY=T+f,c&&(m=a.staticTree.search(d)),h&&a.useTree)u=a.tree.search(d);else if(h){var v={position:{x:b,y:T},left:b,top:T,right:b+g,bottom:T+f,isCircle:!1},x=a.intersects;a.bodies.iterate(function(y){x(y,v)&&u.push(y)})}return m.concat(u)}},62121:S=>{S.exports={setPushable:function(a){return void 0===a&&(a=!0),this.body.pushable=a,this}}},29384:S=>{S.exports={setOffset:function(a,b){return this.body.setOffset(a,b),this},setSize:function(a,b,T){return this.body.setSize(a,b,T),this},setBodySize:function(a,b,T){return this.body.setSize(a,b,T),this},setCircle:function(a,b,T){return this.body.setCircle(a,b,T),this}}},15098:S=>{S.exports={setVelocity:function(a,b){return this.body.setVelocity(a,b),this},setVelocityX:function(a){return this.body.setVelocityX(a),this},setVelocityY:function(a){return this.body.setVelocityY(a),this},setMaxVelocity:function(a,b){return this.body.maxVelocity.set(a,b),this}}},92209:(S,k,a)=>{S.exports={Acceleration:a(1093),Angular:a(59023),Bounce:a(62069),Collision:a(78389),Debug:a(87118),Drag:a(52819),Enable:a(4074),Friction:a(40831),Gravity:a(26775),Immovable:a(9437),Mass:a(30621),OverlapCirc:a(72441),OverlapRect:a(47956),Pushable:a(62121),Size:a(29384),Velocity:a(15098)}},37747:S=>{S.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},20009:S=>{S.exports="collide"},36768:S=>{S.exports="overlap"},60473:S=>{S.exports="pause"},89954:S=>{S.exports="resume"},61804:S=>{S.exports="tilecollide"},7161:S=>{S.exports="tileoverlap"},34689:S=>{S.exports="worldbounds"},16006:S=>{S.exports="worldstep"},63012:(S,k,a)=>{S.exports={COLLIDE:a(20009),OVERLAP:a(36768),PAUSE:a(60473),RESUME:a(89954),TILE_COLLIDE:a(61804),TILE_OVERLAP:a(7161),WORLD_BOUNDS:a(34689),WORLD_STEP:a(16006)}},27064:(S,k,a)=>{var b=a(37747),T=a(79291),g={ArcadePhysics:a(86689),Body:a(37742),Collider:a(79342),Components:a(92209),Events:a(63012),Factory:a(66022),GetCollidesWith:a(79599),GetOverlapX:a(64897),GetOverlapY:a(45170),SeparateX:a(14087),SeparateY:a(89936),Group:a(60758),Image:a(71289),Sprite:a(13759),StaticBody:a(72624),StaticGroup:a(71464),Tilemap:a(55173),World:a(82248)};g=T(!1,g,b),S.exports=g},96602:S=>{S.exports=function(a,b){return a.collisionCallback?!a.collisionCallback.call(a.collisionCallbackContext,b,a):!a.layer.callbacks[a.index]||!a.layer.callbacks[a.index].callback.call(a.layer.callbacks[a.index].callbackContext,b,a)}},36294:S=>{S.exports=function(a,b){b<0?(a.blocked.none=!1,a.blocked.left=!0):b>0&&(a.blocked.none=!1,a.blocked.right=!0),a.position.x-=b,a.updateCenter(),a.velocity.x=0===a.bounce.x?0:-a.velocity.x*a.bounce.x}},67013:S=>{S.exports=function(a,b){b<0?(a.blocked.none=!1,a.blocked.up=!0):b>0&&(a.blocked.none=!1,a.blocked.down=!0),a.position.y-=b,a.updateCenter(),a.velocity.y=0===a.bounce.y?0:-a.velocity.y*a.bounce.y}},40012:(S,k,a)=>{var b=a(21329),T=a(53442),g=a(2483);S.exports=function(h,c,u,m,d,p,v){var x=m.left,y=m.top,_=m.right,E=m.bottom,A=u.faceLeft||u.faceRight,D=u.faceTop||u.faceBottom;if(v||(A=!0,D=!0),!A&&!D)return!1;var I=0,R=0,F=0,N=1;if(c.deltaAbsX()>c.deltaAbsY()?F=-1:c.deltaAbsX(){var b=a(36294);S.exports=function(g,f,h,c,u,m){var d=0,p=f.faceLeft,v=f.faceRight,x=f.collideLeft,y=f.collideRight;return m||(p=!0,v=!0,x=!0,y=!0),g.deltaX()<0&&y&&g.checkCollision.left?v&&g.x0&&x&&g.checkCollision.right&&p&&g.right>h&&(d=g.right-h)>u&&(d=0),0!==d&&(g.customSeparateX?g.overlapX=d:b(g,d)),d}},53442:(S,k,a)=>{var b=a(67013);S.exports=function(g,f,h,c,u,m){var d=0,p=f.faceTop,v=f.faceBottom,x=f.collideUp,y=f.collideDown;return m||(p=!0,v=!0,x=!0,y=!0),g.deltaY()<0&&y&&g.checkCollision.up?v&&g.y0&&x&&g.checkCollision.down&&p&&g.bottom>h&&(d=g.bottom-h)>u&&(d=0),0!==d&&(g.customSeparateY?g.overlapY=d:b(g,d)),d}},2483:S=>{S.exports=function(a,b){return!(b.right<=a.left||b.bottom<=a.top||b.position.x>=a.right||b.position.y>=a.bottom)}},55173:(S,k,a)=>{var b={ProcessTileCallbacks:a(96602),ProcessTileSeparationX:a(36294),ProcessTileSeparationY:a(67013),SeparateTile:a(40012),TileCheckX:a(21329),TileCheckY:a(53442),TileIntersectsBody:a(2483)};S.exports=b},44563:(S,k,a)=>{S.exports={Arcade:a(27064),Matter:a(3875)}},68174:(S,k,a)=>{var b=a(83419),T=a(26099),g=new b({initialize:function(){this.boundsCenter=new T,this.centerDiff=new T},parseBody:function(f){if(!(f=f.hasOwnProperty("body")?f.body:f).hasOwnProperty("bounds")||!f.hasOwnProperty("centerOfMass"))return!1;var h=this.boundsCenter,c=this.centerDiff,u=f.bounds.max.x-f.bounds.min.x,m=f.bounds.max.y-f.bounds.min.y,d=u*f.centerOfMass.x,p=m*f.centerOfMass.y;return h.set(u/2,m/2),c.set(d-h.x,p-h.y),!0},getTopLeft:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h+u.x+m.x,c+u.y+m.y)}return!1},getTopCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h+m.x,c+this.boundsCenter.y+m.y)}return!1},getTopRight:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h-(u.x-m.x),c+u.y+m.y)}return!1},getLeftCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h+this.boundsCenter.x+m.x,c+m.y)}return!1},getCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.centerDiff;return new T(h+u.x,c+u.y)}return!1},getRightCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h-(this.boundsCenter.x-m.x),c+m.y)}return!1},getBottomLeft:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h+u.x+m.x,c-(u.y-m.y))}return!1},getBottomCenter:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var m=this.centerDiff;return new T(h+m.x,c-(this.boundsCenter.y-m.y))}return!1},getBottomRight:function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),this.parseBody(f)){var u=this.boundsCenter,m=this.centerDiff;return new T(h-(u.x-m.x),c-(u.y-m.y))}return!1}});S.exports=g},19933:(S,k,a)=>{var b=a(6790);b.Body=a(22562),b.Composite=a(69351),b.World=a(4372),b.Collision=a(52284),b.Detector=a(81388),b.Pairs=a(99561),b.Pair=a(4506),b.Query=a(73296),b.Resolver=a(66272),b.Constraint=a(48140),b.Common=a(53402),b.Engine=a(48413),b.Events=a(35810),b.Sleeping=a(53614),b.Plugin=a(73832),b.Bodies=a(66280),b.Composites=a(74116),b.Axes=a(66615),b.Bounds=a(15647),b.Svg=a(74058),b.Vector=a(31725),b.Vertices=a(41598),b.World.add=b.Composite.add,b.World.remove=b.Composite.remove,b.World.addComposite=b.Composite.addComposite,b.World.addBody=b.Composite.addBody,b.World.addConstraint=b.Composite.addConstraint,b.World.clear=b.Composite.clear,S.exports=b},28137:(S,k,a)=>{var b=a(66280),T=a(83419),g=a(74116),f=a(48140),h=a(74058),c=a(75803),u=a(23181),m=a(34803),d=a(73834),p=a(19496),v=a(85791),x=a(98713),y=a(41598),_=new T({initialize:function(A){this.world=A,this.scene=A.scene,this.sys=A.scene.sys},rectangle:function(E,A,D,I,R){var F=b.rectangle(E,A,D,I,R);return this.world.add(F),F},trapezoid:function(E,A,D,I,R,F){var N=b.trapezoid(E,A,D,I,R,F);return this.world.add(N),N},circle:function(E,A,D,I,R){var F=b.circle(E,A,D,I,R);return this.world.add(F),F},polygon:function(E,A,D,I,R){var F=b.polygon(E,A,D,I,R);return this.world.add(F),F},fromVertices:function(E,A,D,I,R,F,N){"string"==typeof D&&(D=y.fromPath(D));var V=b.fromVertices(E,A,D,I,R,F,N);return this.world.add(V),V},fromPhysicsEditor:function(E,A,D,I,R){void 0===R&&(R=!0);var F=p.parseBody(E,A,D,I);return R&&!this.world.has(F)&&this.world.add(F),F},fromSVG:function(E,A,D,I,R,F){void 0===I&&(I=1),void 0===R&&(R={}),void 0===F&&(F=!0);for(var N=D.getElementsByTagName("path"),V=[],B=0;B{var b=a(31884),T=a(95540),g=a(26099);function f(c){return!!c.get&&"function"==typeof c.get||!!c.set&&"function"==typeof c.set}S.exports=function(c,u,m,d){void 0===m&&(m={}),void 0===d&&(d=!0);var p=u.x,v=u.y;if(u.body={temp:!0,position:{x:p,y:v}},[b.Bounce,b.Collision,b.Force,b.Friction,b.Gravity,b.Mass,b.Sensor,b.SetBody,b.Sleep,b.Static,b.Transform,b.Velocity].forEach(function(_){for(var E in _)f(_[E])?Object.defineProperty(u,E,{get:_[E].get,set:_[E].set}):Object.defineProperty(u,E,{value:_[E]})}),u.world=c,u._tempVec2=new g(p,v),m.hasOwnProperty("type")&&"body"===m.type)u.setExistingBody(m,d);else{var y=T(m,"shape",null);y||(y="rectangle"),m.addToWorld=d,u.setBody(y,m)}return u}},23181:(S,k,a)=>{var b=a(83419),T=a(31884),g=a(95643),f=a(95540),h=a(88571),c=a(72699),u=a(26099),m=new b({Extends:h,Mixins:[T.Bounce,T.Collision,T.Force,T.Friction,T.Gravity,T.Mass,T.Sensor,T.SetBody,T.Sleep,T.Static,T.Transform,T.Velocity,c],initialize:function(p,v,x,y,_,E){g.call(this,p.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(y,_),this.setSizeToFrame(),this.setOrigin(),this.world=p,this._tempVec2=new u(v,x);var A=f(E,"shape",null);A?this.setBody(A,E):this.setRectangle(this.width,this.height,E),this.setPosition(v,x),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=m},42045:(S,k,a)=>{var b=a(60461),T=a(66615),g=a(66280),f=a(22562),h=a(68174),c=a(15647),u=a(83419),m=a(52284),d=a(53402),p=a(69351),v=a(74116),x=a(48140),y=a(81388),_=a(20339),E=a(28137),A=a(95540),D=a(35154),I=a(46975),R=a(4506),F=a(99561),N=a(37277),V=a(73296),B=a(66272),H=a(44594),Q=a(74058),G=a(31725),K=a(41598),q=a(68243);d.setDecomp(a(55973));var at=new u({initialize:function(J){this.scene=J,this.systems=J.sys,this.config=this.getConfig(),this.body=f,this.composite=p,this.collision=m,this.detector=y,this.pair=R,this.pairs=F,this.query=V,this.resolver=B,this.constraint=x,this.bodies=g,this.composites=v,this.axes=T,this.bounds=c,this.svg=Q,this.vector=G,this.vertices=K,this.verts=K,this._tempVec2=G.create(),B._restingThresh=D(this.config,"restingThresh",4),B._restingThreshTangent=D(this.config,"restingThreshTangent",6),B._positionDampen=D(this.config,"positionDampen",.9),B._positionWarming=D(this.config,"positionWarming",.8),B._frictionNormalMultiplier=D(this.config,"frictionNormalMultiplier",5),J.sys.events.once(H.BOOT,this.boot,this),J.sys.events.on(H.START,this.start,this)},boot:function(){this.world=new q(this.scene,this.config),this.add=new E(this.world),this.bodyBounds=new h,this.systems.events.once(H.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new q(this.scene,this.config),this.add=new E(this.world));var ot=this.systems.events;ot.on(H.UPDATE,this.world.update,this.world),ot.on(H.POST_UPDATE,this.world.postUpdate,this.world),ot.once(H.SHUTDOWN,this.shutdown,this)},getConfig:function(){var ot=this.systems.game.config.physics;return I(A(this.systems.settings.physics,"matter",{}),A(ot,"matter",{}))},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(ot,J){this.world.step(ot,J)},containsPoint:function(ot,J,it){ot=this.getMatterBodies(ot);var Y=G.create(J,it);return V.point(ot,Y).length>0},intersectPoint:function(ot,J,it){it=this.getMatterBodies(it);var Y=G.create(ot,J),j=[];return V.point(it,Y).forEach(function(ht){-1===j.indexOf(ht)&&j.push(ht)}),j},intersectRect:function(ot,J,it,Y,j,nt){void 0===j&&(j=!1),nt=this.getMatterBodies(nt);var gt=[];return V.region(nt,{min:{x:ot,y:J},max:{x:ot+it,y:J+Y}},j).forEach(function(St){-1===gt.indexOf(St)&>.push(St)}),gt},intersectRay:function(ot,J,it,Y,j,nt){void 0===j&&(j=1),nt=this.getMatterBodies(nt);for(var ht=[],gt=V.ray(nt,G.create(ot,J),G.create(it,Y),j),wt=0;wt{var b=a(9674),T=a(83419),g=a(31884),f=a(95643),h=a(95540),c=a(72699),u=a(68287),m=a(26099),d=new T({Extends:u,Mixins:[g.Bounce,g.Collision,g.Force,g.Friction,g.Gravity,g.Mass,g.Sensor,g.SetBody,g.Sleep,g.Static,g.Transform,g.Velocity,c],initialize:function(v,x,y,_,E,A){f.call(this,v.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new b(this),this.setTexture(_,E),this.setSizeToFrame(),this.setOrigin(),this.world=v,this._tempVec2=new m(x,y);var D=h(A,"shape",null);D?this.setBody(D,A):this.setRectangle(this.width,this.height,A),this.setPosition(x,y),this.initPipeline(),this.initPostPipeline(!0)}});S.exports=d},73834:(S,k,a)=>{var b=a(66280),T=a(22562),g=a(83419),f=a(31884),h=a(62644),c=a(50792),u=a(95540),m=a(97022),d=a(41598),p=new g({Extends:c,Mixins:[f.Bounce,f.Collision,f.Friction,f.Gravity,f.Mass,f.Sensor,f.Sleep,f.Static],initialize:function(x,y,_){c.call(this),this.tile=y,this.world=x,y.physics.matterBody&&y.physics.matterBody.destroy(),y.physics.matterBody=this;var E=u(_,"body",null),A=u(_,"addToWorld",!0);if(E)this.setBody(E,A);else{var D=y.getCollisionGroup();u(D,"objects",[]).length>0?this.setFromTileCollision(_):this.setFromTileRectangle(_)}if(y.flipX||y.flipY){var R={x:y.getCenterX(),y:y.getCenterY()};T.scale(E,y.flipX?-1:1,y.flipY?-1:1,R)}},setFromTileRectangle:function(v){void 0===v&&(v={}),m(v,"isStatic")||(v.isStatic=!0),m(v,"addToWorld")||(v.addToWorld=!0);var x=this.tile.getBounds(),E=b.rectangle(x.x+x.width/2,x.y+x.height/2,x.width,x.height,v);return this.setBody(E,v.addToWorld),this},setFromTileCollision:function(v){void 0===v&&(v={}),m(v,"isStatic")||(v.isStatic=!0),m(v,"addToWorld")||(v.addToWorld=!0);for(var x=this.tile.tilemapLayer.scaleX,y=this.tile.tilemapLayer.scaleY,_=this.tile.getLeft(),E=this.tile.getTop(),A=this.tile.getCollisionGroup(),D=u(A,"objects",[]),I=[],R=0;R1){var ot=h(v);ot.parts=I,this.setBody(T.create(ot),ot.addToWorld)}return this},setBody:function(v,x){return void 0===x&&(x=!0),this.body&&this.removeBody(),this.body=v,this.body.gameObject=this,x&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});S.exports=p},19496:(S,k,a)=>{var b=a(66280),T=a(22562),g=a(53402),f=a(95540),h=a(41598);S.exports={parseBody:function(u,m,d,p){void 0===p&&(p={});for(var v=f(d,"fixtures",[]),x=[],y=0;y{var b=a(66280),T=a(22562);S.exports={parseBody:function(f,h,c,u){void 0===u&&(u={});var m,d=c.vertices;if(1===d.length)u.vertices=d[0],m=T.create(u),b.flagCoincidentParts(m.parts);else{for(var p=[],v=0;v{var b=a(15647),T=a(83419),g=a(69351),f=a(48140),h=a(81388),c=a(1121),u=a(8214),m=a(46975),d=a(53614),p=a(26099),v=a(41598),x=new T({initialize:function(_,E,A){void 0===A&&(A={}),this.scene=_,this.world=E,this.camera=null,this.pointer=null,this.active=!0,this.position=new p,this.body=null,this.part=null,this.constraint=f.create(m(A,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(c.BEFORE_UPDATE,this.update,this),_.sys.input.on(u.POINTER_DOWN,this.onDown,this),_.sys.input.on(u.POINTER_UP,this.onUp,this)},onDown:function(y){this.pointer||(this.pointer=y,this.camera=y.camera)},onUp:function(y){y===this.pointer&&(this.pointer=null)},getBody:function(y){var _=this.position,E=this.constraint;this.camera.getWorldPoint(y.x,y.y,_);for(var A=g.allBodies(this.world.localWorld),D=0;D1?1:0;I{var b=a(66280),T=a(22562),g=a(83419),f=a(53402),h=a(69351),c=a(48413),u=a(50792),m=a(1121),d=a(95540),p=a(35154),v=a(22562),x=a(35810),y=a(73834),_=a(4372),E=a(13037),A=a(31725),D=new g({Extends:u,initialize:function(R,F){u.call(this),this.scene=R,this.engine=c.create(F),this.localWorld=this.engine.world;var N=p(F,"gravity",null);N?this.setGravity(N.x,N.y,N.scale):!1===N&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=p(F,"enabled",!0),this.getDelta=p(F,"getDelta",this.update60Hz);var V=d(F,"runner",{}),B=d(V,"fps",!1),H=d(V,"fps",60),Q=d(V,"delta",1e3/H),G=d(V,"deltaMin",1e3/H),K=d(V,"deltaMax",1e3/(.5*H));B||(H=1e3/Q),this.runner={fps:H,deltaSampleSize:d(V,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,timeBuffer:0,isFixed:d(V,"isFixed",!1),delta:Q,deltaMin:G,deltaMax:K},this.autoUpdate=p(F,"autoUpdate",!0);var q=p(F,"debug",!1);if(this.drawDebug="object"==typeof q||q,this.debugConfig={showAxes:d(q,"showAxes",!1),showAngleIndicator:d(q,"showAngleIndicator",!1),angleColor:d(q,"angleColor",15208787),showBroadphase:d(q,"showBroadphase",!1),broadphaseColor:d(q,"broadphaseColor",16757760),showBounds:d(q,"showBounds",!1),boundsColor:d(q,"boundsColor",16777215),showVelocity:d(q,"showVelocity",!1),velocityColor:d(q,"velocityColor",44783),showCollisions:d(q,"showCollisions",!1),collisionColor:d(q,"collisionColor",16094476),showSeparations:d(q,"showSeparations",!1),separationColor:d(q,"separationColor",16753920),showBody:d(q,"showBody",!0),showStaticBody:d(q,"showStaticBody",!0),showInternalEdges:d(q,"showInternalEdges",!1),renderFill:d(q,"renderFill",!1),renderLine:d(q,"renderLine",!0),fillColor:d(q,"fillColor",1075465),fillOpacity:d(q,"fillOpacity",1),lineColor:d(q,"lineColor",2678297),lineOpacity:d(q,"lineOpacity",1),lineThickness:d(q,"lineThickness",1),staticFillColor:d(q,"staticFillColor",857979),staticLineColor:d(q,"staticLineColor",1255396),showSleeping:d(q,"showSleeping",!1),staticBodySleepOpacity:d(q,"staticBodySleepOpacity",.7),sleepFillColor:d(q,"sleepFillColor",4605510),sleepLineColor:d(q,"sleepLineColor",10066585),showSensors:d(q,"showSensors",!0),sensorFillColor:d(q,"sensorFillColor",857979),sensorLineColor:d(q,"sensorLineColor",1255396),showPositions:d(q,"showPositions",!0),positionSize:d(q,"positionSize",4),positionColor:d(q,"positionColor",14697178),showJoint:d(q,"showJoint",!0),jointColor:d(q,"jointColor",14737474),jointLineOpacity:d(q,"jointLineOpacity",1),jointLineThickness:d(q,"jointLineThickness",2),pinSize:d(q,"pinSize",4),pinColor:d(q,"pinColor",4382944),springColor:d(q,"springColor",14697184),anchorColor:d(q,"anchorColor",15724527),anchorSize:d(q,"anchorSize",4),showConvexHulls:d(q,"showConvexHulls",!1),hullColor:d(q,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),d(F,"setBounds",!1)){var at=F.setBounds;if("boolean"==typeof at)this.setBounds();else{var ot=d(at,"x",0),J=d(at,"y",0),it=d(at,"width",R.sys.scale.width),Y=d(at,"height",R.sys.scale.height),j=d(at,"thickness",64),nt=d(at,"left",!0),ht=d(at,"right",!0),gt=d(at,"top",!0),wt=d(at,"bottom",!0);this.setBounds(ot,J,it,Y,j,nt,ht,gt,wt)}}},setCompositeRenderStyle:function(I){var V,B,H,R=I.bodies,F=I.constraints,N=I.composites;for(V=0;V0&&V.map(function(Q){H=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collide",B,H,Q),H.gameObject&&H.gameObject.emit("collide",H,B,Q),x.trigger(B,"onCollide",{pair:Q}),x.trigger(H,"onCollide",{pair:Q}),B.onCollideCallback&&B.onCollideCallback(Q),H.onCollideCallback&&H.onCollideCallback(Q),B.onCollideWith[H.id]&&B.onCollideWith[H.id](H,Q),H.onCollideWith[B.id]&&H.onCollideWith[B.id](B,Q)}),I.emit(m.COLLISION_START,N,B,H)}),x.on(R,"collisionActive",function(N){var B,H,V=N.pairs;V.length>0&&V.map(function(Q){H=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collideActive",B,H,Q),H.gameObject&&H.gameObject.emit("collideActive",H,B,Q),x.trigger(B,"onCollideActive",{pair:Q}),x.trigger(H,"onCollideActive",{pair:Q}),B.onCollideActiveCallback&&B.onCollideActiveCallback(Q),H.onCollideActiveCallback&&H.onCollideActiveCallback(Q)}),I.emit(m.COLLISION_ACTIVE,N,B,H)}),x.on(R,"collisionEnd",function(N){var B,H,V=N.pairs;V.length>0&&V.map(function(Q){H=Q.bodyB,(B=Q.bodyA).gameObject&&B.gameObject.emit("collideEnd",B,H,Q),H.gameObject&&H.gameObject.emit("collideEnd",H,B,Q),x.trigger(B,"onCollideEnd",{pair:Q}),x.trigger(H,"onCollideEnd",{pair:Q}),B.onCollideEndCallback&&B.onCollideEndCallback(Q),H.onCollideEndCallback&&H.onCollideEndCallback(Q)}),I.emit(m.COLLISION_END,N,B,H)})},setBounds:function(I,R,F,N,V,B,H,Q,G){return void 0===I&&(I=0),void 0===R&&(R=0),void 0===F&&(F=this.scene.sys.scale.width),void 0===N&&(N=this.scene.sys.scale.height),void 0===V&&(V=64),void 0===B&&(B=!0),void 0===H&&(H=!0),void 0===Q&&(Q=!0),void 0===G&&(G=!0),this.updateWall(B,"left",I-V,R-V,V,N+2*V),this.updateWall(H,"right",I+F,R-V,V,N+2*V),this.updateWall(Q,"top",I,R-V,F,V),this.updateWall(G,"bottom",I,R+N,F,V),this},updateWall:function(I,R,F,N,V,B){var H=this.walls[R];I?(H&&_.remove(this.localWorld,H),this.walls[R]=this.create(F+=V/2,N+=B/2,V,B,{isStatic:!0,friction:0,frictionStatic:0})):(H&&_.remove(this.localWorld,H),this.walls[R]=null)},createDebugGraphic:function(){var I=this.scene.sys.add.graphics({x:0,y:0});return I.setDepth(Number.MAX_VALUE),this.debugGraphic=I,this.drawDebug=!0,I},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(I,R,F){return void 0===I&&(I=0),void 0===R&&(R=1),void 0===F&&(F=.001),this.localWorld.gravity.x=I,this.localWorld.gravity.y=R,this.localWorld.gravity.scale=F,this},create:function(I,R,F,N,V){var B=b.rectangle(I,R,F,N,V);return _.add(this.localWorld,B),B},add:function(I){return _.add(this.localWorld,I),this},remove:function(I,R){Array.isArray(I)||(I=[I]);for(var F=0;FMath.max(E._maxFrameDelta,F.maxFrameTime))&&(H=F.frameDelta||E._frameDeltaFallback),F.frameDeltaSmoothing){F.frameDeltaHistory.push(H),F.frameDeltaHistory=F.frameDeltaHistory.slice(-F.frameDeltaHistorySize);var Q=F.frameDeltaHistory.slice(0).sort(),G=F.frameDeltaHistory.slice(Q.length*E._smoothingLowerBound,Q.length*E._smoothingUpperBound);H=E._mean(G)||H}F.frameDeltaSnapping&&(H=1e3/Math.round(1e3/H)),F.frameDelta=H,F.timeLastTick=I,F.timeBuffer+=F.frameDelta,F.timeBuffer=f.clamp(F.timeBuffer,0,F.frameDelta+V*E._timeBufferMargin),F.lastUpdatesDeferred=0;for(var q=F.maxUpdates||Math.ceil(F.maxFrameTime/V),at=f.now();V>0&&F.timeBuffer>=V*E._timeBufferMargin;){c.update(R,V),F.timeBuffer-=V,B+=1;var ot=f.now()-N,J=f.now()-at;if(B>=q||ot+E._elapsedNextEstimate*J/B>F.maxFrameTime){F.lastUpdatesDeferred=Math.round(Math.max(0,F.timeBuffer/V-E._timeBufferMargin));break}}}},step:function(I){c.update(this.engine,I)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(I){var R=I.hasOwnProperty("body")?I.body:I;return null!==h.get(this.localWorld,R.id,R.type)},getAllBodies:function(){return h.allBodies(this.localWorld)},getAllConstraints:function(){return h.allConstraints(this.localWorld)},getAllComposites:function(){return h.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var I=this.debugConfig,R=this.engine,F=this.debugGraphic,N=h.allBodies(this.localWorld);this.debugGraphic.clear(),I.showBroadphase&&R.broadphase.controller&&this.renderGrid(R.broadphase,F,I.broadphaseColor,.5),I.showBounds&&this.renderBodyBounds(N,F,I.boundsColor,.5),(I.showBody||I.showStaticBody)&&this.renderBodies(N),I.showJoint&&this.renderJoints(),(I.showAxes||I.showAngleIndicator)&&this.renderBodyAxes(N,F,I.showAxes,I.angleColor,.5),I.showVelocity&&this.renderBodyVelocity(N,F,I.velocityColor,1,2),I.showSeparations&&this.renderSeparations(R.pairs.list,F,I.separationColor),I.showCollisions&&this.renderCollisions(R.pairs.list,F,I.collisionColor)}},renderGrid:function(I,R,F,N){R.lineStyle(1,F,N);for(var V=f.keys(I.buckets),B=0;B0){var q=K[0].vertex.x,at=K[0].vertex.y;2===V.contactCount&&(q=(K[0].vertex.x+K[1].vertex.x)/2,at=(K[0].vertex.y+K[1].vertex.y)/2),G.bodyB===G.supports[0].body||G.bodyA.isStatic?R.lineBetween(q-8*G.normal.x,at-8*G.normal.y,q,at):R.lineBetween(q+8*G.normal.x,at+8*G.normal.y,q,at)}}return this},renderBodyBounds:function(I,R,F,N){R.lineStyle(1,F,N);for(var V=0;V1?1:0;G1?1:0;K1?1:0;K1&&this.renderConvexHull(Y,R,J,ht)}}},renderBody:function(I,R,F,N,V,B,H,Q){void 0===N&&(N=null),void 0===V&&(V=null),void 0===B&&(B=1),void 0===H&&(H=null),void 0===Q&&(Q=null);for(var G=this.debugConfig,K=G.sensorFillColor,q=G.sensorLineColor,at=I.parts,ot=at.length,J=ot>1?1:0;J1){var H=I.vertices;R.lineStyle(N,F),R.beginPath(),R.moveTo(H[0].x,H[0].y);for(var Q=1;Q0&&(R.fillStyle(H),R.fillCircle(at.x,at.y,Q),R.fillCircle(ot.x,ot.y,Q)),this},resetCollisionIDs:function(){return T._nextCollidingGroupId=1,T._nextNonCollidingGroupId=-1,T._nextCategory=1,this},shutdown:function(){x.off(this.engine),this.removeAllListeners(),_.clear(this.localWorld,!1),c.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});S.exports=D},70410:S=>{S.exports={setBounce:function(a){return this.body.restitution=a,this}}},66968:S=>{S.exports={setCollisionCategory:function(a){return this.body.collisionFilter.category=a,this},setCollisionGroup:function(a){return this.body.collisionFilter.group=a,this},setCollidesWith:function(a){var b=0;if(Array.isArray(a))for(var T=0;T{var b=a(22562);S.exports={applyForce:function(g){return this._tempVec2.set(this.body.position.x,this.body.position.y),b.applyForce(this.body,this._tempVec2,g),this},applyForceFrom:function(g,f){return b.applyForce(this.body,g,f),this},thrust:function(g){var f=this.body.angle;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(g){var f=this.body.angle-Math.PI/2;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(g){var f=this.body.angle+Math.PI/2;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(g){var f=this.body.angle-Math.PI;return this._tempVec2.set(g*Math.cos(f),g*Math.sin(f)),b.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}}},5436:S=>{S.exports={setFriction:function(a,b,T){return this.body.friction=a,void 0!==b&&(this.body.frictionAir=b),void 0!==T&&(this.body.frictionStatic=T),this},setFrictionAir:function(a){return this.body.frictionAir=a,this},setFrictionStatic:function(a){return this.body.frictionStatic=a,this}}},39858:S=>{S.exports={setIgnoreGravity:function(a){return this.body.ignoreGravity=a,this}}},37302:(S,k,a)=>{var b=a(22562),T=a(26099);S.exports={setMass:function(f){return b.setMass(this.body,f),this},setDensity:function(f){return b.setDensity(this.body,f),this},centerOfMass:{get:function(){return new T(this.body.centerOfMass.x,this.body.centerOfMass.y)}}}},39132:S=>{S.exports={setSensor:function(a){return this.body.isSensor=a,this},isSensor:function(){return this.body.isSensor}}},57772:(S,k,a)=>{var b=a(66280),T=a(22562),g=a(43855),f=a(95540),h=a(19496),c=a(85791),u=a(41598);S.exports={setRectangle:function(d,p,v){return this.setBody({type:"rectangle",width:d,height:p},v)},setCircle:function(d,p){return this.setBody({type:"circle",radius:d},p)},setPolygon:function(d,p,v){return this.setBody({type:"polygon",sides:p,radius:d},v)},setTrapezoid:function(d,p,v,x){return this.setBody({type:"trapezoid",width:d,height:p,slope:v},x)},setExistingBody:function(d,p){void 0===p&&(p=!0),this.body&&this.world.remove(this.body,!0),this.body=d;for(var v=0;v{var b=a(1121),T=a(53614),g=a(35810);S.exports={setToSleep:function(){return T.set(this.body,!0),this},setAwake:function(){return T.set(this.body,!1),this},setSleepThreshold:function(h){return void 0===h&&(h=60),this.body.sleepThreshold=h,this},setSleepEvents:function(h,c){return this.setSleepStartEvent(h),this.setSleepEndEvent(c),this},setSleepStartEvent:function(h){if(h){var c=this.world;g.on(this.body,"sleepStart",function(u){c.emit(b.SLEEP_START,u,this)})}else g.off(this.body,"sleepStart");return this},setSleepEndEvent:function(h){if(h){var c=this.world;g.on(this.body,"sleepEnd",function(u){c.emit(b.SLEEP_END,u,this)})}else g.off(this.body,"sleepEnd");return this}}},90556:(S,k,a)=>{var b=a(22562);S.exports={setStatic:function(g){return b.setStatic(this.body,g),this},isStatic:function(){return this.body.isStatic}}},85436:(S,k,a)=>{var b=a(22562),T=a(36383),g=a(86554),f=a(30954);S.exports={x:{get:function(){return this.body.position.x},set:function(u){this._tempVec2.set(u,this.y),b.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(u){this._tempVec2.set(this.x,u),b.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(u){var m=1/this._scaleX,d=1/this._scaleY;this._scaleX=u,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,b.scale(this.body,m,d),b.scale(this.body,u,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(u){var m=1/this._scaleX,d=1/this._scaleY;this._scaleY=u,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,b.scale(this.body,m,d),b.scale(this.body,this._scaleX,u)}},angle:{get:function(){return f(this.body.angle*T.RAD_TO_DEG)},set:function(u){this.rotation=f(u)*T.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(u){this._rotation=g(u),b.setAngle(this.body,this._rotation)}},setPosition:function(u,m){return void 0===u&&(u=0),void 0===m&&(m=u),this._tempVec2.set(u,m),b.setPosition(this.body,this._tempVec2),this},setRotation:function(u){return void 0===u&&(u=0),this._rotation=g(u),b.setAngle(this.body,u),this},setFixedRotation:function(){return b.setInertia(this.body,1/0),this},setAngle:function(u){return void 0===u&&(u=0),this.angle=u,b.setAngle(this.body,this.rotation),this},setScale:function(u,m,d){void 0===u&&(u=1),void 0===m&&(m=u);var p=1/this._scaleX,v=1/this._scaleY;return this._scaleX=u,this._scaleY=m,b.scale(this.body,p,v,d),b.scale(this.body,u,m,d),this}}},42081:(S,k,a)=>{var b=a(22562);S.exports={setVelocityX:function(g){return this._tempVec2.set(g,this.body.velocity.y),b.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(g){return this._tempVec2.set(this.body.velocity.x,g),b.setVelocity(this.body,this._tempVec2),this},setVelocity:function(g,f){return this._tempVec2.set(g,f),b.setVelocity(this.body,this._tempVec2),this},getVelocity:function(){return b.getVelocity(this.body)},setAngularVelocity:function(g){return b.setAngularVelocity(this.body,g),this},getAngularVelocity:function(){return b.getAngularVelocity(this.body)},setAngularSpeed:function(g){return b.setAngularSpeed(this.body,g),this},getAngularSpeed:function(){return b.getAngularSpeed(this.body)}}},31884:(S,k,a)=>{S.exports={Bounce:a(70410),Collision:a(66968),Force:a(51607),Friction:a(5436),Gravity:a(39858),Mass:a(37302),Sensor:a(39132),SetBody:a(57772),Sleep:a(38083),Static:a(90556),Transform:a(85436),Velocity:a(42081)}},85608:S=>{S.exports="afteradd"},1213:S=>{S.exports="afterremove"},25968:S=>{S.exports="afterupdate"},67205:S=>{S.exports="beforeadd"},39438:S=>{S.exports="beforeremove"},44823:S=>{S.exports="beforeupdate"},92593:S=>{S.exports="collisionactive"},60128:S=>{S.exports="collisionend"},76861:S=>{S.exports="collisionstart"},92362:S=>{S.exports="dragend"},76408:S=>{S.exports="drag"},93971:S=>{S.exports="dragstart"},5656:S=>{S.exports="pause"},47861:S=>{S.exports="resume"},79099:S=>{S.exports="sleepend"},35906:S=>{S.exports="sleepstart"},1121:(S,k,a)=>{S.exports={AFTER_ADD:a(85608),AFTER_REMOVE:a(1213),AFTER_UPDATE:a(25968),BEFORE_ADD:a(67205),BEFORE_REMOVE:a(39438),BEFORE_UPDATE:a(44823),COLLISION_ACTIVE:a(92593),COLLISION_END:a(60128),COLLISION_START:a(76861),DRAG_END:a(92362),DRAG:a(76408),DRAG_START:a(93971),PAUSE:a(5656),RESUME:a(47861),SLEEP_END:a(79099),SLEEP_START:a(35906)}},3875:(S,k,a)=>{S.exports={BodyBounds:a(68174),Components:a(31884),Events:a(1121),Factory:a(28137),MatterGameObject:a(75803),Image:a(23181),Matter:a(19933),MatterPhysics:a(42045),PolyDecomp:a(55973),Sprite:a(34803),TileBody:a(73834),PhysicsEditorParser:a(19496),PhysicsJSONParser:a(85791),PointerConstraint:a(98713),World:a(68243)}},22562:(S,k,a)=>{var b={};S.exports=b;var T=a(41598),g=a(31725),f=a(53614),h=a(53402),c=a(15647),u=a(66615);!function(){b._timeCorrection=!0,b._inertiaScale=4,b._nextCollidingGroupId=1,b._nextNonCollidingGroupId=-1,b._nextCategory=1,b._baseDelta=16.666666666666668,b.create=function(d){var p={id:h.nextId(),type:"body",label:"Body",parts:[],plugin:{},attractors:d.attractors||[],wrapBounds:null,angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,deltaTime:16.666666666666668,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!d.hasOwnProperty("position")&&d.hasOwnProperty("vertices")?d.position=T.centre(d.vertices):d.hasOwnProperty("vertices")||(p.vertices=T.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var v=h.extend(p,d);return m(v,d),v.setOnCollideWith=function(x,y){return y?this.onCollideWith[x.id]=y:delete this.onCollideWith[x.id],this},v},b.nextGroup=function(d){return d?b._nextNonCollidingGroupId--:b._nextCollidingGroupId++},b.nextCategory=function(){return b._nextCategory=b._nextCategory<<1,b._nextCategory};var m=function(d,p){if(p=p||{},b.set(d,{bounds:d.bounds||c.create(d.vertices),positionPrev:d.positionPrev||g.clone(d.position),anglePrev:d.anglePrev||d.angle,vertices:d.vertices,parts:d.parts||[d],isStatic:d.isStatic,isSleeping:d.isSleeping,parent:d.parent||d}),T.rotate(d.vertices,d.angle,d.position),u.rotate(d.axes,d.angle),c.update(d.bounds,d.vertices,d.velocity),b.set(d,{axes:p.axes||d.axes,area:p.area||d.area,mass:p.mass||d.mass,inertia:p.inertia||d.inertia}),1===d.parts.length){var v=d.bounds,x=d.centerOfMass,y=d.centerOffset,_=v.max.x-v.min.x,E=v.max.y-v.min.y;x.x=-(v.min.x-d.position.x)/_,x.y=-(v.min.y-d.position.y)/E,y.x=_*x.x,y.y=E*x.y}};b.set=function(d,p,v){var x;for(x in"string"==typeof p&&(x=p,(p={})[x]=v),p)if(Object.prototype.hasOwnProperty.call(p,x))switch(v=p[x],x){case"isStatic":b.setStatic(d,v);break;case"isSleeping":f.set(d,v);break;case"mass":b.setMass(d,v);break;case"density":b.setDensity(d,v);break;case"inertia":b.setInertia(d,v);break;case"vertices":b.setVertices(d,v);break;case"position":b.setPosition(d,v);break;case"angle":b.setAngle(d,v);break;case"velocity":b.setVelocity(d,v);break;case"angularVelocity":b.setAngularVelocity(d,v);break;case"speed":b.setSpeed(d,v);break;case"angularSpeed":b.setAngularSpeed(d,v);break;case"parts":b.setParts(d,v);break;case"centre":b.setCentre(d,v);break;default:d[x]=v}},b.setStatic=function(d,p){for(var v=0;v0&&g.rotateAbout(_.position,x,d.position,_.position)}},b.setVelocity=function(d,p){var v=d.deltaTime/b._baseDelta;d.positionPrev.x=d.position.x-p.x*v,d.positionPrev.y=d.position.y-p.y*v,d.velocity.x=(d.position.x-d.positionPrev.x)/v,d.velocity.y=(d.position.y-d.positionPrev.y)/v,d.speed=g.magnitude(d.velocity)},b.getVelocity=function(d){var p=b._baseDelta/d.deltaTime;return{x:(d.position.x-d.positionPrev.x)*p,y:(d.position.y-d.positionPrev.y)*p}},b.getSpeed=function(d){return g.magnitude(b.getVelocity(d))},b.setSpeed=function(d,p){b.setVelocity(d,g.mult(g.normalise(b.getVelocity(d)),p))},b.setAngularVelocity=function(d,p){var v=d.deltaTime/b._baseDelta;d.anglePrev=d.angle-p*v,d.angularVelocity=(d.angle-d.anglePrev)/v,d.angularSpeed=Math.abs(d.angularVelocity)},b.getAngularVelocity=function(d){return(d.angle-d.anglePrev)*b._baseDelta/d.deltaTime},b.getAngularSpeed=function(d){return Math.abs(b.getAngularVelocity(d))},b.setAngularSpeed=function(d,p){b.setAngularVelocity(d,h.sign(b.getAngularVelocity(d))*p)},b.translate=function(d,p,v){b.setPosition(d,g.add(d.position,p),v)},b.rotate=function(d,p,v,x){if(v){var y=Math.cos(p),_=Math.sin(p),E=d.position.x-v.x,A=d.position.y-v.y;b.setPosition(d,{x:v.x+(E*y-A*_),y:v.y+(E*_+A*y)},x),b.setAngle(d,d.angle+p,x)}else b.setAngle(d,d.angle+p,x)},b.scale=function(d,p,v,x){var y=0,_=0;x=x||d.position;for(var E=d.inertia===1/0,A=0;A0&&(y+=D.area,_+=D.inertia),D.position.x=x.x+(D.position.x-x.x)*p,D.position.y=x.y+(D.position.y-x.y)*v,c.update(D.bounds,D.vertices,d.velocity)}d.parts.length>1&&(d.area=y,d.isStatic||(b.setMass(d,d.density*y),b.setInertia(d,_))),d.circleRadius&&(p===v?d.circleRadius*=p:d.circleRadius=null),E&&b.setInertia(d,1/0)},b.update=function(d,p){var v=(p=(typeof p<"u"?p:16.666666666666668)*d.timeScale)*p,x=b._timeCorrection?p/(d.deltaTime||p):1,y=1-d.frictionAir*(p/h._baseDelta),E=(d.position.y-d.positionPrev.y)*x;d.velocity.x=(d.position.x-d.positionPrev.x)*x*y+d.force.x/d.mass*v,d.velocity.y=E*y+d.force.y/d.mass*v,d.positionPrev.x=d.position.x,d.positionPrev.y=d.position.y,d.position.x+=d.velocity.x,d.position.y+=d.velocity.y,d.deltaTime=p,d.angularVelocity=(d.angle-d.anglePrev)*y*x+d.torque/d.inertia*v,d.anglePrev=d.angle,d.angle+=d.angularVelocity,d.speed=g.magnitude(d.velocity),d.angularSpeed=Math.abs(d.angularVelocity);for(var A=0;A0&&(D.position.x+=d.velocity.x,D.position.y+=d.velocity.y),0!==d.angularVelocity&&(T.rotate(D.vertices,d.angularVelocity,d.position),u.rotate(D.axes,d.angularVelocity),A>0&&g.rotateAbout(D.position,d.angularVelocity,d.position,D.position)),c.update(D.bounds,D.vertices,d.velocity)}},b.updateVelocities=function(d){var p=b._baseDelta/d.deltaTime,v=d.velocity;v.x=(d.position.x-d.positionPrev.x)*p,v.y=(d.position.y-d.positionPrev.y)*p,d.speed=Math.sqrt(v.x*v.x+v.y*v.y),d.angularVelocity=(d.angle-d.anglePrev)*p,d.angularSpeed=Math.abs(d.angularVelocity)},b.applyForce=function(d,p,v){var x_x=p.x-d.position.x,x_y=p.y-d.position.y;d.force.x+=v.x,d.force.y+=v.y,d.torque+=x_x*v.y-x_y*v.x},b._totalProperties=function(d){for(var p={mass:0,area:0,inertia:0,centre:{x:0,y:0}},v=1===d.parts.length?0:1;v{var b={};S.exports=b;var T=a(35810),g=a(53402),f=a(15647),h=a(22562);b.create=function(c){return g.extend({id:g.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},wrapBounds:null,cache:{allBodies:null,allConstraints:null,allComposites:null}},c)},b.setModified=function(c,u,m,d){if(T.trigger(c,"compositeModified",c),c.isModified=u,u&&c.cache&&(c.cache.allBodies=null,c.cache.allConstraints=null,c.cache.allComposites=null),m&&c.parent&&b.setModified(c.parent,u,m,d),d)for(var p=0;p{var b={};S.exports=b;var T=a(69351);b.create=T.create,b.add=T.add,b.remove=T.remove,b.clear=T.clear,b.addComposite=T.addComposite,b.addBody=T.addBody,b.addConstraint=T.addConstraint},52284:(S,k,a)=>{var b={};S.exports=b;var f,h,c,T=a(41598),g=a(4506);f=[],h={overlap:0,axis:null},c={overlap:0,axis:null},b.create=function(u,m){return{pair:null,collided:!1,bodyA:u,bodyB:m,parentA:u.parent,parentB:m.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[null,null],supportCount:0}},b.collides=function(u,m,d){if(b._overlapAxes(h,u.vertices,m.vertices,u.axes),h.overlap<=0||(b._overlapAxes(c,m.vertices,u.vertices,m.axes),c.overlap<=0))return null;var v,x,p=d&&d.table[g.id(u,m)];p?v=p.collision:((v=b.create(u,m)).collided=!0,v.bodyA=u.id=0&&(R=-R,F=-F),y.x=R,y.y=F,_.x=-F,_.y=R,E.x=R*D,E.y=F*D,v.depth=D;var B=b._findSupports(u,m,y,1),H=0;if(T.contains(u.vertices,B[0])&&(A[H++]=B[0]),T.contains(u.vertices,B[1])&&(A[H++]=B[1]),H<2){var Q=b._findSupports(m,u,y,-1);T.contains(m.vertices,Q[0])&&(A[H++]=Q[0]),H<2&&T.contains(m.vertices,Q[1])&&(A[H++]=Q[1])}return 0===H&&(A[H++]=B[0]),v.supportCount=H,v},b._overlapAxes=function(u,m,d,p){var F,N,V,B,H,Q,v=m.length,x=d.length,y=m[0].x,_=m[0].y,E=d[0].x,A=d[0].y,D=p.length,I=Number.MAX_VALUE,R=0;for(H=0;HJ?J=B:Bit?it=B:B{var k={};S.exports=k,k.create=function(a){return{vertex:a,normalImpulse:0,tangentImpulse:0}}},81388:(S,k,a)=>{var b={};S.exports=b;var T=a(53402),g=a(52284);b.create=function(f){return T.extend({bodies:[],collisions:[],pairs:null},f)},b.setBodies=function(f,h){f.bodies=h.slice(0)},b.clear=function(f){f.bodies=[],f.collisions=[]},b.collisions=function(f){var x,y,h=f.pairs,c=f.bodies,u=c.length,m=b.canCollide,d=g.collides,p=f.collisions,v=0;for(c.sort(b._compareBoundsX),x=0;xA)break;if(!(DB.max.y)&&(!R||!V.isStatic&&!V.isSleeping)&&m(_.collisionFilter,V.collisionFilter)){var H=V.parts.length;if(N&&1===H)(Q=d(_,V,h))&&(p[v++]=Q);else for(var K=H>1?1:0,q=F>1?1:0;q(B=J.bounds).max.x||E.max.xB.max.y||(Q=d(at,J,h))&&(p[v++]=Q)}}}}return p.length!==v&&(p.length=v),p},b.canCollide=function(f,h){return f.group===h.group&&0!==f.group?f.group>0:!!(f.mask&h.category)&&!!(h.mask&f.category)},b._compareBoundsX=function(f,h){return f.bounds.min.x-h.bounds.min.x}},4506:(S,k,a)=>{var b={};S.exports=b;var T=a(43424);b.create=function(g,f){var h=g.bodyA,c=g.bodyB,u={id:b.id(h,c),bodyA:h,bodyB:c,collision:g,contacts:[T.create(),T.create()],contactCount:0,separation:0,isActive:!0,isSensor:h.isSensor||c.isSensor,timeCreated:f,timeUpdated:f,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return b.update(u,g,f),u},b.update=function(g,f,h){var c=f.supports,u=f.supportCount,m=g.contacts,d=f.parentA,p=f.parentB;g.isActive=!0,g.timeUpdated=h,g.collision=f,g.separation=f.depth,g.inverseMass=d.inverseMass+p.inverseMass,g.friction=d.frictionp.frictionStatic?d.frictionStatic:p.frictionStatic,g.restitution=d.restitution>p.restitution?d.restitution:p.restitution,g.slop=d.slop>p.slop?d.slop:p.slop,g.contactCount=u,f.pair=g;var v=c[0],x=m[0],y=c[1],_=m[1];(_.vertex===v||x.vertex===y)&&(m[1]=x,m[0]=x=_,_=m[1]),x.vertex=v,_.vertex=y},b.setActive=function(g,f,h){f?(g.isActive=!0,g.timeUpdated=h):(g.isActive=!1,g.contactCount=0)},b.id=function(g,f){return g.id{var b={};S.exports=b;var T=a(4506),g=a(53402);b.create=function(f){return g.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},f)},b.update=function(f,h,c){var N,V,B,u=T.update,m=T.create,d=T.setActive,p=f.table,v=f.list,x=v.length,y=x,_=f.collisionStart,E=f.collisionEnd,A=f.collisionActive,D=h.length,I=0,R=0,F=0;for(B=0;B=c?v[y++]=V:(d(V,!1,c),V.collision.bodyA.sleepCounter>0&&V.collision.bodyB.sleepCounter>0?v[y++]=V:(E[R++]=V,delete p[V.id]));v.length!==y&&(v.length=y),_.length!==I&&(_.length=I),E.length!==R&&(E.length=R),A.length!==F&&(A.length=F)},b.clear=function(f){return f.table={},f.list.length=0,f.collisionStart.length=0,f.collisionActive.length=0,f.collisionEnd.length=0,f}},73296:(S,k,a)=>{var b={};S.exports=b;var T=a(31725),g=a(52284),f=a(15647),h=a(66280),c=a(41598);b.collides=function(u,m){for(var d=[],p=m.length,v=u.bounds,x=g.collides,y=f.overlaps,_=0;_{var b={};S.exports=b;var T=a(41598),g=a(53402),f=a(15647);b._restingThresh=2,b._restingThreshTangent=Math.sqrt(6),b._positionDampen=.9,b._positionWarming=.8,b._frictionNormalMultiplier=5,b._frictionMaxStatic=Number.MAX_VALUE,b.preSolvePosition=function(h){var c,u,m,d=h.length;for(c=0;cCn?(E=R.friction*(ri>0?1:-1)*d)<-(A=ri>0?ri:-ri)?E=-A:E>A&&(E=A):(E=ri,A=y);var sr=Bt*H-Yt*B,vn=$t*H-qt*B,bn=J/(K+N.inverseInertia*sr*sr+V.inverseInertia*vn*vn),Fr=(1+R.restitution)*be*bn;if(E*=bn,be0&&(wt.normalImpulse=0),Fr=wt.normalImpulse-cs}if(ri<-v||ri>v)wt.tangentImpulse=0;else{var Dn=wt.tangentImpulse;wt.tangentImpulse+=E,wt.tangentImpulse<-A&&(wt.tangentImpulse=-A),wt.tangentImpulse>A&&(wt.tangentImpulse=A),E=wt.tangentImpulse-Dn}var xr=B*Fr+Q*E,ts=H*Fr+G*E;N.isStatic||N.isSleeping||(N.positionPrev.x+=xr*N.inverseMass,N.positionPrev.y+=ts*N.inverseMass,N.anglePrev+=(Bt*ts-Yt*xr)*N.inverseInertia),V.isStatic||V.isSleeping||(V.positionPrev.x-=xr*V.inverseMass,V.positionPrev.y-=ts*V.inverseMass,V.anglePrev-=($t*ts-qt*xr)*V.inverseInertia)}}}}},48140:(S,k,a)=>{var b={};S.exports=b;var T=a(41598),g=a(31725),f=a(53614),h=a(15647),c=a(66615),u=a(53402);b._warming=.4,b._torqueDampen=1,b._minLength=1e-6,b.create=function(m){var d=m;d.bodyA&&!d.pointA&&(d.pointA={x:0,y:0}),d.bodyB&&!d.pointB&&(d.pointB={x:0,y:0});var p=d.bodyA?g.add(d.bodyA.position,d.pointA):d.pointA,v=d.bodyB?g.add(d.bodyB.position,d.pointB):d.pointB,x=g.magnitude(g.sub(p,v));d.length=typeof d.length<"u"?d.length:x,d.id=d.id||u.nextId(),d.label=d.label||"Constraint",d.type="constraint",d.stiffness=d.stiffness||(d.length>0?1:.7),d.damping=d.damping||0,d.angularStiffness=d.angularStiffness||0,d.angleA=d.bodyA?d.bodyA.angle:d.angleA,d.angleB=d.bodyB?d.bodyB.angle:d.angleB,d.plugin={};var y={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===d.length&&d.stiffness>.1?(y.type="pin",y.anchors=!1):d.stiffness<.9&&(y.type="spring"),d.render=u.extend(y,d.render),d},b.preSolveAll=function(m){for(var d=0;d=1||0===m.length?m.stiffness*d:m.stiffness*d*d)),B=(p?p.inverseMass:0)+(v?v.inverseMass:0),Q=B+((p?p.inverseInertia:0)+(v?v.inverseInertia:0));if(N>0){var J=g.create();q=g.div(A,D),ot=g.sub(v&&g.sub(v.position,v.positionPrev)||J,p&&g.sub(p.position,p.positionPrev)||J),at=g.dot(q,ot)}p&&!p.isStatic&&(p.constraintImpulse.x-=V.x*(K=p.inverseMass/B),p.constraintImpulse.y-=V.y*K,p.position.x-=V.x*K,p.position.y-=V.y*K,N>0&&(p.positionPrev.x-=N*q.x*at*K,p.positionPrev.y-=N*q.y*at*K),G=g.cross(x,V)/Q*b._torqueDampen*p.inverseInertia*(1-m.angularStiffness),p.constraintImpulse.angle-=G,p.angle-=G),v&&!v.isStatic&&(v.constraintImpulse.x+=V.x*(K=v.inverseMass/B),v.constraintImpulse.y+=V.y*K,v.position.x+=V.x*K,v.position.y+=V.y*K,N>0&&(v.positionPrev.x+=N*q.x*at*K,v.positionPrev.y+=N*q.y*at*K),G=g.cross(y,V)/Q*b._torqueDampen*v.inverseInertia*(1-m.angularStiffness),v.constraintImpulse.angle+=G,v.angle+=G)}}},b.postSolveAll=function(m){for(var d=0;d0&&(y.position.x+=v.x,y.position.y+=v.y),0!==v.angle&&(T.rotate(y.vertices,v.angle,p.position),c.rotate(y.axes,v.angle),x>0&&g.rotateAbout(y.position,v.angle,p.position,y.position)),h.update(y.bounds,y.vertices,p.velocity)}v.angle*=b._warming,v.x*=b._warming,v.y*=b._warming}}},b.pointAWorld=function(m){return{x:(m.bodyA?m.bodyA.position.x:0)+(m.pointA?m.pointA.x:0),y:(m.bodyA?m.bodyA.position.y:0)+(m.pointA?m.pointA.y:0)}},b.pointBWorld=function(m){return{x:(m.bodyB?m.bodyB.position.x:0)+(m.pointB?m.pointB.x:0),y:(m.bodyB?m.bodyB.position.y:0)+(m.pointB?m.pointB.y:0)}},b.currentLength=function(m){var y=(m.bodyA?m.bodyA.position.x:0)+(m.pointA?m.pointA.x:0)-((m.bodyB?m.bodyB.position.x:0)+(m.pointB?m.pointB.x:0)),_=(m.bodyA?m.bodyA.position.y:0)+(m.pointA?m.pointA.y:0)-((m.bodyB?m.bodyB.position.y:0)+(m.pointB?m.pointB.y:0));return Math.sqrt(y*y+_*_)}},53402:(S,k,a)=>{var b={};S.exports=b,function(){b._baseDelta=16.666666666666668,b._nextId=0,b._seed=0,b._nowStartTime=+new Date,b._warnedOnce={},b._decomp=null,b.extend=function(g,f){var h,u;"boolean"==typeof f?(h=2,u=f):(h=1,u=!0);for(var m=h;m0;f--){var h=Math.floor(b.random()*(f+1)),c=g[f];g[f]=g[h],g[h]=c}return g},b.choose=function(g){return g[Math.floor(b.random()*g.length)]},b.isElement=function(g){return typeof HTMLElement<"u"?g instanceof HTMLElement:!!(g&&g.nodeType&&g.nodeName)},b.isArray=function(g){return"[object Array]"===Object.prototype.toString.call(g)},b.isFunction=function(g){return"function"==typeof g},b.isPlainObject=function(g){return"object"==typeof g&&g.constructor===Object},b.isString=function(g){return"[object String]"===toString.call(g)},b.clamp=function(g,f,h){return gh?h:g},b.sign=function(g){return g<0?-1:1},b.now=function(){if(typeof window<"u"&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-b._nowStartTime},b.random=function(g,f){return f=typeof f<"u"?f:1,(g=typeof g<"u"?g:0)+T()*(f-g)};var T=function(){return b._seed=(9301*b._seed+49297)%233280,b._seed/233280};b.colorToNumber=function(g){return 3==(g=g.replace("#","")).length&&(g=g.charAt(0)+g.charAt(0)+g.charAt(1)+g.charAt(1)+g.charAt(2)+g.charAt(2)),parseInt(g,16)},b.logLevel=1,b.log=function(){console&&b.logLevel>0&&b.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},b.info=function(){console&&b.logLevel>0&&b.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},b.warn=function(){console&&b.logLevel>0&&b.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},b.warnOnce=function(){var g=Array.prototype.slice.call(arguments).join(" ");b._warnedOnce[g]||(b.warn(g),b._warnedOnce[g]=!0)},b.deprecated=function(g,f,h){g[f]=b.chain(function(){b.warnOnce("\u{1f505} deprecated \u{1f505}",h)},g[f])},b.nextId=function(){return b._nextId++},b.indexOf=function(g,f){if(g.indexOf)return g.indexOf(f);for(var h=0;h{var b={};S.exports=b;var T=a(53614),g=a(66272),f=a(81388),h=a(99561),c=a(35810),u=a(69351),m=a(48140),d=a(53402),p=a(22562);b._deltaMax=16.666666666666668,b.create=function(v){var y=d.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0,lastUpdatesPerFrame:0}},v=v||{});return y.world=v.world||u.create({label:"World"}),y.pairs=v.pairs||h.create(),y.detector=v.detector||f.create(),y.detector.pairs=y.pairs,y.grid={buckets:[]},y.world.gravity=y.gravity,y.broadphase=y.grid,y.metrics={},y},b.update=function(v,x){var R,y=d.now(),_=v.world,E=v.detector,A=v.pairs,D=v.timing,I=D.timestamp;x>b._deltaMax&&d.warnOnce("Matter.Engine.update: delta argument is recommended to be less than or equal to",b._deltaMax.toFixed(3),"ms."),x=typeof x<"u"?x:d._baseDelta,D.timestamp+=x*=D.timeScale,D.lastDelta=x;var F={timestamp:D.timestamp,delta:x};c.trigger(v,"beforeUpdate",F);var N=u.allBodies(_),V=u.allConstraints(_),B=u.allComposites(_);for(_.isModified&&(f.setBodies(E,N),u.setModified(_,!1,!1,!0)),v.enableSleeping&&T.update(N,x),b._bodiesApplyGravity(N,v.gravity),b.wrap(N,B),b.attractors(N),x>0&&b._bodiesUpdate(N,x),c.trigger(v,"beforeSolve",F),m.preSolveAll(N),R=0;R0&&c.trigger(v,"collisionStart",{pairs:A.collisionStart,timestamp:D.timestamp,delta:x});var Q=d.clamp(20/v.positionIterations,0,1);for(g.preSolvePosition(A.list),R=0;R0&&c.trigger(v,"collisionActive",{pairs:A.collisionActive,timestamp:D.timestamp,delta:x}),A.collisionEnd.length>0&&c.trigger(v,"collisionEnd",{pairs:A.collisionEnd,timestamp:D.timestamp,delta:x}),b._bodiesClearForces(N),c.trigger(v,"afterUpdate",F),v.timing.lastElapsed=d.now()-y,v},b.merge=function(v,x){if(d.extend(v,x),x.world){v.world=x.world,b.clear(v);for(var y=u.allBodies(v.world),_=0;_0)for(var E=0;E{var b={};S.exports=b;var T=a(53402);b.on=function(g,f,h){for(var u,c=f.split(" "),m=0;m0){h||(h={}),c=f.split(" ");for(var v=0;v{var b={};S.exports=b;var T=a(73832),g=a(53402);b.name="matter-js",b.version="0.20.0",b.uses=[],b.used=[],b.use=function(){T.use(b,Array.prototype.slice.call(arguments))},b.before=function(f,h){return f=f.replace(/^Matter./,""),g.chainPathBefore(b,f,h)},b.after=function(f,h){return f=f.replace(/^Matter./,""),g.chainPathAfter(b,f,h)}},73832:(S,k,a)=>{var b={};S.exports=b;var T=a(53402);b._registry={},b.register=function(g){if(b.isPlugin(g)||T.warn("Plugin.register:",b.toString(g),"does not implement all required fields."),g.name in b._registry){var f=b._registry[g.name],h=b.versionParse(g.version).number,c=b.versionParse(f.version).number;h>c?(T.warn("Plugin.register:",b.toString(f),"was upgraded to",b.toString(g)),b._registry[g.name]=g):h-1},b.isFor=function(g,f){var h=g.for&&b.dependencyParse(g.for);return!g.for||f.name===h.name&&b.versionSatisfies(f.version,h.range)},b.use=function(g,f){if(g.uses=(g.uses||[]).concat(f||[]),0!==g.uses.length){for(var h=b.dependencies(g),c=T.topologicalSort(h),u=[],m=0;m0&&!d.silent&&T.info(u.join(" "))}else T.warn("Plugin.use:",b.toString(g),"does not specify any dependencies to install.")},b.dependencies=function(g,f){var h=b.dependencyParse(g),c=h.name;if(!(c in(f=f||{}))){g=b.resolve(g)||g,f[c]=T.map(g.uses||[],function(m){b.isPlugin(m)&&b.register(m);var d=b.dependencyParse(m),p=b.resolve(m);return p&&!b.versionSatisfies(p.version,d.range)?(T.warn("Plugin.dependencies:",b.toString(p),"does not satisfy",b.toString(d),"used by",b.toString(h)+"."),p._warned=!0,g._warned=!0):p||(T.warn("Plugin.dependencies:",b.toString(m),"used by",b.toString(h),"could not be resolved."),g._warned=!0),d.name});for(var u=0;u=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;f.test(g)||T.warn("Plugin.versionParse:",g,"is not a valid version or range.");var h=f.exec(g),c=Number(h[4]),u=Number(h[5]),m=Number(h[6]);return{isRange:!(!h[1]&&!h[2]),version:h[3],range:g,operator:h[1]||h[2]||"",major:c,minor:u,patch:m,parts:[c,u,m],prerelease:h[7],number:1e8*c+1e4*u+m}},b.versionSatisfies=function(g,f){var h=b.versionParse(f=f||"*"),c=b.versionParse(g);if(h.isRange){if("*"===h.operator||"*"===g)return!0;if(">"===h.operator)return c.number>h.number;if(">="===h.operator)return c.number>=h.number;if("~"===h.operator)return c.major===h.major&&c.minor===h.minor&&c.patch>=h.patch;if("^"===h.operator)return h.major>0?c.major===h.major&&c.number>=h.number:h.minor>0?c.minor===h.minor&&c.patch>=h.patch:c.patch===h.patch}return g===f||"*"===g}},13037:(S,k,a)=>{var b={};S.exports=b;var T=a(35810),g=a(48413),f=a(53402);!function(){b._maxFrameDelta=66.66666666666667,b._frameDeltaFallback=16.666666666666668,b._timeBufferMargin=1.5,b._elapsedNextEstimate=1,b._smoothingLowerBound=.1,b._smoothingUpperBound=.9,b.create=function(c){var m=f.extend({delta:16.666666666666668,frameDelta:null,frameDeltaSmoothing:!0,frameDeltaSnapping:!0,frameDeltaHistory:[],frameDeltaHistorySize:100,frameRequestId:null,timeBuffer:0,timeLastTick:null,maxUpdates:null,maxFrameTime:33.333333333333336,lastUpdatesDeferred:0,enabled:!0},c);return m.fps=0,m},b.run=function(c,u){return c.timeBuffer=b._frameDeltaFallback,function m(d){c.frameRequestId=b._onNextFrame(c,m),d&&c.enabled&&b.tick(c,u,d)}(),c},b.tick=function(c,u,m){var d=f.now(),p=c.delta,v=0,x=m-c.timeLastTick;if((!x||!c.timeLastTick||x>Math.max(b._maxFrameDelta,c.maxFrameTime))&&(x=c.frameDelta||b._frameDeltaFallback),c.frameDeltaSmoothing){c.frameDeltaHistory.push(x),c.frameDeltaHistory=c.frameDeltaHistory.slice(-c.frameDeltaHistorySize);var y=c.frameDeltaHistory.slice(0).sort(),_=c.frameDeltaHistory.slice(y.length*b._smoothingLowerBound,y.length*b._smoothingUpperBound);x=h(_)||x}c.frameDeltaSnapping&&(x=1e3/Math.round(1e3/x)),c.frameDelta=x,c.timeLastTick=m,c.timeBuffer+=c.frameDelta,c.timeBuffer=f.clamp(c.timeBuffer,0,c.frameDelta+p*b._timeBufferMargin),c.lastUpdatesDeferred=0;var A=c.maxUpdates||Math.ceil(c.maxFrameTime/p),D={timestamp:u.timing.timestamp};T.trigger(c,"beforeTick",D),T.trigger(c,"tick",D);for(var I=f.now();p>0&&c.timeBuffer>=p*b._timeBufferMargin;){T.trigger(c,"beforeUpdate",D),g.update(u,p),T.trigger(c,"afterUpdate",D),c.timeBuffer-=p,v+=1;var R=f.now()-d,F=f.now()-I;if(v>=A||R+b._elapsedNextEstimate*F/v>c.maxFrameTime){c.lastUpdatesDeferred=Math.round(Math.max(0,c.timeBuffer/p-b._timeBufferMargin));break}}u.timing.lastUpdatesPerFrame=v,T.trigger(c,"afterTick",D),c.frameDeltaHistory.length>=100&&(c.lastUpdatesDeferred&&Math.round(c.frameDelta/p)>A?f.warnOnce("Matter.Runner: runner reached runner.maxUpdates, see docs."):c.lastUpdatesDeferred&&f.warnOnce("Matter.Runner: runner reached runner.maxFrameTime, see docs."),typeof c.isFixed<"u"&&f.warnOnce("Matter.Runner: runner.isFixed is now redundant, see docs."),(c.deltaMin||c.deltaMax)&&f.warnOnce("Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs."),0!==c.fps&&f.warnOnce("Matter.Runner: runner.fps was replaced by runner.delta, see docs."))},b.stop=function(c){b._cancelNextFrame(c)},b._onNextFrame=function(c,u){if(!(typeof window<"u"&&window.requestAnimationFrame))throw new Error("Matter.Runner: missing required global window.requestAnimationFrame.");return c.frameRequestId=window.requestAnimationFrame(u),c.frameRequestId},b._cancelNextFrame=function(c){if(!(typeof window<"u"&&window.cancelAnimationFrame))throw new Error("Matter.Runner: missing required global window.cancelAnimationFrame.");window.cancelAnimationFrame(c.frameRequestId)};var h=function(c){for(var u=0,m=c.length,d=0;d{var b={};S.exports=b;var T=a(22562),g=a(35810),f=a(53402);b._motionWakeThreshold=.18,b._motionSleepThreshold=.08,b._minBias=.9,b.update=function(h,c){for(var u=c/f._baseDelta,m=b._motionSleepThreshold,d=0;d0&&p.motion=p.sleepThreshold/u&&b.set(p,!0)):p.sleepCounter>0&&(p.sleepCounter-=1)}else b.set(p,!1)}},b.afterCollisions=function(h){for(var c=b._motionSleepThreshold,u=0;uc&&b.set(x,!1)}}}},b.set=function(h,c){var u=h.isSleeping;c?(h.isSleeping=!0,h.sleepCounter=h.sleepThreshold,h.positionImpulse.x=0,h.positionImpulse.y=0,h.positionPrev.x=h.position.x,h.positionPrev.y=h.position.y,h.anglePrev=h.angle,h.speed=0,h.angularSpeed=0,h.motion=0,u||g.trigger(h,"sleepStart")):(h.isSleeping=!1,h.sleepCounter=0,u&&g.trigger(h,"sleepEnd"))}},66280:(S,k,a)=>{var b={};S.exports=b;var T=a(41598),g=a(53402),f=a(22562),h=a(15647),c=a(31725);b.rectangle=function(u,m,d,p,v){v=v||{};var x={label:"Rectangle Body",position:{x:u,y:m},vertices:T.fromPath("L 0 0 L "+d+" 0 L "+d+" "+p+" L 0 "+p)};if(v.chamfer){var y=v.chamfer;x.vertices=T.chamfer(x.vertices,y.radius,y.quality,y.qualityMin,y.qualityMax),delete v.chamfer}return f.create(g.extend({},x,v))},b.trapezoid=function(u,m,d,p,v,x){x=x||{},v>=1&&g.warn("Bodies.trapezoid: slope parameter must be < 1.");var _=d*(v*=.5),E=_+(1-2*v)*d,A=E+_,I={label:"Trapezoid Body",position:{x:u,y:m},vertices:T.fromPath(v<.5?"L 0 0 L "+_+" "+-p+" L "+E+" "+-p+" L "+A+" 0":"L 0 0 L "+E+" "+-p+" L "+A+" 0")};if(x.chamfer){var R=x.chamfer;I.vertices=T.chamfer(I.vertices,R.radius,R.quality,R.qualityMin,R.qualityMax),delete x.chamfer}return f.create(g.extend({},I,x))},b.circle=function(u,m,d,p,v){p=p||{};var x={label:"Circle Body",circleRadius:d};v=v||25;var y=Math.ceil(Math.max(10,Math.min(v,d)));return y%2==1&&(y+=1),b.polygon(u,m,y,d,g.extend({},x,p))},b.polygon=function(u,m,d,p,v){if(v=v||{},d<3)return b.circle(u,m,p,v);for(var x=2*Math.PI/d,y="",_=.5*x,E=0;E0&&T.area(ot)1?(D=f.create(g.extend({parts:I.slice(0)},p)),f.setPosition(D,{x:u,y:m}),D):I[0]},b.flagCoincidentParts=function(u,m){void 0===m&&(m=5);for(var d=0;d{var b={};S.exports=b;var T=a(69351),g=a(48140),f=a(53402),h=a(22562),c=a(66280);b.stack=function(u,m,d,p,v,x,y){for(var D,_=T.create({label:"Stack"}),E=u,A=m,I=0,R=0;RF&&(F=B),h.translate(V,{x:.5*(V.bounds.max.x-V.bounds.min.x),y:.5*B}),E=V.bounds.max.x+v,T.addBody(_,V),D=V,I+=1}else E+=v}A+=F+x,E=u}return _},b.chain=function(u,m,d,p,v,x){for(var y=u.bodies,_=1;_0)for(_=0;_0&&T.addConstraint(u,g.create(f.extend({bodyA:x[_-1+(y-1)*m],bodyB:A},v))),p&&_F||A<(D=F-D)||A>d-1-D))return 1===R&&h.translate(I,{x:(A+(d%2==1?1:-1))*N,y:0}),y(u+(I?A*N:0)+A*v,E,A,D,I,R)})},b.newtonsCradle=function(u,m,d,p,v){for(var x=T.create({label:"Newtons Cradle"}),y=0;y{var b={};S.exports=b;var T=a(31725),g=a(53402);b.fromVertices=function(f){for(var h={},c=0;c{var k={};S.exports=k,k.create=function(a){var b={min:{x:0,y:0},max:{x:0,y:0}};return a&&k.update(b,a),b},k.update=function(a,b,T){a.min.x=1/0,a.max.x=-1/0,a.min.y=1/0,a.max.y=-1/0;for(var g=0;ga.max.x&&(a.max.x=f.x),f.xa.max.y&&(a.max.y=f.y),f.y0?a.max.x+=T.x:a.min.x+=T.x,T.y>0?a.max.y+=T.y:a.min.y+=T.y)},k.contains=function(a,b){return b.x>=a.min.x&&b.x<=a.max.x&&b.y>=a.min.y&&b.y<=a.max.y},k.overlaps=function(a,b){return a.min.x<=b.max.x&&a.max.x>=b.min.x&&a.max.y>=b.min.y&&a.min.y<=b.max.y},k.translate=function(a,b){a.min.x+=b.x,a.max.x+=b.x,a.min.y+=b.y,a.max.y+=b.y},k.shift=function(a,b){var T=a.max.x-a.min.x,g=a.max.y-a.min.y;a.min.x=b.x,a.max.x=b.x+T,a.min.y=b.y,a.max.y=b.y+g},k.wrap=function(a,b,T){var g=null,f=null;if(typeof b.min.x<"u"&&typeof b.max.x<"u"&&(a.min.x>b.max.x?g=b.min.x-a.max.x:a.max.xb.max.y?f=b.min.y-a.max.y:a.max.y{var b={};S.exports=b,a(15647);var g=a(53402);b.pathToVertices=function(f,h){typeof window<"u"&&!("SVGPathSeg"in window)&&g.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var c,u,m,d,p,v,x,y,_,D,I,A=[],R=0,F=0,N=0;h=h||15;var V=function(H,Q,G){var K=G%2==1&&G>1;if(!_||H!=_.x||Q!=_.y){_&&K?(D=_.x,I=_.y):(D=0,I=0);var q={x:D+H,y:I+Q};(K||!_)&&(_=q),A.push(q),F=D+H,N=I+Q}},B=function(H){var Q=H.pathSegTypeAsLetter.toUpperCase();if("Z"!==Q){switch(Q){case"M":case"L":case"T":case"C":case"S":case"Q":F=H.x,N=H.y;break;case"H":F=H.x;break;case"V":N=H.y}V(F,N,H.pathSegType)}};for(b._svgPathToAbsolute(f),m=f.getTotalLength(),v=[],c=0;c{var k={};S.exports=k,k.create=function(a,b){return{x:a||0,y:b||0}},k.clone=function(a){return{x:a.x,y:a.y}},k.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},k.magnitudeSquared=function(a){return a.x*a.x+a.y*a.y},k.rotate=function(a,b,T){var g=Math.cos(b),f=Math.sin(b);T||(T={});var h=a.x*g-a.y*f;return T.y=a.x*f+a.y*g,T.x=h,T},k.rotateAbout=function(a,b,T,g){var f=Math.cos(b),h=Math.sin(b);g||(g={});var c=T.x+((a.x-T.x)*f-(a.y-T.y)*h);return g.y=T.y+((a.x-T.x)*h+(a.y-T.y)*f),g.x=c,g},k.normalise=function(a){var b=k.magnitude(a);return 0===b?{x:0,y:0}:{x:a.x/b,y:a.y/b}},k.dot=function(a,b){return a.x*b.x+a.y*b.y},k.cross=function(a,b){return a.x*b.y-a.y*b.x},k.cross3=function(a,b,T){return(b.x-a.x)*(T.y-a.y)-(b.y-a.y)*(T.x-a.x)},k.add=function(a,b,T){return T||(T={}),T.x=a.x+b.x,T.y=a.y+b.y,T},k.sub=function(a,b,T){return T||(T={}),T.x=a.x-b.x,T.y=a.y-b.y,T},k.mult=function(a,b){return{x:a.x*b,y:a.y*b}},k.div=function(a,b){return{x:a.x/b,y:a.y/b}},k.perp=function(a,b){return{x:(b=!0===b?-1:1)*-a.y,y:b*a.x}},k.neg=function(a){return{x:-a.x,y:-a.y}},k.angle=function(a,b){return Math.atan2(b.y-a.y,b.x-a.x)},k._temp=[k.create(),k.create(),k.create(),k.create(),k.create(),k.create()]},41598:(S,k,a)=>{var b={};S.exports=b;var T=a(31725),g=a(53402);b.create=function(f,h){for(var c=[],u=0;u0)return!1;d=p}return!0},b.scale=function(f,h,c,u){if(1===h&&1===c)return f;u=u||b.centre(f);for(var d,p=0;p=0?p-1:f.length-1],x=f[p],y=f[(p+1)%f.length],_=h[p0&&(h|=2),3===h)return!1;return 0!==h||null},b.hull=function(f){var u,m,h=[],c=[];for((f=f.slice(0)).sort(function(d,p){var v=d.x-p.x;return 0!==v?v:d.y-p.y}),m=0;m=2&&T.cross3(c[c.length-2],c[c.length-1],u)<=0;)c.pop();c.push(u)}for(m=f.length-1;m>=0;m-=1){for(u=f[m];h.length>=2&&T.cross3(h[h.length-2],h[h.length-1],u)<=0;)h.pop();h.push(u)}return h.pop(),c.pop(),h.concat(c)}},55973:S=>{function k(J,it,Y){var nt,ht,gt,wt,St,Bt,Yt,j=[0,0];return gt=(nt=J[1][1]-J[0][1])*J[0][0]+(ht=J[0][0]-J[1][0])*J[0][1],Bt=(wt=it[1][1]-it[0][1])*it[0][0]+(St=it[0][0]-it[1][0])*it[0][1],at(Yt=nt*St-wt*ht,0,Y=Y||0)||(j[0]=(St*gt-ht*Bt)/Yt,j[1]=(nt*Bt-wt*gt)/Yt),j}function a(J,it,Y,j){var nt=it[0]-J[0],ht=it[1]-J[1],gt=j[0]-Y[0],wt=j[1]-Y[1];if(gt*ht-wt*nt==0)return!1;var St=(nt*(Y[1]-J[1])+ht*(J[0]-Y[0]))/(gt*ht-wt*nt),Bt=(gt*(J[1]-Y[1])+wt*(Y[0]-J[0]))/(wt*nt-gt*ht);return St>=0&&St<=1&&Bt>=0&&Bt<=1}function b(J,it,Y){return(it[0]-J[0])*(Y[1]-J[1])-(Y[0]-J[0])*(it[1]-J[1])}function T(J,it,Y){return b(J,it,Y)>0}function g(J,it,Y){return b(J,it,Y)>=0}function f(J,it,Y){return b(J,it,Y)<0}function h(J,it,Y){return b(J,it,Y)<=0}S.exports={decomp:function V(J){var it=N(J);return it.length>0?B(J,it):[J]},quickDecomp:function G(J,it,Y,j,nt,ht,gt){gt=gt||0,nt=nt||25,it=typeof it<"u"?it:[],Y=Y||[],j=j||[];var wt=[0,0],St=[0,0],Bt=[0,0],Yt=0,$t=0,qt=0,ne=0,le=0,Me=0,pi=0,Ie=[],_i=[],be=J,ri=J;if(ri.length<3)return it;if(++gt>(ht=ht||100))return console.warn("quickDecomp: max level ("+ht+") reached."),it;for(var Ke=0;Kele&&(le+=J.length),ne=Number.MAX_VALUE,le3&&j>=0;--j)m(p(J,j-1),p(J,j),p(J,j+1),it)&&(J.splice(j%J.length,1),Y++);return Y},removeDuplicatePoints:function q(J,it){for(var Y=J.length-1;Y>=1;--Y)for(var j=J[Y],nt=Y-1;nt>=0;--nt)if(ot(j,J[nt],it)){J.splice(Y,1);continue}},makeCCW:function y(J){for(var it=0,Y=J,j=1;jY[it][0])&&(it=j);return!T(p(J,it-1),p(J,it),p(J,it+1))&&(function _(J){for(var it=[],Y=J.length,j=0;j!==Y;j++)it.push(J.pop());for(j=0;j!==Y;j++)J[j]=it[j]}(J),!0)}};var c=[],u=[];function m(J,it,Y,j){if(j){var nt=c,ht=u;nt[0]=it[0]-J[0],nt[1]=it[1]-J[1],ht[0]=Y[0]-it[0],ht[1]=Y[1]-it[1];var gt=nt[0]*ht[0]+nt[1]*ht[1],wt=Math.sqrt(nt[0]*nt[0]+nt[1]*nt[1]),St=Math.sqrt(ht[0]*ht[0]+ht[1]*ht[1]);return Math.acos(gt/(wt*St)){var T=new(a(83419))({initialize:function(f){this.pluginManager=f,this.game=f.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});S.exports=T},42363:S=>{S.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},37277:S=>{var k={},a={};S.exports={register:function(T,g,f,h){void 0===h&&(h=!1),k[T]={plugin:g,mapping:f,custom:h}},registerCustom:function(T,g,f,h){a[T]={plugin:g,mapping:f,data:h}},hasCore:function(T){return k.hasOwnProperty(T)},hasCustom:function(T){return a.hasOwnProperty(T)},getCore:function(T){return k[T]},getCustom:function(T){return a[T]},getCustomClass:function(T){return a.hasOwnProperty(T)?a[T].plugin:null},remove:function(T){k.hasOwnProperty(T)&&delete k[T]},removeCustom:function(T){a.hasOwnProperty(T)&&delete a[T]},destroyCorePlugins:function(){for(var T in k)k.hasOwnProperty(T)&&delete k[T]},destroyCustomPlugins:function(){for(var T in a)a.hasOwnProperty(T)&&delete a[T]}}},77332:(S,k,a)=>{var b=a(83419),T=a(8443),g=a(50792),f=a(74099),h=a(44603),c=a(39429),u=a(95540),m=a(37277),d=a(72905),p=new b({Extends:g,initialize:function(x){g.call(this),this.game=x,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],x.isBooted?this.boot():x.events.once(T.BOOT,this.boot,this)},boot:function(){var v,x,y,_,E,A,D,I=this.game.config,R=I.installGlobalPlugins;for(R=R.concat(this._pendingGlobal),v=0;v{var b=a(52018),T=a(83419),g=a(44594),f=new T({Extends:b,initialize:function(c,u,m){b.call(this,u),this.scene=c,this.systems=c.sys,this.pluginKey=m,c.sys.events.once(g.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});S.exports=f},18922:(S,k,a)=>{S.exports={BasePlugin:a(52018),DefaultPlugins:a(42363),PluginCache:a(37277),PluginManager:a(77332),ScenePlugin:a(45145)}},63595:()=>{typeof HTMLVideoElement<"u"&&!("requestVideoFrameCallback"in HTMLVideoElement.prototype)&&"getVideoPlaybackQuality"in HTMLVideoElement.prototype&&(HTMLVideoElement.prototype._rvfcpolyfillmap={},HTMLVideoElement.prototype.requestVideoFrameCallback=function(S){const k=performance.now(),a=this.getVideoPlaybackQuality(),b=this.mozPresentedFrames||this.mozPaintedFrames||a.totalVideoFrames-a.droppedVideoFrames,T=(g,f)=>{const h=this.getVideoPlaybackQuality(),c=this.mozPresentedFrames||this.mozPaintedFrames||h.totalVideoFrames-h.droppedVideoFrames;if(c>b){const u=this.mozFrameDelay||h.totalFrameDelay-a.totalFrameDelay||0,m=f-g;S(f,{presentationTime:f+1e3*u,expectedDisplayTime:f+m,width:this.videoWidth,height:this.videoHeight,mediaTime:Math.max(0,this.currentTime||0)+m/1e3,presentedFrames:c,processingDuration:u}),delete this._rvfcpolyfillmap[k]}else this._rvfcpolyfillmap[k]=requestAnimationFrame(u=>T(f,u))};return this._rvfcpolyfillmap[k]=requestAnimationFrame(g=>T(k,g)),k},HTMLVideoElement.prototype.cancelVideoFrameCallback=function(S){cancelAnimationFrame(this._rvfcpolyfillmap[S]),delete this._rvfcpolyfillmap[S]})},10312:S=>{S.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},29795:S=>{S.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},68627:(S,k,a)=>{var b=a(19715),T=a(32880),g=a(83419),f=a(8054),h=a(50792),c=a(92503),u=a(56373),m=a(97480),d=a(69442),p=a(61340),v=new g({Extends:h,initialize:function(y){h.call(this);var _=y.config;this.config={clearBeforeRender:_.clearBeforeRender,backgroundColor:_.backgroundColor,antialias:_.antialias,roundPixels:_.roundPixels},this.game=y,this.type=f.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=y.canvas,this.gameContext=_.context?_.context:this.gameCanvas.getContext("2d",{alpha:y.config.transparent,desynchronized:y.config.desynchronized,willReadFrequently:!1}),this.currentContext=this.gameContext,this.antialias=y.config.antialias,this.blendModes=u(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new p,this._tempMatrix2=new p,this._tempMatrix3=new p,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(d.READY,this.boot,this)},boot:function(){var x=this.game,y=x.scale.baseSize;this.width=y.width,this.height=y.height,this.isBooted=!0,x.scale.on(m.RESIZE,this.onResize,this),this.resize(y.width,y.height)},onResize:function(x,y){(y.width!==this.width||y.height!==this.height)&&this.resize(y.width,y.height)},resize:function(x,y){this.width=x,this.height=y,this.emit(c.RESIZE,x,y)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(x){return this.currentContext.globalCompositeOperation=x,this},setContext:function(x){return this.currentContext=x||this.gameContext,this},setAlpha:function(x){return this.currentContext.globalAlpha=x,this},preRender:function(){var x=this.gameContext,y=this.config,_=this.width,E=this.height;x.globalAlpha=1,x.globalCompositeOperation="source-over",x.setTransform(1,0,0,1,0,0),this.emit(c.PRE_RENDER_CLEAR),y.clearBeforeRender&&(x.clearRect(0,0,_,E),y.transparent||(x.fillStyle=y.backgroundColor.rgba,x.fillRect(0,0,_,E))),x.save(),this.drawCount=0,this.emit(c.PRE_RENDER)},render:function(x,y,_){var E=y.length;this.emit(c.RENDER,x,_);var A=_.x,D=_.y,I=_.width,R=_.height,F=_.renderToTexture?_.context:x.sys.context;F.save(),this.game.scene.customViewports&&(F.beginPath(),F.rect(A,D,I,R),F.clip()),_.emit(b.PRE_RENDER,_),this.currentContext=F;var N=_.mask;N&&N.preRenderCanvas(this,null,_._maskCamera),_.transparent||(F.fillStyle=_.backgroundColor.rgba,F.fillRect(A,D,I,R)),F.globalAlpha=_.alpha,F.globalCompositeOperation="source-over",this.drawCount+=E,_.renderToTexture&&_.emit(b.PRE_RENDER,_),_.matrix.copyToContext(F);for(var V=0;V=0?at=-(at+B):at<0&&(at=Math.abs(at)-B)),x.flipY&&(ot>=0?ot=-(ot+H):ot<0&&(ot=Math.abs(ot)-H))}var it=1,Y=1;x.flipX&&(Q||(at+=2*K-y.realWidth),it=-1),x.flipY&&(Q||(ot+=2*q-y.realHeight),Y=-1);var j=x.x,nt=x.y;if(_.roundPixels&&(j=Math.floor(j),nt=Math.floor(nt)),R.applyITRS(j,nt,x.rotation,x.scaleX*it,x.scaleY*Y),I.copyFrom(_.matrix),E?(I.multiplyWithOffset(E,-_.scrollX*x.scrollFactorX,-_.scrollY*x.scrollFactorY),R.e=j,R.f=nt):(R.e-=_.scrollX*x.scrollFactorX,R.f-=_.scrollY*x.scrollFactorY),I.multiply(R),_.renderRoundPixels&&(I.e=Math.floor(I.e+.5),I.f=Math.floor(I.f+.5)),D.save(),I.setToContext(D),D.globalCompositeOperation=this.blendModes[x.blendMode],D.globalAlpha=A,D.imageSmoothingEnabled=!y.source.scaleMode,x.mask&&x.mask.preRenderCanvas(this,x,_),B>0&&H>0){var ht=B/G,gt=H/G;_.roundPixels&&(at=Math.floor(at+.5),ot=Math.floor(ot+.5),ht+=.5,gt+=.5),D.drawImage(y.source.image,N,V,B,H,at,ot,ht,gt)}x.mask&&x.mask.postRenderCanvas(this,x,_),D.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});S.exports=v},55830:(S,k,a)=>{S.exports={CanvasRenderer:a(68627),GetBlendModes:a(56373),SetTransform:a(20926)}},56373:(S,k,a)=>{var b=a(10312),T=a(89289);S.exports=function(){var f=[],h=T.supportNewBlendModes,c="source-over";return f[b.NORMAL]=c,f[b.ADD]="lighter",f[b.MULTIPLY]=h?"multiply":c,f[b.SCREEN]=h?"screen":c,f[b.OVERLAY]=h?"overlay":c,f[b.DARKEN]=h?"darken":c,f[b.LIGHTEN]=h?"lighten":c,f[b.COLOR_DODGE]=h?"color-dodge":c,f[b.COLOR_BURN]=h?"color-burn":c,f[b.HARD_LIGHT]=h?"hard-light":c,f[b.SOFT_LIGHT]=h?"soft-light":c,f[b.DIFFERENCE]=h?"difference":c,f[b.EXCLUSION]=h?"exclusion":c,f[b.HUE]=h?"hue":c,f[b.SATURATION]=h?"saturation":c,f[b.COLOR]=h?"color":c,f[b.LUMINOSITY]=h?"luminosity":c,f[b.ERASE]="destination-out",f[b.SOURCE_IN]="source-in",f[b.SOURCE_OUT]="source-out",f[b.SOURCE_ATOP]="source-atop",f[b.DESTINATION_OVER]="destination-over",f[b.DESTINATION_IN]="destination-in",f[b.DESTINATION_OUT]="destination-out",f[b.DESTINATION_ATOP]="destination-atop",f[b.LIGHTER]="lighter",f[b.COPY]="copy",f[b.XOR]="xor",f}},20926:(S,k,a)=>{var b=a(91296);S.exports=function(g,f,h,c,u){var m=c.alpha*h.alpha;if(m<=0)return!1;var d=b(h,c,u).calc;return f.globalCompositeOperation=g.blendModes[h.blendMode],f.globalAlpha=m,f.save(),d.setToContext(f),f.imageSmoothingEnabled=h.frame?!h.frame.source.scaleMode:g.antialias,!0}},63899:S=>{S.exports="losewebgl"},6119:S=>{S.exports="postrender"},48070:S=>{S.exports="prerender"},15640:S=>{S.exports="render"},8912:S=>{S.exports="resize"},87124:S=>{S.exports="restorewebgl"},92503:(S,k,a)=>{S.exports={LOSE_WEBGL:a(63899),POST_RENDER:a(6119),PRE_RENDER:a(48070),RENDER:a(15640),RESIZE:a(8912),RESTORE_WEBGL:a(87124)}},36909:(S,k,a)=>{S.exports={Events:a(92503),Snapshot:a(89966)},S.exports.Canvas=a(55830),S.exports.WebGL=a(4159)},32880:(S,k,a)=>{var b=a(27919),T=a(40987),g=a(95540);S.exports=function(h,c){var u=g(c,"callback"),m=g(c,"type","image/png"),d=g(c,"encoder",.92),p=Math.abs(Math.round(g(c,"x",0))),v=Math.abs(Math.round(g(c,"y",0))),x=Math.floor(g(c,"width",h.width)),y=Math.floor(g(c,"height",h.height));if(g(c,"getPixel",!1)){var D=h.getContext("2d",{willReadFrequently:!1}).getImageData(p,v,1,1).data;u.call(null,new T(D[0],D[1],D[2],D[3]))}else if(0!==p||0!==v||x!==h.width||y!==h.height){var I=b.createWebGL(this,x,y),R=I.getContext("2d",{willReadFrequently:!0});x>0&&y>0&&R.drawImage(h,p,v,x,y,0,0,x,y);var F=new Image;F.onerror=function(){u.call(null),b.remove(I)},F.onload=function(){u.call(null,F),b.remove(I)},F.src=I.toDataURL(m,d)}else{var N=new Image;N.onerror=function(){u.call(null)},N.onload=function(){u.call(null,N)},N.src=h.toDataURL(m,d)}}},88815:(S,k,a)=>{var b=a(27919),T=a(40987),g=a(95540);S.exports=function(h,c){var u=h,m=g(c,"callback"),d=g(c,"type","image/png"),p=g(c,"encoder",.92),v=Math.abs(Math.round(g(c,"x",0))),x=Math.abs(Math.round(g(c,"y",0))),y=g(c,"getPixel",!1),_=g(c,"isFramebuffer",!1),E=_?g(c,"bufferWidth",1):u.drawingBufferWidth,A=_?g(c,"bufferHeight",1):u.drawingBufferHeight;if(y){var D=new Uint8Array(4);u.readPixels(v,_?x:A-x,1,1,u.RGBA,u.UNSIGNED_BYTE,D),m.call(null,new T(D[0],D[1],D[2],D[3]))}else{var R=Math.floor(g(c,"width",E)),F=Math.floor(g(c,"height",A)),N=R*F*4,V=new Uint8Array(N);u.readPixels(v,A-x-F,R,F,u.RGBA,u.UNSIGNED_BYTE,V);for(var B=b.createWebGL(this,R,F),H=B.getContext("2d",{willReadFrequently:!0}),Q=H.getImageData(0,0,R,F),G=Q.data,K=0;K{S.exports={Canvas:a(32880),WebGL:a(88815)}},7530:(S,k,a)=>{var b=a(83419),T=a(36060),g=a(90330),f=a(82264),h=a(95540),c=a(32302),u=a(63448),m=a(31302),d=a(58918),p=a(14811),v=a(92651),x=a(96569),y=a(56527),_=a(57516),E=a(43439),A=a(81041),D=a(12385),I=a(7589),R=a(95428),F=a(72905),N=new b({initialize:function(B){this.game=B.game,this.renderer=B,this.classes=new g([[T.UTILITY_PIPELINE,I],[T.MULTI_PIPELINE,_],[T.BITMAPMASK_PIPELINE,m],[T.SINGLE_PIPELINE,D],[T.ROPE_PIPELINE,A],[T.LIGHT_PIPELINE,x],[T.POINTLIGHT_PIPELINE,E],[T.MOBILE_PIPELINE,y]]),this.postPipelineClasses=new g,this.pipelines=new g,this.postPipelineInstances=[],this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.FX_PIPELINE=null,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(V,B,H){var Q=this.renderer,G=this.renderTargets;this.frameInc=Math.floor(h(V,"frameInc",32));var K=Q.width,q=Q.height,at=this.game.config.disablePreFX;if(this.game.config.disablePostFX||this.postPipelineClasses.setAll([[String(p.BARREL),d.Barrel],[String(p.BLOOM),d.Bloom],[String(p.BLUR),d.Blur],[String(p.BOKEH),d.Bokeh],[String(p.CIRCLE),d.Circle],[String(p.COLOR_MATRIX),d.ColorMatrix],[String(p.DISPLACEMENT),d.Displacement],[String(p.GLOW),d.Glow],[String(p.GRADIENT),d.Gradient],[String(p.PIXELATE),d.Pixelate],[String(p.SHADOW),d.Shadow],[String(p.SHINE),d.Shine],[String(p.VIGNETTE),d.Vignette],[String(p.WIPE),d.Wipe]]),!at){this.classes.set(T.FX_PIPELINE,v);for(var J=Math.min(K,q),it=Math.ceil(J/this.frameInc),Y=1;Y=0;H--){var Q=B[H];Q.active&&Q.preBatch(V)}}},postBatch:function(V){if(V.hasPostPipeline){this.flush();for(var B=V.postPipelines,H=0;H=0;H--){var Q=B[H];Q.active&&Q.preBatch(V)}}},postBatchCamera:function(V){if(V.hasPostPipeline){this.flush();for(var B=V.postPipelines,H=0;Hthis.maxDimension)return this.targetIndex=B.length-3,B[this.targetIndex];var Q=3*(u(V,this.frameInc,0,!0)-1);return this.targetIndex=Q,B[Q]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});S.exports=N},32302:(S,k,a)=>{var b=a(83419),T=a(92503),g=new b({initialize:function(h,c,u,m,d,p,v,x,y){void 0===m&&(m=1),void 0===d&&(d=0),void 0===p&&(p=!0),void 0===v&&(v=!1),void 0===x&&(x=!0),void 0===y&&(y=!0),this.renderer=h,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=m,this.minFilter=d,this.autoClear=p,this.autoResize=!0,this.hasDepthBuffer=x,this.forceClamp=y,this.init(c,u),v?this.renderer.on(T.RESIZE,this.resize,this):this.autoResize=!1},init:function(f,h){var c=this.renderer;this.texture=c.createTextureFromSource(null,f,h,this.minFilter,this.forceClamp),this.framebuffer=c.createFramebuffer(f,h,this.texture,this.hasDepthBuffer),this.width=f,this.height=h},setAutoResize:function(f){return f&&!this.autoResize?(this.renderer.on(T.RESIZE,this.resize,this),this.autoResize=!0):!f&&this.autoResize&&(this.renderer.off(T.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(f,h){if(this.autoResize&&this.willResize(f,h)){var c=this.renderer;c.deleteFramebuffer(this.framebuffer),c.deleteTexture(this.texture),this.texture=c.createTextureFromSource(null,f,h,this.minFilter,this.forceClamp),this.framebuffer=c.createFramebuffer(f,h,this.texture,this.hasDepthBuffer),this.width=f,this.height=h}return this},willResize:function(f,h){return"number"==typeof f&&"number"==typeof h&&(f=Math.round(f*this.scale),h=Math.round(h*this.scale),f=Math.max(f,1),h=Math.max(h,1),f!==this.width||h!==this.height)},bind:function(f,h,c){void 0===f&&(f=!1);var u=this.renderer;if(f&&u.flush(),h&&c&&this.resize(h,c),u.pushFramebuffer(this.framebuffer,!1,!1),f&&this.adjustViewport(),this.autoClear){var m=this.renderer.gl;m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT)}u.clearStencilMask()},adjustViewport:function(){var f=this.renderer.gl;f.viewport(0,0,this.width,this.height),f.disable(f.SCISSOR_TEST)},clear:function(f,h,c,u){var m=this.renderer,d=m.gl;m.pushFramebuffer(this.framebuffer),void 0!==f&&void 0!==h&&void 0!==c&&void 0!==u?(d.enable(d.SCISSOR_TEST),d.scissor(f,h,c,u)):d.disable(d.SCISSOR_TEST),d.clearColor(0,0,0,0),d.clear(d.COLOR_BUFFER_BIT),m.popFramebuffer(),m.resetScissor()},unbind:function(f){void 0===f&&(f=!1);var h=this.renderer;return f&&h.flush(),h.popFramebuffer()},destroy:function(){var f=this.renderer;f.off(T.RESIZE,this.resize,this),f.deleteFramebuffer(this.framebuffer),f.deleteTexture(this.texture),this.renderer=null,this.framebuffer=null,this.texture=null}});S.exports=g},70554:S=>{S.exports={getTintFromFloats:function(k,a,b,T){return((255*T&255)<<24|(255*k&255)<<16|(255*a&255)<<8|255*b&255)>>>0},getTintAppendFloatAlpha:function(k,a){return((255*a&255)<<24|k)>>>0},getTintAppendFloatAlphaAndSwap:function(k,a){return((255*a&255)<<24|(255&k)<<16|(k>>8&255)<<8|k>>16&255)>>>0},getFloatsFromUintRGB:function(k){return[(k>>16&255)/255,(k>>8&255)/255,(255&k)/255]},checkShaderMax:function(k,a){var b=Math.min(16,k.getParameter(k.MAX_TEXTURE_IMAGE_UNITS));return a&&-1!==a?Math.min(b,a):b},parseFragmentShaderMaxTextures:function(k,a){if(!k)return"";for(var b="",T=0;T0&&(b+="\n\telse "),T{var b=a(83419),T=a(62644),g=a(50792),f=a(77085),h=a(95540),c=a(37867),u=a(92503),m=a(32302),d=a(70554),p=a(38683),v=new b({Extends:g,initialize:function(y){g.call(this);var _=y.game,E=_.renderer,A=E.gl;this.name=h(y,"name","WebGLPipeline"),this.game=_,this.renderer=E,this.gl=A,this.view=_.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.topology=h(y,"topology",A.TRIANGLES),this.active=!0,this.forceZero=h(y,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isPreFX=!1,this.renderTargets=[],this.shaders=[],this.projectionWidth=0,this.projectionHeight=0,this.config=y,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[],this.resizeUniform=h(y,"resizeUniform","")},boot:function(){var x,y=this.gl,_=this.config,E=this.renderer;this.isPostFX||(this.projectionMatrix=(new c).identity());var A=this.renderTargets,D=h(_,"renderTarget",!1);"boolean"==typeof D&&D&&(D=1);var I=E.width,R=E.height;if("number"==typeof D)for(x=0;xK&&(K=G[x].vertexSize);var q=h(_,"batchSize",E.config.batchSize);this.vertexCapacity=6*q;var at=new ArrayBuffer(this.vertexCapacity*K);this.vertexData=at,this.bytes=new Uint8Array(at),this.vertexViewF32=new Float32Array(at),this.vertexViewU32=new Uint32Array(at);var ot=h(_,"vertices",null);for(ot?(this.vertexViewF32.set(ot),this.vertexBuffer=E.createVertexBuffer(at,y.STATIC_DRAW)):this.vertexBuffer=E.createVertexBuffer(at.byteLength,y.DYNAMIC_DRAW),this.setVertexBuffer(),x=G.length-1;x>=0;x--)G[x].rebind();this.hasBooted=!0,E.on(u.RESIZE,this.resize,this),E.on(u.PRE_RENDER,this.onPreRender,this),E.on(u.RENDER,this.onRender,this),E.on(u.POST_RENDER,this.onPostRender,this),this.emit(f.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(x,y,_){return x===this.currentShader&&this.renderer.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(_)&&!y&&(y=!0),x.bind(y,!1),this.currentShader=x),this},getShaderByName:function(x){for(var y=this.shaders,_=0;_-1&&(G=J.substring(20))}K&&q&&H.push(new p(this,G,K,q,T(at)))}this.shaders=H}return 0===this.shaders.length?console.warn("Pipeline: "+this.name+" - Invalid shader config"):this.currentShader=this.shaders[0],this},createBatch:function(x){return this.currentBatch={start:this.vertexCount,count:0,texture:[x],unit:0,maxUnit:0},this.currentUnit=0,this.currentTexture=x,this.batch.push(this.currentBatch),0},addTextureToBatch:function(x){var y=this.currentBatch;y&&(y.texture.push(x),y.unit++,y.maxUnit++)},pushBatch:function(x){if(!this.currentBatch||this.forceZero&&x!==this.currentTexture)return this.createBatch(x);if(x===this.currentTexture)return this.currentUnit;var y=this.currentBatch,_=y.texture.indexOf(x);return-1===_?y.texture.length===this.renderer.maxTextures?this.createBatch(x):(y.unit++,y.maxUnit++,y.texture.push(x),this.currentUnit=y.unit,this.currentTexture=x,y.unit):(this.currentUnit=_,this.currentTexture=x,_)},setGameObject:function(x,y){return void 0===y&&(y=x.frame),this.pushBatch(y.source.glTexture)},shouldFlush:function(x){return void 0===x&&(x=0),this.vertexCount+x>this.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(x,y){(x!==this.width||y!==this.height)&&this.flush(),this.width=x,this.height=y;for(var _=this.renderTargets,E=0;E<_.length;E++)_[E].resize(x,y);return this.setProjectionMatrix(x,y),this.resizeUniform&&this.set2f(this.resizeUniform,x,y),this.emit(f.RESIZE,x,y,this),this.onResize(x,y),this},setProjectionMatrix:function(x,y){var _=this.projectionMatrix;if(!_)return this;this.projectionWidth=x,this.projectionHeight=y,_.ortho(0,x,y,0,-1e3,1e3);for(var E=this.shaders,A="uProjectionMatrix",D=0;D=0;_--){var E=y[_].rebind();(!x||E===x)&&(this.currentShader=E)}return this.activeTextures.length=0,this.emit(f.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},restoreContext:function(){var x=this.shaders,y=!!this.vertexBuffer;this.activeBuffer=null,this.activeTextures.length=0,this.batch.length=0,this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,y&&this.setVertexBuffer();for(var _=0;_0){this.emit(f.BEFORE_FLUSH,this,x),this.onBeforeFlush(x);var y=this.gl,_=this.vertexCount,E=this.currentShader.vertexSize,A=this.topology;if(this.active){this.setVertexBuffer(),_===this.vertexCapacity?y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.DYNAMIC_DRAW):y.bufferSubData(y.ARRAY_BUFFER,0,this.bytes.subarray(0,_*E));var D,I,R,F=this.batch,N=this.activeTextures;if(this.forceZero)for(N[0]||y.activeTexture(y.TEXTURE0),D=0;D{var b=a(95428),T=a(72905),g=a(19715),f=a(83419),h=a(8054),c=a(50792),u=a(92503),m=a(50030),d=a(37867),p=a(29747),v=a(7530),x=a(32302),y=a(97480),_=a(69442),E=a(70554),A=a(88815),D=a(26128),I=a(1482),R=a(82751),F=a(84387),N=a(93567),V=a(57183),Q=new f({Extends:c,initialize:function(K){c.call(this);var q=K.config;this.config={clearBeforeRender:q.clearBeforeRender,antialias:q.antialias,backgroundColor:q.backgroundColor,contextCreation:{alpha:q.transparent,desynchronized:q.desynchronized,depth:!0,antialias:q.antialiasGL,premultipliedAlpha:q.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:q.failIfMajorPerformanceCaveat,powerPreference:q.powerPreference,preserveDrawingBuffer:q.preserveDrawingBuffer,willReadFrequently:!1},roundPixels:q.roundPixels,maxTextures:q.maxTextures,maxTextureSize:q.maxTextureSize,batchSize:q.batchSize,maxLights:q.maxLights,mipmapFilter:q.mipmapFilter},this.game=K,this.type=h.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=K.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.glBufferWrappers=[],this.glProgramWrappers=[],this.glTextureWrappers=[],this.glFramebufferWrappers=[],this.glAttribLocationWrappers=[],this.glUniformLocationWrappers=[],this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=p,this.contextRestoredHandler=p,this.previousContextLostHandler=p,this.previousContextRestoredHandler=p,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.drawingBufferHeight=0,this.blankTexture=null,this.normalTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(G){var K,q=this.game,at=this.canvas,ot=G.backgroundColor;if(!(K=q.config.context?q.config.context:at.getContext("webgl",G.contextCreation)||at.getContext("experimental-webgl",G.contextCreation))||K.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=K,this.setExtensions(),this.setContextHandlers(),q.context=K;for(var J=0;J<=27;J++)this.blendModes.push({func:[K.ONE,K.ONE_MINUS_SRC_ALPHA],equation:K.FUNC_ADD});return this.blendModes[1].func=[K.ONE,K.DST_ALPHA],this.blendModes[2].func=[K.DST_COLOR,K.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[K.ONE,K.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[K.ZERO,K.ONE_MINUS_SRC_ALPHA],equation:K.FUNC_REVERSE_SUBTRACT},this.glFormats=[K.BYTE,K.SHORT,K.UNSIGNED_BYTE,K.UNSIGNED_SHORT,K.FLOAT],this.glFuncMap={mat2:{func:K.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:K.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:K.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:K.uniform1f,length:1},"1fv":{func:K.uniform1fv,length:1},"1i":{func:K.uniform1i,length:1},"1iv":{func:K.uniform1iv,length:1},"2f":{func:K.uniform2f,length:2},"2fv":{func:K.uniform2fv,length:1},"2i":{func:K.uniform2i,length:2},"2iv":{func:K.uniform2iv,length:1},"3f":{func:K.uniform3f,length:3},"3fv":{func:K.uniform3fv,length:1},"3i":{func:K.uniform3i,length:3},"3iv":{func:K.uniform3iv,length:1},"4f":{func:K.uniform4f,length:4},"4fv":{func:K.uniform4fv,length:1},"4i":{func:K.uniform4i,length:4},"4iv":{func:K.uniform4iv,length:1}},(!G.maxTextures||-1===G.maxTextures)&&(G.maxTextures=K.getParameter(K.MAX_TEXTURE_IMAGE_UNITS)),G.maxTextureSize||(G.maxTextureSize=K.getParameter(K.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),K.disable(K.DEPTH_TEST),K.disable(K.CULL_FACE),K.enable(K.BLEND),K.clearColor(ot.redGL,ot.greenGL,ot.blueGL,ot.alphaGL),-1!==["NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR"].indexOf(G.mipmapFilter)&&(this.mipmapFilter=K[G.mipmapFilter]),this.maxTextures=E.checkShaderMax(K,G.maxTextures),this.textureIndexes=[],this.createTemporaryTextures(),this.pipelines=new v(this),this.setBlendMode(h.BlendModes.NORMAL),this.projectionMatrix=(new d).identity(),q.textures.once(_.READY,this.boot,this),this},boot:function(){var G=this.game,K=this.pipelines,q=G.scale.baseSize,at=q.width,ot=q.height;this.width=at,this.height=ot,this.isBooted=!0,this.renderTarget=new x(this,at,ot,1,0,!0,!0),this.maskTarget=new x(this,at,ot,1,0,!0,!0),this.maskSource=new x(this,at,ot,1,0,!0,!0);var J=G.config;K.boot(J.pipeline,J.defaultPipeline,J.autoMobilePipeline),this.blankTexture=G.textures.getFrame("__DEFAULT").glTexture,this.normalTexture=G.textures.getFrame("__NORMAL").glTexture,this.whiteTexture=G.textures.getFrame("__WHITE").glTexture;var it=this.gl;it.bindFramebuffer(it.FRAMEBUFFER,null),it.enable(it.SCISSOR_TEST),G.scale.on(y.RESIZE,this.onResize,this),this.resize(at,ot)},setExtensions:function(){var G=this.gl,K=G.getSupportedExtensions();this.supportedExtensions=K;var q="ANGLE_instanced_arrays";this.instancedArraysExtension=K.indexOf(q)>-1?G.getExtension(q):null;var at="OES_vertex_array_object";this.vaoExtension=K.indexOf(at)>-1?G.getExtension(at):null},setContextHandlers:function(G,K){this.previousContextLostHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextLostHandler,!1),this.previousContextRestoredHandler&&this.canvas.removeEventListener("webglcontextlost",this.previousContextRestoredHandler,!1),this.contextLostHandler="function"==typeof G?G.bind(this):this.dispatchContextLost.bind(this),this.contextRestoredHandler="function"==typeof K?K.bind(this):this.dispatchContextRestored.bind(this),this.canvas.addEventListener("webglcontextlost",this.contextLostHandler,!1),this.canvas.addEventListener("webglcontextrestored",this.contextRestoredHandler,!1),this.previousContextLostHandler=this.contextLostHandler,this.previousContextRestoredHandler=this.contextRestoredHandler},dispatchContextLost:function(G){this.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),this.emit(u.LOSE_WEBGL,this),G.preventDefault()},dispatchContextRestored:function(G){var K=this.gl;if(K.isContextLost())console&&console.log("WebGL Context restored, but context is still lost");else{this.currentProgram=null,this.currentFramebuffer=null,this.setBlendMode(h.BlendModes.NORMAL),K.disable(K.BLEND),K.disable(K.DEPTH_TEST),K.enable(K.CULL_FACE),this.compression=this.getCompressedTextures();var q=function(at){at.createResource()};b(this.glTextureWrappers,q),b(this.glBufferWrappers,q),b(this.glFramebufferWrappers,q),b(this.glProgramWrappers,q),b(this.glAttribLocationWrappers,q),b(this.glUniformLocationWrappers,q),this.createTemporaryTextures(),this.pipelines.restoreContext(),this.resize(this.game.scale.baseSize.width,this.game.scale.baseSize.height),this.setExtensions(),this.contextLost=!1,console&&console.warn("WebGL Context restored. Renderer running again."),this.emit(u.RESTORE_WEBGL,this),G.preventDefault()}},createTemporaryTextures:function(){for(var G=this.gl,K=0;K0&&at>0;it&&Y&&(Y=it[0]!==G||it[1]!==K||it[2]!==q||it[3]!==at),Y&&(this.flush(),J.scissor(G,ot-K-at,q,at))},resetScissor:function(){var G=this.gl;G.enable(G.SCISSOR_TEST);var K=this.currentScissor;if(K){var ot=K[2],J=K[3];ot>0&&J>0&&G.scissor(K[0],this.drawingBufferHeight-K[1]-J,ot,J)}},popScissor:function(){var G=this.scissorStack;G.pop();var K=G[G.length-1];K&&this.setScissor(K[0],K[1],K[2],K[3]),this.currentScissor=K},hasActiveStencilMask:function(){var G=this.currentMask.mask,K=this.currentCameraMask.mask;return G&&G.isStencil||K&&K.isStencil},resetViewport:function(){var G=this.gl;G.viewport(0,0,this.width,this.height),this.drawingBufferHeight=G.drawingBufferHeight},setBlendMode:function(G,K){void 0===K&&(K=!1);var q=this.gl,at=this.blendModes[G];return!!(K||G!==h.BlendModes.SKIP_CHECK&&this.currentBlendMode!==G)&&(this.flush(),q.enable(q.BLEND),q.blendEquation(at.equation),at.func.length>2?q.blendFuncSeparate(at.func[0],at.func[1],at.func[2],at.func[3]):q.blendFunc(at.func[0],at.func[1]),this.currentBlendMode=G,!0)},addBlendMode:function(G,K){return this.blendModes.push({func:G,equation:K})-1},updateBlendMode:function(G,K,q){return this.blendModes[G]&&(this.blendModes[G].func=K,q&&(this.blendModes[G].equation=q)),this},removeBlendMode:function(G){return G>17&&this.blendModes[G]&&this.blendModes.splice(G,1),this},pushFramebuffer:function(G,K,q,at,ot){return G===this.currentFramebuffer?this:(this.fboStack.push(G),this.setFramebuffer(G,K,q,at,ot))},setFramebuffer:function(G,K,q,at,ot){if(void 0===K&&(K=!1),void 0===q&&(q=!0),void 0===at&&(at=null),void 0===ot&&(ot=!1),G===this.currentFramebuffer)return this;var J=this.gl,it=this.width,Y=this.height;return G&&G.renderTexture&&q?(it=G.renderTexture.width,Y=G.renderTexture.height):this.flush(),J.bindFramebuffer(J.FRAMEBUFFER,G?G.webGLFramebuffer:null),q&&J.viewport(0,0,it,Y),at&&J.framebufferTexture2D(J.FRAMEBUFFER,J.COLOR_ATTACHMENT0,J.TEXTURE_2D,at.webGLTexture,0),ot&&(J.clearColor(0,0,0,0),J.clear(J.COLOR_BUFFER_BIT)),K&&(G?(this.drawingBufferHeight=Y,this.pushScissor(0,0,it,Y)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=G,this},popFramebuffer:function(G,K){void 0===G&&(G=!1),void 0===K&&(K=!0);var q=this.fboStack;q.pop();var at=q[q.length-1];return at||(at=null),this.setFramebuffer(at,G,K),at},restoreFramebuffer:function(G,K){void 0===G&&(G=!1),void 0===K&&(K=!0);var q=this.fboStack,at=q[q.length-1];at||(at=null),this.currentFramebuffer=null,this.setFramebuffer(at,G,K)},setProgram:function(G){return G!==this.currentProgram&&(this.flush(),this.gl.useProgram(G.webGLProgram),this.currentProgram=G,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram.webGLProgramWrapper),this},createTextureFromSource:function(G,K,q,at,ot){void 0===ot&&(ot=!1);var J=this.gl,it=J.NEAREST,Y=J.NEAREST,j=J.CLAMP_TO_EDGE,ht=m(K=G?G.width:K,q=G?G.height:q);if(ht&&!ot&&(j=J.REPEAT),at===h.ScaleModes.LINEAR&&this.config.antialias){var gt=G&&G.compressed;it=this.mipmapFilter&&(!gt&&ht||gt&&G.mipmaps.length>1)?this.mipmapFilter:J.LINEAR,Y=J.LINEAR}return G||"number"!=typeof K||"number"!=typeof q?this.createTexture2D(0,it,Y,j,j,J.RGBA,G):this.createTexture2D(0,it,Y,j,j,J.RGBA,null,K,q)},createTexture2D:function(G,K,q,at,ot,J,it,Y,j,nt,ht,gt){"number"!=typeof Y&&(Y=it?it.width:1),"number"!=typeof j&&(j=it?it.height:1);var wt=new R(this.gl,G,K,q,at,ot,J,it,Y,j,nt,ht,gt);return this.glTextureWrappers.push(wt),wt},createFramebuffer:function(G,K,q,at){this.currentFramebuffer=null;var ot=new F(this.gl,G,K,q,at);return this.glFramebufferWrappers.push(ot),ot},beginBitmapMask:function(G,K){this.gl&&(this.flush(),this.maskTarget.bind(!0),this.currentCameraMask.mask!==G&&(this.currentMask.mask=G,this.currentMask.camera=K))},drawBitmapMask:function(G,K,q){this.flush(),this.maskSource.bind(),this.setBlendMode(0,!0),G.renderWebGL(this,G,K),this.maskSource.unbind(!0),this.maskTarget.unbind();var at=this.gl,ot=this.getCurrentStencilMask();ot?(at.enable(at.STENCIL_TEST),ot.mask.applyStencil(this,ot.camera,!0)):this.currentMask.mask=null,this.pipelines.set(q),at.activeTexture(at.TEXTURE0),at.bindTexture(at.TEXTURE_2D,this.maskTarget.texture.webGLTexture),at.activeTexture(at.TEXTURE1),at.bindTexture(at.TEXTURE_2D,this.maskSource.texture.webGLTexture)},createProgram:function(G,K){var q=new I(this.gl,G,K);return this.glProgramWrappers.push(q),q},createVertexBuffer:function(G,K){var q=this.gl,at=new D(q,G,q.ARRAY_BUFFER,K);return this.glBufferWrappers.push(at),at},createAttribLocation:function(G,K){var q=new N(this.gl,G,K);return this.glAttribLocationWrappers.push(q),q},createUniformLocation:function(G,K){var q=new V(this.gl,G,K);return this.glUniformLocationWrappers.push(q),q},createIndexBuffer:function(G,K){var q=this.gl,at=new D(q,G,q.ELEMENT_ARRAY_BUFFER,K);return this.glBufferWrappers.push(at),at},deleteTexture:function(G){if(G)return T(this.glTextureWrappers,G),G.destroy(),this},deleteFramebuffer:function(G){return G?(T(this.fboStack,G),T(this.glFramebufferWrappers,G),G.destroy(),this):this},deleteProgram:function(G){return G&&(T(this.glProgramWrappers,G),G.destroy()),this},deleteAttribLocation:function(G){return G&&(T(this.glAttribLocationWrappers,G),G.destroy()),this},deleteUniformLocation:function(G){return G&&(T(this.glUniformLocationWrappers,G),G.destroy()),this},deleteBuffer:function(G){return G?(T(this.glBufferWrappers,G),G.destroy(),this):this},preRenderCamera:function(G){var K=G.x,q=G.y,at=G.width,ot=G.height,J=G.backgroundColor;G.emit(g.PRE_RENDER,G),this.pipelines.preBatchCamera(G),this.pushScissor(K,q,at,ot),G.mask&&(this.currentCameraMask.mask=G.mask,this.currentCameraMask.camera=G._maskCamera,G.mask.preRenderWebGL(this,G,G._maskCamera)),J.alphaGL>0&&this.pipelines.setMulti().drawFillRect(K,q,at,ot,E.getTintFromFloats(J.blueGL,J.greenGL,J.redGL,1),J.alphaGL)},getCurrentStencilMask:function(){var G=null,K=this.maskStack,q=this.currentCameraMask;return K.length>0?G=K[K.length-1]:q.mask&&q.mask.isStencil&&(G=q),G},postRenderCamera:function(G){var K=G.flashEffect,q=G.fadeEffect;if(K.isRunning||q.isRunning||q.isComplete){var at=this.pipelines.setMulti();K.postRenderWebGL(at,E.getTintFromFloats),q.postRenderWebGL(at,E.getTintFromFloats)}G.dirty=!1,this.popScissor(),G.mask&&(this.currentCameraMask.mask=null,G.mask.postRenderWebGL(this,G._maskCamera)),this.pipelines.postBatchCamera(G),G.emit(g.POST_RENDER,G)},preRender:function(){if(!this.contextLost){var G=this.gl;if(G.bindFramebuffer(G.FRAMEBUFFER,null),this.emit(u.PRE_RENDER_CLEAR),this.config.clearBeforeRender){var K=this.config.backgroundColor;G.clearColor(K.redGL,K.greenGL,K.blueGL,K.alphaGL),G.clear(G.COLOR_BUFFER_BIT|G.DEPTH_BUFFER_BIT|G.STENCIL_BUFFER_BIT)}G.enable(G.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&G.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(u.PRE_RENDER)}},render:function(G,K,q){if(!this.contextLost){var at=K.length;if(this.emit(u.RENDER,G,q),this.preRenderCamera(q),0===at)return this.setBlendMode(h.BlendModes.NORMAL),void this.postRenderCamera(q);this.currentType="";for(var ot=this.currentMask,J=0;J{var b=a(83419),T=a(95428),g=a(95540),f=a(14500),h=new b({initialize:function(u,m,d,p,v){this.pipeline=u,this.name=m,this.renderer=u.renderer,this.gl=this.renderer.gl,this.fragSrc=p,this.vertSrc=d,this.program=this.renderer.createProgram(d,p),this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(v),this.createUniforms()},createAttributes:function(c){var u=0,m=0,d=[];this.vertexComponentCount=0;for(var p=0;p=0?(u.enableVertexAttribArray(F.webGLAttribLocation),u.vertexAttribPointer(F.webGLAttribLocation,_,E,R,d,A),y.enabled=!0,y.location=F):-1!==F.webGLAttribLocation&&u.disableVertexAttribArray(F.webGLAttribLocation)}else D?u.vertexAttribPointer(I.webGLAttribLocation,_,E,R,d,A):!D&&-1!==I&&I.webGLAttribLocation>-1&&(u.disableVertexAttribArray(I.webGLAttribLocation),y.location=-1)}return this},createUniforms:function(){var d,p,v,c=this.gl,u=this.program,m=this.uniforms,x=c.getProgramParameter(u.webGLProgram,c.ACTIVE_UNIFORMS);for(d=0;d0&&(p=p.substr(0,_),m.hasOwnProperty(p)||null!==(v=this.renderer.createUniformLocation(u,p))&&(m[p]={name:p,location:v,setter:null,value1:null,value2:null,value3:null,value4:null}))}}return this},syncUniforms:function(){var c=this.gl;for(var u in this.renderer.setProgram(this.program),this.uniforms){var m=this.uniforms[u];m.setter&&m.setter.call(c,m.location.webGLUniformLocation,m.value1,m.value2,m.value3,m.value4)}},hasUniform:function(c){return this.uniforms.hasOwnProperty(c)},resetUniform:function(c){var u=this.uniforms[c];return u&&(u.value1=null,u.value2=null,u.value3=null,u.value4=null),this},setUniform1:function(c,u,m,d){var p=this.uniforms[u];return p?((d||p.value1!==m)&&(p.setter||(p.setter=c),p.value1=m,this.renderer.setProgram(this.program),c.call(this.gl,p.location.webGLUniformLocation,m),this.pipeline.currentShader=this),this):this},setUniform2:function(c,u,m,d,p){var v=this.uniforms[u];return v?((p||v.value1!==m||v.value2!==d)&&(v.setter||(v.setter=c),v.value1=m,v.value2=d,this.renderer.setProgram(this.program),c.call(this.gl,v.location.webGLUniformLocation,m,d),this.pipeline.currentShader=this),this):this},setUniform3:function(c,u,m,d,p,v){var x=this.uniforms[u];return x?((v||x.value1!==m||x.value2!==d||x.value3!==p)&&(x.setter||(x.setter=c),x.value1=m,x.value2=d,x.value3=p,this.renderer.setProgram(this.program),c.call(this.gl,x.location.webGLUniformLocation,m,d,p),this.pipeline.currentShader=this),this):this},setUniform4:function(c,u,m,d,p,v,x){var y=this.uniforms[u];return y?((x||y.value1!==m||y.value2!==d||y.value3!==p||y.value4!==v)&&(y.setter||(y.setter=c),y.value1=m,y.value2=d,y.value3=p,y.value4=v,this.renderer.setProgram(this.program),c.call(this.gl,y.location.webGLUniformLocation,m,d,p,v),this.pipeline.currentShader=this),this):this},setBoolean:function(c,u){return this.setUniform1(this.gl.uniform1i,c,Number(u))},set1f:function(c,u){return this.setUniform1(this.gl.uniform1f,c,u)},set2f:function(c,u,m){return this.setUniform2(this.gl.uniform2f,c,u,m)},set3f:function(c,u,m,d){return this.setUniform3(this.gl.uniform3f,c,u,m,d)},set4f:function(c,u,m,d,p){return this.setUniform4(this.gl.uniform4f,c,u,m,d,p)},set1fv:function(c,u){return this.setUniform1(this.gl.uniform1fv,c,u,!0)},set2fv:function(c,u){return this.setUniform1(this.gl.uniform2fv,c,u,!0)},set3fv:function(c,u){return this.setUniform1(this.gl.uniform3fv,c,u,!0)},set4fv:function(c,u){return this.setUniform1(this.gl.uniform4fv,c,u,!0)},set1iv:function(c,u){return this.setUniform1(this.gl.uniform1iv,c,u,!0)},set2iv:function(c,u){return this.setUniform1(this.gl.uniform2iv,c,u,!0)},set3iv:function(c,u){return this.setUniform1(this.gl.uniform3iv,c,u,!0)},set4iv:function(c,u){return this.setUniform1(this.gl.uniform4iv,c,u,!0)},set1i:function(c,u){return this.setUniform1(this.gl.uniform1i,c,u)},set2i:function(c,u,m){return this.setUniform2(this.gl.uniform2i,c,u,m)},set3i:function(c,u,m,d){return this.setUniform3(this.gl.uniform3i,c,u,m,d)},set4i:function(c,u,m,d,p){return this.setUniform4(this.gl.uniform4i,c,u,m,d,p)},setMatrix2fv:function(c,u,m){return this.setUniform2(this.gl.uniformMatrix2fv,c,u,m,!0)},setMatrix3fv:function(c,u,m){return this.setUniform2(this.gl.uniformMatrix3fv,c,u,m,!0)},setMatrix4fv:function(c,u,m){return this.setUniform2(this.gl.uniformMatrix4fv,c,u,m,!0)},createProgram:function(c,u){return void 0===c&&(c=this.vertSrc),void 0===u&&(u=this.fragSrc),this.program&&this.renderer.deleteProgram(this.program),this.vertSrc=c,this.fragSrc=u,this.program=this.renderer.createProgram(c,u),this.createUniforms(),this.rebind()},destroy:function(){var c=this.renderer;T(this.uniforms,function(u){c.deleteUniformLocation(u.location)}),this.uniforms=null,T(this.attributes,function(u){c.deleteAttribLocation(u.location)}),this.attributes=null,c.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null}});S.exports=h},14500:S=>{S.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},4159:(S,k,a)=>{var b=a(14500),T=a(79291),g={PipelineManager:a(7530),Pipelines:a(96615),RenderTarget:a(32302),Utils:a(70554),WebGLPipeline:a(29100),WebGLRenderer:a(74797),WebGLShader:a(38683),Wrappers:a(9503)};g=T(!1,g,b),S.exports=g},31302:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(78908),f=a(85191),h=a(14500),c=a(29100),u=new b({Extends:c,initialize:function(d){d.fragShader=T(d,"fragShader",g),d.vertShader=T(d,"vertShader",f),d.batchSize=T(d,"batchSize",1),d.vertices=T(d,"vertices",[-1,1,-1,-7,7,1]),d.attributes=T(d,"attributes",[{name:"inPosition",size:2,type:h.FLOAT}]),c.call(this,d)},boot:function(){c.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(m,d){c.prototype.resize.call(this,m,d),this.set2f("uResolution",m,d)},beginMask:function(m,d,p){this.renderer.beginBitmapMask(m,p)},endMask:function(m,d,p){var v=this.gl,y=m.bitmapMask;y&&v&&(this.renderer.drawBitmapMask(y,d,this),p&&this.set2f("uResolution",p.width,p.height),this.set1i("uInvertMaskAlpha",m.invertAlpha),v.drawArrays(this.topology,0,3),p&&this.set2f("uResolution",this.width,this.height),v.bindTexture(v.TEXTURE_2D,null))}});S.exports=u},92651:(S,k,a)=>{var b=a(83419),T=a(58918),g=a(14811),f=a(95540),h=a(43558),c=a(89350),u=a(70554),m=new b({Extends:h,initialize:function(p){p.shaders=[u.setGlowQuality(c.FXGlowFrag,p.game),c.FXShadowFrag,c.FXPixelateFrag,c.FXVignetteFrag,c.FXShineFrag,c.FXBlurLowFrag,c.FXBlurMedFrag,c.FXBlurHighFrag,c.FXGradientFrag,c.FXBloomFrag,c.ColorMatrixFrag,c.FXCircleFrag,c.FXBarrelFrag,c.FXDisplacementFrag,c.FXWipeFrag,c.FXBokehFrag],h.call(this,p);var v=this.game;this.glow=new T.Glow(v),this.shadow=new T.Shadow(v),this.pixelate=new T.Pixelate(v),this.vignette=new T.Vignette(v),this.shine=new T.Shine(v),this.gradient=new T.Gradient(v),this.circle=new T.Circle(v),this.barrel=new T.Barrel(v),this.wipe=new T.Wipe(v),this.bokeh=new T.Bokeh(v);var x=[];x[g.GLOW]=this.onGlow,x[g.SHADOW]=this.onShadow,x[g.PIXELATE]=this.onPixelate,x[g.VIGNETTE]=this.onVignette,x[g.SHINE]=this.onShine,x[g.BLUR]=this.onBlur,x[g.GRADIENT]=this.onGradient,x[g.BLOOM]=this.onBloom,x[g.COLOR_MATRIX]=this.onColorMatrix,x[g.CIRCLE]=this.onCircle,x[g.BARREL]=this.onBarrel,x[g.DISPLACEMENT]=this.onDisplacement,x[g.WIPE]=this.onWipe,x[g.BOKEH]=this.onBokeh,this.fxHandlers=x},onDraw:function(d,p,v){this.source=d,this.target=p,this.swap=v;var x=d.width,y=d.height,_=this.tempSprite,E=this.fxHandlers;if(_&&_.preFX)for(var A=_.preFX.list,D=0;D{var b=a(83419),T=a(95540),g=a(31063),f=a(57516),h=a(61340),c=a(26099),u=a(29100),m=new b({Extends:f,initialize:function(p){var v=T(p,"fragShader",g);p.fragShader=v.replace("%LIGHT_COUNT%",p.game.renderer.config.maxLights),f.call(this,p),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.lightsActive=!0,this.tempVec2=new c,this._tempMatrix=new h,this._tempMatrix2=new h},boot:function(){u.prototype.boot.call(this)},onRender:function(d,p){var v=d.sys.lights;if(this.lightsActive=!1,v&&v.active){var x=v.getLights(p),y=x.length;this.lightsActive=!0;var _,A=this.renderer.height,D=p.matrix,I=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",p.x,p.y,p.rotation,p.zoom),this.set3f("uAmbientLightColor",v.ambientColor.r,v.ambientColor.g,v.ambientColor.b),this.set1i("uLightCount",y),_=0;_0&&this.flush();var p=this.inverseRotationMatrix;if(d){var v=-d,x=Math.cos(v),y=Math.sin(v);p[1]=y,p[3]=-y,p[0]=p[4]=x}else p[0]=p[4]=1,p[1]=p[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,p),this.currentNormalMapRotation=d}},setTexture2D:function(d,p){void 0===d&&(d=this.renderer.whiteTexture);var x=this.getNormalMap(p);this.isNewNormalMap(d,x)&&(this.flush(),this.createBatch(d),this.addTextureToBatch(x),this.currentNormalMap=x);var y=0;return p&&p.parentContainer?y=p.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:p&&(y=p.rotation),null===this.currentBatch&&(this.createBatch(d),this.addTextureToBatch(x)),this.setNormalMapRotation(y),0},setGameObject:function(d,p){void 0===p&&(p=d.frame);var v=p.glTexture,x=this.getNormalMap(d);if(this.isNewNormalMap(v,x)&&(this.flush(),this.createBatch(v),this.addTextureToBatch(x),this.currentNormalMap=x),d.parentContainer){var y=d.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(y.rotationNormalized)}else this.setNormalMapRotation(d.rotation);return null===this.currentBatch&&(this.createBatch(v),this.addTextureToBatch(x)),0},isNewNormalMap:function(d,p){return this.currentTexture!==d||this.currentNormalMap!==p},getNormalMap:function(d){var p;return d?(d.displayTexture?p=d.displayTexture.dataSource[d.displayFrame.sourceIndex]:d.texture?p=d.texture.dataSource[d.frame.sourceIndex]:d.tileset&&(p=Array.isArray(d.tileset)?d.tileset[0].image.dataSource[0]:d.tileset.image.dataSource[0]),p?p.glTexture:this.renderer.normalTexture):this.renderer.normalTexture},batchSprite:function(d,p,v){this.lightsActive&&f.prototype.batchSprite.call(this,d,p,v)},batchTexture:function(d,p,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it,Y,j,nt,ht,gt,wt,St,Bt){this.lightsActive&&f.prototype.batchTexture.call(this,d,p,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it,Y,j,nt,ht,gt,wt,St,Bt)},batchTextureFrame:function(d,p,v,x,y,_,E){this.lightsActive&&f.prototype.batchTextureFrame.call(this,d,p,v,x,y,_,E)}});S.exports=m},56527:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(57516),f=a(45561),h=a(60722),c=a(14500),u=a(29100),m=new b({Extends:g,initialize:function(p){p.fragShader=T(p,"fragShader",f),p.vertShader=T(p,"vertShader",h),p.attributes=T(p,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:c.UNSIGNED_BYTE,normalized:!0}]),p.forceZero=!0,p.resizeUniform="uResolution",g.call(this,p)},boot:function(){u.prototype.boot.call(this);var d=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",d.width,d.height)}});S.exports=m},57516:(S,k,a)=>{var b=a(83419),T=a(94811),g=a(95540),f=a(98840),h=a(44667),c=a(61340),u=a(70554),m=a(14500),d=a(29100),p=new b({Extends:d,initialize:function(x){var y=x.game.renderer,_=g(x,"fragShader",f);x.fragShader=u.parseFragmentShaderMaxTextures(_,y.maxTextures),x.vertShader=g(x,"vertShader",h),x.attributes=g(x,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:m.UNSIGNED_BYTE,normalized:!0}]),x.resizeUniform="uResolution",d.call(this,x),this._tempMatrix1=new c,this._tempMatrix2=new c,this._tempMatrix3=new c,this.calcMatrix=new c,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){d.prototype.boot.call(this);var v=this.renderer;this.set1iv("uMainSampler",v.textureIndexes),this.set2f("uResolution",v.width,v.height)},batchSprite:function(v,x,y){this.manager.set(this,v);var _=this._tempMatrix1,E=this._tempMatrix2,A=this._tempMatrix3,D=v.frame,I=D.glTexture,R=D.u0,F=D.v0,N=D.u1,V=D.v1,B=D.x,H=D.y,Q=D.cutWidth,G=D.cutHeight,K=D.customPivot,q=v.displayOriginX,at=v.displayOriginY,ot=-q+B,J=-at+H;if(v.isCropped){var it=v._crop;(it.flipX!==v.flipX||it.flipY!==v.flipY)&&D.updateCropUVs(it,v.flipX,v.flipY),R=it.u0,F=it.v0,N=it.u1,V=it.v1,Q=it.width,G=it.height,ot=-q+(B=it.x),J=-at+(H=it.y)}var Y=1,j=1;v.flipX&&(K||(ot+=2*q-D.realWidth),Y=-1),v.flipY&&(K||(J+=2*at-D.realHeight),j=-1);var nt=v.x,ht=v.y;x.roundPixels&&(nt=Math.floor(nt),ht=Math.floor(ht)),E.applyITRS(nt,ht,v.rotation,v.scaleX*Y,v.scaleY*j),_.copyFrom(x.matrix),y?(_.multiplyWithOffset(y,-x.scrollX*v.scrollFactorX,-x.scrollY*v.scrollFactorY),E.e=nt,E.f=ht):(E.e-=x.scrollX*v.scrollFactorX,E.f-=x.scrollY*v.scrollFactorY),_.multiply(E,A);var gt=A.setQuad(ot,J,ot+Q,J+G,x.renderRoundPixels),wt=u.getTintAppendFloatAlpha,St=x.alpha,Bt=wt(v.tintTopLeft,St*v._alphaTL),Yt=wt(v.tintTopRight,St*v._alphaTR),$t=wt(v.tintBottomLeft,St*v._alphaBL),qt=wt(v.tintBottomRight,St*v._alphaBR);this.shouldFlush(6)&&this.flush();var ne=this.setGameObject(v,D);this.manager.preBatch(v),this.batchQuad(v,gt[0],gt[1],gt[2],gt[3],gt[4],gt[5],gt[6],gt[7],R,F,N,V,Bt,Yt,$t,qt,v.tintFill,I,ne),this.manager.postBatch(v)},batchTexture:function(v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it,Y,j,nt,ht,gt,wt,St,Bt,Yt,$t,qt){void 0===qt&&(qt=!1),this.manager.set(this,v);var ne=this._tempMatrix1,le=this._tempMatrix2,Me=this._tempMatrix3,pi=q/y+gt,Ie=at/_+wt,_i=(q+ot)/y+gt,be=(at+J)/_+wt,ri=D,Ke=I,zi=-G,Cn=-K;if(v.isCropped){var sr=v._crop,vn=sr.width,bn=sr.height;ri=vn,Ke=bn,D=vn,I=bn;var Fr=q=sr.x,cs=at=sr.y;V&&(Fr=ot-sr.x-vn),B&&(cs=J-sr.y-bn),pi=Fr/y+gt,Ie=cs/_+wt,_i=(Fr+vn)/y+gt,be=(cs+bn)/_+wt,zi=-G+q,Cn=-K+at}V&&(ri*=-1,zi+=D),(B^=!Yt&&x.isRenderTexture?1:0)&&(Ke*=-1,Cn+=I),St.roundPixels&&(E=Math.floor(E),A=Math.floor(A)),le.applyITRS(E,A,N,R,F),ne.copyFrom(St.matrix),Bt?(ne.multiplyWithOffset(Bt,-St.scrollX*H,-St.scrollY*Q),le.e=E,le.f=A):(le.e-=St.scrollX*H,le.f-=St.scrollY*Q),ne.multiply(le,Me);var Dn=Me.setQuad(zi,Cn,zi+ri,Cn+Ke,St.renderRoundPixels);null==$t&&($t=this.setTexture2D(x)),v&&!qt&&this.manager.preBatch(v),this.batchQuad(v,Dn[0],Dn[1],Dn[2],Dn[3],Dn[4],Dn[5],Dn[6],Dn[7],pi,Ie,_i,be,it,Y,j,nt,ht,x,$t),v&&!qt&&this.manager.postBatch(v)},batchTextureFrame:function(v,x,y,_,E,A,D){this.manager.set(this);var I=this._tempMatrix1.copyFrom(A),R=this._tempMatrix2;D?I.multiply(D,R):R=I;var F=R.setQuad(x,y,x+v.width,y+v.height),N=this.setTexture2D(v.source.glTexture);_=u.getTintAppendFloatAlpha(_,E),this.batchQuad(null,F[0],F[1],F[2],F[3],F[4],F[5],F[6],F[7],v.u0,v.v0,v.u1,v.v1,_,_,_,_,0,v.glTexture,N)},batchFillRect:function(v,x,y,_,E,A){this.renderer.pipelines.set(this);var D=this.calcMatrix;A&&A.multiply(E,D);var I=D.setQuad(v,x,v+y,x+_),R=this.fillTint;this.batchQuad(null,I[0],I[1],I[2],I[3],I[4],I[5],I[6],I[7],0,0,1,1,R.TL,R.TR,R.BL,R.BR,2)},batchFillTriangle:function(v,x,y,_,E,A,D,I){this.renderer.pipelines.set(this);var R=this.calcMatrix;I&&I.multiply(D,R);var F=R.getX(v,x),N=R.getY(v,x),V=R.getX(y,_),B=R.getY(y,_),H=R.getX(E,A),Q=R.getY(E,A),G=this.fillTint;this.batchTri(null,F,N,V,B,H,Q,0,0,1,1,G.TL,G.TR,G.BL,2)},batchStrokeTriangle:function(v,x,y,_,E,A,D,I,R){var F=this.tempTriangle;F[0].x=v,F[0].y=x,F[0].width=D,F[1].x=y,F[1].y=_,F[1].width=D,F[2].x=E,F[2].y=A,F[2].width=D,F[3].x=v,F[3].y=x,F[3].width=D,this.batchStrokePath(F,D,!1,I,R)},batchFillPath:function(v,x,y){this.renderer.pipelines.set(this);var _=this.calcMatrix;y&&y.multiply(x,_);for(var D,I,E=v.length,A=this.polygonCache,R=this.fillTint.TL,F=this.fillTint.TR,N=this.fillTint.BL,V=0;V0&&ri[4]?this.batchQuad(null,ne,le,Bt,Yt,ri[0],ri[1],ri[2],ri[3],0,0,1,1,pi,Ie,_i,be,2):(Ke[0]=ne,Ke[1]=le,Ke[2]=Bt,Ke[3]=Yt,Ke[4]=1),R&&Ke[4]?this.batchQuad(null,wt,St,$t,qt,Ke[0],Ke[1],Ke[2],Ke[3],0,0,1,1,pi,Ie,_i,be,2):(ri[0]=wt,ri[1]=St,ri[2]=$t,ri[3]=qt,ri[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,d.prototype.destroy.call(this),this}});S.exports=p},43439:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(4127),f=a(89924),h=a(29100),c=new b({Extends:h,initialize:function(m){m.vertShader=T(m,"vertShader",f),m.fragShader=T(m,"fragShader",g),m.attributes=T(m,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),h.call(this,m)},onRender:function(u,m){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",m.zoom)},batchPointLight:function(u,m,d,p,v,x,y,_,E,A,D,I){var R=u.color,F=u.intensity,N=u.radius,V=u.attenuation,B=R.r*F,H=R.g*F,Q=R.b*F,G=m.alpha*u.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(d,p,D,I,N,V,B,H,Q,G),this.batchLightVert(v,x,D,I,N,V,B,H,Q,G),this.batchLightVert(y,_,D,I,N,V,B,H,Q,G),this.batchLightVert(d,p,D,I,N,V,B,H,Q,G),this.batchLightVert(y,_,D,I,N,V,B,H,Q,G),this.batchLightVert(E,A,D,I,N,V,B,H,Q,G),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(u,m,d,p,v,x,y,_,E,A){var D=this.vertexViewF32,I=this.vertexCount*this.currentShader.vertexComponentCount-1;D[++I]=u,D[++I]=m,D[++I]=d,D[++I]=p,D[++I]=v,D[++I]=x,D[++I]=y,D[++I]=_,D[++I]=E,D[++I]=A,this.vertexCount++}});S.exports=c},84057:(S,k,a)=>{var b=a(83419),T=a(89422),g=a(95540),f=a(27681),h=a(49627),c=a(29100),u=new b({Extends:c,initialize:function(d){d.renderTarget=g(d,"renderTarget",1),d.fragShader=g(d,"fragShader",f),d.vertShader=g(d,"vertShader",h),d.attributes=g(d,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),d.batchSize=1,d.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],c.call(this,d),this.isPostFX=!0,this.colorMatrix=new T,this.renderer.isBooted&&(this.manager=this.renderer.pipelines)},bootFX:function(){c.prototype.boot.call(this);var m=this.manager.UTILITY_PIPELINE;this.fullFrame1=m.fullFrame1,this.fullFrame2=m.fullFrame2,this.halfFrame1=m.halfFrame1,this.halfFrame2=m.halfFrame2;var d=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",d.width,d.height);for(var p=this.renderTargets,v=0;v{var b=a(10312),T=a(67502),g=a(83419),f=a(96293),h=a(95540),c=a(57516),u=a(27681),m=a(87841),d=a(32302),p=a(45561),v=a(60722),x=a(29100),y=new g({Extends:c,initialize:function(E){var A=h(E,"fragShader",u),D=h(E,"vertShader",v),I=h(E,"drawShader",u),R=[{name:"DrawSprite",fragShader:p,vertShader:v},{name:"CopySprite",fragShader:A,vertShader:D},{name:"DrawGame",fragShader:I,vertShader:v},{name:"ColorMatrix",fragShader:f}],F=h(E,"shaders",[]);E.shaders=R.concat(F),E.vertShader||(E.vertShader=D),E.batchSize=1,c.call(this,E),this.isPreFX=!0,this.customMainSampler=null,this.spriteBounds=new m,this.targetBounds=new m,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){x.prototype.boot.call(this);var _=this.shaders,E=this.renderer;this.drawSpriteShader=_[0],this.copyShader=_[1],this.gameShader=_[2],this.colorMatrixShader=_[3],this.fsTarget=new d(E,E.width,E.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var A=new ArrayBuffer(168);this.quadVertexData=A,this.quadVertexViewF32=new Float32Array(A),this.quadVertexBuffer=E.createVertexBuffer(A,this.gl.STATIC_DRAW),this.onResize(E.width,E.height),this.currentShader=this.copyShader,this.set2f("uResolution",E.width,E.height)},onResize:function(_,E){var A=this.quadVertexViewF32;A[1]=E,A[22]=E,A[14]=_,A[28]=_,A[35]=_,A[36]=E},batchQuad:function(_,E,A,D,I,R,F,N,V,B,H,Q,G,K,q,at,ot,J,it){var Y=Math.min(E,D,R,N),j=Math.min(A,I,F,V),gt=Math.max(E,D,R,N)-Y,wt=Math.max(A,I,F,V)-j,St=this.spriteBounds.setTo(Y,j,gt,wt),Bt=_?_.preFX.padding:0,qt=Math.abs(Math.max(gt+2*Bt,wt+2*Bt)),ne=this.manager.getRenderTarget(qt),le=this.targetBounds.setTo(0,0,ne.width,ne.height);T(le,Math.round(St.centerX),Math.round(St.centerY)),this.tempSprite=_;var Me=this.gl,pi=this.renderer;pi.clearStencilMask(),this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.set2f("uResolution",pi.width,pi.height),this.flipProjectionMatrix(!0),_&&(this.onDrawSprite(_,ne),_.preFX.onFX(this));var Ie=this.fsTarget;return this.flush(),Me.viewport(0,0,pi.width,pi.height),Me.bindFramebuffer(Me.FRAMEBUFFER,Ie.framebuffer.webGLFramebuffer),Me.framebufferTexture2D(Me.FRAMEBUFFER,Me.COLOR_ATTACHMENT0,Me.TEXTURE_2D,Ie.texture.webGLTexture,0),Me.clearColor(0,0,0,0),Me.clear(Me.COLOR_BUFFER_BIT),this.setTexture2D(it),this.batchVert(E,A,B,H,0,J,K),this.batchVert(D,I,B,G,0,J,at),this.batchVert(R,F,Q,G,0,J,ot),this.batchVert(E,A,B,H,0,J,K),this.batchVert(R,F,Q,G,0,J,ot),this.batchVert(N,V,Q,H,0,J,q),this.flush(),this.flipProjectionMatrix(!1),Me.activeTexture(Me.TEXTURE0),Me.bindTexture(Me.TEXTURE_2D,ne.texture.webGLTexture),Me.copyTexSubImage2D(Me.TEXTURE_2D,0,0,0,le.x,le.y,le.width,le.height),Me.bindFramebuffer(Me.FRAMEBUFFER,null),Me.bindTexture(Me.TEXTURE_2D,null),this.onBatch(_),this.currentShader=this.copyShader,this.onDraw(ne,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(_,E,A,D,I,R,F){void 0===A&&(A=!0),void 0===D&&(D=!0),void 0===I&&(I=!1),void 0===F&&(F=this.copyShader);var N=this.gl,V=this.tempSprite;R&&(F=this.colorMatrixShader),this.currentShader=F;var B=this.setVertexBuffer(this.quadVertexBuffer);F.bind(B,!1);var H=this.renderer;if(this.set1i("uMainSampler",0),this.set2f("uResolution",H.width,H.height),V.preFX.onFXCopy(this),this.onCopySprite(_,E,V),R&&(this.set1fv("uColorMatrix",R.getData()),this.set1f("uAlpha",R.alpha)),N.activeTexture(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,_.texture.webGLTexture),_.height>E.height?(N.viewport(0,0,_.width,_.height),this.setTargetUVs(_,E)):(N.viewport(0,E.height-_.height,_.width,_.height),this.resetUVs()),N.bindFramebuffer(N.FRAMEBUFFER,E.framebuffer.webGLFramebuffer),N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,E.texture.webGLTexture,0),A&&(N.clearColor(0,0,0,+!D),N.clear(N.COLOR_BUFFER_BIT)),I){var G=this.renderer.currentBlendMode;this.renderer.setBlendMode(b.ERASE)}N.bufferData(N.ARRAY_BUFFER,this.quadVertexData,N.STATIC_DRAW),N.drawArrays(N.TRIANGLES,0,6),I&&this.renderer.setBlendMode(G),N.bindFramebuffer(N.FRAMEBUFFER,null)},copy:function(_,E){var A=this.gl;this.set1i("uMainSampler",0),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,_.texture.webGLTexture),A.viewport(0,0,_.width,_.height),this.setUVs(0,0,0,1,1,1,1,0),A.bindFramebuffer(A.FRAMEBUFFER,E.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,E.texture.webGLTexture,0),A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.quadVertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null)},blendFrames:function(_,E,A,D,I){this.manager.blendFrames(_,E,A,D,I)},blendFramesAdditive:function(_,E,A,D,I){this.manager.blendFramesAdditive(_,E,A,D,I)},drawToGame:function(_){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(_)},copyToGame:function(_){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(_)},bindAndDraw:function(_){var E=this.gl,A=this.renderer;this.set1i("uMainSampler",0),this.setTexture2D(this.customMainSampler?this.customMainSampler:_.texture);var D=this._tempMatrix1.loadIdentity(),I=this.targetBounds.x,R=this.targetBounds.y,F=I+_.width,N=R+_.height,V=D.getX(I,R),B=D.getX(I,N),H=D.getX(F,N),Q=D.getX(F,R),G=D.getY(I,R),K=D.getY(I,N),q=D.getY(F,N),at=D.getY(F,R),ot=16777215;this.batchVert(V,G,0,0,0,0,ot),this.batchVert(B,K,0,1,0,0,ot),this.batchVert(H,q,1,1,0,0,ot),this.batchVert(V,G,0,0,0,0,ot),this.batchVert(H,q,1,1,0,0,ot),this.batchVert(Q,at,1,0,0,0,ot),A.restoreFramebuffer(!1,!0),A.currentFramebuffer||E.viewport(0,0,A.width,A.height),A.restoreStencilMask(),this.flush(),this.tempSprite=null},onDraw:function(_){this.drawToGame(_)},setUVs:function(_,E,A,D,I,R,F,N){var V=this.quadVertexViewF32;V[2]=_,V[3]=E,V[9]=A,V[10]=D,V[16]=I,V[17]=R,V[23]=_,V[24]=E,V[30]=I,V[31]=R,V[37]=F,V[38]=N},setTargetUVs:function(_,E){var A=E.height/_.height;this.setUVs(0,A=A>.5?.5-(A-.5):.5-A+.5,0,1+A,1,1+A,1,A)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.renderer.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.colorMatrixShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,c.prototype.destroy.call(this),this}});S.exports=y},81041:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(57516),f=new b({Extends:g,initialize:function(c){c.topology=5,c.batchSize=T(c,"batchSize",256),g.call(this,c)}});S.exports=f},12385:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(57516),f=a(45561),h=a(60722),c=a(29100),u=new b({Extends:g,initialize:function(d){d.fragShader=T(d,"fragShader",f),d.vertShader=T(d,"vertShader",h),d.forceZero=!0,g.call(this,d)},boot:function(){c.prototype.boot.call(this);var m=this.renderer;this.set1i("uMainSampler",0),this.set2f("uResolution",m.width,m.height)}});S.exports=u},7589:(S,k,a)=>{var b=a(35407),T=a(10312),g=a(83419),f=a(89422),h=a(96293),c=a(36682),u=a(95540),m=a(48247),d=a(49627),p=a(29100),v=new g({Extends:p,initialize:function(y){y.renderTarget=u(y,"renderTarget",[{scale:1,autoResize:!0},{scale:1,autoResize:!0},{scale:.5,autoResize:!0},{scale:.5,autoResize:!0}]),y.vertShader=u(y,"vertShader",d),y.shaders=u(y,"shaders",[{name:"Copy",fragShader:c},{name:"AddBlend",fragShader:b},{name:"LinearBlend",fragShader:m},{name:"ColorMatrix",fragShader:h}]),y.attributes=u(y,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),y.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],y.batchSize=1,p.call(this,y),this.colorMatrix=new f},boot:function(){p.prototype.boot.call(this);var x=this.shaders,y=this.renderTargets;this.copyShader=x[0],this.addShader=x[1],this.linearShader=x[2],this.colorMatrixShader=x[3],this.fullFrame1=y[0],this.fullFrame2=y[1],this.halfFrame1=y[2],this.halfFrame2=y[3]},copyFrame:function(x,y,_,E,A){void 0===_&&(_=1),void 0===E&&(E=!0),void 0===A&&(A=!0);var D=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",_),D.activeTexture(D.TEXTURE0),D.bindTexture(D.TEXTURE_2D,x.texture.webGLTexture),y?(D.viewport(0,0,y.width,y.height),D.bindFramebuffer(D.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_2D,y.texture.webGLTexture,0)):D.viewport(0,0,x.width,x.height),E&&(D.clearColor(0,0,0,A?0:1),D.clear(D.COLOR_BUFFER_BIT)),D.bufferData(D.ARRAY_BUFFER,this.vertexData,D.STATIC_DRAW),D.drawArrays(D.TRIANGLES,0,6),D.bindFramebuffer(D.FRAMEBUFFER,null),D.bindTexture(D.TEXTURE_2D,null)},blitFrame:function(x,y,_,E,A,D,I){void 0===_&&(_=1),void 0===E&&(E=!0),void 0===A&&(A=!0),void 0===D&&(D=!1),void 0===I&&(I=!1);var R=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",_),R.activeTexture(R.TEXTURE0),R.bindTexture(R.TEXTURE_2D,x.texture.webGLTexture),x.height>y.height?(R.viewport(0,0,x.width,x.height),this.setTargetUVs(x,y)):R.viewport(0,y.height-x.height,x.width,x.height),R.bindFramebuffer(R.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),R.framebufferTexture2D(R.FRAMEBUFFER,R.COLOR_ATTACHMENT0,R.TEXTURE_2D,y.texture.webGLTexture,0),E&&(R.clearColor(0,0,0,A?0:1),R.clear(R.COLOR_BUFFER_BIT)),D){var N=this.renderer.currentBlendMode;this.renderer.setBlendMode(T.ERASE)}I&&this.flipY(),R.bufferData(R.ARRAY_BUFFER,this.vertexData,R.STATIC_DRAW),R.drawArrays(R.TRIANGLES,0,6),D&&this.renderer.setBlendMode(N),R.bindFramebuffer(R.FRAMEBUFFER,null),R.bindTexture(R.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(x,y,_,E,A,D,I,R){void 0===I&&(I=!0),void 0===R&&(R=!0);var F=this.gl;F.bindFramebuffer(F.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),F.framebufferTexture2D(F.FRAMEBUFFER,F.COLOR_ATTACHMENT0,F.TEXTURE_2D,x.texture.webGLTexture,0),I&&(F.clearColor(0,0,0,R?0:1),F.clear(F.COLOR_BUFFER_BIT)),F.activeTexture(F.TEXTURE0),F.bindTexture(F.TEXTURE_2D,y.texture.webGLTexture),F.copyTexSubImage2D(F.TEXTURE_2D,0,0,0,_,E,A,D),F.bindFramebuffer(F.FRAMEBUFFER,null),F.bindTexture(F.TEXTURE_2D,null)},copyToGame:function(x){var y=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),y.activeTexture(y.TEXTURE0),y.bindTexture(y.TEXTURE_2D,x.texture.webGLTexture),y.bufferData(y.ARRAY_BUFFER,this.vertexData,y.STATIC_DRAW),y.drawArrays(y.TRIANGLES,0,6)},drawFrame:function(x,y,_,E){void 0===_&&(_=!0),void 0===E&&(E=this.colorMatrix);var A=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",E.getData()),this.set1f("uAlpha",E.alpha),A.activeTexture(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,x.texture.webGLTexture),y?(A.viewport(0,0,y.width,y.height),A.bindFramebuffer(A.FRAMEBUFFER,y.framebuffer.webGLFramebuffer),A.framebufferTexture2D(A.FRAMEBUFFER,A.COLOR_ATTACHMENT0,A.TEXTURE_2D,y.texture.webGLTexture,0)):A.viewport(0,0,x.width,x.height),A.clearColor(0,0,0,_?0:1),A.clear(A.COLOR_BUFFER_BIT),A.bufferData(A.ARRAY_BUFFER,this.vertexData,A.STATIC_DRAW),A.drawArrays(A.TRIANGLES,0,6),A.bindFramebuffer(A.FRAMEBUFFER,null),A.bindTexture(A.TEXTURE_2D,null)},blendFrames:function(x,y,_,E,A,D){void 0===E&&(E=1),void 0===A&&(A=!0),void 0===D&&(D=this.linearShader);var I=this.gl;this.setShader(D),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",E),I.activeTexture(I.TEXTURE0),I.bindTexture(I.TEXTURE_2D,x.texture.webGLTexture),I.activeTexture(I.TEXTURE1),I.bindTexture(I.TEXTURE_2D,y.texture.webGLTexture),_?(I.bindFramebuffer(I.FRAMEBUFFER,_.framebuffer.webGLFramebuffer),I.framebufferTexture2D(I.FRAMEBUFFER,I.COLOR_ATTACHMENT0,I.TEXTURE_2D,_.texture.webGLTexture,0),I.viewport(0,0,_.width,_.height)):I.viewport(0,0,x.width,x.height),I.clearColor(0,0,0,A?0:1),I.clear(I.COLOR_BUFFER_BIT),I.bufferData(I.ARRAY_BUFFER,this.vertexData,I.STATIC_DRAW),I.drawArrays(I.TRIANGLES,0,6),I.bindFramebuffer(I.FRAMEBUFFER,null),I.bindTexture(I.TEXTURE_2D,null)},blendFramesAdditive:function(x,y,_,E,A){this.blendFrames(x,y,_,E,A,this.addShader)},clearFrame:function(x,y){void 0===y&&(y=!0);var _=this.gl;_.viewport(0,0,x.width,x.height),_.bindFramebuffer(_.FRAMEBUFFER,x.framebuffer.webGLFramebuffer),_.clearColor(0,0,0,y?0:1),_.clear(_.COLOR_BUFFER_BIT),_.bindFramebuffer(_.FRAMEBUFFER,this.renderer.currentFramebuffer.webGLFramebuffer)},setUVs:function(x,y,_,E,A,D,I,R){var F=this.vertexViewF32;F[2]=x,F[3]=y,F[6]=_,F[7]=E,F[10]=A,F[11]=D,F[14]=x,F[15]=y,F[18]=A,F[19]=D,F[22]=I,F[23]=R},setTargetUVs:function(x,y){var _=y.height/x.height;this.setUVs(0,_=_>.5?.5-(_-.5):.5-_+.5,0,1+_,1,1+_,1,_)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});S.exports=v},36060:S=>{S.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline",FX_PIPELINE:"FxPipeline"}},84817:S=>{S.exports="pipelineafterflush"},36712:S=>{S.exports="pipelinebeforeflush"},40285:S=>{S.exports="pipelinebind"},65918:S=>{S.exports="pipelineboot"},92852:S=>{S.exports="pipelinedestroy"},56072:S=>{S.exports="pipelinerebind"},57566:S=>{S.exports="pipelineresize"},77085:(S,k,a)=>{S.exports={AFTER_FLUSH:a(84817),BEFORE_FLUSH:a(36712),BIND:a(40285),BOOT:a(65918),DESTROY:a(92852),REBIND:a(56072),RESIZE:a(57566)}},54812:(S,k,a)=>{var b=a(83419),T=a(99155),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.amount=1},onPreRender:function(h,c){h=this.getController(h),this.set1f("amount",h.amount,c)}});S.exports=f},67329:(S,k,a)=>{var b=a(83419),T=a(24400),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.steps=4,this.offsetX=1,this.offsetY=1,this.blurStrength=1,this.strength=1,this.glcolor=[1,1,1]},onPreRender:function(h){h=this.getController(h),this.set1f("strength",h.blurStrength),this.set3fv("color",h.glcolor)},onDraw:function(h){var c=this.getController(),u=this.fullFrame1,m=this.fullFrame2;this.copyFrame(h,m);for(var d=2/h.width*c.offsetX,p=2/h.height*c.offsetY,v=0;v{var b=a(83419),T=a(41514),g=a(51078),f=a(94328),h=a(84057),c=new b({Extends:h,initialize:function(m){h.call(this,{game:m,shaders:[{name:"Gaussian5",fragShader:T},{name:"Gaussian9",fragShader:g},{name:"Gaussian13",fragShader:f}]}),this.activeShader=this.shaders[0],this.x=2,this.y=2,this.steps=4,this.strength=1,this.glcolor=[1,1,1]},setQualityLow:function(){return this.activeShader=this.shaders[0],this},setQualityMedium:function(){return this.activeShader=this.shaders[1],this},setQualityHigh:function(){return this.activeShader=this.shaders[2],this},onDraw:function(u){var m=this.getController(),d=this.gl,p=this.fullFrame1,v=d.getParameter(d.FRAMEBUFFER_BINDING);this.bind(this.shaders[m.quality]),d.activeTexture(d.TEXTURE0),d.viewport(0,0,u.width,u.height),this.set1i("uMainSampler",0),this.set2f("resolution",u.width,u.height),this.set1f("strength",m.strength),this.set3fv("color",m.glcolor);for(var x=0;x{var b=a(83419),T=a(90610),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.isTiltShift=!1,this.strength=1,this.blurX=1,this.blurY=1,this.radius=.5,this.amount=1,this.contrast=.2},onPreRender:function(h,c,u,m){h=this.getController(h),this.set1f("radius",h.radius,c),this.set1f("amount",h.amount,c),this.set1f("contrast",h.contrast,c),this.set1f("strength",h.strength,c),this.set2f("blur",h.blurX,h.blurY,c),this.setBoolean("isTiltShift",h.isTiltShift,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},89428:(S,k,a)=>{var b=a(83419),T=a(91899),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.scale=1,this.feather=.005,this.thickness=8,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4]},onPreRender:function(h,c,u,m){h=this.getController(h),this.set1f("scale",h.scale,c),this.set1f("feather",h.feather,c),this.set1f("thickness",h.thickness,c),this.set3fv("color",h.glcolor,c),this.set4fv("backgroundColor",h.glcolor2,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},88904:(S,k,a)=>{var b=a(83419),T=a(84057),g=new b({Extends:T,initialize:function(h){T.call(this,{game:h})},onDraw:function(f){var h=this.fullFrame1;this.controller?this.manager.drawFrame(f,h,!0,this.controller):this.drawFrame(f,h),this.copyToGame(h)}});S.exports=g},63563:(S,k,a)=>{var b=a(83419),T=a(47838),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.x=.005,this.y=.005},onBoot:function(){this.setTexture("__WHITE")},setTexture:function(h){var c=this.game.textures.getFrame(h);c&&(this.glTexture=c.glTexture)},onDraw:function(h){var c=this.getController(),u=this.fullFrame1;this.bind(),this.set1i("uMainSampler",0),this.set1i("uDisplacementSampler",1),this.set2f("amount",c.x,c.y),this.bindTexture(c.glTexture,1),this.copySprite(h,u),this.copyToGame(u)}});S.exports=f},94045:(S,k,a)=>{var b=a(83419),T=a(95540),g=a(98656),f=a(84057),h=a(70554),c=new b({Extends:f,initialize:function(m,d){var p=T(d,"quality",.1),v=T(d,"distance",10);f.call(this,{game:m,fragShader:h.setGlowQuality(g,m,p,v)}),this.outerStrength=4,this.innerStrength=0,this.knockout=!1,this.glcolor=[1,1,1,1]},onPreRender:function(u,m,d,p){u=this.getController(u),this.set1f("outerStrength",u.outerStrength,m),this.set1f("innerStrength",u.innerStrength,m),this.set4fv("glowColor",u.glcolor,m),this.setBoolean("knockout",u.knockout,m),d&&p&&this.set2f("resolution",d,p,m)},onDraw:function(u){this.set2f("resolution",u.width,u.height),this.bindAndDraw(u)}});S.exports=c},74088:(S,k,a)=>{var b=a(83419),T=a(70463),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.alpha=.2,this.size=0,this.fromX=0,this.fromY=0,this.toX=0,this.toY=1,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0]},onPreRender:function(h,c){h=this.getController(h),this.set1f("alpha",h.alpha,c),this.set1i("size",h.size,c),this.set3fv("color1",h.glcolor1,c),this.set3fv("color2",h.glcolor2,c),this.set2f("positionFrom",h.fromX,h.fromY,c),this.set2f("positionTo",h.toX,h.toY,c)}});S.exports=f},99636:(S,k,a)=>{var b=a(83419),T=a(50831),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.amount=1},onPreRender:function(h,c,u,m){h=this.getController(h),this.set1f("amount",h.amount,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},34700:(S,k,a)=>{var b=a(83419),T=a(92595),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.x=0,this.y=0,this.decay=.1,this.power=1,this.glcolor=[0,0,0,1],this.samples=6,this.intensity=1},onPreRender:function(h,c){var u=(h=this.getController(h)).samples;this.set1i("samples",u,c),this.set1f("intensity",h.intensity,c),this.set1f("decay",h.decay,c),this.set1f("power",h.power/u,c),this.set2f("lightPosition",h.x,h.y,c),this.set4fv("color",h.glcolor,c)}});S.exports=f},91157:(S,k,a)=>{var b=a(83419),T=a(72464),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.speed=.5,this.lineWidth=.5,this.gradient=3,this.reveal=!1},onPreRender:function(h,c,u,m){h=this.getController(h),this.setTime("time",c),this.set1f("speed",h.speed,c),this.set1f("lineWidth",h.lineWidth,c),this.set1f("gradient",h.gradient,c),this.setBoolean("reveal",h.reveal,c),u&&m&&this.set2f("resolution",u,m,c)},onDraw:function(h){this.set2f("resolution",h.width,h.height),this.bindAndDraw(h)}});S.exports=f},27797:(S,k,a)=>{var b=a(83419),T=a(39249),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.x=.5,this.y=.5,this.radius=.5,this.strength=.5},onPreRender:function(h,c){h=this.getController(h),this.set1f("radius",h.radius,c),this.set1f("strength",h.strength,c),this.set2f("position",h.x,h.y,c)}});S.exports=f},67603:(S,k,a)=>{var b=a(83419),T=a(2878),g=a(84057),f=new b({Extends:g,initialize:function(c){g.call(this,{game:c,fragShader:T}),this.progress=0,this.wipeWidth=.1,this.direction=0,this.axis=0,this.reveal=!1},onPreRender:function(h,c){h=this.getController(h),this.set4f("config",h.progress,h.wipeWidth,h.direction,h.axis,c),this.setBoolean("reveal",h.reveal,c)}});S.exports=f},58918:(S,k,a)=>{var b={Barrel:a(54812),Bloom:a(67329),Blur:a(8861),Bokeh:a(51051),Circle:a(89428),ColorMatrix:a(88904),Displacement:a(63563),Glow:a(94045),Gradient:a(74088),Pixelate:a(99636),Shadow:a(34700),Shine:a(91157),Vignette:a(27797),Wipe:a(67603)};S.exports=b},96615:(S,k,a)=>{var b=a(36060),T=a(79291),g={FX:a(58918),BitmapMaskPipeline:a(31302),Events:a(77085),FXPipeline:a(92651),LightPipeline:a(96569),MobilePipeline:a(56527),MultiPipeline:a(57516),PointLightPipeline:a(43439),PostFXPipeline:a(84057),PreFXPipeline:a(43558),RopePipeline:a(81041),SinglePipeline:a(12385),UtilityPipeline:a(7589)};g=T(!1,g,b),S.exports=g},35407:S=>{S.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = frame1 + frame2 * uStrength;","}"].join("\n")},78908:S=>{S.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","precision mediump float;","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;"," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);"," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }"," gl_FragColor = mainColor;","}"].join("\n")},85191:S=>{S.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","precision mediump float;","attribute vec2 inPosition;","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}"].join("\n")},96293:S=>{S.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","varying vec2 outTexCoord;","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);"," if (uAlpha == 0.0)"," {"," gl_FragColor = c;"," return;"," }"," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }"," vec4 result;"," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];"," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);"," rgb *= result.a;"," gl_FragColor = vec4(rgb, result.a);","}"].join("\n")},36682:S=>{S.exports=["#define SHADER_NAME PHASER_COPY_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float uBrightness;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}"].join("\n")},99155:S=>{S.exports=["#define SHADER_NAME BARREL_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float amount;","varying vec2 outTexCoord;","vec2 Distort(vec2 p)","{"," float theta = atan(p.y, p.x);"," float radius = length(p);"," radius = pow(radius, amount);"," p.x = radius * cos(theta);"," p.y = radius * sin(theta);"," return 0.5 * (p + 1.0);","}","void main()","{"," vec2 xy = 2.0 * outTexCoord - 1.0;"," vec2 texCoord = outTexCoord;"," if (length(xy) < 1.0)"," {"," texCoord = Distort(xy);"," }"," gl_FragColor = texture2D(uMainSampler, texCoord);","}"].join("\n")},24400:S=>{S.exports=["#define SHADER_NAME BLOOM_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec4 sum = texture2D(uMainSampler, outTexCoord) * 0.204164 * strength;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord - offset * 1.407333) * 0.304005;"," sum = sum + texture2D(uMainSampler, outTexCoord + offset * 3.294215) * 0.093913;"," gl_FragColor = (sum + texture2D(uMainSampler, outTexCoord - offset * 3.294215) * 0.093913) * vec4(color, 1);","}"].join("\n")},94328:S=>{S.exports=["#define SHADER_NAME BLUR_HIGH_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.411764705882353) * offset * strength;"," vec2 off2 = vec2(3.2941176470588234) * offset * strength;"," vec2 off3 = vec2(5.176470588235294) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.1964825501511404;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.2969069646728344;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.09447039785044732;"," col += texture2D(uMainSampler, uv + (off3 / resolution)) * 0.010381362401148057;"," col += texture2D(uMainSampler, uv - (off3 / resolution)) * 0.010381362401148057;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},41514:S=>{S.exports=["#define SHADER_NAME BLUR_LOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 offset = vec2(1.333) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.29411764705882354;"," col += texture2D(uMainSampler, uv + (offset / resolution)) * 0.35294117647058826;"," col += texture2D(uMainSampler, uv - (offset / resolution)) * 0.35294117647058826;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},51078:S=>{S.exports=["#define SHADER_NAME BLUR_MED_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec2 offset;","uniform float strength;","uniform vec3 color;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 col = vec4(0.0);"," vec2 off1 = vec2(1.3846153846) * offset * strength;"," vec2 off2 = vec2(3.2307692308) * offset * strength;"," col += texture2D(uMainSampler, uv) * 0.2270270270;"," col += texture2D(uMainSampler, uv + (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv - (off1 / resolution)) * 0.3162162162;"," col += texture2D(uMainSampler, uv + (off2 / resolution)) * 0.0702702703;"," col += texture2D(uMainSampler, uv - (off2 / resolution)) * 0.0702702703;"," gl_FragColor = col * vec4(color, 1.0);","}"].join("\n")},90610:S=>{S.exports=["#define SHADER_NAME BOKEH_FS","precision mediump float;","#define ITERATIONS 100.0","#define ONEOVER_ITR 1.0 / ITERATIONS","#define PI 3.141596","#define GOLDEN_ANGLE 2.39996323","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float radius;","uniform float amount;","uniform float contrast;","uniform bool isTiltShift;","uniform float strength;","uniform vec2 blur;","varying vec2 outTexCoord;","vec2 Sample (in float theta, inout float r)","{"," r += 1.0 / r;"," return (r - 1.0) * vec2(cos(theta), sin(theta)) * 0.06;","}","vec3 Bokeh (sampler2D tex, vec2 uv, float radius)","{"," vec3 acc = vec3(0.0);"," vec3 div = vec3(0.0);"," vec2 pixel = vec2(resolution.y / resolution.x, 1.0) * radius * .025;"," float r = 1.0;"," for (float j = 0.0; j < GOLDEN_ANGLE * ITERATIONS; j += GOLDEN_ANGLE)"," {"," vec3 col = texture2D(tex, uv + pixel * Sample(j, r)).xyz;"," col = contrast > 0.0 ? col * col * (1.0 + contrast) : col;"," vec3 bokeh = vec3(0.5) + pow(col, vec3(10.0)) * amount;"," acc += col * bokeh;"," div += bokeh;"," }"," return acc / div;","}","void main ()","{"," float shift = 1.0;"," if (isTiltShift)"," {"," vec2 uv = vec2(gl_FragCoord.xy / resolution + vec2(-0.5, -0.5)) * 2.0;"," float centerStrength = 1.0;"," shift = length(uv * blur * strength) * centerStrength;"," }"," gl_FragColor = vec4(Bokeh(uMainSampler, outTexCoord * vec2(1.0, 1.0), radius * shift), 0.0);","}"].join("\n")},91899:S=>{S.exports=["#define SHADER_NAME CIRCLE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform vec3 color;","uniform vec4 backgroundColor;","uniform float thickness;","uniform float scale;","uniform float feather;","varying vec2 outTexCoord;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 position = (gl_FragCoord.xy / resolution.xy) * 2.0 - 1.0;"," float aspectRatio = resolution.x / resolution.y;"," position.x *= aspectRatio;"," float grad = length(position);"," float outer = aspectRatio;"," float inner = outer - (thickness * 2.0 / resolution.y);"," if (aspectRatio >= 1.0)"," {"," float f = 2.0 + (resolution.y / resolution.x);"," outer = 1.0;"," inner = 1.0 - (thickness * f / resolution.x);"," }"," outer *= scale;"," inner *= scale;"," float circle = smoothstep(outer, outer - 0.01, grad);"," float ring = circle - smoothstep(inner, inner - feather, grad);"," texture = mix(backgroundColor * backgroundColor.a, texture, texture.a);"," texture = (texture * (circle - ring));"," gl_FragColor = vec4(texture.rgb + (ring * color), texture.a);","}"].join("\n")},47838:S=>{S.exports=["#define SHADER_NAME DISPLACEMENT_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform sampler2D uDisplacementSampler;","uniform vec2 amount;","varying vec2 outTexCoord;","void main ()","{"," vec2 disp = (-vec2(0.5, 0.5) + texture2D(uDisplacementSampler, outTexCoord).rr) * amount;"," gl_FragColor = texture2D(uMainSampler, outTexCoord + disp).rgba;","}"].join("\n")},98656:S=>{S.exports=["#define SHADER_NAME GLOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform float outerStrength;","uniform float innerStrength;","uniform vec2 resolution;","uniform vec4 glowColor;","uniform bool knockout;","const float PI = 3.14159265358979323846264;","const float DIST = __DIST__;","const float SIZE = min(__SIZE__, PI * 2.0);","const float STEP = ceil(PI * 2.0 / SIZE);","const float MAX_ALPHA = STEP * DIST * (DIST + 1.0) / 2.0;","void main ()","{"," vec2 px = vec2(1.0 / resolution.x, 1.0 / resolution.y);"," float totalAlpha = 0.0;"," vec2 direction;"," vec2 displaced;"," vec4 color;"," for (float angle = 0.0; angle < PI * 2.0; angle += SIZE)"," {"," direction = vec2(cos(angle), sin(angle)) * px;"," for (float curDistance = 0.0; curDistance < DIST; curDistance++)"," {"," displaced = outTexCoord + direction * (curDistance + 1.0);"," color = texture2D(uMainSampler, displaced);"," totalAlpha += (DIST - curDistance) * color.a;"," }"," }"," color = texture2D(uMainSampler, outTexCoord);"," float alphaRatio = (totalAlpha / MAX_ALPHA);"," float innerGlowAlpha = (1.0 - alphaRatio) * innerStrength * color.a;"," float innerGlowStrength = min(1.0, innerGlowAlpha);"," vec4 innerColor = mix(color, glowColor, innerGlowStrength);"," float outerGlowAlpha = alphaRatio * outerStrength * (1.0 - color.a);"," float outerGlowStrength = min(1.0 - innerColor.a, outerGlowAlpha);"," vec4 outerGlowColor = outerGlowStrength * glowColor.rgba;"," if (knockout)"," {"," float resultAlpha = outerGlowAlpha + innerGlowAlpha;"," gl_FragColor = vec4(glowColor.rgb * resultAlpha, resultAlpha);"," }"," else"," {"," gl_FragColor = innerColor + outerGlowColor;"," }","}"].join("\n")},70463:S=>{S.exports=["#define SHADER_NAME GRADIENT_FS","#define SRGB_TO_LINEAR(c) pow((c), vec3(2.2))","#define LINEAR_TO_SRGB(c) pow((c), vec3(1.0 / 2.2))","#define SRGB(r, g, b) SRGB_TO_LINEAR(vec3(float(r), float(g), float(b)) / 255.0)","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 positionFrom;","uniform vec2 positionTo;","uniform vec3 color1;","uniform vec3 color2;","uniform float alpha;","uniform int size;","varying vec2 outTexCoord;","float gradientNoise(in vec2 uv)","{"," const vec3 magic = vec3(0.06711056, 0.00583715, 52.9829189);"," return fract(magic.z * fract(dot(uv, magic.xy)));","}","float stepped (in float s, in float scale, in int steps)","{"," return steps > 0 ? floor( s / ((1.0 * scale) / float(steps))) * 1.0 / float(steps - 1) : s;","}","void main ()","{"," vec2 a = positionFrom;"," vec2 b = positionTo;"," vec2 ba = b - a;"," float d = dot(outTexCoord - a, ba) / dot(ba, ba);"," float t = size > 0 ? stepped(d, 1.0, size) : d;"," t = smoothstep(0.0, 1.0, clamp(t, 0.0, 1.0));"," vec3 color = mix(SRGB(color1.r, color1.g, color1.b), SRGB(color2.r, color2.g, color2.b), t);"," color = LINEAR_TO_SRGB(color);"," color += (1.0 / 255.0) * gradientNoise(outTexCoord) - (0.5 / 255.0);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = vec4(mix(color.rgb, texture.rgb, alpha), 1.0) * texture.a;","}"].join("\n")},50831:S=>{S.exports=["#define SHADER_NAME PIXELATE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform float amount;","varying vec2 outTexCoord;","void main ()","{"," float pixelSize = floor(2.0 + amount);"," vec2 center = pixelSize * floor(outTexCoord * resolution / pixelSize) + pixelSize * vec2(0.5, 0.5);"," vec2 corner1 = center + pixelSize * vec2(-0.5, -0.5);"," vec2 corner2 = center + pixelSize * vec2(+0.5, -0.5);"," vec2 corner3 = center + pixelSize * vec2(+0.5, +0.5);"," vec2 corner4 = center + pixelSize * vec2(-0.5, +0.5);"," vec4 pixel = 0.4 * texture2D(uMainSampler, center / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner1 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner2 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner3 / resolution);"," pixel += 0.15 * texture2D(uMainSampler, corner4 / resolution);"," gl_FragColor = pixel;","}"].join("\n")},92595:S=>{S.exports=["#define SHADER_NAME SHADOW_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","uniform vec2 lightPosition;","uniform vec4 color;","uniform float decay;","uniform float power;","uniform float intensity;","uniform int samples;","const int MAX = 12;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec2 pc = (lightPosition - outTexCoord) * intensity;"," float shadow = 0.0;"," float limit = max(float(MAX), float(samples));"," for (int i = 0; i < MAX; ++i)"," {"," if (i >= samples)"," {"," break;"," }"," shadow += texture2D(uMainSampler, outTexCoord + float(i) * decay / limit * pc).a * power;"," }"," float mask = 1.0 - texture.a;"," gl_FragColor = mix(texture, color, shadow * mask);","}"].join("\n")},72464:S=>{S.exports=["#define SHADER_NAME SHINE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec2 resolution;","uniform bool reveal;","uniform float speed;","uniform float time;","uniform float lineWidth;","uniform float gradient;","varying vec2 outTexCoord;","void main ()","{","\tvec2 uv = gl_FragCoord.xy / resolution.xy;"," vec4 tex = texture2D(uMainSampler, outTexCoord);"," vec4 col1 = vec4(0.3, 0.0, 0.0, 1.0);"," vec4 col2 = vec4(0.85, 0.85, 0.85, 1.0);"," uv.x = uv.x - mod(time * speed, 2.0) + 0.5;"," float y = uv.x * gradient;"," float s = smoothstep(y - lineWidth, y, uv.y) - smoothstep(y, y + lineWidth, uv.y);"," gl_FragColor = (((s * col1) + (s * col2)) * tex);"," if (!reveal)"," {"," gl_FragColor += tex;"," }","}"].join("\n")},39249:S=>{S.exports=["#define SHADER_NAME VIGNETTE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform float radius;","uniform float strength;","uniform vec2 position;","varying vec2 outTexCoord;","void main ()","{"," vec4 col = vec4(1.0);"," float d = length(outTexCoord - position);"," if (d <= radius)"," {"," float g = d / radius;"," g = sin(g * 3.14 * strength);"," \tcol = vec4(g * g * g);"," }"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," gl_FragColor = texture * (1.0 - col);","}"].join("\n")},2878:S=>{S.exports=["#define SHADER_NAME WIPE_FS","precision mediump float;","uniform sampler2D uMainSampler;","uniform vec4 config;","uniform bool reveal;","varying vec2 outTexCoord;","void main ()","{"," vec2 uv = outTexCoord;"," vec4 color0;"," vec4 color1;"," if (reveal)"," {"," color0 = vec4(0);"," color1 = texture2D(uMainSampler, uv);"," }"," else"," {"," color0 = texture2D(uMainSampler, uv);"," color1 = vec4(0);"," }"," float distance = config.x;"," float width = config.y;"," float direction = config.z;"," float axis = uv.x;"," if (config.w == 1.0)"," {"," axis = uv.y;"," }"," float adjust = mix(width, -width, distance);"," float value = smoothstep(distance - width, distance + width, abs(direction - axis) + adjust);"," gl_FragColor = mix(color1, color0, value);","}"].join("\n")},31063:S=>{S.exports=["#define SHADER_NAME PHASER_LIGHT_FS","precision mediump float;","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","const int kMaxLights = %LIGHT_COUNT%;","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;"," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }"," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);"," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}"].join("\n")},48247:S=>{S.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","precision mediump float;","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","varying vec2 outTexCoord;","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);"," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}"].join("\n")},41214:S=>{S.exports=["#define SHADER_NAME PHASER_MESH_FS","precision mediump float;","uniform vec3 uLightPosition;","uniform vec3 uLightAmbient;","uniform vec3 uLightDiffuse;","uniform vec3 uLightSpecular;","uniform vec3 uFogColor;","uniform float uFogNear;","uniform float uFogFar;","uniform vec3 uMaterialAmbient;","uniform vec3 uMaterialDiffuse;","uniform vec3 uMaterialSpecular;","uniform float uMaterialShine;","uniform vec3 uCameraPosition;","uniform sampler2D uTexture;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main (void)","{"," vec4 color = texture2D(uTexture, vTextureCoord);"," vec3 ambient = uLightAmbient * uMaterialAmbient;"," vec3 norm = normalize(vNormal);"," vec3 lightDir = normalize(uLightPosition - vPosition);"," float diff = max(dot(norm, lightDir), 0.0);"," vec3 diffuse = uLightDiffuse * (diff * uMaterialDiffuse);"," vec3 viewDir = normalize(uCameraPosition - vPosition);"," vec3 reflectDir = reflect(-lightDir, norm);"," float spec = pow(max(dot(viewDir, reflectDir), 0.0), uMaterialShine);"," vec3 specular = uLightSpecular * (spec * uMaterialSpecular);"," vec3 result = (ambient + diffuse + specular) * color.rgb;"," float depth = gl_FragCoord.z / gl_FragCoord.w;"," float fogFactor = smoothstep(uFogNear, uFogFar, depth);"," gl_FragColor.rgb = mix(result.rgb, uFogColor, fogFactor);"," gl_FragColor.a = color.a;","}"].join("\n")},39653:S=>{S.exports=["#define SHADER_NAME PHASER_MESH_VS","precision mediump float;","attribute vec3 aVertexPosition;","attribute vec3 aVertexNormal;","attribute vec2 aTextureCoord;","uniform mat4 uViewProjectionMatrix;","uniform mat4 uModelMatrix;","uniform mat4 uNormalMatrix;","varying vec2 vTextureCoord;","varying vec3 vNormal;","varying vec3 vPosition;","void main ()","{"," vTextureCoord = aTextureCoord;"," vPosition = vec3(uModelMatrix * vec4(aVertexPosition, 1.0));"," vNormal = vec3(uNormalMatrix * vec4(aVertexNormal, 1.0));"," gl_Position = uViewProjectionMatrix * uModelMatrix * vec4(aVertexPosition, 1.0);","}"].join("\n")},62143:S=>{S.exports=["#define SHADER_NAME PHASER_MOBILE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},47940:S=>{S.exports=["#define SHADER_NAME PHASER_MOBILE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},98840:S=>{S.exports=["#define SHADER_NAME PHASER_MULTI_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler[%count%];","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture;"," %forloop%"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},44667:S=>{S.exports=["#define SHADER_NAME PHASER_MULTI_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},4127:S=>{S.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","precision mediump float;","uniform vec2 uResolution;","uniform float uCameraZoom;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);"," float distToSurf = length(center - gl_FragCoord.xy);"," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);"," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);"," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;"," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}"].join("\n")},89924:S=>{S.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}"].join("\n")},27681:S=>{S.exports=["#define SHADER_NAME PHASER_POSTFX_FS","precision mediump float;","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}"].join("\n")},49627:S=>{S.exports=["#define SHADER_NAME PHASER_QUAD_VS","precision mediump float;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","varying vec2 outFragCoord;","varying vec2 outTexCoord;","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;"," gl_Position = vec4(inPosition, 0, 1);","}"].join("\n")},45561:S=>{S.exports=["#define SHADER_NAME PHASER_SINGLE_FS","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","uniform sampler2D uMainSampler;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 color = texture * texel;"," if (outTintEffect == 1.0)"," {"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," color = texel;"," }"," gl_FragColor = color;","}"].join("\n")},60722:S=>{S.exports=["#define SHADER_NAME PHASER_SINGLE_VS","precision mediump float;","uniform mat4 uProjectionMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);"," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}"].join("\n")},89350:(S,k,a)=>{S.exports={AddBlendFrag:a(35407),BitmapMaskFrag:a(78908),BitmapMaskVert:a(85191),ColorMatrixFrag:a(96293),CopyFrag:a(36682),FXBarrelFrag:a(99155),FXBloomFrag:a(24400),FXBlurHighFrag:a(94328),FXBlurLowFrag:a(41514),FXBlurMedFrag:a(51078),FXBokehFrag:a(90610),FXCircleFrag:a(91899),FXDisplacementFrag:a(47838),FXGlowFrag:a(98656),FXGradientFrag:a(70463),FXPixelateFrag:a(50831),FXShadowFrag:a(92595),FXShineFrag:a(72464),FXVignetteFrag:a(39249),FXWipeFrag:a(2878),LightFrag:a(31063),LinearBlendFrag:a(48247),MeshFrag:a(41214),MeshVert:a(39653),MobileFrag:a(62143),MobileVert:a(47940),MultiFrag:a(98840),MultiVert:a(44667),PointLightFrag:a(4127),PointLightVert:a(89924),PostFXFrag:a(27681),QuadVert:a(49627),SingleFrag:a(45561),SingleVert:a(60722)}},93567:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c){this.webGLAttribLocation=-1,this.gl=f,this.program=h,this.name=c,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var g=this.gl;g.isContextLost()||(this.webGLAttribLocation=g.getAttribLocation(this.program.webGLProgram,this.name))}else this.webGLAttribLocation=-1},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLAttribLocation=-1}});S.exports=T},26128:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u){this.webGLBuffer=null,this.gl=f,this.initialDataOrSize=h,this.bufferType=c,this.bufferUsage=u,this.createResource()},createResource:function(){if(null!==this.initialDataOrSize){var g=this.gl;if(!g.isContextLost()){var f=this.bufferType,h=g.createBuffer();this.webGLBuffer=h,g.bindBuffer(f,this.webGLBuffer),g.bufferData(f,this.initialDataOrSize,this.bufferUsage),g.bindBuffer(f,null)}}},destroy:function(){var g=this.gl;g.isContextLost()||g.deleteBuffer(this.webGLBuffer),this.webGLBuffer=null,this.initialDataOrSize=null,this.gl=null}});S.exports=T},84387:(S,k,a)=>{var b=a(83419),T={36054:"Incomplete Attachment",36055:"Missing Attachment",36057:"Incomplete Dimensions",36061:"Framebuffer Unsupported"},g=new b({initialize:function(h,c,u,m,d){this.webGLFramebuffer=null,this.gl=h,this.width=c,this.height=u,this.renderTexture=m,this.addDepthStencilBuffer=!!d,this.createResource()},createResource:function(){var f=this.gl;if(!f.isContextLost()){var c,h=this.renderTexture,u=f.createFramebuffer();if(this.webGLFramebuffer=u,f.bindFramebuffer(f.FRAMEBUFFER,u),h.isRenderTexture=!0,h.isAlphaPremultiplied=!1,f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,h.webGLTexture,0),(c=f.checkFramebufferStatus(f.FRAMEBUFFER))!==f.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer status: "+(T[c]||c));if(this.addDepthStencilBuffer){var m=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,m),f.renderbufferStorage(f.RENDERBUFFER,f.DEPTH_STENCIL,this.width,this.height),f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.RENDERBUFFER,m)}f.bindFramebuffer(f.FRAMEBUFFER,null)}},destroy:function(){if(null!==this.webGLFramebuffer){var f=this.gl;if(!f.isContextLost()){f.bindFramebuffer(f.FRAMEBUFFER,this.webGLFramebuffer);var h=f.getFramebufferAttachmentParameter(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==h&&(f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,null,0),f.deleteTexture(h));var c=f.getFramebufferAttachmentParameter(f.FRAMEBUFFER,f.DEPTH_STENCIL_ATTACHMENT,f.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);null!==c&&f.deleteRenderbuffer(c),f.bindFramebuffer(f.FRAMEBUFFER,null),f.deleteFramebuffer(this.webGLFramebuffer)}this.renderTexture=null,this.webGLFramebuffer=null,this.gl=null}}});S.exports=g},1482:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c){this.webGLProgram=null,this.gl=f,this.vertexSource=h,this.fragmentSource=c,this.createResource()},createResource:function(){var g=this.gl;if(!g.isContextLost()){var f=g.createProgram(),h=g.createShader(g.VERTEX_SHADER),c=g.createShader(g.FRAGMENT_SHADER);g.shaderSource(h,this.vertexSource),g.shaderSource(c,this.fragmentSource),g.compileShader(h),g.compileShader(c);var u="Shader failed:\n";if(!g.getShaderParameter(h,g.COMPILE_STATUS))throw new Error("Vertex "+u+g.getShaderInfoLog(h));if(!g.getShaderParameter(c,g.COMPILE_STATUS))throw new Error("Fragment "+u+g.getShaderInfoLog(c));if(g.attachShader(f,h),g.attachShader(f,c),g.linkProgram(f),!g.getProgramParameter(f,g.LINK_STATUS))throw new Error("Link "+u+g.getProgramInfoLog(f));g.useProgram(f),this.webGLProgram=f}},destroy:function(){this.webGLProgram&&(this.gl.isContextLost()||this.gl.deleteProgram(this.webGLProgram),this.webGLProgram=null,this.gl=null)}});S.exports=T},82751:(S,k,a)=>{var b=a(83419),T=a(50030),g=new b({initialize:function(h,c,u,m,d,p,v,x,y,_,E,A,D){this.webGLTexture=null,this.isRenderTexture=!1,this.gl=h,this.mipLevel=c,this.minFilter=u,this.magFilter=m,this.wrapT=d,this.wrapS=p,this.format=v,this.pixels=x,this.width=y,this.height=_,this.pma=E??!0,this.forceSize=!!A,this.flipY=!!D,this.__SPECTOR_Metadata={},this.createResource()},createResource:function(){var f=this.gl;if(!f.isContextLost()){if(this.pixels instanceof g)return void(this.webGLTexture=this.pixels.webGLTexture);var h=f.createTexture();h.__SPECTOR_Metadata=this.__SPECTOR_Metadata,this.webGLTexture=h,this._processTexture()}},update:function(f,h,c,u,m,d,p,v,x){0!==h&&0!==c&&(this.pixels=f,this.width=h,this.height=c,this.flipY=u,this.wrapS=m,this.wrapT=d,this.minFilter=p,this.magFilter=v,this.format=x,this.gl.isContextLost()||this._processTexture())},_processTexture:function(){var f=this.gl;f.activeTexture(f.TEXTURE0);var h=f.getParameter(f.TEXTURE_BINDING_2D);f.bindTexture(f.TEXTURE_2D,this.webGLTexture),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,this.minFilter),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,this.magFilter),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,this.wrapS),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,this.wrapT),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.pma),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,this.flipY);var c=this.pixels,u=this.mipLevel,m=this.width,d=this.height,p=this.format,v=!1;if(null==c)f.texImage2D(f.TEXTURE_2D,u,p,m,d,0,p,f.UNSIGNED_BYTE,null),v=T(m,d);else if(c.compressed){m=c.width,d=c.height,v=c.generateMipmap;for(var x=0;x{var T=new(a(83419))({initialize:function(f,h,c){this.webGLUniformLocation=null,this.gl=f,this.program=h,this.name=c,this.createResource()},createResource:function(){if(null!==this.program.webGLProgram){var g=this.gl;g.isContextLost()||(this.webGLUniformLocation=g.getUniformLocation(this.program.webGLProgram,this.name))}else this.webGLUniformLocation=null},destroy:function(){this.gl=null,this.program=null,this.name=null,this.webGLUniformLocation=null}});S.exports=T},9503:(S,k,a)=>{var b={WebGLAttribLocationWrapper:a(93567),WebGLBufferWrapper:a(26128),WebGLProgramWrapper:a(1482),WebGLTextureWrapper:a(82751),WebGLFramebufferWrapper:a(84387),WebGLUniformLocationWrapper:a(57183)};S.exports=b},76531:(S,k,a)=>{var b=a(13560),T=a(83419),g=a(50792),f=a(97480),h=a(8443),c=a(57811),u=a(74403),m=a(45818),d=a(29747),p=a(87841),v=a(86555),x=a(56583),y=a(26099),_=a(38058),E=new T({Extends:g,initialize:function(D){g.call(this),this.game=D,this.canvasBounds=new p,this.parent=null,this.parentIsWindow=!1,this.parentSize=new v,this.gameSize=new v,this.baseSize=new v,this.displaySize=new v,this.scaleMode=b.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new y(1,1),this.autoRound=!1,this.autoCenter=b.CENTER.NO_CENTER,this.orientation=b.ORIENTATION.LANDSCAPE,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:d,windowResize:d,fullScreenChange:d,fullScreenError:d}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(h.BOOT,this.boot,this)},boot:function(){var A=this.game;this.canvas=A.canvas,this.fullscreen=A.device.fullscreen;var D=this.scaleMode;D!==b.SCALE_MODE.RESIZE&&D!==b.SCALE_MODE.EXPAND&&this.displaySize.setAspectMode(D),D===b.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),A.events.on(h.PRE_STEP,this.step,this),A.events.once(h.READY,this.refresh,this),A.events.once(h.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(A){this.getParent(A),this.getParentBounds();var D=A.width,I=A.height,R=A.scaleMode,F=A.zoom,N=A.autoRound;if("string"==typeof D)if("%"!==D.substr(-1))D=parseInt(D,10);else{var V=this.parentSize.width;0===V&&(V=window.innerWidth);var B=parseInt(D,10)/100;D=Math.floor(V*B)}if("string"==typeof I)if("%"!==I.substr(-1))I=parseInt(I,10);else{var H=this.parentSize.height;0===H&&(H=window.innerHeight);var Q=parseInt(I,10)/100;I=Math.floor(H*Q)}this.scaleMode=R,this.autoRound=N,this.autoCenter=A.autoCenter,this.resizeInterval=A.resizeInterval,N&&(D=Math.floor(D),I=Math.floor(I)),this.gameSize.setSize(D,I),F===b.ZOOM.MAX_ZOOM&&(F=this.getMaxZoom()),this.zoom=F,1!==F&&(this._resetZoom=!0),this.baseSize.setSize(D,I),N&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),A.minWidth>0&&this.displaySize.setMin(A.minWidth*F,A.minHeight*F),A.maxWidth>0&&this.displaySize.setMax(A.maxWidth*F,A.maxHeight*F),this.displaySize.setSize(D,I),(A.snapWidth>0||A.snapHeight>0)&&this.displaySize.setSnap(A.snapWidth,A.snapHeight),this.orientation=m(D,I)},getParent:function(A){var D=A.parent;if(null!==D){if(this.parent=u(D),this.parentIsWindow=this.parent===document.body,A.expandParent&&A.scaleMode!==b.SCALE_MODE.NONE){var I=this.parent.getBoundingClientRect();(this.parentIsWindow||0===I.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",I=this.parent.getBoundingClientRect(),!this.parentIsWindow&&0===I.height&&(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}A.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=u(A.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var A=this.parentSize,D=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(D.height=c(!0));var I=D.width,R=D.height;if(A.width!==I||A.height!==R)return A.setSize(I,R),!0;if(this.canvas){var F=this.canvasBounds,N=this.canvas.getBoundingClientRect();if(N.x!==F.x||N.y!==F.y)return!0}return!1},lockOrientation:function(A){var D=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!D&&D.call(screen,A)},setParentSize:function(A,D){return this.parentSize.setSize(A,D),this.refresh()},setGameSize:function(A,D){var I=this.autoRound;I&&(A=Math.floor(A),D=Math.floor(D));var R=this.width,F=this.height;return this.gameSize.resize(A,D),this.baseSize.resize(A,D),I&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(A/D),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(R,F)},resize:function(A,D){var I=this.zoom,R=this.autoRound;R&&(A=Math.floor(A),D=Math.floor(D));var F=this.width,N=this.height;this.gameSize.resize(A,D),this.baseSize.resize(A,D),R&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(A*I,D*I),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var V=this.canvas.style,B=A*I,H=D*I;return R&&(B=Math.floor(B),H=Math.floor(H)),(B!==A||H!==D)&&(V.width=B+"px",V.height=H+"px"),this.refresh(F,N)},setZoom:function(A){return this.zoom=A,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},setSnap:function(A,D){return void 0===A&&(A=0),void 0===D&&(D=A),this.displaySize.setSnap(A,D),this.refresh()},refresh:function(A,D){void 0===A&&(A=this.width),void 0===D&&(D=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var I=this.game.domContainer;if(I){this.baseSize.setCSS(I);var R=this.canvas.style,F=I.style;F.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",F.marginLeft=R.marginLeft,F.marginTop=R.marginTop}return this.emit(f.RESIZE,this.gameSize,this.baseSize,this.displaySize,A,D),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var A=m(this.width,this.height);A!==this.orientation&&(this.orientation=A,this.emit(f.ORIENTATION_CHANGE,A))}},updateScale:function(){var R,F,A=this.canvas.style,N=this.zoom,V=this.autoRound;if(this.scaleMode===b.SCALE_MODE.NONE)this.displaySize.setSize(this.gameSize.width*N,this.gameSize.height*N),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),this._resetZoom&&(A.width=R+"px",A.height=F+"px",this._resetZoom=!1);else if(this.scaleMode===b.SCALE_MODE.RESIZE)this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),this.canvas.width=R,this.canvas.height=F;else if(this.scaleMode===b.SCALE_MODE.EXPAND){var B=this.game.config.width,H=this.game.config.height;this.displaySize.setSize(this.parentSize.width,this.parentSize.height),R=this.displaySize.width,F=this.displaySize.height,V&&(R=Math.floor(R),F=Math.floor(F)),A.width=R+"px",A.height=F+"px";var Q=this.parentSize.width/B,G=this.parentSize.height/H;Q=0?0:-F.x*N.x,F.y>=0?0:-F.y*N.y,R.width>=F.width?I.width:I.width-(F.width-R.width)*N.x,R.height>=F.height?I.height:I.height-(F.height-R.height)*N.y),A&&(D.width/=A.zoomX,D.height/=A.zoomY,D.centerX=A.centerX+A.scrollX,D.centerY=A.centerY+A.scrollY),D},step:function(A,D){this.parent&&(this._lastCheck+=D,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var A=this.domlisteners;screen.orientation&&screen.orientation.addEventListener?screen.orientation.removeEventListener("change",A.orientationChange,!1):window.removeEventListener("orientationchange",A.orientationChange,!1),window.removeEventListener("resize",A.windowResize,!1),["webkit","moz",""].forEach(function(I){document.removeEventListener(I+"fullscreenchange",A.fullScreenChange,!1),document.removeEventListener(I+"fullscreenerror",A.fullScreenError,!1)}),document.removeEventListener("MSFullscreenChange",A.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",A.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===b.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===b.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});S.exports=E},64743:S=>{S.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},39218:S=>{S.exports={LANDSCAPE:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary",PORTRAIT:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary"}},81050:S=>{S.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5,EXPAND:6}},80805:S=>{S.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},13560:(S,k,a)=>{var b={CENTER:a(64743),ORIENTATION:a(39218),SCALE_MODE:a(81050),ZOOM:a(80805)};S.exports=b},56139:S=>{S.exports="enterfullscreen"},2336:S=>{S.exports="fullscreenfailed"},47412:S=>{S.exports="fullscreenunsupported"},51452:S=>{S.exports="leavefullscreen"},20666:S=>{S.exports="orientationchange"},47945:S=>{S.exports="resize"},97480:(S,k,a)=>{S.exports={ENTER_FULLSCREEN:a(56139),FULLSCREEN_FAILED:a(2336),FULLSCREEN_UNSUPPORTED:a(47412),LEAVE_FULLSCREEN:a(51452),ORIENTATION_CHANGE:a(20666),RESIZE:a(47945)}},93364:(S,k,a)=>{var b=a(79291),T=a(13560),g={Center:a(64743),Events:a(97480),Orientation:a(39218),ScaleManager:a(76531),ScaleModes:a(81050),Zoom:a(80805)};g=b(!1,g,T.CENTER),g=b(!1,g,T.ORIENTATION),g=b(!1,g,T.SCALE_MODE),g=b(!1,g,T.ZOOM),S.exports=g},27397:(S,k,a)=>{var b=a(95540),T=a(35355);S.exports=function(f){var h=f.game.config.defaultPhysicsSystem,c=b(f.settings,"physics",!1);if(h||c){var u=[];if(h&&u.push(T(h+"Physics")),c)for(var m in c)m=T(m.concat("Physics")),-1===u.indexOf(m)&&u.push(m);return u}}},52106:(S,k,a)=>{var b=a(95540);S.exports=function(g){var f=g.plugins.getDefaultScenePlugins(),h=b(g.settings,"plugins",!1);return Array.isArray(h)?h:f||[]}},87033:S=>{S.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},97482:(S,k,a)=>{var b=a(83419),T=a(2368),g=new b({initialize:function(h){this.sys=new T(this,h)},update:function(){}});S.exports=g},60903:(S,k,a)=>{var b=a(83419),T=a(89993),g=a(44594),f=a(8443),h=a(35154),c=a(54899),u=a(29747),m=a(97482),d=a(2368),p=new b({initialize:function(x,y){if(this.game=x,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,y){Array.isArray(y)||(y=[y]);for(var _=0;_-1&&(delete this.keys[_],this.scenes.splice(y,1),this._start.indexOf(_)>-1&&(y=this._start.indexOf(_),this._start.splice(y,1)),x.sys.destroy()),this},bootScene:function(v){var _,x=v.sys,y=x.settings;x.sceneUpdate=u,v.init&&(v.init.call(v,y.data),y.status=T.INIT,y.isTransition&&x.events.emit(g.TRANSITION_INIT,y.transitionFrom,y.transitionDuration)),x.load&&(_=x.load).reset(),_&&v.preload?(v.preload.call(v),y.status=T.LOADING,_.once(c.COMPLETE,this.loadComplete,this),_.start()):this.create(v)},loadComplete:function(v){this.create(v.scene)},payloadComplete:function(v){this.bootScene(v.scene)},update:function(v,x){this.processQueue(),this.isProcessing=!0;for(var y=this.scenes.length-1;y>=0;y--){var _=this.scenes[y].sys;_.settings.status>T.START&&_.settings.status<=T.RUNNING&&_.step(v,x),_.scenePlugin&&_.scenePlugin._target&&_.scenePlugin.step(v,x)}},render:function(v){for(var x=0;x=T.LOADING&&y.settings.status=T.START&&E<=T.CREATING)return this;if(E>=T.RUNNING&&E<=T.SLEEPING)_.shutdown(),_.sceneUpdate=u,_.start(x);else if(_.sceneUpdate=u,_.start(x),_.load&&(A=_.load),A&&_.settings.hasOwnProperty("pack")&&(A.reset(),A.addPack({payload:_.settings.pack})))return _.settings.status=T.LOADING,A.once(c.COMPLETE,this.payloadComplete,this),A.start(),this;return this.bootScene(y),this},stop:function(v,x){var y=this.getScene(v);if(y&&!y.sys.isTransitioning()&&y.sys.settings.status!==T.SHUTDOWN){var _=y.sys.load;_&&(_.off(c.COMPLETE,this.loadComplete,this),_.off(c.COMPLETE,this.payloadComplete,this)),y.sys.shutdown(x)}return this},switch:function(v,x,y){var _=this.getScene(v),E=this.getScene(x);return _&&E&&_!==E&&(this.sleep(v),this.isSleeping(x)?this.wake(x,y):this.start(x,y)),this},getAt:function(v){return this.scenes[v]},getIndex:function(v){var x=this.getScene(v);return this.scenes.indexOf(x)},bringToTop:function(v){if(this.isProcessing)return this.queueOp("bringToTop",v);var x=this.getIndex(v),y=this.scenes;if(-1!==x&&x0){var y=this.getScene(v);this.scenes.splice(x,1),this.scenes.unshift(y)}return this},moveDown:function(v){if(this.isProcessing)return this.queueOp("moveDown",v);var x=this.getIndex(v);if(x>0){var y=x-1,_=this.getScene(v),E=this.getAt(y);this.scenes[x]=E,this.scenes[y]=_}return this},moveUp:function(v){if(this.isProcessing)return this.queueOp("moveUp",v);var x=this.getIndex(v);if(xy),0,E)}return this},moveBelow:function(v,x){if(v===x)return this;if(this.isProcessing)return this.queueOp("moveBelow",v,x);var y=this.getIndex(v),_=this.getIndex(x);if(-1!==y&&-1!==_&&_>y){var E=this.getAt(_);this.scenes.splice(_,1),0===y?this.scenes.unshift(E):this.scenes.splice(y-(_{var b=a(45319),T=a(83419),g=a(44594),f=a(95540),h=a(37277),c=new T({initialize:function(m){this.scene=m,this.systems=m.sys,this.settings=m.sys.settings,this.key=m.sys.settings.key,this.manager=m.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._willSleep=!1,this._willRemove=!1,m.sys.events.once(g.BOOT,this.boot,this),m.sys.events.on(g.START,this.pluginStart,this)},boot:function(){this.systems.events.once(g.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(g.SHUTDOWN,this.shutdown,this)},start:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",u,m),this},restart:function(u){var m=this.key;return this.manager.queueOp("stop",m),this.manager.queueOp("start",m,u),this},transition:function(u){void 0===u&&(u={});var m=f(u,"target",!1),d=this.manager.getScene(m);if(!m||!this.checkValidTransition(d))return!1;var p=f(u,"duration",1e3);this._elapsed=0,this._target=d,this._duration=p,this._willSleep=f(u,"sleep",!1),this._willRemove=f(u,"remove",!1);var v=f(u,"onUpdate",null);v&&(this._onUpdate=v,this._onUpdateScope=f(u,"onUpdateScope",this.scene));var x=f(u,"allowInput",!1);this.settings.transitionAllowInput=x;var y=d.sys.settings;y.isTransition=!0,y.transitionFrom=this.scene,y.transitionDuration=p,y.transitionAllowInput=x,f(u,"moveAbove",!1)?this.manager.moveAbove(this.key,m):f(u,"moveBelow",!1)&&this.manager.moveBelow(this.key,m),d.sys.isSleeping()?d.sys.wake(f(u,"data")):this.manager.start(m,f(u,"data"));var _=f(u,"onStart",null),E=f(u,"onStartScope",this.scene);return _&&_.call(E,this.scene,d,p),this.systems.events.emit(g.TRANSITION_OUT,d,p),!0},checkValidTransition:function(u){return!(!u||u.sys.isActive()||u.sys.isTransitioning()||u===this.scene||this.systems.isTransitioning())},step:function(u,m){this._elapsed+=m,this.transitionProgress=b(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var m=this._target.sys.settings;this._target.sys.events.emit(g.TRANSITION_COMPLETE,this.scene),m.isTransition=!1,m.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(u,m,d,p){return this.manager.add(u,m,d,p)},launch:function(u,m){return u&&u!==this.key&&this.manager.queueOp("start",u,m),this},run:function(u,m){return u&&u!==this.key&&this.manager.queueOp("run",u,m),this},pause:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("pause",u,m),this},resume:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("resume",u,m),this},sleep:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("sleep",u,m),this},wake:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("wake",u,m),this},switch:function(u,m){return u!==this.key&&this.manager.queueOp("switch",this.key,u,m),this},stop:function(u,m){return void 0===u&&(u=this.key),this.manager.queueOp("stop",u,m),this},setActive:function(u,m,d){void 0===m&&(m=this.key);var p=this.manager.getScene(m);return p&&p.sys.setActive(u,d),this},setVisible:function(u,m){void 0===m&&(m=this.key);var d=this.manager.getScene(m);return d&&d.sys.setVisible(u),this},isSleeping:function(u){return void 0===u&&(u=this.key),this.manager.isSleeping(u)},isActive:function(u){return void 0===u&&(u=this.key),this.manager.isActive(u)},isPaused:function(u){return void 0===u&&(u=this.key),this.manager.isPaused(u)},isVisible:function(u){return void 0===u&&(u=this.key),this.manager.isVisible(u)},swapPosition:function(u,m){return void 0===m&&(m=this.key),u!==m&&this.manager.swapPosition(u,m),this},moveAbove:function(u,m){return void 0===m&&(m=this.key),u!==m&&this.manager.moveAbove(u,m),this},moveBelow:function(u,m){return void 0===m&&(m=this.key),u!==m&&this.manager.moveBelow(u,m),this},remove:function(u){return void 0===u&&(u=this.key),this.manager.remove(u),this},moveUp:function(u){return void 0===u&&(u=this.key),this.manager.moveUp(u),this},moveDown:function(u){return void 0===u&&(u=this.key),this.manager.moveDown(u),this},bringToTop:function(u){return void 0===u&&(u=this.key),this.manager.bringToTop(u),this},sendToBack:function(u){return void 0===u&&(u=this.key),this.manager.sendToBack(u),this},get:function(u){return this.manager.getScene(u)},getStatus:function(u){var m=this.manager.getScene(u);if(m)return m.sys.getStatus()},getIndex:function(u){return void 0===u&&(u=this.key),this.manager.getIndex(u)},shutdown:function(){var u=this.systems.events;u.off(g.SHUTDOWN,this.shutdown,this),u.off(g.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(g.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});h.register("ScenePlugin",c,"scenePlugin"),S.exports=c},55681:(S,k,a)=>{var b=a(89993),T=a(35154),g=a(46975),f=a(87033);S.exports={create:function(c){return"string"==typeof c?c={key:c}:void 0===c&&(c={}),{status:b.PENDING,key:T(c,"key",""),active:T(c,"active",!1),visible:T(c,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:T(c,"pack",!1),cameras:T(c,"cameras",null),map:T(c,"map",g(f,T(c,"mapAdd",{}))),physics:T(c,"physics",{}),loader:T(c,"loader",{}),plugins:T(c,"plugins",!1),input:T(c,"input",{})}}}},2368:(S,k,a)=>{var b=a(83419),T=a(89993),g=a(42363),f=a(44594),h=a(27397),c=a(52106),u=a(29747),m=a(55681),d=new b({initialize:function(v,x){this.scene=v,this.config=x,this.settings=m.create(x),this.sceneUpdate=u},init:function(p){this.settings.status=T.INIT,this.sceneUpdate=u,this.game=p,this.renderer=p.renderer,this.canvas=p.canvas,this.context=p.context;var v=p.plugins;this.plugins=v,v.addToScene(this,g.Global,[g.CoreScene,c(this),h(this)]),this.events.emit(f.BOOT,this),this.settings.isBooted=!0},step:function(p,v){var x=this.events;x.emit(f.PRE_UPDATE,p,v),x.emit(f.UPDATE,p,v),this.sceneUpdate.call(this.scene,p,v),x.emit(f.POST_UPDATE,p,v)},render:function(p){var v=this.displayList;v.depthSort(),this.events.emit(f.PRE_RENDER,p),this.cameras.render(p,v),this.events.emit(f.RENDER,p)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(p){var v=this.settings,x=this.getStatus();return x!==T.CREATING&&x!==T.RUNNING?console.warn("Cannot pause non-running Scene",v.key):this.settings.active&&(v.status=T.PAUSED,v.active=!1,this.events.emit(f.PAUSE,this,p)),this},resume:function(p){var v=this.events,x=this.settings;return this.settings.active||(x.status=T.RUNNING,x.active=!0,v.emit(f.RESUME,this,p)),this},sleep:function(p){var v=this.settings,x=this.getStatus();return x!==T.CREATING&&x!==T.RUNNING?console.warn("Cannot sleep non-running Scene",v.key):(v.status=T.SLEEPING,v.active=!1,v.visible=!1,this.events.emit(f.SLEEP,this,p)),this},wake:function(p){var v=this.events,x=this.settings;return x.status=T.RUNNING,x.active=!0,x.visible=!0,v.emit(f.WAKE,this,p),x.isTransition&&v.emit(f.TRANSITION_WAKE,x.transitionFrom,x.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var p=this.settings.status;return p>T.PENDING&&p<=T.RUNNING},isSleeping:function(){return this.settings.status===T.SLEEPING},isActive:function(){return this.settings.status===T.RUNNING},isPaused:function(){return this.settings.status===T.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(p){return this.settings.visible=p,this},setActive:function(p,v){return p?this.resume(v):this.pause(v)},start:function(p){var v=this.events,x=this.settings;p&&(x.data=p),x.status=T.START,x.active=!0,x.visible=!0,v.emit(f.START,this),v.emit(f.READY,this,p)},shutdown:function(p){var v=this.events,x=this.settings;v.off(f.TRANSITION_INIT),v.off(f.TRANSITION_START),v.off(f.TRANSITION_COMPLETE),v.off(f.TRANSITION_OUT),x.status=T.SHUTDOWN,x.active=!1,x.visible=!1,v.emit(f.SHUTDOWN,this,p)},destroy:function(){var p=this.events,v=this.settings;v.status=T.DESTROYED,v.active=!1,v.visible=!1,p.emit(f.DESTROY,this),p.removeAllListeners();for(var x=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],y=0;y{S.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},69830:S=>{S.exports="addedtoscene"},7919:S=>{S.exports="boot"},46763:S=>{S.exports="create"},11763:S=>{S.exports="destroy"},71555:S=>{S.exports="pause"},36735:S=>{S.exports="postupdate"},3809:S=>{S.exports="prerender"},90716:S=>{S.exports="preupdate"},58262:S=>{S.exports="ready"},91633:S=>{S.exports="removedfromscene"},10319:S=>{S.exports="render"},87132:S=>{S.exports="resume"},81961:S=>{S.exports="shutdown"},90194:S=>{S.exports="sleep"},6265:S=>{S.exports="start"},33178:S=>{S.exports="transitioncomplete"},43063:S=>{S.exports="transitioninit"},11259:S=>{S.exports="transitionout"},61611:S=>{S.exports="transitionstart"},45209:S=>{S.exports="transitionwake"},22966:S=>{S.exports="update"},21747:S=>{S.exports="wake"},44594:(S,k,a)=>{S.exports={ADDED_TO_SCENE:a(69830),BOOT:a(7919),CREATE:a(46763),DESTROY:a(11763),PAUSE:a(71555),POST_UPDATE:a(36735),PRE_RENDER:a(3809),PRE_UPDATE:a(90716),READY:a(58262),REMOVED_FROM_SCENE:a(91633),RENDER:a(10319),RESUME:a(87132),SHUTDOWN:a(81961),SLEEP:a(90194),START:a(6265),TRANSITION_COMPLETE:a(33178),TRANSITION_INIT:a(43063),TRANSITION_OUT:a(11259),TRANSITION_START:a(61611),TRANSITION_WAKE:a(45209),UPDATE:a(22966),WAKE:a(21747)}},62194:(S,k,a)=>{var b=a(89993),T=a(79291),g={Events:a(44594),GetPhysicsPlugins:a(27397),GetScenePlugins:a(52106),SceneManager:a(60903),ScenePlugin:a(52209),Settings:a(55681),Systems:a(2368)};g=T(!1,g,b),S.exports=g},30341:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(14463),f=a(79291),h=a(29747),c=new b({Extends:T,initialize:function(m,d,p){T.call(this),this.manager=m,this.key=d,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=f(this.config,p),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(u){return!(!u||!u.name||"string"!=typeof u.name||(this.markers[u.name]?(console.error("addMarker "+u.name+" already exists in Sound"),1):(u=f(!0,{name:"",start:0,duration:this.totalDuration-(u.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},u),this.markers[u.name]=u,0)))},updateMarker:function(u){return!(!u||!u.name||"string"!=typeof u.name||(this.markers[u.name]?(this.markers[u.name]=f(!0,this.markers[u.name],u),0):(console.warn("Audio Marker: "+u.name+" missing in Sound: "+this.key),1)))},removeMarker:function(u){var m=this.markers[u];return m?(this.markers[u]=null,m):null},play:function(u,m){if(void 0===u&&(u=""),"object"==typeof u&&(m=u,u=""),"string"!=typeof u)return!1;if(u){if(!this.markers[u])return console.warn("Marker: "+u+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[u],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=f(this.currentConfig,m),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying||(this.isPlaying=!1,this.isPaused=!0,0))},resume:function(){return!(!this.isPaused||this.isPlaying||(this.isPlaying=!0,this.isPaused=!1,0))},stop:function(){return!(!this.isPaused&&!this.isPlaying||(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),0))},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:h,calculateRate:function(){var d=Math.pow(1.0005777895065548,this.currentConfig.detune+this.manager.detune);this.totalRate=this.currentConfig.rate*this.manager.rate*d},destroy:function(){this.pendingRemove||(this.stop(),this.emit(g.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});S.exports=c},85034:(S,k,a)=>{var b=a(83419),T=a(41786),g=a(50792),f=a(14463),h=a(8443),c=a(46710),u=a(58731),m=a(29747),d=a(26099),p=new b({Extends:g,initialize:function(x){g.call(this),this.game=x,this.jsonCache=x.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,this.gameLostFocus=!1,this.listenerPosition=new d,x.events.on(h.BLUR,this.onGameBlur,this),x.events.on(h.FOCUS,this.onGameFocus,this),x.events.on(h.PRE_STEP,this.update,this),x.events.once(h.DESTROY,this.destroy,this)},add:m,addAudioSprite:function(v,x){void 0===x&&(x={});var y=this.add(v,x);for(var _ in y.spritemap=this.jsonCache.get(v).spritemap,y.spritemap)if(y.spritemap.hasOwnProperty(_)){var E=T(x),A=y.spritemap[_];E.loop=!!A.hasOwnProperty("loop")&&A.loop,y.addMarker({name:_,start:A.start,duration:A.end-A.start,config:E})}return y},get:function(v){return u(this.sounds,"key",v)},getAll:function(v){return v?c(this.sounds,"key",v):c(this.sounds)},getAllPlaying:function(){return c(this.sounds,"isPlaying",!0)},play:function(v,x){var y=this.add(v);return y.once(f.COMPLETE,y.destroy,y),x?x.name?(y.addMarker(x),y.play(x.name)):y.play(x):y.play()},playAudioSprite:function(v,x,y){var _=this.addAudioSprite(v);return _.once(f.COMPLETE,_.destroy,_),_.play(x,y)},remove:function(v){var x=this.sounds.indexOf(v);return-1!==x&&(v.destroy(),this.sounds.splice(x,1),!0)},removeAll:function(){this.sounds.forEach(function(v){v.destroy()}),this.sounds.length=0},removeByKey:function(v){for(var x=0,y=this.sounds.length-1;y>=0;y--){var _=this.sounds[y];_.key===v&&(_.destroy(),this.sounds.splice(y,1),x++)}return x},pauseAll:function(){this.forEachActiveSound(function(v){v.pause()}),this.emit(f.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound(function(v){v.resume()}),this.emit(f.RESUME_ALL,this)},setListenerPosition:m,stopAll:function(){this.forEachActiveSound(function(v){v.stop()}),this.emit(f.STOP_ALL,this)},stopByKey:function(v){var x=0;return this.getAll(v).forEach(function(y){y.stop()&&x++}),x},isPlaying:function(v){var _,y=this.sounds.length-1;if(void 0===v){for(;y>=0;y--)if((_=this.sounds[y]).isPlaying)return!0}else for(;y>=0;y--)if((_=this.sounds[y]).key===v&&_.isPlaying)return!0;return!1},unlock:m,onBlur:m,onFocus:m,onGameBlur:function(){this.gameLostFocus=!0,this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.gameLostFocus=!1,this.pauseOnBlur&&this.onFocus()},update:function(v,x){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(f.UNLOCKED,this));for(var y=this.sounds.length-1;y>=0;y--)this.sounds[y].pendingRemove&&this.sounds.splice(y,1);this.sounds.forEach(function(_){_.update(v,x)})},destroy:function(){this.game.events.off(h.BLUR,this.onGameBlur,this),this.game.events.off(h.FOCUS,this.onGameFocus,this),this.game.events.off(h.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.listenerPosition=null,this.game=null},forEachActiveSound:function(v,x){var y=this;this.sounds.forEach(function(_,E){_&&!_.pendingRemove&&v.call(x||y,_,E,y.sounds)})},setRate:function(v){return this.rate=v,this},rate:{get:function(){return this._rate},set:function(v){this._rate=v,this.forEachActiveSound(function(x){x.calculateRate()}),this.emit(f.GLOBAL_RATE,this,v)}},setDetune:function(v){return this.detune=v,this},detune:{get:function(){return this._detune},set:function(v){this._detune=v,this.forEachActiveSound(function(x){x.calculateRate()}),this.emit(f.GLOBAL_DETUNE,this,v)}}});S.exports=p},14747:(S,k,a)=>{var b=a(33684),T=a(25960),g=a(57490);S.exports={create:function(h){var c=h.config.audio,u=h.device.audio;return c.noAudio||!u.webAudio&&!u.audioData?new T(h):u.webAudio&&!c.disableWebAudio?new g(h):new b(h)}}},19723:S=>{S.exports="complete"},98882:S=>{S.exports="decodedall"},57506:S=>{S.exports="decoded"},73146:S=>{S.exports="destroy"},11305:S=>{S.exports="detune"},40577:S=>{S.exports="detune"},30333:S=>{S.exports="mute"},20394:S=>{S.exports="rate"},21802:S=>{S.exports="volume"},1299:S=>{S.exports="looped"},99190:S=>{S.exports="loop"},97125:S=>{S.exports="mute"},89259:S=>{S.exports="pan"},79986:S=>{S.exports="pauseall"},17586:S=>{S.exports="pause"},19618:S=>{S.exports="play"},42306:S=>{S.exports="rate"},10387:S=>{S.exports="resumeall"},48959:S=>{S.exports="resume"},9960:S=>{S.exports="seek"},19180:S=>{S.exports="stopall"},98328:S=>{S.exports="stop"},50401:S=>{S.exports="unlocked"},52498:S=>{S.exports="volume"},14463:(S,k,a)=>{S.exports={COMPLETE:a(19723),DECODED:a(57506),DECODED_ALL:a(98882),DESTROY:a(73146),DETUNE:a(11305),GLOBAL_DETUNE:a(40577),GLOBAL_MUTE:a(30333),GLOBAL_RATE:a(20394),GLOBAL_VOLUME:a(21802),LOOP:a(99190),LOOPED:a(1299),MUTE:a(97125),PAN:a(89259),PAUSE_ALL:a(79986),PAUSE:a(17586),PLAY:a(19618),RATE:a(42306),RESUME_ALL:a(10387),RESUME:a(48959),SEEK:a(9960),STOP_ALL:a(19180),STOP:a(98328),UNLOCKED:a(50401),VOLUME:a(52498)}},64895:(S,k,a)=>{var b=a(30341),T=a(83419),g=a(14463),f=a(45319),h=new T({Extends:b,initialize:function(u,m,d){if(void 0===d&&(d={}),this.tags=u.game.cache.audio.get(m),!this.tags)throw new Error('No cached audio asset with key "'+m);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,b.call(this,u,m,d)},play:function(c,u){return!(this.manager.isLocked(this,"play",[c,u])||!b.prototype.play.call(this,c,u)||!this.pickAndPlayAudioTag()||(this.emit(g.PLAY,this),0))},pause:function(){return!(this.manager.isLocked(this,"pause")||this.startTime>0||!b.prototype.pause.call(this)||(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(g.PAUSE,this),0))},resume:function(){return!(this.manager.isLocked(this,"resume")||this.startTime>0||!b.prototype.resume.call(this)||!this.pickAndPlayAudioTag()||(this.emit(g.RESUME,this),0))},stop:function(){return!(this.manager.isLocked(this,"stop")||!b.prototype.stop.call(this)||(this.stopAndReleaseAudioTag(),this.emit(g.STOP,this),0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var u=this.currentConfig.delay,m=(this.currentMarker?this.currentMarker.start:0)+this.currentConfig.seek;return this.previousTime=m,this.audio.currentTime=m,this.applyConfig(),0===u?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*u,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var c=0;c0)return void(this.startTime=m-this.manager.loopEndOffset?(this.audio.currentTime=u+Math.max(0,d-m),d=this.audio.currentTime):d=m)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(g.COMPLETE,this);this.previousTime=d}},destroy:function(){b.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=f(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){b.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(c){this.currentConfig.mute=c,!this.manager.isLocked(this,"mute",c)&&(this.updateMute(),this.emit(g.MUTE,this,c))}},setMute:function(c){return this.mute=c,this},volume:{get:function(){return this.currentConfig.volume},set:function(c){this.currentConfig.volume=c,!this.manager.isLocked(this,"volume",c)&&(this.updateVolume(),this.emit(g.VOLUME,this,c))}},setVolume:function(c){return this.volume=c,this},rate:{get:function(){return this.currentConfig.rate},set:function(c){this.currentConfig.rate=c,!this.manager.isLocked(this,g.RATE,c)&&(this.calculateRate(),this.emit(g.RATE,this,c))}},setRate:function(c){return this.rate=c,this},detune:{get:function(){return this.currentConfig.detune},set:function(c){this.currentConfig.detune=c,!this.manager.isLocked(this,g.DETUNE,c)&&(this.calculateRate(),this.emit(g.DETUNE,this,c))}},setDetune:function(c){return this.detune=c,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(c){this.manager.isLocked(this,"seek",c)||this.startTime>0||(this.isPlaying||this.isPaused)&&(c=Math.min(Math.max(0,c),this.duration),this.isPlaying?(this.previousTime=c,this.audio.currentTime=c):this.isPaused&&(this.currentConfig.seek=c),this.emit(g.SEEK,this,c))}},setSeek:function(c){return this.seek=c,this},loop:{get:function(){return this.currentConfig.loop},set:function(c){this.currentConfig.loop=c,!this.manager.isLocked(this,"loop",c)&&(this.audio&&(this.audio.loop=c),this.emit(g.LOOP,this,c))}},setLoop:function(c){return this.loop=c,this},pan:{get:function(){return this.currentConfig.pan},set:function(c){this.currentConfig.pan=c,this.emit(g.PAN,this,c)}},setPan:function(c){return this.pan=c,this}});S.exports=h},33684:(S,k,a)=>{var b=a(85034),T=a(83419),g=a(14463),f=a(64895),h=new T({Extends:b,initialize:function(u){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,b.call(this,u)},add:function(c,u){var m=new f(this,c,u);return this.sounds.push(m),m},unlock:function(){this.locked=!1;var c=this;if(this.game.cache.audio.entries.each(function(p,v){for(var x=0;x{S.exports={SoundManagerCreator:a(14747),Events:a(14463),BaseSound:a(30341),BaseSoundManager:a(85034),WebAudioSound:a(71741),WebAudioSoundManager:a(57490),HTML5AudioSound:a(64895),HTML5AudioSoundManager:a(33684),NoAudioSound:a(4603),NoAudioSoundManager:a(25960)}},4603:(S,k,a)=>{var b=a(30341),T=a(83419),g=a(50792),f=a(79291),h=a(29747),c=function(){return!1},u=function(){return null},m=function(){return this},d=new T({Extends:g,initialize:function(v,x,y){void 0===y&&(y={}),g.call(this),this.manager=v,this.key=x,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=f({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},y),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:c,updateMarker:c,removeMarker:u,play:c,pause:c,resume:c,stop:c,setMute:m,setVolume:m,setRate:m,setDetune:m,setSeek:m,setLoop:m,setPan:m,applyConfig:u,resetConfig:u,update:h,calculateRate:u,destroy:function(){b.prototype.destroy.call(this)}});S.exports=d},25960:(S,k,a)=>{var b=a(85034),T=a(83419),g=a(50792),f=a(4603),h=a(29747),c=new T({Extends:g,initialize:function(m){g.call(this),this.game=m,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(u,m){var d=new f(this,u,m);return this.sounds.push(d),d},addAudioSprite:function(u,m){var d=this.add(u,m);return d.spritemap={},d},get:function(u){return b.prototype.get.call(this,u)},getAll:function(u){return b.prototype.getAll.call(this,u)},play:function(u,m){return!1},playAudioSprite:function(u,m,d){return!1},remove:function(u){return b.prototype.remove.call(this,u)},removeAll:function(){return b.prototype.removeAll.call(this)},removeByKey:function(u){return b.prototype.removeByKey.call(this,u)},stopByKey:function(u){return b.prototype.stopByKey.call(this,u)},onBlur:h,onFocus:h,onGameBlur:h,onGameFocus:h,pauseAll:h,resumeAll:h,stopAll:h,update:h,setRate:h,setDetune:h,setMute:h,setVolume:h,unlock:h,forEachActiveSound:function(u,m){b.prototype.forEachActiveSound.call(this,u,m)},destroy:function(){b.prototype.destroy.call(this)}});S.exports=c},71741:(S,k,a)=>{var b=a(30341),T=a(83419),g=a(14463),f=a(95540),h=new T({Extends:b,initialize:function(u,m,d){if(void 0===d&&(d={}),this.audioBuffer=u.game.cache.audio.get(m),!this.audioBuffer)throw new Error('Audio key "'+m+'" not found in cache');this.source=null,this.loopSource=null,this.muteNode=u.context.createGain(),this.volumeNode=u.context.createGain(),this.pannerNode=null,this.spatialNode=null,this.spatialSource=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),u.context.createPanner&&(this.spatialNode=u.context.createPanner(),this.volumeNode.connect(this.spatialNode)),u.context.createStereoPanner?(this.pannerNode=u.context.createStereoPanner(),u.context.createPanner?this.spatialNode.connect(this.pannerNode):this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(u.destination)):u.context.createPanner?this.spatialNode.connect(u.destination):this.volumeNode.connect(u.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,b.call(this,u,m,d)},play:function(c,u){return!!b.prototype.play.call(this,c,u)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(g.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var b=a(53134),T=a(85034),g=a(83419),f=a(14463),h=a(8443),c=a(71741),u=a(95540),m=new g({Extends:T,initialize:function(p){this.context=this.createAudioContext(p),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),T.call(this,p),this.locked&&p.isBooted?this.unlock():p.events.once(h.BOOT,this.unlock,this)},createAudioContext:function(d){var p=d.config.audio;return p.context?(p.context.resume(),p.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(d){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=d,this.masterMuteNode=d.createGain(),this.masterVolumeNode=d.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(d.destination),this.destination=this.masterMuteNode,this},add:function(d,p){var v=new c(this,d,p);return this.sounds.push(v),v},decodeAudio:function(d,p){var v;v=Array.isArray(d)?d:[{key:d,data:p}];for(var x=this.game.cache.audio,y=v.length,_=0;_{var b=a(37105),T=a(83419),g=a(29747),f=a(19186),h=new T({initialize:function(u){this.parent=u,this.list=[],this.position=0,this.addCallback=g,this.removeCallback=g,this._sortKey=""},add:function(c,u){return u?b.Add(this.list,c):b.Add(this.list,c,0,this.addCallback,this)},addAt:function(c,u,m){return m?b.AddAt(this.list,c,u):b.AddAt(this.list,c,u,0,this.addCallback,this)},getAt:function(c){return this.list[c]},getIndex:function(c){return this.list.indexOf(c)},sort:function(c,u){return c?(void 0===u&&(u=function(m,d){return m[c]-d[c]}),f(this.list,u),this):this},getByName:function(c){return b.GetFirst(this.list,"name",c)},getRandom:function(c,u){return b.GetRandom(this.list,c,u)},getFirst:function(c,u,m,d){return b.GetFirst(this.list,c,u,m,d)},getAll:function(c,u,m,d){return b.GetAll(this.list,c,u,m,d)},count:function(c,u){return b.CountAllMatching(this.list,c,u)},swap:function(c,u){b.Swap(this.list,c,u)},moveTo:function(c,u){return b.MoveTo(this.list,c,u)},moveAbove:function(c,u){return b.MoveAbove(this.list,c,u)},moveBelow:function(c,u){return b.MoveBelow(this.list,c,u)},remove:function(c,u){return u?b.Remove(this.list,c):b.Remove(this.list,c,this.removeCallback,this)},removeAt:function(c,u){return u?b.RemoveAt(this.list,c):b.RemoveAt(this.list,c,this.removeCallback,this)},removeBetween:function(c,u,m){return m?b.RemoveBetween(this.list,c,u):b.RemoveBetween(this.list,c,u,this.removeCallback,this)},removeAll:function(c){for(var u=this.list.length;u--;)this.remove(this.list[u],c);return this},bringToTop:function(c){return b.BringToTop(this.list,c)},sendToBack:function(c){return b.SendToBack(this.list,c)},moveUp:function(c){return b.MoveUp(this.list,c),c},moveDown:function(c){return b.MoveDown(this.list,c),c},reverse:function(){return this.list.reverse(),this},shuffle:function(){return b.Shuffle(this.list),this},replace:function(c,u){return b.Replace(this.list,c,u)},exists:function(c){return this.list.indexOf(c)>-1},setAll:function(c,u,m,d){return b.SetAll(this.list,c,u,m,d),this},each:function(c,u){for(var m=[null],d=2;d0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});S.exports=h},90330:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){this.entries={},this.size=0,this.setAll(f)},setAll:function(g){if(Array.isArray(g))for(var f=0;f{var b=a(83419),T=a(50792),g=a(82348),f=new b({Extends:T,initialize:function(){T.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(h){return this._active.indexOf(h)>-1},isPending:function(h){return this._toProcess>0&&this._pending.indexOf(h)>-1},isDestroying:function(h){return this._destroy.indexOf(h)>-1},add:function(h){return this.checkQueue&&this.isActive(h)&&!this.isDestroying(h)||this.isPending(h)||(this._pending.push(h),this._toProcess++),h},remove:function(h){if(this.isPending(h)){var c=this._pending,u=c.indexOf(h);-1!==u&&c.splice(u,1)}else this.isActive(h)&&(this._destroy.push(h),this._toProcess++);return h},removeAll:function(){for(var h=this._active,c=this._destroy,u=h.length;u--;)c.push(h[u]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var u,m,h=this._destroy,c=this._active;for(u=0;u{var b=a(43886);function T(D){if(!(this instanceof T))return new T(D,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,D||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function g(D,I,R){if(!R)return I.indexOf(D);for(var F=0;F=D.minX&&I.maxY>=D.minY}function E(D){return{children:D,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function A(D,I,R,F,N){for(var B,V=[I,R];V.length;)!((R=V.pop())-(I=V.pop())<=F)&&(B=I+Math.ceil((R-I)/F/2)*F,b(D,B,I,R,N),V.push(I,B,B,R))}T.prototype={all:function(){return this._all(this.data,[])},search:function(D){var I=this.data,R=[],F=this.toBBox;if(!_(D,I))return R;for(var V,B,H,Q,N=[];I;){for(V=0,B=I.children.length;V=0&&V[I].children.length>this._maxEntries;)this._split(V,I),I--;this._adjustParentBBoxes(N,V,I)},_split:function(D,I){var R=D[I],F=R.children.length,N=this._minEntries;this._chooseSplitAxis(R,N,F);var V=this._chooseSplitIndex(R,N,F),B=E(R.children.splice(V,R.children.length-V));B.height=R.height,B.leaf=R.leaf,f(R,this.toBBox),f(B,this.toBBox),I?D[I-1].children.push(B):this._splitRoot(R,B)},_splitRoot:function(D,I){this.data=E([D,I]),this.data.height=D.height+1,this.data.leaf=!1,f(this.data,this.toBBox)},_chooseSplitIndex:function(D,I,R){var F,N,V,B,H,Q,G,K;for(Q=G=1/0,F=I;F<=R-I;F++)B=x(N=h(D,0,F,this.toBBox),V=h(D,F,R,this.toBBox)),H=d(N)+d(V),B=I;Q--)G=D.children[Q],c(B,D.leaf?N(G):G),H+=p(B);return H},_adjustParentBBoxes:function(D,I,R){for(var F=R;F>=0;F--)c(I[F],D)},_condense:function(D){for(var R,I=D.length-1;I>=0;I--)0===D[I].children.length?I>0?(R=D[I-1].children).splice(R.indexOf(D[I]),1):this.clear():f(D[I],this.toBBox)},compareMinX:function(D,I){return D.left-I.left},compareMinY:function(D,I){return D.top-I.top},toBBox:function(D){return{minX:D.left,minY:D.top,maxX:D.right,maxY:D.bottom}}},S.exports=T},35072:(S,k,a)=>{var T=new(a(83419))({initialize:function(f){if(this.entries=[],Array.isArray(f))for(var h=0;h-1&&this.entries.splice(f,1),this},dump:function(){console.group("Set");for(var g=0;g-1},union:function(g){var f=new T;return g.entries.forEach(function(h){f.set(h)}),this.entries.forEach(function(h){f.set(h)}),f},intersect:function(g){var f=new T;return this.entries.forEach(function(h){g.contains(h)&&f.set(h)}),f},difference:function(g){var f=new T;return this.entries.forEach(function(h){g.contains(h)||f.set(h)}),f},size:{get:function(){return this.entries.length},set:function(g){return g{var b=a(45319),T=a(83419),g=a(56583),f=a(26099),h=new T({initialize:function(u,m,d,p){void 0===u&&(u=0),void 0===m&&(m=u),void 0===d&&(d=0),void 0===p&&(p=null),this._width=u,this._height=m,this._parent=p,this.aspectMode=d,this.aspectRatio=0===m?1:u/m,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new f},setAspectMode:function(c){return void 0===c&&(c=0),this.aspectMode=c,this.setSize(this._width,this._height)},setSnap:function(c,u){return void 0===c&&(c=0),void 0===u&&(u=c),this.snapTo.set(c,u),this.setSize(this._width,this._height)},setParent:function(c){return this._parent=c,this.setSize(this._width,this._height)},setMin:function(c,u){return void 0===c&&(c=0),void 0===u&&(u=c),this.minWidth=b(c,0,this.maxWidth),this.minHeight=b(u,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(c,u){return void 0===c&&(c=Number.MAX_VALUE),void 0===u&&(u=c),this.maxWidth=b(c,this.minWidth,Number.MAX_VALUE),this.maxHeight=b(u,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(c,u){switch(void 0===c&&(c=0),void 0===u&&(u=c),this.aspectMode){case h.NONE:this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(g(u,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case h.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case h.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(g(u,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case h.FIT:this.constrain(c,u,!0);break;case h.ENVELOP:this.constrain(c,u,!1)}return this},setAspectRatio:function(c){return this.aspectRatio=c,this.setSize(this._width,this._height)},resize:function(c,u){return this._width=this.getNewWidth(g(c,this.snapTo.x)),this._height=this.getNewHeight(g(u,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(c,u){return void 0===u&&(u=!0),c=b(c,this.minWidth,this.maxWidth),u&&this._parent&&c>this._parent.width&&(c=Math.max(this.minWidth,this._parent.width)),c},getNewHeight:function(c,u){return void 0===u&&(u=!0),c=b(c,this.minHeight,this.maxHeight),u&&this._parent&&c>this._parent.height&&(c=Math.max(this.minHeight,this._parent.height)),c},constrain:function(c,u,m){void 0===c&&(c=0),void 0===u&&(u=c),void 0===m&&(m=!0),c=this.getNewWidth(c),u=this.getNewHeight(u);var d=this.snapTo,p=0===u?1:c/u;return m&&this.aspectRatio>p||!m&&this.aspectRatio0&&(c=(u=g(u,d.y))*this.aspectRatio)):(m&&this.aspectRatiop)&&(c=(u=g(u,d.y))*this.aspectRatio,d.x>0&&(u=(c=g(c,d.x))*(1/this.aspectRatio))),this._width=c,this._height=u,this},fitTo:function(c,u){return this.constrain(c,u,!0)},envelop:function(c,u){return this.constrain(c,u,!1)},setWidth:function(c){return this.setSize(c,this._height)},setHeight:function(c){return this.setSize(this._width,c)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(c){c&&c.style&&(c.style.width=this._width+"px",c.style.height=this._height+"px")},copy:function(c){return c.setAspectMode(this.aspectMode),c.aspectRatio=this.aspectRatio,c.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(c){this.setSize(c,this._height)}},height:{get:function(){return this._height},set:function(c){this.setSize(this._width,c)}}});h.NONE=0,h.WIDTH_CONTROLS_HEIGHT=1,h.HEIGHT_CONTROLS_WIDTH=2,h.FIT=3,h.ENVELOP=4,S.exports=h},15238:S=>{S.exports="add"},56187:S=>{S.exports="remove"},82348:(S,k,a)=>{S.exports={PROCESS_QUEUE_ADD:a(15238),PROCESS_QUEUE_REMOVE:a(56187)}},41392:(S,k,a)=>{S.exports={Events:a(82348),List:a(73162),Map:a(90330),ProcessQueue:a(25774),RTree:a(59542),Set:a(35072),Size:a(86555)}},57382:(S,k,a)=>{var b=a(83419),T=a(45319),g=a(40987),f=a(8054),h=a(50030),c=a(79237),u=new b({Extends:c,initialize:function(d,p,v,x,y){c.call(this,d,p,v,x,y),this.add("__BASE",0,0,0,x,y),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=x,this.height=y,this.imageData=this.context.getImageData(0,0,x,y),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===f.WEBGL&&this.refresh(),this},draw:function(m,d,p,v){return void 0===v&&(v=!0),this.context.drawImage(p,m,d),v&&this.update(),this},drawFrame:function(m,d,p,v,x){void 0===p&&(p=0),void 0===v&&(v=0),void 0===x&&(x=!0);var y=this.manager.getFrame(m,d);if(y){var _=y.canvasData,E=y.cutWidth,A=y.cutHeight,D=y.source.resolution;this.context.drawImage(y.source.image,_.x,_.y,E,A,p,v,E/D,A/D),x&&this.update()}return this},setPixel:function(m,d,p,v,x,y){if(void 0===y&&(y=255),m=Math.abs(Math.floor(m)),d=Math.abs(Math.floor(d)),this.getIndex(m,d)>-1){var E=this.context.getImageData(m,d,1,1);E.data[0]=p,E.data[1]=v,E.data[2]=x,E.data[3]=y,this.context.putImageData(E,m,d)}return this},putData:function(m,d,p,v,x,y,_){return void 0===v&&(v=0),void 0===x&&(x=0),void 0===y&&(y=m.width),void 0===_&&(_=m.height),this.context.putImageData(m,d,p,v,x,y,_),this},getData:function(m,d,p,v){return m=T(Math.floor(m),0,this.width-1),d=T(Math.floor(d),0,this.height-1),p=T(p,1,this.width-m),v=T(v,1,this.height-d),this.context.getImageData(m,d,p,v)},getPixel:function(m,d,p){p||(p=new g);var v=this.getIndex(m,d);if(v>-1){var x=this.data;p.setTo(x[v+0],x[v+1],x[v+2],x[v+3])}return p},getPixels:function(m,d,p,v){void 0===m&&(m=0),void 0===d&&(d=0),void 0===p&&(p=this.width),void 0===v&&(v=p),m=Math.abs(Math.round(m)),d=Math.abs(Math.round(d));for(var x=T(m,0,this.width),y=T(m+p,0,this.width),_=T(d,0,this.height),E=T(d+v,0,this.height),A=new g,D=[],I=_;I{var b=a(10312),T=a(38058),g=a(27919),f=a(83419),h=a(8054),c=a(4327),u=a(95540),m=a(36060),d=a(32302),p=a(79237),v=a(70554),x=new f({Extends:p,initialize:function(_,E,A,D){void 0===A&&(A=256),void 0===D&&(D=256),this.type="DynamicTexture";var I=_.game.renderer,R=I&&I.type===h.CANVAS,F=R?g.create2D(this,A,D):[this];p.call(this,_,E,F,A,D),this.add("__BASE",0,0,0,A,D),this.renderer=I,this.width=-1,this.height=-1,this.isDrawing=!1,this.canvas=R?F:null,this.context=R?F.getContext("2d",{willReadFrequently:!0}):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new T(0,0,A,D).setScene(_.game.scene.systemScene,!1),this.renderTarget=R?null:new d(I,A,D,1,0,!1,!1,!0,!1),this.pipeline=R?null:I.pipelines.get(m.SINGLE_PIPELINE),this.setSize(A,D)},setSize:function(y,_){void 0===_&&(_=y);var E=this.get(),A=E.source;if(y!==this.width||_!==this.height){this.canvas&&(this.canvas.width=y,this.canvas.height=_);var D=this.renderTarget;D&&(D.willResize(y,_)&&D.resize(y,_),D.texture!==A.glTexture&&this.renderer.deleteTexture(A.glTexture),this.setFromRenderTarget()),this.camera.setSize(y,_),A.width=y,A.height=_,E.setSize(y,_),this.width=y,this.height=_}else{var I=this.getSourceImage();E.cutX+y>I.width&&(y=I.width-E.cutX),E.cutY+_>I.height&&(_=I.height-E.cutY),E.setSize(y,_,E.cutX,E.cutY)}return this},setFromRenderTarget:function(){var _=this.get().source,E=this.renderTarget;return _.isRenderTexture=!0,_.isGLTexture=!0,_.glTexture=E.texture,this},setIsSpriteTexture:function(y){return this.isSpriteTexture=y,this},fill:function(y,_,E,A,D,I){var F=this.renderer;void 0===_&&(_=1),void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=this.width),void 0===I&&(I=this.height);var N=y>>16&255,V=y>>8&255,B=255&y,H=this.renderTarget;if(this.camera.preRender(),H){H.bind(!0);var Q=this.pipeline.manager.set(this.pipeline),G=F.width/H.width,K=F.height/H.height;Q.drawFillRect(E*G,(H.height-(A+I))*K,D*G,I*K,v.getTintFromFloats(B/255,V/255,N/255,1),_),H.unbind(!0)}else{var at=this.context;F.setContext(at),at.globalCompositeOperation="source-over",at.fillStyle="rgba("+N+","+V+","+B+","+_+")",at.fillRect(E,A,D,I),F.setContext()}return this.dirty=!0,this},clear:function(y,_,E,A){if(this.dirty){var D=this.context,I=this.renderTarget;I?I.clear(y,_,E,A):D&&(void 0!==y&&void 0!==_&&void 0!==E&&void 0!==A?D.clearRect(y,_,E,A):(D.save(),D.setTransform(1,0,0,1,0,0),D.clearRect(0,0,this.width,this.height),D.restore())),this.dirty=!1}return this},stamp:function(y,_,E,A,D){void 0===E&&(E=0),void 0===A&&(A=0);var I=u(D,"alpha",1),R=u(D,"tint",16777215),F=u(D,"angle",0),N=u(D,"rotation",0),V=u(D,"scale",1),B=u(D,"scaleX",V),H=u(D,"scaleY",V),Q=u(D,"originX",.5),G=u(D,"originY",.5),K=u(D,"blendMode",0),q=u(D,"erase",!1),at=u(D,"skipBatch",!1),ot=this.manager.resetStamp(I,R);return ot.setAngle(0),0!==F?ot.setAngle(F):0!==N&&ot.setRotation(N),ot.setScale(B,H),ot.setTexture(y,_),ot.setOrigin(Q,G),ot.setBlendMode(K),q&&(this._eraseMode=!0),at?this.batchGameObject(ot,E,A):this.draw(ot,E,A),q&&(this._eraseMode=!1),this},erase:function(y,_,E){return this._eraseMode=!0,this.draw(y,_,E),this._eraseMode=!1,this},draw:function(y,_,E,A,D){return this.beginDraw(),this.batchDraw(y,_,E,A,D),this.endDraw(),this},drawFrame:function(y,_,E,A,D,I){return this.beginDraw(),this.batchDrawFrame(y,_,E,A,D,I),this.endDraw(),this},repeat:function(y,_,E,A,D,I,R,F,N){if(void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=this.width),void 0===I&&(I=this.height),void 0===R&&(R=1),void 0===F&&(F=16777215),void 0===N&&(N=!1),!(_=y instanceof c?y:this.manager.getFrame(y,_)))return this;var V=this.manager.resetStamp(R,F);V.setFrame(_),V.setOrigin(0);var B=_.width,H=_.height;D=Math.floor(D),I=Math.floor(I);var Q=Math.ceil(D/B),G=Math.ceil(I/H),K=Q*B-D,q=G*H-I;K>0&&(K=B-K),q>0&&(q=H-q),E<0&&(Q+=Math.ceil(Math.abs(E)/B)),A<0&&(G+=Math.ceil(Math.abs(A)/H));var at=E,ot=A,J=!1,it=this.manager.stampCrop.setTo(0,0,B,H);N||this.beginDraw();for(var Y=0;Y0&&j===Q-1&&(J=!0,it.width=K),q>0&&Y===G-1&&(J=!0,it.height=q),J&&V.setCrop(it),this.batchGameObject(V,at,ot),V.isCropped=!1,it.setTo(0,0,B,H)),at+=B;at=E,ot+=H}return N||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var _=this.renderer,E=this.renderTarget;this.camera.preRender(),E?_.beginCapture(E.width,E.height):_.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(y,_,E,A,D){return Array.isArray(y)||(y=[y]),this.batchList(y,_,E,A,D),this},batchDrawFrame:function(y,_,E,A,D,I){void 0===E&&(E=0),void 0===A&&(A=0),void 0===D&&(D=1),void 0===I&&(I=16777215);var R=this.manager.getFrame(y,_);return R&&(this.renderTarget?this.pipeline.batchTextureFrame(R,E,A,I,D,this.camera.matrix,null):this.batchTextureFrame(R,E,A,D,I)),this},endDraw:function(y){if(void 0===y&&(y=this._eraseMode),this.isDrawing){var _=this.renderer,E=this.renderTarget;if(E){var A=_.endCapture();_.pipelines.setUtility().blitFrame(A,E,1,!1,!1,y,this.isSpriteTexture),_.resetScissor(),_.resetViewport()}else _.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(y,_,E,A,D){var I=y.length;if(0!==I)for(var R=0;R0&&N.height>0&&F.drawImage(V,N.x,N.y,N.width,N.height,_,E,N.width,N.height),F.restore()}},snapshotArea:function(y,_,E,A,D,I,R){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,D,!1,y,_,E,A,I,R):this.renderer.snapshotCanvas(this.canvas,D,!1,y,_,E,A,I,R),this},snapshot:function(y,_,E){return this.snapshotArea(0,0,this.width,this.height,y,_,E)},snapshotPixel:function(y,_,E){return this.snapshotArea(y,_,1,1,E,"pixel")},getWebGLTexture:function(){if(this.renderTarget)return this.renderTarget.texture},renderWebGL:function(y,_,E,A){var D=this.manager.resetStamp();D.setTexture(this),D.setOrigin(0),D.renderWebGL(y,D,E,A)},renderCanvas:function(){},destroy:function(){var y=this.manager.stamp;y&&y.texture===this&&this.manager.resetStamp(),p.prototype.destroy.call(this),g.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.canvas=null,this.context=null,this.renderer=null}});S.exports=x},4327:(S,k,a)=>{var b=a(83419),T=a(45319),g=a(79291),f=new b({initialize:function(c,u,m,d,p,v,x){this.texture=c,this.name=u,this.source=c.source[m],this.sourceIndex=m,this.x=0,this.y=0,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(v,x,d,p)},setCutPosition:function(h,c){return void 0===h&&(h=0),void 0===c&&(c=0),this.cutX=h,this.cutY=c,this.updateUVs()},setCutSize:function(h,c){return this.cutWidth=h,this.cutHeight=c,this.updateUVs()},setSize:function(h,c,u,m){void 0===u&&(u=0),void 0===m&&(m=0),this.setCutPosition(u,m),this.setCutSize(h,c),this.width=h,this.height=c,this.halfWidth=Math.floor(.5*h),this.halfHeight=Math.floor(.5*c),this.centerX=Math.floor(h/2),this.centerY=Math.floor(c/2);var d=this.data,p=d.cut;p.x=u,p.y=m,p.w=h,p.h=c,p.r=u+h,p.b=m+c,d.sourceSize.w=h,d.sourceSize.h=c,d.spriteSourceSize.w=h,d.spriteSourceSize.h=c,d.radius=.5*Math.sqrt(h*h+c*c);var v=d.drawImage;return v.x=u,v.y=m,v.width=h,v.height=c,this.updateUVs()},setTrim:function(h,c,u,m,d,p){var v=this.data,x=v.spriteSourceSize;return v.trim=!0,v.sourceSize.w=h,v.sourceSize.h=c,x.x=u,x.y=m,x.w=d,x.h=p,x.r=u+d,x.b=m+p,this.x=u,this.y=m,this.width=d,this.height=p,this.halfWidth=.5*d,this.halfHeight=.5*p,this.centerX=Math.floor(d/2),this.centerY=Math.floor(p/2),this.updateUVs()},setScale9:function(h,c,u,m){var d=this.data;return d.scale9=!0,d.is3Slice=0===c&&m===this.height,d.scale9Borders.x=h,d.scale9Borders.y=c,d.scale9Borders.w=u,d.scale9Borders.h=m,this},setCropUVs:function(h,c,u,m,d,p,v){var x=this.cutX,y=this.cutY,_=this.cutWidth,E=this.cutHeight,A=this.realWidth,D=this.realHeight,I=x+(c=T(c,0,A)),R=y+(u=T(u,0,D)),F=m=T(m,0,A-c),N=d=T(d,0,D-u),V=this.data;if(V.trim){var B=V.spriteSourceSize,H=c+(m=T(m,0,_-c)),Q=u+(d=T(d,0,E-u));if(B.rH||B.y>Q)I=0,R=0,F=0,N=0;else{var K=Math.max(B.x,c),q=Math.max(B.y,u),at=Math.min(B.r,H)-K,ot=Math.min(B.b,Q)-q;F=at,N=ot,I=p?x+(_-(K-B.x)-at):x+(K-B.x),R=v?y+(E-(q-B.y)-ot):y+(q-B.y),c=K,u=q,m=at,d=ot}}else p&&(I=x+(_-c-m)),v&&(R=y+(E-u-d));var J=this.source.width,it=this.source.height;return h.u0=Math.max(0,I/J),h.v0=Math.max(0,R/it),h.u1=Math.min(1,(I+F)/J),h.v1=Math.min(1,(R+N)/it),h.x=c,h.y=u,h.cx=I,h.cy=R,h.cw=F,h.ch=N,h.width=m,h.height=d,h.flipX=p,h.flipY=v,h},updateCropUVs:function(h,c,u){return this.setCropUVs(h,h.x,h.y,h.width,h.height,c,u)},setUVs:function(h,c,u,m,d,p){var v=this.data.drawImage;return v.width=h,v.height=c,this.u0=u,this.v0=m,this.u1=d,this.v1=p,this},updateUVs:function(){var h=this.cutX,c=this.cutY,u=this.cutWidth,m=this.cutHeight,d=this.data.drawImage;d.width=u,d.height=m;var p=this.source.width,v=this.source.height;return this.u0=h/p,this.v0=c/v,this.u1=(h+u)/p,this.v1=(c+m)/v,this},updateUVsInverted:function(){var h=this.source.width,c=this.source.height;return this.u0=(this.cutX+this.cutHeight)/h,this.v0=this.cutY/c,this.u1=this.cutX/h,this.v1=(this.cutY+this.cutWidth)/c,this},clone:function(){var h=new f(this.texture,this.name,this.sourceIndex);return h.cutX=this.cutX,h.cutY=this.cutY,h.cutWidth=this.cutWidth,h.cutHeight=this.cutHeight,h.x=this.x,h.y=this.y,h.width=this.width,h.height=this.height,h.halfWidth=this.halfWidth,h.halfHeight=this.halfHeight,h.centerX=this.centerX,h.centerY=this.centerY,h.rotated=this.rotated,h.data=g(!0,h.data,this.data),h.updateUVs(),h},destroy:function(){this.texture=null,this.source=null,this.customData=null,this.data=null},glTexture:{get:function(){return this.source.glTexture}},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});S.exports=f},79237:(S,k,a)=>{var b=a(83419),T=a(4327),g=a(11876),f='Texture "%s" has no frame "%s"',h=new b({initialize:function(u,m,d,p,v){Array.isArray(d)||(d=[d]),this.manager=u,this.key=m,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var x=0;xv&&(v=_.cutX+_.cutWidth),_.cutY+_.cutHeight>x&&(x=_.cutY+_.cutHeight)}return{x:d,y:p,width:v-d,height:x-p}},getFrameNames:function(c){void 0===c&&(c=!1);var u=Object.keys(this.frames);if(!c){var m=u.indexOf("__BASE");-1!==m&&u.splice(m,1)}return u},getSourceImage:function(c){(null==c||1===this.frameTotal)&&(c="__BASE");var u=this.frames[c];return u?u.source.image:(console.warn(f,this.key,c),this.frames.__BASE.source.image)},getDataSourceImage:function(c){(null==c||1===this.frameTotal)&&(c="__BASE");var m,u=this.frames[c];return u?m=u.sourceIndex:(console.warn(f,this.key,c),m=this.frames.__BASE.sourceIndex),this.dataSource[m].image},setDataSource:function(c){Array.isArray(c)||(c=[c]);for(var u=0;u{var b=a(27919),T=a(57382),g=a(83419),f=a(40987),h=a(8054),c=a(81320),u=a(50792),m=a(69442),d=a(4327),p=a(8443),v=a(99584),x=a(35154),y=a(88571),_=a(41212),E=a(61309),A=a(87841),D=a(79237),I=new g({Extends:u,initialize:function(F){u.call(this),this.game=F,this.name="TextureManager",this.list={},this._tempCanvas=b.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stampCrop=new A,this.silentWarnings=!1,F.events.once(p.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(m.LOAD,this.updatePending,this),this.on(m.ERROR,this.updatePending,this);var R=this.game.config;null!==R.defaultImage&&this.addBase64("__DEFAULT",R.defaultImage),null!==R.missingImage&&this.addBase64("__MISSING",R.missingImage),null!==R.whiteImage&&this.addBase64("__WHITE",R.whiteImage),this.game.renderer&&this.game.renderer.gl&&this.addUint8Array("__NORMAL",new Uint8Array([127,127,255,255]),1,1),this.game.events.once(p.DESTROY,this.destroy,this),this.game.events.once(p.SYSTEM_READY,function(F){this.stamp=new y(F).setOrigin(0)},this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(m.LOAD),this.off(m.ERROR),this.emit(m.READY))},checkKey:function(R){return!(!R||"string"!=typeof R||this.exists(R))||(this.silentWarnings||console.error("Texture key already in use: "+R),!1)},remove:function(R){if("string"==typeof R){if(!this.exists(R))return this.silentWarnings||console.warn("No texture found matching key: "+R),this;R=this.get(R)}var F=R.key;return this.list.hasOwnProperty(F)&&(R.destroy(),this.emit(m.REMOVE,F),this.emit(m.REMOVE_KEY+F)),this},removeKey:function(R){return this.list.hasOwnProperty(R)&&delete this.list[R],this},addBase64:function(R,F){if(this.checkKey(R)){var N=this,V=new Image;V.onerror=function(){N.emit(m.ERROR,R)},V.onload=function(){var B=N.create(R,V);E.Image(B,0),N.emit(m.ADD,R,B),N.emit(m.ADD_KEY+R,B),N.emit(m.LOAD,R,B)},V.src=F}return this},getBase64:function(R,F,N,V){void 0===N&&(N="image/png"),void 0===V&&(V=.92);var B="",H=this.getFrame(R,F);if(H&&(H.source.isRenderTexture||H.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(H){var Q=H.canvasData,G=b.create2D(this,Q.width,Q.height),K=G.getContext("2d",{willReadFrequently:!0});Q.width>0&&Q.height>0&&K.drawImage(H.source.image,Q.x,Q.y,Q.width,Q.height,0,0,Q.width,Q.height),B=G.toDataURL(N,V),b.remove(G)}return B},addImage:function(R,F,N){var V=null;return this.checkKey(R)&&(V=this.create(R,F),E.Image(V,0),N&&V.setDataSource(N),this.emit(m.ADD,R,V),this.emit(m.ADD_KEY+R,V)),V},addGLTexture:function(R,F){var N=null;if(this.checkKey(R)){var V=F.width,B=F.height;(N=this.create(R,F,V,B)).add("__BASE",0,0,0,V,B),this.emit(m.ADD,R,N),this.emit(m.ADD_KEY+R,N)}return N},addCompressedTexture:function(R,F,N){var V=null;if(this.checkKey(R)){if((V=this.create(R,F)).add("__BASE",0,0,0,F.width,F.height),N){var B=function(Q,G,K){Array.isArray(K.textures)||Array.isArray(K.frames)?E.JSONArray(Q,G,K):E.JSONHash(Q,G,K)};if(Array.isArray(N))for(var H=0;H=H.x&&R=H.y&&F=H.x&&R=H.y&&F{var b=a(27919),T=a(83419),g=a(50030),f=a(29795),h=a(82751),c=new T({initialize:function(m,d,p,v,x){void 0===x&&(x=!1);var y=m.manager.game;this.renderer=y.renderer,this.texture=m,this.source=d,this.image=d.compressed?null:d,this.compressionAlgorithm=d.compressed?d.format:null,this.resolution=1,this.width=p||d.naturalWidth||d.videoWidth||d.width||0,this.height=v||d.naturalHeight||d.videoHeight||d.height||0,this.scaleMode=f.DEFAULT,this.isCanvas=d instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&d instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===d.type||"DynamicTexture"===d.type,this.isGLTexture=d instanceof h,this.isPowerOf2=g(this.width,this.height),this.glTexture=null,this.flipY=x,this.init(y)},init:function(u){var m=this.renderer;if(m){var d=this.source;if(m.gl){var p=this.image,v=this.flipY,x=this.width,y=this.height,_=this.scaleMode;this.glTexture=this.isCanvas?m.createCanvasTexture(p,!1,v):this.isVideo?m.createVideoTexture(p,!1,v):this.isRenderTexture?m.createTextureFromSource(null,x,y,_):this.isGLTexture?d:this.compressionAlgorithm?m.createTextureFromSource(d,void 0,void 0,_):d instanceof Uint8Array?m.createUint8ArrayTexture(d,x,y,_):m.createTextureFromSource(p,x,y,_)}else this.isRenderTexture&&(this.image=d.canvas)}u.config.antialias||this.setFilter(1)},setFilter:function(u){this.renderer&&this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,u),this.scaleMode=u},setFlipY:function(u){return void 0===u&&(u=!0),u===this.flipY||(this.flipY=u,this.update()),this},update:function(){var u=this.renderer,m=this.image,d=this.flipY,p=u.gl;p&&this.isCanvas?u.updateCanvasTexture(m,this.glTexture,d):p&&this.isVideo&&u.updateVideoTexture(m,this.glTexture,d)},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture),this.isCanvas&&b.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});S.exports=c},19673:S=>{S.exports={LINEAR:0,NEAREST:1}},44538:S=>{S.exports="addtexture"},63486:S=>{S.exports="addtexture-"},94851:S=>{S.exports="onerror"},29099:S=>{S.exports="onload"},8678:S=>{S.exports="ready"},86415:S=>{S.exports="removetexture"},30879:S=>{S.exports="removetexture-"},69442:(S,k,a)=>{S.exports={ADD:a(44538),ADD_KEY:a(63486),ERROR:a(94851),LOAD:a(29099),READY:a(8678),REMOVE:a(86415),REMOVE_KEY:a(30879)}},27458:(S,k,a)=>{var b=a(79291),T=a(19673),g={CanvasTexture:a(57382),DynamicTexture:a(81320),Events:a(69442),FilterMode:T,Frame:a(4327),Parsers:a(61309),Texture:a(79237),TextureManager:a(17130),TextureSource:a(11876)};g=b(!1,g,T),S.exports=g},89905:S=>{S.exports=function(a,b,T){if(T.getElementsByTagName("TextureAtlas")){var g=a.source[b];a.add("__BASE",b,0,0,g.width,g.height);for(var h,f=T.getElementsByTagName("SubTexture"),c=0;c{S.exports=function(a,b){var T=a.source[b];return a.add("__BASE",b,0,0,T.width,T.height),a}},4832:S=>{S.exports=function(a,b){var T=a.source[b];return a.add("__BASE",b,0,0,T.width,T.height),a}},78566:(S,k,a)=>{var b=a(41786);S.exports=function(g,f,h){if(h.frames||h.textures){var c=g.source[f];g.add("__BASE",f,0,0,c.width,c.height);for(var m,u=Array.isArray(h.textures)?h.textures[f].frames:h.frames,d=0;d{var b=a(41786);S.exports=function(g,f,h){if(h.frames){var c=g.source[f];g.add("__BASE",f,0,0,c.width,c.height);var m,u=h.frames;for(var d in u)if(u.hasOwnProperty(d)){var p=u[d];if(!(m=g.add(d,f,p.frame.x,p.frame.y,p.frame.w,p.frame.h))){console.warn("Invalid atlas json, frame already exists: "+d);continue}p.trimmed&&m.setTrim(p.sourceSize.w,p.sourceSize.h,p.spriteSourceSize.x,p.spriteSourceSize.y,p.spriteSourceSize.w,p.spriteSourceSize.h),p.rotated&&(m.rotated=!0,m.updateUVsInverted());var v=p.anchor||p.pivot;v&&(m.customPivot=!0,m.pivotX=v.x,m.pivotY=v.y),p.scale9Borders&&m.setScale9(p.scale9Borders.x,p.scale9Borders.y,p.scale9Borders.w,p.scale9Borders.h),m.customData=b(p)}for(var x in h)"frames"!==x&&(g.customData[x]=Array.isArray(h[x])?h[x].slice(0):h[x]);return g}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},31403:S=>{S.exports=function(a){var T,b=[171,75,84,88,32,49,49,187,13,10,26,10],g=new Uint8Array(a,0,12);for(T=0;T>1),A=Math.max(1,A>>1),_+=D}return{mipmaps:y,width:d,height:p,internalFormat:m,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},82038:S=>{function k(F,N,V,B,H,Q,G){return void 0===G&&(G=16),Math.floor((F+V)/H)*Math.floor((N+B)/Q)*G}function a(F,N){return(F=Math.max(F,16))*(N=Math.max(N,8))/4}function b(F,N){return(F=Math.max(F,8))*(N=Math.max(N,8))/2}function T(F,N){return Math.ceil(F/4)*Math.ceil(N/4)*16}function g(F,N){return k(F,N,3,3,4,4,8)}function f(F,N){return k(F,N,3,3,4,4)}var I={0:{sizeFunc:a,glFormat:[35841]},1:{sizeFunc:a,glFormat:[35843]},2:{sizeFunc:b,glFormat:[35840]},3:{sizeFunc:b,glFormat:[35842]},6:{sizeFunc:g,glFormat:[36196]},7:{sizeFunc:g,glFormat:[33776,35916]},8:{sizeFunc:f,glFormat:[33777,35917]},9:{sizeFunc:f,glFormat:[33778,35918]},11:{sizeFunc:f,glFormat:[33779,35919]},14:{sizeFunc:T,glFormat:[36494,36495]},15:{sizeFunc:T,glFormat:[36492,36493]},22:{sizeFunc:g,glFormat:[37492,37493]},23:{sizeFunc:f,glFormat:[37496,37497]},24:{sizeFunc:g,glFormat:[37494,37495]},25:{sizeFunc:g,glFormat:[37488]},26:{sizeFunc:f,glFormat:[37490]},27:{sizeFunc:f,glFormat:[37808,37840]},28:{sizeFunc:function h(F,N){return k(F,N,4,3,5,4)},glFormat:[37809,37841]},29:{sizeFunc:function c(F,N){return k(F,N,4,4,5,5)},glFormat:[37810,37842]},30:{sizeFunc:function u(F,N){return k(F,N,5,4,6,5)},glFormat:[37811,37843]},31:{sizeFunc:function m(F,N){return k(F,N,5,5,6,6)},glFormat:[37812,37844]},32:{sizeFunc:function d(F,N){return k(F,N,7,4,8,5)},glFormat:[37813,37845]},33:{sizeFunc:function p(F,N){return k(F,N,7,5,8,6)},glFormat:[37814,37846]},34:{sizeFunc:function v(F,N){return k(F,N,7,7,8,8)},glFormat:[37815,37847]},35:{sizeFunc:function x(F,N){return k(F,N,9,4,10,5)},glFormat:[37816,37848]},36:{sizeFunc:function y(F,N){return k(F,N,9,5,10,6)},glFormat:[37817,37849]},37:{sizeFunc:function _(F,N){return k(F,N,9,7,10,8)},glFormat:[37818,37850]},38:{sizeFunc:function E(F,N){return k(F,N,9,9,10,10)},glFormat:[37819,37851]},39:{sizeFunc:function A(F,N){return k(F,N,11,9,12,10)},glFormat:[37820,37852]},40:{sizeFunc:function D(F,N){return k(F,N,11,11,12,12)},glFormat:[37821,37853]}};S.exports=function(F){for(var N=new Uint32Array(F,0,13),H=55727696===N[0]?N[2]:N[3],G=I[H].glFormat[N[4]],K=I[H].sizeFunc,q=N[11],at=N[7],ot=N[6],it=new Uint8Array(F,52+N[12]),Y=new Array(q),j=0,nt=at,ht=ot,gt=0;gt>1),ht=Math.max(1,ht>>1),j+=wt}return{mipmaps:Y,width:at,height:ot,internalFormat:G,compressed:!0,generateMipmap:!1}}},75549:(S,k,a)=>{var b=a(95540);S.exports=function(g,f,h,c,u,m,d){var p=b(d,"frameWidth",null),v=b(d,"frameHeight",p);if(null===p)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var x=g.source[f];g.add("__BASE",f,0,0,x.width,x.height);var y=b(d,"startFrame",0),_=b(d,"endFrame",-1),E=b(d,"margin",0),A=b(d,"spacing",0),R=Math.floor((u-E+A)/(p+A))*Math.floor((m-E+A)/(v+A));0===R&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",g.key),(y>R||y<-R)&&(y=0),y<0&&(y=R+y),(-1===_||_>R||_u&&(V=G-u),K>m&&(B=K-m),Q>=y&&Q<=_&&(g.add(H,f,h+F,c+N,p-V,v-B),H++),(F+=p+A)+p>u&&(F=E,N+=v+A)}return g}},47534:(S,k,a)=>{var b=a(95540);S.exports=function(g,f,h){var c=b(h,"frameWidth",null),u=b(h,"frameHeight",c);if(!c)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var m=g.source[0];g.add("__BASE",0,0,0,m.width,m.height);var d=b(h,"startFrame",0),p=b(h,"endFrame",-1),v=b(h,"margin",0),x=b(h,"spacing",0),y=f.cutX,_=f.cutY,E=f.cutWidth,A=f.cutHeight,D=f.realWidth,I=f.realHeight,R=Math.floor((D-v+x)/(c+x)),F=Math.floor((I-v+x)/(u+x)),N=R*F,V=f.x,B=c-V,H=c-(D-E-V),Q=f.y,G=u-Q,K=u-(I-A-Q);(d>N||d<-N)&&(d=0),d<0&&(d=N+d),-1!==p&&(N=d+(p+1));for(var q,at=v,ot=v,J=0,Y=0;Y{var k=0,a=function(T,g,f,h){T.add(f,g,h.x,k-h.y-h.height,h.width,h.height)};S.exports=function(T,g,f){var h=T.source[g];T.add("__BASE",g,0,0,h.width,h.height),k=h.height;for(var c=f.split("\n"),u=/^[ ]*(- )*(\w+)+[: ]+(.*)/,m="",d="",p={x:0,y:0,width:0,height:0},v=0;v{var b=a(50030);function g(m){for(var d=m.mipmaps,p=0;p{S.exports={AtlasXML:a(89905),Canvas:a(72893),Image:a(4832),JSONArray:a(78566),JSONHash:a(39711),KTXParser:a(31403),PVRParser:a(82038),SpriteSheet:a(75549),SpriteSheetFromAtlas:a(47534),UnityYAML:a(86147)}},80341:S=>{S.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},16536:(S,k,a)=>{var T=new(a(83419))({initialize:function(f,h,c,u,m,d,p){(void 0===c||c<=0)&&(c=32),(void 0===u||u<=0)&&(u=32),void 0===m&&(m=0),void 0===d&&(d=0),this.name=f,this.firstgid=0|h,this.imageWidth=0|c,this.imageHeight=0|u,this.imageMargin=0|m,this.imageSpacing=0|d,this.properties=p||{},this.images=[],this.total=0},containsImageIndex:function(g){return g>=this.firstgid&&g{var T=new(a(83419))({initialize:function(f){if(this.gids=[],void 0!==f)for(var h=0;h{var b=a(80341),T=a(87010),g=a(46177),f=a(49075);S.exports=function(c,u,m,d,p,v,x,y){void 0===m&&(m=32),void 0===d&&(d=32),void 0===p&&(p=10),void 0===v&&(v=10),void 0===y&&(y=!1);var _=null;if(Array.isArray(x))_=g(void 0!==u?u:"map",b.ARRAY_2D,x,m,d,y);else if(void 0!==u){var A=c.cache.tilemap.get(u);A?_=g(u,A.format,A.data,m,d,y):console.warn("No map data found for key "+u)}return null===_&&(_=new T({tileWidth:m,tileHeight:d,width:p,height:v})),new f(c,_)}},23029:(S,k,a)=>{var b=a(83419),T=a(31401),g=a(91907),f=a(62644),h=a(93232),c=new b({Mixins:[T.AlphaSingle,T.Flip,T.Visible],initialize:function(m,d,p,v,x,y,_,E){this.layer=m,this.index=d,this.x=p,this.y=v,this.width=x,this.height=y,this.baseWidth=void 0!==_?_:x,this.baseHeight=void 0!==E?E:y,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.tintFill=!1,this.physics={}},containsPoint:function(u,m){return!(uthis.right||m>this.bottom)},copy:function(u){return this.index=u.index,this.alpha=u.alpha,this.properties=f(u.properties),this.visible=u.visible,this.setFlip(u.flipX,u.flipY),this.tint=u.tint,this.rotation=u.rotation,this.collideUp=u.collideUp,this.collideDown=u.collideDown,this.collideLeft=u.collideLeft,this.collideRight=u.collideRight,this.collisionCallback=u.collisionCallback,this.collisionCallbackContext=u.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(u){var m=this.tilemapLayer;return m?m.tileToWorldXY(this.x,this.y,void 0,u).x:this.x*this.baseWidth},getRight:function(u){var m=this.tilemapLayer;return m?this.getLeft(u)+this.width*m.scaleX:this.getLeft(u)+this.width},getTop:function(u){var m=this.tilemapLayer;return m?m.tileToWorldXY(this.x,this.y,void 0,u).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(u){var m=this.tilemapLayer;return m?this.getTop(u)+this.height*m.scaleY:this.getTop(u)+this.height},getBounds:function(u,m){return void 0===m&&(m=new h),m.x=this.getLeft(u),m.y=this.getTop(u),m.width=this.getRight(u)-m.x,m.height=this.getBottom(u)-m.y,m},getCenterX:function(u){return(this.getLeft(u)+this.getRight(u))/2},getCenterY:function(u){return(this.getTop(u)+this.getBottom(u))/2},intersects:function(u,m,d,p){return!(d<=this.pixelX||p<=this.pixelY||u>=this.right||m>=this.bottom)},isInteresting:function(u,m){return u&&m?this.canCollide||this.hasInterestingFace:u?this.collides:!!m&&this.hasInterestingFace},resetCollision:function(u){return void 0===u&&(u=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,u&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(u,m,d,p,v){return void 0===m&&(m=u),void 0===d&&(d=u),void 0===p&&(p=u),void 0===v&&(v=!0),this.collideLeft=u,this.collideRight=m,this.collideUp=d,this.collideDown=p,this.faceLeft=u,this.faceRight=m,this.faceTop=d,this.faceBottom=p,v&&this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y),this},setCollisionCallback:function(u,m){return null===u?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=u,this.collisionCallbackContext=m),this},setSize:function(u,m,d,p){return void 0!==u&&(this.width=u),void 0!==m&&(this.height=m),void 0!==d&&(this.baseWidth=d),void 0!==p&&(this.baseHeight=p),this.updatePixelXY(),this},updatePixelXY:function(){var u=this.layer.orientation;if(u===g.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(u===g.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(u===g.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(u===g.HEXAGONAL){var x,m=this.layer.staggerAxis,d=this.layer.staggerIndex,p=this.layer.hexSideLength;"y"===m?(x=(this.baseHeight-p)/2+p,this.pixelX="odd"===d?this.x*this.baseWidth+this.y%2*(this.baseWidth/2):this.x*this.baseWidth-this.y%2*(this.baseWidth/2),this.pixelY=this.y*x):"x"===m&&(this.pixelX=this.x*((this.baseWidth-p)/2+p),this.pixelY="odd"===d?this.y*this.baseHeight+this.x%2*(this.baseHeight/2):this.y*this.baseHeight-this.x%2*(this.baseHeight/2))}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var u=this.layer.tilemapLayer;if(u){var m=u.gidMap[this.index];if(m)return m}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var u=this.tilemapLayer;return u?u.tilemap:null}}});S.exports=c},49075:(S,k,a)=>{var b=a(84101),T=a(83419),g=a(39506),f=a(80341),h=a(95540),c=a(14977),u=a(27462),m=a(91907),d=a(36305),p=a(19133),v=a(68287),x=a(23029),y=a(81086),_=a(20442),E=a(33629),A=new T({initialize:function(I,R){this.scene=I,this.tileWidth=R.tileWidth,this.tileHeight=R.tileHeight,this.width=R.width,this.height=R.height,this.orientation=R.orientation,this.renderOrder=R.renderOrder,this.format=R.format,this.version=R.version,this.properties=R.properties,this.widthInPixels=R.widthInPixels,this.heightInPixels=R.heightInPixels,this.imageCollections=R.imageCollections,this.images=R.images,this.layers=R.layers,this.tiles=R.tiles,this.tilesets=R.tilesets,this.objects=R.objects,this.currentLayerIndex=0,this.hexSideLength=R.hexSideLength;var F=this.orientation;this._convert={WorldToTileXY:y.GetWorldToTileXYFunction(F),WorldToTileX:y.GetWorldToTileXFunction(F),WorldToTileY:y.GetWorldToTileYFunction(F),TileToWorldXY:y.GetTileToWorldXYFunction(F),TileToWorldX:y.GetTileToWorldXFunction(F),TileToWorldY:y.GetTileToWorldYFunction(F),GetTileCorners:y.GetTileCornersFunction(F)}},setRenderOrder:function(D){var I=["right-down","left-down","right-up","left-up"];return"number"==typeof D&&(D=I[D]),I.indexOf(D)>-1&&(this.renderOrder=D),this},addTilesetImage:function(D,I,R,F,N,V,B,H){if(void 0===D)return null;null==I&&(I=D);var Q=this.scene.sys.textures;if(!Q.exists(I))return console.warn('Texture key "%s" not found',I),null;var G=Q.get(I),K=this.getTilesetIndex(D);if(null===K&&this.format===f.TILED_JSON)return console.warn('Tilemap has no tileset "%s". Its tilesets are %o',D,this.tilesets),null;var q=this.tilesets[K];return q?((R||F)&&q.setTileSize(R,F),(N||V)&&q.setSpacing(N,V),q.setImage(G),q):(void 0===R&&(R=this.tileWidth),void 0===F&&(F=this.tileHeight),void 0===N&&(N=0),void 0===V&&(V=0),void 0===B&&(B=0),void 0===H&&(H={x:0,y:0}),(q=new E(D,B,R,F,N,V,void 0,void 0,H)).setImage(G),this.tilesets.push(q),this.tiles=b(this),q)},copy:function(D,I,R,F,N,V,B,H){return null!==(H=this.getLayer(H))?(y.Copy(D,I,R,F,N,V,B,H),this):null},createBlankLayer:function(D,I,R,F,N,V,B,H){if(void 0===R&&(R=0),void 0===F&&(F=0),void 0===N&&(N=this.width),void 0===V&&(V=this.height),void 0===B&&(B=this.tileWidth),void 0===H&&(H=this.tileHeight),null!==this.getLayerIndex(D))return console.warn("Invalid Tilemap Layer ID: "+D),null;for(var K,G=new c({name:D,tileWidth:B,tileHeight:H,width:N,height:V,orientation:this.orientation}),q=0;q-1&&this.putTileAt(I,V.x,V.y,R,V.tilemapLayer)}return F},removeTileAt:function(D,I,R,F,N){return void 0===R&&(R=!0),void 0===F&&(F=!0),null===(N=this.getLayer(N))?null:y.RemoveTileAt(D,I,R,F,N)},removeTileAtWorldXY:function(D,I,R,F,N,V){return void 0===R&&(R=!0),void 0===F&&(F=!0),null===(V=this.getLayer(V))?null:y.RemoveTileAtWorldXY(D,I,R,F,N,V)},renderDebug:function(D,I,R){return null===(R=this.getLayer(R))?null:(this.orientation===m.ORTHOGONAL&&y.RenderDebug(D,I,R),this)},renderDebugFull:function(D,I){for(var R=this.layers,F=0;F{var b=a(44603),T=a(31989);b.register("tilemap",function(g){var f=void 0!==g?g:{};return T(this.scene,f.key,f.tileWidth,f.tileHeight,f.width,f.height,f.data,f.insertNull)})},46029:(S,k,a)=>{var b=a(39429),T=a(31989);b.register("tilemap",function(g,f,h,c,u,m,d){return null===g&&(g=void 0),null===f&&(f=void 0),null===h&&(h=void 0),null===c&&(c=void 0),null===u&&(u=void 0),T(this.scene,g,f,h,c,u,m,d)})},20442:(S,k,a)=>{var b=a(83419),T=a(78389),g=a(31401),f=a(95643),h=a(81086),c=a(19218),u=a(26099),m=new b({Extends:f,Mixins:[g.Alpha,g.BlendMode,g.ComputedSize,g.Depth,g.Flip,g.GetBounds,g.Mask,g.Origin,g.Pipeline,g.PostPipeline,g.Transform,g.Visible,g.ScrollFactor,T,c],initialize:function(p,v,x,y,_,E){f.call(this,p,"TilemapLayer"),this.isTilemap=!0,this.tilemap=v,this.layerIndex=x,this.layer=v.layers[x],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=h.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new u,this.collisionCategory=1,this.collisionMask=1,this.setTilesets(y),this.setAlpha(this.layer.alpha),this.setPosition(_,E),this.setOrigin(0,0),this.setSize(v.tileWidth*this.layer.width,v.tileHeight*this.layer.height),this.initPipeline(),this.initPostPipeline(!1)},setTilesets:function(d){var p=[],v=[],x=this.tilemap;Array.isArray(d)||(d=[d]);for(var y=0;y=0&&d<4&&(this._renderOrder=d),this},calculateFacesAt:function(d,p){return h.CalculateFacesAt(d,p,this.layer),this},calculateFacesWithin:function(d,p,v,x){return h.CalculateFacesWithin(d,p,v,x,this.layer),this},createFromTiles:function(d,p,v,x,y){return h.CreateFromTiles(d,p,v,x,y,this.layer)},cull:function(d){return this.cullCallback(this.layer,d,this.culledTiles,this._renderOrder)},copy:function(d,p,v,x,y,_,E){return h.Copy(d,p,v,x,y,_,E,this.layer),this},fill:function(d,p,v,x,y,_){return h.Fill(d,p,v,x,y,_,this.layer),this},filterTiles:function(d,p,v,x,y,_,E){return h.FilterTiles(d,p,v,x,y,_,E,this.layer)},findByIndex:function(d,p,v){return h.FindByIndex(d,p,v,this.layer)},findTile:function(d,p,v,x,y,_,E){return h.FindTile(d,p,v,x,y,_,E,this.layer)},forEachTile:function(d,p,v,x,y,_,E){return h.ForEachTile(d,p,v,x,y,_,E,this.layer),this},setTint:function(d,p,v,x,y,_){return void 0===d&&(d=16777215),this.forEachTile(function(A){A.tint=d,A.tintFill=!1},this,p,v,x,y,_)},setTintFill:function(d,p,v,x,y,_){return void 0===d&&(d=16777215),this.forEachTile(function(A){A.tint=d,A.tintFill=!0},this,p,v,x,y,_)},getTileAt:function(d,p,v){return h.GetTileAt(d,p,v,this.layer)},getTileAtWorldXY:function(d,p,v,x){return h.GetTileAtWorldXY(d,p,v,x,this.layer)},getIsoTileAtWorldXY:function(d,p,v,x,y){void 0===v&&(v=!0);var _=this.tempVec;return h.IsometricWorldToTileXY(d,p,!0,_,y,this.layer,v),this.getTileAt(_.x,_.y,x)},getTilesWithin:function(d,p,v,x,y){return h.GetTilesWithin(d,p,v,x,y,this.layer)},getTilesWithinShape:function(d,p,v){return h.GetTilesWithinShape(d,p,v,this.layer)},getTilesWithinWorldXY:function(d,p,v,x,y,_){return h.GetTilesWithinWorldXY(d,p,v,x,y,_,this.layer)},hasTileAt:function(d,p){return h.HasTileAt(d,p,this.layer)},hasTileAtWorldXY:function(d,p,v){return h.HasTileAtWorldXY(d,p,v,this.layer)},putTileAt:function(d,p,v,x){return h.PutTileAt(d,p,v,x,this.layer)},putTileAtWorldXY:function(d,p,v,x,y){return h.PutTileAtWorldXY(d,p,v,x,y,this.layer)},putTilesAt:function(d,p,v,x){return h.PutTilesAt(d,p,v,x,this.layer),this},randomize:function(d,p,v,x,y){return h.Randomize(d,p,v,x,y,this.layer),this},removeTileAt:function(d,p,v,x){return h.RemoveTileAt(d,p,v,x,this.layer)},removeTileAtWorldXY:function(d,p,v,x,y){return h.RemoveTileAtWorldXY(d,p,v,x,y,this.layer)},renderDebug:function(d,p){return h.RenderDebug(d,p,this.layer),this},replaceByIndex:function(d,p,v,x,y,_){return h.ReplaceByIndex(d,p,v,x,y,_,this.layer),this},setSkipCull:function(d){return void 0===d&&(d=!0),this.skipCull=d,this},setCullPadding:function(d,p){return void 0===d&&(d=1),void 0===p&&(p=1),this.cullPaddingX=d,this.cullPaddingY=p,this},setCollision:function(d,p,v,x){return h.SetCollision(d,p,v,this.layer,x),this},setCollisionBetween:function(d,p,v,x){return h.SetCollisionBetween(d,p,v,x,this.layer),this},setCollisionByProperty:function(d,p,v){return h.SetCollisionByProperty(d,p,v,this.layer),this},setCollisionByExclusion:function(d,p,v){return h.SetCollisionByExclusion(d,p,v,this.layer),this},setCollisionFromCollisionGroup:function(d,p){return h.SetCollisionFromCollisionGroup(d,p,this.layer),this},setTileIndexCallback:function(d,p,v){return h.SetTileIndexCallback(d,p,v,this.layer),this},setTileLocationCallback:function(d,p,v,x,y,_){return h.SetTileLocationCallback(d,p,v,x,y,_,this.layer),this},shuffle:function(d,p,v,x){return h.Shuffle(d,p,v,x,this.layer),this},swapByIndex:function(d,p,v,x,y,_){return h.SwapByIndex(d,p,v,x,y,_,this.layer),this},tileToWorldX:function(d,p){return this.tilemap.tileToWorldX(d,p,this)},tileToWorldY:function(d,p){return this.tilemap.tileToWorldY(d,p,this)},tileToWorldXY:function(d,p,v,x){return this.tilemap.tileToWorldXY(d,p,v,x,this)},getTileCorners:function(d,p,v){return this.tilemap.getTileCorners(d,p,v,this)},weightedRandomize:function(d,p,v,x,y){return h.WeightedRandomize(p,v,x,y,d,this.layer),this},worldToTileX:function(d,p,v){return this.tilemap.worldToTileX(d,p,v,this)},worldToTileY:function(d,p,v){return this.tilemap.worldToTileY(d,p,v,this)},worldToTileXY:function(d,p,v,x,y){return this.tilemap.worldToTileXY(d,p,v,x,y,this)},destroy:function(d){void 0===d&&(d=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),d&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],f.prototype.destroy.call(this))}});S.exports=m},16153:(S,k,a)=>{var b=a(61340),T=new b,g=new b,f=new b;S.exports=function(c,u,m,d){var p=u.cull(m),v=p.length,x=m.alpha*u.alpha;if(!(0===v||x<=0)){var y=T,_=g,E=f;_.applyITRS(u.x,u.y,u.rotation,u.scaleX,u.scaleY),y.copyFrom(m.matrix);var A=c.currentContext,D=u.gidMap;A.save(),d?(y.multiplyWithOffset(d,-m.scrollX*u.scrollFactorX,-m.scrollY*u.scrollFactorY),_.e=u.x,_.f=u.y,y.multiply(_,E),E.copyToContext(A)):(_.e-=m.scrollX*u.scrollFactorX,_.f-=m.scrollY*u.scrollFactorY,_.copyToContext(A)),(!c.antialias||u.scaleX>1||u.scaleY>1)&&(A.imageSmoothingEnabled=!1);for(var I=0;I{var T,g;a(29747),T=a(99558),g=a(16153),S.exports={renderWebGL:T,renderCanvas:g}},99558:(S,k,a)=>{var b=a(70554);S.exports=function(g,f,h){var c=f.cull(h),u=c.length,m=h.alpha*f.alpha;if(!(0===u||m<=0)){var d=f.gidMap,p=g.pipelines.set(f.pipeline,f),v=b.getTintAppendFloatAlpha,x=f.scrollFactorX,y=f.scrollFactorY,_=f.x,E=f.y,A=f.scaleX,D=f.scaleY;g.pipelines.preBatch(f);for(var I=0;I{var b=a(83419),T=a(26099),g=new b({initialize:function(h,c,u,m,d,p,v,x,y){(void 0===u||u<=0)&&(u=32),(void 0===m||m<=0)&&(m=32),void 0===d&&(d=0),void 0===p&&(p=0),void 0===v&&(v={}),void 0===x&&(x={}),this.name=h,this.firstgid=c,this.tileWidth=u,this.tileHeight=m,this.tileMargin=d,this.tileSpacing=p,this.tileProperties=v,this.tileData=x,this.tileOffset=new T,void 0!==y&&this.tileOffset.set(y.x,y.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(f){return this.containsTileIndex(f)?this.tileProperties[f-this.firstgid]:null},getTileData:function(f){return this.containsTileIndex(f)?this.tileData[f-this.firstgid]:null},getTileCollisionGroup:function(f){var h=this.getTileData(f);return h&&h.objectgroup?h.objectgroup:null},containsTileIndex:function(f){return f>=this.firstgid&&fc.width||h.height>c.height?this.updateTileData(h.width,h.height):this.updateTileData(c.width,c.height,c.x,c.y),this},setTileSize:function(f,h){return void 0!==f&&(this.tileWidth=f),void 0!==h&&(this.tileHeight=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},setSpacing:function(f,h){return void 0!==f&&(this.tileMargin=f),void 0!==h&&(this.tileSpacing=h),this.image&&this.updateTileData(this.image.source[0].width,this.image.source[0].height),this},updateTileData:function(f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=0);var m=(h-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),d=(f-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);(m%1!=0||d%1!=0)&&console.warn("Image tile area not tile size multiple in: "+this.name),m=Math.floor(m),d=Math.floor(d),this.rows=m,this.columns=d,this.total=m*d,this.texCoordinates.length=0;for(var p=this.tileMargin+c,v=this.tileMargin+u,x=0;x{var b=a(7423);S.exports=function(g,f,h){var c=b(g,f,!0,h),u=b(g,f-1,!0,h),m=b(g,f+1,!0,h),d=b(g-1,f,!0,h),p=b(g+1,f,!0,h),v=c&&c.collides;return v&&(c.faceTop=!0,c.faceBottom=!0,c.faceLeft=!0,c.faceRight=!0),u&&u.collides&&(v&&(c.faceTop=!1),u.faceBottom=!v),m&&m.collides&&(v&&(c.faceBottom=!1),m.faceTop=!v),d&&d.collides&&(v&&(c.faceLeft=!1),d.faceRight=!v),p&&p.collides&&(v&&(c.faceRight=!1),p.faceLeft=!v),c&&!c.collides&&c.resetFaces(),c}},42573:(S,k,a)=>{var b=a(7423),T=a(7386);S.exports=function(f,h,c,u,m){for(var d=null,p=null,v=null,x=null,y=T(f,h,c,u,null,m),_=0;_{var T=new(a(26099));S.exports=function(f,h,c,u){var m=c.tilemapLayer,d=m.cullPaddingX,p=m.cullPaddingY,v=m.tilemap.tileToWorldXY(f,h,T,u,m);return v.x>u.worldView.x+m.scaleX*c.tileWidth*(-d-.5)&&v.xu.worldView.y+m.scaleY*c.tileHeight*(-p-1)&&v.y{var b=a(42573),T=a(7386),g=a(62991),f=a(23029);S.exports=function(c,u,m,d,p,v,x,y){void 0===x&&(x=!0);var _=T(c,u,m,d,null,y),E=[];_.forEach(function(V){var B=new f(V.layer,V.index,V.x,V.y,V.width,V.height,V.baseWidth,V.baseHeight);B.copy(V),E.push(B)});for(var A=p-c,D=v-u,I=0;I{var b=a(62644),T=a(7386),g=a(27987);S.exports=function(h,c,u,m,d,p){u||(u={}),Array.isArray(h)||(h=[h]);var v=p.tilemapLayer;m||(m=v.scene),d||(d=m.cameras.main);var A,x=p.width,y=p.height,_=T(0,0,x,y,null,p),E=[],D=function(N,V,B){for(var H=0;H{var b=a(87841),T=a(63448),g=a(56583),f=new b;S.exports=function(c,u){var m=c.tilemapLayer.tilemap,d=c.tilemapLayer,p=Math.floor(m.tileWidth*d.scaleX),v=Math.floor(m.tileHeight*d.scaleY),x=g(u.worldView.x-d.x,p,0,!0)-d.cullPaddingX,y=T(u.worldView.right-d.x,p,0,!0)+d.cullPaddingX,_=g(u.worldView.y-d.y,v,0,!0)-d.cullPaddingY,E=T(u.worldView.bottom-d.y,v,0,!0)+d.cullPaddingY;return f.setTo(x,_,y-x,E-_)}},30003:(S,k,a)=>{var b=a(19545),T=a(32483);S.exports=function(f,h,c,u){void 0===c&&(c=[]),void 0===u&&(u=0),c.length=0;var m=f.tilemapLayer,d=b(f,h);return(m.skipCull||1!==m.scrollFactorX||1!==m.scrollFactorY)&&(d.left=0,d.right=f.width,d.top=0,d.bottom=f.height),T(f,d,u,c),c}},35137:(S,k,a)=>{var b=a(7386),T=a(42573),g=a(20576);S.exports=function(h,c,u,m,d,p,v){for(var x=-1!==v.collideIndexes.indexOf(h),y=b(c,u,m,d,null,v),_=0;_{var b=a(7386);S.exports=function(g,f,h,c,u,m,d,p){return b(h,c,u,m,d,p).filter(g,f)}},52692:S=>{S.exports=function(a,b,T,g){void 0===b&&(b=0),void 0===T&&(T=!1);var h,c,u,f=0;if(T){for(c=g.height-1;c>=0;c--)for(h=g.width-1;h>=0;h--)if((u=g.data[c][h])&&u.index===a){if(f===b)return u;f+=1}}else for(c=0;c{var b=a(7386);S.exports=function(g,f,h,c,u,m,d,p){return b(h,c,u,m,d,p).find(g,f)||null}},97560:(S,k,a)=>{var b=a(7386);S.exports=function(g,f,h,c,u,m,d,p){b(h,c,u,m,d,p).forEach(g,f)}},43305:(S,k,a)=>{var b=a(91907),T=a(30003),g=a(9474),f=a(14018),h=a(29747),c=a(54503);S.exports=function(m){return m===b.ORTHOGONAL?T:m===b.HEXAGONAL?g:m===b.STAGGERED?c:m===b.ISOMETRIC?f:h}},7423:(S,k,a)=>{var b=a(62991);S.exports=function(g,f,h,c){if(b(g,f,c)){var u=c.data[f][g]||null;return u?-1===u.index?h?u:null:u:null}return null}},60540:(S,k,a)=>{var b=a(7423),g=new(a(26099));S.exports=function(h,c,u,m,d){return d.tilemapLayer.worldToTileXY(h,c,!0,g,m),b(g.x,g.y,u,d)}},55826:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c){var u=c.baseTileWidth,m=c.baseTileHeight,d=c.tilemapLayer,p=0,v=0;d&&(h||(h=d.scene.cameras.main),p=d.x+h.scrollX*(1-d.scrollFactorX),v=d.y+h.scrollY*(1-d.scrollFactorY),u*=d.scaleX,m*=d.scaleY);var x=p+g*u,y=v+f*m;return[new b(x,y),new b(x+u,y),new b(x+u,y+m),new b(x,y+m)]}},11758:(S,k,a)=>{var b=a(91907),T=a(27229),g=a(29747),f=a(55826);S.exports=function(c){return c===b.ORTHOGONAL?f:c===b.ISOMETRIC?g:c===b.HEXAGONAL?T:g}},39167:(S,k,a)=>{var b=a(91907),T=a(29747),g=a(97281);S.exports=function(h){return h===b.ORTHOGONAL?g:T}},62e3:(S,k,a)=>{var b=a(91907),T=a(19951),g=a(14127),f=a(29747),h=a(97202),c=a(70326);S.exports=function(m){return m===b.ORTHOGONAL?c:m===b.ISOMETRIC?g:m===b.HEXAGONAL?T:m===b.STAGGERED?h:f}},5984:(S,k,a)=>{var b=a(91907),T=a(29747),g=a(28054),f=a(29650);S.exports=function(c){return c===b.ORTHOGONAL?f:c===b.STAGGERED?g:T}},7386:(S,k,a)=>{var b=a(95540);S.exports=function(g,f,h,c,u,m){void 0===g&&(g=0),void 0===f&&(f=0),void 0===h&&(h=m.width),void 0===c&&(c=m.height),u||(u={});var d=b(u,"isNotEmpty",!1),p=b(u,"isColliding",!1),v=b(u,"hasInterestingFace",!1);g<0&&(h+=g,g=0),f<0&&(c+=f,f=0),g+h>m.width&&(h=Math.max(m.width-g,0)),f+c>m.height&&(c=Math.max(m.height-f,0));for(var x=[],y=f;y{var b=a(55738),T=a(7386),g=a(91865),f=a(29747),h=a(26099),c=function(v,x){return g.RectangleToTriangle(x,v)},u=new h,m=new h,d=new h;S.exports=function(v,x,y,_){if(void 0===v)return[];var E=f;v instanceof b.Circle?E=g.CircleToRectangle:v instanceof b.Rectangle?E=g.RectangleToRectangle:v instanceof b.Triangle?E=c:v instanceof b.Line&&(E=g.LineToRectangle),_.tilemapLayer.worldToTileXY(v.left,v.top,!0,m,y);var A=m.x,D=m.y;_.tilemapLayer.worldToTileXY(v.right,v.bottom,!1,d,y);var I=Math.ceil(d.x),R=Math.ceil(d.y),F=Math.max(I-A,1),N=Math.max(R-D,1),V=T(A,D,F,N,x,_),B=_.tileWidth,H=_.tileHeight;_.tilemapLayer&&(B*=_.tilemapLayer.scaleX,H*=_.tilemapLayer.scaleY);for(var Q=[],G=new b.Rectangle(0,0,B,H),K=0;K{var b=a(7386),T=a(26099),g=new T,f=new T;S.exports=function(c,u,m,d,p,v,x){var y=x.tilemapLayer.tilemap._convert.WorldToTileXY;y(c,u,!0,g,v,x);var _=g.x,E=g.y;y(c+m,u+d,!1,f,v,x);var A=Math.ceil(f.x),D=Math.ceil(f.y);return b(_,E,A-_,D-E,p,x)}},96113:(S,k,a)=>{var b=a(91907),T=a(20242),g=a(10095);S.exports=function(h){return h===b.ORTHOGONAL?g:T}},16926:(S,k,a)=>{var b=a(91907),T=a(86625),g=a(96897),f=a(29747),h=a(15108),c=a(85896);S.exports=function(m){return m===b.ORTHOGONAL?c:m===b.ISOMETRIC?g:m===b.HEXAGONAL?T:m===b.STAGGERED?h:f}},55762:(S,k,a)=>{var b=a(91907),T=a(20242),g=a(51900),f=a(63288);S.exports=function(c){return c===b.ORTHOGONAL?f:c===b.STAGGERED?g:T}},45091:(S,k,a)=>{var b=a(62991);S.exports=function(g,f,h){if(b(g,f,h)){var c=h.data[f][g];return null!==c&&c.index>-1}return!1}},24152:(S,k,a)=>{var b=a(45091),g=new(a(26099));S.exports=function(h,c,u,m){return m.tilemapLayer.worldToTileXY(h,c,!0,g,u),b(g.x,g.y,m)}},90454:(S,k,a)=>{var b=a(63448),T=a(56583);S.exports=function(f,h){var v,x,y,_,c=f.tilemapLayer.tilemap,u=f.tilemapLayer,m=Math.floor(c.tileWidth*u.scaleX),d=Math.floor(c.tileHeight*u.scaleY),p=f.hexSideLength;if("y"===f.staggerAxis){var E=(d-p)/2+p;v=T(h.worldView.x-u.x,m,0,!0)-u.cullPaddingX,x=b(h.worldView.right-u.x,m,0,!0)+u.cullPaddingX,y=T(h.worldView.y-u.y,E,0,!0)-u.cullPaddingY,_=b(h.worldView.bottom-u.y,E,0,!0)+u.cullPaddingY}else{var A=(m-p)/2+p;v=T(h.worldView.x-u.x,A,0,!0)-u.cullPaddingX,x=b(h.worldView.right-u.x,A,0,!0)+u.cullPaddingX,y=T(h.worldView.y-u.y,d,0,!0)-u.cullPaddingY,_=b(h.worldView.bottom-u.y,d,0,!0)+u.cullPaddingY}return{left:v,right:x,top:y,bottom:_}}},9474:(S,k,a)=>{var b=a(90454),T=a(32483);S.exports=function(f,h,c,u){void 0===c&&(c=[]),void 0===u&&(u=0),c.length=0;var m=f.tilemapLayer,d=b(f,h);return m.skipCull&&1===m.scrollFactorX&&1===m.scrollFactorY&&(d.left=0,d.right=f.width,d.top=0,d.bottom=f.height),T(f,d,u,c),c}},27229:(S,k,a)=>{var b=a(19951),T=a(26099),g=new T;S.exports=function(h,c,u,m){var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(d*=v.scaleX,p*=v.scaleY);var E,A,x=b(h,c,g,u,m),y=[],_=.5773502691896257;"y"===m.staggerAxis?(E=_*d,A=p/2):(E=d/2,A=_*p);for(var D=0;D<6;D++){var I=2*Math.PI*(.5-D)/6;y.push(new T(x.x+E*Math.cos(I),x.y+A*Math.sin(I)))}return y}},19951:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){h||(h=new b);var m=u.baseTileWidth,d=u.baseTileHeight,p=u.tilemapLayer,v=0,x=0;p&&(c||(c=p.scene.cameras.main),v=p.x+c.scrollX*(1-p.scrollFactorX),x=p.y+c.scrollY*(1-p.scrollFactorY),m*=p.scaleX,d*=p.scaleY);var E,A,y=m/2,_=d/2,D=u.staggerAxis,I=u.staggerIndex;return"y"===D?(E=v+m*g+m,A=x+1.5*f*_+_,f%2==0&&("odd"===I?E-=y:E+=y)):"x"===D&&"odd"===I&&(E=v+1.5*g*y+y,A=x+d*g+d,g%2==0&&("odd"===I?A-=_:A+=_)),h.set(E,A)}},86625:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m){c||(c=new b);var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(u||(u=v.scene.cameras.main),g-=v.x+u.scrollX*(1-v.scrollFactorX),f-=v.y+u.scrollY*(1-v.scrollFactorY),d*=v.scaleX,p*=v.scaleY);var I,R,F,N,V,x=.5773502691896257,y=-.3333333333333333,E=.6666666666666666,A=d/2,D=p/2;"y"===m.staggerAxis?(F=x*(I=(g-A)/(x*d))+y*(R=(f-D)/D),N=0*I+E*R):(F=y*(I=(g-A)/A)+x*(R=(f-D)/(x*p)),N=E*I+0*R),V=-F-N;var B=Math.round(F),H=Math.round(N),Q=Math.round(V),G=Math.abs(B-F),K=Math.abs(H-N),q=Math.abs(Q-V);return G>K&&G>q?B=-H-Q:K>q&&(H=-B-Q),c.set("odd"===m.staggerIndex?H%2==0?H/2+B:H/2+B-.5:H%2==0?H/2+B:H/2+B+.5,H)}},62991:S=>{S.exports=function(a,b,T){return a>=0&&a=0&&b{var b=a(33528);S.exports=function(g,f,h,c){void 0===h&&(h=[]),void 0===c&&(c=0),h.length=0;var A,D,I,u=g.tilemapLayer,m=g.data,d=g.width,p=g.height,v=u.skipCull,y=d,E=p;if(0===c)for(D=0;D=0;A--)(I=m[D][A])&&-1!==I.index&&I.visible&&0!==I.alpha&&(!v&&!b(A,D,g,f)||h.push(I));else if(2===c)for(D=E;D>=0;D--)for(A=0;A=0;D--)for(A=y;A>=0;A--)(I=m[D][A])&&-1!==I.index&&I.visible&&0!==I.alpha&&(!v&&!b(A,D,g,f)||h.push(I));return u.tilesDrawn=h.length,u.tilesTotal=d*p,h}},14127:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){h||(h=new b);var m=u.baseTileWidth,d=u.baseTileHeight,p=u.tilemapLayer,v=0,x=0;return p&&(c||(c=p.scene.cameras.main),v=p.x+c.scrollX*(1-p.scrollFactorX),m*=p.scaleX,x=p.y+c.scrollY*(1-p.scrollFactorY),d*=p.scaleY),h.set(v+m/2*(g-f),x+(g+f)*(d/2))}},96897:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m,d){c||(c=new b);var p=m.baseTileWidth,v=m.baseTileHeight,x=m.tilemapLayer;x&&(u||(u=x.scene.cameras.main),f-=x.y+u.scrollY*(1-x.scrollFactorY),v*=x.scaleY,g-=x.x+u.scrollX*(1-x.scrollFactorX),p*=x.scaleX);var y=p/2,_=v/2;d||(f-=v);var E=.5*((g-=y)/y+f/_),A=.5*(-g/y+f/_);return h&&(E=Math.floor(E),A=Math.floor(A)),c.set(E,A)}},71558:(S,k,a)=>{var b=a(23029),T=a(62991),g=a(72023),f=a(20576);S.exports=function(c,u,m,d,p){if(void 0===d&&(d=!0),!T(u,m,p))return null;var v,x=p.data[m][u],y=x&&x.collides;c instanceof b?(null===p.data[m][u]&&(p.data[m][u]=new b(p,c.index,u,m,p.tileWidth,p.tileHeight)),p.data[m][u].copy(c)):(v=c,null===p.data[m][u]?p.data[m][u]=new b(p,v,u,m,p.tileWidth,p.tileHeight):p.data[m][u].index=v);var _=p.data[m][u],E=-1!==p.collideIndexes.indexOf(_.index);if(-1===(v=c instanceof b?c.index:c))_.width=p.tileWidth,_.height=p.tileHeight;else{var A=p.tilemapLayer.tilemap,R=A.tilesets[A.tiles[v][2]];_.width=R.tileWidth,_.height=R.tileHeight}return f(_,E),d&&y!==_.collides&&g(u,m,p),_}},26303:(S,k,a)=>{var b=a(71558),g=new(a(26099));S.exports=function(h,c,u,m,d,p){return p.tilemapLayer.worldToTileXY(c,u,!0,g,d,p),b(h,g.x,g.y,m,p)}},14051:(S,k,a)=>{var b=a(42573),T=a(71558);S.exports=function(f,h,c,u,m){if(void 0===u&&(u=!0),!Array.isArray(f))return null;Array.isArray(f[0])||(f=[f]);for(var d=f.length,p=f[0].length,v=0;v{var b=a(7386),T=a(26546);S.exports=function(f,h,c,u,m,d){var p,v=b(f,h,c,u,{},d);if(!m)for(m=[],p=0;p{var b=a(23029),T=a(62991),g=a(72023);S.exports=function(h,c,u,m,d){if(void 0===u&&(u=!0),void 0===m&&(m=!0),!T(h,c,d))return null;var p=d.data[c][h];return p?(d.data[c][h]=u?null:new b(d,-1,h,c,d.tileWidth,d.tileHeight),m&&p&&p.collides&&g(h,c,d),p):null}},94178:(S,k,a)=>{var b=a(63557),g=new(a(26099));S.exports=function(h,c,u,m,d,p){return p.tilemapLayer.worldToTileXY(h,c,!0,g,d,p),b(g.x,g.y,u,m,p)}},15533:(S,k,a)=>{var b=a(7386),T=a(3956),g=new T(105,210,231,150),f=new T(243,134,48,200),h=new T(40,39,37,150);S.exports=function(u,m,d){void 0===m&&(m={});var p=void 0!==m.tileColor?m.tileColor:g,v=void 0!==m.collidingTileColor?m.collidingTileColor:f,x=void 0!==m.faceColor?m.faceColor:h,y=b(0,0,d.width,d.height,null,d);u.translateCanvas(d.tilemapLayer.x,d.tilemapLayer.y),u.scaleCanvas(d.tilemapLayer.scaleX,d.tilemapLayer.scaleY);for(var _=0;_{var b=a(7386);S.exports=function(g,f,h,c,u,m,d){for(var p=b(h,c,u,m,null,d),v=0;v{S.exports=function(a,b,T,g){var x,y,_,f=a.data,h=a.width,c=a.height,u=a.tilemapLayer,m=Math.max(0,b.left),d=Math.min(h,b.right),p=Math.max(0,b.top),v=Math.min(c,b.bottom);if(0===T)for(y=p;y=m;x--)(_=f[y][x])&&-1!==_.index&&_.visible&&0!==_.alpha&&g.push(_);else if(2===T)for(y=v;y>=p;y--)for(x=m;f[y]&&x=p;y--)for(x=d;f[y]&&x>=m;x--)(_=f[y][x])&&-1!==_.index&&_.visible&&0!==_.alpha&&g.push(_);return u.tilesDrawn=g.length,u.tilesTotal=h*c,g}},57068:(S,k,a)=>{var b=a(20576),T=a(42573),g=a(9589);S.exports=function(h,c,u,m,d){void 0===c&&(c=!0),void 0===u&&(u=!0),void 0===d&&(d=!0),Array.isArray(h)||(h=[h]);for(var p=0;p{var b=a(20576),T=a(42573),g=a(9589);S.exports=function(h,c,u,m,d,p){if(void 0===u&&(u=!0),void 0===m&&(m=!0),void 0===p&&(p=!0),!(h>c)){for(var v=h;v<=c;v++)g(v,u,d);if(p)for(var x=0;x=h&&_.index<=c&&b(_,u)}m&&T(0,0,d.width,d.height,d)}}},75661:(S,k,a)=>{var b=a(20576),T=a(42573),g=a(9589);S.exports=function(h,c,u,m){void 0===c&&(c=!0),void 0===u&&(u=!0),Array.isArray(h)||(h=[h]);for(var d=0;d{var b=a(20576),T=a(42573),g=a(97022);S.exports=function(h,c,u,m){void 0===c&&(c=!0),void 0===u&&(u=!0);for(var d=0;d{var b=a(20576),T=a(42573);S.exports=function(f,h,c){void 0===f&&(f=!0),void 0===h&&(h=!0);for(var u=0;u0&&b(d,f)}}h&&T(0,0,c.width,c.height,c)}},9589:S=>{S.exports=function(a,b,T){var g=T.collideIndexes.indexOf(a);b&&-1===g?T.collideIndexes.push(a):!b&&-1!==g&&T.collideIndexes.splice(g,1)}},20576:S=>{S.exports=function(a,b){b?a.setCollision(!0,!0,!0,!0,!1):a.resetCollision(!1)}},79583:S=>{S.exports=function(a,b,T,g){if("number"==typeof a)g.callbacks[a]=null!==b?{callback:b,callbackContext:T}:void 0;else for(var f=0,h=a.length;f{var b=a(7386);S.exports=function(g,f,h,c,u,m,d){for(var p=b(g,f,h,c,null,d),v=0;v{var b=a(7386),T=a(33680);S.exports=function(f,h,c,u,m){var d=b(f,h,c,u,null,m),p=d.map(function(x){return x.index});T(p);for(var v=0;v{var b=a(63448),T=a(56583);S.exports=function(f,h){var c=f.tilemapLayer.tilemap,u=f.tilemapLayer,m=Math.floor(c.tileWidth*u.scaleX),d=Math.floor(c.tileHeight*u.scaleY);return{left:T(h.worldView.x-u.x,m,0,!0)-u.cullPaddingX,right:b(h.worldView.right-u.x,m,0,!0)+u.cullPaddingX,top:T(h.worldView.y-u.y,d/2,0,!0)-u.cullPaddingY,bottom:b(h.worldView.bottom-u.y,d/2,0,!0)+u.cullPaddingY}}},54503:(S,k,a)=>{var b=a(61325),T=a(32483);S.exports=function(f,h,c,u){void 0===c&&(c=[]),void 0===u&&(u=0),c.length=0;var m=f.tilemapLayer,d=b(f,h);return m.skipCull&&1===m.scrollFactorX&&1===m.scrollFactorY&&(d.left=0,d.right=f.width,d.top=0,d.bottom=f.height),T(f,d,u,c),c}},97202:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u){h||(h=new b);var m=u.baseTileWidth,d=u.baseTileHeight,p=u.tilemapLayer,v=0,x=0;return p&&(c||(c=p.scene.cameras.main),v=p.x+c.scrollX*(1-p.scrollFactorX),m*=p.scaleX,x=p.y+c.scrollY*(1-p.scrollFactorY),d*=p.scaleY),h.set(v+g*m+f%2*(m/2),x+f*(d/2))}},28054:S=>{S.exports=function(a,b,T){var g=T.baseTileHeight,f=T.tilemapLayer,h=0;return f&&(void 0===b&&(b=f.scene.cameras.main),h=f.y+b.scrollY*(1-f.scrollFactorY),g*=f.scaleY),h+a*(g/2)+g}},15108:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m){c||(c=new b);var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(u||(u=v.scene.cameras.main),f-=v.y+u.scrollY*(1-v.scrollFactorY),p*=v.scaleY,g-=v.x+u.scrollX*(1-v.scrollFactorX),d*=v.scaleX);var x=h?Math.floor(f/(p/2)):f/(p/2),y=h?Math.floor((g+x%2*.5*d)/d):(g+x%2*.5*d)/d;return c.set(y,x)}},51900:S=>{S.exports=function(a,b,T,g){var f=g.baseTileHeight,h=g.tilemapLayer;return h&&(T||(T=h.scene.cameras.main),a-=h.y+T.scrollY*(1-h.scrollFactorY),f*=h.scaleY),b?Math.floor(a/(f/2)):a/(f/2)}},86560:(S,k,a)=>{var b=a(7386);S.exports=function(g,f,h,c,u,m,d){for(var p=b(h,c,u,m,null,d),v=0;v{S.exports=function(a,b,T){var g=T.baseTileWidth,f=T.tilemapLayer,h=0;return f&&(b||(b=f.scene.cameras.main),h=f.x+b.scrollX*(1-f.scrollFactorX),g*=f.scaleX),h+a*g}},70326:(S,k,a)=>{var b=a(97281),T=a(29650),g=a(26099);S.exports=function(h,c,u,m,d){return u||(u=new g(0,0)),u.x=b(h,m,d),u.y=T(c,m,d),u}},29650:S=>{S.exports=function(a,b,T){var g=T.baseTileHeight,f=T.tilemapLayer,h=0;return f&&(b||(b=f.scene.cameras.main),h=f.y+b.scrollY*(1-f.scrollFactorY),g*=f.scaleY),h+a*g}},77366:(S,k,a)=>{var b=a(7386),T=a(75508);S.exports=function(f,h,c,u,m,d){if(m){var p,v=b(f,h,c,u,null,d),x=0;for(p=0;p{var b=a(85896),g=new(a(26099));S.exports=function(h,c,u,m){return b(h,0,c,g,u,m),g.x}},85896:(S,k,a)=>{var b=a(26099);S.exports=function(g,f,h,c,u,m){void 0===h&&(h=!0),c||(c=new b);var d=m.baseTileWidth,p=m.baseTileHeight,v=m.tilemapLayer;v&&(u||(u=v.scene.cameras.main),g-=v.x+u.scrollX*(1-v.scrollFactorX),f-=v.y+u.scrollY*(1-v.scrollFactorY),d*=v.scaleX,p*=v.scaleY);var x=g/d,y=f/p;return h&&(x=Math.floor(x),y=Math.floor(y)),c.set(x,y)}},63288:(S,k,a)=>{var b=a(85896),g=new(a(26099));S.exports=function(h,c,u,m){return b(0,h,c,g,u,m),g.y}},81086:(S,k,a)=>{S.exports={CalculateFacesAt:a(72023),CalculateFacesWithin:a(42573),CheckIsoBounds:a(33528),Copy:a(1785),CreateFromTiles:a(78419),CullBounds:a(19545),CullTiles:a(30003),Fill:a(35137),FilterTiles:a(40253),FindByIndex:a(52692),FindTile:a(66151),ForEachTile:a(97560),GetCullTilesFunction:a(43305),GetTileAt:a(7423),GetTileAtWorldXY:a(60540),GetTileCorners:a(55826),GetTileCornersFunction:a(11758),GetTilesWithin:a(7386),GetTilesWithinShape:a(91141),GetTilesWithinWorldXY:a(96523),GetTileToWorldXFunction:a(39167),GetTileToWorldXYFunction:a(62e3),GetTileToWorldYFunction:a(5984),GetWorldToTileXFunction:a(96113),GetWorldToTileXYFunction:a(16926),GetWorldToTileYFunction:a(55762),HasTileAt:a(45091),HasTileAtWorldXY:a(24152),HexagonalCullBounds:a(90454),HexagonalCullTiles:a(9474),HexagonalGetTileCorners:a(27229),HexagonalTileToWorldXY:a(19951),HexagonalWorldToTileXY:a(86625),IsInLayerBounds:a(62991),IsometricCullTiles:a(14018),IsometricTileToWorldXY:a(14127),IsometricWorldToTileXY:a(96897),PutTileAt:a(71558),PutTileAtWorldXY:a(26303),PutTilesAt:a(14051),Randomize:a(77389),RemoveTileAt:a(63557),RemoveTileAtWorldXY:a(94178),RenderDebug:a(15533),ReplaceByIndex:a(27987),RunCull:a(32483),SetCollision:a(57068),SetCollisionBetween:a(37266),SetCollisionByExclusion:a(75661),SetCollisionByProperty:a(64740),SetCollisionFromCollisionGroup:a(63307),SetLayerCollisionIndex:a(9589),SetTileCollision:a(20576),SetTileIndexCallback:a(79583),SetTileLocationCallback:a(93254),Shuffle:a(32903),StaggeredCullBounds:a(61325),StaggeredCullTiles:a(54503),StaggeredTileToWorldXY:a(97202),StaggeredTileToWorldY:a(28054),StaggeredWorldToTileXY:a(15108),StaggeredWorldToTileY:a(51900),SwapByIndex:a(86560),TileToWorldX:a(97281),TileToWorldXY:a(70326),TileToWorldY:a(29650),WeightedRandomize:a(77366),WorldToTileX:a(10095),WorldToTileXY:a(85896),WorldToTileY:a(63288)}},91907:S=>{S.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},21829:(S,k,a)=>{var b={ORIENTATION:a(91907)};S.exports=b},62501:(S,k,a)=>{var b=a(79291),T=a(21829),g={Components:a(81086),Parsers:a(57442),Formats:a(80341),ImageCollection:a(16536),ParseToTilemap:a(31989),Tile:a(23029),Tilemap:a(49075),TilemapCreator:a(45939),TilemapFactory:a(46029),Tileset:a(33629),TilemapLayer:a(20442),Orientation:a(91907),LayerData:a(14977),MapData:a(87010),ObjectLayer:a(48700)};g=b(!1,g,T.ORIENTATION),S.exports=g},14977:(S,k,a)=>{var b=a(83419),T=a(91907),g=a(95540),f=new b({initialize:function(c){void 0===c&&(c={}),this.name=g(c,"name","layer"),this.id=g(c,"id",0),this.x=g(c,"x",0),this.y=g(c,"y",0),this.width=g(c,"width",0),this.height=g(c,"height",0),this.tileWidth=g(c,"tileWidth",0),this.tileHeight=g(c,"tileHeight",0),this.baseTileWidth=g(c,"baseTileWidth",this.tileWidth),this.baseTileHeight=g(c,"baseTileHeight",this.tileHeight),this.orientation=g(c,"orientation",T.ORTHOGONAL),this.widthInPixels=g(c,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=g(c,"heightInPixels",this.height*this.baseTileHeight),this.alpha=g(c,"alpha",1),this.visible=g(c,"visible",!0),this.properties=g(c,"properties",[]),this.indexes=g(c,"indexes",[]),this.collideIndexes=g(c,"collideIndexes",[]),this.callbacks=g(c,"callbacks",[]),this.bodies=g(c,"bodies",[]),this.data=g(c,"data",[]),this.tilemapLayer=g(c,"tilemapLayer",null),this.hexSideLength=g(c,"hexSideLength",0),this.staggerAxis=g(c,"staggerAxis","y"),this.staggerIndex=g(c,"staggerIndex","odd")}});S.exports=f},87010:(S,k,a)=>{var b=a(83419),T=a(91907),g=a(95540),f=new b({initialize:function(c){void 0===c&&(c={}),this.name=g(c,"name","map"),this.width=g(c,"width",0),this.height=g(c,"height",0),this.infinite=g(c,"infinite",!1),this.tileWidth=g(c,"tileWidth",0),this.tileHeight=g(c,"tileHeight",0),this.widthInPixels=g(c,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=g(c,"heightInPixels",this.height*this.tileHeight),this.format=g(c,"format",null),this.orientation=g(c,"orientation",T.ORTHOGONAL),this.renderOrder=g(c,"renderOrder","right-down"),this.version=g(c,"version","1"),this.properties=g(c,"properties",{}),this.layers=g(c,"layers",[]),this.images=g(c,"images",[]),this.objects=g(c,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=g(c,"collision",{}),this.tilesets=g(c,"tilesets",[]),this.imageCollections=g(c,"imageCollections",[]),this.tiles=g(c,"tiles",[]),this.hexSideLength=g(c,"hexSideLength",0),this.staggerAxis=g(c,"staggerAxis","y"),this.staggerIndex=g(c,"staggerIndex","odd")}});S.exports=f},48700:(S,k,a)=>{var b=a(83419),T=a(95540),g=new b({initialize:function(h){void 0===h&&(h={}),this.name=T(h,"name","object layer"),this.id=T(h,"id",0),this.opacity=T(h,"opacity",1),this.properties=T(h,"properties",{}),this.propertyTypes=T(h,"propertytypes",{}),this.type=T(h,"type","objectgroup"),this.visible=T(h,"visible",!0),this.objects=T(h,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});S.exports=g},6641:(S,k,a)=>{var b=a(91907);S.exports=function(g){return"isometric"===(g=g.toLowerCase())?b.ISOMETRIC:"staggered"===g?b.STAGGERED:"hexagonal"===g?b.HEXAGONAL:b.ORTHOGONAL}},46177:(S,k,a)=>{var b=a(80341),T=a(2342),g=a(82593),f=a(46594),h=a(87021);S.exports=function(u,m,d,p,v,x){var y;switch(m){case b.ARRAY_2D:y=T(u,d,p,v,x);break;case b.CSV:y=g(u,d,p,v,x);break;case b.TILED_JSON:y=f(u,d,x);break;case b.WELTMEISTER:y=h(u,d,x);break;default:console.warn("Unrecognized tilemap data format: "+m),y=null}return y}},2342:(S,k,a)=>{var b=a(80341),T=a(14977),g=a(87010),f=a(23029);S.exports=function(c,u,m,d,p){for(var v=new T({tileWidth:m,tileHeight:d}),x=new g({name:c,tileWidth:m,tileHeight:d,format:b.ARRAY_2D,layers:[v]}),y=[],_=u.length,E=0,A=0;A{var b=a(80341),T=a(2342);S.exports=function(f,h,c,u,m){var d=h.trim().split("\n").map(function(v){return v.split(",")}),p=T(f,d,c,u,m);return p.format=b.CSV,p}},6656:(S,k,a)=>{var b=a(14977),T=a(23029);S.exports=function(f,h){for(var c=[],u=0;u-1?new T(d,_,y,x,m.tilesize,m.tilesize):h?null:new T(d,-1,y,x,m.tilesize,m.tilesize),p.push(E)}v.push(p),p=[]}d.data=v,c.push(d)}return c}},96483:(S,k,a)=>{var b=a(33629);S.exports=function(g){for(var f=[],h=[],c=0;c{var b=a(80341),T=a(87010),g=a(6656),f=a(96483);S.exports=function(c,u,m){if(0===u.layer.length)return console.warn("No layers found in the Weltmeister map: "+c),null;for(var d=0,p=0,v=0;vd&&(d=u.layer[v].width),u.layer[v].height>p&&(p=u.layer[v].height);var x=new T({width:d,height:p,name:c,tileWidth:u.layer[0].tilesize,tileHeight:u.layer[0].tilesize,format:b.WELTMEISTER});return x.layers=g(u,m),x.tilesets=f(u),x}},52833:(S,k,a)=>{S.exports={ParseTileLayers:a(6656),ParseTilesets:a(96483),ParseWeltmeister:a(87021)}},57442:(S,k,a)=>{S.exports={FromOrientationString:a(6641),Parse:a(46177),Parse2DArray:a(2342),ParseCSV:a(82593),Impact:a(52833),Tiled:a(96761)}},51233:(S,k,a)=>{var b=a(79291);S.exports=function(g){for(var f,h,u,m,d=0;d{S.exports=function(a){for(var b=window.atob(a),T=b.length,g=new Array(T/4),f=0;f>>0;return g}},84101:(S,k,a)=>{var b=a(33629);S.exports=function(g){var f,h,c=[];for(f=0;f{var b=a(95540);S.exports=function(g,f,h){if(!f)return{i:0,layers:g.layers,name:"",opacity:1,visible:!0,x:0,y:0};var c=f.x+b(f,"startx",0)*g.tilewidth+b(f,"offsetx",0),u=f.y+b(f,"starty",0)*g.tileheight+b(f,"offsety",0);return{i:0,layers:f.layers,name:h.name+f.name+"/",opacity:h.opacity*f.opacity,visible:h.visible&&f.visible,x:h.x+c,y:h.y+u}}},29920:S=>{var k=2147483648,a=1073741824,b=536870912;S.exports=function(g){var f=!!(g&k),h=!!(g&a),c=!!(g&b);g&=~(k|a|b);var u=0,m=!1;return f&&h&&c?(u=Math.PI/2,m=!0):f&&h&&!c?(u=Math.PI,m=!1):f&&!h&&c?(u=Math.PI/2,m=!1):!f||h||c?!f&&h&&c?(u=3*Math.PI/2,m=!1):f||!h||c?f||h||!c?!f&&!h&&!c&&(u=0,m=!1):(u=3*Math.PI/2,m=!0):(u=Math.PI,m=!0):(u=0,m=!0),{gid:g,flippedHorizontal:f,flippedVertical:h,flippedAntiDiagonal:c,rotation:u,flipped:m}}},12635:(S,k,a)=>{var b=a(95540),T=a(79677);S.exports=function(f){for(var h=[],c=[],u=T(f);u.i0;)if(u.i>=u.layers.length){if(c.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}u=c.pop()}else{var m=u.layers[u.i];if(u.i++,"imagelayer"===m.type){var p=b(m,"offsetx",0)+b(m,"startx",0),v=b(m,"offsety",0)+b(m,"starty",0);h.push({name:u.name+m.name,image:m.image,x:u.x+p+m.x,y:u.y+v+m.y,alpha:u.opacity*m.opacity,visible:u.visible&&m.visible,properties:b(m,"properties",{})})}else if("group"===m.type){var d=T(f,m,u);c.push(u),u=d}}return h}},46594:(S,k,a)=>{var b=a(51233),T=a(84101),g=a(91907),f=a(62644),h=a(80341),c=a(6641),u=a(87010),m=a(12635),d=a(22611),p=a(28200),v=a(24619);S.exports=function(y,_,E){var A=f(_),D=new u({width:A.width,height:A.height,name:y,tileWidth:A.tilewidth,tileHeight:A.tileheight,orientation:c(A.orientation),format:h.TILED_JSON,version:A.version,properties:A.properties,renderOrder:A.renderorder,infinite:A.infinite});D.orientation===g.HEXAGONAL&&(D.hexSideLength=A.hexsidelength,D.staggerAxis=A.staggeraxis,D.staggerIndex=A.staggerindex),D.layers=p(A,E),D.images=m(A);var I=v(A);return D.tilesets=I.tilesets,D.imageCollections=I.imageCollections,D.objects=d(A),D.tiles=T(D),b(D),D}},52205:(S,k,a)=>{var b=a(18254),T=a(29920),g=function(c){return{x:c.x,y:c.y}},f=["id","name","type","rotation","properties","visible","x","y","width","height"];S.exports=function(c,u,m){void 0===u&&(u=0),void 0===m&&(m=0);var d=b(c,f);if(d.x+=u,d.y+=m,c.gid){var p=T(c.gid);d.gid=p.gid,d.flippedHorizontal=p.flippedHorizontal,d.flippedVertical=p.flippedVertical,d.flippedAntiDiagonal=p.flippedAntiDiagonal}else c.polyline?d.polyline=c.polyline.map(g):c.polygon?d.polygon=c.polygon.map(g):c.ellipse?d.ellipse=c.ellipse:c.text?d.text=c.text:c.point?d.point=!0:d.rectangle=!0;return d}},22611:(S,k,a)=>{var b=a(95540),T=a(52205),g=a(48700),f=a(79677);S.exports=function(c){for(var u=[],m=[],d=f(c);d.i0;)if(d.i>=d.layers.length){if(m.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}d=m.pop()}else{var p=d.layers[d.i];if(d.i++,p.opacity*=d.opacity,p.visible=d.visible&&p.visible,"objectgroup"===p.type){p.name=d.name+p.name;for(var x=d.x+b(p,"startx",0)+b(p,"offsetx",0),y=d.y+b(p,"starty",0)+b(p,"offsety",0),_=[],E=0;E{var b=a(41868),T=a(91907),g=a(79677),f=a(6641),h=a(95540),c=a(14977),u=a(29920),m=a(23029);S.exports=function(p,v){for(var x=h(p,"infinite",!1),y=[],_=[],E=g(p);E.i0;)if(E.i>=E.layers.length){if(_.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}E=_.pop()}else{var A=E.layers[E.i];if(E.i++,"tilelayer"===A.type)if(A.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+A.name+"'");else{if(A.encoding&&"base64"===A.encoding){if(A.chunks)for(var I=0;I0?((N=new m(R,F.gid,nt,ht,p.tilewidth,p.tileheight)).rotation=F.rotation,N.flipX=F.flipped,B[ht][nt]=N):(V=v?null:new m(R,-1,nt,ht,p.tilewidth,p.tileheight),B[ht][nt]=V),++H===at.width&&(it++,H=0)}}else{(R=new c({name:E.name+A.name,id:A.id,x:E.x+h(A,"offsetx",0)+A.x,y:E.y+h(A,"offsety",0)+A.y,width:A.width,height:A.height,tileWidth:p.tilewidth,tileHeight:p.tileheight,alpha:E.opacity*A.opacity,visible:E.visible&&A.visible,properties:h(A,"properties",[]),orientation:f(p.orientation)})).orientation===T.HEXAGONAL&&(R.hexSideLength=p.hexsidelength,R.staggerAxis=p.staggeraxis,R.staggerIndex=p.staggerindex);for(var gt=[],wt=0,St=A.data.length;wt0?((N=new m(R,F.gid,H,B.length,p.tilewidth,p.tileheight)).rotation=F.rotation,N.flipX=F.flipped,gt.push(N)):(V=v?null:new m(R,-1,H,B.length,p.tilewidth,p.tileheight),gt.push(V)),++H===A.width&&(B.push(gt),H=0,gt=[])}R.data=B,y.push(R)}else if("group"===A.type){var D=g(p,A,E);_.push(E),E=D}}return y}},24619:(S,k,a)=>{var b=a(33629),T=a(16536),g=a(52205),f=a(57880);S.exports=function(c){for(var p,u=[],m=[],d=null,v=0;v1){var _=void 0,E=void 0;if(Array.isArray(x.tiles)){_=_||{},E=E||{};for(var A=0;A{S.exports=function(a,b){for(var T=0;T0){var u,m,d,h={},c={};if(Array.isArray(g.edgecolors))for(u=0;u{S.exports={AssignTileProperties:a(51233),Base64Decode:a(41868),BuildTilesetIndex:a(84101),CreateGroupLayer:a(79677),ParseGID:a(29920),ParseImageLayers:a(12635),ParseJSONTiled:a(46594),ParseObject:a(52205),ParseObjectLayers:a(22611),ParseTileLayers:a(28200),ParseTilesets:a(24619)}},33385:(S,k,a)=>{var b=a(83419),T=a(37277),g=a(44594),f=a(94880),h=a(72905),c=new b({initialize:function(m){this.scene=m,this.systems=m.sys,this.now=0,this.startTime=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],m.sys.events.once(g.BOOT,this.boot,this),m.sys.events.on(g.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(g.DESTROY,this.destroy,this)},start:function(){this.startTime=this.systems.game.loop.time;var u=this.systems.events;u.on(g.PRE_UPDATE,this.preUpdate,this),u.on(g.UPDATE,this.update,this),u.once(g.SHUTDOWN,this.shutdown,this)},addEvent:function(u){var m;return u instanceof f?(this.removeEvent(m=u),m.elapsed=m.startAt,m.hasDispatched=!1,m.repeatCount=-1===m.repeat||m.loop?999999999999:m.repeat):m=new f(u),this._pendingInsertion.push(m),m},delayedCall:function(u,m,d,p){return this.addEvent({delay:u,callback:m,args:d,callbackScope:p})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(u){Array.isArray(u)||(u=[u]);for(var m=0;m-1&&this._active.splice(v,1),p.destroy()}for(d=0;d=p.delay)){var v=p.elapsed-p.delay;if(p.elapsed=p.delay,!p.hasDispatched&&p.callback&&(p.hasDispatched=!0,p.callback.apply(p.callbackScope,p.args)),p.repeatCount>0){if(p.repeatCount--,v>=p.delay)for(;v>=p.delay&&p.repeatCount>0;)p.callback&&p.callback.apply(p.callbackScope,p.args),v-=p.delay,p.repeatCount--;p.elapsed=v,p.hasDispatched=!1}else p.hasDispatched&&this._pendingRemoval.push(p)}}}},shutdown:function(){var u;for(u=0;u{var b=a(83419),T=a(50792),g=a(39429),f=a(95540),h=a(44594),c=a(89809),u=new b({Extends:T,initialize:function(d,p){T.call(this),this.scene=d,this.systems=d.sys,this.elapsed=0,this.timeScale=1,this.paused=!0,this.complete=!1,this.totalComplete=0,this.loop=0,this.iteration=0,this.events=[];var v=this.systems.events;v.on(h.PRE_UPDATE,this.preUpdate,this),v.on(h.UPDATE,this.update,this),v.once(h.SHUTDOWN,this.destroy,this),p&&this.add(p)},preUpdate:function(m,d){this.paused||(this.elapsed+=d*this.timeScale)},update:function(){if(!this.paused&&!this.complete){var m,x,d=this.events,p=!1,v=this.systems;for(m=0;m=d.length&&(0!==this.loop&&(-1===this.loop||this.loop>this.iteration)?(this.iteration++,this.reset(!0)):this.complete=!0),this.complete&&this.emit(c.COMPLETE,this)}},play:function(m){return void 0===m&&(m=!0),this.paused=!1,this.complete=!1,this.totalComplete=0,m&&this.reset(),this},pause:function(){this.paused=!0;for(var m=this.events,d=0;d0&&(p=d[d.length-1].time);for(var v=0;v{var b=a(83419),T=a(95540),g=new b({initialize:function(h){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(h)},reset:function(f){if(this.delay=T(f,"delay",0),this.repeat=T(f,"repeat",0),this.loop=T(f,"loop",!1),this.callback=T(f,"callback",void 0),this.callbackScope=T(f,"callbackScope",this),this.args=T(f,"args",[]),this.timeScale=T(f,"timeScale",1),this.startAt=T(f,"startAt",0),this.paused=T(f,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){return this.repeat>0?(this.elapsed+this.delay*(this.repeat-this.repeatCount))/(this.delay+this.delay*this.repeat):this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(f){void 0===f&&(f=!1),this.elapsed=this.delay,this.hasDispatched=!f,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});S.exports=g},35945:S=>{S.exports="complete"},89809:(S,k,a)=>{S.exports={COMPLETE:a(35945)}},90291:(S,k,a)=>{S.exports={Clock:a(33385),Events:a(89809),Timeline:a(96120),TimerEvent:a(94880)}},40382:(S,k,a)=>{var b=a(72905),T=a(83419),g=a(43491),f=a(88032),h=a(37277),c=a(44594),u=a(93109),m=a(86081),d=a(8357),p=a(43960),v=a(26012),x=new T({initialize:function(_){this.scene=_,this.events=_.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(c.BOOT,this.boot,this),this.events.on(c.START,this.start,this)},boot:function(){this.events.once(c.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(c.UPDATE,this.update,this),this.events.once(c.SHUTDOWN,this.shutdown,this)},create:function(y){Array.isArray(y)||(y=[y]);for(var _=[],E=0;E-1},existing:function(y){return this.has(y)||this.tweens.push(y.reset()),this},addCounter:function(y){var _=f(this,y);return this.tweens.push(_.reset()),_},stagger:function(y,_){return u(y,_)},setLagSmooth:function(y,_){return void 0===y&&(y=1/1e-8),void 0===_&&(_=0),this.maxLag=y,this.lagSkip=Math.min(_,this.maxLag),this},setFps:function(y){return void 0===y&&(y=240),this.gap=1e3/y,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(y){var _=Date.now()-this.prevTime;_>this.maxLag&&(this.startTime+=_-this.lagSkip),this.prevTime+=_;var E=this.prevTime-this.startTime,A=E-this.nextTime,D=E-1e3*this.time;return A>0||y?(this.time=E/=1e3,this.nextTime+=A+(A>=this.gap?4:this.gap-A)):D=0,D},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(y){void 0===y&&(y=!1);var _=this.getDelta(y);if(!(_<=0)){this.processing=!0;var E,A,D=[],I=this.tweens;for(E=0;E0){for(E=0;E-1&&(A.isPendingRemove()||A.isDestroyed())&&(I.splice(F,1),A.destroy())}D.length=0}this.processing=!1}},remove:function(y){return this.processing?y.setPendingRemoveState():(b(this.tweens,y),y.setRemovedState()),this},reset:function(y){return this.existing(y),y.seek(),y.setActiveState(),this},makeActive:function(y){return this.existing(y),y.setActiveState(),this},each:function(y,_){var E,A=[null];for(E=1;E{S.exports=function(a,b,T){return a&&a.hasOwnProperty(b)?a[b]:T}},6113:(S,k,a)=>{var b=a(62640),T=a(35355);S.exports=function(f,h){var c=b.Power0;if("string"==typeof f)if(b.hasOwnProperty(f))c=b[f];else{var u="";if(f.indexOf(".")){var m=(u=f.substring(f.indexOf(".")+1)).toLowerCase();"in"===m?u="easeIn":"out"===m?u="easeOut":"inout"===m&&(u="easeInOut")}f=T(f.substring(0,f.indexOf(".")+1)+u),b.hasOwnProperty(f)&&(c=b[f])}else"function"==typeof f&&(c=f);if(!h)return c;var d=h.slice(0);return d.unshift(0),function(p){return d[0]=p,c.apply(this,d)}}},91389:(S,k,a)=>{var b=a(89318),T=a(77259),f={bezier:b,catmull:T,catmullrom:T,linear:a(28392)};S.exports=function(c){if(null===c)return null;var u=f.linear;return"string"==typeof c?f.hasOwnProperty(c)&&(u=f[c]):"function"==typeof c&&(u=c),u}},55292:S=>{S.exports=function(a,b,T){return a.hasOwnProperty(b)?"function"==typeof a[b]?function(h,c,u,m,d,p){return a[b](h,c,u,m,d,p)}:function(){return a[b]}:"function"==typeof T?T:function(){return T}}},82985:(S,k,a)=>{var b=a(81076);S.exports=function(g){var f,h=[];if(g.hasOwnProperty("props"))for(f in g.props)"_"!==f.substring(0,1)&&h.push({key:f,value:g.props[f]});else for(f in g)-1===b.indexOf(f)&&"_"!==f.substring(0,1)&&h.push({key:f,value:g[f]});return h}},62329:(S,k,a)=>{var b=a(35154);S.exports=function(g){var f=b(g,"targets",null);return null===f||("function"==typeof f&&(f=f.call()),Array.isArray(f)||(f=[f])),f}},17777:(S,k,a)=>{var b=a(30976),T=a(99472);function g(m){return!!m.getActive&&"function"==typeof m.getActive}function f(m){return!!m.getStart&&"function"==typeof m.getStart}function h(m){return!!m.getEnd&&"function"==typeof m.getEnd}var u=function(m,d){var p,v=function(at,ot,J){return J},x=function(at,ot,J){return J},y=null,_=typeof d;if("number"===_)v=function(){return d};else if(Array.isArray(d))x=function(){return d[0]},v=function(){return d[d.length-1]};else if("string"===_){var E=d.toLowerCase(),A="random"===E.substring(0,6),D="int"===E.substring(0,3);if(A||D){var I=E.indexOf("("),R=E.indexOf(")"),F=E.indexOf(",");if(!(I&&R&&F))throw new Error("invalid random() format");var N=parseFloat(E.substring(I+1,F)),V=parseFloat(E.substring(F+1,R));v=A?function(){return T(N,V)}:function(){return b(N,V)}}else{E=E[0];var B=parseFloat(d.substr(2));switch(E){case"+":v=function(at,ot,J){return J+B};break;case"-":v=function(at,ot,J){return J-B};break;case"*":v=function(at,ot,J){return J*B};break;case"/":v=function(at,ot,J){return J/B};break;default:v=function(){return parseFloat(d)}}}}else if("function"===_)v=d;else if("object"===_)if(function c(m){return f(m)||h(m)||g(m)}(d))g(d)&&(y=d.getActive),h(d)&&(v=d.getEnd),f(d)&&(x=d.getStart);else if(d.hasOwnProperty("value"))p=u(m,d.value);else{var H=d.hasOwnProperty("to"),Q=d.hasOwnProperty("from"),G=d.hasOwnProperty("start");if(H&&(Q||G)){if(p=u(m,d.to),G){var K=u(m,d.start);p.getActive=K.getEnd}if(Q){var q=u(m,d.from);p.getStart=q.getEnd}}}return p||(p={getActive:y,getEnd:v,getStart:x}),p};S.exports=u},88032:(S,k,a)=>{var b=a(70402),T=a(69902),g=a(23568),f=a(57355),h=a(6113),c=a(55292),u=a(35154),m=a(17777),d=a(269),p=a(86081);S.exports=function(x,y,_){if(y instanceof p)return y.parent=x,y;_=void 0===_?T:d(T,_);var E=u(y,"from",0),A=u(y,"to",1),D=[{value:E}],I=u(y,"delay",_.delay),R=u(y,"easeParams",_.easeParams),F=u(y,"ease",_.ease),N=m("value",A),V=new p(x,D),B=V.add(0,"value",N.getEnd,N.getStart,N.getActive,h(u(y,"ease",F),u(y,"easeParams",R)),c(y,"delay",I),u(y,"duration",_.duration),f(y,"yoyo",_.yoyo),u(y,"hold",_.hold),u(y,"repeat",_.repeat),u(y,"repeatDelay",_.repeatDelay),!1,!1);B.start=E,B.current=E,V.completeDelay=g(y,"completeDelay",0),V.loop=Math.round(g(y,"loop",0)),V.loopDelay=Math.round(g(y,"loopDelay",0)),V.paused=f(y,"paused",!1),V.persist=f(y,"persist",!1),V.callbackScope=u(y,"callbackScope",V);for(var H=b.TYPES,Q=0;Q{var b=a(6113),T=a(35154),g=a(36383);S.exports=function(h,c){void 0===c&&(c={});var m=T(c,"start",0),d=T(c,"ease",null),p=T(c,"grid",null),v=T(c,"from",0),x="first"===v,y="center"===v,_="last"===v,E="number"==typeof v,A=Array.isArray(h),D=parseFloat(A?h[0]:h),I=A?parseFloat(h[1]):0,R=Math.max(D,I);if(A&&(m+=D),p){var F=p[0],N=p[1],V=0,B=0,H=0,Q=0,G=[];_?(V=F-1,B=N-1):E?(V=v%F,B=Math.floor(v/F)):y&&(V=(F-1)/2,B=(N-1)/2);for(var K=g.MIN_SAFE_INTEGER,q=0;qK&&(K=ot),G[q][at]=ot}}}var J=d?b(d):null;return p?function(it,Y,j,nt){var St,ht=0,gt=nt%F,wt=Math.floor(nt/F);if(gt>=0&>=0&&wt{var b=a(70402),T=a(69902),g=a(23568),f=a(57355),h=a(6113),c=a(91389),u=a(55292),m=a(82985),d=a(62329),p=a(35154),v=a(17777),x=a(269),y=a(86081);S.exports=function(E,A,D){if(A instanceof y)return A.parent=E,A;D=void 0===D?T:x(T,D);var I=d(A);!I&&D.targets&&(I=D.targets);for(var R=m(A),F=p(A,"delay",D.delay),N=p(A,"duration",D.duration),V=p(A,"easeParams",D.easeParams),B=p(A,"ease",D.ease),H=p(A,"hold",D.hold),Q=p(A,"repeat",D.repeat),G=p(A,"repeatDelay",D.repeatDelay),K=f(A,"yoyo",D.yoyo),q=f(A,"flipX",D.flipX),at=f(A,"flipY",D.flipY),ot=p(A,"interpolation",D.interpolation),J=function($t,qt,ne,le){if("texture"===ne){var Me=le,pi=void 0;Array.isArray(le)?(Me=le[0],pi=le[1]):le.hasOwnProperty("value")?(Me=le.value,Array.isArray(le.value)?(Me=le.value[0],pi=le.value[1]):"string"==typeof le.value&&(Me=le.value)):"string"==typeof le&&(Me=le),$t.addFrame(qt,Me,pi,u(le,"delay",F),p(le,"duration",N),p(le,"hold",H),p(le,"repeat",Q),p(le,"repeatDelay",G),f(le,"flipX",q),f(le,"flipY",at))}else{var Ie=v(ne,le),_i=c(p(le,"interpolation",ot));$t.add(qt,ne,Ie.getEnd,Ie.getStart,Ie.getActive,h(p(le,"ease",B),p(le,"easeParams",V)),u(le,"delay",F),p(le,"duration",N),f(le,"yoyo",K),p(le,"hold",H),p(le,"repeat",Q),p(le,"repeatDelay",G),f(le,"flipX",q),f(le,"flipY",at),_i,_i?le:null)}},it=new y(E,I),Y=0;Y{var b=a(70402),T=a(23568),g=a(57355),f=a(62329),h=a(35154),c=a(8357),u=a(43960);S.exports=function(d,p){if(p instanceof u)return p.parent=d,p;var v=new u(d);v.startDelay=h(p,"delay",0),v.completeDelay=T(p,"completeDelay",0),v.loop=Math.round(T(p,"loop",h(p,"repeat",0))),v.loopDelay=Math.round(T(p,"loopDelay",h(p,"repeatDelay",0))),v.paused=g(p,"paused",!1),v.persist=g(p,"persist",!1),v.callbackScope=h(p,"callbackScope",v);var x,y=b.TYPES;for(x=0;x{S.exports={GetBoolean:a(57355),GetEaseFunction:a(6113),GetInterpolationFunction:a(91389),GetNewValue:a(55292),GetProps:a(82985),GetTargets:a(62329),GetValueOp:a(17777),NumberTweenBuilder:a(88032),StaggerBuilder:a(93109),TweenBuilder:a(8357)}},73685:S=>{S.exports="active"},98540:S=>{S.exports="complete"},67233:S=>{S.exports="loop"},2859:S=>{S.exports="pause"},98336:S=>{S.exports="repeat"},25764:S=>{S.exports="resume"},32193:S=>{S.exports="start"},84371:S=>{S.exports="stop"},70766:S=>{S.exports="update"},55659:S=>{S.exports="yoyo"},842:(S,k,a)=>{S.exports={TWEEN_ACTIVE:a(73685),TWEEN_COMPLETE:a(98540),TWEEN_LOOP:a(67233),TWEEN_PAUSE:a(2859),TWEEN_RESUME:a(25764),TWEEN_REPEAT:a(98336),TWEEN_START:a(32193),TWEEN_STOP:a(84371),TWEEN_UPDATE:a(70766),TWEEN_YOYO:a(55659)}},43066:(S,k,a)=>{var b={States:a(86353),Builders:a(30231),Events:a(842),TweenManager:a(40382),Tween:a(86081),TweenData:a(48177),TweenFrameData:a(42220),BaseTween:a(70402),TweenChain:a(43960)};S.exports=b},70402:(S,k,a)=>{var b=a(83419),T=a(50792),g=a(842),f=a(86353),h=new b({Extends:T,initialize:function(u){T.call(this),this.parent=u,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=f.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.persist=!1},setTimeScale:function(c){return this.timeScale=c,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(g.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(g.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(g.TWEEN_COMPLETE,"onComplete")},complete:function(c){return void 0===c&&(c=0),c?(this.setCompleteDelayState(),this.countdown=c):this.onCompleteHandler(),this},completeAfterLoop:function(c){return void 0===c&&(c=0),this.loopCounter>c&&(this.loopCounter=c),this},remove:function(){return this.parent&&this.parent.remove(this),this},stop:function(){return this.parent&&!this.isRemoved()&&!this.isPendingRemove()&&!this.isDestroyed()&&(this.dispatchEvent(g.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(c){this.countdown-=c,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(g.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(c){return this.countdown-=c,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(g.TWEEN_START,"onStart"),c=0),c},updateCompleteDelay:function(c){this.countdown-=c,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(c,u,m){return void 0===m&&(m=[]),this.callbacks.hasOwnProperty(c)&&(this.callbacks[c]={func:u,params:m}),this},setPendingState:function(){this.state=f.PENDING},setActiveState:function(){this.state=f.ACTIVE,this.hasStarted=!1},setLoopDelayState:function(){this.state=f.LOOP_DELAY},setCompleteDelayState:function(){this.state=f.COMPLETE_DELAY},setStartDelayState:function(){this.state=f.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=f.PENDING_REMOVE},setRemovedState:function(){this.state=f.REMOVED},setFinishedState:function(){this.state=f.FINISHED},setDestroyedState:function(){this.state=f.DESTROYED},isPending:function(){return this.state===f.PENDING},isActive:function(){return this.state===f.ACTIVE},isLoopDelayed:function(){return this.state===f.LOOP_DELAY},isCompleteDelayed:function(){return this.state===f.COMPLETE_DELAY},isStartDelayed:function(){return this.state===f.START_DELAY},isPendingRemove:function(){return this.state===f.PENDING_REMOVE},isRemoved:function(){return this.state===f.REMOVED},isFinished:function(){return this.state===f.FINISHED},isDestroyed:function(){return this.state===f.DESTROYED},destroy:function(){this.data&&this.data.forEach(function(c){c.destroy()}),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});h.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],S.exports=h},95042:(S,k,a)=>{var b=a(83419),T=a(842),g=a(86353),f=new b({initialize:function(c,u,m,d,p,v,x,y,_,E){this.tween=c,this.targetIndex=u,this.duration=d,this.totalDuration=0,this.delay=0,this.getDelay=m,this.yoyo=p,this.hold=v,this.repeat=x,this.repeatDelay=y,this.repeatCounter=0,this.flipX=_,this.flipY=E,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(h){void 0===h&&(h=this.current),this.tween.targets[this.targetIndex][this.key]=h},setCreatedState:function(){this.state=g.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=g.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=g.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=g.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=g.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=g.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=g.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=g.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===g.CREATED},isDelayed:function(){return this.state===g.DELAY},isPendingRender:function(){return this.state===g.PENDING_RENDER},isPlayingForward:function(){return this.state===g.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===g.PLAYING_BACKWARD},isHolding:function(){return this.state===g.HOLD_DELAY},isRepeating:function(){return this.state===g.REPEAT_DELAY},isComplete:function(){return this.state===g.COMPLETE},setStateFromEnd:function(h){this.yoyo?this.onRepeat(h,!0,!0):this.repeatCounter>0?this.onRepeat(h,!0,!1):this.setCompleteState()},setStateFromStart:function(h){this.repeatCounter>0?this.onRepeat(h,!1):this.setCompleteState()},reset:function(){var h=this.tween,c=h.totalTargets,u=this.targetIndex,m=h.targets[u],d=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(m,d,0,u,c,h),this.repeatCounter=-1===this.repeat?g.MAX:this.repeat,this.setPendingRenderState();var p=this.duration+this.hold;this.yoyo&&(p+=this.duration);var v=p+this.repeatDelay;this.totalDuration=this.delay+p,-1===this.repeat?(this.totalDuration+=v*g.MAX,h.isInfinite=!0):this.repeat>0&&(this.totalDuration+=v*this.repeat),this.totalDuration>h.duration&&(h.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(h,c,u){var m=this.tween,d=m.totalTargets,p=this.targetIndex,v=m.targets[p],x=this.key,y="texture"!==x;if(this.elapsed=h,this.progress=h/this.duration,this.flipX&&v.toggleFlipX(),this.flipY&&v.toggleFlipY(),y&&(c||u)&&(this.start=this.getStartValue(v,x,this.start,p,d,m)),u)return this.setPlayingBackwardState(),void this.dispatchEvent(T.TWEEN_YOYO,"onYoyo");this.repeatCounter--,y&&(this.end=this.getEndValue(v,x,this.start,p,d,m)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-h,y&&(this.current=this.start,v[x]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(T.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});S.exports=f},69902:S=>{S.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},81076:S=>{S.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},86081:(S,k,a)=>{var b=a(70402),T=a(83419),g=a(842),f=a(44603),h=a(39429),c=a(36383),u=a(86353),m=a(48177),d=a(42220),p=new T({Extends:b,initialize:function(x,y){b.call(this,x),this.targets=y,this.totalTargets=y.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G){var K=new m(this,v,x,y,_,E,A,D,I,R,F,N,V,B,H,Q,G);return this.totalData=this.data.push(K),K},addFrame:function(v,x,y,_,E,A,D,I,R,F){var N=new d(this,v,x,y,_,E,A,D,I,R,F);return this.totalData=this.data.push(N),N},getValue:function(v){void 0===v&&(v=0);var x=null;return this.data&&(x=this.data[v].current),x},hasTarget:function(v){return this.targets&&-1!==this.targets.indexOf(v)},updateTo:function(v,x,y){if(void 0===y&&(y=!1),"texture"!==v)for(var _=0;_0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(g.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,b.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(v,x,y){if(void 0===v&&(v=0),void 0===x&&(x=16.6),void 0===y&&(y=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;y||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive");var _=this.paused;if(this.paused=!1,v>0){for(var E=Math.floor(v/x),A=v-E*x,D=0;D0&&this.update(A)}return this.paused=_,this.isSeeking=!1,this},initTweenData:function(v){void 0===v&&(v=!1),this.duration=0,this.startDelay=c.MAX_SAFE_INTEGER;for(var x=this.data,y=0;y0?_+E+(_+this.loopDelay)*A:_+E},reset:function(v){return void 0===v&&(v=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=u.MAX),v||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(g.TWEEN_ACTIVE,"onActive")),this},update:function(v){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(v*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(v),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(v),!1;this.hasStarted||(this.startDelay-=v,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(g.TWEEN_START,"onStart"),v=0));var x=!1;if(this.isActive())for(var y=this.data,_=0;_{var b=a(72905),T=a(70402),g=a(83419),f=a(842),h=a(44603),c=a(39429),u=a(86353),m=new g({Extends:T,initialize:function(p){T.call(this,p),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?u.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this},add:function(d){var p=this.parent.create(d);Array.isArray(p)||(p=[p]);for(var v=this.data,x=0;x0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(f.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var d=this.data,p=this.totalData,v=0;v{var b=a(95042),T=a(45319),g=a(83419),f=a(842),h=new g({Extends:b,initialize:function(u,m,d,p,v,x,y,_,E,A,D,I,R,F,N,V,B){b.call(this,u,m,_,E,A,D,I,R,F,N),this.key=d,this.getActiveValue=x,this.getEndValue=p,this.getStartValue=v,this.ease=y,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=V,this.interpolationData=B},reset:function(c){b.prototype.reset.call(this);var u=this.tween.targets[this.targetIndex],m=this.key;c&&(u[m]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(u[m]=this.getActiveValue(u,m,0))},update:function(c){var u=this.tween,m=u.totalTargets,d=this.targetIndex,p=u.targets[d],v=this.key;if(!p)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=c,this.elapsed<=0&&(this.elapsed=0,c=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(f.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(p,v,p[v],d,m,u),this.end=this.getEndValue(p,v,this.start,d,m,u),this.current=this.start,p[v]=this.start,this.setPlayingForwardState(),!0;var x=this.isPlayingForward(),y=this.isPlayingBackward();if(x||y){var _=this.elapsed,E=this.duration,A=0,D=!1;(_+=c)>=E?(A=_-E,_=E,D=!0):_<0&&(_=0);var I=T(_/E,0,1);this.elapsed=_,this.progress=I,this.previous=this.current,x||(I=1-I);var R=this.ease(I);this.current=this.interpolation?this.interpolation(this.interpolationData,R):this.start+(this.end-this.start)*R,p[v]=this.current,D&&(x?this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(A):this.setStateFromStart(A)),this.dispatchEvent(f.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(c,u){var m=this.tween;if(!m.isSeeking){var d=m.targets[this.targetIndex],p=this.key,v=this.current,x=this.previous;m.emit(c,m,p,d,v,x);var y=m.callbacks[u];y&&y.func.apply(m.callbackScope,[m,d,p,v,x].concat(y.params))}},destroy:function(){b.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});S.exports=h},42220:(S,k,a)=>{var b=a(95042),T=a(45319),g=a(83419),f=a(842),h=new g({Extends:b,initialize:function(u,m,d,p,v,x,y,_,E,A,D){b.call(this,u,m,v,x,!1,y,_,E,A,D),this.key="texture",this.startTexture=null,this.endTexture=d,this.startFrame=null,this.endFrame=p,this.yoyo=0!==_},reset:function(c){b.prototype.reset.call(this);var u=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=u.texture.key,this.startFrame=u.frame.name),c&&u.setTexture(this.startTexture,this.startFrame)},update:function(c){var d=this.tween.targets[this.targetIndex];if(!d)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=c,this.elapsed<=0&&(this.elapsed=0,c=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(f.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&d.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var p=this.isPlayingForward(),v=this.isPlayingBackward();if(p||v){var x=this.elapsed,y=this.duration,_=0,E=!1;(x+=c)>=y?(_=x-y,x=y,E=!0):x<0&&(x=0);var A=T(x/y,0,1);this.elapsed=x,this.progress=A,E&&(p?(d.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(_)):(d.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(_))),this.dispatchEvent(f.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(c,u){var m=this.tween;if(!m.isSeeking){var d=m.targets[this.targetIndex],p=this.key;m.emit(c,m,p,d);var v=m.callbacks[u];v&&v.func.apply(m.callbackScope,[m,d,p].concat(v.params))}},destroy:function(){b.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});S.exports=h},86353:S=>{S.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},83419:S=>{function a(h,c,u){var m=u?h[c]:Object.getOwnPropertyDescriptor(h,c);return!u&&m.value&&"object"==typeof m.value&&(m=m.value),!(!m||!function k(h){return!!h.get&&"function"==typeof h.get||!!h.set&&"function"==typeof h.set}(m))&&(typeof m.enumerable>"u"&&(m.enumerable=!0),typeof m.configurable>"u"&&(m.configurable=!0),m)}function b(h,c){var u=Object.getOwnPropertyDescriptor(h,c);return!!u&&(u.value&&"object"==typeof u.value&&(u=u.value),!1===u.configurable)}function T(h,c,u,m){for(var d in c)if(c.hasOwnProperty(d)){var p=a(c,d,u);if(!1!==p){if(b((m||h).prototype,d)){if(f.ignoreFinals)continue;throw new Error("cannot override final property '"+d+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(h.prototype,d,p)}else h.prototype[d]=c[d]}}function g(h,c){if(c){Array.isArray(c)||(c=[c]);for(var u=0;u{S.exports=function(){}},20242:S=>{S.exports=function(){return null}},71146:S=>{S.exports=function(a,b,T,g,f){if(void 0===f&&(f=a),T>0){var h=T-a.length;if(h<=0)return null}if(!Array.isArray(b))return-1===a.indexOf(b)?(a.push(b),g&&g.call(f,b),b):null;for(var c=b.length-1;c>=0;)-1!==a.indexOf(b[c])&&b.splice(c,1),c--;if(0===(c=b.length))return null;T>0&&c>h&&(b.splice(h),c=h);for(var u=0;u{S.exports=function(a,b,T,g,f,h){if(void 0===T&&(T=0),void 0===h&&(h=a),g>0){var c=g-a.length;if(c<=0)return null}if(!Array.isArray(b))return-1===a.indexOf(b)?(a.splice(T,0,b),f&&f.call(h,b),b):null;for(var u=b.length-1;u>=0;)-1!==a.indexOf(b[u])&&b.pop(),u--;if(0===(u=b.length))return null;g>0&&u>c&&(b.splice(c),u=c);for(var m=u-1;m>=0;m--){var d=b[m];a.splice(T,0,d),f&&f.call(h,d)}return b}},66905:S=>{S.exports=function(a,b){var T=a.indexOf(b);return-1!==T&&T{var b=a(82011);S.exports=function(g,f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=g.length);var m=0;if(b(g,c,u))for(var d=c;d{S.exports=function(a,b,T){var g,f=[null];for(g=3;g{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===c&&(c=0),void 0===u&&(u=g.length),b(g,c,u)){var m,d=[null];for(m=5;m{S.exports=function(a,b,T){if(!b.length)return NaN;if(1===b.length)return b[0];var f,h,g=1;if(T){if(ab.length&&(g=b.length),T?(h=b[g][T])-a<=a-(f=b[g-1][T])?b[g]:b[g-1]:(h=b[g])-a<=a-(f=b[g-1])?h:f}},43491:S=>{var k=function(a,b){void 0===b&&(b=[]);for(var T=0;T{var b=a(82011);S.exports=function(g,f,h,c,u){void 0===c&&(c=0),void 0===u&&(u=g.length);var m=[];if(b(g,c,u))for(var d=c;d{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===c&&(c=0),void 0===u&&(u=g.length),b(g,c,u))for(var m=c;m{S.exports=function(a,b,T){void 0===b&&(b=0),void 0===T&&(T=a.length);var g=b+Math.floor(Math.random()*T);return void 0===a[g]?null:a[g]}},85835:S=>{S.exports=function(a,b,T){if(b===T)return a;var g=a.indexOf(b),f=a.indexOf(T);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return g>f||(a.splice(g,1),f=a.indexOf(T),a.splice(f+1,0,b)),a}},83371:S=>{S.exports=function(a,b,T){if(b===T)return a;var g=a.indexOf(b),f=a.indexOf(T);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return g{S.exports=function(a,b){var T=a.indexOf(b);if(T>0){var g=a[T-1],f=a.indexOf(g);a[T]=g,a[f]=b}return a}},69693:S=>{S.exports=function(a,b,T){var g=a.indexOf(b);if(-1===g||T<0||T>=a.length)throw new Error("Supplied index out of bounds");return g!==T&&(a.splice(g,1),a.splice(T,0,b)),b}},40853:S=>{S.exports=function(a,b){var T=a.indexOf(b);if(-1!==T&&T{S.exports=function(a,b,T,g){var h,f=[],c=!1;if((T||g)&&(c=!0,T||(T=""),g||(g="")),b=b;h--)f.push(c?T+h.toString()+g:h);else for(h=a;h<=b;h++)f.push(c?T+h.toString()+g:h);return f}},593:(S,k,a)=>{var b=a(2284);S.exports=function(g,f,h){void 0===g&&(g=0),void 0===f&&(f=null),void 0===h&&(h=1),null===f&&(f=g,g=0);for(var c=[],u=Math.max(b((f-g)/(h||1)),0),m=0;m{function k(T,g,f){var h=T[g];T[g]=T[f],T[f]=h}function a(T,g){return Tg?1:0}var b=function(T,g,f,h,c){for(void 0===f&&(f=0),void 0===h&&(h=T.length-1),void 0===c&&(c=a);h>f;){if(h-f>600){var u=h-f+1,m=g-f+1,d=Math.log(u),p=.5*Math.exp(2*d/3),v=.5*Math.sqrt(d*p*(u-p)/u)*(m-u/2<0?-1:1),x=Math.max(f,Math.floor(g-m*p/u+v)),y=Math.min(h,Math.floor(g+(u-m)*p/u+v));b(T,g,x,y,c)}var _=T[g],E=f,A=h;for(k(T,f,g),c(T[h],_)>0&&k(T,f,h);E0;)A--}0===c(T[f],_)?k(T,f,A):k(T,++A,h),A<=g&&(f=A+1),g<=A&&(h=A-1)}};S.exports=b},88492:(S,k,a)=>{var b=a(35154),T=a(33680),g=function(h,c,u){for(var m=[],d=0;d{var b=a(19133);S.exports=function(g,f,h,c){var u;if(void 0===c&&(c=g),!Array.isArray(f))return-1!==(u=g.indexOf(f))?(b(g,u),h&&h.call(c,f),f):null;for(var m=f.length-1,d=[];m>=0;){var p=f[m];-1!==(u=g.indexOf(p))&&(b(g,u),d.push(p),h&&h.call(c,p)),m--}return d}},60248:(S,k,a)=>{var b=a(19133);S.exports=function(g,f,h,c){if(void 0===c&&(c=g),f<0||f>g.length-1)throw new Error("Index out of bounds");var u=b(g,f);return h&&h.call(c,u),u}},81409:(S,k,a)=>{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===f&&(f=0),void 0===h&&(h=g.length),void 0===u&&(u=g),b(g,f,h)){var d=g.splice(f,h-f);if(c)for(var p=0;p{var b=a(19133);S.exports=function(g,f,h){void 0===f&&(f=0),void 0===h&&(h=g.length);var c=f+Math.floor(Math.random()*h);return b(g,c)}},42169:S=>{S.exports=function(a,b,T){var g=a.indexOf(b),f=a.indexOf(T);return-1!==g&&-1===f&&(a[g]=T,!0)}},86003:S=>{S.exports=function(a,b){void 0===b&&(b=1);for(var T=null,g=0;g{S.exports=function(a,b){void 0===b&&(b=1);for(var T=null,g=0;g{S.exports=function(a,b,T,g){var f=a.length;if(b<0||b>f||b>=T||T>f){if(g)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},89545:S=>{S.exports=function(a,b){var T=a.indexOf(b);return-1!==T&&T>0&&(a.splice(T,1),a.unshift(b)),b}},17810:(S,k,a)=>{var b=a(82011);S.exports=function(g,f,h,c,u){if(void 0===c&&(c=0),void 0===u&&(u=g.length),b(g,c,u))for(var m=c;m{S.exports=function(a){for(var b=a.length-1;b>0;b--){var T=Math.floor(Math.random()*(b+1)),g=a[b];a[b]=a[T],a[T]=g}return a}},90126:S=>{S.exports=function(a){var b=/\D/g;return a.sort(function(T,g){return parseInt(T.replace(b,""),10)-parseInt(g.replace(b,""),10)}),a}},19133:S=>{S.exports=function(a,b){if(!(b>=a.length)){for(var T=a.length-1,g=a[b],f=b;f{var b=a(82264);function T(c,u){return String(c).localeCompare(u)}function f(c,u,m,d){var y,_,E,A,D,p=c.length,v=0,x=2*m;for(y=0;yp&&(_=p),E>p&&(E=p),A=y,D=_;;)if(A<_&&D{S.exports=function(a,b,T){if(b===T)return a;var g=a.indexOf(b),f=a.indexOf(T);if(g<0||f<0)throw new Error("Supplied items must be elements of the same array");return a[g]=T,a[f]=b,a}},37105:(S,k,a)=>{S.exports={Matrix:a(54915),Add:a(71146),AddAt:a(51067),BringToTop:a(66905),CountAllMatching:a(21612),Each:a(95428),EachInRange:a(36914),FindClosestInSorted:a(81957),Flatten:a(43491),GetAll:a(46710),GetFirst:a(58731),GetRandom:a(26546),MoveDown:a(70864),MoveTo:a(69693),MoveUp:a(40853),MoveAbove:a(85835),MoveBelow:a(83371),NumberArray:a(20283),NumberArrayStep:a(593),QuickSelect:a(43886),Range:a(88492),Remove:a(72905),RemoveAt:a(60248),RemoveBetween:a(81409),RemoveRandomElement:a(31856),Replace:a(42169),RotateLeft:a(86003),RotateRight:a(49498),SafeRange:a(82011),SendToBack:a(89545),SetAll:a(17810),Shuffle:a(33680),SortByDigits:a(90126),SpliceOne:a(19133),StableSort:a(19186),Swap:a(25630)}},86922:S=>{S.exports=function(a){if(!Array.isArray(a)||!Array.isArray(a[0]))return!1;for(var b=a[0].length,T=1;T{var b=a(41836),T=a(86922);S.exports=function(f){var h="";if(!T(f))return h;for(var c=0;c{S.exports=function(a){return a.reverse()}},21224:S=>{S.exports=function(a){for(var b=0;b{var b=a(37829);S.exports=function(g){return b(g,180)}},44657:(S,k,a)=>{var b=a(37829);S.exports=function(g,f){void 0===f&&(f=1);for(var h=0;h{var b=a(86922),T=a(2429);S.exports=function(f,h){if(void 0===h&&(h=90),!b(f))return null;if("string"!=typeof h&&(h=(h%360+360)%360),90===h||-270===h||"rotateLeft"===h)(f=T(f)).reverse();else if(-90===h||270===h||"rotateRight"===h)f.reverse(),f=T(f);else if(180===Math.abs(h)||"rotate180"===h){for(var c=0;c{var b=a(37829);S.exports=function(g,f){void 0===f&&(f=1);for(var h=0;h{var b=a(86003),T=a(49498);S.exports=function(f,h,c){if(void 0===h&&(h=0),void 0===c&&(c=0),0!==c&&(c<0?b(f,Math.abs(c)):T(f,c)),0!==h)for(var u=0;u{S.exports=function(a){for(var b=a.length,T=a[0].length,g=new Array(T),f=0;f-1;h--)g[f][h]=a[h][f]}return g}},54915:(S,k,a)=>{S.exports={CheckMatrix:a(86922),MatrixToString:a(63362),ReverseColumns:a(92598),ReverseRows:a(21224),Rotate180:a(98717),RotateLeft:a(44657),RotateMatrix:a(37829),RotateRight:a(92632),Translate:a(69512),TransposeMatrix:a(2429)}},71334:S=>{var k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";S.exports=function(b,T){for(var g=new Uint8Array(b),f=g.length,h=T?"data:"+T+";base64,":"",c=0;c>2],h+=k[(3&g[c])<<4|g[c+1]>>4],h+=k[(15&g[c+1])<<2|g[c+2]>>6],h+=k[63&g[c+2]];return f%3==2?h=h.substring(0,h.length-1)+"=":f%3==1&&(h=h.substring(0,h.length-2)+"=="),h}},53134:S=>{for(var a=new Uint8Array(256),b=0;b<64;b++)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(b)]=b;S.exports=function(g){var u,m,d,p,f=(g=g.substr(g.indexOf(",")+1)).length,h=.75*f,c=0;"="===g[f-1]&&(h--,"="===g[f-2]&&h--);for(var v=new ArrayBuffer(h),x=new Uint8Array(v),y=0;y>4,x[c++]=(15&m)<<4|d>>2,x[c++]=(3&d)<<6|63&p;return v}},65839:(S,k,a)=>{S.exports={ArrayBufferToBase64:a(71334),Base64ToArrayBuffer:a(53134)}},91799:(S,k,a)=>{S.exports={Array:a(37105),Base64:a(65839),Objects:a(1183),String:a(31749),NOOP:a(29747),NULL:a(20242)}},41786:S=>{S.exports=function(a){var b={};for(var T in a)b[T]=Array.isArray(a[T])?a[T].slice(0):a[T];return b}},62644:S=>{var k=function(a){var b,g;if("object"!=typeof a||null===a)return a;for(g in b=Array.isArray(a)?[]:{},a)b[g]=k(a[g]);return b};S.exports=k},79291:(S,k,a)=>{var b=a(41212),T=function(){var g,f,h,c,u,m,d=arguments[0]||{},p=1,v=arguments.length,x=!1;for("boolean"==typeof d&&(x=d,d=arguments[1]||{},p=2),v===p&&(d=this,--p);p{var b=a(75508),T=a(35154);S.exports=function(f,h,c){var u=T(f,h,null);if(null===u)return c;if(Array.isArray(u))return b.RND.pick(u);if("object"==typeof u){if(u.hasOwnProperty("randInt"))return b.RND.integerInRange(u.randInt[0],u.randInt[1]);if(u.hasOwnProperty("randFloat"))return b.RND.realInRange(u.randFloat[0],u.randFloat[1])}else if("function"==typeof u)return u(h);return u}},95540:S=>{S.exports=function(a,b,T){var g=typeof a;return a&&"number"!==g&&"string"!==g&&a.hasOwnProperty(b)&&void 0!==a[b]?a[b]:T}},82840:(S,k,a)=>{var b=a(35154),T=a(45319);S.exports=function(f,h,c,u,m){void 0===m&&(m=c);var d=b(f,h,m);return T(d,c,u)}},35154:S=>{S.exports=function(a,b,T,g){if(!a&&!g||"number"==typeof a)return T;if(a&&a.hasOwnProperty(b))return a[b];if(g&&g.hasOwnProperty(b))return g[b];if(-1!==b.indexOf(".")){for(var f=b.split("."),h=a,c=g,u=T,m=T,d=!0,p=!0,v=0;v{S.exports=function(a,b){for(var T=0;T{S.exports=function(a,b){for(var T=0;T{S.exports=function(a,b){return a.hasOwnProperty(b)}},41212:S=>{S.exports=function(a){if(!a||"object"!=typeof a||a.nodeType||a===a.window)return!1;try{if(a.constructor&&!{}.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}return!0}},46975:(S,k,a)=>{var b=a(41786);S.exports=function(g,f){var h=b(g);for(var c in f)h.hasOwnProperty(c)||(h[c]=f[c]);return h}},269:(S,k,a)=>{var b=a(41786);S.exports=function(g,f){var h=b(g);for(var c in f)h.hasOwnProperty(c)&&(h[c]=f[c]);return h}},18254:(S,k,a)=>{var b=a(97022);S.exports=function(g,f){for(var h={},c=0;c{S.exports=function(a,b,T){if(!a||"number"==typeof a)return!1;if(a.hasOwnProperty(b))return a[b]=T,!0;if(-1!==b.indexOf(".")){for(var g=b.split("."),f=a,h=a,c=0;c{S.exports={Clone:a(41786),DeepCopy:a(62644),Extend:a(79291),GetAdvancedValue:a(23568),GetFastValue:a(95540),GetMinMaxValue:a(82840),GetValue:a(35154),HasAll:a(69036),HasAny:a(1985),HasValue:a(97022),IsPlainObject:a(41212),Merge:a(46975),MergeRight:a(269),Pick:a(18254),SetValue:a(61622)}},27902:S=>{S.exports=function(a,b){return a.replace(/%([0-9]+)/g,function(T,g){return b[Number(g)-1]})}},41836:S=>{S.exports=function(a,b,T,g){void 0===b&&(b=0),void 0===T&&(T=" "),void 0===g&&(g=3);var f=0;if(b+1>=(a=a.toString()).length)switch(g){case 1:a=new Array(b+1-a.length).join(T)+a;break;case 3:var h=Math.ceil((f=b-a.length)/2);a=new Array(f-h+1).join(T)+a+new Array(h+1).join(T);break;default:a+=new Array(b+1-a.length).join(T)}return a}},33628:S=>{S.exports=function(a,b){return 0===b?a.slice(1):a.slice(0,b)+a.slice(b+1)}},27671:S=>{S.exports=function(a){return a.split("").reverse().join("")}},45650:S=>{S.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)})}},35355:S=>{S.exports=function(a){return a&&a[0].toUpperCase()+a.slice(1)}},31749:(S,k,a)=>{S.exports={Format:a(27902),Pad:a(41836),RemoveAt:a(33628),Reverse:a(27671),UppercaseFirst:a(35355),UUID:a(45650)}}},ps={};function Do(S){var k=ps[S];if(void 0!==k)return k.exports;var a=ps[S]={exports:{}};return kd[S](a,a.exports,Do),a.exports}return Do.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),Do(85454)})(),Gs.exports=Do()},293:Gs=>{"use strict";Gs.exports=JSON.parse('{"a":["ahole","anus","ash0le","ash0les","asholes","ass","Ass Monkey","Assface","assh0le","assh0lez","asshole","assholes","assholz","asswipe","azzhole","bassterds","bastard","bastards","bastardz","basterds","basterdz","Biatch","bitch","bitches","Blow Job","boffing","butthole","buttwipe","c0ck","c0cks","c0k","Carpet Muncher","cawk","cawks","Clit","cnts","cntz","cock","cockhead","cock-head","cocks","CockSucker","cock-sucker","crap","cum","cunt","cunts","cuntz","dick","dild0","dild0s","dildo","dildos","dilld0","dilld0s","dominatricks","dominatrics","dominatrix","dyke","enema","f u c k","f u c k e r","fag","fag1t","faget","fagg1t","faggit","faggot","fagg0t","fagit","fags","fagz","faig","faigs","fart","flipping the bird","fuck","fucker","fuckin","fucking","fucks","Fudge Packer","fuk","Fukah","Fuken","fuker","Fukin","Fukk","Fukkah","Fukken","Fukker","Fukkin","g00k","God-damned","h00r","h0ar","h0re","hells","hoar","hoor","hoore","jackoff","jap","japs","jerk-off","jisim","jiss","jizm","jizz","knob","knobs","knobz","kunt","kunts","kuntz","Lezzian","Lipshits","Lipshitz","masochist","masokist","massterbait","masstrbait","masstrbate","masterbaiter","masterbate","masterbates","Motha Fucker","Motha Fuker","Motha Fukkah","Motha Fukker","Mother Fucker","Mother Fukah","Mother Fuker","Mother Fukkah","Mother Fukker","mother-fucker","Mutha Fucker","Mutha Fukah","Mutha Fuker","Mutha Fukkah","Mutha Fukker","n1gr","nastt","nigger;","nigur;","niiger;","niigr;","orafis","orgasim;","orgasm","orgasum","oriface","orifice","orifiss","packi","packie","packy","paki","pakie","paky","pecker","peeenus","peeenusss","peenus","peinus","pen1s","penas","penis","penis-breath","penus","penuus","Phuc","Phuck","Phuk","Phuker","Phukker","polac","polack","polak","Poonani","pr1c","pr1ck","pr1k","pusse","pussee","pussy","puuke","puuker","qweir","recktum","rectum","retard","sadist","scank","schlong","screwing","semen","sex","sexy","Sh!t","sh1t","sh1ter","sh1ts","sh1tter","sh1tz","shit","shits","shitter","Shitty","Shity","shitz","Shyt","Shyte","Shytty","Shyty","skanck","skank","skankee","skankey","skanks","Skanky","slag","slut","sluts","Slutty","slutz","son-of-a-bitch","tit","turd","va1jina","vag1na","vagiina","vagina","vaj1na","vajina","vullva","vulva","w0p","wh00r","wh0re","whore","xrated","xxx","b!+ch","bitch","blowjob","clit","arschloch","fuck","shit","ass","asshole","b!tch","b17ch","b1tch","bastard","bi+ch","boiolas","buceta","c0ck","cawk","chink","cipa","clits","cock","cum","cunt","dildo","dirsa","ejakulate","fatass","fcuk","fuk","fux0r","hoer","hore","jism","kawk","l3itch","l3i+ch","masturbate","masterbat*","masterbat3","motherfucker","s.o.b.","mofo","nazi","nigga","nigger","nutsack","phuck","pimpis","pusse","pussy","scrotum","sh!t","shemale","shi+","sh!+","slut","smut","teets","tits","boobs","b00bs","teez","testical","testicle","titt","w00se","jackoff","wank","whoar","whore","*damn","*dyke","*fuck*","*shit*","@$$","amcik","andskota","arse*","assrammer","ayir","bi7ch","bitch*","bollock*","breasts","butt-pirate","cabron","cazzo","chraa","chuj","Cock*","cunt*","d4mn","daygo","dego","dick*","dike*","dupa","dziwka","ejackulate","Ekrem*","Ekto","enculer","faen","fag*","fanculo","fanny","feces","feg","Felcher","ficken","fitt*","Flikker","foreskin","Fotze","Fu(*","fuk*","futkretzn","gook","guiena","h0r","h4x0r","hell","helvete","hoer*","honkey","Huevon","hui","injun","jizz","kanker*","kike","klootzak","kraut","knulle","kuk","kuksuger","Kurac","kurwa","kusi*","kyrpa*","lesbo","mamhoon","masturbat*","merd*","mibun","monkleigh","mouliewop","muie","mulkku","muschi","nazis","nepesaurio","nigger*","orospu","paska*","perse","picka","pierdol*","pillu*","pimmel","piss*","pizda","poontsee","poop","porn","p0rn","pr0n","preteen","pula","pule","puta","puto","qahbeh","queef*","rautenberg","schaffer","scheiss*","schlampe","schmuck","screw","sh!t*","sharmuta","sharmute","shipal","shiz","skribz","skurwysyn","sphencter","spic","spierdalaj","splooge","suka","b00b*","testicle*","titt*","twat","vittu","wank*","wetback*","wichser","wop*","yed","zabourah"]}')}},Gs=>{Gs(Gs.s=951)}]); \ No newline at end of file diff --git a/docs/styles.6f8567121c5f43f5.css b/docs/styles.891591f966c73916.css similarity index 99% rename from docs/styles.6f8567121c5f43f5.css rename to docs/styles.891591f966c73916.css index 9b8c204..1840401 100644 --- a/docs/styles.6f8567121c5f43f5.css +++ b/docs/styles.891591f966c73916.css @@ -1 +1 @@ -.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0);background-color:var(--mat-ripple-color, rgba(0, 0, 0, .1))}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-app-background{background-color:var(--mat-app-background-color, transparent);color:var(--mat-app-text-color, inherit)}html{--mat-ripple-color: rgba(0, 0, 0, .1);--mat-option-selected-state-label-text-color: #616161;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-accent{--mat-option-selected-state-label-text-color: #0277bd;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-warn{--mat-option-selected-state-label-text-color: #f44336;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}html{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}.mat-primary{--mat-full-pseudo-checkbox-selected-icon-color: #616161;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #616161;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html,.mat-accent{--mat-full-pseudo-checkbox-selected-icon-color: #0277bd;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #0277bd;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}.mat-warn{--mat-full-pseudo-checkbox-selected-icon-color: #f44336;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #f44336;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html{--mat-app-background-color: #fafafa;--mat-app-text-color: rgba(0, 0, 0, .87)}.mat-elevation-z0,.mat-mdc-elevation-specific.mat-elevation-z0{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1,.mat-mdc-elevation-specific.mat-elevation-z1{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2,.mat-mdc-elevation-specific.mat-elevation-z2{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3,.mat-mdc-elevation-specific.mat-elevation-z3{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4,.mat-mdc-elevation-specific.mat-elevation-z4{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5,.mat-mdc-elevation-specific.mat-elevation-z5{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6,.mat-mdc-elevation-specific.mat-elevation-z6{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7,.mat-mdc-elevation-specific.mat-elevation-z7{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8,.mat-mdc-elevation-specific.mat-elevation-z8{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9,.mat-mdc-elevation-specific.mat-elevation-z9{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10,.mat-mdc-elevation-specific.mat-elevation-z10{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11,.mat-mdc-elevation-specific.mat-elevation-z11{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12,.mat-mdc-elevation-specific.mat-elevation-z12{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13,.mat-mdc-elevation-specific.mat-elevation-z13{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14,.mat-mdc-elevation-specific.mat-elevation-z14{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15,.mat-mdc-elevation-specific.mat-elevation-z15{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16,.mat-mdc-elevation-specific.mat-elevation-z16{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17,.mat-mdc-elevation-specific.mat-elevation-z17{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18,.mat-mdc-elevation-specific.mat-elevation-z18{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19,.mat-mdc-elevation-specific.mat-elevation-z19{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20,.mat-mdc-elevation-specific.mat-elevation-z20{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21,.mat-mdc-elevation-specific.mat-elevation-z21{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22,.mat-mdc-elevation-specific.mat-elevation-z22{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23,.mat-mdc-elevation-specific.mat-elevation-z23{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24,.mat-mdc-elevation-specific.mat-elevation-z24{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker{display:none}html{--mdc-elevated-card-container-shape: 4px;--mdc-outlined-card-container-shape: 4px;--mdc-outlined-card-outline-width: 1px;--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color: rgba(0, 0, 0, .54);--mdc-linear-progress-active-indicator-height: 4px;--mdc-linear-progress-track-height: 4px;--mdc-linear-progress-track-shape: 0}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color: #616161;--mdc-linear-progress-track-color: rgba(97, 97, 97, .25)}.mat-mdc-progress-bar.mat-accent{--mdc-linear-progress-active-indicator-color: #0277bd;--mdc-linear-progress-track-color: rgba(2, 119, 189, .25)}.mat-mdc-progress-bar.mat-warn{--mdc-linear-progress-active-indicator-color: #f44336;--mdc-linear-progress-track-color: rgba(244, 67, 54, .25)}html{--mdc-plain-tooltip-container-shape: 4px;--mdc-plain-tooltip-supporting-text-line-height: 16px;--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff;--mdc-filled-text-field-active-indicator-height: 1px;--mdc-filled-text-field-focus-active-indicator-height: 2px;--mdc-filled-text-field-container-shape: 4px;--mdc-outlined-text-field-outline-width: 1px;--mdc-outlined-text-field-focus-outline-width: 2px;--mdc-outlined-text-field-container-shape: 4px;--mdc-filled-text-field-caret-color: #616161;--mdc-filled-text-field-focus-active-indicator-color: #616161;--mdc-filled-text-field-focus-label-text-color: rgba(97, 97, 97, .87);--mdc-filled-text-field-container-color: whitesmoke;--mdc-filled-text-field-disabled-container-color: #fafafa;--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-hover-label-text-color: #f44336;--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336;--mdc-outlined-text-field-caret-color: #616161;--mdc-outlined-text-field-focus-outline-color: #616161;--mdc-outlined-text-field-focus-label-text-color: rgba(97, 97, 97, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-error-hover-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336;--mat-form-field-focus-select-arrow-color: rgba(97, 97, 97, .87);--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38);--mat-form-field-state-layer-color: rgba(0, 0, 0, .87);--mat-form-field-error-text-color: #f44336;--mat-form-field-select-option-text-color: inherit;--mat-form-field-select-disabled-option-text-color: GrayText;--mat-form-field-leading-icon-color: unset;--mat-form-field-disabled-leading-icon-color: unset;--mat-form-field-trailing-icon-color: unset;--mat-form-field-disabled-trailing-icon-color: unset;--mat-form-field-error-focus-trailing-icon-color: unset;--mat-form-field-error-hover-trailing-icon-color: unset;--mat-form-field-error-trailing-icon-color: unset;--mat-form-field-enabled-select-arrow-color: rgba(0, 0, 0, .54);--mat-form-field-disabled-select-arrow-color: rgba(0, 0, 0, .38);--mat-form-field-hover-state-layer-opacity: .04;--mat-form-field-focus-state-layer-opacity: .08}.mat-mdc-form-field.mat-accent{--mdc-filled-text-field-caret-color: #0277bd;--mdc-filled-text-field-focus-active-indicator-color: #0277bd;--mdc-filled-text-field-focus-label-text-color: rgba(2, 119, 189, .87);--mdc-outlined-text-field-caret-color: #0277bd;--mdc-outlined-text-field-focus-outline-color: #0277bd;--mdc-outlined-text-field-focus-label-text-color: rgba(2, 119, 189, .87);--mat-form-field-focus-select-arrow-color: rgba(2, 119, 189, .87)}.mat-mdc-form-field.mat-warn{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mat-form-field-focus-select-arrow-color: rgba(244, 67, 54, .87)}html{--mat-form-field-container-height: 56px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 16px;--mat-form-field-filled-with-label-container-padding-top: 24px;--mat-form-field-filled-with-label-container-padding-bottom: 8px;--mat-select-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(97, 97, 97, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-accent{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(2, 119, 189, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-warn{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html{--mat-select-arrow-transform: translateY(-8px);--mat-autocomplete-container-shape: 4px;--mat-autocomplete-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-autocomplete-background-color: white;--mdc-dialog-container-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12);--mdc-dialog-container-shadow-color: #000;--mdc-dialog-container-shape: 4px;--mat-dialog-container-max-width: 80vw;--mat-dialog-container-small-max-width: 80vw;--mat-dialog-container-min-width: 0;--mat-dialog-actions-alignment: start;--mat-dialog-actions-padding: 8px;--mat-dialog-content-padding: 20px 24px;--mat-dialog-with-actions-content-padding: 20px 24px;--mat-dialog-headline-padding: 0 24px 9px;--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}.mat-mdc-standard-chip{--mdc-chip-container-shape-family: rounded;--mdc-chip-container-shape-radius: 16px 16px 16px 16px;--mdc-chip-with-avatar-avatar-shape-family: rounded;--mdc-chip-with-avatar-avatar-shape-radius: 14px 14px 14px 14px;--mdc-chip-with-avatar-avatar-size: 28px;--mdc-chip-with-icon-icon-size: 18px;--mdc-chip-outline-width: 0;--mdc-chip-outline-color: transparent;--mdc-chip-disabled-outline-color: transparent;--mdc-chip-focus-outline-color: transparent;--mdc-chip-hover-state-layer-opacity: .04;--mdc-chip-with-avatar-disabled-avatar-opacity: 1;--mdc-chip-flat-selected-outline-width: 0;--mdc-chip-selected-hover-state-layer-opacity: .04;--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity: 1;--mdc-chip-with-icon-disabled-icon-opacity: 1;--mat-chip-disabled-container-opacity: .4;--mat-chip-trailing-action-opacity: .54;--mat-chip-trailing-action-focus-opacity: 1;--mat-chip-trailing-action-state-layer-color: transparent;--mat-chip-selected-trailing-action-state-layer-color: transparent;--mat-chip-trailing-action-hover-state-layer-opacity: 0;--mat-chip-trailing-action-focus-state-layer-opacity: 0;--mdc-chip-disabled-label-text-color: #212121;--mdc-chip-elevated-container-color: #e0e0e0;--mdc-chip-elevated-selected-container-color: #e0e0e0;--mdc-chip-elevated-disabled-container-color: #e0e0e0;--mdc-chip-flat-disabled-selected-container-color: #e0e0e0;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: #212121;--mdc-chip-selected-label-text-color: #212121;--mdc-chip-with-icon-icon-color: #212121;--mdc-chip-with-icon-disabled-icon-color: #212121;--mdc-chip-with-icon-selected-icon-color: #212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: #212121;--mdc-chip-with-trailing-icon-trailing-icon-color: #212121;--mat-chip-selected-disabled-trailing-icon-color: #212121;--mat-chip-selected-trailing-icon-color: #212121}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-primary,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-primary{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #616161;--mdc-chip-elevated-selected-container-color: #616161;--mdc-chip-elevated-disabled-container-color: #616161;--mdc-chip-flat-disabled-selected-container-color: #616161;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-accent,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-accent{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #0277bd;--mdc-chip-elevated-selected-container-color: #0277bd;--mdc-chip-elevated-disabled-container-color: #0277bd;--mdc-chip-flat-disabled-selected-container-color: #0277bd;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-warn,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-warn{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #f44336;--mdc-chip-elevated-selected-container-color: #f44336;--mdc-chip-elevated-disabled-container-color: #f44336;--mdc-chip-flat-disabled-selected-container-color: #f44336;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 32px}html{--mdc-switch-disabled-selected-icon-opacity: .38;--mdc-switch-disabled-track-opacity: .12;--mdc-switch-disabled-unselected-icon-opacity: .38;--mdc-switch-handle-height: 20px;--mdc-switch-handle-shape: 10px;--mdc-switch-handle-width: 20px;--mdc-switch-selected-icon-size: 18px;--mdc-switch-track-height: 14px;--mdc-switch-track-shape: 7px;--mdc-switch-track-width: 36px;--mdc-switch-unselected-icon-size: 18px;--mdc-switch-selected-focus-state-layer-opacity: .12;--mdc-switch-selected-hover-state-layer-opacity: .04;--mdc-switch-selected-pressed-state-layer-opacity: .1;--mdc-switch-unselected-focus-state-layer-opacity: .12;--mdc-switch-unselected-hover-state-layer-opacity: .04;--mdc-switch-unselected-pressed-state-layer-opacity: .1;--mat-switch-disabled-selected-handle-opacity: .38;--mat-switch-disabled-unselected-handle-opacity: .38;--mat-switch-unselected-handle-size: 20px;--mat-switch-selected-handle-size: 20px;--mat-switch-pressed-handle-size: 20px;--mat-switch-with-icon-handle-size: 20px;--mat-switch-selected-handle-horizontal-margin: 0;--mat-switch-selected-with-icon-handle-horizontal-margin: 0;--mat-switch-selected-pressed-handle-horizontal-margin: 0;--mat-switch-unselected-handle-horizontal-margin: 0;--mat-switch-unselected-with-icon-handle-horizontal-margin: 0;--mat-switch-unselected-pressed-handle-horizontal-margin: 0;--mat-switch-visible-track-opacity: 1;--mat-switch-hidden-track-opacity: 1;--mat-switch-visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, .2, 1);--mat-switch-hidden-track-transition: transform 75ms 0ms cubic-bezier(.4, 0, .6, 1);--mat-switch-track-outline-width: 1px;--mat-switch-track-outline-color: transparent;--mat-switch-selected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-color: transparent;--mdc-switch-selected-focus-state-layer-color: #757575;--mdc-switch-selected-handle-color: #757575;--mdc-switch-selected-hover-state-layer-color: #757575;--mdc-switch-selected-pressed-state-layer-color: #757575;--mdc-switch-selected-focus-handle-color: #212121;--mdc-switch-selected-hover-handle-color: #212121;--mdc-switch-selected-pressed-handle-color: #212121;--mdc-switch-selected-focus-track-color: #e0e0e0;--mdc-switch-selected-hover-track-color: #e0e0e0;--mdc-switch-selected-pressed-track-color: #e0e0e0;--mdc-switch-selected-track-color: #e0e0e0;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: var(--mdc-theme-surface, #fff);--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-handle-shadow-color: black;--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0;--mdc-switch-disabled-label-text-color: rgba(0, 0, 0, .38)}html .mat-mdc-slide-toggle{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}html .mat-mdc-slide-toggle.mat-accent{--mdc-switch-selected-focus-state-layer-color: #039be5;--mdc-switch-selected-handle-color: #039be5;--mdc-switch-selected-hover-state-layer-color: #039be5;--mdc-switch-selected-pressed-state-layer-color: #039be5;--mdc-switch-selected-focus-handle-color: #01579b;--mdc-switch-selected-hover-handle-color: #01579b;--mdc-switch-selected-pressed-handle-color: #01579b;--mdc-switch-selected-focus-track-color: #4fc3f7;--mdc-switch-selected-hover-track-color: #4fc3f7;--mdc-switch-selected-pressed-track-color: #4fc3f7;--mdc-switch-selected-track-color: #4fc3f7}html .mat-mdc-slide-toggle.mat-warn{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}html{--mdc-switch-state-layer-size: 40px;--mdc-radio-disabled-selected-icon-opacity: .38;--mdc-radio-disabled-unselected-icon-opacity: .38;--mdc-radio-state-layer-size: 40px}.mat-mdc-radio-button{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-radio-button.mat-primary{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #616161;--mdc-radio-selected-hover-icon-color: #616161;--mdc-radio-selected-icon-color: #616161;--mdc-radio-selected-pressed-icon-color: #616161;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #616161;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-accent{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0277bd;--mdc-radio-selected-hover-icon-color: #0277bd;--mdc-radio-selected-icon-color: #0277bd;--mdc-radio-selected-pressed-icon-color: #0277bd;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #0277bd;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-warn{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}html{--mdc-radio-state-layer-size: 40px;--mat-radio-touch-target-display: block;--mat-slider-value-indicator-width: auto;--mat-slider-value-indicator-height: 32px;--mat-slider-value-indicator-caret-display: block;--mat-slider-value-indicator-border-radius: 4px;--mat-slider-value-indicator-padding: 0 12px;--mat-slider-value-indicator-text-transform: none;--mat-slider-value-indicator-container-transform: translateX(-50%);--mdc-slider-active-track-height: 6px;--mdc-slider-active-track-shape: 9999px;--mdc-slider-handle-height: 20px;--mdc-slider-handle-shape: 50%;--mdc-slider-handle-width: 20px;--mdc-slider-inactive-track-height: 4px;--mdc-slider-inactive-track-shape: 9999px;--mdc-slider-with-overlap-handle-outline-width: 1px;--mdc-slider-with-tick-marks-active-container-opacity: .6;--mdc-slider-with-tick-marks-container-shape: 50%;--mdc-slider-with-tick-marks-container-size: 2px;--mdc-slider-with-tick-marks-inactive-container-opacity: .6;--mdc-slider-handle-color: #616161;--mdc-slider-focus-handle-color: #616161;--mdc-slider-hover-handle-color: #616161;--mdc-slider-active-track-color: #616161;--mdc-slider-inactive-track-color: #616161;--mdc-slider-with-tick-marks-inactive-container-color: #616161;--mdc-slider-with-tick-marks-active-container-color: white;--mdc-slider-disabled-active-track-color: #000;--mdc-slider-disabled-handle-color: #000;--mdc-slider-disabled-inactive-track-color: #000;--mdc-slider-label-container-color: #000;--mdc-slider-label-label-text-color: #fff;--mdc-slider-with-overlap-handle-outline-color: #fff;--mdc-slider-with-tick-marks-disabled-container-color: #000;--mdc-slider-handle-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-slider-ripple-color: #616161;--mat-slider-hover-state-layer-color: rgba(97, 97, 97, .05);--mat-slider-focus-state-layer-color: rgba(97, 97, 97, .2);--mat-slider-value-indicator-opacity: .6}html .mat-accent{--mat-slider-ripple-color: #0277bd;--mat-slider-hover-state-layer-color: rgba(2, 119, 189, .05);--mat-slider-focus-state-layer-color: rgba(2, 119, 189, .2);--mdc-slider-handle-color: #0277bd;--mdc-slider-focus-handle-color: #0277bd;--mdc-slider-hover-handle-color: #0277bd;--mdc-slider-active-track-color: #0277bd;--mdc-slider-inactive-track-color: #0277bd;--mdc-slider-with-tick-marks-inactive-container-color: #0277bd;--mdc-slider-with-tick-marks-active-container-color: white}html .mat-warn{--mat-slider-ripple-color: #f44336;--mat-slider-hover-state-layer-color: rgba(244, 67, 54, .05);--mat-slider-focus-state-layer-color: rgba(244, 67, 54, .2);--mdc-slider-handle-color: #f44336;--mdc-slider-focus-handle-color: #f44336;--mdc-slider-hover-handle-color: #f44336;--mdc-slider-active-track-color: #f44336;--mdc-slider-inactive-track-color: #f44336;--mdc-slider-with-tick-marks-inactive-container-color: #f44336;--mdc-slider-with-tick-marks-active-container-color: white}html{--mat-menu-container-shape: 4px;--mat-menu-divider-bottom-spacing: 0;--mat-menu-divider-top-spacing: 0;--mat-menu-item-spacing: 16px;--mat-menu-item-icon-size: 24px;--mat-menu-item-leading-spacing: 16px;--mat-menu-item-trailing-spacing: 16px;--mat-menu-item-with-icon-leading-spacing: 16px;--mat-menu-item-with-icon-trailing-spacing: 16px;--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white;--mat-menu-divider-color: rgba(0, 0, 0, .12);--mdc-list-list-item-container-shape: 0;--mdc-list-list-item-leading-avatar-shape: 50%;--mdc-list-list-item-container-color: transparent;--mdc-list-list-item-selected-container-color: transparent;--mdc-list-list-item-leading-avatar-color: transparent;--mdc-list-list-item-leading-icon-size: 24px;--mdc-list-list-item-leading-avatar-size: 40px;--mdc-list-list-item-trailing-icon-size: 24px;--mdc-list-list-item-disabled-state-layer-color: transparent;--mdc-list-list-item-disabled-state-layer-opacity: 0;--mdc-list-list-item-disabled-label-text-opacity: .38;--mdc-list-list-item-disabled-leading-icon-opacity: .38;--mdc-list-list-item-disabled-trailing-icon-opacity: .38;--mat-list-active-indicator-color: transparent;--mat-list-active-indicator-shape: 0;--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #616161;--mdc-radio-selected-hover-icon-color: #616161;--mdc-radio-selected-icon-color: #616161;--mdc-radio-selected-pressed-icon-color: #616161}.mat-accent .mdc-list-item__start,.mat-accent .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0277bd;--mdc-radio-selected-hover-icon-color: #0277bd;--mdc-radio-selected-icon-color: #0277bd;--mdc-radio-selected-pressed-icon-color: #0277bd}.mat-warn .mdc-list-item__start,.mat-warn .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #616161;--mdc-checkbox-selected-hover-icon-color: #616161;--mdc-checkbox-selected-icon-color: #616161;--mdc-checkbox-selected-pressed-icon-color: #616161;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #616161;--mdc-checkbox-selected-hover-state-layer-color: #616161;--mdc-checkbox-selected-pressed-state-layer-color: #616161;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-accent{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #0277bd;--mdc-checkbox-selected-hover-icon-color: #0277bd;--mdc-checkbox-selected-icon-color: #0277bd;--mdc-checkbox-selected-pressed-icon-color: #0277bd;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0277bd;--mdc-checkbox-selected-hover-state-layer-color: #0277bd;--mdc-checkbox-selected-pressed-state-layer-color: #0277bd;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#616161}.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end{opacity:1}html{--mdc-list-list-item-one-line-container-height: 48px;--mdc-list-list-item-two-line-container-height: 64px;--mdc-list-list-item-three-line-container-height: 88px;--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-state-layer-size: 40px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}html{--mat-paginator-container-text-color: rgba(0, 0, 0, .87);--mat-paginator-container-background-color: white;--mat-paginator-enabled-icon-color: rgba(0, 0, 0, .54);--mat-paginator-disabled-icon-color: rgba(0, 0, 0, .12);--mat-paginator-container-size: 56px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mdc-tab-indicator-active-indicator-height: 2px;--mdc-tab-indicator-active-indicator-shape: 0;--mdc-secondary-navigation-tab-container-height: 48px;--mat-tab-header-divider-color: transparent;--mat-tab-header-divider-height: 0}.mat-mdc-tab-group,.mat-mdc-tab-nav-bar{--mdc-tab-indicator-active-indicator-color: #616161;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #616161;--mat-tab-header-active-ripple-color: #616161;--mat-tab-header-inactive-ripple-color: #616161;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #616161;--mat-tab-header-active-hover-label-text-color: #616161;--mat-tab-header-active-focus-indicator-color: #616161;--mat-tab-header-active-hover-indicator-color: #616161}.mat-mdc-tab-group.mat-accent,.mat-mdc-tab-nav-bar.mat-accent{--mdc-tab-indicator-active-indicator-color: #0277bd;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #0277bd;--mat-tab-header-active-ripple-color: #0277bd;--mat-tab-header-inactive-ripple-color: #0277bd;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #0277bd;--mat-tab-header-active-hover-label-text-color: #0277bd;--mat-tab-header-active-focus-indicator-color: #0277bd;--mat-tab-header-active-hover-indicator-color: #0277bd}.mat-mdc-tab-group.mat-warn,.mat-mdc-tab-nav-bar.mat-warn{--mdc-tab-indicator-active-indicator-color: #f44336;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #f44336;--mat-tab-header-active-ripple-color: #f44336;--mat-tab-header-inactive-ripple-color: #f44336;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #f44336;--mat-tab-header-active-hover-label-text-color: #f44336;--mat-tab-header-active-focus-indicator-color: #f44336;--mat-tab-header-active-hover-indicator-color: #f44336}.mat-mdc-tab-group.mat-background-primary,.mat-mdc-tab-nav-bar.mat-background-primary{--mat-tab-header-with-background-background-color: #616161;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-accent,.mat-mdc-tab-nav-bar.mat-background-accent{--mat-tab-header-with-background-background-color: #0277bd;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-warn,.mat-mdc-tab-nav-bar.mat-background-warn{--mat-tab-header-with-background-background-color: #f44336;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-header{--mdc-secondary-navigation-tab-container-height: 48px}html{--mdc-checkbox-disabled-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-state-layer-opacity: .16;--mdc-checkbox-selected-hover-state-layer-opacity: .04;--mdc-checkbox-selected-pressed-state-layer-opacity: .16;--mdc-checkbox-unselected-focus-state-layer-opacity: .16;--mdc-checkbox-unselected-hover-state-layer-opacity: .04;--mdc-checkbox-unselected-pressed-state-layer-opacity: .16;--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #0277bd;--mdc-checkbox-selected-hover-icon-color: #0277bd;--mdc-checkbox-selected-icon-color: #0277bd;--mdc-checkbox-selected-pressed-icon-color: #0277bd;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0277bd;--mdc-checkbox-selected-hover-state-layer-color: #0277bd;--mdc-checkbox-selected-pressed-state-layer-color: #0277bd;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black;--mat-checkbox-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-checkbox{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-checkbox.mat-primary{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #616161;--mdc-checkbox-selected-hover-icon-color: #616161;--mdc-checkbox-selected-icon-color: #616161;--mdc-checkbox-selected-pressed-icon-color: #616161;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #616161;--mdc-checkbox-selected-hover-state-layer-color: #616161;--mdc-checkbox-selected-pressed-state-layer-color: #616161;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}html{--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-touch-target-display: block;--mdc-text-button-container-shape: 4px;--mdc-text-button-keep-touch-target: false;--mdc-filled-button-container-shape: 4px;--mdc-filled-button-keep-touch-target: false;--mdc-protected-button-container-shape: 4px;--mdc-protected-button-keep-touch-target: false;--mdc-outlined-button-keep-touch-target: false;--mdc-outlined-button-outline-width: 1px;--mdc-outlined-button-container-shape: 4px;--mat-text-button-horizontal-padding: 8px;--mat-text-button-with-icon-horizontal-padding: 8px;--mat-text-button-icon-spacing: 8px;--mat-text-button-icon-offset: 0;--mat-filled-button-horizontal-padding: 16px;--mat-filled-button-icon-spacing: 8px;--mat-filled-button-icon-offset: -4px;--mat-protected-button-horizontal-padding: 16px;--mat-protected-button-icon-spacing: 8px;--mat-protected-button-icon-offset: -4px;--mat-outlined-button-horizontal-padding: 15px;--mat-outlined-button-icon-spacing: 8px;--mat-outlined-button-icon-offset: -4px;--mdc-text-button-label-text-color: black;--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-text-button-state-layer-color: black;--mat-text-button-disabled-state-layer-color: black;--mat-text-button-ripple-color: rgba(0, 0, 0, .1);--mat-text-button-hover-state-layer-opacity: .04;--mat-text-button-focus-state-layer-opacity: .12;--mat-text-button-pressed-state-layer-opacity: .12;--mdc-filled-button-container-color: white;--mdc-filled-button-label-text-color: black;--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-filled-button-state-layer-color: black;--mat-filled-button-disabled-state-layer-color: black;--mat-filled-button-ripple-color: rgba(0, 0, 0, .1);--mat-filled-button-hover-state-layer-opacity: .04;--mat-filled-button-focus-state-layer-opacity: .12;--mat-filled-button-pressed-state-layer-opacity: .12;--mdc-protected-button-container-color: white;--mdc-protected-button-label-text-color: black;--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);--mdc-protected-button-disabled-container-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-protected-button-focus-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-hover-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-pressed-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-protected-button-container-shadow-color: #000;--mat-protected-button-state-layer-color: black;--mat-protected-button-disabled-state-layer-color: black;--mat-protected-button-ripple-color: rgba(0, 0, 0, .1);--mat-protected-button-hover-state-layer-opacity: .04;--mat-protected-button-focus-state-layer-opacity: .12;--mat-protected-button-pressed-state-layer-opacity: .12;--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-label-text-color: black;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: black;--mat-outlined-button-disabled-state-layer-color: black;--mat-outlined-button-ripple-color: rgba(0, 0, 0, .1);--mat-outlined-button-hover-state-layer-opacity: .04;--mat-outlined-button-focus-state-layer-opacity: .12;--mat-outlined-button-pressed-state-layer-opacity: .12}.mat-mdc-button.mat-primary{--mdc-text-button-label-text-color: #616161;--mat-text-button-state-layer-color: #616161;--mat-text-button-ripple-color: rgba(97, 97, 97, .1)}.mat-mdc-button.mat-accent{--mdc-text-button-label-text-color: #0277bd;--mat-text-button-state-layer-color: #0277bd;--mat-text-button-ripple-color: rgba(2, 119, 189, .1)}.mat-mdc-button.mat-warn{--mdc-text-button-label-text-color: #f44336;--mat-text-button-state-layer-color: #f44336;--mat-text-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-unelevated-button.mat-primary{--mdc-filled-button-container-color: #616161;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-accent{--mdc-filled-button-container-color: #0277bd;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-primary{--mdc-protected-button-container-color: #616161;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-accent{--mdc-protected-button-container-color: #0277bd;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-warn{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-outlined-button.mat-primary{--mdc-outlined-button-label-text-color: #616161;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #616161;--mat-outlined-button-ripple-color: rgba(97, 97, 97, .1)}.mat-mdc-outlined-button.mat-accent{--mdc-outlined-button-label-text-color: #0277bd;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #0277bd;--mat-outlined-button-ripple-color: rgba(2, 119, 189, .1)}.mat-mdc-outlined-button.mat-warn{--mdc-outlined-button-label-text-color: #f44336;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #f44336;--mat-outlined-button-ripple-color: rgba(244, 67, 54, .1)}html{--mdc-text-button-container-height: 36px;--mdc-filled-button-container-height: 36px;--mdc-outlined-button-container-height: 36px;--mdc-protected-button-container-height: 36px;--mat-text-button-touch-target-display: block;--mat-filled-button-touch-target-display: block;--mat-protected-button-touch-target-display: block;--mat-outlined-button-touch-target-display: block;--mdc-icon-button-icon-size: 24px;--mdc-icon-button-icon-color: inherit;--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38);--mat-icon-button-state-layer-color: black;--mat-icon-button-disabled-state-layer-color: black;--mat-icon-button-ripple-color: rgba(0, 0, 0, .1);--mat-icon-button-hover-state-layer-opacity: .04;--mat-icon-button-focus-state-layer-opacity: .12;--mat-icon-button-pressed-state-layer-opacity: .12}html .mat-mdc-icon-button.mat-primary{--mdc-icon-button-icon-color: #616161;--mat-icon-button-state-layer-color: #616161;--mat-icon-button-ripple-color: rgba(97, 97, 97, .1)}html .mat-mdc-icon-button.mat-accent{--mdc-icon-button-icon-color: #0277bd;--mat-icon-button-state-layer-color: #0277bd;--mat-icon-button-ripple-color: rgba(2, 119, 189, .1)}html .mat-mdc-icon-button.mat-warn{--mdc-icon-button-icon-color: #f44336;--mat-icon-button-state-layer-color: #f44336;--mat-icon-button-ripple-color: rgba(244, 67, 54, .1)}html{--mat-icon-button-touch-target-display: block}.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 48px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:12px}html{--mdc-fab-container-shape: 50%;--mdc-fab-icon-size: 24px;--mdc-fab-small-container-shape: 50%;--mdc-fab-small-icon-size: 24px;--mdc-extended-fab-container-height: 48px;--mdc-extended-fab-container-shape: 24px;--mdc-fab-container-color: white;--mdc-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-fab-container-shadow-color: #000;--mat-fab-foreground-color: black;--mat-fab-state-layer-color: black;--mat-fab-disabled-state-layer-color: black;--mat-fab-ripple-color: rgba(0, 0, 0, .1);--mat-fab-hover-state-layer-opacity: .04;--mat-fab-focus-state-layer-opacity: .12;--mat-fab-pressed-state-layer-opacity: .12;--mat-fab-disabled-state-container-color: rgba(0, 0, 0, .12);--mat-fab-disabled-state-foreground-color: rgba(0, 0, 0, .38);--mdc-fab-small-container-color: white;--mdc-fab-small-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-fab-small-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-small-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-small-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-fab-small-container-shadow-color: #000;--mat-fab-small-foreground-color: black;--mat-fab-small-state-layer-color: black;--mat-fab-small-disabled-state-layer-color: black;--mat-fab-small-ripple-color: rgba(0, 0, 0, .1);--mat-fab-small-hover-state-layer-opacity: .04;--mat-fab-small-focus-state-layer-opacity: .12;--mat-fab-small-pressed-state-layer-opacity: .12;--mat-fab-small-disabled-state-container-color: rgba(0, 0, 0, .12);--mat-fab-small-disabled-state-foreground-color: rgba(0, 0, 0, .38);--mdc-extended-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-extended-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-extended-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-extended-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-extended-fab-container-shadow-color: #000}html .mat-mdc-fab.mat-primary{--mdc-fab-container-color: #616161;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-fab.mat-accent{--mdc-fab-container-color: #0277bd;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-fab.mat-warn{--mdc-fab-container-color: #f44336;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-primary{--mdc-fab-small-container-color: #616161;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-accent{--mdc-fab-small-container-color: #0277bd;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-warn{--mdc-fab-small-container-color: #f44336;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html{--mat-fab-touch-target-display: block;--mat-fab-small-touch-target-display: block;--mdc-snackbar-container-shape: 4px;--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87);--mat-snack-bar-button-color: #0277bd;--mat-table-row-item-outline-width: 1px;--mat-table-background-color: white;--mat-table-header-headline-color: rgba(0, 0, 0, .87);--mat-table-row-item-label-text-color: rgba(0, 0, 0, .87);--mat-table-row-item-outline-color: rgba(0, 0, 0, .12);--mat-table-header-container-height: 56px;--mat-table-footer-container-height: 52px;--mat-table-row-item-container-height: 52px;--mdc-circular-progress-active-indicator-width: 4px;--mdc-circular-progress-size: 48px;--mdc-circular-progress-active-indicator-color: #616161}html .mat-accent{--mdc-circular-progress-active-indicator-color: #0277bd}html .mat-warn{--mdc-circular-progress-active-indicator-color: #f44336}html{--mat-badge-container-shape: 50%;--mat-badge-container-size: unset;--mat-badge-small-size-container-size: unset;--mat-badge-large-size-container-size: unset;--mat-badge-legacy-container-size: 22px;--mat-badge-legacy-small-size-container-size: 16px;--mat-badge-legacy-large-size-container-size: 28px;--mat-badge-container-offset: -11px 0;--mat-badge-small-size-container-offset: -8px 0;--mat-badge-large-size-container-offset: -14px 0;--mat-badge-container-overlap-offset: -11px;--mat-badge-small-size-container-overlap-offset: -8px;--mat-badge-large-size-container-overlap-offset: -14px;--mat-badge-container-padding: 0;--mat-badge-small-size-container-padding: 0;--mat-badge-large-size-container-padding: 0;--mat-badge-background-color: #616161;--mat-badge-text-color: white;--mat-badge-disabled-state-background-color: #b9b9b9;--mat-badge-disabled-state-text-color: rgba(0, 0, 0, .38)}.mat-badge-accent{--mat-badge-background-color: #0277bd;--mat-badge-text-color: white}.mat-badge-warn{--mat-badge-background-color: #f44336;--mat-badge-text-color: white}html{--mat-bottom-sheet-container-shape: 4px;--mat-bottom-sheet-container-text-color: rgba(0, 0, 0, .87);--mat-bottom-sheet-container-background-color: white;--mat-legacy-button-toggle-height: 36px;--mat-legacy-button-toggle-shape: 2px;--mat-legacy-button-toggle-focus-state-layer-opacity: 1;--mat-standard-button-toggle-shape: 4px;--mat-standard-button-toggle-hover-state-layer-opacity: .04;--mat-standard-button-toggle-focus-state-layer-opacity: .12;--mat-legacy-button-toggle-text-color: rgba(0, 0, 0, .38);--mat-legacy-button-toggle-state-layer-color: rgba(0, 0, 0, .12);--mat-legacy-button-toggle-selected-state-text-color: rgba(0, 0, 0, .54);--mat-legacy-button-toggle-selected-state-background-color: #e0e0e0;--mat-legacy-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-legacy-button-toggle-disabled-state-background-color: #eeeeee;--mat-legacy-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-background-color: white;--mat-standard-button-toggle-state-layer-color: black;--mat-standard-button-toggle-selected-state-background-color: #e0e0e0;--mat-standard-button-toggle-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-standard-button-toggle-disabled-state-background-color: white;--mat-standard-button-toggle-disabled-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-divider-color: #e0e0e0;--mat-standard-button-toggle-height: 48px;--mat-datepicker-calendar-container-shape: 4px;--mat-datepicker-calendar-container-touch-shape: 4px;--mat-datepicker-calendar-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mat-datepicker-calendar-container-touch-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12);--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #616161;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(97, 97, 97, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(97, 97, 97, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(97, 97, 97, .3);--mat-datepicker-toggle-active-state-icon-color: #616161;--mat-datepicker-calendar-date-in-range-state-background-color: rgba(97, 97, 97, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e;--mat-datepicker-toggle-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-body-label-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-period-button-text-color: black;--mat-datepicker-calendar-period-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-navigation-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-header-divider-color: rgba(0, 0, 0, .12);--mat-datepicker-calendar-header-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-date-today-outline-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-today-disabled-state-outline-color: rgba(0, 0, 0, .18);--mat-datepicker-calendar-date-text-color: rgba(0, 0, 0, .87);--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-preview-state-outline-color: rgba(0, 0, 0, .24);--mat-datepicker-range-input-separator-color: rgba(0, 0, 0, .87);--mat-datepicker-range-input-disabled-state-separator-color: rgba(0, 0, 0, .38);--mat-datepicker-range-input-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-container-background-color: white;--mat-datepicker-calendar-container-text-color: rgba(0, 0, 0, .87)}.mat-datepicker-content.mat-accent{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #0277bd;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(2, 119, 189, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(2, 119, 189, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(2, 119, 189, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(2, 119, 189, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-content.mat-warn{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #f44336;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(244, 67, 54, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(244, 67, 54, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-toggle-active.mat-accent{--mat-datepicker-toggle-active-state-icon-color: #0277bd}.mat-datepicker-toggle-active.mat-warn{--mat-datepicker-toggle-active-state-icon-color: #f44336}.mat-calendar-controls{--mat-icon-button-touch-target-display: none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}html{--mat-divider-width: 1px;--mat-divider-color: rgba(0, 0, 0, .12);--mat-expansion-container-shape: 4px;--mat-expansion-legacy-header-indicator-display: inline-block;--mat-expansion-header-indicator-display: none;--mat-expansion-container-background-color: white;--mat-expansion-container-text-color: rgba(0, 0, 0, .87);--mat-expansion-actions-divider-color: rgba(0, 0, 0, .12);--mat-expansion-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-expansion-header-text-color: rgba(0, 0, 0, .87);--mat-expansion-header-description-color: rgba(0, 0, 0, .54);--mat-expansion-header-indicator-color: rgba(0, 0, 0, .54);--mat-expansion-header-collapsed-state-height: 48px;--mat-expansion-header-expanded-state-height: 64px;--mat-icon-color: inherit}.mat-icon.mat-primary{--mat-icon-color: #616161}.mat-icon.mat-accent{--mat-icon-color: #0277bd}.mat-icon.mat-warn{--mat-icon-color: #f44336}html{--mat-sidenav-container-shape: 0;--mat-sidenav-container-elevation-shadow: 0px 8px 10px -5px rgba(0, 0, 0, .2), 0px 16px 24px 2px rgba(0, 0, 0, .14), 0px 6px 30px 5px rgba(0, 0, 0, .12);--mat-sidenav-container-width: auto;--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6);--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #616161;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #616161;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #616161;--mat-stepper-header-edit-state-icon-foreground-color: white;--mat-stepper-container-color: white;--mat-stepper-line-color: rgba(0, 0, 0, .12);--mat-stepper-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-optional-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-selected-state-label-text-color: rgba(0, 0, 0, .87);--mat-stepper-header-error-state-label-text-color: #f44336;--mat-stepper-header-icon-background-color: rgba(0, 0, 0, .54);--mat-stepper-header-error-state-icon-foreground-color: #f44336;--mat-stepper-header-error-state-icon-background-color: transparent}html .mat-step-header.mat-accent{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #0277bd;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #0277bd;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #0277bd;--mat-stepper-header-edit-state-icon-foreground-color: white}html .mat-step-header.mat-warn{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #f44336;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #f44336;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #f44336;--mat-stepper-header-edit-state-icon-foreground-color: white}html{--mat-stepper-header-height: 72px;--mat-sort-arrow-color: #757575;--mat-toolbar-container-background-color: whitesmoke;--mat-toolbar-container-text-color: rgba(0, 0, 0, .87)}.mat-toolbar.mat-primary{--mat-toolbar-container-background-color: #616161;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-accent{--mat-toolbar-container-background-color: #0277bd;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-warn{--mat-toolbar-container-background-color: #f44336;--mat-toolbar-container-text-color: white}html{--mat-toolbar-standard-height: 64px;--mat-toolbar-mobile-height: 56px;--mat-tree-container-background-color: white;--mat-tree-node-text-color: rgba(0, 0, 0, .87);--mat-tree-node-min-height: 48px}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}h1{font-size:1.5rem;line-height:2rem;margin-bottom:1.5rem;font-weight:700}h2{font-size:1.25rem;line-height:1.75rem;margin-bottom:1.5rem;font-weight:700}h3{font-size:1.125rem;line-height:1.75rem;margin-bottom:1.5rem;font-weight:700}h4{font-size:1rem;line-height:1.5rem;margin-bottom:1.5rem;font-weight:700}a{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}a:hover{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.-bottom-3{bottom:-.75rem}.right-5{right:1.25rem}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-24{margin-bottom:6rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-48{margin-bottom:12rem}.mb-8{margin-bottom:2rem}.ml-4{margin-left:1rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-48{margin-top:12rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.table{display:table}.hidden{display:none}.min-h-\[500px\]{min-height:500px}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-1\/5{width:20%}.w-1\/6{width:16.666667%}.w-2\/3{width:66.666667%}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.flex-none{flex:none}.flex-grow,.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.whitespace-nowrap{white-space:nowrap}.text-pretty{text-wrap:pretty}.rounded-3xl{border-radius:1.5rem}.rounded-lg{border-radius:.5rem}.border-2{border-width:2px}.border-4{border-width:4px}.border-solid{border-style:solid}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-500{--tw-gradient-to: #6b7280 var(--tw-gradient-to-position)}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pl-12{padding-left:3rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pt-1{padding-top:.25rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-light{font-weight:300}.uppercase{text-transform:uppercase}.italic{font-style:italic}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}html,body{height:100%}body{margin:0;font-family:Roboto,Helvetica Neue,sans-serif}.hover\:from-black:hover{--tw-gradient-from: #000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-blue-500:hover{--tw-gradient-to: #3b82f6 var(--tw-gradient-to-position)}@media (min-width: 768px){.md\:w-1\/2{width:50%}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}} +.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0);background-color:var(--mat-ripple-color, rgba(0, 0, 0, .1))}.cdk-high-contrast-active .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-app-background{background-color:var(--mat-app-background-color, transparent);color:var(--mat-app-text-color, inherit)}html{--mat-ripple-color: rgba(0, 0, 0, .1);--mat-option-selected-state-label-text-color: #616161;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-accent{--mat-option-selected-state-label-text-color: #0277bd;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-warn{--mat-option-selected-state-label-text-color: #f44336;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}html{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}.mat-primary{--mat-full-pseudo-checkbox-selected-icon-color: #616161;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #616161;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html,.mat-accent{--mat-full-pseudo-checkbox-selected-icon-color: #0277bd;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #0277bd;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}.mat-warn{--mat-full-pseudo-checkbox-selected-icon-color: #f44336;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #f44336;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html{--mat-app-background-color: #fafafa;--mat-app-text-color: rgba(0, 0, 0, .87)}.mat-elevation-z0,.mat-mdc-elevation-specific.mat-elevation-z0{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1,.mat-mdc-elevation-specific.mat-elevation-z1{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2,.mat-mdc-elevation-specific.mat-elevation-z2{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3,.mat-mdc-elevation-specific.mat-elevation-z3{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4,.mat-mdc-elevation-specific.mat-elevation-z4{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5,.mat-mdc-elevation-specific.mat-elevation-z5{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6,.mat-mdc-elevation-specific.mat-elevation-z6{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7,.mat-mdc-elevation-specific.mat-elevation-z7{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8,.mat-mdc-elevation-specific.mat-elevation-z8{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9,.mat-mdc-elevation-specific.mat-elevation-z9{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10,.mat-mdc-elevation-specific.mat-elevation-z10{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11,.mat-mdc-elevation-specific.mat-elevation-z11{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12,.mat-mdc-elevation-specific.mat-elevation-z12{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13,.mat-mdc-elevation-specific.mat-elevation-z13{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14,.mat-mdc-elevation-specific.mat-elevation-z14{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15,.mat-mdc-elevation-specific.mat-elevation-z15{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16,.mat-mdc-elevation-specific.mat-elevation-z16{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17,.mat-mdc-elevation-specific.mat-elevation-z17{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18,.mat-mdc-elevation-specific.mat-elevation-z18{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19,.mat-mdc-elevation-specific.mat-elevation-z19{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20,.mat-mdc-elevation-specific.mat-elevation-z20{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21,.mat-mdc-elevation-specific.mat-elevation-z21{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22,.mat-mdc-elevation-specific.mat-elevation-z22{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23,.mat-mdc-elevation-specific.mat-elevation-z23{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24,.mat-mdc-elevation-specific.mat-elevation-z24{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker{display:none}html{--mdc-elevated-card-container-shape: 4px;--mdc-outlined-card-container-shape: 4px;--mdc-outlined-card-outline-width: 1px;--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color: rgba(0, 0, 0, .54);--mdc-linear-progress-active-indicator-height: 4px;--mdc-linear-progress-track-height: 4px;--mdc-linear-progress-track-shape: 0}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-color: #616161;--mdc-linear-progress-track-color: rgba(97, 97, 97, .25)}.mat-mdc-progress-bar.mat-accent{--mdc-linear-progress-active-indicator-color: #0277bd;--mdc-linear-progress-track-color: rgba(2, 119, 189, .25)}.mat-mdc-progress-bar.mat-warn{--mdc-linear-progress-active-indicator-color: #f44336;--mdc-linear-progress-track-color: rgba(244, 67, 54, .25)}html{--mdc-plain-tooltip-container-shape: 4px;--mdc-plain-tooltip-supporting-text-line-height: 16px;--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff;--mdc-filled-text-field-active-indicator-height: 1px;--mdc-filled-text-field-focus-active-indicator-height: 2px;--mdc-filled-text-field-container-shape: 4px;--mdc-outlined-text-field-outline-width: 1px;--mdc-outlined-text-field-focus-outline-width: 2px;--mdc-outlined-text-field-container-shape: 4px;--mdc-filled-text-field-caret-color: #616161;--mdc-filled-text-field-focus-active-indicator-color: #616161;--mdc-filled-text-field-focus-label-text-color: rgba(97, 97, 97, .87);--mdc-filled-text-field-container-color: whitesmoke;--mdc-filled-text-field-disabled-container-color: #fafafa;--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-hover-label-text-color: #f44336;--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336;--mdc-outlined-text-field-caret-color: #616161;--mdc-outlined-text-field-focus-outline-color: #616161;--mdc-outlined-text-field-focus-label-text-color: rgba(97, 97, 97, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-error-hover-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336;--mat-form-field-focus-select-arrow-color: rgba(97, 97, 97, .87);--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38);--mat-form-field-state-layer-color: rgba(0, 0, 0, .87);--mat-form-field-error-text-color: #f44336;--mat-form-field-select-option-text-color: inherit;--mat-form-field-select-disabled-option-text-color: GrayText;--mat-form-field-leading-icon-color: unset;--mat-form-field-disabled-leading-icon-color: unset;--mat-form-field-trailing-icon-color: unset;--mat-form-field-disabled-trailing-icon-color: unset;--mat-form-field-error-focus-trailing-icon-color: unset;--mat-form-field-error-hover-trailing-icon-color: unset;--mat-form-field-error-trailing-icon-color: unset;--mat-form-field-enabled-select-arrow-color: rgba(0, 0, 0, .54);--mat-form-field-disabled-select-arrow-color: rgba(0, 0, 0, .38);--mat-form-field-hover-state-layer-opacity: .04;--mat-form-field-focus-state-layer-opacity: .08}.mat-mdc-form-field.mat-accent{--mdc-filled-text-field-caret-color: #0277bd;--mdc-filled-text-field-focus-active-indicator-color: #0277bd;--mdc-filled-text-field-focus-label-text-color: rgba(2, 119, 189, .87);--mdc-outlined-text-field-caret-color: #0277bd;--mdc-outlined-text-field-focus-outline-color: #0277bd;--mdc-outlined-text-field-focus-label-text-color: rgba(2, 119, 189, .87);--mat-form-field-focus-select-arrow-color: rgba(2, 119, 189, .87)}.mat-mdc-form-field.mat-warn{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mat-form-field-focus-select-arrow-color: rgba(244, 67, 54, .87)}html{--mat-form-field-container-height: 56px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 16px;--mat-form-field-filled-with-label-container-padding-top: 24px;--mat-form-field-filled-with-label-container-padding-bottom: 8px;--mat-select-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(97, 97, 97, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-accent{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(2, 119, 189, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-warn{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html{--mat-select-arrow-transform: translateY(-8px);--mat-autocomplete-container-shape: 4px;--mat-autocomplete-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-autocomplete-background-color: white;--mdc-dialog-container-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12);--mdc-dialog-container-shadow-color: #000;--mdc-dialog-container-shape: 4px;--mat-dialog-container-max-width: 80vw;--mat-dialog-container-small-max-width: 80vw;--mat-dialog-container-min-width: 0;--mat-dialog-actions-alignment: start;--mat-dialog-actions-padding: 8px;--mat-dialog-content-padding: 20px 24px;--mat-dialog-with-actions-content-padding: 20px 24px;--mat-dialog-headline-padding: 0 24px 9px;--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}.mat-mdc-standard-chip{--mdc-chip-container-shape-family: rounded;--mdc-chip-container-shape-radius: 16px 16px 16px 16px;--mdc-chip-with-avatar-avatar-shape-family: rounded;--mdc-chip-with-avatar-avatar-shape-radius: 14px 14px 14px 14px;--mdc-chip-with-avatar-avatar-size: 28px;--mdc-chip-with-icon-icon-size: 18px;--mdc-chip-outline-width: 0;--mdc-chip-outline-color: transparent;--mdc-chip-disabled-outline-color: transparent;--mdc-chip-focus-outline-color: transparent;--mdc-chip-hover-state-layer-opacity: .04;--mdc-chip-with-avatar-disabled-avatar-opacity: 1;--mdc-chip-flat-selected-outline-width: 0;--mdc-chip-selected-hover-state-layer-opacity: .04;--mdc-chip-with-trailing-icon-disabled-trailing-icon-opacity: 1;--mdc-chip-with-icon-disabled-icon-opacity: 1;--mat-chip-disabled-container-opacity: .4;--mat-chip-trailing-action-opacity: .54;--mat-chip-trailing-action-focus-opacity: 1;--mat-chip-trailing-action-state-layer-color: transparent;--mat-chip-selected-trailing-action-state-layer-color: transparent;--mat-chip-trailing-action-hover-state-layer-opacity: 0;--mat-chip-trailing-action-focus-state-layer-opacity: 0;--mdc-chip-disabled-label-text-color: #212121;--mdc-chip-elevated-container-color: #e0e0e0;--mdc-chip-elevated-selected-container-color: #e0e0e0;--mdc-chip-elevated-disabled-container-color: #e0e0e0;--mdc-chip-flat-disabled-selected-container-color: #e0e0e0;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: #212121;--mdc-chip-selected-label-text-color: #212121;--mdc-chip-with-icon-icon-color: #212121;--mdc-chip-with-icon-disabled-icon-color: #212121;--mdc-chip-with-icon-selected-icon-color: #212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: #212121;--mdc-chip-with-trailing-icon-trailing-icon-color: #212121;--mat-chip-selected-disabled-trailing-icon-color: #212121;--mat-chip-selected-trailing-icon-color: #212121}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-primary,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-primary{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #616161;--mdc-chip-elevated-selected-container-color: #616161;--mdc-chip-elevated-disabled-container-color: #616161;--mdc-chip-flat-disabled-selected-container-color: #616161;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-accent,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-accent{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #0277bd;--mdc-chip-elevated-selected-container-color: #0277bd;--mdc-chip-elevated-disabled-container-color: #0277bd;--mdc-chip-flat-disabled-selected-container-color: #0277bd;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-warn,.mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-warn{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #f44336;--mdc-chip-elevated-selected-container-color: #f44336;--mdc-chip-elevated-disabled-container-color: #f44336;--mdc-chip-flat-disabled-selected-container-color: #f44336;--mdc-chip-focus-state-layer-color: black;--mdc-chip-hover-state-layer-color: black;--mdc-chip-selected-hover-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-selected-focus-state-layer-color: black;--mdc-chip-selected-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-selected-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white;--mat-chip-selected-disabled-trailing-icon-color: white;--mat-chip-selected-trailing-icon-color: white}.mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 32px}html{--mdc-switch-disabled-selected-icon-opacity: .38;--mdc-switch-disabled-track-opacity: .12;--mdc-switch-disabled-unselected-icon-opacity: .38;--mdc-switch-handle-height: 20px;--mdc-switch-handle-shape: 10px;--mdc-switch-handle-width: 20px;--mdc-switch-selected-icon-size: 18px;--mdc-switch-track-height: 14px;--mdc-switch-track-shape: 7px;--mdc-switch-track-width: 36px;--mdc-switch-unselected-icon-size: 18px;--mdc-switch-selected-focus-state-layer-opacity: .12;--mdc-switch-selected-hover-state-layer-opacity: .04;--mdc-switch-selected-pressed-state-layer-opacity: .1;--mdc-switch-unselected-focus-state-layer-opacity: .12;--mdc-switch-unselected-hover-state-layer-opacity: .04;--mdc-switch-unselected-pressed-state-layer-opacity: .1;--mat-switch-disabled-selected-handle-opacity: .38;--mat-switch-disabled-unselected-handle-opacity: .38;--mat-switch-unselected-handle-size: 20px;--mat-switch-selected-handle-size: 20px;--mat-switch-pressed-handle-size: 20px;--mat-switch-with-icon-handle-size: 20px;--mat-switch-selected-handle-horizontal-margin: 0;--mat-switch-selected-with-icon-handle-horizontal-margin: 0;--mat-switch-selected-pressed-handle-horizontal-margin: 0;--mat-switch-unselected-handle-horizontal-margin: 0;--mat-switch-unselected-with-icon-handle-horizontal-margin: 0;--mat-switch-unselected-pressed-handle-horizontal-margin: 0;--mat-switch-visible-track-opacity: 1;--mat-switch-hidden-track-opacity: 1;--mat-switch-visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, .2, 1);--mat-switch-hidden-track-transition: transform 75ms 0ms cubic-bezier(.4, 0, .6, 1);--mat-switch-track-outline-width: 1px;--mat-switch-track-outline-color: transparent;--mat-switch-selected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-color: transparent;--mdc-switch-selected-focus-state-layer-color: #757575;--mdc-switch-selected-handle-color: #757575;--mdc-switch-selected-hover-state-layer-color: #757575;--mdc-switch-selected-pressed-state-layer-color: #757575;--mdc-switch-selected-focus-handle-color: #212121;--mdc-switch-selected-hover-handle-color: #212121;--mdc-switch-selected-pressed-handle-color: #212121;--mdc-switch-selected-focus-track-color: #e0e0e0;--mdc-switch-selected-hover-track-color: #e0e0e0;--mdc-switch-selected-pressed-track-color: #e0e0e0;--mdc-switch-selected-track-color: #e0e0e0;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: var(--mdc-theme-surface, #fff);--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-handle-shadow-color: black;--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0;--mdc-switch-disabled-label-text-color: rgba(0, 0, 0, .38)}html .mat-mdc-slide-toggle{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}html .mat-mdc-slide-toggle.mat-accent{--mdc-switch-selected-focus-state-layer-color: #039be5;--mdc-switch-selected-handle-color: #039be5;--mdc-switch-selected-hover-state-layer-color: #039be5;--mdc-switch-selected-pressed-state-layer-color: #039be5;--mdc-switch-selected-focus-handle-color: #01579b;--mdc-switch-selected-hover-handle-color: #01579b;--mdc-switch-selected-pressed-handle-color: #01579b;--mdc-switch-selected-focus-track-color: #4fc3f7;--mdc-switch-selected-hover-track-color: #4fc3f7;--mdc-switch-selected-pressed-track-color: #4fc3f7;--mdc-switch-selected-track-color: #4fc3f7}html .mat-mdc-slide-toggle.mat-warn{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}html{--mdc-switch-state-layer-size: 40px;--mdc-radio-disabled-selected-icon-opacity: .38;--mdc-radio-disabled-unselected-icon-opacity: .38;--mdc-radio-state-layer-size: 40px}.mat-mdc-radio-button{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-radio-button.mat-primary{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #616161;--mdc-radio-selected-hover-icon-color: #616161;--mdc-radio-selected-icon-color: #616161;--mdc-radio-selected-pressed-icon-color: #616161;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #616161;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-accent{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0277bd;--mdc-radio-selected-hover-icon-color: #0277bd;--mdc-radio-selected-icon-color: #0277bd;--mdc-radio-selected-pressed-icon-color: #0277bd;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #0277bd;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-warn{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}html{--mdc-radio-state-layer-size: 40px;--mat-radio-touch-target-display: block;--mat-slider-value-indicator-width: auto;--mat-slider-value-indicator-height: 32px;--mat-slider-value-indicator-caret-display: block;--mat-slider-value-indicator-border-radius: 4px;--mat-slider-value-indicator-padding: 0 12px;--mat-slider-value-indicator-text-transform: none;--mat-slider-value-indicator-container-transform: translateX(-50%);--mdc-slider-active-track-height: 6px;--mdc-slider-active-track-shape: 9999px;--mdc-slider-handle-height: 20px;--mdc-slider-handle-shape: 50%;--mdc-slider-handle-width: 20px;--mdc-slider-inactive-track-height: 4px;--mdc-slider-inactive-track-shape: 9999px;--mdc-slider-with-overlap-handle-outline-width: 1px;--mdc-slider-with-tick-marks-active-container-opacity: .6;--mdc-slider-with-tick-marks-container-shape: 50%;--mdc-slider-with-tick-marks-container-size: 2px;--mdc-slider-with-tick-marks-inactive-container-opacity: .6;--mdc-slider-handle-color: #616161;--mdc-slider-focus-handle-color: #616161;--mdc-slider-hover-handle-color: #616161;--mdc-slider-active-track-color: #616161;--mdc-slider-inactive-track-color: #616161;--mdc-slider-with-tick-marks-inactive-container-color: #616161;--mdc-slider-with-tick-marks-active-container-color: white;--mdc-slider-disabled-active-track-color: #000;--mdc-slider-disabled-handle-color: #000;--mdc-slider-disabled-inactive-track-color: #000;--mdc-slider-label-container-color: #000;--mdc-slider-label-label-text-color: #fff;--mdc-slider-with-overlap-handle-outline-color: #fff;--mdc-slider-with-tick-marks-disabled-container-color: #000;--mdc-slider-handle-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-slider-ripple-color: #616161;--mat-slider-hover-state-layer-color: rgba(97, 97, 97, .05);--mat-slider-focus-state-layer-color: rgba(97, 97, 97, .2);--mat-slider-value-indicator-opacity: .6}html .mat-accent{--mat-slider-ripple-color: #0277bd;--mat-slider-hover-state-layer-color: rgba(2, 119, 189, .05);--mat-slider-focus-state-layer-color: rgba(2, 119, 189, .2);--mdc-slider-handle-color: #0277bd;--mdc-slider-focus-handle-color: #0277bd;--mdc-slider-hover-handle-color: #0277bd;--mdc-slider-active-track-color: #0277bd;--mdc-slider-inactive-track-color: #0277bd;--mdc-slider-with-tick-marks-inactive-container-color: #0277bd;--mdc-slider-with-tick-marks-active-container-color: white}html .mat-warn{--mat-slider-ripple-color: #f44336;--mat-slider-hover-state-layer-color: rgba(244, 67, 54, .05);--mat-slider-focus-state-layer-color: rgba(244, 67, 54, .2);--mdc-slider-handle-color: #f44336;--mdc-slider-focus-handle-color: #f44336;--mdc-slider-hover-handle-color: #f44336;--mdc-slider-active-track-color: #f44336;--mdc-slider-inactive-track-color: #f44336;--mdc-slider-with-tick-marks-inactive-container-color: #f44336;--mdc-slider-with-tick-marks-active-container-color: white}html{--mat-menu-container-shape: 4px;--mat-menu-divider-bottom-spacing: 0;--mat-menu-divider-top-spacing: 0;--mat-menu-item-spacing: 16px;--mat-menu-item-icon-size: 24px;--mat-menu-item-leading-spacing: 16px;--mat-menu-item-trailing-spacing: 16px;--mat-menu-item-with-icon-leading-spacing: 16px;--mat-menu-item-with-icon-trailing-spacing: 16px;--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white;--mat-menu-divider-color: rgba(0, 0, 0, .12);--mdc-list-list-item-container-shape: 0;--mdc-list-list-item-leading-avatar-shape: 50%;--mdc-list-list-item-container-color: transparent;--mdc-list-list-item-selected-container-color: transparent;--mdc-list-list-item-leading-avatar-color: transparent;--mdc-list-list-item-leading-icon-size: 24px;--mdc-list-list-item-leading-avatar-size: 40px;--mdc-list-list-item-trailing-icon-size: 24px;--mdc-list-list-item-disabled-state-layer-color: transparent;--mdc-list-list-item-disabled-state-layer-opacity: 0;--mdc-list-list-item-disabled-label-text-opacity: .38;--mdc-list-list-item-disabled-leading-icon-opacity: .38;--mdc-list-list-item-disabled-trailing-icon-opacity: .38;--mat-list-active-indicator-color: transparent;--mat-list-active-indicator-shape: 0;--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #616161;--mdc-radio-selected-hover-icon-color: #616161;--mdc-radio-selected-icon-color: #616161;--mdc-radio-selected-pressed-icon-color: #616161}.mat-accent .mdc-list-item__start,.mat-accent .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0277bd;--mdc-radio-selected-hover-icon-color: #0277bd;--mdc-radio-selected-icon-color: #0277bd;--mdc-radio-selected-pressed-icon-color: #0277bd}.mat-warn .mdc-list-item__start,.mat-warn .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #616161;--mdc-checkbox-selected-hover-icon-color: #616161;--mdc-checkbox-selected-icon-color: #616161;--mdc-checkbox-selected-pressed-icon-color: #616161;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #616161;--mdc-checkbox-selected-hover-state-layer-color: #616161;--mdc-checkbox-selected-pressed-state-layer-color: #616161;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-accent{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #0277bd;--mdc-checkbox-selected-hover-icon-color: #0277bd;--mdc-checkbox-selected-icon-color: #0277bd;--mdc-checkbox-selected-pressed-icon-color: #0277bd;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0277bd;--mdc-checkbox-selected-hover-state-layer-color: #0277bd;--mdc-checkbox-selected-pressed-state-layer-color: #0277bd;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected.mdc-list-item--with-leading-icon .mdc-list-item__start,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated.mdc-list-item--with-leading-icon .mdc-list-item__start{color:#616161}.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end{opacity:1}html{--mdc-list-list-item-one-line-container-height: 48px;--mdc-list-list-item-two-line-container-height: 64px;--mdc-list-list-item-three-line-container-height: 88px;--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-state-layer-size: 40px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}html{--mat-paginator-container-text-color: rgba(0, 0, 0, .87);--mat-paginator-container-background-color: white;--mat-paginator-enabled-icon-color: rgba(0, 0, 0, .54);--mat-paginator-disabled-icon-color: rgba(0, 0, 0, .12);--mat-paginator-container-size: 56px;--mat-paginator-form-field-container-height: 40px;--mat-paginator-form-field-container-vertical-padding: 8px;--mdc-tab-indicator-active-indicator-height: 2px;--mdc-tab-indicator-active-indicator-shape: 0;--mdc-secondary-navigation-tab-container-height: 48px;--mat-tab-header-divider-color: transparent;--mat-tab-header-divider-height: 0}.mat-mdc-tab-group,.mat-mdc-tab-nav-bar{--mdc-tab-indicator-active-indicator-color: #616161;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #616161;--mat-tab-header-active-ripple-color: #616161;--mat-tab-header-inactive-ripple-color: #616161;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #616161;--mat-tab-header-active-hover-label-text-color: #616161;--mat-tab-header-active-focus-indicator-color: #616161;--mat-tab-header-active-hover-indicator-color: #616161}.mat-mdc-tab-group.mat-accent,.mat-mdc-tab-nav-bar.mat-accent{--mdc-tab-indicator-active-indicator-color: #0277bd;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #0277bd;--mat-tab-header-active-ripple-color: #0277bd;--mat-tab-header-inactive-ripple-color: #0277bd;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #0277bd;--mat-tab-header-active-hover-label-text-color: #0277bd;--mat-tab-header-active-focus-indicator-color: #0277bd;--mat-tab-header-active-hover-indicator-color: #0277bd}.mat-mdc-tab-group.mat-warn,.mat-mdc-tab-nav-bar.mat-warn{--mdc-tab-indicator-active-indicator-color: #f44336;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: black;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #f44336;--mat-tab-header-active-ripple-color: #f44336;--mat-tab-header-inactive-ripple-color: #f44336;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #f44336;--mat-tab-header-active-hover-label-text-color: #f44336;--mat-tab-header-active-focus-indicator-color: #f44336;--mat-tab-header-active-hover-indicator-color: #f44336}.mat-mdc-tab-group.mat-background-primary,.mat-mdc-tab-nav-bar.mat-background-primary{--mat-tab-header-with-background-background-color: #616161;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-accent,.mat-mdc-tab-nav-bar.mat-background-accent{--mat-tab-header-with-background-background-color: #0277bd;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-warn,.mat-mdc-tab-nav-bar.mat-background-warn{--mat-tab-header-with-background-background-color: #f44336;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-header{--mdc-secondary-navigation-tab-container-height: 48px}html{--mdc-checkbox-disabled-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-state-layer-opacity: .16;--mdc-checkbox-selected-hover-state-layer-opacity: .04;--mdc-checkbox-selected-pressed-state-layer-opacity: .16;--mdc-checkbox-unselected-focus-state-layer-opacity: .16;--mdc-checkbox-unselected-hover-state-layer-opacity: .04;--mdc-checkbox-unselected-pressed-state-layer-opacity: .16;--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #0277bd;--mdc-checkbox-selected-hover-icon-color: #0277bd;--mdc-checkbox-selected-icon-color: #0277bd;--mdc-checkbox-selected-pressed-icon-color: #0277bd;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0277bd;--mdc-checkbox-selected-hover-state-layer-color: #0277bd;--mdc-checkbox-selected-pressed-state-layer-color: #0277bd;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black;--mat-checkbox-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-checkbox{--mdc-form-field-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-checkbox.mat-primary{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #616161;--mdc-checkbox-selected-hover-icon-color: #616161;--mdc-checkbox-selected-icon-color: #616161;--mdc-checkbox-selected-pressed-icon-color: #616161;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #616161;--mdc-checkbox-selected-hover-state-layer-color: #616161;--mdc-checkbox-selected-pressed-state-layer-color: #616161;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}html{--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-touch-target-display: block;--mdc-text-button-container-shape: 4px;--mdc-text-button-keep-touch-target: false;--mdc-filled-button-container-shape: 4px;--mdc-filled-button-keep-touch-target: false;--mdc-protected-button-container-shape: 4px;--mdc-protected-button-keep-touch-target: false;--mdc-outlined-button-keep-touch-target: false;--mdc-outlined-button-outline-width: 1px;--mdc-outlined-button-container-shape: 4px;--mat-text-button-horizontal-padding: 8px;--mat-text-button-with-icon-horizontal-padding: 8px;--mat-text-button-icon-spacing: 8px;--mat-text-button-icon-offset: 0;--mat-filled-button-horizontal-padding: 16px;--mat-filled-button-icon-spacing: 8px;--mat-filled-button-icon-offset: -4px;--mat-protected-button-horizontal-padding: 16px;--mat-protected-button-icon-spacing: 8px;--mat-protected-button-icon-offset: -4px;--mat-outlined-button-horizontal-padding: 15px;--mat-outlined-button-icon-spacing: 8px;--mat-outlined-button-icon-offset: -4px;--mdc-text-button-label-text-color: black;--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-text-button-state-layer-color: black;--mat-text-button-disabled-state-layer-color: black;--mat-text-button-ripple-color: rgba(0, 0, 0, .1);--mat-text-button-hover-state-layer-opacity: .04;--mat-text-button-focus-state-layer-opacity: .12;--mat-text-button-pressed-state-layer-opacity: .12;--mdc-filled-button-container-color: white;--mdc-filled-button-label-text-color: black;--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-filled-button-state-layer-color: black;--mat-filled-button-disabled-state-layer-color: black;--mat-filled-button-ripple-color: rgba(0, 0, 0, .1);--mat-filled-button-hover-state-layer-opacity: .04;--mat-filled-button-focus-state-layer-opacity: .12;--mat-filled-button-pressed-state-layer-opacity: .12;--mdc-protected-button-container-color: white;--mdc-protected-button-label-text-color: black;--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);--mdc-protected-button-disabled-container-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-protected-button-focus-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-hover-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-pressed-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-protected-button-container-shadow-color: #000;--mat-protected-button-state-layer-color: black;--mat-protected-button-disabled-state-layer-color: black;--mat-protected-button-ripple-color: rgba(0, 0, 0, .1);--mat-protected-button-hover-state-layer-opacity: .04;--mat-protected-button-focus-state-layer-opacity: .12;--mat-protected-button-pressed-state-layer-opacity: .12;--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-label-text-color: black;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: black;--mat-outlined-button-disabled-state-layer-color: black;--mat-outlined-button-ripple-color: rgba(0, 0, 0, .1);--mat-outlined-button-hover-state-layer-opacity: .04;--mat-outlined-button-focus-state-layer-opacity: .12;--mat-outlined-button-pressed-state-layer-opacity: .12}.mat-mdc-button.mat-primary{--mdc-text-button-label-text-color: #616161;--mat-text-button-state-layer-color: #616161;--mat-text-button-ripple-color: rgba(97, 97, 97, .1)}.mat-mdc-button.mat-accent{--mdc-text-button-label-text-color: #0277bd;--mat-text-button-state-layer-color: #0277bd;--mat-text-button-ripple-color: rgba(2, 119, 189, .1)}.mat-mdc-button.mat-warn{--mdc-text-button-label-text-color: #f44336;--mat-text-button-state-layer-color: #f44336;--mat-text-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-unelevated-button.mat-primary{--mdc-filled-button-container-color: #616161;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-accent{--mdc-filled-button-container-color: #0277bd;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-primary{--mdc-protected-button-container-color: #616161;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-accent{--mdc-protected-button-container-color: #0277bd;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-warn{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-outlined-button.mat-primary{--mdc-outlined-button-label-text-color: #616161;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #616161;--mat-outlined-button-ripple-color: rgba(97, 97, 97, .1)}.mat-mdc-outlined-button.mat-accent{--mdc-outlined-button-label-text-color: #0277bd;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #0277bd;--mat-outlined-button-ripple-color: rgba(2, 119, 189, .1)}.mat-mdc-outlined-button.mat-warn{--mdc-outlined-button-label-text-color: #f44336;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #f44336;--mat-outlined-button-ripple-color: rgba(244, 67, 54, .1)}html{--mdc-text-button-container-height: 36px;--mdc-filled-button-container-height: 36px;--mdc-outlined-button-container-height: 36px;--mdc-protected-button-container-height: 36px;--mat-text-button-touch-target-display: block;--mat-filled-button-touch-target-display: block;--mat-protected-button-touch-target-display: block;--mat-outlined-button-touch-target-display: block;--mdc-icon-button-icon-size: 24px;--mdc-icon-button-icon-color: inherit;--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38);--mat-icon-button-state-layer-color: black;--mat-icon-button-disabled-state-layer-color: black;--mat-icon-button-ripple-color: rgba(0, 0, 0, .1);--mat-icon-button-hover-state-layer-opacity: .04;--mat-icon-button-focus-state-layer-opacity: .12;--mat-icon-button-pressed-state-layer-opacity: .12}html .mat-mdc-icon-button.mat-primary{--mdc-icon-button-icon-color: #616161;--mat-icon-button-state-layer-color: #616161;--mat-icon-button-ripple-color: rgba(97, 97, 97, .1)}html .mat-mdc-icon-button.mat-accent{--mdc-icon-button-icon-color: #0277bd;--mat-icon-button-state-layer-color: #0277bd;--mat-icon-button-ripple-color: rgba(2, 119, 189, .1)}html .mat-mdc-icon-button.mat-warn{--mdc-icon-button-icon-color: #f44336;--mat-icon-button-state-layer-color: #f44336;--mat-icon-button-ripple-color: rgba(244, 67, 54, .1)}html{--mat-icon-button-touch-target-display: block}.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 48px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:12px}html{--mdc-fab-container-shape: 50%;--mdc-fab-icon-size: 24px;--mdc-fab-small-container-shape: 50%;--mdc-fab-small-icon-size: 24px;--mdc-extended-fab-container-height: 48px;--mdc-extended-fab-container-shape: 24px;--mdc-fab-container-color: white;--mdc-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-fab-container-shadow-color: #000;--mat-fab-foreground-color: black;--mat-fab-state-layer-color: black;--mat-fab-disabled-state-layer-color: black;--mat-fab-ripple-color: rgba(0, 0, 0, .1);--mat-fab-hover-state-layer-opacity: .04;--mat-fab-focus-state-layer-opacity: .12;--mat-fab-pressed-state-layer-opacity: .12;--mat-fab-disabled-state-container-color: rgba(0, 0, 0, .12);--mat-fab-disabled-state-foreground-color: rgba(0, 0, 0, .38);--mdc-fab-small-container-color: white;--mdc-fab-small-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-fab-small-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-small-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-fab-small-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-fab-small-container-shadow-color: #000;--mat-fab-small-foreground-color: black;--mat-fab-small-state-layer-color: black;--mat-fab-small-disabled-state-layer-color: black;--mat-fab-small-ripple-color: rgba(0, 0, 0, .1);--mat-fab-small-hover-state-layer-opacity: .04;--mat-fab-small-focus-state-layer-opacity: .12;--mat-fab-small-pressed-state-layer-opacity: .12;--mat-fab-small-disabled-state-container-color: rgba(0, 0, 0, .12);--mat-fab-small-disabled-state-foreground-color: rgba(0, 0, 0, .38);--mdc-extended-fab-container-elevation-shadow: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mdc-extended-fab-focus-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-extended-fab-hover-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-extended-fab-pressed-container-elevation-shadow: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mdc-extended-fab-container-shadow-color: #000}html .mat-mdc-fab.mat-primary{--mdc-fab-container-color: #616161;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-fab.mat-accent{--mdc-fab-container-color: #0277bd;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-fab.mat-warn{--mdc-fab-container-color: #f44336;--mat-fab-foreground-color: white;--mat-fab-state-layer-color: white;--mat-fab-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-primary{--mdc-fab-small-container-color: #616161;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-accent{--mdc-fab-small-container-color: #0277bd;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html .mat-mdc-mini-fab.mat-warn{--mdc-fab-small-container-color: #f44336;--mat-fab-small-foreground-color: white;--mat-fab-small-state-layer-color: white;--mat-fab-small-ripple-color: rgba(255, 255, 255, .1)}html{--mat-fab-touch-target-display: block;--mat-fab-small-touch-target-display: block;--mdc-snackbar-container-shape: 4px;--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87);--mat-snack-bar-button-color: #0277bd;--mat-table-row-item-outline-width: 1px;--mat-table-background-color: white;--mat-table-header-headline-color: rgba(0, 0, 0, .87);--mat-table-row-item-label-text-color: rgba(0, 0, 0, .87);--mat-table-row-item-outline-color: rgba(0, 0, 0, .12);--mat-table-header-container-height: 56px;--mat-table-footer-container-height: 52px;--mat-table-row-item-container-height: 52px;--mdc-circular-progress-active-indicator-width: 4px;--mdc-circular-progress-size: 48px;--mdc-circular-progress-active-indicator-color: #616161}html .mat-accent{--mdc-circular-progress-active-indicator-color: #0277bd}html .mat-warn{--mdc-circular-progress-active-indicator-color: #f44336}html{--mat-badge-container-shape: 50%;--mat-badge-container-size: unset;--mat-badge-small-size-container-size: unset;--mat-badge-large-size-container-size: unset;--mat-badge-legacy-container-size: 22px;--mat-badge-legacy-small-size-container-size: 16px;--mat-badge-legacy-large-size-container-size: 28px;--mat-badge-container-offset: -11px 0;--mat-badge-small-size-container-offset: -8px 0;--mat-badge-large-size-container-offset: -14px 0;--mat-badge-container-overlap-offset: -11px;--mat-badge-small-size-container-overlap-offset: -8px;--mat-badge-large-size-container-overlap-offset: -14px;--mat-badge-container-padding: 0;--mat-badge-small-size-container-padding: 0;--mat-badge-large-size-container-padding: 0;--mat-badge-background-color: #616161;--mat-badge-text-color: white;--mat-badge-disabled-state-background-color: #b9b9b9;--mat-badge-disabled-state-text-color: rgba(0, 0, 0, .38)}.mat-badge-accent{--mat-badge-background-color: #0277bd;--mat-badge-text-color: white}.mat-badge-warn{--mat-badge-background-color: #f44336;--mat-badge-text-color: white}html{--mat-bottom-sheet-container-shape: 4px;--mat-bottom-sheet-container-text-color: rgba(0, 0, 0, .87);--mat-bottom-sheet-container-background-color: white;--mat-legacy-button-toggle-height: 36px;--mat-legacy-button-toggle-shape: 2px;--mat-legacy-button-toggle-focus-state-layer-opacity: 1;--mat-standard-button-toggle-shape: 4px;--mat-standard-button-toggle-hover-state-layer-opacity: .04;--mat-standard-button-toggle-focus-state-layer-opacity: .12;--mat-legacy-button-toggle-text-color: rgba(0, 0, 0, .38);--mat-legacy-button-toggle-state-layer-color: rgba(0, 0, 0, .12);--mat-legacy-button-toggle-selected-state-text-color: rgba(0, 0, 0, .54);--mat-legacy-button-toggle-selected-state-background-color: #e0e0e0;--mat-legacy-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-legacy-button-toggle-disabled-state-background-color: #eeeeee;--mat-legacy-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-background-color: white;--mat-standard-button-toggle-state-layer-color: black;--mat-standard-button-toggle-selected-state-background-color: #e0e0e0;--mat-standard-button-toggle-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-standard-button-toggle-disabled-state-background-color: white;--mat-standard-button-toggle-disabled-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-divider-color: #e0e0e0;--mat-standard-button-toggle-height: 48px;--mat-datepicker-calendar-container-shape: 4px;--mat-datepicker-calendar-container-touch-shape: 4px;--mat-datepicker-calendar-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mat-datepicker-calendar-container-touch-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12);--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #616161;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(97, 97, 97, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(97, 97, 97, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(97, 97, 97, .3);--mat-datepicker-toggle-active-state-icon-color: #616161;--mat-datepicker-calendar-date-in-range-state-background-color: rgba(97, 97, 97, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e;--mat-datepicker-toggle-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-body-label-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-period-button-text-color: black;--mat-datepicker-calendar-period-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-navigation-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-header-divider-color: rgba(0, 0, 0, .12);--mat-datepicker-calendar-header-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-date-today-outline-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-today-disabled-state-outline-color: rgba(0, 0, 0, .18);--mat-datepicker-calendar-date-text-color: rgba(0, 0, 0, .87);--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-preview-state-outline-color: rgba(0, 0, 0, .24);--mat-datepicker-range-input-separator-color: rgba(0, 0, 0, .87);--mat-datepicker-range-input-disabled-state-separator-color: rgba(0, 0, 0, .38);--mat-datepicker-range-input-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-container-background-color: white;--mat-datepicker-calendar-container-text-color: rgba(0, 0, 0, .87)}.mat-datepicker-content.mat-accent{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #0277bd;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(2, 119, 189, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(2, 119, 189, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(2, 119, 189, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(2, 119, 189, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-content.mat-warn{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #f44336;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(244, 67, 54, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(244, 67, 54, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-toggle-active.mat-accent{--mat-datepicker-toggle-active-state-icon-color: #0277bd}.mat-datepicker-toggle-active.mat-warn{--mat-datepicker-toggle-active-state-icon-color: #f44336}.mat-calendar-controls{--mat-icon-button-touch-target-display: none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}html{--mat-divider-width: 1px;--mat-divider-color: rgba(0, 0, 0, .12);--mat-expansion-container-shape: 4px;--mat-expansion-legacy-header-indicator-display: inline-block;--mat-expansion-header-indicator-display: none;--mat-expansion-container-background-color: white;--mat-expansion-container-text-color: rgba(0, 0, 0, .87);--mat-expansion-actions-divider-color: rgba(0, 0, 0, .12);--mat-expansion-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-expansion-header-text-color: rgba(0, 0, 0, .87);--mat-expansion-header-description-color: rgba(0, 0, 0, .54);--mat-expansion-header-indicator-color: rgba(0, 0, 0, .54);--mat-expansion-header-collapsed-state-height: 48px;--mat-expansion-header-expanded-state-height: 64px;--mat-icon-color: inherit}.mat-icon.mat-primary{--mat-icon-color: #616161}.mat-icon.mat-accent{--mat-icon-color: #0277bd}.mat-icon.mat-warn{--mat-icon-color: #f44336}html{--mat-sidenav-container-shape: 0;--mat-sidenav-container-elevation-shadow: 0px 8px 10px -5px rgba(0, 0, 0, .2), 0px 16px 24px 2px rgba(0, 0, 0, .14), 0px 6px 30px 5px rgba(0, 0, 0, .12);--mat-sidenav-container-width: auto;--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6);--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #616161;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #616161;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #616161;--mat-stepper-header-edit-state-icon-foreground-color: white;--mat-stepper-container-color: white;--mat-stepper-line-color: rgba(0, 0, 0, .12);--mat-stepper-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-optional-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-selected-state-label-text-color: rgba(0, 0, 0, .87);--mat-stepper-header-error-state-label-text-color: #f44336;--mat-stepper-header-icon-background-color: rgba(0, 0, 0, .54);--mat-stepper-header-error-state-icon-foreground-color: #f44336;--mat-stepper-header-error-state-icon-background-color: transparent}html .mat-step-header.mat-accent{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #0277bd;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #0277bd;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #0277bd;--mat-stepper-header-edit-state-icon-foreground-color: white}html .mat-step-header.mat-warn{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #f44336;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #f44336;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #f44336;--mat-stepper-header-edit-state-icon-foreground-color: white}html{--mat-stepper-header-height: 72px;--mat-sort-arrow-color: #757575;--mat-toolbar-container-background-color: whitesmoke;--mat-toolbar-container-text-color: rgba(0, 0, 0, .87)}.mat-toolbar.mat-primary{--mat-toolbar-container-background-color: #616161;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-accent{--mat-toolbar-container-background-color: #0277bd;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-warn{--mat-toolbar-container-background-color: #f44336;--mat-toolbar-container-text-color: white}html{--mat-toolbar-standard-height: 64px;--mat-toolbar-mobile-height: 56px;--mat-tree-container-background-color: white;--mat-tree-node-text-color: rgba(0, 0, 0, .87);--mat-tree-node-min-height: 48px}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}h1{font-size:1.5rem;line-height:2rem;margin-bottom:1.5rem;font-weight:700}h2{font-size:1.25rem;line-height:1.75rem;margin-bottom:1.5rem;font-weight:700}h3{font-size:1.125rem;line-height:1.75rem;margin-bottom:1.5rem;font-weight:700}h4{font-size:1rem;line-height:1.5rem;margin-bottom:1.5rem;font-weight:700}a{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}a:hover{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.-bottom-3{bottom:-.75rem}.right-5{right:1.25rem}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-24{margin-bottom:6rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-48{margin-bottom:12rem}.mb-8{margin-bottom:2rem}.ml-4{margin-left:1rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-48{margin-top:12rem}.mt-8{margin-top:2rem}.block{display:block}.flex{display:flex}.table{display:table}.hidden{display:none}.min-h-\[500px\]{min-height:500px}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-1\/5{width:20%}.w-1\/6{width:16.666667%}.w-2\/3{width:66.666667%}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.flex-none{flex:none}.flex-grow,.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.whitespace-nowrap{white-space:nowrap}.text-pretty{text-wrap:pretty}.rounded-3xl{border-radius:1.5rem}.rounded-lg{border-radius:.5rem}.border-2{border-width:2px}.border-4{border-width:4px}.border-solid{border-style:solid}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity))}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-blue-500{--tw-gradient-from: #3b82f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-gray-500{--tw-gradient-to: #6b7280 var(--tw-gradient-to-position)}.p-2{padding:.5rem}.p-4{padding:1rem}.p-8{padding:2rem}.pb-1{padding-bottom:.25rem}.pb-4{padding-bottom:1rem}.pl-12{padding-left:3rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pt-1{padding-top:.25rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-light{font-weight:300}.uppercase{text-transform:uppercase}.italic{font-style:italic}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-500{--tw-text-opacity: 1;color:rgb(234 179 8 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}html,body{height:100%}body{margin:0;font-family:Roboto,Helvetica Neue,sans-serif}.hover\:from-black:hover{--tw-gradient-from: #000 var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:to-blue-500:hover{--tw-gradient-to: #3b82f6 var(--tw-gradient-to-position)}@media (min-width: 768px){.md\:w-1\/2{width:50%}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}} diff --git a/src/app/maturity/maturity-main/maturity-main.component.html b/src/app/maturity/maturity-main/maturity-main.component.html index b404b1d..5730a81 100644 --- a/src/app/maturity/maturity-main/maturity-main.component.html +++ b/src/app/maturity/maturity-main/maturity-main.component.html @@ -3,9 +3,9 @@
-
+

Select Stakeholder

- + {{ stakeholder.name }} @@ -22,13 +22,13 @@

Select Stakeholder

-
+

Stakeholder: {{ allQuestions[currentQuestionIndex].stakeholderName }}

Question {{ currentQuestionIndex + 1 }} of {{ allQuestions.length }}

Key Process Area: {{ allQuestions[currentQuestionIndex].kpaName }}

-

{{ allQuestions[currentQuestionIndex].question.question }}

- +

{{ allQuestions[currentQuestionIndex].question.question }}

+
{{ option.text }} @@ -62,7 +62,7 @@

Key Process Area: {{ allQuestions[currentQuestionIndex].kpaName }}

-
+

Stakeholder: {{ allQuestions[currentQuestionIndex - 1].stakeholderName }}

Maturity assessment results

diff --git a/src/app/maturity/maturity-main/maturity-main.component.ts b/src/app/maturity/maturity-main/maturity-main.component.ts index 9024c7a..ea6f88d 100644 --- a/src/app/maturity/maturity-main/maturity-main.component.ts +++ b/src/app/maturity/maturity-main/maturity-main.component.ts @@ -11,10 +11,15 @@ import { trigger, state, style, transition, animate } from '@angular/animations' templateUrl: './maturity-main.component.html', styleUrl: './maturity-main.component.css', animations: [ - trigger('fadeInOut', [ - state('void', style({ opacity: 0 })), - transition('void <=> *', [ - animate(300) + trigger('questionAnimation', [ + state('enter', style({ opacity: 1 })), + state('leave', style({ opacity: 0 })), + transition('enter => leave', [ + animate('200ms ease-in-out', style({ opacity: 0 })) + ]), + transition('leave => enter', [ + style({ opacity: 0 }), + animate('200ms ease-in-out', style({ opacity: 1 })) ]) ]) ] @@ -27,6 +32,7 @@ export class MaturityMainComponent implements OnInit { currentQuestionIndex = -1; currentControl!: FormControl; selectedStakeholder: any = null; + animationState = 'enter'; constructor(private http: HttpClient, private fb: FormBuilder, private dialog: MatDialog) { this.responseForm = this.fb.group({ @@ -59,13 +65,17 @@ export class MaturityMainComponent implements OnInit { } onStakeholderSelected(): void { - const stakeholderId = this.responseForm.get('selectedStakeholder')?.value; - this.selectedStakeholder = this.maturityQuestions.stakeHolders.find( - (stakeholder: any) => stakeholder.id === stakeholderId - ); - this.flattenQuestions(); // Refilter questions for the selected stakeholder - this.currentQuestionIndex = 0; // Start showing the first question - this.currentControl = this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath] as FormControl; + this.animationState = 'leave'; + setTimeout(() => { + const stakeholderId = this.responseForm.get('selectedStakeholder')?.value; + this.selectedStakeholder = this.maturityQuestions.stakeHolders.find( + (stakeholder: any) => stakeholder.id === stakeholderId + ); + this.flattenQuestions(); // Refilter questions for the selected stakeholder + this.currentQuestionIndex = 0; // Start showing the first question + this.currentControl = this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath] as FormControl; + this.animationState = 'enter'; + }, 200); // Match the duration of the animation } flattenQuestions(): void { @@ -86,17 +96,21 @@ export class MaturityMainComponent implements OnInit { } goToNextQuestion() { - if (this.currentQuestionIndex < this.allQuestions.length - 1) { + this.animationState = 'leave'; + setTimeout(() => { this.currentQuestionIndex++; this.currentControl = this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath] as FormControl; - } + this.animationState = 'enter'; + }, 200); } goToPreviousQuestion() { - if (this.currentQuestionIndex > 0) { + this.animationState = 'leave'; + setTimeout(() => { this.currentQuestionIndex--; this.currentControl = this.responseForm.controls[this.allQuestions[this.currentQuestionIndex].questionFullPath] as FormControl; - } + this.animationState = 'enter'; + }, 200); } startOver(): void { @@ -123,11 +137,15 @@ export class MaturityMainComponent implements OnInit { } submitStakeholderResponses(): void { - this.currentQuestionIndex++; - // this.dialog.open(MaturityResultsDialogComponent, { - // width: '1600px', - // data: { maturityResponse: this.responseForm.value } - // }); + this.animationState = 'leave'; + setTimeout(() => { + this.currentQuestionIndex++; + this.animationState = 'enter'; + // this.dialog.open(MaturityResultsDialogComponent, { + // width: '1600px', + // data: { maturityResponse: this.responseForm.value } + // }); + }, 200); } getStakeholderFormGroup(stakeholderName: string): FormGroup {