@pixeasy/customizer 0.0.11-beta.stage → 0.0.11-beta.uat
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ var b4=Object.defineProperty,y4=Object.defineProperties;var x4=Object.getOwnProp
|
|
|
2
2
|
${t.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
|
|
3
3
|
`)}`:"",this.name="UnsubscriptionError",this.errors=t});function ch(n,e){if(n){let t=n.indexOf(e);0<=t&&n.splice(t,1)}}var Li=class n{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(let o of t)o.remove(this);else t.remove(this);let{initialTeardown:i}=this;if(Ft(i))try{i()}catch(o){e=o instanceof Km?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{BD(o)}catch(s){e=e??[],s instanceof Km?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Km(e)}}add(e){var t;if(e&&e!==this)if(this.closed)BD(e);else{if(e instanceof n){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}}_hasParent(e){let{_parentage:t}=this;return t===e||Array.isArray(t)&&t.includes(e)}_addParent(e){let{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e}_removeParent(e){let{_parentage:t}=this;t===e?this._parentage=null:Array.isArray(t)&&ch(t,e)}remove(e){let{_finalizers:t}=this;t&&ch(t,e),e instanceof n&&e._removeParent(this)}};Li.EMPTY=(()=>{let n=new Li;return n.closed=!0,n})();var W_=Li.EMPTY;function Zm(n){return n instanceof Li||n&&"closed"in n&&Ft(n.remove)&&Ft(n.add)&&Ft(n.unsubscribe)}function BD(n){Ft(n)?n():n.unsubscribe()}var So={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Hd={setTimeout(n,e,...t){let{delegate:i}=Hd;return i?.setTimeout?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){let{delegate:e}=Hd;return(e?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Jm(n){Hd.setTimeout(()=>{let{onUnhandledError:e}=So;if(e)e(n);else throw n})}function $_(){}var zD=X_("C",void 0,void 0);function VD(n){return X_("E",void 0,n)}function GD(n){return X_("N",n,void 0)}function X_(n,e,t){return{kind:n,value:e,error:t}}var rc=null;function jd(n){if(So.useDeprecatedSynchronousErrorHandling){let e=!rc;if(e&&(rc={errorThrown:!1,error:null}),n(),e){let{errorThrown:t,error:i}=rc;if(rc=null,t)throw i}}else n()}function HD(n){So.useDeprecatedSynchronousErrorHandling&&rc&&(rc.errorThrown=!0,rc.error=n)}var oc=class extends Li{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Zm(e)&&e.add(this)):this.destination=A4}static create(e,t,i){return new Fa(e,t,i)}next(e){this.isStopped?q_(GD(e),this):this._next(e)}error(e){this.isStopped?q_(VD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?q_(zD,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},I4=Function.prototype.bind;function Y_(n,e){return I4.call(n,e)}var K_=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){Qm(i)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){Qm(i)}else Qm(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Qm(t)}}},Fa=class extends oc{constructor(e,t,i){super();let r;if(Ft(e)||!e)r={next:e??void 0,error:t??void 0,complete:i??void 0};else{let o;this&&So.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&Y_(e.next,o),error:e.error&&Y_(e.error,o),complete:e.complete&&Y_(e.complete,o)}):r=e}this.destination=new K_(r)}};function Qm(n){So.useDeprecatedSynchronousErrorHandling?HD(n):Jm(n)}function P4(n){throw n}function q_(n,e){let{onStoppedNotification:t}=So;t&&Hd.setTimeout(()=>t(n,e))}var A4={closed:!0,next:$_,error:P4,complete:$_};var Wd=typeof Symbol=="function"&&Symbol.observable||"@@observable";function eg(n){return n}function jD(n){return n.length===0?eg:n.length===1?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}var wn=(()=>{class n{constructor(t){t&&(this._subscribe=t)}lift(t){let i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){let o=R4(t)?t:new Fa(t,i,r);return jd(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(i){t.error(i)}}forEach(t,i){return i=WD(i),new i((r,o)=>{let s=new Fa({next:a=>{try{t(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(t)}[Wd](){return this}pipe(...t){return jD(t)(this)}toPromise(t){return t=WD(t),new t((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=e=>new n(e),n})();function WD(n){var e;return(e=n??So.Promise)!==null&&e!==void 0?e:Promise}function O4(n){return n&&Ft(n.next)&&Ft(n.error)&&Ft(n.complete)}function R4(n){return n&&n instanceof oc||O4(n)&&Zm(n)}function k4(n){return Ft(n?.lift)}function oi(n){return e=>{if(k4(e))return e.lift(function(t){try{return n(t,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function si(n,e,t,i,r){return new Z_(n,e,t,i,r)}var Z_=class extends oc{constructor(e,t,i,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(l){e.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){e.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:t}=this;super.unsubscribe(),!t&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};var $D=Gd(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var Co=(()=>{class n extends wn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let i=new tg(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new $D}next(t){jd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(t)}})}error(t){jd(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:i}=this;for(;i.length;)i.shift().error(t)}})}complete(){jd(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{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((t=this.observers)===null||t===void 0?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){let{hasError:i,isStopped:r,observers:o}=this;return i||r?W_:(this.currentObservers=null,o.push(t),new Li(()=>{this.currentObservers=null,ch(o,t)}))}_checkFinalizedStatuses(t){let{hasError:i,thrownError:r,isStopped:o}=this;i?t.error(r):o&&t.complete()}asObservable(){let t=new wn;return t.source=this,t}}return n.create=(e,t)=>new tg(e,t),n})(),tg=class extends Co{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.next)===null||i===void 0||i.call(t,e)}error(e){var t,i;(i=(t=this.destination)===null||t===void 0?void 0:t.error)===null||i===void 0||i.call(t,e)}complete(){var e,t;(t=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||t===void 0||t.call(e)}_subscribe(e){var t,i;return(i=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&i!==void 0?i:W_}};var dh=class extends Co{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return!t.closed&&e.next(this._value),t}getValue(){let{hasError:e,thrownError:t,_value:i}=this;if(e)throw t;return this._throwIfClosed(),i}next(e){super.next(this._value=e)}};function XD(n){return n&&Ft(n.schedule)}function YD(n){return n[n.length-1]}function qD(n){return Ft(YD(n))?n.pop():void 0}function KD(n){return XD(YD(n))?n.pop():void 0}function JD(n,e,t,i){function r(o){return o instanceof t?o:new t(function(s){s(o)})}return new(t||(t=Promise))(function(o,s){function a(d){try{c(i.next(d))}catch(u){s(u)}}function l(d){try{c(i.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((i=i.apply(n,e||[])).next())})}function ZD(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],i=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function sc(n){return this instanceof sc?(this.v=n,this):new sc(n)}function QD(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(n,e||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(h){return function(p){return Promise.resolve(p).then(h,u)}}function a(h,p){i[h]&&(r[h]=function(v){return new Promise(function(g,m){o.push([h,v,g,m])>1||l(h,v)})},p&&(r[h]=p(r[h])))}function l(h,p){try{c(i[h](p))}catch(v){f(o[0][3],v)}}function c(h){h.value instanceof sc?Promise.resolve(h.value.v).then(d,u):f(o[0][2],h)}function d(h){l("next",h)}function u(h){l("throw",h)}function f(h,p){h(p),o.shift(),o.length&&l(o[0][0],o[0][1])}}function eI(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof ZD=="function"?ZD(n):n[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(o){t[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},s)}}var ng=n=>n&&typeof n.length=="number"&&typeof n!="function";function ig(n){return Ft(n?.then)}function rg(n){return Ft(n[Wd])}function og(n){return Symbol.asyncIterator&&Ft(n?.[Symbol.asyncIterator])}function sg(n){return new TypeError(`You provided ${n!==null&&typeof n=="object"?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function F4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ag=F4();function lg(n){return Ft(n?.[ag])}function cg(n){return QD(this,arguments,function*(){let t=n.getReader();try{for(;;){let{value:i,done:r}=yield sc(t.read());if(r)return yield sc(void 0);yield yield sc(i)}}finally{t.releaseLock()}})}function dg(n){return Ft(n?.getReader)}function Ci(n){if(n instanceof wn)return n;if(n!=null){if(rg(n))return N4(n);if(ng(n))return L4(n);if(ig(n))return U4(n);if(og(n))return tI(n);if(lg(n))return B4(n);if(dg(n))return z4(n)}throw sg(n)}function N4(n){return new wn(e=>{let t=n[Wd]();if(Ft(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function L4(n){return new wn(e=>{for(let t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function U4(n){return new wn(e=>{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,Jm)})}function B4(n){return new wn(e=>{for(let t of n)if(e.next(t),e.closed)return;e.complete()})}function tI(n){return new wn(e=>{V4(n,e).catch(t=>e.error(t))})}function z4(n){return tI(cg(n))}function V4(n,e){var t,i,r,o;return JD(this,void 0,void 0,function*(){try{for(t=eI(n);i=yield t.next(),!i.done;){let s=i.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Kr(n,e,t,i=0,r=!1){let o=e.schedule(function(){t(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function ug(n,e=0){return oi((t,i)=>{t.subscribe(si(i,r=>Kr(i,n,()=>i.next(r),e),()=>Kr(i,n,()=>i.complete(),e),r=>Kr(i,n,()=>i.error(r),e)))})}function fg(n,e=0){return oi((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function nI(n,e){return Ci(n).pipe(fg(e),ug(e))}function iI(n,e){return Ci(n).pipe(fg(e),ug(e))}function rI(n,e){return new wn(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}function oI(n,e){return new wn(t=>{let i;return Kr(t,e,()=>{i=n[ag](),Kr(t,e,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>Ft(i?.return)&&i.return()})}function hg(n,e){if(!n)throw new Error("Iterable cannot be null");return new wn(t=>{Kr(t,e,()=>{let i=n[Symbol.asyncIterator]();Kr(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function sI(n,e){return hg(cg(n),e)}function aI(n,e){if(n!=null){if(rg(n))return nI(n,e);if(ng(n))return rI(n,e);if(ig(n))return iI(n,e);if(og(n))return hg(n,e);if(lg(n))return oI(n,e);if(dg(n))return sI(n,e)}throw sg(n)}function uh(n,e){return e?aI(n,e):Ci(n)}function os(...n){let e=KD(n);return uh(n,e)}function Na(n,e){let t=Ft(n)?n:()=>n,i=r=>r.error(t());return new wn(e?r=>e.schedule(i,0,r):i)}var lI=Gd(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function ac(n,e){let t=typeof e=="object";return new Promise((i,r)=>{let o=new Fa({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{t?i(e.defaultValue):r(new lI)}});n.subscribe(o)})}function ir(n,e){return oi((t,i)=>{let r=0;t.subscribe(si(i,o=>{i.next(n.call(e,o,r++))}))})}var{isArray:G4}=Array;function H4(n,e){return G4(e)?n(...e):n(e)}function cI(n){return ir(e=>H4(n,e))}var{isArray:j4}=Array,{getPrototypeOf:W4,prototype:$4,keys:X4}=Object;function dI(n){if(n.length===1){let e=n[0];if(j4(e))return{args:e,keys:null};if(Y4(e)){let t=X4(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}function Y4(n){return n&&typeof n=="object"&&W4(n)===$4}function uI(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function fI(n,e,t,i,r,o,s,a){let l=[],c=0,d=0,u=!1,f=()=>{u&&!l.length&&!c&&e.complete()},h=v=>c<i?p(v):l.push(v),p=v=>{o&&e.next(v),c++;let g=!1;Ci(t(v,d++)).subscribe(si(e,m=>{r?.(m),o?h(m):e.next(m)},()=>{g=!0},void 0,()=>{if(g)try{for(c--;l.length&&c<i;){let m=l.shift();s?Kr(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return n.subscribe(si(e,h,()=>{u=!0,f()})),()=>{a?.()}}function pg(n,e,t=1/0){return Ft(e)?pg((i,r)=>ir((o,s)=>e(i,o,r,s))(Ci(n(i,r))),t):(typeof e=="number"&&(t=e),oi((i,r)=>fI(i,r,n,t)))}function J_(...n){let e=qD(n),{args:t,keys:i}=dI(n),r=new wn(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d<s;d++){let u=!1;Ci(t[d]).subscribe(si(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(i?uI(i,a):a),o.complete())}))}});return e?r.pipe(cI(e)):r}function Q_(n,e){return oi((t,i)=>{let r=0;t.subscribe(si(i,o=>n.call(e,o,r++)&&i.next(o)))})}function lc(n){return oi((e,t)=>{let i=null,r=!1,o;i=e.subscribe(si(t,void 0,void 0,s=>{o=Ci(n(s,lc(n)(e))),i?(i.unsubscribe(),i=null,o.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(t))})}function eS(n,e){return Ft(e)?pg(n,e,1):pg(n,1)}function fh(n){return oi((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}function tS(n,e){return oi((t,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();t.subscribe(si(i,l=>{r?.unsubscribe();let c=0,d=o++;Ci(n(l,d)).subscribe(r=si(i,u=>i.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function nS(n,e,t){let i=Ft(n)||e||t?{next:n,error:e,complete:t}:n;return i?oi((r,o)=>{var s;(s=i.subscribe)===null||s===void 0||s.call(i);let a=!0;r.subscribe(si(o,l=>{var c;(c=i.next)===null||c===void 0||c.call(i,l),o.next(l)},()=>{var l;a=!1,(l=i.complete)===null||l===void 0||l.call(i),o.complete()},l=>{var c;a=!1,(c=i.error)===null||c===void 0||c.call(i,l),o.error(l)},()=>{var l,c;a&&((l=i.unsubscribe)===null||l===void 0||l.call(i)),(c=i.finalize)===null||c===void 0||c.call(i)}))}):eg}var iS;function mg(){return iS}function ss(n){let e=iS;return iS=n,e}var hI=Symbol("NotFound");function $d(n){return n===hI||n?.name==="\u0275NotFound"}function pI(n){let e=at(null);try{return n()}finally{at(e)}}var Sg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",Xe=class extends Error{code;constructor(e,t){super(Ys(e,t)),this.code=e}};function q4(n){return`NG0${Math.abs(n)}`}function Ys(n,e){return`${q4(n)}${e?": "+e:""}`}var Jr=globalThis;function fn(n){for(let e in n)if(n[e]===fn)return e;throw Error("")}function yI(n,e){for(let t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function Cg(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(Cg).join(", ")}]`;if(n==null)return""+n;let e=n.overriddenName||n.name;if(e)return`${e}`;let t=n.toString();if(t==null)return""+t;let i=t.indexOf(`
|
|
4
4
|
`);return i>=0?t.slice(0,i):t}function wg(n,e){return n?e?`${n} ${e}`:n:e||""}var K4=fn({__forward_ref__:fn});function Bi(n){return n.__forward_ref__=Bi,n}function vi(n){return gS(n)?n():n}function gS(n){return typeof n=="function"&&n.hasOwnProperty(K4)&&n.__forward_ref__===Bi}function _e(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function ls(n){return{providers:n.providers||[],imports:n.imports||[]}}function Eg(n){return Z4(n,Mg)}function Z4(n,e){return n.hasOwnProperty(e)&&n[e]||null}function J4(n){let e=n?.[Mg]??null;return e||null}function oS(n){return n&&n.hasOwnProperty(vg)?n[vg]:null}var Mg=fn({\u0275prov:fn}),vg=fn({\u0275inj:fn}),$e=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(e,t){this._desc=e,this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=_e({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function vS(n){return n&&!!n.\u0275providers}var bS=fn({\u0275cmp:fn}),yS=fn({\u0275dir:fn}),xS=fn({\u0275pipe:fn});var ph=fn({\u0275fac:fn}),hc=fn({__NG_ELEMENT_ID__:fn}),mI=fn({__NG_ENV_ID__:fn});function qs(n){return SS(n,"@Component"),n[bS]||null}function Tg(n){return SS(n,"@Directive"),n[yS]||null}function _S(n){return SS(n,"@Pipe"),n[xS]||null}function SS(n,e){if(n==null)throw new Xe(-919,!1)}function yh(n){return typeof n=="string"?n:n==null?"":String(n)}var xI=fn({ngErrorCode:fn}),Q4=fn({ngErrorMessage:fn}),e5=fn({ngTokenPath:fn});function CS(n,e){return _I("",-200,e)}function Dg(n,e){throw new Xe(-201,!1)}function _I(n,e,t){let i=new Xe(e,n);return i[xI]=e,i[Q4]=n,t&&(i[e5]=t),i}function t5(n){return n[xI]}var sS;function SI(){return sS}function Ui(n){let e=sS;return sS=n,e}function wS(n,e,t){let i=Eg(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(t&8)return null;if(e!==void 0)return e;Dg(n,"")}var n5={},cc=n5,i5="__NG_DI_FLAG__",aS=class{injector;constructor(e){this.injector=e}retrieve(e,t){let i=dc(t)||0;try{return this.injector.get(e,i&8?null:cc,i)}catch(r){if($d(r))return r;throw r}}};function r5(n,e=0){let t=mg();if(t===void 0)throw new Xe(-203,!1);if(t===null)return wS(n,void 0,e);{let i=o5(e),r=t.retrieve(n,i);if($d(r)){if(i.optional)return null;throw r}return r}}function Ye(n,e=0){return(SI()||r5)(vi(n),e)}function Z(n,e){return Ye(n,dc(e))}function dc(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function o5(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function lS(n){let e=[];for(let t=0;t<n.length;t++){let i=vi(n[t]);if(Array.isArray(i)){if(i.length===0)throw new Xe(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=s5(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(Ye(r,o))}else e.push(Ye(i))}return e}function s5(n){return n[i5]}function La(n,e){let t=n.hasOwnProperty(ph);return t?n[ph]:null}function CI(n,e,t){if(n.length!==e.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=e[i];if(t&&(r=t(r),o=t(o)),o!==r)return!1}return!0}function wI(n){return n.flat(Number.POSITIVE_INFINITY)}function Ig(n,e){n.forEach(t=>Array.isArray(t)?Ig(t,e):e(t))}function ES(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function xh(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function EI(n,e){let t=[];for(let i=0;i<n;i++)t.push(e);return t}function MI(n,e,t,i){let r=n.length;if(r==e)n.push(t,i);else if(r===1)n.push(i,n[0]),n[0]=t;else{for(r--,n.push(n[r-1],n[r]);r>e;){let o=r-2;n[r]=n[o],r--}n[e]=t,n[e+1]=i}}function Pg(n,e,t){let i=Yd(n,e);return i>=0?n[i|1]=t:(i=~i,MI(n,i,e,t)),i}function Ag(n,e){let t=Yd(n,e);if(t>=0)return n[t|1]}function Yd(n,e){return a5(n,e,1)}function a5(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<t];if(e===s)return o<<t;s>e?r=o:i=o+1}return~(r<<t)}var za={},wi=[],Ks=new $e(""),_h=new $e("",-1),MS=new $e(""),mh=class{get(e,t=cc){if(t===cc){let r=_I("",-201);throw r.name="\u0275NotFound",r}return t}};function Zs(n){return{\u0275providers:n}}function TI(n){return Zs([{provide:Ks,multi:!0,useValue:n}])}function DI(...n){return{\u0275providers:Og(!0,n),\u0275fromNgModule:!0}}function Og(n,...e){let t=[],i=new Set,r,o=s=>{t.push(s)};return Ig(e,s=>{let a=s;bg(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&II(r,o),t}function II(n,e){for(let t=0;t<n.length;t++){let{ngModule:i,providers:r}=n[t];TS(r,o=>{e(o,i)})}}function bg(n,e,t,i){if(n=vi(n),!n)return!1;let r=null,o=oS(n),s=!o&&qs(n);if(!o&&!s){let l=n.ngModule;if(o=oS(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=n}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)bg(c,e,t,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;Ig(o.imports,d=>{bg(d,e,t,i)&&(c||=[],c.push(d))}),c!==void 0&&II(c,e)}if(!a){let c=La(r)||(()=>new r);e({provide:r,useFactory:c,deps:wi},r),e({provide:MS,useValue:r,multi:!0},r),e({provide:Ks,useValue:()=>Ye(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=n;TS(l,d=>{e(d,c)})}}else return!1;return r!==n&&n.providers!==void 0}function TS(n,e){for(let t of n)vS(t)&&(t=t.\u0275providers),Array.isArray(t)?TS(t,e):e(t)}var l5=fn({provide:String,useValue:fn});function PI(n){return n!==null&&typeof n=="object"&&l5 in n}function c5(n){return!!(n&&n.useExisting)}function d5(n){return!!(n&&n.useFactory)}function uc(n){return typeof n=="function"}function AI(n){return!!n.useClass}var Sh=new $e(""),gg={},gI={},rS;function qd(){return rS===void 0&&(rS=new mh),rS}var Ei=class{},fc=class extends Ei{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,dS(e,s=>this.processProvider(s)),this.records.set(_h,Xd(void 0,this)),r.has("environment")&&this.records.set(Ei,Xd(void 0,this));let o=this.records.get(Sh);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(MS,wi,{self:!0}))}retrieve(e,t){let i=dc(t)||0;try{return this.get(e,cc,i)}catch(r){if($d(r))return r;throw r}}destroy(){hh(this),this._destroyed=!0;let e=at(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of t)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),at(e)}}onDestroy(e){return hh(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){hh(this);let t=ss(this),i=Ui(void 0),r;try{return e()}finally{ss(t),Ui(i)}}get(e,t=cc,i){if(hh(this),e.hasOwnProperty(mI))return e[mI](this);let r=dc(i),o,s=ss(this),a=Ui(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let d=m5(e)&&Eg(e);d&&this.injectableDefInScope(d)?c=Xd(cS(e),gg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?qd():this.parent;return t=r&8&&t===cc?null:t,l.get(e,t)}catch(l){let c=t5(l);throw c===-200||c===-201?new Xe(c,null):l}finally{Ui(a),ss(s)}}resolveInjectorInitializers(){let e=at(null),t=ss(this),i=Ui(void 0),r;try{let o=this.get(Ks,wi,{self:!0});for(let s of o)s()}finally{ss(t),Ui(i),at(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=vi(e);let t=uc(e)?e:vi(e&&e.provide),i=f5(e);if(!uc(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Xd(void 0,gg,!0),r.factory=()=>lS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t,i){let r=at(null);try{if(t.value===gI)throw CS("");return t.value===gg&&(t.value=gI,t.value=t.factory(void 0,i)),typeof t.value=="object"&&t.value&&p5(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{at(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=vi(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function cS(n){let e=Eg(n),t=e!==null?e.factory:La(n);if(t!==null)return t;if(n instanceof $e)throw new Xe(-204,!1);if(n instanceof Function)return u5(n);throw new Xe(-204,!1)}function u5(n){if(n.length>0)throw new Xe(-204,!1);let t=J4(n);return t!==null?()=>t.factory(n):()=>new n}function f5(n){if(PI(n))return Xd(void 0,n.useValue);{let e=DS(n);return Xd(e,gg)}}function DS(n,e,t){let i;if(uc(n)){let r=vi(n);return La(r)||cS(r)}else if(PI(n))i=()=>vi(n.useValue);else if(d5(n))i=()=>n.useFactory(...lS(n.deps||[]));else if(c5(n))i=(r,o)=>Ye(vi(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=vi(n&&(n.useClass||n.provide));if(h5(n))i=()=>new r(...lS(n.deps));else return La(r)||cS(r)}return i}function hh(n){if(n.destroyed)throw new Xe(-205,!1)}function Xd(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function h5(n){return!!n.deps}function p5(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function m5(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function dS(n,e){for(let t of n)Array.isArray(t)?dS(t,e):t&&vS(t)?dS(t.\u0275providers,e):e(t)}function Kd(n,e){let t;n instanceof fc?(hh(n),t=n):t=new aS(n);let i,r=ss(t),o=Ui(void 0);try{return e()}finally{ss(r),Ui(o)}}function OI(){return SI()!==void 0||mg()!=null}var zi=0,qe=1,Ct=2,Vn=3,Qr=4,Vi=5,Gi=6,Zd=7,Fn=8,xr=9,cs=10,qt=11,Jd=12,IS=13,pc=14,ai=15,Va=16,mc=17,ds=18,us=19,PS=20,Xs=21,Rg=22,Ua=23,_r=24,gc=25,fs=26,$t=27,RI=1,wo=6,hs=7,Ch=8,vc=9,Tn=10;function Sr(n){return Array.isArray(n)&&typeof n[RI]=="object"}function or(n){return Array.isArray(n)&&n[RI]===!0}function AS(n){return(n.flags&4)!==0}function ps(n){return n.componentOffset>-1}function Qd(n){return(n.flags&1)===1}function ms(n){return!!n.template}function bc(n){return(n[Ct]&512)!==0}function Ga(n){return(n[Ct]&256)===256}var OS="svg",kI="math";function Cr(n){for(;Array.isArray(n);)n=n[zi];return n}function RS(n,e){return Cr(e[n])}function eo(n,e){return Cr(e[n.index])}function yc(n,e){return n.data[e]}function kg(n,e){return n[e]}function kS(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}function wr(n,e){let t=e[n];return Sr(t)?t:t[zi]}function Fg(n){return(n[Ct]&128)===128}function FI(n){return or(n[Vn])}function to(n,e){return e==null?null:n[e]}function FS(n){n[mc]=0}function NS(n){n[Ct]&1024||(n[Ct]|=1024,Fg(n)&&xc(n))}function NI(n,e){for(;n>0;)e=e[pc],n--;return e}function wh(n){return!!(n[Ct]&9216||n[_r]?.dirty)}function Ng(n){n[cs].changeDetectionScheduler?.notify(8),n[Ct]&64&&(n[Ct]|=1024),wh(n)&&xc(n)}function xc(n){n[cs].changeDetectionScheduler?.notify(0);let e=Ba(n);for(;e!==null&&!(e[Ct]&8192||(e[Ct]|=8192,!Fg(e)));)e=Ba(e)}function LS(n,e){if(Ga(n))throw new Xe(911,!1);n[Xs]===null&&(n[Xs]=[]),n[Xs].push(e)}function LI(n,e){if(n[Xs]===null)return;let t=n[Xs].indexOf(e);t!==-1&&n[Xs].splice(t,1)}function Ba(n){let e=n[Vn];return or(e)?e[Vn]:e}function US(n){return n[Zd]??=[]}function BS(n){return n.cleanup??=[]}function UI(n,e,t,i){let r=US(e);r.push(t),n.firstCreatePass&&BS(n).push(i,r.length-1)}var It={lFrame:ZI(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var uS=!1;function BI(){return It.lFrame.elementDepthCount}function zI(){It.lFrame.elementDepthCount++}function zS(){It.lFrame.elementDepthCount--}function Lg(){return It.bindingsEnabled}function Ug(){return It.skipHydrationRootTNode!==null}function VS(n){return It.skipHydrationRootTNode===n}function VI(n){It.skipHydrationRootTNode=n}function GS(){It.skipHydrationRootTNode=null}function ht(){return It.lFrame.lView}function Pn(){return It.lFrame.tView}function J(n){return It.lFrame.contextLView=n,n[Fn]}function Q(n){return It.lFrame.contextLView=null,n}function bi(){let n=HS();for(;n!==null&&n.type===64;)n=n.parent;return n}function HS(){return It.lFrame.currentTNode}function GI(){let n=It.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}function eu(n,e){let t=It.lFrame;t.currentTNode=n,t.isParent=e}function jS(){return It.lFrame.isParent}function WS(){It.lFrame.isParent=!1}function HI(){return It.lFrame.contextLView}function $S(){return uS}function gh(n){let e=uS;return uS=n,e}function tu(){let n=It.lFrame,e=n.bindingRootIndex;return e===-1&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function jI(n){return It.lFrame.bindingIndex=n}function Ha(){return It.lFrame.bindingIndex++}function XS(n){let e=It.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function WI(){return It.lFrame.inI18n}function $I(n,e){let t=It.lFrame;t.bindingIndex=t.bindingRootIndex=n,Bg(e)}function XI(){return It.lFrame.currentDirectiveIndex}function Bg(n){It.lFrame.currentDirectiveIndex=n}function YI(n){let e=It.lFrame.currentDirectiveIndex;return e===-1?null:n[e]}function qI(){return It.lFrame.currentQueryIndex}function zg(n){It.lFrame.currentQueryIndex=n}function g5(n){let e=n[qe];return e.type===2?e.declTNode:e.type===1?n[Vi]:null}function YS(n,e,t){if(t&4){let r=e,o=n;for(;r=r.parent,r===null&&!(t&1);)if(r=g5(o),r===null||(o=o[pc],r.type&10))break;if(r===null)return!1;e=r,n=o}let i=It.lFrame=KI();return i.currentTNode=e,i.lView=n,!0}function Vg(n){let e=KI(),t=n[qe];It.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function KI(){let n=It.lFrame,e=n===null?null:n.child;return e===null?ZI(n):e}function ZI(n){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return n!==null&&(n.child=e),e}function JI(){let n=It.lFrame;return It.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var qS=JI;function Gg(){let n=JI();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function QI(n){return(It.lFrame.contextLView=NI(n,It.lFrame.contextLView))[Fn]}function Js(){return It.lFrame.selectedIndex}function ja(n){It.lFrame.selectedIndex=n}function Eh(){let n=It.lFrame;return yc(n.tView,n.selectedIndex)}function Wa(){It.lFrame.currentNamespace=OS}function nu(){v5()}function v5(){It.lFrame.currentNamespace=null}function KS(){return It.lFrame.currentNamespace}var eP=!0;function Hg(){return eP}function Qs(n){eP=n}function fS(n,e=null,t=null,i){let r=tP(n,e,t,i);return r.resolveInjectorInitializers(),r}function tP(n,e=null,t=null,i,r=new Set){let o=[t||wi,DI(n)],s;return new fc(o,e||qd(),s||null,r)}var Mi=class n{static THROW_IF_NOT_FOUND=cc;static NULL=new mh;static create(e,t){if(Array.isArray(e))return fS({name:""},t,e,"");{let i=e.name??"";return fS({name:i},e.parent,e.providers,i)}}static \u0275prov=_e({token:n,providedIn:"any",factory:()=>Ye(_h)});static __NG_ELEMENT_ID__=-1},Cn=new $e(""),sr=(()=>{class n{static __NG_ELEMENT_ID__=b5;static __NG_ENV_ID__=t=>t}return n})(),yg=class extends sr{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Ga(this._lView)}onDestroy(e){let t=this._lView;return LS(t,e),()=>LI(t,e)}};function b5(){return new yg(ht())}var nP=!1,iP=new $e(""),$a=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new dh(!1);debugTaskTracker=Z(iP,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new wn(t=>{t.next(!1),t.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let t=this.taskId++;return this.pendingTasks.add(t),this.debugTaskTracker?.add(t),t}has(t){return this.pendingTasks.has(t)}remove(t){this.pendingTasks.delete(t),this.debugTaskTracker?.remove(t),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=_e({token:n,providedIn:"root",factory:()=>new n})}return n})(),hS=class extends Co{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,OI()&&(this.destroyRef=Z(sr,{optional:!0})??void 0,this.pendingTasks=Z($a,{optional:!0})??void 0)}emit(e){let t=at(null);try{super.next(e)}finally{at(t)}}subscribe(e,t,i){let r=e,o=t||(()=>null),s=i;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof Li&&e.add(a),a}wrapInTimeout(e){return t=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{e(t)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},yr=hS;function xg(...n){}function ZS(n){let e,t;function i(){n=xg;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{n(),i()})),()=>i()}function rP(n){return queueMicrotask(()=>n()),()=>{n=xg}}var JS="isAngularZone",vh=JS+"_ID",y5=0,rr=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new yr(!1);onMicrotaskEmpty=new yr(!1);onStable=new yr(!1);onError=new yr(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=nP}=e;if(typeof Zone>"u")throw new Xe(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,S5(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(JS)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new Xe(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new Xe(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,x5,xg,xg);try{return o.runTask(s,t,i)}finally{o.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}},x5={};function QS(n){if(n._nesting==0&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function _5(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function e(){ZS(()=>{n.callbackScheduled=!1,pS(n),n.isCheckStableRunning=!0,QS(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{e()}):n._outer.run(()=>{e()}),pS(n)}function S5(n){let e=()=>{_5(n)},t=y5++;n._inner=n._inner.fork({name:"angular",properties:{[JS]:!0,[vh]:t,[vh+t]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(C5(l))return i.invokeTask(o,s,a,l);try{return vI(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&e(),bI(n)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return vI(n),i.invoke(o,s,a,l,c)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!w5(l)&&e(),bI(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,pS(n),QS(n)):s.change=="macroTask"&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}function pS(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function vI(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function bI(n){n._nesting--,QS(n)}var bh=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new yr;onMicrotaskEmpty=new yr;onStable=new yr;onError=new yr;run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}};function C5(n){return oP(n,"__ignore_ng_zone__")}function w5(n){return oP(n,"__scheduler_tick__")}function oP(n,e){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[e]===!0}var Zr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},ea=new $e("",{factory:()=>{let n=Z(rr),e=Z(Ei),t;return i=>{n.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw i}):(t??=e.get(Zr),t.handleError(i))})}}}),sP={provide:Ks,useValue:()=>{let n=Z(Zr,{optional:!0})},multi:!0},E5=new $e("",{factory:()=>{let n=Z(Cn).defaultView;if(!n)return;let e=Z(ea),t=o=>{e(o.reason),o.preventDefault()},i=o=>{o.error?e(o.error):e(new Error(o.message,{cause:o})),o.preventDefault()},r=()=>{n.addEventListener("unhandledrejection",t),n.addEventListener("error",i)};typeof Zone<"u"?Zone.root.run(r):r(),Z(sr).onDestroy(()=>{n.removeEventListener("error",i),n.removeEventListener("unhandledrejection",t)})}});function e1(){return Zs([TI(()=>{Z(E5)})])}function F(n,e){let[t,i,r]=V_(n,e?.equal),o=t,s=o[Qn];return o.set=i,o.update=r,o.asReadonly=jg.bind(o),o}function jg(){let n=this[Qn];if(n.readonlyFn===void 0){let e=()=>this();e[Qn]=n,n.readonlyFn=e}return n.readonlyFn}var Mh=(()=>{class n{view;node;constructor(t,i){this.view=t,this.node=i}static __NG_ELEMENT_ID__=M5}return n})();function M5(){return new Mh(ht(),bi())}var as=class{},Th=new $e("",{factory:()=>!0});var t1=new $e(""),iu=(()=>{class n{internalPendingTasks=Z($a);scheduler=Z(as);errorHandler=Z(ea);add(){let t=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(t)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(t))}}run(t){let i=this.add();t().catch(this.errorHandler).finally(i)}static \u0275prov=_e({token:n,providedIn:"root",factory:()=>new n})}return n})(),Wg=(()=>{class n{static \u0275prov=_e({token:n,providedIn:"root",factory:()=>new mS})}return n})(),mS=class{dirtyEffectCount=0;queues=new Map;add(e){this.enqueue(e),this.schedule(e)}schedule(e){e.dirty&&this.dirtyEffectCount++}remove(e){let t=e.zone,i=this.queues.get(t);i.has(e)&&(i.delete(e),e.dirty&&this.dirtyEffectCount--)}enqueue(e){let t=e.zone;this.queues.has(t)||this.queues.set(t,new Set);let i=this.queues.get(t);i.has(e)||i.add(e)}flush(){for(;this.dirtyEffectCount>0;){let e=!1;for(let[t,i]of this.queues)t===null?e||=this.flushQueue(i):e||=t.run(()=>this.flushQueue(i));e||(this.dirtyEffectCount=0)}}flushQueue(e){let t=!1;for(let i of e)i.dirty&&(this.dirtyEffectCount--,t=!0,i.run());return t}},_g=class{[Qn];constructor(e){this[Qn]=e}destroy(){this[Qn].destroy()}};function en(n,e){let t=e?.injector??Z(Mi),i=e?.manualCleanup!==!0?t.get(sr):null,r,o=t.get(Mh,null,{optional:!0}),s=t.get(as);return o!==null?(r=I5(o.view,s,n),i instanceof yg&&i._lView===o.view&&(i=null)):r=P5(n,t.get(Wg),s),r.injector=t,i!==null&&(r.onDestroyFns=[i.onDestroy(()=>r.destroy())]),new _g(r)}var aP=ue(R({},H_),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let n=gh(!1);try{j_(this)}finally{gh(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=at(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],at(n)}}}),T5=ue(R({},aP),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(nc(this),this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();this.cleanup(),this.scheduler.remove(this)}}),D5=ue(R({},aP),{consumerMarkedDirty(){this.view[Ct]|=8192,xc(this.view),this.notifier.notify(13)},destroy(){if(nc(this),this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();this.cleanup(),this.view[Ua]?.delete(this)}});function I5(n,e,t){let i=Object.create(D5);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=e,i.fn=lP(i,t),n[Ua]??=new Set,n[Ua].add(i),i.consumerMarkedDirty(i),i}function P5(n,e,t){let i=Object.create(T5);return i.fn=lP(i,n),i.scheduler=e,i.notifier=t,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function lP(n,e){return()=>{e(t=>(n.cleanupFns??=[]).push(t))}}var $g={JSACTION:"jsaction"};function zh(n){return{toString:n}.toString()}function U5(n){return typeof n=="function"}function ZP(n,e,t,i){e!==null?e.applyValueToInputSignal(e,i):n[t]=i}var r0=class{previousValue;currentValue;firstChange;constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}},hu=(()=>{let n=()=>JP;return n.ngInherit=!0,n})();function JP(n){return n.type.prototype.ngOnChanges&&(n.setInput=z5),B5}function B5(){let n=e2(this),e=n?.current;if(e){let t=n.previous;if(t===za)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function z5(n,e,t,i,r){let o=this.declaredInputs[i],s=e2(n)||V5(n,{previous:za,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new r0(c&&c.currentValue,t,l===za),ZP(n,e,r,t)}var QP="__ngSimpleChanges__";function e2(n){return n[QP]||null}function V5(n,e){return n[QP]=e}var cP=[];var tn=function(n,e=null,t){for(let i=0;i<cP.length;i++){let r=cP[i];r(n,e,t)}},jt=(function(n){return n[n.TemplateCreateStart=0]="TemplateCreateStart",n[n.TemplateCreateEnd=1]="TemplateCreateEnd",n[n.TemplateUpdateStart=2]="TemplateUpdateStart",n[n.TemplateUpdateEnd=3]="TemplateUpdateEnd",n[n.LifecycleHookStart=4]="LifecycleHookStart",n[n.LifecycleHookEnd=5]="LifecycleHookEnd",n[n.OutputStart=6]="OutputStart",n[n.OutputEnd=7]="OutputEnd",n[n.BootstrapApplicationStart=8]="BootstrapApplicationStart",n[n.BootstrapApplicationEnd=9]="BootstrapApplicationEnd",n[n.BootstrapComponentStart=10]="BootstrapComponentStart",n[n.BootstrapComponentEnd=11]="BootstrapComponentEnd",n[n.ChangeDetectionStart=12]="ChangeDetectionStart",n[n.ChangeDetectionEnd=13]="ChangeDetectionEnd",n[n.ChangeDetectionSyncStart=14]="ChangeDetectionSyncStart",n[n.ChangeDetectionSyncEnd=15]="ChangeDetectionSyncEnd",n[n.AfterRenderHooksStart=16]="AfterRenderHooksStart",n[n.AfterRenderHooksEnd=17]="AfterRenderHooksEnd",n[n.ComponentStart=18]="ComponentStart",n[n.ComponentEnd=19]="ComponentEnd",n[n.DeferBlockStateStart=20]="DeferBlockStateStart",n[n.DeferBlockStateEnd=21]="DeferBlockStateEnd",n[n.DynamicComponentStart=22]="DynamicComponentStart",n[n.DynamicComponentEnd=23]="DynamicComponentEnd",n[n.HostBindingsUpdateStart=24]="HostBindingsUpdateStart",n[n.HostBindingsUpdateEnd=25]="HostBindingsUpdateEnd",n})(jt||{});function G5(n,e,t){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){let s=JP(e);(t.preOrderHooks??=[]).push(n,s),(t.preOrderCheckHooks??=[]).push(n,s)}r&&(t.preOrderHooks??=[]).push(0-n,r),o&&((t.preOrderHooks??=[]).push(n,o),(t.preOrderCheckHooks??=[]).push(n,o))}function t2(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t<i;t++){let o=n.data[t].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;s&&(n.contentHooks??=[]).push(-t,s),a&&((n.contentHooks??=[]).push(t,a),(n.contentCheckHooks??=[]).push(t,a)),l&&(n.viewHooks??=[]).push(-t,l),c&&((n.viewHooks??=[]).push(t,c),(n.viewCheckHooks??=[]).push(t,c)),d!=null&&(n.destroyHooks??=[]).push(t,d)}}function Zg(n,e,t){n2(n,e,3,t)}function Jg(n,e,t,i){(n[Ct]&3)===t&&n2(n,e,t,i)}function n1(n,e){let t=n[Ct];(t&3)===e&&(t&=16383,t+=1,n[Ct]=t)}function n2(n,e,t,i){let r=i!==void 0?n[mc]&65535:0,o=i??-1,s=e.length-1,a=0;for(let l=r;l<s;l++)if(typeof e[l+1]=="number"){if(a=e[l],i!=null&&a>=i)break}else e[l]<0&&(n[mc]+=65536),(a<o||o==-1)&&(H5(n,t,e,l),n[mc]=(n[mc]&4294901760)+l+2),l++}function dP(n,e){tn(jt.LifecycleHookStart,n,e);let t=at(null);try{e.call(n)}finally{at(t),tn(jt.LifecycleHookEnd,n,e)}}function H5(n,e,t,i){let r=t[i]<0,o=t[i+1],s=r?-t[i]:t[i],a=n[s];r?n[Ct]>>14<n[mc]>>16&&(n[Ct]&3)===e&&(n[Ct]+=16384,dP(a,o)):dP(a,o)}var ou=-1,Cc=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(e,t,i,r){this.factory=e,this.name=r,this.canSeeViewProviders=t,this.injectImpl=i}};function j5(n){return(n.flags&8)!==0}function W5(n){return(n.flags&16)!==0}function $5(n,e,t){let i=0;for(;i<t.length;){let r=t[i];if(typeof r=="number"){if(r!==0)break;i++;let o=t[i++],s=t[i++],a=t[i++];n.setAttribute(e,s,a,o)}else{let o=r,s=t[++i];Y5(o)?n.setProperty(e,o,s):n.setAttribute(e,o,s),i++}}return i}function X5(n){return n===3||n===4||n===6}function Y5(n){return n.charCodeAt(0)===64}function lu(n,e){if(!(e===null||e.length===0))if(n===null||n.length===0)n=e.slice();else{let t=-1;for(let i=0;i<e.length;i++){let r=e[i];typeof r=="number"?t=r:t===0||(t===-1||t===2?uP(n,t,r,null,e[++i]):uP(n,t,r,null,null))}}return n}function uP(n,e,t,i,r){let o=0,s=n.length;if(e===-1)s=-1;else for(;o<n.length;){let a=n[o++];if(typeof a=="number"){if(a===e){s=-1;break}else if(a>e){s=o-1;break}}}for(;o<n.length;){let a=n[o];if(typeof a=="number")break;if(a===t){r!==null&&(n[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(n.splice(s,0,e),o=s+1),n.splice(o++,0,t),r!==null&&n.splice(o++,0,r)}function i2(n){return n!==ou}function o0(n){return n&32767}function q5(n){return n>>16}function s0(n,e){let t=q5(n),i=e;for(;t>0;)i=i[pc],t--;return i}var g1=!0;function a0(n){let e=g1;return g1=n,e}var K5=256,r2=K5-1,o2=5,Z5=0,gs={};function J5(n,e,t){let i;typeof t=="string"?i=t.charCodeAt(0)||0:t.hasOwnProperty(hc)&&(i=t[hc]),i==null&&(i=t[hc]=Z5++);let r=i&r2,o=1<<r;e.data[n+(r>>o2)]|=o}function l0(n,e){let t=s2(n,e);if(t!==-1)return t;let i=e[qe];i.firstCreatePass&&(n.injectorIndex=e.length,i1(i.data,n),i1(e,null),i1(i.blueprint,null));let r=tC(n,e),o=n.injectorIndex;if(i2(r)){let s=o0(r),a=s0(r,e),l=a[qe].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function i1(n,e){n.push(0,0,0,0,0,0,0,0,e)}function s2(n,e){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||e[n.injectorIndex+8]===null?-1:n.injectorIndex}function tC(n,e){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;r!==null;){if(i=u2(r),i===null)return ou;if(t++,r=r[pc],i.injectorIndex!==-1)return i.injectorIndex|t<<16}return ou}function v1(n,e,t){J5(n,e,t)}function a2(n,e,t){if(t&8||n!==void 0)return n;Dg(e,"NodeInjector")}function l2(n,e,t,i){if(t&8&&i===void 0&&(i=null),(t&3)===0){let r=n[xr],o=Ui(void 0);try{return r?r.get(e,i,t&8):wS(e,i,t&8)}finally{Ui(o)}}return a2(i,e,t)}function c2(n,e,t,i=0,r){if(n!==null){if(e[Ct]&2048&&!(i&2)){let s=nz(n,e,t,i,gs);if(s!==gs)return s}let o=d2(n,e,t,i,gs);if(o!==gs)return o}return l2(e,t,i,r)}function d2(n,e,t,i,r){let o=ez(t);if(typeof o=="function"){if(!YS(e,n,i))return i&1?a2(r,t,i):l2(e,t,i,r);try{let s;if(s=o(i),s==null&&!(i&8))Dg(t);else return s}finally{qS()}}else if(typeof o=="number"){let s=null,a=s2(n,e),l=ou,c=i&1?e[ai][Vi]:null;for((a===-1||i&4)&&(l=a===-1?tC(n,e):e[a+8],l===ou||!hP(i,!1)?a=-1:(s=e[qe],a=o0(l),e=s0(l,e)));a!==-1;){let d=e[qe];if(fP(o,a,d.data)){let u=Q5(a,e,t,s,i,c);if(u!==gs)return u}l=e[a+8],l!==ou&&hP(i,e[qe].data[a+8]===c)&&fP(o,a,e)?(s=d,a=o0(l),e=s0(l,e)):a=-1}}return r}function Q5(n,e,t,i,r,o){let s=e[qe],a=s.data[n+8],l=i==null?ps(a)&&g1:i!=s&&(a.type&3)!==0,c=r&1&&o===a,d=Qg(a,s,t,l,c);return d!==null?Ah(e,s,d,a,r):gs}function Qg(n,e,t,i,r){let o=n.providerIndexes,s=e.data,a=o&1048575,l=n.directiveStart,c=n.directiveEnd,d=o>>20,u=i?a:a+d,f=r?a+d:c;for(let h=u;h<f;h++){let p=s[h];if(h<l&&t===p||h>=l&&p.type===t)return h}if(r){let h=s[l];if(h&&ms(h)&&h.type===t)return l}return null}function Ah(n,e,t,i,r){let o=n[t],s=e.data;if(o instanceof Cc){let a=o;if(a.resolving)throw CS("");let l=a0(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?Ui(a.injectImpl):null,f=YS(n,i,0);try{o=n[t]=a.factory(void 0,r,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&G5(t,s[t],e)}finally{u!==null&&Ui(u),a0(l),a.resolving=!1,qS()}}return o}function ez(n){if(typeof n=="string")return n.charCodeAt(0)||0;let e=n.hasOwnProperty(hc)?n[hc]:void 0;return typeof e=="number"?e>=0?e&r2:tz:e}function fP(n,e,t){let i=1<<n;return!!(t[e+(n>>o2)]&i)}function hP(n,e){return!(n&2)&&!(n&1&&e)}var Sc=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return c2(this._tNode,this._lView,e,dc(i),t)}};function tz(){return new Sc(bi(),ht())}function na(n){return zh(()=>{let e=n.prototype.constructor,t=e[ph]||b1(e),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[ph]||b1(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function b1(n){return gS(n)?()=>{let e=b1(vi(n));return e&&e()}:La(n)}function nz(n,e,t,i,r){let o=n,s=e;for(;o!==null&&s!==null&&s[Ct]&2048&&!bc(s);){let a=d2(o,s,t,i|2,gs);if(a!==gs)return a;let l=o.parent;if(!l){let c=s[PS];if(c){let d=c.get(t,gs,i&-5);if(d!==gs)return d}l=u2(s),s=s[pc]}o=l}return r}function u2(n){let e=n[qe],t=e.type;return t===2?e.declTNode:t===1?n[Vi]:null}function iz(){return pu(bi(),ht())}function pu(n,e){return new ar(eo(n,e))}var ar=(()=>{class n{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=iz}return n})();function rz(n){return n instanceof ar?n.nativeElement:n}function oz(){return this._results[Symbol.iterator]()}var c0=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new Co}constructor(e=!1){this._emitDistinctChangesOnly=e}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let i=wI(e);(this._changesDetected=!CI(this._results,i,t))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=oz},f2="ngSkipHydration",sz="ngskiphydration";function h2(n){let e=n.mergedAttrs;if(e===null)return!1;for(let t=0;t<e.length;t+=2){let i=e[t];if(typeof i=="number")return!1;if(typeof i=="string"&&i.toLowerCase()===sz)return!0}return!1}function p2(n){return n.hasAttribute(f2)}function d0(n){return(n.flags&128)===128}function m2(n){if(d0(n))return!0;let e=n.parent;for(;e;){if(d0(n)||h2(e))return!0;e=e.parent}return!1}var nC=(function(n){return n[n.OnPush=0]="OnPush",n[n.Eager=1]="Eager",n[n.Default=1]="Default",n})(nC||{}),g2=new Map,az=0;function lz(){return az++}function cz(n){g2.set(n[us],n)}function y1(n){g2.delete(n[us])}var pP="__ngContext__";function cu(n,e){Sr(e)?(n[pP]=e[us],cz(e)):n[pP]=e}function v2(n){return y2(n[Jd])}function b2(n){return y2(n[Qr])}function y2(n){for(;n!==null&&!or(n);)n=n[Qr];return n}var x1;function iC(n){x1=n}function rC(){if(x1!==void 0)return x1;if(typeof document<"u")return document;throw new Xe(210,!1)}var bs=new $e("",{factory:()=>dz}),dz="ng";var y0=new $e(""),Vh=new $e("",{providedIn:"platform",factory:()=>"unknown"});var x0=new $e("",{factory:()=>Z(Cn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var mu=(()=>{class n{static \u0275prov=_e({token:n,providedIn:"root",factory:()=>{let t=new n;return t.store=uz(Z(Cn),Z(bs)),t}});store={};onSerializeCallbacks={};get(t,i){return this.store[t]!==void 0?this.store[t]:i}set(t,i){this.store[t]=i}remove(t){delete this.store[t]}hasKey(t){return this.store.hasOwnProperty(t)}get isEmpty(){return Object.keys(this.store).length===0}onSerialize(t,i){this.onSerializeCallbacks[t]=i}toJson(){for(let t in this.onSerializeCallbacks)if(this.onSerializeCallbacks.hasOwnProperty(t))try{this.store[t]=this.onSerializeCallbacks[t]()}catch(i){console.warn("Exception in onSerialize callback: ",i)}return JSON.stringify(this.store).replace(/</g,"\\u003C")}}return n})();function uz(n,e){let t=n.getElementById(e+"-state");if(t?.textContent)try{return JSON.parse(t.textContent)}catch(i){console.warn("Exception while restoring TransferState for app "+e,i)}return{}}var x2="h",_2="b",fz="f",hz="n",S2="e",C2="t",_0="c",oC="x",Oh="r",w2="i",E2="n",sC="d";var M2="di",T2="s",D2="p";var Gh=new $e(""),I2=!1,aC=new $e("",{factory:()=>I2});var lC=new $e(""),P2=!1,A2=new $e("",{factory:()=>[]}),O2=new $e(""),cC=new $e("",{factory:()=>new Map});var Hh="ngb";var R2=(n,e,t)=>{let i=n,r=i.__jsaction_fns??new Map,o=r.get(e)??[];o.push(t),r.set(e,o),i.__jsaction_fns=r},k2=(n,e)=>{let t=n,i=t.getAttribute(Hh)??"",r=e.get(i)??new Set;r.has(t)||r.add(t),e.set(i,r)};var F2=n=>{n.removeAttribute($g.JSACTION),n.removeAttribute(Hh),n.__jsaction_fns=void 0},N2=new $e("",{factory:()=>({})});function dC(n,e){let t=e?.__jsaction_fns?.get(n.type);if(!(!t||!e?.isConnected))for(let i of t)i(n)}var _1=new Map;function L2(n,e){return _1.set(n,e),()=>_1.delete(n)}var mP=!1,U2=(n,e,t,i)=>{};function pz(n,e,t,i){U2(n,e,t,i)}function B2(){mP||(U2=(n,e,t,i)=>{let r=n[xr].get(bs);_1.get(r)?.(e,t,i)},mP=!0)}var S0=new $e("");function jh(n){return(n.flags&32)===32}var mz="__nghData__",uC=mz,gz="__nghDeferData__",z2=gz;var e0="ngh",V2="nghm",G2=()=>null;function vz(n,e,t=!1){let i=n.getAttribute(e0);if(i==null)return null;let[r,o]=i.split("|");if(i=t?o:r,!i)return null;let s=o?`|${o}`:"",a=t?r:s,l={};if(i!==""){let d=e.get(mu,null,{optional:!0});d!==null&&(l=d.get(uC,[])[Number(i)])}let c={data:l,firstChild:n.firstChild??null};return t&&(c.firstChild=n,C0(c,0,n.nextSibling)),a?n.setAttribute(e0,a):n.removeAttribute(e0),c}function H2(){G2=vz}function j2(n,e,t=!1){return G2(n,e,t)}function W2(n){let e=n._lView;return e[qe].type===2?null:(bc(e)&&(e=e[$t]),e)}function bz(n){return n.textContent?.replace(/\s/gm,"")}function yz(n){let e=rC(),t=e.createNodeIterator(n,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=bz(o);return s==="ngetn"||s==="ngtns"?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),i,r=[];for(;i=t.nextNode();)r.push(i);for(let o of r)o.textContent==="ngetn"?o.replaceWith(e.createTextNode("")):o.remove()}function C0(n,e,t){n.segmentHeads??={},n.segmentHeads[e]=t}function S1(n,e){return n.segmentHeads?.[e]??null}function $2(n){return n.get(O2,!1,{optional:!0})}function xz(n,e){let t=n.data,i=t[S2]?.[e]??null;return i===null&&t[_0]?.[e]&&(i=fC(n,e)),i}function X2(n,e){return n.data[_0]?.[e]??null}function fC(n,e){let t=X2(n,e)??[],i=0;for(let r of t)i+=r[Oh]*(r[oC]??1);return i}function _z(n){if(typeof n.disconnectedNodes>"u"){let e=n.data[sC];n.disconnectedNodes=e?new Set(e):null}return n.disconnectedNodes}function Y2(n,e){if(typeof n.disconnectedNodes>"u"){let t=n.data[sC];n.disconnectedNodes=t?new Set(t):null}return!!_z(n)?.has(e)}function w0(n,e){let t=n[Gi];return t!==null&&!Ug()&&!jh(e)&&!Y2(t,e.index-$t)}function Sz(n,e){let t=e.get(S0),r=e.get(mu).get(z2,{}),o=!1,s=n,a=null,l=[];for(;!o&&s;){o=t.has(s);let c=t.hydrating.get(s);if(a===null&&c!=null){a=c.promise;break}l.unshift(s),s=r[s][D2]}return{parentBlockPromise:a,hydrationQueue:l}}function r1(n){return!!n&&n.nodeType===Node.COMMENT_NODE&&n.textContent?.trim()===V2}function gP(n){for(;n&&n.nodeType===Node.TEXT_NODE;)n=n.previousSibling;return n}function q2(n){for(let i of n.body.childNodes)if(r1(i))return;let e=gP(n.body.previousSibling);if(r1(e))return;let t=gP(n.head.lastChild);if(!r1(t))throw new Xe(-507,!1)}function K2(n,e){let t=n.contentQueries;if(t!==null){let i=at(null);try{for(let r=0;r<t.length;r+=2){let o=t[r],s=t[r+1];if(s!==-1){let a=n.data[s];zg(o),a.contentQueries(2,e[s],s)}}}finally{at(i)}}}function C1(n,e,t){zg(0);let i=at(null);try{e(n,t)}finally{at(i)}}function hC(n,e,t){if(AS(e)){let i=at(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;s<o;s++){let a=n.data[s];if(a.contentQueries){let l=t[s];a.contentQueries(1,l,s)}}}finally{at(i)}}}var To=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(To||{});var Xg;function Cz(){if(Xg===void 0&&(Xg=null,Jr.trustedTypes))try{Xg=Jr.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Xg}function E0(n){return Cz()?.createHTML(n)||n}var Yg;function wz(){if(Yg===void 0&&(Yg=null,Jr.trustedTypes))try{Yg=Jr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Yg}function vP(n){return wz()?.createHTML(n)||n}var ta=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Sg})`}},w1=class extends ta{getTypeName(){return"HTML"}},E1=class extends ta{getTypeName(){return"Style"}},M1=class extends ta{getTypeName(){return"Script"}},T1=class extends ta{getTypeName(){return"URL"}},D1=class extends ta{getTypeName(){return"ResourceURL"}};function Do(n){return n instanceof ta?n.changingThisBreaksApplicationSecurity:n}function ia(n,e){let t=Z2(n);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${Sg})`)}return t===e}function Z2(n){return n instanceof ta&&n.getTypeName()||null}function pC(n){return new w1(n)}function mC(n){return new E1(n)}function gC(n){return new M1(n)}function vC(n){return new T1(n)}function bC(n){return new D1(n)}function Ez(n){let e=new P1(n);return Mz()?new I1(e):e}var I1=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(E0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},P1=class{defaultDoc;inertDocument;constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=E0(e),t}};function Mz(){try{return!!new window.DOMParser().parseFromString(E0(""),"text/html")}catch{return!1}}var Tz=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Wh(n){return n=String(n),n.match(Tz)?n:"unsafe:"+n}function ra(n){let e={};for(let t of n.split(","))e[t]=!0;return e}function $h(...n){let e={};for(let t of n)for(let i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}var J2=ra("area,br,col,hr,img,wbr"),Q2=ra("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),eA=ra("rp,rt"),Dz=$h(eA,Q2),Iz=$h(Q2,ra("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")),Pz=$h(eA,ra("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")),bP=$h(J2,Iz,Pz,Dz),tA=ra("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Az=ra("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"),Oz=ra("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"),Rz=$h(tA,Az,Oz),kz=ra("script,style,template"),A1=class{sanitizedSomething=!1;buf=[];sanitizeChildren(e){let t=e.firstChild,i=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild){r.push(t),t=Lz(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=Nz(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=yP(e).toLowerCase();if(!bP.hasOwnProperty(t))return this.sanitizedSomething=!0,!kz.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let i=e.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!Rz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;tA[a]&&(l=Wh(l)),this.buf.push(" ",s,'="',xP(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=yP(e).toLowerCase();bP.hasOwnProperty(t)&&!J2.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(xP(e))}};function Fz(n,e){return(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function Nz(n){let e=n.nextSibling;if(e&&n!==e.previousSibling)throw nA(e);return e}function Lz(n){let e=n.firstChild;if(e&&Fz(n,e))throw nA(e);return e}function yP(n){let e=n.nodeName;return typeof e=="string"?e:"FORM"}function nA(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var Uz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Bz=/([^\#-~ |!])/g;function xP(n){return n.replace(/&/g,"&").replace(Uz,function(e){let t=e.charCodeAt(0),i=e.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(Bz,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var qg;function M0(n,e){let t=null;try{qg=qg||Ez(n);let i=e?String(e):"";t=qg.getInertBodyElement(i);let r=5,o=i;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=t.innerHTML,t=qg.getInertBodyElement(i)}while(i!==o);let a=new A1().sanitizeChildren(_P(t)||t);return E0(a)}finally{if(t){let i=_P(t)||t;for(;i.firstChild;)i.firstChild.remove()}}}function _P(n){return"content"in n&&zz(n)?n.content:null}function zz(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var Vz=/^>|^->|<!--|-->|--!>|<!-$/g,Gz=/(<|>)/g,Hz="\u200B$1\u200B";function jz(n){return n.replace(Vz,e=>e.replace(Gz,Hz))}function iA(n,e){return n.createText(e)}function Wz(n,e,t){n.setValue(e,t)}function rA(n,e){return n.createComment(jz(e))}function yC(n,e,t){return n.createElement(e,t)}function u0(n,e,t,i,r){n.insertBefore(e,t,i,r)}function oA(n,e,t){n.appendChild(e,t)}function SP(n,e,t,i,r){i!==null?u0(n,e,t,i,r):oA(n,e,t)}function xC(n,e,t,i){n.removeChild(null,e,t,i)}function sA(n){n.textContent=""}function $z(n,e,t){n.setAttribute(e,"style",t)}function Xz(n,e,t){t===""?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t)}function aA(n,e,t){let{mergedAttrs:i,classes:r,styles:o}=t;i!==null&&$5(n,e,i),r!==null&&Xz(n,e,r),o!==null&&$z(n,e,o)}var Io=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n})(Io||{});function T0(n){let e=lA();return e?vP(e.sanitize(Io.HTML,n)||""):ia(n,"HTML")?vP(Do(n)):M0(rC(),yh(n))}function Hi(n){let e=lA();return e?e.sanitize(Io.URL,n)||"":ia(n,"URL")?Do(n):Wh(yh(n))}function lA(){let n=ht();return n&&n[cs].sanitizer}function _C(n){return n.ownerDocument.defaultView}function SC(n){return n.ownerDocument}function cA(n){return n.ownerDocument.body}function Yz(n,e,t){let i=n.length;for(;;){let r=n.indexOf(e,t);if(r===-1)return r;if(r===0||n.charCodeAt(r-1)<=32){let o=e.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}t=r+1}}var dA="ng-template";function qz(n,e,t,i){let r=0;if(i){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&Yz(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(CC(n))return!1;if(r=e.indexOf(1,r),r>-1){let o;for(;++r<e.length&&typeof(o=e[r])=="string";)if(o.toLowerCase()===t)return!0}return!1}function CC(n){return n.type===4&&n.value!==dA}function Kz(n,e,t){let i=n.type===4&&!t?dA:n.value;return e===i}function Zz(n,e,t){let i=4,r=n.attrs,o=r!==null?eV(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!Eo(i)&&!Eo(l))return!1;if(s&&Eo(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!Kz(n,l,t)||l===""&&e.length===1){if(Eo(i))return!1;s=!0}}else if(i&8){if(r===null||!qz(n,r,l,t)){if(Eo(i))return!1;s=!0}}else{let c=e[++a],d=Jz(l,r,CC(n),t);if(d===-1){if(Eo(i))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),i&2&&c!==u){if(Eo(i))return!1;s=!0}}}}return Eo(i)||s}function Eo(n){return(n&1)===0}function Jz(n,e,t,i){if(e===null)return-1;let r=0;if(i||!t){let o=!1;for(;r<e.length;){let s=e[r];if(s===n)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=e[++r];for(;typeof a=="string";)a=e[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return tV(e,n)}function uA(n,e,t=!1){for(let i=0;i<e.length;i++)if(Zz(n,e[i],t))return!0;return!1}function Qz(n){let e=n.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function eV(n){for(let e=0;e<n.length;e++){let t=n[e];if(X5(t))return e}return n.length}function tV(n,e){let t=n.indexOf(4);if(t>-1)for(t++;t<n.length;){let i=n[t];if(typeof i=="number")return-1;if(i===e)return t;t++}return-1}function nV(n,e){e:for(let t=0;t<e.length;t++){let i=e[t];if(n.length===i.length){for(let r=0;r<n.length;r++)if(n[r]!==i[r])continue e;return!0}}return!1}function CP(n,e){return n?":not("+e.trim()+")":e}function iV(n){let e=n[0],t=1,i=2,r="",o=!1;for(;t<n.length;){let s=n[t];if(typeof s=="string")if(i&2){let a=n[++t];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!Eo(s)&&(e+=CP(o,r),r=""),i=s,o=o||!Eo(i);t++}return r!==""&&(e+=CP(o,r)),e}function rV(n){return n.map(iV).join(",")}function oV(n){let e=[],t=[],i=1,r=2;for(;i<n.length;){let o=n[i];if(typeof o=="string")r===2?o!==""&&e.push(o,n[++i]):r===8&&t.push(o);else{if(!Eo(r))break;r=o}i++}return t.length&&e.push(1,...t),e}var Tr={};function wC(n,e,t,i,r,o,s,a,l,c,d){let u=$t+i,f=u+r,h=sV(u,f),p=typeof c=="function"?c():c;return h[qe]={type:n,blueprint:h,template:t,queries:null,viewQuery:a,declTNode:e,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:f,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:p,incompleteFirstPass:!1,ssrId:d}}function sV(n,e){let t=[];for(let i=0;i<e;i++)t.push(i<n?null:Tr);return t}function aV(n){let e=n.tView;return e===null||e.incompleteFirstPass?n.tView=wC(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):e}function EC(n,e,t,i,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[zi]=r,u[Ct]=i|4|128|8|64|1024,(c!==null||n&&n[Ct]&2048)&&(u[Ct]|=2048),FS(u),u[Vn]=u[pc]=n,u[Fn]=t,u[cs]=s||n&&n[cs],u[qt]=a||n&&n[qt],u[xr]=l||n&&n[xr]||null,u[Vi]=o,u[us]=lz(),u[Gi]=d,u[PS]=c,u[ai]=e.type==2?n[ai]:u,u}function lV(n,e,t){let i=eo(e,n),r=aV(t),o=n[cs].rendererFactory,s=MC(n,EC(n,r,null,fA(t),i,e,null,o.createRenderer(i,t),null,null,null));return n[e.index]=s}function fA(n){let e=16;return n.signals?e=4096:n.onPush&&(e=64),e}function hA(n,e,t,i){if(t===0)return-1;let r=e.length;for(let o=0;o<t;o++)e.push(i),n.blueprint.push(i),n.data.push(null);return r}function MC(n,e){return n[Jd]?n[IS][Qr]=e:n[Jd]=e,n[IS]=e,e}function P(n=1){pA(Pn(),ht(),Js()+n,!1)}function pA(n,e,t,i){if(!i)if((e[Ct]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Zg(e,o,t)}else{let o=n.preOrderHooks;o!==null&&Jg(e,o,0,t)}ja(t)}var D0=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(D0||{});function O1(n,e,t,i){let r=at(null);try{let[o,s,a]=n.inputs[t],l=null;(s&D0.SignalBased)!==0&&(l=e[o][Qn]),l!==null&&l.transformFn!==void 0?i=l.transformFn(i):a!==null&&(i=a.call(e,i)),n.setInput!==null?n.setInput(e,l,i,t,o):ZP(e,l,o,i)}finally{at(r)}}var vs=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(vs||{}),cV;function TC(n,e){return cV(n,e)}var Aue=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var R1=new WeakMap;function dV(n,e){let t=R1.get(n);if(!t||t.length===0)return;let i=e.parentNode,r=e.previousSibling;for(let o=t.length-1;o>=0;o--){let s=t[o],a=s.parentNode;(r&&s===r||a&&i&&a!==i)&&(t.splice(o,1),s.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}})),s.parentNode?.removeChild(s))}}function uV(n,e){let t=R1.get(n);t?t.includes(e)||t.push(e):R1.set(n,[e])}var Xa=new Set,I0=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(I0||{}),oa=new $e(""),wP=new Set;function Po(n){wP.has(n)||(wP.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var DC=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=_e({token:n,providedIn:"root",factory:()=>new n})}return n})(),mA=[0,1,2,3],gA=(()=>{class n{ngZone=Z(rr);scheduler=Z(as);errorHandler=Z(Zr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Z(oa,{optional:!0})}execute(){let t=this.sequences.size>0;t&&tn(jt.AfterRenderHooksStart),this.executing=!0;for(let i of mA)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[i]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[i];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(let i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),t&&tn(jt.AfterRenderHooksEnd)}register(t){let{view:i}=t;i!==void 0?((i[gc]??=[]).push(t),xc(i),i[Ct]|=8192):this.executing?this.deferredRegistrations.add(t):this.addSequence(t)}addSequence(t){this.sequences.add(t),this.scheduler.notify(7)}unregister(t){this.executing&&this.sequences.has(t)?(t.erroredOrDestroyed=!0,t.pipelinedValue=void 0,t.once=!0):(this.sequences.delete(t),this.deferredRegistrations.delete(t))}maybeTrace(t,i){return i?i.run(I0.AFTER_NEXT_RENDER,t):t()}static \u0275prov=_e({token:n,providedIn:"root",factory:()=>new n})}return n})(),f0=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(e,t,i,r,o,s=null){this.impl=e,this.hooks=t,this.view=i,this.once=r,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let e=this.view?.[gc];e&&(this.view[gc]=e.filter(t=>t!==this))}};function P0(n,e){let t=e?.injector??Z(Mi);return Po("NgAfterNextRender"),hV(n,t,e,!0)}function fV(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function hV(n,e,t,i){let r=e.get(DC);r.impl??=e.get(gA);let o=e.get(oa,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(sr):null,a=e.get(Mh,null,{optional:!0}),l=new f0(r.impl,fV(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var vA=new $e("",{factory:()=>{let n=Z(Ei),e=new Set;return n.onDestroy(()=>e.clear()),{queue:e,isScheduled:!1,scheduler:null,injector:n}}});function bA(n,e,t){let i=n.get(vA);if(Array.isArray(e))for(let r of e)i.queue.add(r),t?.detachedLeaveAnimationFns?.push(r);else i.queue.add(e),t?.detachedLeaveAnimationFns?.push(e);i.scheduler&&i.scheduler(n)}function pV(n,e){let t=n.get(vA);if(e.detachedLeaveAnimationFns){for(let i of e.detachedLeaveAnimationFns)t.queue.delete(i);e.detachedLeaveAnimationFns=void 0}}function mV(n,e){for(let[t,i]of e)bA(n,i.animateFns)}function EP(n,e,t,i){let r=n?.[fs]?.enter;e!==null&&r&&r.has(t.index)&&mV(i,r)}function MP(n,e,t,i){try{t.get(_h)}catch{return i(!1)}let r=n?.[fs],o=gV(n,e,r);if(o.size===0){let s=!1;if(n){let a=[];A0(n,e,a),s=a.length>0}if(!s)return i(!1)}n&&Xa.add(n[us]),bA(t,()=>vV(n,e,r||void 0,o,i),r||void 0)}function gV(n,e,t){let i=new Map,r=t?.leave;if(r&&r.has(e.index)&&i.set(e.index,r.get(e.index)),n&&r)for(let[o,s]of r){if(i.has(o))continue;let l=n[qe].data[o].parent;for(;l;){if(l===e){i.set(o,s);break}l=l.parent}}return i}function vV(n,e,t,i,r){let o=[];if(t&&t.leave)for(let[s]of i){if(!t.leave.has(s))continue;let a=t.leave.get(s);for(let l of a.animateFns){let{promise:c}=l();o.push(c)}t.detachedLeaveAnimationFns=void 0}if(n&&A0(n,e,o),o.length>0){let s=t||n?.[fs];if(s){let a=s.running;a&&o.push(a),s.running=Promise.allSettled(o),bV(n,s.running,r)}else Promise.allSettled(o).then(()=>{n&&Xa.delete(n[us]),r(!0)})}else n&&Xa.delete(n[us]),r(!1)}function A0(n,e,t){if(ps(e)){let r=wr(e.index,n);TP(r,t)}else if(e.type&12){let r=n[e.index];if(or(r))for(let o=Tn;o<r.length;o++){let s=r[o];TP(s,t)}}let i=e.child;for(;i;)A0(n,i,t),i=i.next}function TP(n,e){let t=n[fs];if(t&&t.leave)for(let r of t.leave.values())for(let o of r.animateFns){let{promise:s}=o();e.push(s)}let i=n[qe].firstChild;for(;i;)A0(n,i,e),i=i.next}function bV(n,e,t){e.then(()=>{n[fs]?.running===e&&(n[fs].running=void 0,Xa.delete(n[us])),t(!0)})}function ru(n,e,t,i,r,o,s,a){if(r!=null){let l,c=!1;or(r)?l=r:Sr(r)&&(c=!0,r=r[zi]);let d=Cr(r);n===0&&i!==null?(EP(a,i,o,t),s==null?oA(e,i,d):u0(e,i,d,s||null,!0)):n===1&&i!==null?(EP(a,i,o,t),u0(e,i,d,s||null,!0),dV(o,d)):n===2?(a?.[fs]?.leave?.has(o.index)&&uV(o,d),MP(a,o,t,u=>{xC(e,d,c,u)})):n===3&&MP(a,o,t,()=>{e.destroyNode(d)}),l!=null&&DV(e,n,t,l,o,i,s)}}function yV(n,e){yA(n,e),e[zi]=null,e[Vi]=null}function xV(n,e,t,i,r,o){i[zi]=r,i[Vi]=e,R0(n,i,t,1,r,o)}function yA(n,e){e[cs].changeDetectionScheduler?.notify(9),R0(n,e,e[qt],2,null,null)}function _V(n){let e=n[Jd];if(!e)return o1(n[qe],n);for(;e;){let t=null;if(Sr(e))t=e[Jd];else{let i=e[Tn];i&&(t=i)}if(!t){for(;e&&!e[Qr]&&e!==n;)Sr(e)&&o1(e[qe],e),e=e[Vn];e===null&&(e=n),Sr(e)&&o1(e[qe],e),t=e&&e[Qr]}e=t}}function IC(n,e){let t=n[vc],i=t.indexOf(e);t.splice(i,1)}function O0(n,e){if(Ga(e))return;let t=e[qt];t.destroyNode&&R0(n,e,t,3,null,null),_V(e)}function o1(n,e){if(Ga(e))return;let t=at(null);try{e[Ct]&=-129,e[Ct]|=256,e[_r]&&nc(e[_r]),CV(n,e),SV(n,e),e[qe].type===1&&e[qt].destroy();let i=e[Va];if(i!==null&&or(e[Vn])){i!==e[Vn]&&IC(i,e);let r=e[ds];r!==null&&r.detachView(n)}y1(e)}finally{at(t)}}function SV(n,e){let t=n.cleanup,i=e[Zd];if(t!==null)for(let s=0;s<t.length-1;s+=2)if(typeof t[s]=="string"){let a=t[s+3];a>=0?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[t[s+1]];t[s].call(a)}i!==null&&(e[Zd]=null);let r=e[Xs];if(r!==null){e[Xs]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[Ua];if(o!==null){e[Ua]=null;for(let s of o)s.destroy()}}function CV(n,e){let t;if(n!=null&&(t=n.destroyHooks)!=null)for(let i=0;i<t.length;i+=2){let r=e[t[i]];if(!(r instanceof Cc)){let o=t[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];tn(jt.LifecycleHookStart,a,l);try{l.call(a)}finally{tn(jt.LifecycleHookEnd,a,l)}}else{tn(jt.LifecycleHookStart,r,o);try{o.call(r)}finally{tn(jt.LifecycleHookEnd,r,o)}}}}}function xA(n,e,t){return wV(n,e.parent,t)}function wV(n,e,t){let i=e;for(;i!==null&&i.type&168;)e=i,i=e.parent;if(i===null)return t[zi];if(ps(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===To.None||r===To.Emulated)return null}return eo(i,t)}function _A(n,e,t){return MV(n,e,t)}function EV(n,e,t){return n.type&40?eo(n,t):null}var MV=EV,DP;function PC(n,e,t,i){let r=xA(n,i,e),o=e[qt],s=i.parent||e[Vi],a=_A(s,i,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)SP(o,r,t[l],a,!1);else SP(o,r,t,a,!1);DP!==void 0&&DP(o,i,e,t,r)}function Ih(n,e){if(e!==null){let t=e.type;if(t&3)return eo(e,n);if(t&4)return k1(-1,n[e.index]);if(t&8){let i=e.child;if(i!==null)return Ih(n,i);{let r=n[e.index];return or(r)?k1(-1,r):Cr(r)}}else{if(t&128)return Ih(n,e.next);if(t&32)return TC(e,n)()||Cr(n[e.index]);{let i=SA(n,e);if(i!==null){if(Array.isArray(i))return i[0];let r=Ba(n[ai]);return Ih(r,i)}else return Ih(n,e.next)}}}return null}function SA(n,e){if(e!==null){let i=n[ai][Vi],r=e.projection;return i.projection[r]}return null}function k1(n,e){let t=Tn+n+1;if(t<e.length){let i=e[t],r=i[qe].firstChild;if(r!==null)return Ih(i,r)}return e[hs]}function AC(n,e,t,i,r,o,s){for(;t!=null;){let a=i[xr];if(t.type===128){t=t.next;continue}let l=i[t.index],c=t.type;if(s&&e===0&&(l&&cu(Cr(l),i),t.flags|=2),!jh(t))if(c&8)AC(n,e,t.child,i,r,o,!1),ru(e,n,a,r,l,t,o,i);else if(c&32){let d=TC(t,i),u;for(;u=d();)ru(e,n,a,r,u,t,o,i);ru(e,n,a,r,l,t,o,i)}else c&16?CA(n,e,i,t,r,o):ru(e,n,a,r,l,t,o,i);t=s?t.projectionNext:t.next}}function R0(n,e,t,i,r,o){AC(t,i,n.firstChild,e,r,o,!1)}function TV(n,e,t){let i=e[qt],r=xA(n,t,e),o=t.parent||e[Vi],s=_A(o,t,e);CA(i,0,e,t,r,s)}function CA(n,e,t,i,r,o){let s=t[ai],l=s[Vi].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];ru(e,n,t[xr],r,d,i,o,t)}else{let c=l,d=s[Vn];d0(i)&&(c.flags|=128),AC(n,e,c,d,r,o,!0)}}function DV(n,e,t,i,r,o,s){let a=i[hs],l=Cr(i);a!==l&&ru(e,n,t,o,a,r,s);for(let c=Tn;c<i.length;c++){let d=i[c];R0(d[qe],d,n,e,o,a)}}function IV(n,e,t,i,r){if(e)r?n.addClass(t,i):n.removeClass(t,i);else{let o=i.indexOf("-")===-1?void 0:vs.DashCase;r==null?n.removeStyle(t,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=vs.Important),n.setStyle(t,i,r,o))}}function wA(n,e,t,i,r){let o=Js(),s=i&2;try{ja(-1),s&&e.length>$t&&pA(n,e,$t,!1);let a=s?jt.TemplateUpdateStart:jt.TemplateCreateStart;tn(a,r,t),t(i,r)}finally{ja(o);let a=s?jt.TemplateUpdateEnd:jt.TemplateCreateEnd;tn(a,r,t)}}function k0(n,e,t){FV(n,e,t),(t.flags&64)===64&&NV(n,e,t)}function Xh(n,e,t=eo){let i=e.localNames;if(i!==null){let r=e.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?t(e,n):n[s];n[r++]=a}}}function PV(n,e,t,i){let o=i.get(aC,I2)||t===To.ShadowDom||t===To.ExperimentalIsolatedShadowDom,s=n.selectRootElement(e,o);return AV(s),s}function AV(n){EA(n)}var EA=()=>null;function OV(n){p2(n)?sA(n):yz(n)}function MA(){EA=OV}function RV(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function TA(n,e,t,i,r,o){let s=e[qe];if(NC(n,s,e,t,i)){ps(n)&&kV(e,n.index);return}n.type&3&&(t=RV(t)),DA(n,e,t,i,r,o)}function DA(n,e,t,i,r,o){if(n.type&3){let s=eo(n,e);i=o!=null?o(i,n.value||"",t):i,r.setProperty(s,t,i)}else n.type&12}function kV(n,e){let t=wr(e,n);t[Ct]&16||(t[Ct]|=64)}function FV(n,e,t){let i=t.directiveStart,r=t.directiveEnd;ps(t)&&lV(e,t,n.data[i+t.componentOffset]),n.firstCreatePass||l0(t,e);let o=t.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=Ah(e,n,s,t);if(cu(l,e),o!==null&&zV(e,s-i,l,a,t,o),ms(a)){let c=wr(t.index,e);c[Fn]=Ah(e,n,s,t)}}}function NV(n,e,t){let i=t.directiveStart,r=t.directiveEnd,o=t.index,s=XI();try{ja(o);for(let a=i;a<r;a++){let l=n.data[a],c=e[a];Bg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&LV(l,c)}}finally{ja(-1),Bg(s)}}function LV(n,e){n.hostBindings!==null&&n.hostBindings(1,e)}function OC(n,e){let t=n.directiveRegistry,i=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];uA(e,o.selectors,!1)&&(i??=[],ms(o)?i.unshift(o):i.push(o))}return i}function UV(n,e,t,i,r,o){let s=eo(n,e);BV(e[qt],s,o,n.value,t,i,r)}function BV(n,e,t,i,r,o,s){if(o==null)n.removeAttribute(e,r,t);else{let a=s==null?yh(o):s(o,i||"",r);n.setAttribute(e,r,a,t)}}function zV(n,e,t,i,r,o){let s=o[e];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],c=s[a+1];O1(i,t,l,c)}}function RC(n,e,t,i,r){let o=$t+t,s=e[qe],a=r(s,e,n,i,t);e[o]=a,eu(n,!0);let l=n.type===2;return l?(aA(e[qt],a,n),(BI()===0||Qd(n))&&cu(a,e),zI()):cu(a,e),Hg()&&(!l||!jh(n))&&PC(s,e,a,n),n}function kC(n){let e=n;return jS()?WS():(e=e.parent,eu(e,!1)),e}function FC(n,e){let t=n[xr];if(!t)return;let i;try{i=t.get(ea,null)}catch{i=null}i?.(e)}function NC(n,e,t,i,r){let o=n.inputs?.[i],s=n.hostDirectiveInputs?.[i],a=!1;if(s)for(let l=0;l<s.length;l+=2){let c=s[l],d=s[l+1],u=e.data[c];O1(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];O1(d,c,i,r),a=!0}return a}function VV(n,e){let t=wr(e,n),i=t[qe];GV(i,t);let r=t[zi];r!==null&&t[Gi]===null&&(t[Gi]=j2(r,t[xr])),tn(jt.ComponentStart);try{LC(i,t,t[Fn])}finally{tn(jt.ComponentEnd,t[Fn])}}function GV(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])}function LC(n,e,t){Vg(e);try{let i=n.viewQuery;i!==null&&C1(1,i,t);let r=n.template;r!==null&&wA(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),e[ds]?.finishViewCreation(n),n.staticContentQueries&&K2(n,e),n.staticViewQueries&&C1(2,n.viewQuery,t);let o=n.components;o!==null&&HV(e,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[Ct]&=-5,Gg()}}function HV(n,e){for(let t=0;t<e.length;t++)VV(n,e[t])}function gu(n,e,t,i){let r=at(null);try{let o=e.tView,a=n[Ct]&4096?4096:16,l=EC(n,o,t,a,null,e,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),c=n[e.index];l[Va]=c;let d=n[ds];return d!==null&&(l[ds]=d.createEmbeddedView(o)),LC(o,l,t),l}finally{at(r)}}function wc(n,e){return!e||e.firstChild===null||d0(n)}function Rh(n,e,t,i,r=!1){for(;t!==null;){if(t.type===128){t=r?t.projectionNext:t.next;continue}let o=e[t.index];o!==null&&i.push(Cr(o)),or(o)&&IA(o,i);let s=t.type;if(s&8)Rh(n,e,t.child,i);else if(s&32){let a=TC(t,e),l;for(;l=a();)i.push(l)}else if(s&16){let a=SA(e,t);if(Array.isArray(a))i.push(...a);else{let l=Ba(e[ai]);Rh(l[qe],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}function IA(n,e){for(let t=Tn;t<n.length;t++){let i=n[t],r=i[qe].firstChild;r!==null&&Rh(i[qe],i,r,e)}n[hs]!==n[zi]&&e.push(n[hs])}function PA(n){if(n[gc]!==null){for(let e of n[gc])e.impl.addSequence(e);n[gc].length=0}}var AA=[];function jV(n){return n[_r]??WV(n)}function WV(n){let e=AA.pop()??Object.create(XV);return e.lView=n,e}function $V(n){n.lView[_r]!==n&&(n.lView=null,AA.push(n))}var XV=ue(R({},Ql),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{xc(n.lView)},consumerOnSignalRead(){this.lView[_r]=this}});function YV(n){let e=n[_r]??Object.create(qV);return e.lView=n,e}var qV=ue(R({},Ql),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let e=Ba(n.lView);for(;e&&!OA(e[qe]);)e=Ba(e);e&&NS(e)},consumerOnSignalRead(){this.lView[_r]=this}});function OA(n){return n.type!==2}function RA(n){if(n[Ua]===null)return;let e=!0;for(;e;){let t=!1;for(let i of n[Ua])i.dirty&&(t=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));e=t&&!!(n[Ct]&8192)}}var KV=100;function kA(n,e=0){let i=n[cs].rendererFactory,r=!1;r||i.begin?.();try{ZV(n,e)}finally{r||i.end?.()}}function ZV(n,e){let t=$S();try{gh(!0),F1(n,e);let i=0;for(;wh(n);){if(i===KV)throw new Xe(103,!1);i++,F1(n,1)}}finally{gh(t)}}function JV(n,e,t,i){if(Ga(e))return;let r=e[Ct],o=!1,s=!1;Vg(e);let a=!0,l=null,c=null;o||(OA(n)?(c=jV(e),l=tc(c)):Wm()===null?(a=!1,c=YV(e),l=tc(c)):e[_r]&&(nc(e[_r]),e[_r]=null));try{FS(e),jI(n.bindingStartIndex),t!==null&&wA(n,e,t,2,i);let d=(r&3)===3;if(!o)if(d){let h=n.preOrderCheckHooks;h!==null&&Zg(e,h,null)}else{let h=n.preOrderHooks;h!==null&&Jg(e,h,0,null),n1(e,0)}if(s||QV(e),RA(e),FA(e,0),n.contentQueries!==null&&K2(n,e),!o)if(d){let h=n.contentCheckHooks;h!==null&&Zg(e,h)}else{let h=n.contentHooks;h!==null&&Jg(e,h,1),n1(e,1)}tG(n,e);let u=n.components;u!==null&&LA(e,u,0);let f=n.viewQuery;if(f!==null&&C1(2,f,i),!o)if(d){let h=n.viewCheckHooks;h!==null&&Zg(e,h)}else{let h=n.viewHooks;h!==null&&Jg(e,h,2),n1(e,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),e[Rg]){for(let h of e[Rg])h();e[Rg]=null}o||(PA(e),e[Ct]&=-73)}catch(d){throw o||xc(e),d}finally{c!==null&&(zd(c,l),a&&$V(c)),Gg()}}function FA(n,e){for(let t=v2(n);t!==null;t=b2(t))for(let i=Tn;i<t.length;i++){let r=t[i];NA(r,e)}}function QV(n){for(let e=v2(n);e!==null;e=b2(e)){if(!(e[Ct]&2))continue;let t=e[vc];for(let i=0;i<t.length;i++){let r=t[i];NS(r)}}}function eG(n,e,t){tn(jt.ComponentStart);let i=wr(e,n);try{NA(i,t)}finally{tn(jt.ComponentEnd,i[Fn])}}function NA(n,e){Fg(n)&&F1(n,e)}function F1(n,e){let i=n[qe],r=n[Ct],o=n[_r],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&ah(o)),s||=!1,o&&(o.dirty=!1),n[Ct]&=-9217,s)JV(i,n,i.template,n[Fn]);else if(r&8192){let a=at(null);try{RA(n),FA(n,1);let l=i.components;l!==null&&LA(n,l,1),PA(n)}finally{at(a)}}}function LA(n,e,t){for(let i=0;i<e.length;i++)eG(n,e[i],t)}function tG(n,e){let t=n.hostBindingOpCodes;if(t!==null)try{for(let i=0;i<t.length;i++){let r=t[i];if(r<0)ja(~r);else{let o=r,s=t[++i],a=t[++i];$I(s,o);let l=e[o];tn(jt.HostBindingsUpdateStart,l);try{a(2,l)}finally{tn(jt.HostBindingsUpdateEnd,l)}}}}finally{ja(-1)}}function F0(n,e){let t=$S()?64:1088;for(n[cs].changeDetectionScheduler?.notify(e);n;){n[Ct]|=t;let i=Ba(n);if(bc(n)&&!i)return n;n=i}return null}function UA(n,e,t,i){return[n,!0,0,e,null,i,null,t,null,null]}function BA(n,e){let t=Tn+e;if(t<n.length)return n[t]}function vu(n,e,t,i=!0){let r=e[qe];if(nG(r,e,n,t),i){let s=k1(t,n),a=e[qt],l=a.parentNode(n[hs]);l!==null&&xV(r,n[Vi],a,e,l,s)}let o=e[Gi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function UC(n,e){let t=kh(n,e);return t!==void 0&&O0(t[qe],t),t}function kh(n,e){if(n.length<=Tn)return;let t=Tn+e,i=n[t];if(i){let r=i[Va];r!==null&&r!==n&&IC(r,i),e>0&&(n[t-1][Qr]=i[Qr]);let o=xh(n,Tn+e);yV(i[qe],i);let s=o[ds];s!==null&&s.detachView(o[qe]),i[Vn]=null,i[Qr]=null,i[Ct]&=-129}return i}function nG(n,e,t,i){let r=Tn+i,o=t.length;i>0&&(t[r-1][Qr]=e),i<o-Tn?(e[Qr]=t[r],ES(t,Tn+i,e)):(t.push(e),e[Qr]=null),e[Vn]=t;let s=e[Va];s!==null&&t!==s&&zA(s,e);let a=e[ds];a!==null&&a.insertView(n),Ng(e),e[Ct]|=128}function zA(n,e){let t=n[vc],i=e[Vn];if(Sr(i))n[Ct]|=2;else{let r=i[Vn][ai];e[ai]!==r&&(n[Ct]|=2)}t===null?n[vc]=[e]:t.push(e)}var Ya=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[qe];return Rh(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[Fn]}set context(e){this._lView[Fn]=e}get destroyed(){return Ga(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Vn];if(or(e)){let t=e[Ch],i=t?t.indexOf(this):-1;i>-1&&(kh(e,i),xh(t,i))}this._attachedToViewContainer=!1}O0(this._lView[qe],this._lView)}onDestroy(e){LS(this._lView,e)}markForCheck(){F0(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Ct]&=-129}reattach(){Ng(this._lView),this._lView[Ct]|=128}detectChanges(){this._lView[Ct]|=1024,kA(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Xe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=bc(this._lView),t=this._lView[Va];t!==null&&!e&&IC(t,this._lView),yA(this._lView[qe],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Xe(902,!1);this._appRef=e;let t=bc(this._lView),i=this._lView[Va];i!==null&&!t&&zA(i,this._lView),Ng(this._lView)}};var du=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=iG;constructor(t,i,r){this._declarationLView=t,this._declarationTContainer=i,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,i){return this.createEmbeddedViewImpl(t,i)}createEmbeddedViewImpl(t,i,r){let o=gu(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:i,dehydratedView:r});return new Ya(o)}}return n})();function iG(){return N0(bi(),ht())}function N0(n,e){return n.type&4?new du(e,n,pu(n,e)):null}function bu(n,e,t,i,r){let o=n.data[e];if(o===null)o=rG(n,e,t,i,r),WI()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=i,o.attrs=r;let s=GI();o.injectorIndex=s===null?-1:s.injectorIndex}return eu(o,!0),o}function rG(n,e,t,i,r){let o=HS(),s=jS(),a=s?o:o&&o.parent,l=n.data[e]=sG(n,a,t,e,i,r);return oG(n,l,o,s),l}function oG(n,e,t,i){n.firstChild===null&&(n.firstChild=e),t!==null&&(i?t.child==null&&e.parent!==null&&(t.child=e):t.next===null&&(t.next=e,e.prev=t))}function sG(n,e,t,i,r,o){let s=e?e.injectorIndex:-1,a=0;return Ug()&&(a|=128),{type:t,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,controlDirectiveIndex:-1,customControlIndex:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var aG=new RegExp(`^(\\d+)*(${_2}|${x2})*(.*)`);function lG(n){let e=n.match(aG),[t,i,r,o]=e,s=i?parseInt(i,10):r,a=[];for(let[l,c,d]of o.matchAll(/(f|n)(\d*)/g)){let u=parseInt(d,10)||1;a.push(c,u)}return[s,...a]}function cG(n){return!n.prev&&n.parent?.type===8}function s1(n){return n.index-$t}function dG(n,e){let t=n.i18nNodes;if(t)return t.get(e)}function L0(n,e,t,i){let r=s1(i),o=dG(n,r);if(o===void 0){let s=n.data[E2];if(s?.[r])o=fG(s[r],t);else if(e.firstChild===i)o=n.firstChild;else{let a=i.prev===null,l=i.prev??i.parent;if(cG(i)){let c=s1(i.parent);o=S1(n,c)}else{let c=eo(l,t);if(a)o=c.firstChild;else{let d=s1(l),u=S1(n,d);if(l.type===2&&u){let h=fC(n,d)+1;o=U0(h,u)}else o=c.nextSibling}}}}return o}function U0(n,e){let t=e;for(let i=0;i<n;i++)t=t.nextSibling;return t}function uG(n,e){let t=n;for(let i=0;i<e.length;i+=2){let r=e[i],o=e[i+1];for(let s=0;s<o;s++)switch(r){case fz:t=t.firstChild;break;case hz:t=t.nextSibling;break}}return t}function fG(n,e){let[t,...i]=lG(n),r;if(t===x2)r=e[ai][zi];else if(t===_2)r=cA(e[ai][zi]);else{let o=Number(t);r=Cr(e[o+$t])}return uG(r,i)}var hG=!1;function VA(n){hG=n}function pG(n){let e=n[Gi];if(e){let{i18nNodes:t,dehydratedIcuData:i}=e;if(t&&i){let r=n[qt];for(let o of i.values())mG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function mG(n,e,t){for(let i of t.node.cases[t.case]){let r=e.get(i.index-$t);r&&xC(n,r,!1)}}function B0(n){let e=n[wo]??[],i=n[Vn][qt],r=[];for(let o of e)o.data[M2]!==void 0?r.push(o):GA(o,i);n[wo]=r}function gG(n){let{lContainer:e}=n,t=e[wo];if(t===null)return;let r=e[Vn][qt];for(let o of t)GA(o,r)}function GA(n,e){let t=0,i=n.firstChild;if(i){let r=n.data[Oh];for(;t<r;){let o=i.nextSibling;xC(e,i,!1),i=o,t++}}}function z0(n){B0(n);let e=n[zi];Sr(e)&&h0(e);for(let t=Tn;t<n.length;t++)h0(n[t])}function h0(n){pG(n);let e=n[qe];for(let t=$t;t<e.bindingStartIndex;t++)if(or(n[t])){let i=n[t];z0(i)}else Sr(n[t])&&h0(n[t])}function BC(n){let e=n._views;for(let t of e){let i=W2(t);i!==null&&i[zi]!==null&&(Sr(i)?h0(i):z0(i))}}function vG(n,e,t,i){n!==null&&(t.cleanup(e),z0(n.lContainer),BC(i))}function bG(n,e){let t=[];for(let i of e)for(let r=0;r<(i[oC]??1);r++){let o={data:i,firstChild:null};i[Oh]>0&&(o.firstChild=n,n=U0(i[Oh],n)),t.push(o)}return[n,t]}var HA=()=>null,jA=()=>null;function WA(){HA=yG,jA=xG}function yG(n,e){return XA(n,e)?n[wo].shift():(B0(n),null)}function Fh(n,e){return HA(n,e)}function xG(n,e,t){if(e.tView.ssrId===null)return null;let i=Fh(n,e.tView.ssrId);return t[qe].firstUpdatePass&&i===null&&_G(t,e),i}function $A(n,e,t){return jA(n,e,t)}function _G(n,e){let t=e;for(;t;){if(IP(n,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(IP(n,t))return;t=t.next}}function XA(n,e){let t=n[wo];return!e||t===null||t.length===0?!1:t[0].data[w2]===e}function IP(n,e){let t=e.tView?.ssrId;if(t==null)return!1;let i=n[e.index];return or(i)&&XA(i,t)?(B0(i),!0):!1}var YA=class{},V0=class{},N1=class{resolveComponentFactory(e){throw new Xe(917,!1)}},G0=class{static NULL=new N1},Ec=class{},ys=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>SG()}return n})();function SG(){let n=ht(),e=bi(),t=wr(e.index,n);return(Sr(t)?t:n)[qt]}var qA=(()=>{class n{static \u0275prov=_e({token:n,providedIn:"root",factory:()=>null})}return n})();var t0={},su=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){let r=this.injector.get(e,t0,i);return r!==t0||t===t0?r:this.parentInjector.get(e,t,i)}};function p0(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,o=0;if(e!==null)for(let s=0;s<e.length;s++){let a=e[s];if(typeof a=="number")o=a;else if(o==1)r=wg(r,a);else if(o==2){let l=a,c=e[++s];i=wg(i,l+": "+c+";")}}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}function Gt(n,e=0){let t=ht();if(t===null)return Ye(n,e);let i=bi();return c2(i,t,vi(n),e)}function KA(n,e,t,i,r){let o=i===null?null:{"":-1},s=r(n,t);if(s!==null){let a=s,l=null,c=null;for(let d of s)if(d.resolveHostDirectives!==null){[a,l,c]=d.resolveHostDirectives(s);break}EG(n,e,t,a,o,l,c)}o!==null&&i!==null&&CG(t,i,o)}function CG(n,e,t){let i=n.localNames=[];for(let r=0;r<e.length;r+=2){let o=t[e[r+1]];if(o==null)throw new Xe(-301,!1);i.push(e[r],o)}}function wG(n,e,t){e.componentOffset=t,(n.components??=[]).push(e.index)}function EG(n,e,t,i,r,o,s){let a=i.length,l=null;for(let f=0;f<a;f++){let h=i[f];l===null&&ms(h)&&(l=h,wG(n,t,f)),v1(l0(t,e),n,h.type)}AG(t,n.data.length,a),l?.viewProvidersResolver&&l.viewProvidersResolver(l);for(let f=0;f<a;f++){let h=i[f];h.providersResolver&&h.providersResolver(h)}let c=!1,d=!1,u=hA(n,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=i[f];if(t.mergedAttrs=lu(t.mergedAttrs,h.hostAttrs),TG(n,t,e,u,h),PG(u,h,r),s!==null&&s.has(h)){let[v,g]=s.get(h);t.directiveToIndex.set(h.type,[u,v+t.directiveStart,g+t.directiveStart])}else(o===null||!o.has(h))&&t.directiveToIndex.set(h.type,u);h.contentQueries!==null&&(t.flags|=4),(h.hostBindings!==null||h.hostAttrs!==null||h.hostVars!==0)&&(t.flags|=64);let p=h.type.prototype;!c&&(p.ngOnChanges||p.ngOnInit||p.ngDoCheck)&&((n.preOrderHooks??=[]).push(t.index),c=!0),!d&&(p.ngOnChanges||p.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(t.index),d=!0),u++}MG(n,t,o)}function MG(n,e,t){for(let i=e.directiveStart;i<e.directiveEnd;i++){let r=n.data[i];if(t===null||!t.has(r))PP(0,e,r,i),PP(1,e,r,i),OP(e,i,!1);else{let o=t.get(r);AP(0,e,o,i),AP(1,e,o,i),OP(e,i,!0)}}}function PP(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;n===0?s=e.inputs??={}:s=e.outputs??={},s[o]??=[],s[o].push(i),ZA(e,o)}}function AP(n,e,t,i){let r=n===0?t.inputs:t.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;n===0?a=e.hostDirectiveInputs??={}:a=e.hostDirectiveOutputs??={},a[s]??=[],a[s].push(i,o),ZA(e,s)}}function ZA(n,e){e==="class"?n.flags|=8:e==="style"&&(n.flags|=16)}function OP(n,e,t){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!t&&r===null||t&&o===null||CC(n)){n.initialInputs??=[],n.initialInputs.push(null);return}let s=null,a=0;for(;a<i.length;){let l=i[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!t&&r.hasOwnProperty(l)){let c=r[l];for(let d of c)if(d===e){s??=[],s.push(l,i[a+1]);break}}else if(t&&o.hasOwnProperty(l)){let c=o[l];for(let d=0;d<c.length;d+=2)if(c[d]===e){s??=[],s.push(c[d+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function TG(n,e,t,i,r){n.data[i]=r;let o=r.factory||(r.factory=La(r.type,!0)),s=new Cc(o,ms(r),Gt,null);n.blueprint[i]=s,t[i]=s,DG(n,e,i,hA(n,t,r.hostVars,Tr),r)}function DG(n,e,t,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~e.index;IG(s)!=a&&s.push(a),s.push(t,i,o)}}function IG(n){let e=n.length;for(;e>0;){let t=n[--e];if(typeof t=="number"&&t<0)return t}return 0}function PG(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;ms(e)&&(t[""]=n)}}function AG(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function zC(n,e,t,i,r,o,s,a){let l=e[qe],c=l.consts,d=to(c,s),u=bu(l,n,t,i,d);return o&&KA(l,e,u,to(c,a),r),u.mergedAttrs=lu(u.mergedAttrs,u.attrs),u.attrs!==null&&p0(u,u.attrs,!1),u.mergedAttrs!==null&&p0(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function VC(n,e){t2(n,e),AS(e)&&n.queries.elementEnd(e)}function OG(n,e,t,i,r,o){let s=e.consts,a=to(s,r),l=bu(e,n,t,i,a);if(l.mergedAttrs=lu(l.mergedAttrs,l.attrs),o!=null){let c=to(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&p0(l,l.attrs,!1),l.mergedAttrs!==null&&p0(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function H0(n,e,t){return n[e]=t}function RG(n,e){return n[e]}function Mr(n,e,t){if(t===Tr)return!1;let i=n[e];return Object.is(i,t)?!1:(n[e]=t,!0)}function JA(n,e,t,i){let r=Mr(n,e,t);return Mr(n,e+1,i)||r}function kG(n,e,t,i,r){let o=JA(n,e,t,i);return Mr(n,e+2,r)||o}function n0(n,e,t){return function i(r){let o=ps(n)?wr(n.index,e):e;F0(o,5);let s=e[Fn],a=RP(e,s,t,r),l=i.__ngNextListenerFn__;for(;l;)a=RP(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function RP(n,e,t,i){let r=at(null);try{return tn(jt.OutputStart,e,t),t(i)!==!1}catch(o){return FC(n,o),!1}finally{tn(jt.OutputEnd,e,t),at(r)}}function QA(n,e,t,i,r,o,s,a){let l=Qd(n),c=!1,d=null;if(!i&&l&&(d=NG(e,t,o,n.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=eo(n,t),f=i?i(u):u;pz(t,f,o,a);let h=r.listen(f,o,a);if(!FG(o)){let p=i?v=>i(Cr(v[n.index])):n.index;eO(p,e,t,o,a,h,!1)}}return c}function FG(n){return n.startsWith("animation")||n.startsWith("transition")}function NG(n,e,t,i){let r=n.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===t&&r[o+1]===i){let a=e[Zd],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function eO(n,e,t,i,r,o,s){let a=e.firstCreatePass?BS(e):null,l=US(t),c=l.length;l.push(r,o),a&&a.push(i,n,c,(c+1)*(s?-1:1))}function kP(n,e,t,i,r,o){let s=e[t],a=e[qe],c=a.data[t].outputs[i],u=s[c].subscribe(o);eO(n.index,a,e,r,o,u,!0)}var L1=Symbol("BINDING");var U1=class extends G0{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=qs(e);return new uu(t,this.ngModule)}};function LG(n){return Object.keys(n).map(e=>{let[t,i,r]=n[e],o={propName:t,templateName:e,isSignal:(i&D0.SignalBased)!==0};return r&&(o.transform=r),o})}function UG(n){return Object.keys(n).map(e=>({propName:n[e],templateName:e}))}function BG(n,e,t){let i=e instanceof Ei?e:e?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new su(t,i):t}function zG(n){let e=n.get(Ec,null);if(e===null)throw new Xe(407,!1);let t=n.get(qA,null),i=n.get(as,null);return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:i,ngReflect:!1}}function VG(n,e){let t=tO(n);return yC(e,t,t==="svg"?OS:t==="math"?kI:null)}function tO(n){return(n.selectors[0][0]||"div").toLowerCase()}var uu=class extends V0{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=LG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=UG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=rV(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,i,r,o,s){tn(jt.DynamicComponentStart);let a=at(null);try{let l=this.componentDef,c=GG(i,l,s,o),d=BG(l,r||this.ngModule,e),u=zG(d),f=u.rendererFactory.createRenderer(null,l),h=i?PV(f,i,l.encapsulation,d):VG(l,f),p=s?.some(FP)||o?.some(m=>typeof m!="function"&&m.bindings.some(FP)),v=EC(null,c,null,512|fA(l),null,null,u,f,d,null,j2(h,d,!0));v[$t]=h,Vg(v);let g=null;try{let m=zC($t,v,2,"#host",()=>c.directiveRegistry,!0,0);aA(f,h,m),cu(h,v),k0(c,v,m),hC(c,m,v),VC(c,m),t!==void 0&&jG(m,this.ngContentSelectors,t),g=wr(m.index,v),v[Fn]=g[Fn],LC(c,v,null)}catch(m){throw g!==null&&y1(g),y1(v),m}finally{tn(jt.DynamicComponentEnd),Gg()}return new m0(this.componentType,v,!!p)}finally{at(a)}}};function GG(n,e,t,i){let r=n?["ng-version","21.2.0"]:oV(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[L1].requiredVars,d.create&&(d.targetIdx=0,(o??=[]).push(d)),d.update&&(d.targetIdx=0,(s??=[]).push(d));if(i)for(let d=0;d<i.length;d++){let u=i[d];if(typeof u!="function")for(let f of u.bindings){a+=f[L1].requiredVars;let h=d+1;f.create&&(f.targetIdx=h,(o??=[]).push(f)),f.update&&(f.targetIdx=h,(s??=[]).push(f))}}let l=[e];if(i)for(let d of i){let u=typeof d=="function"?d:d.type,f=Tg(u);l.push(f)}return wC(0,null,HG(o,s),1,a,l,null,null,null,[r],null)}function HG(n,e){return!n&&!e?null:t=>{if(t&1&&n)for(let i of n)i.create();if(t&2&&e)for(let i of e)i.update()}}function FP(n){let e=n[L1].kind;return e==="input"||e==="twoWay"}var m0=class extends YA{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,i){super(),this._rootLView=t,this._hasInputBindings=i,this._tNode=yc(t[qe],$t),this.location=pu(this._tNode,t),this.instance=wr(this._tNode.index,t)[Fn],this.hostView=this.changeDetectorRef=new Ya(t,void 0),this.componentType=e}setInput(e,t){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(e)&&Object.is(this.previousInputValues.get(e),t))return;let r=this._rootLView,o=NC(i,r[qe],r,e,t);this.previousInputValues.set(e,t);let s=wr(i.index,r);F0(s,1)}get injector(){return new Sc(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function jG(n,e,t){let i=n.projection=[];for(let r=0;r<e.length;r++){let o=t[r];i.push(o!=null&&o.length?Array.from(o):null)}}var yu=(()=>{class n{static __NG_ELEMENT_ID__=WG}return n})();function WG(){let n=bi();return iO(n,ht())}var $G=yu,nO=class extends $G{_lContainer;_hostTNode;_hostLView;constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return pu(this._hostTNode,this._hostLView)}get injector(){return new Sc(this._hostTNode,this._hostLView)}get parentInjector(){let e=tC(this._hostTNode,this._hostLView);if(i2(e)){let t=s0(e,this._hostLView),i=o0(e),r=t[qe].data[i+8];return new Sc(r,t)}else return new Sc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=NP(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Tn}createEmbeddedView(e,t,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=Fh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,wc(this._hostTNode,s)),a}createComponent(e,t,i,r,o,s,a){let l=e&&!U5(e),c;if(l)c=t;else{let g=t||{};c=g.index,i=g.injector,r=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef,s=g.directives,a=g.bindings}let d=l?e:new uu(qs(e)),u=i||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(Ei,null);m&&(o=m)}let f=qs(d.componentType??{}),h=Fh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,wc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,i){let r=e._lView;if(FI(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Vn],c=new nO(l,l[Vi],l[Vn]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return vu(s,r,o,i),e.attachToViewContainerRef(),ES(a1(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=NP(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),i=kh(this._lContainer,t);i&&(xh(a1(this._lContainer),t),O0(i[qe],i))}detach(e){let t=this._adjustIndex(e,-1),i=kh(this._lContainer,t);return i&&xh(a1(this._lContainer),t)!=null?new Ya(i):null}_adjustIndex(e,t=0){return e??this.length+t}};function NP(n){return n[Ch]}function a1(n){return n[Ch]||(n[Ch]=[])}function iO(n,e){let t,i=e[n.index];return or(i)?t=i:(t=UA(i,e,null,n),e[n.index]=t,MC(e,t)),rO(t,e,n,i),new nO(t,n,e)}function XG(n,e){let t=n[qt],i=t.createComment(""),r=eo(e,n),o=t.parentNode(r);return u0(t,o,i,t.nextSibling(r),!1),i}var rO=oO,GC=()=>!1;function YG(n,e,t){return GC(n,e,t)}function oO(n,e,t,i){if(n[hs])return;let r;t.type&8?r=Cr(i):r=XG(e,t),n[hs]=r}function qG(n,e,t){if(n[hs]&&n[wo])return!0;let i=t[Gi],r=e.index-$t;if(!i||m2(e)||Y2(i,r))return!1;let s=S1(i,r),a=i.data[_0]?.[r],[l,c]=bG(s,a);return n[hs]=l,n[wo]=c,!0}function KG(n,e,t,i){GC(n,t,e)||oO(n,e,t,i)}function sO(){rO=KG,GC=qG}var B1=class n{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},z1=class n{queries;constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let i=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o<i;o++){let s=t.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new n(r)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}finishViewCreation(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)cO(e,t).matches!==null&&this.queries[t].setDirty()}},V1=class{flags;read;predicate;constructor(e,t,i=null){this.flags=t,this.read=i,typeof e=="string"?this.predicate=i8(e):this.predicate=e}},G1=class n{queries;constructor(e=[]){this.queries=e}elementStart(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let i=0;i<this.length;i++){let r=t!==null?t.length:0,o=this.getByIndex(i).embeddedTView(e,r);o&&(o.indexInDeclarationView=i,t!==null?t.push(o):t=[o])}return t!==null?new n(t):null}template(e,t){for(let i=0;i<this.queries.length;i++)this.queries[i].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}},H1=class n{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(e,t=-1){this.metadata=e,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new n(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let t=this._declarationNodeIndex,i=e.parent;for(;i!==null&&i.type&8&&i.index!==t;)i=i.parent;return t===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(e,t){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(e,t,ZG(t,o)),this.matchTNodeWithReadOption(e,t,Qg(t,e,o,!1,!1))}else i===du?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Qg(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===ar||r===yu||r===du&&t.type&4)this.addMatch(t.index,-2);else{let o=Qg(t,e,r,!1,!1);o!==null&&this.addMatch(t.index,o)}else this.addMatch(t.index,i)}}addMatch(e,t){this.matches===null?this.matches=[e,t]:this.matches.push(e,t)}};function ZG(n,e){let t=n.localNames;if(t!==null){for(let i=0;i<t.length;i+=2)if(t[i]===e)return t[i+1]}return null}function JG(n,e){return n.type&11?pu(n,e):n.type&4?N0(n,e):null}function QG(n,e,t,i){return t===-1?JG(e,n):t===-2?e8(n,e,i):Ah(n,n[qe],t,e)}function e8(n,e,t){if(t===ar)return pu(e,n);if(t===du)return N0(e,n);if(t===yu)return iO(e,n)}function aO(n,e,t,i){let r=e[ds].queries[i];if(r.matches===null){let o=n.data,s=t.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let c=s[l];if(c<0)a.push(null);else{let d=o[c];a.push(QG(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function j1(n,e,t,i){let r=n.queries.getByIndex(t),o=r.matches;if(o!==null){let s=aO(n,e,r,t);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],d=e[-l];for(let u=Tn;u<d.length;u++){let f=d[u];f[Va]===f[Vn]&&j1(f[qe],f,c,i)}if(d[vc]!==null){let u=d[vc];for(let f=0;f<u.length;f++){let h=u[f];j1(h[qe],h,c,i)}}}}}return i}function lO(n,e){return n[ds].queries[e].queryList}function t8(n,e,t){let i=new c0((t&4)===4);return UI(n,e,i,i.destroy),(e[ds]??=new z1).queries.push(new B1(i))-1}function n8(n,e,t){let i=Pn();return i.firstCreatePass&&(r8(i,new V1(n,e,t),-1),(e&2)===2&&(i.staticViewQueries=!0)),t8(i,ht(),e)}function i8(n){return n.split(",").map(e=>e.trim())}function r8(n,e,t){n.queries===null&&(n.queries=new G1),n.queries.track(new H1(e,t))}function cO(n,e){return n.queries.getByIndex(e)}function o8(n,e){let t=n[qe],i=cO(t,e);return i.crossesNgTemplate?j1(t,n,e,[]):aO(t,n,i,e)}function dO(n,e,t){let i,r=lh(()=>{i._dirtyCounter();let o=a8(i,n);if(e&&o===void 0)throw new Xe(-951,!1);return o});return i=r[Qn],i._dirtyCounter=F(0),i._flatValue=void 0,r}function uO(n){return dO(!0,!1,n)}function fO(n){return dO(!0,!0,n)}function s8(n,e){let t=n[Qn];t._lView=ht(),t._queryIndex=e,t._queryList=lO(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(i=>i+1))}function a8(n,e){let t=n._lView,i=n._queryIndex;if(t===void 0||i===void 0||t[Ct]&4)return e?void 0:wi;let r=lO(t,i),o=o8(t,i);return r.reset(o,rz),e?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var Nh=class{};var Lh=class extends Nh{injector;componentFactoryResolver=new U1(this);instance=null;constructor(e){super();let t=new fc([...e.providers,{provide:Nh,useValue:this},{provide:G0,useValue:this.componentFactoryResolver}],e.parent||qd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function HC(n,e,t=null){return new Lh({providers:n,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var l8=(()=>{class n{_injector;cachedInjectors=new Map;constructor(t){this._injector=t}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){let i=Og(!1,t.type),r=i.length>0?HC([i],this._injector,""):null;this.cachedInjectors.set(t,r)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=_e({token:n,providedIn:"environment",factory:()=>new n(Ye(Ei))})}return n})();function st(n){return zh(()=>{let e=hO(n),t=ue(R({},e),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===nC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(l8).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||To.Emulated,styles:n.styles||wi,_:null,schemas:n.schemas||null,tView:null,id:""});e.standalone&&Po("NgStandalone"),pO(t);let i=n.dependencies;return t.directiveDefs=LP(i,c8),t.pipeDefs=LP(i,_S),t.id=f8(t),t})}function c8(n){return qs(n)||Tg(n)}function sa(n){return zh(()=>({type:n.type,bootstrap:n.bootstrap||wi,declarations:n.declarations||wi,imports:n.imports||wi,exports:n.exports||wi,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function d8(n,e){if(n==null)return za;let t={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=D0.None,l=null),t[o]=[i,a,l],e[o]=s}return t}function u8(n){if(n==null)return za;let e={};for(let t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function Gn(n){return zh(()=>{let e=hO(n);return pO(e),e})}function j0(n){return{type:n.type,name:n.name,factory:null,pure:n.pure!==!1,standalone:n.standalone??!0,onDestroy:n.type.prototype.ngOnDestroy||null}}function hO(n){let e={};return{type:n.type,providersResolver:null,viewProvidersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,inputConfig:n.inputs||za,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||wi,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:d8(n.inputs,e),outputs:u8(n.outputs),debugInfo:null}}function pO(n){n.features?.forEach(e=>e(n))}function LP(n,e){return n?()=>{let t=typeof n=="function"?n():n,i=[];for(let r of t){let o=e(r);o!==null&&i.push(o)}return i}:null}function f8(n){let e=0,t=typeof n.consts=="function"?"":n.consts,i=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,t,n.vars,n.decls,n.encapsulation,n.standalone,n.signals,n.exportAs,JSON.stringify(n.inputs),JSON.stringify(n.outputs),Object.getOwnPropertyNames(n.type.prototype),!!n.contentQueries,!!n.viewQuery];for(let o of i.join("|"))e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function h8(n){return Object.getPrototypeOf(n.prototype).constructor}function Dr(n){let e=h8(n.type),t=!0,i=[n];for(;e;){let r;if(ms(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Xe(903,!1);r=e.\u0275dir}if(r){if(t){i.push(r);let s=n;s.inputs=l1(n.inputs),s.declaredInputs=l1(n.declaredInputs),s.outputs=l1(n.outputs);let a=r.hostBindings;a&&b8(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&g8(n,l),c&&v8(n,c),p8(n,r),yI(n.outputs,r.outputs),ms(r)&&r.data.animation){let d=n.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===Dr&&(t=!1)}}e=Object.getPrototypeOf(e)}m8(i)}function p8(n,e){for(let t in e.inputs){if(!e.inputs.hasOwnProperty(t)||n.inputs.hasOwnProperty(t))continue;let i=e.inputs[t];i!==void 0&&(n.inputs[t]=i,n.declaredInputs[t]=e.declaredInputs[t])}}function m8(n){let e=0,t=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=lu(r.hostAttrs,t=lu(t,r.hostAttrs))}}function l1(n){return n===za?{}:n===wi?[]:n}function g8(n,e){let t=n.viewQuery;t?n.viewQuery=(i,r)=>{e(i,r),t(i,r)}:n.viewQuery=e}function v8(n,e){let t=n.contentQueries;t?n.contentQueries=(i,r,o)=>{e(i,r,o),t(i,r,o)}:n.contentQueries=e}function b8(n,e){let t=n.hostBindings;t?n.hostBindings=(i,r)=>{e(i,r),t(i,r)}:n.hostBindings=e}function mO(n,e,t,i,r,o,s,a){if(t.firstCreatePass){n.mergedAttrs=lu(n.mergedAttrs,n.attrs);let d=n.tView=wC(2,n,r,o,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,t.consts,null);t.queries!==null&&(t.queries.template(t,n),d.queries=t.queries.embeddedTView(n))}a&&(n.flags|=a),eu(n,!1);let l=gO(t,e,n,i);Hg()&&PC(t,e,l,n),cu(l,e);let c=UA(l,e,l,n);e[i+$t]=c,MC(e,c),YG(c,n,e)}function y8(n,e,t,i,r,o,s,a,l,c,d){let u=t+$t,f;return e.firstCreatePass?(f=bu(e,u,4,s||null,a||null),Lg()&&KA(e,n,f,to(e.consts,c),OC),t2(e,f)):f=e.data[u],mO(f,n,e,t,i,r,o,l),Qd(f)&&k0(e,n,f),c!=null&&Xh(n,f,d),f}function Uh(n,e,t,i,r,o,s,a,l,c,d){let u=t+$t,f;if(e.firstCreatePass){if(f=bu(e,u,4,s||null,a||null),c!=null){let h=to(e.consts,c);f.localNames=[];for(let p=0;p<h.length;p+=2)f.localNames.push(h[p],-1)}}else f=e.data[u];return mO(f,n,e,t,i,r,o,l),c!=null&&Xh(n,f,d),f}function qa(n,e,t,i,r,o,s,a){let l=ht(),c=Pn(),d=to(c.consts,o);return y8(l,c,n,e,t,i,r,d,void 0,s,a),qa}var gO=vO;function vO(n,e,t,i){return Qs(!0),e[qt].createComment("")}function x8(n,e,t,i){let r=!w0(e,t);Qs(r);let o=e[Gi]?.data[C2]?.[i]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return vO(n,e);let s=e[Gi],a=L0(s,n,e,t);C0(s,i,a);let l=fC(s,i);return U0(l,a)}function bO(){gO=x8}var Er=(function(n){return n[n.NOT_STARTED=0]="NOT_STARTED",n[n.IN_PROGRESS=1]="IN_PROGRESS",n[n.COMPLETE=2]="COMPLETE",n[n.FAILED=3]="FAILED",n})(Er||{}),UP=0,_8=1,Zn=(function(n){return n[n.Placeholder=0]="Placeholder",n[n.Loading=1]="Loading",n[n.Complete=2]="Complete",n[n.Error=3]="Error",n})(Zn||{});var S8=0,Yh=1;var C8=4,w8=5;var E8=7,au=8,M8=9,jC=(function(n){return n[n.Manual=0]="Manual",n[n.Playthrough=1]="Playthrough",n})(jC||{});function i0(n,e){let t=D8(n),i=e[t];if(i!==null){for(let r of i)r();e[t]=null}}function T8(n){i0(1,n),i0(0,n),i0(2,n)}function D8(n){let e=C8;return n===1?e=w8:n===2&&(e=M8),e}function yO(n){return n+1}function xu(n,e){let t=n[qe],i=yO(e.index);return n[i]}function qh(n,e){let t=yO(e.index);return n.data[t]}function I8(n,e,t){let i=e[qe],r=qh(i,t);switch(n){case Zn.Complete:return r.primaryTmplIndex;case Zn.Loading:return r.loadingTmplIndex;case Zn.Error:return r.errorTmplIndex;case Zn.Placeholder:return r.placeholderTmplIndex;default:return null}}function BP(n,e){return e===Zn.Placeholder?n.placeholderBlockConfig?.[UP]??null:e===Zn.Loading?n.loadingBlockConfig?.[UP]??null:null}function P8(n){return n.loadingBlockConfig?.[_8]??null}function zP(n,e){if(!n||n.length===0)return e;let t=new Set(n);for(let i of e)t.add(i);return n.length===t.size?n:Array.from(t)}function A8(n,e){let t=e.primaryTmplIndex+$t;return yc(n,t)}var O8=(()=>{class n{cachedInjectors=new Map;getOrCreateInjector(t,i,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?HC(r,i,o):null;this.cachedInjectors.set(t,s)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(let t of this.cachedInjectors.values())t!==null&&t.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=_e({token:n,providedIn:"environment",factory:()=>new n})}return n})();var xO=new $e("");function c1(n,e,t){return n.get(O8).getOrCreateInjector(e,n,t,"")}function R8(n,e,t){if(n instanceof su){let r=n.injector,o=n.parentInjector,s=c1(o,e,t);return new su(r,s)}let i=n.get(Ei);if(i!==n){let r=c1(i,e,t);return new su(n,r)}return c1(n,e,t)}function _c(n,e,t,i=!1){let r=t[Vn],o=r[qe];if(Ga(r))return;let s=xu(r,e),a=s[Yh],l=s[E8];if(!(l!==null&&n<l)&&VP(a,n)&&VP(s[S8]??-1,n)){let c=qh(o,e),u=!i&&!0&&(P8(c)!==null||BP(c,Zn.Loading)!==null||BP(c,Zn.Placeholder))?N8:F8;try{u(n,s,t,e,r)}catch(f){FC(r,f)}}}function k8(n,e){let t=n[wo]?.findIndex(r=>r.data[T2]===e[Yh])??-1;return{dehydratedView:t>-1?n[wo][t]:null,dehydratedViewIx:t}}function F8(n,e,t,i,r){tn(jt.DeferBlockStateStart);let o=I8(n,r,i);if(o!==null){e[Yh]=n;let s=r[qe],a=o+$t,l=yc(s,a),c=0;UC(t,c);let d;if(n===Zn.Complete){let p=qh(s,i),v=p.providers;v&&v.length>0&&(d=R8(r[xr],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=k8(t,e),h=gu(r,l,null,{injector:d,dehydratedView:u});if(vu(t,h,c,wc(l,u)),F0(h,2),f>-1&&t[wo]?.splice(f,1),(n===Zn.Complete||n===Zn.Error)&&Array.isArray(e[au])){for(let p of e[au])p();e[au]=null}}tn(jt.DeferBlockStateEnd)}function VP(n,e){return n<e}function GP(n,e,t){n.loadingPromise.then(()=>{n.loadingState===Er.COMPLETE?_c(Zn.Complete,e,t):n.loadingState===Er.FAILED&&_c(Zn.Error,e,t)})}var N8=null;function WC(n){return typeof n=="function"&&n[Qn]!==void 0}function $C(n){return WC(n)&&typeof n.set=="function"}var XC=new $e("");function _u(n){return!!n&&typeof n.then=="function"}function YC(n){return!!n&&typeof n.subscribe=="function"}var _O=new $e("");var qC=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,i)=>{this.resolve=t,this.reject=i});appInits=Z(_O,{optional:!0})??[];injector=Z(Mi);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=Kd(this.injector,r);if(_u(o))t.push(o);else if(YC(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});t.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{i()}).catch(r=>{this.reject(r)}),t.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Su=new $e("");function SO(){z_(()=>{let n="";throw new Xe(600,n)})}function CO(n){return n.isBoundToModule}var L8=10;var Ir=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Z(ea);afterRenderManager=Z(DC);zonelessEnabled=Z(Th);rootEffectScheduler=Z(Wg);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new Co;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Z($a);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(ir(t=>!t))}constructor(){Z(oa,{optional:!0})}whenStable(){let t;return new Promise(i=>{t=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{t.unsubscribe()})}_injector=Z(Ei);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,i){return this.bootstrapImpl(t,i)}bootstrapImpl(t,i,r=Mi.NULL){return this._injector.get(rr).run(()=>{tn(jt.BootstrapComponentStart);let s=t instanceof V0;if(!this._injector.get(qC).done){let p="";throw new Xe(405,p)}let l;s?l=t:l=this._injector.get(G0).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=CO(l)?void 0:this._injector.get(Nh),d=i||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(XC,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),Ph(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),tn(jt.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){tn(jt.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(I0.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw tn(jt.ChangeDetectionEnd),new Xe(101,!1);let t=at(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,at(t),this.afterTick.next(),tn(jt.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(Ec,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<L8;){tn(jt.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{tn(jt.ChangeDetectionSyncEnd)}}}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let t=!1;if(this.dirtyFlags&7){let i=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!i&&!wh(r))continue;let o=i&&!this.zonelessEnabled?0:1;kA(r,o),t=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}t||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:t})=>wh(t))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(t){let i=t;this._views.push(i),i.attachToAppRef(this)}detachView(t){let i=t;Ph(this._views,i),i.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(t),this._injector.get(Su,[]).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._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>Ph(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new Xe(406,!1);let t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Ph(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function wO(){let n,e;return{promise:new Promise((i,r)=>{n=i,e=r}),resolve:n,reject:e}}function EO(n,e,t){let i=e[xr],r=e[qe];if(n.loadingState!==Er.NOT_STARTED)return n.loadingPromise??Promise.resolve();let o=xu(e,t),s=A8(r,n);n.loadingState=Er.IN_PROGRESS,i0(1,o);let a=n.dependencyResolverFn,l=i.get(iu).add();return a?(n.loadingPromise=Promise.allSettled(a()).then(c=>{let d=!1,u=[],f=[];for(let h of c)if(h.status==="fulfilled"){let p=h.value,v=qs(p)||Tg(p);if(v)u.push(v);else{let g=_S(p);g&&f.push(g)}}else{d=!0;break}if(d){if(n.loadingState=Er.FAILED,n.errorTmplIndex===null){let p=new Xe(-750,!1);FC(e,p)}}else{n.loadingState=Er.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=zP(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Og(!1,...p);n.providers=v}f.length>0&&(h.pipeRegistry=zP(h.pipeRegistry,f))}}),n.loadingPromise.finally(()=>{n.loadingPromise=null,l()})):(n.loadingPromise=Promise.resolve().then(()=>{n.loadingPromise=null,n.loadingState=Er.COMPLETE,l()}),n.loadingPromise)}function U8(n,e){return e[xr].get(xO,null,{optional:!0})?.behavior!==jC.Manual}function B8(n,e,t){let i=e[qe],r=e[t.index];if(!U8(n,e))return;let o=xu(e,t),s=qh(i,t);switch(T8(o),s.loadingState){case Er.NOT_STARTED:_c(Zn.Loading,t,r),EO(s,e,t),s.loadingState===Er.IN_PROGRESS&&GP(s,t,r);break;case Er.IN_PROGRESS:_c(Zn.Loading,t,r),GP(s,t,r);break;case Er.COMPLETE:_c(Zn.Complete,t,r);break;case Er.FAILED:_c(Zn.Error,t,r);break;default:}}async function MO(n,e,t){let i=n.get(S0);if(i.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=Sz(e,n);if(s.length===0)return;o!==null&&s.shift(),G8(i,s),o!==null&&await o;let a=s[0];i.has(a)?await HP(n,s,t):i.awaitParentBlock(a,async()=>await HP(n,s,t))}async function HP(n,e,t){let i=n.get(S0),r=i.hydrating,o=n.get($a),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=i.get(c);if(d!=null){if(await j8(d),await H8(n),z8(d)){gG(d),jP(e.slice(l),i);break}r.get(c).resolve()}else{V8(l,e,i),jP(e.slice(l),i);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),vG(i.get(a),e,i,n.get(Ir))}function z8(n){return xu(n.lView,n.tNode)[Yh]===Zn.Error}function V8(n,e,t){let i=n-1,r=i>-1?t.get(e[i]):null;r&&z0(r.lContainer)}function jP(n,e){let t=e.hydrating;for(let i in n)t.get(i)?.reject();e.cleanup(n)}function G8(n,e){for(let t of e)n.hydrating.set(t,wO())}function H8(n){return new Promise(e=>P0(e,{injector:n}))}async function j8(n){let{tNode:e,lView:t}=n,i=xu(t,e);return new Promise(r=>{W8(i,r),B8(2,t,e)})}function W8(n,e){Array.isArray(n[au])||(n[au]=[]),n[au].push(e)}function An(n,e,t,i){let r=ht(),o=Ha();if(Mr(r,o,e)){let s=Pn(),a=Eh();UV(a,r,n,e,t,i)}return An}function Ka(){return ht()[ai][Fn]}var W1=class{destroy(e){}updateValue(e,t){}swap(e,t){let i=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-i>1){let s=this.detach(i);this.attach(i,o),this.attach(r,s)}else this.attach(i,o)}move(e,t){this.attach(t,this.detach(e))}};function d1(n,e,t,i,r){return n===t&&Object.is(e,i)?1:Object.is(r(n,e),r(t,i))?-1:0}function $8(n,e,t,i){let r,o,s=0,a=n.length-1,l=void 0;if(Array.isArray(e)){at(i);let c=e.length-1;for(at(null);s<=a&&s<=c;){let d=n.at(s),u=e[s],f=d1(s,d,s,u,t);if(f!==0){f<0&&n.updateValue(s,u),s++;continue}let h=n.at(a),p=e[c],v=d1(a,h,c,p,t);if(v!==0){v<0&&n.updateValue(a,p),a--,c--;continue}let g=t(s,d),m=t(a,h),b=t(s,u);if(Object.is(b,m)){let y=t(c,p);Object.is(y,g)?(n.swap(s,a),n.updateValue(a,p),c--,a--):n.move(a,s),n.updateValue(s,u),s++;continue}if(r??=new g0,o??=$P(n,s,a,t),$1(n,r,s,b))n.updateValue(s,u),s++,a++;else if(o.has(b))r.set(g,n.detach(s)),a--;else{let y=n.create(s,e[s]);n.attach(s,y),s++,a++}}for(;s<=c;)WP(n,r,t,s,e[s]),s++}else if(e!=null){at(i);let c=e[Symbol.iterator]();at(null);let d=c.next();for(;!d.done&&s<=a;){let u=n.at(s),f=d.value,h=d1(s,u,s,f,t);if(h!==0)h<0&&n.updateValue(s,f),s++,d=c.next();else{r??=new g0,o??=$P(n,s,a,t);let p=t(s,f);if($1(n,r,s,p))n.updateValue(s,f),s++,a++,d=c.next();else if(!o.has(p))n.attach(s,n.create(s,f)),s++,a++,d=c.next();else{let v=t(s,u);r.set(v,n.detach(s)),a--}}}for(;!d.done;)WP(n,r,t,n.length,d.value),d=c.next()}for(;s<=a;)n.destroy(n.detach(a--));r?.forEach(c=>{n.destroy(c)})}function $1(n,e,t,i){return e!==void 0&&e.has(i)?(n.attach(t,e.get(i)),e.delete(i),!0):!1}function WP(n,e,t,i,r){if($1(n,e,i,t(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function $P(n,e,t,i){let r=new Set;for(let o=e;o<=t;o++)r.add(i(o,n.at(o)));return r}var g0=class{kvMap=new Map;_vMap=void 0;has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let i=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,i]of this.kvMap)if(e(i,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),e(i,t)}}};function pe(n,e,t,i,r,o,s,a){Po("NgControlFlow");let l=ht(),c=Pn(),d=to(c.consts,o);return Uh(l,c,n,e,t,i,r,d,256,s,a),KC}function KC(n,e,t,i,r,o,s,a){Po("NgControlFlow");let l=ht(),c=Pn(),d=to(c.consts,o);return Uh(l,c,n,e,t,i,r,d,512,s,a),KC}function me(n,e){Po("NgControlFlow");let t=ht(),i=Ha(),r=t[i]!==Tr?t[i]:-1,o=r!==-1?v0(t,$t+r):void 0,s=0;if(Mr(t,i,n)){let a=at(null);try{if(o!==void 0&&UC(o,s),n!==-1){let l=$t+n,c=v0(t,l),d=K1(t[qe],l),u=$A(c,d,t),f=gu(t,d,e,{dehydratedView:u});vu(c,f,s,wc(d,u))}}finally{at(a)}}else if(o!==void 0){let a=BA(o,s);a!==void 0&&(a[Fn]=e)}}var X1=class{lContainer;$implicit;$index;constructor(e,t,i){this.lContainer=e,this.$implicit=t,this.$index=i}get $count(){return this.lContainer.length-Tn}};function Cu(n){return n}function ZC(n,e){return e}var Y1=class{hasEmptyBlock;trackByFn;liveCollection;constructor(e,t,i){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=i}};function Tt(n,e,t,i,r,o,s,a,l,c,d,u,f){Po("NgControlFlow");let h=ht(),p=Pn(),v=l!==void 0,g=ht(),m=a?s.bind(g[ai][Fn]):s,b=new Y1(v,m);g[$t+n]=b,Uh(h,p,n+1,e,t,i,r,to(p.consts,o),256),v&&Uh(h,p,n+2,l,c,d,u,to(p.consts,f),512)}var q1=class extends W1{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(e,t,i){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=i}get length(){return this.lContainer.length-Tn}at(e){return this.getLView(e)[Fn].$implicit}attach(e,t){let i=t[Gi];this.needsIndexUpdate||=e!==this.length,vu(this.lContainer,t,e,wc(this.templateTNode,i)),X8(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,Y8(this.lContainer,e),q8(this.lContainer,e)}create(e,t){let i=Fh(this.lContainer,this.templateTNode.tView.ssrId);return gu(this.hostLView,this.templateTNode,new X1(this.lContainer,t,e),{dehydratedView:i})}destroy(e){O0(e[qe],e)}updateValue(e,t){this.getLView(e)[Fn].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[Fn].$index=e}getLView(e){return K8(this.lContainer,e)}};function Dt(n){let e=at(null),t=Js();try{let i=ht(),r=i[qe],o=i[t],s=t+1,a=v0(i,s);if(o.liveCollection===void 0){let c=K1(r,s);o.liveCollection=new q1(a,i,c)}else o.liveCollection.reset();let l=o.liveCollection;if($8(l,n,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=Ha(),d=l.length===0;if(Mr(i,c,d)){let u=t+2,f=v0(i,u);if(d){let h=K1(r,u),p=$A(f,h,i),v=gu(i,h,void 0,{dehydratedView:p});vu(f,v,0,wc(h,p))}else r.firstUpdatePass&&B0(f),UC(f,0)}}}finally{at(e)}}function v0(n,e){return n[e]}function X8(n,e){if(n.length<=Tn)return;let t=Tn+e,i=n[t],r=i?i[fs]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[xr];pV(o,r),Xa.delete(i[us]),r.detachedLeaveAnimationFns=void 0}}function Y8(n,e){if(n.length<=Tn)return;let t=Tn+e,i=n[t],r=i?i[fs]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function q8(n,e){return kh(n,e)}function K8(n,e){return BA(n,e)}function K1(n,e){return yc(n,e)}function te(n,e,t){let i=ht(),r=Ha();if(Mr(i,r,e)){let o=Pn(),s=Eh();TA(s,i,n,e,i[qt],t)}return te}function Z1(n,e,t,i,r){NC(e,n,t,r?"class":"style",i)}function M(n,e,t,i){let r=ht(),o=r[qe],s=n+$t,a=o.firstCreatePass?zC(s,r,2,e,OC,Lg(),t,i):o.data[s];if(RC(a,r,n,e,JC),Qd(a)){let l=r[qe];k0(l,r,a),hC(l,a,r)}return i!=null&&Xh(r,a),M}function T(){let n=Pn(),e=bi(),t=kC(e);return n.firstCreatePass&&VC(n,t),VS(t)&&GS(),zS(),t.classesWithoutHost!=null&&j5(t)&&Z1(n,t,ht(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&W5(t)&&Z1(n,t,ht(),t.stylesWithoutHost,!1),T}function q(n,e,t,i){return M(n,e,t,i),T(),q}function le(n,e,t,i){let r=ht(),o=r[qe],s=n+$t,a=o.firstCreatePass?OG(s,o,2,e,t,i):o.data[s];return RC(a,r,n,e,JC),i!=null&&Xh(r,a),le}function he(){let n=bi(),e=kC(n);return VS(e)&&GS(),zS(),he}function yt(n,e,t,i){return le(n,e,t,i),he(),yt}var JC=(n,e,t,i,r)=>(Qs(!0),yC(e[qt],i,KS()));function Z8(n,e,t,i,r){let o=!w0(e,t);if(Qs(o),o)return yC(e[qt],i,KS());let s=e[Gi],a=L0(s,n,e,t);return X2(s,r)&&C0(s,r,a.nextSibling),s&&(h2(t)||p2(a))&&ps(t)&&(VI(t),sA(a)),a}function TO(){JC=Z8}function QC(n,e,t){let i=ht(),r=i[qe],o=n+$t,s=r.firstCreatePass?zC(o,i,8,"ng-container",OC,Lg(),e,t):r.data[o];if(RC(s,i,n,"ng-container",DO),Qd(s)){let a=i[qe];k0(a,i,s),hC(a,s,i)}return t!=null&&Xh(i,s),QC}function ew(){let n=Pn(),e=bi(),t=kC(e);return n.firstCreatePass&&VC(n,t),ew}function Pr(n,e,t){return QC(n,e,t),ew(),Pr}var DO=(n,e,t,i,r)=>(Qs(!0),rA(e[qt],""));function J8(n,e,t,i,r){let o,s=!w0(e,t);if(Qs(s),s)return rA(e[qt],"");let a=e[Gi],l=L0(a,n,e,t),c=xz(a,r);return C0(a,r,l),o=U0(c,l),o}function IO(){DO=J8}function Ue(){return ht()}function li(n,e,t){let i=ht(),r=Ha();if(Mr(i,r,e)){let o=Pn(),s=Eh();DA(s,i,n,e,i[qt],t)}return li}var Dh=void 0;function Q8(n){let e=Math.floor(Math.abs(n)),t=n.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var e6=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["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"]],Dh,[["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"]],Dh,[["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\u202Fa","h:mm:ss\u202Fa","h:mm:ss\u202Fa z","h:mm:ss\u202Fa zzzz"],["{1}, {0}",Dh,Dh,Dh],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",Q8],u1={};function W0(n){let e=t6(n),t=XP(e);if(t)return t;let i=e.split("-")[0];if(t=XP(i),t)return t;if(i==="en")return e6;throw new Xe(701,!1)}function XP(n){return n in u1||(u1[n]=Jr.ng&&Jr.ng.common&&Jr.ng.common.locales&&Jr.ng.common.locales[n]),u1[n]}var Tc=(function(n){return n[n.LocaleId=0]="LocaleId",n[n.DayPeriodsFormat=1]="DayPeriodsFormat",n[n.DayPeriodsStandalone=2]="DayPeriodsStandalone",n[n.DaysFormat=3]="DaysFormat",n[n.DaysStandalone=4]="DaysStandalone",n[n.MonthsFormat=5]="MonthsFormat",n[n.MonthsStandalone=6]="MonthsStandalone",n[n.Eras=7]="Eras",n[n.FirstDayOfWeek=8]="FirstDayOfWeek",n[n.WeekendRange=9]="WeekendRange",n[n.DateFormat=10]="DateFormat",n[n.TimeFormat=11]="TimeFormat",n[n.DateTimeFormat=12]="DateTimeFormat",n[n.NumberSymbols=13]="NumberSymbols",n[n.NumberFormats=14]="NumberFormats",n[n.CurrencyCode=15]="CurrencyCode",n[n.CurrencySymbol=16]="CurrencySymbol",n[n.CurrencyName=17]="CurrencyName",n[n.Currencies=18]="Currencies",n[n.Directionality=19]="Directionality",n[n.PluralCase=20]="PluralCase",n[n.ExtraData=21]="ExtraData",n})(Tc||{});function t6(n){return n.toLowerCase().replace(/_/g,"-")}var Kh="en-US";var n6=Kh;function PO(n){typeof n=="string"&&(n6=n.toLowerCase().replace(/_/g,"-"))}function ie(n,e,t){let i=ht(),r=Pn(),o=bi();return AO(r,i,i[qt],o,n,e,t),ie}function Hn(n,e,t){let i=ht(),r=Pn(),o=bi();return(o.type&3||t)&&QA(o,r,i,t,i[qt],n,e,n0(o,i,e)),Hn}function AO(n,e,t,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=n0(i,e,o),QA(i,n,e,s,t,r,o,l)&&(a=!1)),a){let c=i.outputs?.[r],d=i.hostDirectiveOutputs?.[r];if(d&&d.length)for(let u=0;u<d.length;u+=2){let f=d[u],h=d[u+1];l??=n0(i,e,o),kP(i,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=n0(i,e,o),kP(i,e,u,r,r,l)}}function w(n=1){return QI(n)}function i6(n,e){let t=null,i=Qz(n);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(i===null?uA(n,o,!0):nV(i,o))return r}return t}function yi(n){let e=ht()[ai][Vi];if(!e.projection){let t=n?n.length:1,i=e.projection=EI(t,null),r=i.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=n?i6(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function xi(n,e=0,t,i,r,o){let s=ht(),a=Pn(),l=i?n+1:null;l!==null&&Uh(s,a,l,i,r,o,null,t);let c=bu(a,$t+n,16,null,t||null);c.projection===null&&(c.projection=e),WS();let u=!s[Gi]||Ug();s[ai][Vi].projection[c.projection]===null&&l!==null?r6(s,a,l):u&&!jh(c)&&TV(a,s,c)}function r6(n,e,t){let i=$t+t,r=e.data[i],o=n[i],s=Fh(o,r.tView.ssrId),a=gu(n,r,void 0,{dehydratedView:s});vu(o,a,0,wc(r,s))}function Za(n,e,t,i){return s8(n,n8(e,t,i)),Za}function Dc(n=1){zg(qI()+n)}function no(n){let e=HI();return kg(e,$t+n)}function Kg(n,e){return n<<17|e<<2}function Mc(n){return n>>17&32767}function o6(n){return(n&2)==2}function s6(n,e){return n&131071|e<<17}function J1(n){return n|2}function fu(n){return(n&131068)>>2}function f1(n,e){return n&-131069|e<<2}function a6(n){return(n&1)===1}function Q1(n){return n|1}function l6(n,e,t,i,r,o){let s=o?e.classBindings:e.styleBindings,a=Mc(s),l=fu(s);n[i]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Yd(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Mc(n[a+1]);n[i+1]=Kg(f,a),f!==0&&(n[f+1]=f1(n[f+1],i)),n[a+1]=s6(n[a+1],i)}else n[i+1]=Kg(a,0),a!==0&&(n[a+1]=f1(n[a+1],i)),a=i;else n[i+1]=Kg(l,0),a===0?a=i:n[l+1]=f1(n[l+1],i),l=i;c&&(n[i+1]=J1(n[i+1])),YP(n,d,i,!0),YP(n,d,i,!1),c6(e,d,n,i,o),s=Kg(a,l),o?e.classBindings=s:e.styleBindings=s}function c6(n,e,t,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof e=="string"&&Yd(o,e)>=0&&(t[i+1]=Q1(t[i+1]))}function YP(n,e,t,i){let r=n[t+1],o=e===null,s=i?Mc(r):fu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],c=n[s+1];d6(l,e)&&(a=!0,n[s+1]=i?Q1(c):J1(c)),s=i?Mc(c):fu(c)}a&&(n[t+1]=i?J1(r):Q1(r))}function d6(n,e){return n===null||e==null||(Array.isArray(n)?n[1]:n)===e?!0:Array.isArray(n)&&typeof e=="string"?Yd(n,e)>=0:!1}var Mo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function u6(n){return n.substring(Mo.key,Mo.keyEnd)}function f6(n){return h6(n),OO(n,RO(n,0,Mo.textEnd))}function OO(n,e){let t=Mo.textEnd;return t===e?-1:(e=Mo.keyEnd=p6(n,Mo.key=e,t),RO(n,e,t))}function h6(n){Mo.key=0,Mo.keyEnd=0,Mo.value=0,Mo.valueEnd=0,Mo.textEnd=n.length}function RO(n,e,t){for(;e<t&&n.charCodeAt(e)<=32;)e++;return e}function p6(n,e,t){for(;e<t&&n.charCodeAt(e)>32;)e++;return e}function io(n,e,t){return kO(n,e,t,!1),io}function dt(n,e){return kO(n,e,null,!0),dt}function ro(n){g6(S6,m6,n,!0)}function m6(n,e){for(let t=f6(e);t>=0;t=OO(e,t))Pg(n,u6(e),!0)}function kO(n,e,t,i){let r=ht(),o=Pn(),s=XS(2);if(o.firstUpdatePass&&NO(o,n,s,i),e!==Tr&&Mr(r,s,e)){let a=o.data[Js()];LO(o,a,r,r[qt],n,r[s+1]=w6(e,t),i,s)}}function g6(n,e,t,i){let r=Pn(),o=XS(2);r.firstUpdatePass&&NO(r,null,o,i);let s=ht();if(t!==Tr&&Mr(s,o,t)){let a=r.data[Js()];if(UO(a,i)&&!FO(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=wg(l,t||"")),Z1(r,a,s,t,i)}else C6(r,a,s,s[qt],s[o+1],s[o+1]=_6(n,e,t),i,o)}}function FO(n,e){return e>=n.expandoStartIndex}function NO(n,e,t,i){let r=n.data;if(r[t+1]===null){let o=r[Js()],s=FO(n,t);UO(o,i)&&e===null&&!s&&(e=!1),e=v6(r,o,e,i),l6(r,o,e,t,s,i)}}function v6(n,e,t,i){let r=YI(n),o=i?e.residualClasses:e.residualStyles;if(r===null)(i?e.classBindings:e.styleBindings)===0&&(t=h1(null,n,e,t,i),t=Bh(t,e.attrs,i),o=null);else{let s=e.directiveStylingLast;if(s===-1||n[s]!==r)if(t=h1(r,n,e,t,i),o===null){let l=b6(n,e,i);l!==void 0&&Array.isArray(l)&&(l=h1(null,n,e,l[1],i),l=Bh(l,e.attrs,i),y6(n,e,i,l))}else o=x6(n,e,i)}return o!==void 0&&(i?e.residualClasses=o:e.residualStyles=o),t}function b6(n,e,t){let i=t?e.classBindings:e.styleBindings;if(fu(i)!==0)return n[Mc(i)]}function y6(n,e,t,i){let r=t?e.classBindings:e.styleBindings;n[Mc(r)]=i}function x6(n,e,t){let i,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=Bh(i,s,t)}return Bh(i,e.attrs,t)}function h1(n,e,t,i,r){let o=null,s=t.directiveEnd,a=t.directiveStylingLast;for(a===-1?a=t.directiveStart:a++;a<s&&(o=e[a],i=Bh(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(t.directiveStylingLast=a),i}function Bh(n,e,t){let i=t?1:2,r=-1;if(e!==null)for(let o=0;o<e.length;o++){let s=e[o];typeof s=="number"?r=s:r===i&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),Pg(n,s,t?!0:e[++o]))}return n===void 0?null:n}function _6(n,e,t){if(t==null||t==="")return wi;let i=[],r=Do(t);if(Array.isArray(r))for(let o=0;o<r.length;o++)n(i,r[o],!0);else if(r instanceof Set)for(let o of r)n(i,o,!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&n(i,o,r[o]);else typeof r=="string"&&e(i,r);return i}function S6(n,e,t){let i=String(e);i!==""&&!i.includes(" ")&&Pg(n,i,t)}function C6(n,e,t,i,r,o,s,a){r===Tr&&(r=wi);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;d!==null||u!==null;){let f=l<r.length?r[l+1]:void 0,h=c<o.length?o[c+1]:void 0,p=null,v;d===u?(l+=2,c+=2,f!==h&&(p=u,v=h)):u===null||d!==null&&d<u?(l+=2,p=d):(c+=2,p=u,v=h),p!==null&&LO(n,e,t,i,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function LO(n,e,t,i,r,o,s,a){if(!(e.type&3))return;let l=n.data,c=l[a+1],d=a6(c)?qP(l,e,t,r,fu(c),s):void 0;if(!b0(d)){b0(o)||o6(c)&&(o=qP(l,null,t,r,a,s));let u=RS(Js(),t);IV(i,s,u,r,o)}}function qP(n,e,t,i,r,o){let s=e===null,a;for(;r>0;){let l=n[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,f=t[r+1];f===Tr&&(f=u?wi:void 0);let h=u?Ag(f,i):d===i?f:void 0;if(c&&!b0(h)&&(h=Ag(l,i)),b0(h)&&(a=h,s))return a;let p=n[r+1];r=s?Mc(p):fu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=Ag(l,i))}return a}function b0(n){return n!==void 0}function w6(n,e){return n==null||n===""||(typeof e=="string"?n=n+e:typeof n=="object"&&(n=Cg(Do(n)))),n}function UO(n,e){return(n.flags&(e?8:16))!==0}function N(n,e=""){let t=ht(),i=Pn(),r=n+$t,o=i.firstCreatePass?bu(i,r,1,e,null):i.data[r],s=BO(i,t,o,e);t[r]=s,Hg()&&PC(i,t,s,o),eu(o,!1)}var BO=(n,e,t,i)=>(Qs(!0),iA(e[qt],i));function E6(n,e,t,i){let r=!w0(e,t);if(Qs(r),r)return iA(e[qt],i);let o=e[Gi];return L0(o,n,e,t)}function zO(){BO=E6}function VO(n,e,t,i=""){return Mr(n,Ha(),t)?e+yh(t)+i:Tr}function We(n){return kt("",n),We}function kt(n,e,t){let i=ht(),r=VO(i,n,e,t);return r!==Tr&&M6(i,Js(),r),kt}function M6(n,e,t){let i=RS(e,n);Wz(n[qt],i,t)}function Ic(n,e,t){$C(e)&&(e=e());let i=ht(),r=Ha();if(Mr(i,r,e)){let o=Pn(),s=Eh();TA(s,i,n,e,i[qt],t)}return Ic}function xs(n,e){let t=$C(n);return t&&n.set(e),t}function Zh(n,e){let t=ht(),i=Pn(),r=bi();return AO(i,t,t[qt],r,n,e),Zh}function tw(n,e,t=""){return VO(ht(),n,e,t)}function KP(n,e,t){let i=Pn();i.firstCreatePass&&GO(e,i.data,i.blueprint,ms(n),t)}function GO(n,e,t,i,r){if(n=vi(n),Array.isArray(n))for(let o=0;o<n.length;o++)GO(n[o],e,t,i,r);else{let o=Pn(),s=ht(),a=bi(),l=uc(n)?n:vi(n.provide),c=DS(n),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(uc(n)||!n.multi){let h=new Cc(c,r,Gt,null),p=m1(l,e,r?d:d+f,u);p===-1?(v1(l0(a,s),o,l),p1(o,n,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(h),s.push(h)):(t[p]=h,s[p]=h)}else{let h=m1(l,e,d+f,u),p=m1(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){v1(l0(a,s),o,l);let m=I6(r?D6:T6,t.length,r,i,c,n);!r&&g&&(t[p].providerFactory=m),p1(o,n,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(m),s.push(m)}else{let m=HO(t[r?p:h],c,!r&&i);p1(o,n,h>-1?h:p,m)}!r&&i&&g&&t[p].componentProviders++}}}function p1(n,e,t,i){let r=uc(e),o=AI(e);if(r||o){let l=(o?vi(e.useClass):e).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){let d=c.indexOf(t);d===-1?c.push(t,[i,l]):c[d+1].push(i,l)}else c.push(t,l)}}}function HO(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function m1(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function T6(n,e,t,i,r){return eC(this.multi,[])}function D6(n,e,t,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Ah(i,i[qe],this.providerFactory.index,r);s=l.slice(0,a),eC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],eC(o,s);return s}function eC(n,e){for(let t=0;t<n.length;t++){let i=n[t];e.push(i())}return e}function I6(n,e,t,i,r,o){let s=new Cc(n,t,Gt,null);return s.multi=[],s.index=e,s.componentProviders=0,HO(s,r,i&&!t),s}function oo(n,e){return t=>{t.providersResolver=(i,r)=>KP(i,r?r(n):n,!1),e&&(t.viewProvidersResolver=(i,r)=>KP(i,r?r(e):e,!0))}}function nw(n,e){let t=tu()+n,i=ht();return i[t]===Tr?H0(i,t,e()):RG(i,t)}function _s(n,e,t){return P6(ht(),tu(),n,e,t)}function $0(n,e,t,i){return jO(ht(),tu(),n,e,t,i)}function iw(n,e){let t=n[e];return t===Tr?void 0:t}function P6(n,e,t,i,r,o){let s=e+t;return Mr(n,s,r)?H0(n,s+1,o?i.call(o,r):i(r)):iw(n,s+1)}function jO(n,e,t,i,r,o,s){let a=e+t;return JA(n,a,r,o)?H0(n,a+2,s?i.call(s,r,o):i(r,o)):iw(n,a+2)}function A6(n,e,t,i,r,o,s,a){let l=e+t;return kG(n,l,r,o,s)?H0(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):iw(n,l+3)}function Ti(n,e){let t=Pn(),i,r=n+$t;t.firstCreatePass?(i=O6(e,t.pipeRegistry),t.data[r]=i,i.onDestroy&&(t.destroyHooks??=[]).push(r,i.onDestroy)):i=t.data[r];let o=i.factory||(i.factory=La(i.type,!0)),s,a=Ui(Gt);try{let l=a0(!1),c=o();return a0(l),kS(t,ht(),r,c),c}finally{Ui(a)}}function O6(n,e){if(e)for(let t=e.length-1;t>=0;t--){let i=e[t];if(n===i.name)return i}}function ji(n,e,t,i){let r=n+$t,o=ht(),s=kg(o,r);return WO(o,r)?jO(o,tu(),e,s.transform,t,i,s):s.transform(t,i)}function rw(n,e,t,i,r){let o=n+$t,s=ht(),a=kg(s,o);return WO(s,o)?A6(s,tu(),e,a.transform,t,i,r,a):a.transform(t,i,r)}function WO(n,e){return n[qe].data[e].pure}function Ja(n,e){return N0(n,e)}var $O=(()=>{class n{applicationErrorHandler=Z(ea);appRef=Z(Ir);taskService=Z($a);ngZone=Z(rr);zonelessEnabled=Z(Th);tracing=Z(oa,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Li;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(vh):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Z(t1,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{let t=this.taskService.add();if(!this.runningTick&&(this.cleanup(),!this.zonelessEnabled||this.appRef.includeAllTestViews)){this.taskService.remove(t);return}this.switchToMicrotaskScheduler(),this.taskService.remove(t)})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()}))}switchToMicrotaskScheduler(){this.ngZone.runOutsideAngular(()=>{let t=this.taskService.add();this.useMicrotaskScheduler=!0,queueMicrotask(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(t)})})}notify(t){if(!this.zonelessEnabled&&t===5)return;switch(t){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2;break}case 12:{this.appRef.dirtyFlags|=16;break}case 13:{this.appRef.dirtyFlags|=2;break}case 11:break;default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick())return;let i=this.useMicrotaskScheduler?rP:ZS;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>i(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>i(()=>this.tick()))}shouldScheduleTick(){return!(this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(vh+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let t=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.applicationErrorHandler(i)}finally{this.taskService.remove(t),this.cleanup()}}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function XO(){return[{provide:as,useExisting:$O},{provide:rr,useClass:bh},{provide:Th,useValue:!0}]}function R6(){return typeof $localize<"u"&&$localize.locale||Kh}var Jh=new $e("",{factory:()=>Z(Jh,{optional:!0,skipSelf:!0})||R6()});var Qh=class{destroyed=!1;listeners=null;errorHandler=Z(Zr,{optional:!0});destroyRef=Z(sr);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new Xe(953,!1);return(this.listeners??=[]).push(e),{unsubscribe:()=>{let t=this.listeners?.indexOf(e);t!==void 0&&t!==-1&&this.listeners?.splice(t,1)}}}emit(e){if(this.destroyed){console.warn(Ys(953,!1));return}if(this.listeners===null)return;let t=at(null);try{for(let i of this.listeners)try{i(e)}catch(r){this.errorHandler?.handleError(r)}}finally{at(t)}}};function En(n){return pI(n)}function Pe(n,e){return lh(n,e?.equal)}var cw={JSACTION:"__jsaction",OWNER:"__owner"},ZO={};function k6(n){return n[cw.JSACTION]}function YO(n,e){n[cw.JSACTION]=e}function F6(n){return ZO[n]}function N6(n,e){ZO[n]=e}var ut={AUXCLICK:"auxclick",CHANGE:"change",CLICK:"click",CLICKMOD:"clickmod",CLICKONLY:"clickonly",DBLCLICK:"dblclick",FOCUS:"focus",FOCUSIN:"focusin",BLUR:"blur",FOCUSOUT:"focusout",SUBMIT:"submit",KEYDOWN:"keydown",KEYPRESS:"keypress",KEYUP:"keyup",MOUSEUP:"mouseup",MOUSEDOWN:"mousedown",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",MOUSEMOVE:"mousemove",POINTERUP:"pointerup",POINTERDOWN:"pointerdown",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERMOVE:"pointermove",POINTERCANCEL:"pointercancel",GOTPOINTERCAPTURE:"gotpointercapture",LOSTPOINTERCAPTURE:"lostpointercapture",ERROR:"error",LOAD:"load",UNLOAD:"unload",TOUCHSTART:"touchstart",TOUCHEND:"touchend",TOUCHMOVE:"touchmove",INPUT:"input",SCROLL:"scroll",TOGGLE:"toggle",CUSTOM:"_custom"},L6=[ut.MOUSEENTER,ut.MOUSELEAVE,"pointerenter","pointerleave"],Yue=[ut.CLICK,ut.DBLCLICK,ut.FOCUSIN,ut.FOCUSOUT,ut.KEYDOWN,ut.KEYUP,ut.KEYPRESS,ut.MOUSEOVER,ut.MOUSEOUT,ut.SUBMIT,ut.TOUCHSTART,ut.TOUCHEND,ut.TOUCHMOVE,"touchcancel","auxclick","change","compositionstart","compositionupdate","compositionend","beforeinput","input","select","copy","cut","paste","mousedown","mouseup","wheel","contextmenu","dragover","dragenter","dragleave","drop","dragstart","dragend","pointerdown","pointermove","pointerup","pointercancel","pointerover","pointerout","gotpointercapture","lostpointercapture","ended","loadedmetadata","pagehide","pageshow","visibilitychange","beforematch"],U6=[ut.FOCUS,ut.BLUR,ut.ERROR,ut.LOAD,ut.TOGGLE],dw=n=>U6.indexOf(n)>=0;function B6(n){return n===ut.MOUSEENTER?ut.MOUSEOVER:n===ut.MOUSELEAVE?ut.MOUSEOUT:n===ut.POINTERENTER?ut.POINTEROVER:n===ut.POINTERLEAVE?ut.POINTEROUT:n}function z6(n,e,t,i){let r=!1;dw(e)&&(r=!0);let o=typeof i=="boolean"?{capture:r,passive:i}:r;return n.addEventListener(e,t,o),{eventType:e,handler:t,capture:r,passive:i}}function V6(n,e){if(n.removeEventListener){let t=typeof e.passive=="boolean"?{capture:e.capture}:e.capture;n.removeEventListener(e.eventType,e.handler,t)}else n.detachEvent&&n.detachEvent(`on${e.eventType}`,e.handler)}function G6(n){n.preventDefault?n.preventDefault():n.returnValue=!1}var qO=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function H6(n){return n.which===2||n.which==null&&n.button===4}function j6(n){return qO&&n.metaKey||!qO&&n.ctrlKey||H6(n)||n.shiftKey}function W6(n,e,t){let i=n.relatedTarget;return(n.type===ut.MOUSEOVER&&e===ut.MOUSEENTER||n.type===ut.MOUSEOUT&&e===ut.MOUSELEAVE||n.type===ut.POINTEROVER&&e===ut.POINTERENTER||n.type===ut.POINTEROUT&&e===ut.POINTERLEAVE)&&(!i||i!==t&&!t.contains(i))}function $6(n,e){let t={};for(let i in n){if(i==="srcElement"||i==="target")continue;let r=i,o=n[r];typeof o!="function"&&(t[r]=o)}return n.type===ut.MOUSEOVER?t.type=ut.MOUSEENTER:n.type===ut.MOUSEOUT?t.type=ut.MOUSELEAVE:n.type===ut.POINTEROVER?t.type=ut.POINTERENTER:t.type=ut.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=n,t}var X6=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),K0=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,i){X6&&(this.element.style.cursor="pointer"),this.handlerInfos.push(z6(this.element,e,t(this.element),i))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)V6(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},Y6={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function Qa(n){return n.eventType}function uw(n,e){n.eventType=e}function Y0(n){return n.event}function JO(n,e){n.event=e}function QO(n){return n.targetElement}function eR(n,e){n.targetElement=e}function tR(n){return n.eic}function q6(n,e){n.eic=e}function K6(n){return n.timeStamp}function Z6(n,e){n.timeStamp=e}function q0(n){return n.eia}function nR(n,e,t){n.eia=[e,t]}function ow(n){n.eia=void 0}function X0(n){return n[1]}function J6(n){return n.eirp}function iR(n,e){n.eirp=e}function rR(n){return n.eir}function oR(n,e){n.eir=e}function sR(n){return{eventType:n.eventType,event:n.event,targetElement:n.targetElement,eic:n.eic,eia:n.eia,timeStamp:n.timeStamp,eirp:n.eirp,eiack:n.eiack,eir:n.eir}}function Q6(n,e,t,i,r,o,s,a){return{eventType:n,event:e,targetElement:t,eic:i,timeStamp:r,eia:o,eirp:s,eiack:a}}var sw=class n{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return Qa(this.eventInfo)}setEventType(e){uw(this.eventInfo,e)}getEvent(){return Y0(this.eventInfo)}setEvent(e){JO(this.eventInfo,e)}getTargetElement(){return QO(this.eventInfo)}setTargetElement(e){eR(this.eventInfo,e)}getContainer(){return tR(this.eventInfo)}setContainer(e){q6(this.eventInfo,e)}getTimestamp(){return K6(this.eventInfo)}setTimestamp(e){Z6(this.eventInfo,e)}getAction(){let e=q0(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){ow(this.eventInfo);return}nR(this.eventInfo,e.name,e.element)}getIsReplay(){return J6(this.eventInfo)}setIsReplay(e){iR(this.eventInfo,e)}getResolved(){return rR(this.eventInfo)}setResolved(e){oR(this.eventInfo,e)}clone(){return new n(sR(this.eventInfo))}},eH={},tH=/\s*;\s*/,nH=ut.CLICK,aw=class{a11yClickSupport=!1;clickModSupport=!0;syntheticMouseEventSupport;updateEventInfoForA11yClick=void 0;preventDefaultForA11yClick=void 0;populateClickOnlyAction=void 0;constructor({syntheticMouseEventSupport:e=!1,clickModSupport:t=!0}={}){this.syntheticMouseEventSupport=e,this.clickModSupport=t}resolveEventType(e){this.clickModSupport&&Qa(e)===ut.CLICK&&j6(Y0(e))?uw(e,ut.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){rR(e)||(this.populateAction(e,QO(e)),oR(e,!0))}resolveParentAction(e){let t=q0(e),i=t&&X0(t);ow(e);let r=i&&this.getParentNode(i);r&&this.populateAction(e,r)}populateAction(e,t){let i=t;for(;i&&i!==tR(e)&&(i.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(i,e),!q0(e));)i=this.getParentNode(i);let r=q0(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(Qa(e)===ut.MOUSEENTER||Qa(e)===ut.MOUSELEAVE||Qa(e)===ut.POINTERENTER||Qa(e)===ut.POINTERLEAVE)))if(W6(Y0(e),Qa(e),X0(r))){let o=$6(Y0(e),X0(r));JO(e,o),eR(e,X0(r))}else ow(e)}getParentNode(e){let t=e[cw.OWNER];if(t)return t;let i=e.parentNode;return i?.nodeName==="#document-fragment"?i?.host??null:i}populateActionOnElement(e,t){let i=this.parseActions(e),r=i[Qa(t)];r!==void 0&&nR(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,i)}parseActions(e){let t=k6(e);if(!t){let i=e.getAttribute($g.JSACTION);if(!i)t=eH,YO(e,t);else{if(t=F6(i),!t){t={};let r=i.split(tH);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(Y6.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():nH,d=l?s.substr(a+1).trim():s;t[c]=d}N6(i,t)}YO(e,t)}}return t}addA11yClickSupport(e,t,i){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=i}},aR=(function(n){return n[n.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",n})(aR||{}),lw=class{dispatchDelegate;actionResolver;eventReplayer;eventReplayScheduled=!1;replayEventInfoWrappers=[];constructor(e,{actionResolver:t,eventReplayer:i}={}){this.dispatchDelegate=e,this.actionResolver=t,this.eventReplayer=i}dispatch(e){let t=new sw(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let i=t.getAction();if(i&&iH(i.element,t)&&G6(t.getEvent()),this.eventReplayer&&t.getIsReplay()){this.scheduleEventInfoWrapperReplay(t);return}this.dispatchDelegate(t)}scheduleEventInfoWrapperReplay(e){this.replayEventInfoWrappers.push(e),!this.eventReplayScheduled&&(this.eventReplayScheduled=!0,Promise.resolve().then(()=>{this.eventReplayScheduled=!1,this.eventReplayer(this.replayEventInfoWrappers)}))}};function iH(n,e){return n.tagName==="A"&&(e.getEventType()===ut.CLICK||e.getEventType()===ut.CLICKMOD)}var lR=Symbol.for("propagationStopped"),fw={REPLAY:101};var rH="`preventDefault` called during event replay.";var oH="`composedPath` called during event replay.",Z0=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new aw({clickModSupport:t}),this.dispatcher=new lw(i=>{this.dispatchToDelegate(i)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&lH(e),sH(e);e.getAction();){if(cH(e),dw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),aH(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function sH(n){let e=n.getEvent(),t=n.getEvent().stopPropagation.bind(e),i=()=>{e[lR]=!0,t()};Pc(e,"stopPropagation",i),Pc(e,"stopImmediatePropagation",i)}function aH(n){return!!n.getEvent()[lR]}function lH(n){let e=n.getEvent(),t=n.getTargetElement(),i=e.preventDefault.bind(e);Pc(e,"target",t),Pc(e,"eventPhase",fw.REPLAY),Pc(e,"preventDefault",()=>{throw i(),new Error(rH+"")}),Pc(e,"composedPath",()=>{throw new Error(oH+"")})}function cH(n){let e=n.getEvent(),t=n.getAction()?.element;t&&Pc(e,"currentTarget",t,{configurable:!0})}function Pc(n,e,t,{configurable:i=!1}={}){Object.defineProperty(n,e,{value:t,configurable:i})}function cR(n,e){n.ecrd(t=>{e.dispatch(t)},aR.I_AM_THE_JSACTION_FRAMEWORK)}function dH(n){return n?.q??[]}function uH(n){n&&(KO(n.c,n.et,n.h),KO(n.c,n.etc,n.h,!0))}function KO(n,e,t,i){for(let r=0;r<e.length;r++)n.removeEventListener(e[r],t,i)}var fH=!1,dR=(()=>{class n{static MOUSE_SPECIAL_SUPPORT=fH;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,i,r){let o=Q6(t,i,i.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){iR(t,!0),this.queuedEventInfos?.push(t);return}this.dispatcher(t)}addEvent(t,i,r){if(t in this.eventHandlers||!this.containerManager||!n.MOUSE_SPECIAL_SUPPORT&&L6.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=B6(i||t);if(s!==t){let a=this.browserEventTypeToExtraEventTypes[s]||[];a.push(t),this.browserEventTypeToExtraEventTypes[s]=a}this.containerManager.addEventListener(s,a=>l=>{o(t,l,a)},r)}replayEarlyEvents(t=window._ejsa){t&&(this.replayEarlyEventInfos(t.q),uH(t),delete window._ejsa)}replayEarlyEventInfos(t){for(let i=0;i<t.length;i++){let r=t[i],o=this.getEventTypesForBrowserEventType(r.eventType);for(let s=0;s<o.length;s++){let a=sR(r);uw(a,o[s]),this.handleEventInfo(a)}}}getEventTypesForBrowserEventType(t){let i=[];return this.eventHandlers[t]&&i.push(t),this.browserEventTypeToExtraEventTypes[t]&&i.push(...this.browserEventTypeToExtraEventTypes[t]),i}handler(t){return this.eventHandlers[t]}cleanUp(){this.containerManager?.cleanUp(),this.containerManager=null,this.eventHandlers={},this.browserEventTypeToExtraEventTypes={},this.dispatcher=null,this.queuedEventInfos=[]}registerDispatcher(t,i){this.ecrd(t,i)}ecrd(t,i){if(this.dispatcher=t,this.queuedEventInfos?.length){for(let r=0;r<this.queuedEventInfos.length;r++)this.handleEventInfo(this.queuedEventInfos[r]);this.queuedEventInfos=null}}}return n})();function uR(n,e=window){return dH(e._ejsas?.[n])}function hw(n,e=window){e._ejsas&&(e._ejsas[n]=void 0)}var ev=Symbol("InputSignalNode#UNSET"),xR=ue(R({},qm),{transformFn:void 0,applyValueToInputSignal(n,e){ic(n,e)}});function _R(n,e){let t=Object.create(xR);t.value=n,t.transformFn=e?.transform;function i(){if(ec(t),t.value===ev){let r=null;throw new Xe(-950,r)}return t.value}return i[Qn]=t,i}function Pt(n){return new Qh}function fR(n,e){return _R(n,e)}function AH(n){return _R(ev,n)}var Me=(fR.required=AH,fR);function hR(n,e){return uO(e)}function OH(n,e){return fO(e)}var wu=(hR.required=OH,hR);function SR(n,e){let t=Object.create(xR),i=new Qh;t.value=n;function r(){return ec(t),pR(t.value),t.value}return r[Qn]=t,r.asReadonly=jg.bind(r),r.set=o=>{t.equal(t.value,o)||(ic(t,o),i.emit(o))},r.update=o=>{pR(t.value),r.set(o(t.value))},r.subscribe=i.subscribe.bind(i),r.destroyRef=i.destroyRef,r}function pR(n){if(n===ev)throw new Xe(952,!1)}function mR(n,e){return SR(n,e)}function RH(n){return SR(ev,n)}var Ss=(mR.required=RH,mR);var pw=new $e(""),kH=new $e("");function ep(n){return!n.moduleRef}function FH(n){let e=ep(n)?n.r3Injector:n.moduleRef.injector,t=e.get(rr);return t.run(()=>{ep(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=e.get(ea),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:i})}),ep(n)){let o=()=>e.destroy(),s=n.platformInjector.get(pw);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(pw);s.add(o),n.moduleRef.onDestroy(()=>{Ph(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return LH(i,t,()=>{let o=e.get($a),s=o.add(),a=e.get(qC);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(Jh,Kh);if(PO(l||Kh),!e.get(kH,!0))return ep(n)?e.get(Ir):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(ep(n)){let d=e.get(Ir);return n.rootComponent!==void 0&&d.bootstrap(n.rootComponent),d}else return NH?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var NH;function LH(n,e,t){try{let i=t();return _u(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n(i)),i}}var Q0=null;function UH(n=[],e){return Mi.create({name:e,providers:[{provide:Sh,useValue:"platform"},{provide:pw,useValue:new Set([()=>Q0=null])},...n]})}function BH(n=[]){if(Q0)return Q0;let e=UH(n);return Q0=e,SO(),zH(e),e}function zH(n){let e=n.get(y0,null);Kd(n,()=>{e?.forEach(t=>t())})}var J0=new WeakSet,gR="";function vR(n){return n.get(lC,P2)}function CR(){let n=[{provide:lC,useFactory:()=>{let e=!0;{let t=Z(bs);e=!!window._ejsas?.[t]}return e&&Po("NgEventReplay"),e}}];return n.push({provide:Ks,useValue:()=>{let e=Z(Ir),{injector:t}=e;if(!J0.has(e)){let i=Z(cC);if(vR(t)){B2();let r=t.get(bs),o=L2(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(R2(s,a,l),k2(s,i))});e.onDestroy(o)}}},multi:!0},{provide:Su,useFactory:()=>{let e=Z(Ir),{injector:t}=e;return()=>{if(!vR(t)||J0.has(e))return;J0.add(e);let i=t.get(bs);e.onDestroy(()=>{J0.delete(e),hw(i)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(N2);VH(r,t);let o=t.get(cC);o.get(gR)?.forEach(F2),o.delete(gR);let s=r.instance;$2(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),n}var VH=(n,e)=>{let t=e.get(bs),i=window._ejsas[t],r=n.instance=new dR(new K0(i.c));for(let a of i.et)r.addEvent(a);for(let a of i.etc)r.addEvent(a);let o=uR(t);r.replayEarlyEventInfos(o),hw(t);let s=new Z0(a=>{GH(e,a,a.currentTarget)});cR(r,s)};function GH(n,e,t){let i=(t&&t.getAttribute(Hh))??"";/d\d+/.test(i)?HH(i,n,e,t):e.eventPhase===fw.REPLAY&&dC(e,t)}function HH(n,e,t,i){let r=e.get(A2);r.push({event:t,currentTarget:i}),MO(e,n,jH(r))}function jH(n){return e=>{let t=new Set(e),i=[];for(let{event:r,currentTarget:o}of n){let s=o.getAttribute(Hh);t.has(s)?dC(r,o):i.push({event:r,currentTarget:o})}n.length=0,n.push(...i)}}var bR=!1;var WH=1e4;function $H(){bR||(bR=!0,H2(),TO(),zO(),IO(),bO(),sO(),WA(),MA())}function XH(n){return n.whenStable()}function wR(){let n=[{provide:Gh,useFactory:()=>{let e=!0;return e=!!Z(mu,{optional:!0})?.get(uC,null),e&&Po("NgHydration"),e}},{provide:Ks,useValue:()=>{VA(!1);let e=Z(Cn);Z(Gh)&&(q2(e),$H())},multi:!0}];return n.push({provide:aC,useFactory:()=>Z(Gh)},{provide:Su,useFactory:()=>{let e=Z(as);if(Z(Gh)){let t=Z(Ir);return()=>{XH(t).then(()=>{t.destroyed||(BC(t),e.notify(7))})}}return()=>{}},multi:!0}),Zs(n)}var zge=WH-1e3;var tv=(()=>{class n{static __NG_ELEMENT_ID__=YH}return n})();function YH(n){return qH(bi(),ht(),(n&16)===16)}function qH(n,e,t){if(ps(n)&&!t){let i=wr(n.index,e);return new Ya(i,i)}else if(n.type&175){let i=e[ai];return new Ya(i,e)}return null}function ER(n){let{rootComponent:e,appProviders:t,platformProviders:i,platformRef:r}=n;tn(jt.BootstrapApplicationStart);try{let o=r?.injector??BH(i),s=[XO(),sP,...t||[]],a=new Lh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return FH({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{tn(jt.BootstrapApplicationEnd)}}function nv(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}function MR(n,e){let t=qs(n),i=e.elementInjector||qd();return new uu(t).create(i,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var TR=null;function so(){return TR}function mw(n){TR??=n}var tp=class{},iv=(()=>{class n{historyGo(t){throw new Error("")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:()=>Z(DR),providedIn:"platform"})}return n})();var DR=(()=>{class n extends iv{_location;_history;_doc=Z(Cn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return so().getBaseHref(this._doc)}onPopState(t){let i=so().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){let i=so().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",t,!1),()=>i.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,i,r){this._history.pushState(t,i,r)}replaceState(t,i,r){this._history.replaceState(t,i,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(t=0){this._history.go(t)}getState(){return this._history.state}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:()=>new n,providedIn:"platform"})}return n})();var yw=(function(n){return n[n.Decimal=0]="Decimal",n[n.Percent=1]="Percent",n[n.Currency=2]="Currency",n[n.Scientific=3]="Scientific",n})(yw||{});var Cs={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 Eu(n,e){let t=W0(n),i=t[Tc.NumberSymbols][e];if(typeof i>"u"){if(e===Cs.CurrencyDecimal)return t[Tc.NumberSymbols][Cs.Decimal];if(e===Cs.CurrencyGroup)return t[Tc.NumberSymbols][Cs.Group]}return i}function AR(n,e){return W0(n)[Tc.NumberFormats][e]}var KH=/^(\d+)?\.((\d+)(-(\d+))?)?$/,IR=22,rv=".",np="0",ZH=";",JH=",",gw="#";function QH(n,e,t,i,r,o,s=!1){let a="",l=!1;if(!isFinite(n))a=Eu(t,Cs.Infinity);else{let c=nj(n);s&&(c=tj(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(KH);if(b===null)throw new Xe(2306,!1);let y=b[1],x=b[3],_=b[5];y!=null&&(d=vw(y)),x!=null&&(u=vw(x)),_!=null?f=vw(_):x!=null&&u>f&&(f=u)}ij(c,u,f);let h=c.digits,p=c.integerLen,v=c.exponent,g=[];for(l=h.every(b=>!b);p<d;p++)h.unshift(0);for(;p<0;p++)h.unshift(0);p>0?g=h.splice(p,h.length):(g=h,h=[0]);let m=[];for(h.length>=e.lgSize&&m.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)m.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&m.unshift(h.join("")),a=m.join(Eu(t,i)),g.length&&(a+=Eu(t,r)+g.join("")),v&&(a+=Eu(t,Cs.Exponential)+"+"+v)}return n<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function OR(n,e,t){let i=AR(e,yw.Decimal),r=ej(i,Eu(e,Cs.MinusSign));return QH(n,r,e,Cs.Group,Cs.Decimal,t)}function ej(n,e="-"){let t={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(ZH),r=i[0],o=i[1],s=r.indexOf(rv)!==-1?r.split(rv):[r.substring(0,r.lastIndexOf(np)+1),r.substring(r.lastIndexOf(np)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(gw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===np?t.minFrac=t.maxFrac=d+1:u===gw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(JH);if(t.gSize=c[1]?c[1].length:0,t.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let d=r.length-t.posPre.length-t.posSuf.length,u=o.indexOf(gw);t.negPre=o.substring(0,u).replace(/'/g,""),t.negSuf=o.slice(u+d).replace(/'/g,"")}else t.negPre=e+t.posPre,t.negSuf=t.posSuf;return t}function tj(n){if(n.digits[0]===0)return n;let e=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(e===0?n.digits.push(0,0):e===1&&n.digits.push(0),n.integerLen+=2),n}function nj(n){let e=Math.abs(n)+"",t=0,i,r,o,s,a;for((r=e.indexOf(rv))>-1&&(e=e.replace(rv,"")),(o=e.search(/e/i))>0?(r<0&&(r=o),r+=+e.slice(o+1),e=e.substring(0,o)):r<0&&(r=e.length),o=0;e.charAt(o)===np;o++);if(o===(a=e.length))i=[0],r=1;else{for(a--;e.charAt(a)===np;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(e.charAt(o))}return r>IR&&(i=i.splice(0,IR-1),t=r-1,r=1),{digits:i,exponent:t,integerLen:r}}function ij(n,e,t){if(e>t)throw new Xe(2307,!1);let i=n.digits,r=i.length-n.integerLen,o=Math.min(Math.max(e,r),t),s=o+n.integerLen,a=i[s];if(s>0){i.splice(Math.max(n.integerLen,s));for(let u=s;u<i.length;u++)i[u]=0}else{r=Math.max(0,r),n.integerLen=1,i.length=Math.max(1,s=o+1),i[0]=0;for(let u=1;u<s;u++)i[u]=0}if(a>=5)if(s-1<0){for(let u=0;u>s;u--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[s-1]++;for(;r<Math.max(0,o);r++)i.push(0);let l=o!==0,c=e+n.integerLen,d=i.reduceRight(function(u,f,h,p){return f=f+u,p[h]=f<10?f:f-10,l&&(p[h]===0&&h>=c?p.pop():l=!1),f>=10?1:0},0);d&&(i.unshift(d),n.integerLen++)}function vw(n){let e=parseInt(n);if(isNaN(e))throw new Xe(2305,!1);return e}var bw=/\s+/,PR=[],xw=(()=>{class n{_ngEl;_renderer;initialClasses=PR;rawClass;stateMap=new Map;constructor(t,i){this._ngEl=t,this._renderer=i}set klass(t){this.initialClasses=t!=null?t.trim().split(bw):PR}set ngClass(t){this.rawClass=typeof t=="string"?t.trim().split(bw):t}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(let i of t)this._updateState(i,!0);else if(t!=null)for(let i of Object.keys(t))this._updateState(i,!!t[i]);this._applyStateDiff()}_updateState(t,i){let r=this.stateMap.get(t);r!==void 0?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(t,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let t of this.stateMap){let i=t[0],r=t[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(t,i){t=t.trim(),t.length>0&&t.split(bw).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static \u0275fac=function(i){return new(i||n)(Gt(ar),Gt(ys))};static \u0275dir=Gn({type:n,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"}})}return n})();var Ac=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Z(Mi);constructor(t){this._viewContainerRef=t}ngOnChanges(t){if(this._shouldRecreateView(t)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this._getInjector()})}}_getInjector(){return this.ngTemplateOutletInjector==="outlet"?this.injector:this.ngTemplateOutletInjector??void 0}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(t,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||n)(Gt(yu))};static \u0275dir=Gn({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[hu]})}return n})();function RR(n,e){return new Xe(2100,!1)}var Oc=(()=>{class n{_locale;constructor(t){this._locale=t}transform(t,i,r){if(!rj(t))return null;r||=this._locale;try{let o=oj(t);return OR(o,r,i)}catch(o){throw RR(n,o.message)}}static \u0275fac=function(i){return new(i||n)(Gt(Jh,16))};static \u0275pipe=j0({name:"number",type:n,pure:!0})}return n})();function rj(n){return!(n==null||n===""||n!==n)}function oj(n){if(typeof n=="string"&&!isNaN(Number(n)-parseFloat(n)))return Number(n);if(typeof n!="number")throw new Xe(2309,!1);return n}var _w=(()=>{class n{transform(t,i,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw RR(n,t);return t.slice(i,r)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=j0({name:"slice",type:n,pure:!1})}return n})();var Xt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=sa({type:n});static \u0275inj=ls({})}return n})();function ip(n,e){e=encodeURIComponent(e);for(let t of n.split(";")){let i=t.indexOf("="),[r,o]=i==-1?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var Rc=class{};var kR="browser";var op=class{_doc;constructor(e){this._doc=e}manager},ov=(()=>{class n extends op{constructor(t){super(t)}supports(t){return!0}addEventListener(t,i,r,o){return t.addEventListener(i,r,o),()=>this.removeEventListener(t,i,r,o)}removeEventListener(t,i,r,o){return t.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||n)(Ye(Cn))};static \u0275prov=_e({token:n,factory:n.\u0275fac})}return n})(),lv=new $e(""),Ew=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(t,i){this._zone=i,t.forEach(s=>{s.manager=this});let r=t.filter(s=>!(s instanceof ov));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof ov);o&&this._plugins.push(o)}addEventListener(t,i,r,o){return this._findPluginFor(i).addEventListener(t,i,r,o)}getZone(){return this._zone}_findPluginFor(t){let i=this._eventNameToPlugin.get(t);if(i)return i;if(i=this._plugins.find(o=>o.supports(t)),!i)throw new Xe(5101,!1);return this._eventNameToPlugin.set(t,i),i}static \u0275fac=function(i){return new(i||n)(Ye(lv),Ye(rr))};static \u0275prov=_e({token:n,factory:n.\u0275fac})}return n})(),Sw="ng-app-id";function FR(n){for(let e of n)e.remove()}function NR(n,e){let t=e.createElement("style");return t.textContent=n,t}function aj(n,e,t,i){let r=n.head?.querySelectorAll(`style[${Sw}="${e}"],link[${Sw}="${e}"]`);if(r)for(let o of r)o.removeAttribute(Sw),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&t.set(o.textContent,{usage:0,elements:[o]})}function ww(n,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",n),t}var Mw=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(t,i,r,o={}){this.doc=t,this.appId=i,this.nonce=r,aj(t,i,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,i){for(let r of t)this.addUsage(r,this.inline,NR);i?.forEach(r=>this.addUsage(r,this.external,ww))}removeStyles(t,i){for(let r of t)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(t,i,r){let o=i.get(t);o?o.usage++:i.set(t,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(t,this.doc)))})}removeUsage(t,i){let r=i.get(t);r&&(r.usage--,r.usage<=0&&(FR(r.elements),i.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])FR(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(t,NR(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(t,ww(i,this.doc)))}removeHost(t){this.hosts.delete(t)}addElement(t,i){return this.nonce&&i.setAttribute("nonce",this.nonce),t.appendChild(i)}static \u0275fac=function(i){return new(i||n)(Ye(Cn),Ye(bs),Ye(x0,8),Ye(Vh))};static \u0275prov=_e({token:n,factory:n.\u0275fac})}return n})(),Cw={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Tw=/%COMP%/g;var UR="%COMP%",lj=`_nghost-${UR}`,cj=`_ngcontent-${UR}`,dj=!0,uj=new $e("",{factory:()=>dj});function fj(n){return cj.replace(Tw,n)}function hj(n){return lj.replace(Tw,n)}function BR(n,e){return e.map(t=>t.replace(Tw,n))}var Dw=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(t,i,r,o,s,a,l=null,c=null){this.eventManager=t,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=c,this.defaultRenderer=new sp(t,s,a,this.tracingService)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,i);return r instanceof av?r.applyToHost(t):r instanceof ap&&r.applyStyles(),r}getOrCreateRenderer(t,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.tracingService;switch(i.encapsulation){case To.Emulated:o=new av(l,c,i,this.appId,d,s,a,u);break;case To.ShadowDom:return new sv(l,t,i,s,a,this.nonce,u,c);case To.ExperimentalIsolatedShadowDom:return new sv(l,t,i,s,a,this.nonce,u);default:o=new ap(l,c,i,d,s,a,u);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(t){this.rendererByCompId.delete(t)}static \u0275fac=function(i){return new(i||n)(Ye(Ew),Ye(Mw),Ye(bs),Ye(uj),Ye(Cn),Ye(rr),Ye(x0),Ye(oa,8))};static \u0275prov=_e({token:n,factory:n.\u0275fac})}return n})(),sp=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(e,t,i,r){this.eventManager=e,this.doc=t,this.ngZone=i,this.tracingService=r}destroy(){}destroyNode=null;createElement(e,t){return t?this.doc.createElementNS(Cw[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(LR(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(LR(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){t.remove()}selectRootElement(e,t){let i=typeof e=="string"?this.doc.querySelector(e):e;if(!i)throw new Xe(-5104,!1);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;let o=Cw[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){let r=Cw[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(vs.DashCase|vs.Important)?e.style.setProperty(t,i,r&vs.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&vs.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e!=null&&(e[t]=i)}setValue(e,t){e.nodeValue=t}listen(e,t,i,r){if(typeof e=="string"&&(e=so().getGlobalEventTarget(this.doc,e),!e))throw new Xe(5102,!1);let o=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(e,t,o)),this.eventManager.addEventListener(e,t,o,r)}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;e(t)===!1&&t.preventDefault()}}};function LR(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var sv=class extends sp{hostEl;sharedStylesHost;shadowRoot;constructor(e,t,i,r,o,s,a,l){super(e,r,o,a),this.hostEl=t,this.sharedStylesHost=l,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let c=i.styles;c=BR(i.id,c);for(let u of c){let f=document.createElement("style");s&&f.setAttribute("nonce",s),f.textContent=u,this.shadowRoot.appendChild(f)}let d=i.getExternalStyles?.();if(d)for(let u of d){let f=ww(u,r);s&&f.setAttribute("nonce",s),this.shadowRoot.appendChild(f)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},ap=class extends sp{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(e,t,i,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r;let c=i.styles;this.styles=l?BR(l,c):c,this.styleUrls=i.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Xa.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},av=class extends ap{contentAttr;hostAttr;constructor(e,t,i,r,o,s,a,l){let c=r+"-"+i.id;super(e,t,i,o,s,a,l,c),this.contentAttr=fj(c),this.hostAttr=hj(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}};var cv=class n extends tp{supportsDOMEvents=!0;static makeCurrent(){mw(new n)}onAndCancel(e,t,i,r){return e.addEventListener(t,i,r),()=>{e.removeEventListener(t,i,r)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=pj();return t==null?null:mj(t)}resetBaseElement(){lp=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ip(document.cookie,e)}},lp=null;function pj(){return lp=lp||document.head.querySelector("base"),lp?lp.getAttribute("href"):null}function mj(n){return new URL(n,document.baseURI).pathname}var gj=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac})}return n})(),zR=["alt","control","meta","shift"],vj={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},bj={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},VR=(()=>{class n extends op{constructor(t){super(t)}supports(t){return n.parseEventName(t)!=null}addEventListener(t,i,r,o){let s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>so().onAndCancel(t,s.domEventName,a,o))}static parseEventName(t){let i=t.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let o=n._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),zR.forEach(c=>{let d=i.indexOf(c);d>-1&&(i.splice(d,1),s+=c+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(t,i){let r=vj[t.key]||t.key,o="";return i.indexOf("code.")>-1&&(r=t.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),zR.forEach(s=>{if(s!==r){let a=bj[s];a(t)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(t,i,r){return o=>{n.matchEventFullKeyCode(o,t)&&r.runGuarded(()=>i(o))}}static _normalizeKey(t){return t==="esc"?"escape":t}static \u0275fac=function(i){return new(i||n)(Ye(Cn))};static \u0275prov=_e({token:n,factory:n.\u0275fac})}return n})();async function Iw(n,e){return ER(yj(n,e))}function yj(n,e){return{platformRef:e?.platformRef,appProviders:[...wj,...n?.providers??[]],platformProviders:Cj}}function xj(){cv.makeCurrent()}function _j(){return new Zr}function Sj(){return iC(document),document}var Cj=[{provide:Vh,useValue:kR},{provide:y0,useValue:xj,multi:!0},{provide:Cn,useFactory:Sj}];var wj=[{provide:Sh,useValue:"root"},{provide:Zr,useFactory:_j},{provide:lv,useClass:ov,multi:!0},{provide:lv,useClass:VR,multi:!0},Dw,Mw,Ew,{provide:Ec,useExisting:Dw},{provide:Rc,useClass:gj},[]];var lo=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
|
|
5
|
-
`).forEach(t=>{let i=t.indexOf(":");if(i>0){let r=t.slice(0,i),o=t.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,i)=>{this.addHeaderEntry(i,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{this.setHeaderEntries(t,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new n;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(e,t){let i=e.toLowerCase();this.maybeSetNormalizedName(e,i),this.headers.has(i)?this.headers.get(i).push(t):this.headers.set(i,[t])}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var uv=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},fv=class{encodeKey(e){return GR(e)}encodeValue(e){return GR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ej(n,e){let t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var Mj=/%(\d[a-f0-9])/gi,Tj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function GR(n){return encodeURIComponent(n).replace(Mj,(e,t)=>Tj[t]??e)}function dv(n){return`${n}`}var ao=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new fv,e.fromString){if(e.fromObject)throw new Xe(2805,!1);this.map=Ej(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let i=e.fromObject[t],r=Array.isArray(i)?i.map(dv):[dv(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new n({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(dv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let i=this.map.get(e.param)||[],r=i.indexOf(dv(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function Dj(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function HR(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function jR(n){return typeof Blob<"u"&&n instanceof Blob}function WR(n){return typeof FormData<"u"&&n instanceof FormData}function Ij(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var $R="Content-Type",XR="Accept",YR="text/plain",qR="application/json",Pj=`${qR}, ${YR}, */*`,Mu=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,i,r){this.url=t,this.method=e.toUpperCase();let o;if(Dj(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Xe(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new lo,this.context??=new uv,!this.params)this.params=new ao,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||HR(this.body)||jR(this.body)||WR(this.body)||Ij(this.body)?this.body:this.body instanceof ao?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||WR(this.body)?null:jR(this.body)?this.body.type||null:HR(this.body)?null:typeof this.body=="string"?YR:this.body instanceof ao?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?qR:null}clone(e={}){let t=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new n(t,i,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},kc=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(kc||{}),Tu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,i="OK"){this.headers=e.headers||new lo,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},hv=class n extends Tu{constructor(e={}){super(e)}type=kc.ResponseHeader;clone(e={}){return new n({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Du=class n extends Tu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=kc.Response;clone(e={}){return new n({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},el=class extends Tu{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},Aj=200,Oj=204;var Rj=new $e("");var kj=/^\)\]\}',?\n/;var Aw=(()=>{class n{xhrFactory;tracingService=Z(oa,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new Xe(-2800,!1);let i=this.xhrFactory;return os(null).pipe(tS(()=>new wn(o=>{let s=i.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(XR)||s.setRequestHeader(XR,Pj),!t.headers.has($R)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader($R,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new lo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new hv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==Oj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Aj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(kj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new Du({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new el({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new el({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new el({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:kc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:kc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:kc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(Ye(Rc))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Fj(n,e){return e(n)}function Nj(n,e,t){return(i,r)=>Kd(t,()=>e(i,o=>n(o,r)))}var Ow=new $e("",{factory:()=>[]}),Rw=new $e(""),KR=new $e("",{factory:()=>!0});var kw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(Aw),r},providedIn:"root"})}return n})();var pv=(()=>{class n{backend;injector;chain=null;pendingTasks=Z(iu);contributeToStability=Z(KR);constructor(t,i){this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(Ow),...this.injector.get(Rw,[])]));this.chain=i.reduceRight((r,o)=>Nj(r,o,this.injector),Fj)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(fh(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(Ye(kw),Ye(Ei))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Fw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(pv),r},providedIn:"root"})}return n})();function Pw(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer,referrerPolicy:n.referrerPolicy}}var mv=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof Mu)o=t;else{let l;r.headers instanceof lo?l=r.headers:l=new lo(r.headers);let c;r.params&&(r.params instanceof ao?c=r.params:c=new ao({fromObject:r.params})),o=new Mu(t,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=os(o).pipe(eS(l=>this.handler.handle(l)));if(t instanceof Mu||r.observe==="events")return s;let a=s.pipe(Q_(l=>l instanceof Du));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ir(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Xe(2806,!1);return l.body}));case"blob":return a.pipe(ir(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Xe(2807,!1);return l.body}));case"text":return a.pipe(ir(l=>{if(l.body!==null&&typeof l.body!="string")throw new Xe(2808,!1);return l.body}));default:return a.pipe(ir(l=>l.body))}case"response":return a;default:throw new Xe(2809,!1)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:new ao().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,Pw(r,i))}post(t,i,r={}){return this.request("POST",t,Pw(r,i))}put(t,i,r={}){return this.request("PUT",t,Pw(r,i))}static \u0275fac=function(i){return new(i||n)(Ye(Fw))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Lj=new $e("",{factory:()=>!0}),Uj="XSRF-TOKEN",Bj=new $e("",{factory:()=>Uj}),zj="X-XSRF-TOKEN",Vj=new $e("",{factory:()=>zj}),Gj=(()=>{class n{cookieName=Z(Bj);doc=Z(Cn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ip(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ZR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(Gj),r},providedIn:"root"})}return n})();function Hj(n,e){if(!Z(Lj)||n.method==="GET"||n.method==="HEAD")return e(n);try{let r=Z(iv).href,{origin:o}=new URL(r),{origin:s}=new URL(n.url,o);if(o!==s)return e(n)}catch{return e(n)}let t=Z(ZR).getToken(),i=Z(Vj);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var Nw=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(Nw||{});function jj(n,e){return{\u0275kind:n,\u0275providers:e}}function Lw(...n){let e=[mv,pv,{provide:Fw,useExisting:pv},{provide:kw,useFactory:()=>Z(Rj,{optional:!0})??Z(Aw)},{provide:Ow,useValue:Hj,multi:!0}];for(let t of n)e.push(...t.\u0275providers);return Zs(e)}function Uw(n){return jj(Nw.Interceptors,n.map(e=>({provide:Ow,useValue:e,multi:!0})))}var Wj=new $e(""),$j="b",Xj="h",Yj="s",qj="st",Kj="u",Zj="rt",Bw=new $e(""),Jj=["GET","HEAD"];function Qj(n,e){let h=Z(Bw),{isCacheActive:t}=h,i=Qt(h,["isCacheActive"]),{transferCache:r,method:o}=n;if(!t||r===!1||o==="POST"&&!i.includePostRequests&&!r||o!=="POST"&&!Jj.includes(o)||!i.includeRequestsWithAuthHeaders&&eW(n)||i.filter?.(n)===!1)return e(n);let s=Z(mu);if(Z(Wj,{optional:!0}))throw new Xe(2803,!1);let l=n.url,c=tW(n,l),d=s.get(c,null),u=i.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(u=r.includeHeaders),d){let{[$j]:p,[Zj]:v,[Xj]:g,[Yj]:m,[qj]:b,[Kj]:y}=d,x=p;switch(v){case"arraybuffer":x=QR(p);break;case"blob":x=new Blob([QR(p)]);break}let _=new lo(g);return os(new Du({body:x,headers:_,status:m,statusText:b,url:y}))}return e(n)}function eW(n){return n.headers.has("authorization")||n.headers.has("proxy-authorization")}function JR(n){return[...n.keys()].sort().map(e=>`${e}=${n.getAll(e)}`).join("&")}function tW(n,e){let{params:t,method:i,responseType:r}=n,o=JR(t),s=n.serializeBody();s instanceof URLSearchParams?s=JR(s):typeof s!="string"&&(s="");let a=[i,r,e,s,o].join("|"),l=nW(a);return l}function nW(n){let e=0;for(let t of n)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function QR(n){let e=atob(n);return Uint8Array.from(e,i=>i.charCodeAt(0)).buffer}function ek(n){return[{provide:Bw,useFactory:()=>(Po("NgHttpTransferCache"),R({isCacheActive:!0},n))},{provide:Rw,useValue:Qj,multi:!0},{provide:Su,multi:!0,useFactory:()=>{let e=Z(Ir),t=Z(Bw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var cp=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(iW),r},providedIn:"root"})}return n})(),iW=(()=>{class n extends cp{_doc;constructor(t){super(),this._doc=t}sanitize(t,i){if(i==null)return null;switch(t){case Io.NONE:return i;case Io.HTML:return ia(i,"HTML")?Do(i):M0(this._doc,String(i)).toString();case Io.STYLE:return ia(i,"Style")?Do(i):i;case Io.SCRIPT:if(ia(i,"Script"))return Do(i);throw new Xe(5200,!1);case Io.URL:return ia(i,"URL")?Do(i):Wh(String(i));case Io.RESOURCE_URL:if(ia(i,"ResourceURL"))return Do(i);throw new Xe(5201,!1);default:throw new Xe(5202,!1)}}bypassSecurityTrustHtml(t){return pC(t)}bypassSecurityTrustStyle(t){return mC(t)}bypassSecurityTrustScript(t){return gC(t)}bypassSecurityTrustUrl(t){return vC(t)}bypassSecurityTrustResourceUrl(t){return bC(t)}static \u0275fac=function(i){return new(i||n)(Ye(Cn))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),gv=(function(n){return n[n.NoHttpTransferCache=0]="NoHttpTransferCache",n[n.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",n[n.I18nSupport=2]="I18nSupport",n[n.EventReplay=3]="EventReplay",n[n.IncrementalHydration=4]="IncrementalHydration",n})(gv||{});function rW(n,e=[],t={}){return{\u0275kind:n,\u0275providers:e}}function tk(){return rW(gv.EventReplay,CR())}function nk(...n){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of n)t.add(o),r.length&&e.push(r);let i=t.has(gv.HttpTransferCacheOptions);return Zs([[],[],wR(),t.has(gv.NoHttpTransferCache)||i?[]:ek({}),e])}var Iu=class n{loadingCount=F(0);isLoading=Pe(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};function vv(n){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!n)return"Unhandled error";let t=n?.error,i=e(t?.errors);if(i)return i;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(n)&&n.length>0)return e(n)||"Unhandled error";let o=e(n?.messages);if(o)return o;if(typeof n?.messages=="string"&&n.messages.trim())return n.messages;if(typeof n?.message=="string"&&n.message.trim())return n.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return n?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var aa=class n{toastsSignal=F([]);toasts=Pe(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(i=>i.id!==e))}pushToast(e,t,i){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:i,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${i}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var dp=class n{constructor(e){this.toasterService=e}handleError(e){e instanceof el&&this.showError(e)}showError(e){return this.toasterService.showError(vv(e)),Na(()=>e)}static \u0275fac=function(t){return new(t||n)(Ye(aa))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var ik=(n,e)=>{let t=Z(dp),i=Z(Iu),r=n.headers.has("skipHandleError"),o=n.headers.get("Loader")==="true";return o&&i.show(),e(n).pipe(lc(s=>(r||t.handleError(s),r?os(null):Na(()=>s))),fh(()=>{o&&i.hide()}))};var rk=[ik];var ok={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var bv=new $e("ENV"),Jbe=new $e("LOADER_DELAY");var sk={provide:bv,useValue:ok};function ak(){return[e1(),nk(tk()),Lw(Uw(rk)),sk,Iu]}var vk=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,i){this._renderer=t,this._elementRef=i}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(i){return new(i||n)(Gt(ys),Gt(ar))};static \u0275dir=Gn({type:n})}return n})(),gp=(()=>{class n extends vk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,features:[Dr]})}return n})(),tl=new $e(""),aW={provide:tl,useExisting:Bi(()=>Ww),multi:!0},Ww=(()=>{class n extends gp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[oo([aW]),Dr]})}return n})(),lW={provide:tl,useExisting:Bi(()=>Ou),multi:!0};function cW(){let n=so()?so().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var dW=new $e(""),Ou=(()=>{class n extends vk{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!cW())}writeValue(t){let i=t??"";this.setProperty("value",i)}_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 \u0275fac=function(i){return new(i||n)(Gt(ys),Gt(ar),Gt(dW,8))};static \u0275dir=Gn({type:n,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(i,r){i&1&&ie("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[oo([lW]),Dr]})}return n})();var $w=new $e(""),uW=new $e("");function fW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<n?{min:{min:n,actual:e.value}}:null}}function hW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}function lk(n){return null}function bk(n){return n!=null}function yk(n){return _u(n)?uh(n):n}function xk(n){let e={};return n.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function _k(n,e){return e.map(t=>t(n))}function pW(n){return!n.validate}function Sk(n){return n.map(e=>pW(e)?e:t=>e.validate(t))}function mW(n){if(!n)return null;let e=n.filter(bk);return e.length==0?null:function(t){return xk(_k(t,e))}}function Ck(n){return n!=null?mW(Sk(n)):null}function gW(n){if(!n)return null;let e=n.filter(bk);return e.length==0?null:function(t){let i=_k(t,e).map(yk);return J_(i).pipe(ir(xk))}}function wk(n){return n!=null?gW(Sk(n)):null}function ck(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function vW(n){return n._rawValidators}function bW(n){return n._rawAsyncValidators}function zw(n){return n?Array.isArray(n)?n:[n]:[]}function xv(n,e){return Array.isArray(n)?n.includes(e):n===e}function dk(n,e){let t=zw(e);return zw(n).forEach(r=>{xv(t,r)||t.push(r)}),t}function uk(n,e){return zw(e).filter(t=>!xv(n,t))}var _v=class{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}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Ck(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=wk(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Vw=class extends _v{name;get formDirective(){return null}get path(){return null}},mp=class extends _v{_parent=null;name=null;valueAccessor=null},Gw=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var nl=(()=>{class n extends Gw{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(Gt(mp,2))};static \u0275dir=Gn({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&dt("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)},standalone:!1,features:[Dr]})}return n})();var up="VALID",yv="INVALID",Pu="PENDING",fp="DISABLED",Fc=class{},Sv=class extends Fc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},hp=class extends Fc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},pp=class extends Fc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Au=class extends Fc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Hw=class extends Fc{source;constructor(e){super(),this.source=e}};function yW(n){return(Cv(n)?n.validators:n)||null}function xW(n){return Array.isArray(n)?Ck(n):n||null}function _W(n,e){return(Cv(e)?e.asyncValidators:n)||null}function SW(n){return Array.isArray(n)?wk(n):n||null}function Cv(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var jw=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return En(this.statusReactive)}set status(e){En(()=>this.statusReactive.set(e))}_status=Pe(()=>this.statusReactive());statusReactive=F(void 0);get valid(){return this.status===up}get invalid(){return this.status===yv}get pending(){return this.status==Pu}get disabled(){return this.status===fp}get enabled(){return this.status!==fp}errors;get pristine(){return En(this.pristineReactive)}set pristine(e){En(()=>this.pristineReactive.set(e))}_pristine=Pe(()=>this.pristineReactive());pristineReactive=F(!0);get dirty(){return!this.pristine}get touched(){return En(this.touchedReactive)}set touched(e){En(()=>this.touchedReactive.set(e))}_touched=Pe(()=>this.touchedReactive());touchedReactive=F(!1);get untouched(){return!this.touched}_events=new Co;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(dk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(dk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(uk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(uk(e,this._rawAsyncValidators))}hasValidator(e){return xv(this._rawValidators,e)}hasAsyncValidator(e){return xv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new pp(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),e.onlySelf||this._parent?._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new pp(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new hp(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new hp(!0,i))}markAsPending(e={}){this.status=Pu;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Au(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Sv(this.value,i)),this._events.next(new Au(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=up,this._forEachChild(i=>{i.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===up||this.status===Pu)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Sv(this.value,t)),this._events.next(new Au(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?fp:up}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Pu,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=yk(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i?.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new Au(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?fp:this.errors?yv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Pu)?Pu:this._anyControlsHaveStatus(yv)?yv:up}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new hp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new pp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Cv(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=xW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=SW(this._rawAsyncValidators)}};var Ek=new $e("",{factory:()=>Xw}),Xw="always";function CW(n,e){return[...e.path,n]}function wW(n,e,t=Xw){MW(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),TW(n,e),IW(n,e),DW(n,e),EW(n,e)}function fk(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function EW(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function MW(n,e){let t=vW(n);e.validator!==null?n.setValidators(ck(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=bW(n);e.asyncValidator!==null?n.setAsyncValidators(ck(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();fk(e._rawValidators,r),fk(e._rawAsyncValidators,r)}function TW(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Mk(n,e)})}function DW(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Mk(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function Mk(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function IW(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function PW(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function AW(n){return Object.getPrototypeOf(n.constructor)===gp}function OW(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===Ou?t=o:AW(o)?i=o:r=o}),r||i||t||null}function hk(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function pk(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var RW=class extends jw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(yW(t),_W(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Cv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(pk(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new Hw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){hk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){hk(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){pk(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var kW={provide:mp,useExisting:Bi(()=>la)},mk=Promise.resolve(),la=(()=>{class n extends mp{_changeDetectorRef;callSetDisabledState;control=new RW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;constructor(t,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=OW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),PW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){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&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){wW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){mk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&nv(i);mk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?CW(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(Gt(Vw,9),Gt($w,10),Gt(uW,10),Gt(tl,10),Gt(tv,8),Gt(Ek,8))};static \u0275dir=Gn({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[oo([kW]),Dr,hu]})}return n})();var FW={provide:tl,useExisting:Bi(()=>vp),multi:!0},vp=(()=>{class n extends gp{writeValue(t){let i=t??"";this.setProperty("value",i)}registerOnChange(t){this.onChange=i=>{t(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[oo([FW]),Dr]})}return n})();var NW={provide:tl,useExisting:Bi(()=>wv),multi:!0};function Tk(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function LW(n){return n.split(":")[0]}var wv=(()=>{class n extends gp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Ir).injector;destroyRef=Z(sr);cdr=Z(tv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,P0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let i=this._getOptionId(t),r=Tk(i,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){let i=LW(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[oo([NW]),Dr]})}return n})(),Dk=(()=>{class n{_element;_renderer;_select;id;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(Tk(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(i){return new(i||n)(Gt(ar),Gt(ys),Gt(wv,9))};static \u0275dir=Gn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),UW={provide:tl,useExisting:Bi(()=>Ik),multi:!0};function gk(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function BW(n){return n.split(":")[0]}var Ik=(()=>{class n extends gp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let i;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=i.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){let i=BW(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[oo([UW]),Dr]})}return n})(),Pk=(()=>{class n{_element;_renderer;_select;id;_value;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(gk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(gk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(Gt(ar),Gt(ys),Gt(Ik,9))};static \u0275dir=Gn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function Ak(n){return typeof n=="number"?n:parseFloat(n)}var Ok=(()=>{class n{_validator=lk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):lk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Gn({type:n,features:[hu]})}return n})(),zW={provide:$w,useExisting:Bi(()=>bp),multi:!0},bp=(()=>{class n extends Ok{max;inputName="max";normalizeInput=t=>Ak(t);createValidator=t=>hW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&An("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[oo([zW]),Dr]})}return n})(),VW={provide:$w,useExisting:Bi(()=>yp),multi:!0},yp=(()=>{class n extends Ok{min;inputName="min";normalizeInput=t=>Ak(t);createValidator=t=>fW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&An("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[oo([VW]),Dr]})}return n})();var GW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=sa({type:n});static \u0275inj=ls({})}return n})();var co=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Ek,useValue:t.callSetDisabledState??Xw}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=sa({type:n});static \u0275inj=ls({imports:[GW]})}return n})();var bl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},yl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},aF=0,IE=1,lF=2;var jp=1,cF=2,df=3,Fo=0,qi=1,Ms=2,Ts=0,Vc=1,PE=2,AE=3,OE=4,dF=5,dl=100,uF=101,fF=102,hF=103,pF=104,mF=200,gF=201,vF=202,bF=203,qv=204,Kv=205,yF=206,xF=207,_F=208,SF=209,CF=210,wF=211,EF=212,MF=213,TF=214,_b=0,Sb=1,Cb=2,Gc=3,wb=4,Eb=5,Mb=6,Tb=7,Db=0,DF=1,IF=2,Lo=0,RE=1,kE=2,FE=3,Zc=4,NE=5,LE=6,UE=7;var vE=300,xl=301,Jc=302,Ib=303,Pb=304,Wp=306,qu=1e3,Pi=1001,Zv=1002,ui=1003,PF=1004;var $p=1005;var Wn=1006,Ab=1007;var po=1008;var lr=1009,BE=1010,zE=1011,uf=1012,Ob=1013,Uo=1014,Bo=1015,Ds=1016,Rb=1017,kb=1018,ff=1020,VE=35902,GE=35899,HE=1021,jE=1022,mo=1023,ws=1026,_l=1027,WE=1028,Fb=1029,Qc=1030,Nb=1031;var Lb=1033,Xp=33776,Yp=33777,qp=33778,Kp=33779,Ub=35840,Bb=35841,zb=35842,Vb=35843,Gb=36196,Hb=37492,jb=37496,Wb=37488,$b=37489,Xb=37490,Yb=37491,qb=37808,Kb=37809,Zb=37810,Jb=37811,Qb=37812,ey=37813,ty=37814,ny=37815,iy=37816,ry=37817,oy=37818,sy=37819,ay=37820,ly=37821,cy=36492,dy=36494,uy=36495,fy=36283,hy=36284,py=36285,my=36286;var Tp=2300,Jv=2301,Yv=2302,bE=2400,yE=2401,xE=2402;var AF=3200;var $E=0,OF=1,ya="",vn="srgb",Hc="srgb-linear",Dp="linear",on="srgb";var zc=7680;var _E=519,RF=512,kF=513,FF=514,gy=515,NF=516,LF=517,vy=518,UF=519,SE=35044;var XE="300 es",ko=2e3,Ip=2001;function YE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function HW(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Ku(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function BF(){let n=Ku("canvas");return n.style.display="block",n}var Rk={},Zu=null;function qE(...n){let e="THREE."+n.shift();Zu?Zu("log",e,...n):console.log(e,...n)}function ft(...n){let e="THREE."+n.shift();Zu?Zu("warn",e,...n):console.warn(e,...n)}function mt(...n){let e="THREE."+n.shift();Zu?Zu("error",e,...n):console.error(e,...n)}function Ju(...n){let e=n.join(" ");e in Rk||(Rk[e]=!0,ft(...n))}function zF(n,e,t){return new Promise(function(i,r){function o(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:i()}}setTimeout(o,t)})}var Es=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){let i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){let i=this._listeners;if(i===void 0)return;let r=i[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let i=t[e.type];if(i!==void 0){e.target=this;let r=i.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Di=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],kk=1234567,Ep=Math.PI/180,Qu=180/Math.PI;function hf(){let n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Di[n&255]+Di[n>>8&255]+Di[n>>16&255]+Di[n>>24&255]+"-"+Di[e&255]+Di[e>>8&255]+"-"+Di[e>>16&15|64]+Di[e>>24&255]+"-"+Di[t&63|128]+Di[t>>8&255]+"-"+Di[t>>16&255]+Di[t>>24&255]+Di[i&255]+Di[i>>8&255]+Di[i>>16&255]+Di[i>>24&255]).toLowerCase()}function Vt(n,e,t){return Math.max(e,Math.min(t,n))}function KE(n,e){return(n%e+e)%e}function jW(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function WW(n,e,t){return n!==e?(t-n)/(e-n):0}function Mp(n,e,t){return(1-t)*n+t*e}function $W(n,e,t,i){return Mp(n,e,1-Math.exp(-t*i))}function XW(n,e=1){return e-Math.abs(KE(n,e*2)-e)}function YW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function qW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function KW(n,e){return n+Math.floor(Math.random()*(e-n+1))}function ZW(n,e){return n+Math.random()*(e-n)}function JW(n){return n*(.5-Math.random())}function QW(n){n!==void 0&&(kk=n);let e=kk+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function e9(n){return n*Ep}function t9(n){return n*Qu}function n9(n){return(n&n-1)===0&&n!==0}function i9(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function r9(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function o9(n,e,t,i,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+i)/2),d=s((e+i)/2),u=o((e-i)/2),f=s((e-i)/2),h=o((i-e)/2),p=s((i-e)/2);switch(r){case"XYX":n.set(a*d,l*u,l*f,a*c);break;case"YZY":n.set(l*f,a*d,l*u,a*c);break;case"ZXZ":n.set(l*u,l*f,a*d,a*c);break;case"XZX":n.set(a*d,l*p,l*h,a*c);break;case"YXY":n.set(l*h,a*d,l*p,a*c);break;case"ZYZ":n.set(l*p,l*h,a*d,a*c);break;default:ft("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function $u(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Wi(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}var nn={DEG2RAD:Ep,RAD2DEG:Qu,generateUUID:hf,clamp:Vt,euclideanModulo:KE,mapLinear:jW,inverseLerp:WW,lerp:Mp,damp:$W,pingpong:XW,smoothstep:YW,smootherstep:qW,randInt:KW,randFloat:ZW,randFloatSpread:JW,seededRandom:QW,degToRad:e9,radToDeg:t9,isPowerOfTwo:n9,ceilPowerOfTwo:i9,floorPowerOfTwo:r9,setQuaternionFromProperEuler:o9,normalize:Wi,denormalize:$u},gt=class n{constructor(e=0,t=0){n.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Vt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Vt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*i-s*r+e.x,this.y=o*r+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},ho=class{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,o,s,a){let l=i[r+0],c=i[r+1],d=i[r+2],u=i[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,i,r,o,s){let a=i[r],l=i[r+1],c=i[r+2],d=i[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let i=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(i/2),d=a(r/2),u=a(o/2),f=l(i/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ft("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=i+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(i>a&&i>u){let h=2*Math.sqrt(1+i-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-i-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-i-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vt(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=i*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-i*c,this._z=o*d+s*c+i*l-r*a,this._w=s*d-i*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let i=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(i=-i,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),o=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},V=class n{constructor(e=0,t=0,i=0){n.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Fk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Fk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*i+o[6]*r,this.y=o[1]*t+o[4]*i+o[7]*r,this.z=o[2]*t+o[5]*i+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*i+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*i+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*i+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*i+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*i),d=2*(a*t-o*r),u=2*(o*i-s*t);return this.x=t+l*c+s*u-a*d,this.y=i+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r,this.y=o[1]*t+o[5]*i+o[9]*r,this.z=o[2]*t+o[6]*i+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Vt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-i*l,this.z=i*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Yw.copy(this).projectOnVector(e),this.sub(Yw)}reflect(e){return this.sub(Yw.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Vt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Yw=new V,Fk=new ho,At=class n{constructor(e,t,i,r,o,s,a,l,c){n.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c)}set(e,t,i,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=i,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[3],l=i[6],c=i[1],d=i[4],u=i[7],f=i[2],h=i[5],p=i[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-i*o*d+i*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+i*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*i)*v,e[2]=(a*i-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(i*l-c*t)*v,e[8]=(s*t-i*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(i*l,i*c,-i*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(qw.makeScale(e,t)),this}rotate(e){return this.premultiply(qw.makeRotation(-e)),this}translate(e,t){return this.premultiply(qw.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}},qw=new At,Nk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Lk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function s9(){let n={enabled:!0,workingColorSpace:Hc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ga(r.r),r.g=ga(r.g),r.b=ga(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===on&&(r.r=Xu(r.r),r.g=Xu(r.g),r.b=Xu(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===ya?Dp:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return Ju("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Ju("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Hc]:{primaries:e,whitePoint:i,transfer:Dp,toXYZ:Nk,fromXYZ:Lk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:vn},outputColorSpaceConfig:{drawingBufferColorSpace:vn}},[vn]:{primaries:e,whitePoint:i,transfer:on,toXYZ:Nk,fromXYZ:Lk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:vn}}}),n}var zt=s9();function ga(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Xu(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var Ru,Qv=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Ru===void 0&&(Ru=Ku("canvas")),Ru.width=e.width,Ru.height=e.height;let r=Ru.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=Ru}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=Ku("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let r=i.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=ga(o[s]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(ga(t[i]/255)*255):t[i]=ga(t[i]);return{data:t,width:e.width,height:e.height}}else return ft("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},a9=0,ef=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:a9++}),this.uuid=hf(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(Kw(r[s].image)):o.push(Kw(r[s]))}else o=Kw(r);i.url=o}return t||(e.images[this.uuid]=i),i}};function Kw(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?Qv.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(ft("Texture: Unable to serialize Texture."),{})}var l9=0,Zw=new V,zo=(()=>{class n extends Es{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=Pi,o=Pi,s=Wn,a=po,l=mo,c=lr,d=n.DEFAULT_ANISOTROPY,u=ya){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:l9++}),this.uuid=hf(),this.name="",this.source=new ef(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new gt(0,0),this.repeat=new gt(1,1),this.center=new gt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Zw).x}get height(){return this.source.getSize(Zw).y}get depth(){return this.source.getSize(Zw).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let i in t){let r=t[i];if(r===void 0){ft(`Texture.setValues(): parameter '${i}' has value of undefined.`);continue}let o=this[i];if(o===void 0){ft(`Texture.setValues(): property '${i}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[i]=r}}toJSON(t){let i=t===void 0||typeof t=="string";if(!i&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),i||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==vE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case qu:t.x=t.x-Math.floor(t.x);break;case Pi:t.x=t.x<0?0:1;break;case Zv:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case qu:t.y=t.y-Math.floor(t.y);break;case Pi:t.y=t.y<0?0:1;break;case Zv:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return n.DEFAULT_IMAGE=null,n.DEFAULT_MAPPING=vE,n.DEFAULT_ANISOTROPY=1,n})(),On=class n{constructor(e=0,t=0,i=0,r=1){n.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*i+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*i+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*i+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,O=(p+g)/4;return y>x&&y>_?y<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(y),r=E/i,o=D/i):x>_?x<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),i=E/r,o=O/r):_<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),i=D/o,r=O/o),this.set(i,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Vt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},eb=class extends Es{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Wn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new On(0,0,e,t),this.scissorTest=!1,this.viewport=new On(0,0,e,t);let r={width:e,height:t,depth:i.depth},o=new zo(r);this.textures=[];let s=i.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}_setTextureOptions(e={}){let t={minFilter:Wn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=i,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t<i;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new ef(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},kr=class extends eb{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}},Pp=class extends zo{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=ui,this.minFilter=ui,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var tb=class extends zo{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=ui,this.minFilter=ui,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var $i=class{constructor(e=new V(1/0,1/0,1/0),t=new V(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(Ao.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Ao.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let i=Ao.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let i=e.geometry;if(i!==void 0){let o=i.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,Ao):Ao.fromBufferAttribute(o,s),Ao.applyMatrix4(e.matrixWorld),this.expandByPoint(Ao);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Mv.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Mv.copy(i.boundingBox)),Mv.applyMatrix4(e.matrixWorld),this.union(Mv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ao),Ao.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(xp),Tv.subVectors(this.max,xp),ku.subVectors(e.a,xp),Fu.subVectors(e.b,xp),Nu.subVectors(e.c,xp),il.subVectors(Fu,ku),rl.subVectors(Nu,Fu),Nc.subVectors(ku,Nu);let t=[0,-il.z,il.y,0,-rl.z,rl.y,0,-Nc.z,Nc.y,il.z,0,-il.x,rl.z,0,-rl.x,Nc.z,0,-Nc.x,-il.y,il.x,0,-rl.y,rl.x,0,-Nc.y,Nc.x,0];return!Jw(t,ku,Fu,Nu,Tv)||(t=[1,0,0,0,1,0,0,0,1],!Jw(t,ku,Fu,Nu,Tv))?!1:(Dv.crossVectors(il,rl),t=[Dv.x,Dv.y,Dv.z],Jw(t,ku,Fu,Nu,Tv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ao).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ao).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ca[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ca[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ca[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ca[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ca[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ca[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ca[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ca[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ca),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},ca=[new V,new V,new V,new V,new V,new V,new V,new V],Ao=new V,Mv=new $i,ku=new V,Fu=new V,Nu=new V,il=new V,rl=new V,Nc=new V,xp=new V,Tv=new V,Dv=new V,Lc=new V;function Jw(n,e,t,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){Lc.fromArray(n,o);let a=r.x*Math.abs(Lc.x)+r.y*Math.abs(Lc.y)+r.z*Math.abs(Lc.z),l=e.dot(Lc),c=t.dot(Lc),d=i.dot(Lc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var c9=new $i,_p=new V,Qw=new V,ul=class{constructor(e=new V,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;t!==void 0?i.copy(t):c9.setFromPoints(e).getCenter(i);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,i.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;_p.subVectors(e,this.center);let t=_p.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(_p,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Qw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_p.copy(e.center).add(Qw)),this.expandByPoint(_p.copy(e.center).sub(Qw))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},da=new V,eE=new V,Iv=new V,ol=new V,tE=new V,Pv=new V,nE=new V,va=class{constructor(e=new V,t=new V(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,da)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=da.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(da.copy(this.origin).addScaledVector(this.direction,t),da.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){eE.copy(e).add(t).multiplyScalar(.5),Iv.copy(t).sub(e).normalize(),ol.copy(this.origin).sub(eE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Iv),a=ol.dot(this.direction),l=-ol.dot(Iv),c=ol.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(eE).addScaledVector(Iv,f),h}intersectSphere(e,t){da.subVectors(e.center,this.origin);let i=da.dot(this.direction),r=da.dot(da)-i*i,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=i-s,l=i+s;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(i=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(i=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),i>s||o>r||((o>i||isNaN(i))&&(i=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,da)!==null}intersectTriangle(e,t,i,r,o){tE.subVectors(t,e),Pv.subVectors(i,e),nE.crossVectors(tE,Pv);let s=this.direction.dot(nE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;ol.subVectors(this.origin,e);let l=a*this.direction.dot(Pv.crossVectors(ol,Pv));if(l<0)return null;let c=a*this.direction.dot(tE.cross(ol));if(c<0||l+c>s)return null;let d=-a*ol.dot(nE);return d<0?null:this.at(d/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Mn=class n{constructor(e,t,i,r,o,s,a,l,c,d,u,f,h,p,v,g){n.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,i,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,m[7]=p,m[11]=v,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new n().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,i=e.elements,r=1/Lu.setFromMatrixColumn(e,0).length(),o=1/Lu.setFromMatrixColumn(e,1).length(),s=1/Lu.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*o,t[5]=i[5]*o,t[6]=i[6]*o,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,r=e.y,o=e.z,s=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(d9,e,u9)}lookAt(e,t,i){let r=this.elements;return Ar.subVectors(e,t),Ar.lengthSq()===0&&(Ar.z=1),Ar.normalize(),sl.crossVectors(i,Ar),sl.lengthSq()===0&&(Math.abs(i.z)===1?Ar.x+=1e-4:Ar.z+=1e-4,Ar.normalize(),sl.crossVectors(i,Ar)),sl.normalize(),Av.crossVectors(Ar,sl),r[0]=sl.x,r[4]=Av.x,r[8]=Ar.x,r[1]=sl.y,r[5]=Av.y,r[9]=Ar.y,r[2]=sl.z,r[6]=Av.z,r[10]=Ar.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[4],l=i[8],c=i[12],d=i[1],u=i[5],f=i[9],h=i[13],p=i[2],v=i[6],g=i[10],m=i[14],b=i[3],y=i[7],x=i[11],_=i[15],E=r[0],D=r[4],O=r[8],S=r[12],I=r[1],L=r[5],H=r[9],G=r[13],X=r[2],Y=r[6],K=r[10],W=r[14],ne=r[3],ye=r[7],xe=r[11],Se=r[15];return o[0]=s*E+a*I+l*X+c*ne,o[4]=s*D+a*L+l*Y+c*ye,o[8]=s*O+a*H+l*K+c*xe,o[12]=s*S+a*G+l*W+c*Se,o[1]=d*E+u*I+f*X+h*ne,o[5]=d*D+u*L+f*Y+h*ye,o[9]=d*O+u*H+f*K+h*xe,o[13]=d*S+u*G+f*W+h*Se,o[2]=p*E+v*I+g*X+m*ne,o[6]=p*D+v*L+g*Y+m*ye,o[10]=p*O+v*H+g*K+m*xe,o[14]=p*S+v*G+g*W+m*Se,o[3]=b*E+y*I+x*X+_*ne,o[7]=b*D+y*L+x*Y+_*ye,o[11]=b*O+y*H+x*K+_*xe,o[15]=b*S+y*G+x*W+_*Se,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-i*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+i*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+i*g*h+u*r*m-i*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-i*g*c-a*r*m+i*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+i*f*c+a*r*h-i*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*i*h+t*v*h+d*i*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*i*c-t*v*c-s*i*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*i*c+t*u*c+s*i*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*i*f-t*v*f-d*i*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*i*l+t*v*l+s*i*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*i*l-t*u*l-s*i*f+t*a*f)*D,this}scale(e){let t=this.elements,i=e.x,r=e.y,o=e.z;return t[0]*=i,t[4]*=r,t[8]*=o,t[1]*=i,t[5]*=r,t[9]*=o,t[2]*=i,t[6]*=r,t[10]*=o,t[3]*=i,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),r=Math.sin(t),o=1-i,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+i,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+i,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,o,s){return this.set(1,i,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=i.x,E=i.y,D=i.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return i.set(1,1,1),t.identity(),this;let o=Lu.set(r[0],r[1],r[2]).length(),s=Lu.set(r[4],r[5],r[6]).length(),a=Lu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Oo.copy(this);let c=1/o,d=1/s,u=1/a;return Oo.elements[0]*=c,Oo.elements[1]*=c,Oo.elements[2]*=c,Oo.elements[4]*=d,Oo.elements[5]*=d,Oo.elements[6]*=d,Oo.elements[8]*=u,Oo.elements[9]*=u,Oo.elements[10]*=u,t.setFromRotationMatrix(Oo),i.x=o,i.y=s,i.z=a,this}makePerspective(e,t,i,r,o,s,a=ko,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(i-r),f=(t+e)/(t-e),h=(i+r)/(i-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===ko)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Ip)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,i,r,o,s,a=ko,l=!1){let c=this.elements,d=2/(t-e),u=2/(i-r),f=-(t+e)/(t-e),h=-(i+r)/(i-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===ko)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Ip)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},Lu=new V,Oo=new Mn,d9=new V(0,0,0),u9=new V(1,1,1),sl=new V,Av=new V,Ar=new V,Uk=new Mn,Bk=new ho,fl=(()=>{class n{constructor(t=0,i=0,r=0,o=n.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,r,o=this._order){return this._x=t,this._y=i,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(i){case"XYZ":this._y=Math.asin(Vt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Vt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Vt(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Vt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Vt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ft("Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return Uk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Uk,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return Bk.setFromEuler(this),this.setFromQuaternion(Bk,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return n.DEFAULT_ORDER="XYZ",n})(),tf=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},f9=0,zk=new V,Uu=new ho,ua=new Mn,Ov=new V,Sp=new V,h9=new V,p9=new ho,Vk=new V(1,0,0),Gk=new V(0,1,0),Hk=new V(0,0,1),jk={type:"added"},m9={type:"removed"},Bu={type:"childadded",child:null},iE={type:"childremoved",child:null},Fr=(()=>{class n extends Es{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:f9++}),this.uuid=hf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();let t=new V,i=new fl,r=new ho,o=new V(1,1,1);function s(){r.setFromEuler(i,!1)}function a(){i.setFromQuaternion(r,void 0,!1)}i._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new tf,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return Uu.setFromAxisAngle(t,i),this.quaternion.multiply(Uu),this}rotateOnWorldAxis(t,i){return Uu.setFromAxisAngle(t,i),this.quaternion.premultiply(Uu),this}rotateX(t){return this.rotateOnAxis(Vk,t)}rotateY(t){return this.rotateOnAxis(Gk,t)}rotateZ(t){return this.rotateOnAxis(Hk,t)}translateOnAxis(t,i){return zk.copy(t).applyQuaternion(this.quaternion),this.position.add(zk.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(Vk,t)}translateY(t){return this.translateOnAxis(Gk,t)}translateZ(t){return this.translateOnAxis(Hk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ua.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?Ov.copy(t):Ov.set(t,i,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Sp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ua.lookAt(Sp,Ov,this.up):ua.lookAt(Ov,Sp,this.up),this.quaternion.setFromRotationMatrix(ua),o&&(ua.extractRotation(o.matrixWorld),Uu.setFromRotationMatrix(ua),this.quaternion.premultiply(Uu.invert()))}add(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.add(arguments[i]);return this}return t===this?(mt("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(jk),Bu.child=t,this.dispatchEvent(Bu),Bu.child=null):mt("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let i=this.children.indexOf(t);return i!==-1&&(t.parent=null,this.children.splice(i,1),t.dispatchEvent(m9),iE.child=t,this.dispatchEvent(iE),iE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ua.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ua.multiply(t.parent.matrixWorld)),t.applyMatrix4(ua),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(jk),Bu.child=t,this.dispatchEvent(Bu),Bu.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,i){if(this[t]===i)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,i);if(a!==void 0)return a}}getObjectsByProperty(t,i,r=[]){this[t]===i&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,i,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Sp,t,h9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Sp,p9,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let i=this.matrixWorld.elements;return t.set(i[8],i[9],i[10]).normalize()}raycast(){}traverse(t){t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverseVisible(t)}traverseAncestors(t){let i=this.parent;i!==null&&(t(i),i.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateMatrixWorld(t)}updateWorldMatrix(t,i){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),i===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let i=t===void 0||typeof t=="string",r={};i&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(i){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return n.DEFAULT_UP=new V(0,1,0),n.DEFAULT_MATRIX_AUTO_UPDATE=!0,n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,n})(),Ro=new V,fa=new V,rE=new V,ha=new V,zu=new V,Vu=new V,Wk=new V,oE=new V,sE=new V,aE=new V,lE=new On,cE=new On,dE=new On,cl=class n{constructor(e=new V,t=new V,i=new V){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),Ro.subVectors(e,t),r.cross(Ro);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,i,r,o){Ro.subVectors(r,t),fa.subVectors(i,t),rE.subVectors(e,t);let s=Ro.dot(Ro),a=Ro.dot(fa),l=Ro.dot(rE),c=fa.dot(fa),d=fa.dot(rE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,ha)===null?!1:ha.x>=0&&ha.y>=0&&ha.x+ha.y<=1}static getInterpolation(e,t,i,r,o,s,a,l){return this.getBarycoord(e,t,i,r,ha)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,ha.x),l.addScaledVector(s,ha.y),l.addScaledVector(a,ha.z),l)}static getInterpolatedAttribute(e,t,i,r,o,s){return lE.setScalar(0),cE.setScalar(0),dE.setScalar(0),lE.fromBufferAttribute(e,t),cE.fromBufferAttribute(e,i),dE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(lE,o.x),s.addScaledVector(cE,o.y),s.addScaledVector(dE,o.z),s}static isFrontFacing(e,t,i,r){return Ro.subVectors(i,t),fa.subVectors(e,t),Ro.cross(fa).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ro.subVectors(this.c,this.b),fa.subVectors(this.a,this.b),Ro.cross(fa).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return n.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return n.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,o){return n.getInterpolation(e,this.a,this.b,this.c,t,i,r,o)}containsPoint(e){return n.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return n.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,r=this.b,o=this.c,s,a;zu.subVectors(r,i),Vu.subVectors(o,i),oE.subVectors(e,i);let l=zu.dot(oE),c=Vu.dot(oE);if(l<=0&&c<=0)return t.copy(i);sE.subVectors(e,r);let d=zu.dot(sE),u=Vu.dot(sE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(i).addScaledVector(zu,s);aE.subVectors(e,o);let h=zu.dot(aE),p=Vu.dot(aE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector(Vu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Wk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Wk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(i).addScaledVector(zu,s).addScaledVector(Vu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},VF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},al={h:0,s:0,l:0},Rv={h:0,s:0,l:0};function uE(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}var _t=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=vn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,zt.colorSpaceToWorking(this,t),this}setRGB(e,t,i,r=zt.workingColorSpace){return this.r=e,this.g=t,this.b=i,zt.colorSpaceToWorking(this,r),this}setHSL(e,t,i,r=zt.workingColorSpace){if(e=KE(e,1),t=Vt(t,0,1),i=Vt(i,0,1),t===0)this.r=this.g=this.b=i;else{let o=i<=.5?i*(1+t):i+t-i*t,s=2*i-o;this.r=uE(s,o,e+1/3),this.g=uE(s,o,e),this.b=uE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=vn){function i(o){o!==void 0&&parseFloat(o)<1&&ft("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:ft("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);ft("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=vn){let i=VF[e.toLowerCase()];return i!==void 0?this.setHex(i,t):ft("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ga(e.r),this.g=ga(e.g),this.b=ga(e.b),this}copyLinearToSRGB(e){return this.r=Xu(e.r),this.g=Xu(e.g),this.b=Xu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=vn){return zt.workingToColorSpace(Ii.copy(this),e),Math.round(Vt(Ii.r*255,0,255))*65536+Math.round(Vt(Ii.g*255,0,255))*256+Math.round(Vt(Ii.b*255,0,255))}getHexString(e=vn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Ii.copy(this),t);let i=Ii.r,r=Ii.g,o=Ii.b,s=Math.max(i,r,o),a=Math.min(i,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case i:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-i)/u+2;break;case o:l=(i-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=zt.workingColorSpace){return zt.workingToColorSpace(Ii.copy(this),t),e.r=Ii.r,e.g=Ii.g,e.b=Ii.b,e}getStyle(e=vn){zt.workingToColorSpace(Ii.copy(this),e);let t=Ii.r,i=Ii.g,r=Ii.b;return e!==vn?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(al),this.setHSL(al.h+e,al.s+t,al.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(al),e.getHSL(Rv);let i=Mp(al.h,Rv.h,t),r=Mp(al.s,Rv.s,t),o=Mp(al.l,Rv.l,t);return this.setHSL(i,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,i=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*i+o[6]*r,this.g=o[1]*t+o[4]*i+o[7]*r,this.b=o[2]*t+o[5]*i+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ii=new _t;_t.NAMES=VF;var g9=0,Nr=class extends Es{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:g9++}),this.uuid=hf(),this.name="",this.type="Material",this.blending=Vc,this.side=Fo,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=qv,this.blendDst=Kv,this.blendEquation=dl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _t(0,0,0),this.blendAlpha=0,this.depthFunc=Gc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=_E,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=zc,this.stencilZFail=zc,this.stencilZPass=zc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){ft(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ft(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Vc&&(i.blending=this.blending),this.side!==Fo&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==qv&&(i.blendSrc=this.blendSrc),this.blendDst!==Kv&&(i.blendDst=this.blendDst),this.blendEquation!==dl&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Gc&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_E&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==zc&&(i.stencilFail=this.stencilFail),this.stencilZFail!==zc&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==zc&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(i.textures=o),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let r=t.length;i=new Array(r);for(let o=0;o!==r;++o)i[o]=t[o].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},Ap=class extends Nr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new fl,this.combine=Db,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Jn=new V,kv=new gt,v9=0,Rr=class{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:v9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=SE,this.updateRanges=[],this.gpuType=Bo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)kv.fromBufferAttribute(this,t),kv.applyMatrix3(e),this.setXY(t,kv.x,kv.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=$u(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Wi(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=$u(t,this.array)),t}setX(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=$u(t,this.array)),t}setY(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=$u(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=$u(t,this.array)),t}setW(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Wi(t,this.array),i=Wi(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Wi(t,this.array),i=Wi(i,this.array),r=Wi(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,o){return e*=this.itemSize,this.normalized&&(t=Wi(t,this.array),i=Wi(i,this.array),r=Wi(r,this.array),o=Wi(o,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==SE&&(e.usage=this.usage),e}};var Op=class extends Rr{constructor(e,t,i){super(new Uint16Array(e),t,i)}};var Rp=class extends Rr{constructor(e,t,i){super(new Uint32Array(e),t,i)}};var jn=class extends Rr{constructor(e,t,i){super(new Float32Array(e),t,i)}},b9=0,uo=new Mn,fE=new Fr,Gu=new V,Or=new $i,Cp=new $i,ci=new V,Xi=class n extends Es{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:b9++}),this.uuid=hf(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(YE(e)?Rp:Op)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let o=new At().getNormalMatrix(e);i.applyNormalMatrix(o),i.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return uo.makeRotationFromQuaternion(e),this.applyMatrix4(uo),this}rotateX(e){return uo.makeRotationX(e),this.applyMatrix4(uo),this}rotateY(e){return uo.makeRotationY(e),this.applyMatrix4(uo),this}rotateZ(e){return uo.makeRotationZ(e),this.applyMatrix4(uo),this}translate(e,t,i){return uo.makeTranslation(e,t,i),this.applyMatrix4(uo),this}scale(e,t,i){return uo.makeScale(e,t,i),this.applyMatrix4(uo),this}lookAt(e){return fE.lookAt(e),fE.updateMatrix(),this.applyMatrix4(fE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Gu).negate(),this.translate(Gu.x,Gu.y,Gu.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let i=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];i.push(s.x,s.y,s.z||0)}this.setAttribute("position",new jn(i,3))}else{let i=Math.min(e.length,t.count);for(let r=0;r<i;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&ft("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new $i);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){mt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new V(-1/0,-1/0,-1/0),new V(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){let o=t[i];Or.setFromBufferAttribute(o),this.morphTargetsRelative?(ci.addVectors(this.boundingBox.min,Or.min),this.boundingBox.expandByPoint(ci),ci.addVectors(this.boundingBox.max,Or.max),this.boundingBox.expandByPoint(ci)):(this.boundingBox.expandByPoint(Or.min),this.boundingBox.expandByPoint(Or.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&mt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new ul);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){mt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new V,1/0);return}if(e){let i=this.boundingSphere.center;if(Or.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Cp.setFromBufferAttribute(a),this.morphTargetsRelative?(ci.addVectors(Or.min,Cp.min),Or.expandByPoint(ci),ci.addVectors(Or.max,Cp.max),Or.expandByPoint(ci)):(Or.expandByPoint(Cp.min),Or.expandByPoint(Cp.max))}Or.getCenter(i);let r=0;for(let o=0,s=e.count;o<s;o++)ci.fromBufferAttribute(e,o),r=Math.max(r,i.distanceToSquared(ci));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)ci.fromBufferAttribute(a,c),l&&(Gu.fromBufferAttribute(e,c),ci.add(Gu)),r=Math.max(r,i.distanceToSquared(ci))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&mt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){mt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let i=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Rr(new Float32Array(4*i.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let O=0;O<i.count;O++)a[O]=new V,l[O]=new V;let c=new V,d=new V,u=new V,f=new gt,h=new gt,p=new gt,v=new V,g=new V;function m(O,S,I){c.fromBufferAttribute(i,O),d.fromBufferAttribute(i,S),u.fromBufferAttribute(i,I),f.fromBufferAttribute(o,O),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[O].add(v),a[S].add(v),a[I].add(v),l[O].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let O=0,S=b.length;O<S;++O){let I=b[O],L=I.start,H=I.count;for(let G=L,X=L+H;G<X;G+=3)m(e.getX(G+0),e.getX(G+1),e.getX(G+2))}let y=new V,x=new V,_=new V,E=new V;function D(O){_.fromBufferAttribute(r,O),E.copy(_);let S=a[O];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[O])<0?-1:1;s.setXYZW(O,y.x,y.y,y.z,L)}for(let O=0,S=b.length;O<S;++O){let I=b[O],L=I.start,H=I.count;for(let G=L,X=L+H;G<X;G+=3)D(e.getX(G+0)),D(e.getX(G+1)),D(e.getX(G+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Rr(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let f=0,h=i.count;f<h;f++)i.setXYZ(f,0,0,0);let r=new V,o=new V,s=new V,a=new V,l=new V,c=new V,d=new V,u=new V;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(i,p),l.fromBufferAttribute(i,v),c.fromBufferAttribute(i,g),a.add(d),l.add(d),c.add(d),i.setXYZ(p,a.x,a.y,a.z),i.setXYZ(v,l.x,l.y,l.z),i.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),i.setXYZ(f+0,d.x,d.y,d.z),i.setXYZ(f+1,d.x,d.y,d.z),i.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)ci.fromBufferAttribute(e,t),ci.normalize(),e.setXYZ(t,ci.x,ci.y,ci.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Rr(f,d,u)}if(this.index===null)return ft("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new n,i=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,i);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,i);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let l in i){let c=i[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},$k=new Mn,Uc=new va,Fv=new ul,Xk=new V,Nv=new V,Lv=new V,Uv=new V,hE=new V,Bv=new V,Yk=new V,zv=new V,Yi=class extends Fr{constructor(e=new Xi,t=new Ap){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){let r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let i=this.geometry,r=i.attributes.position,o=i.morphAttributes.position,s=i.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){Bv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(hE.fromBufferAttribute(u,e),s?Bv.addScaledVector(hE,d):Bv.addScaledVector(hE.sub(t),d))}t.add(Bv)}return t}raycast(e,t){let i=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Fv.copy(i.boundingSphere),Fv.applyMatrix4(o),Uc.copy(e.ray).recast(e.near),!(Fv.containsPoint(Uc.origin)===!1&&(Uc.intersectSphere(Fv,Xk)===null||Uc.origin.distanceToSquared(Xk)>(e.far-e.near)**2))&&($k.copy(o).invert(),Uc.copy(e.ray).applyMatrix4($k),!(i.boundingBox!==null&&Uc.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Uc)))}_computeIntersections(e,t,i){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),O=a.getX(x+2);r=Vv(this,m,e,i,c,d,u,E,D,O),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=Vv(this,s,e,i,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=x,D=x+1,O=x+2;r=Vv(this,m,e,i,c,d,u,E,D,O),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=Vv(this,s,e,i,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function y9(n,e,t,i,r,o,s,a){let l;if(e.side===qi?l=i.intersectTriangle(s,o,r,!0,a):l=i.intersectTriangle(r,o,s,e.side===Fo,a),l===null)return null;zv.copy(a),zv.applyMatrix4(n.matrixWorld);let c=t.ray.origin.distanceTo(zv);return c<t.near||c>t.far?null:{distance:c,point:zv.clone(),object:n}}function Vv(n,e,t,i,r,o,s,a,l,c){n.getVertexPosition(a,Nv),n.getVertexPosition(l,Lv),n.getVertexPosition(c,Uv);let d=y9(n,e,t,i,Nv,Lv,Uv,Yk);if(d){let u=new V;cl.getBarycoord(Yk,Nv,Lv,Uv,u),r&&(d.uv=cl.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=cl.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=cl.getInterpolatedAttribute(s,a,l,c,u,new V),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new V,materialIndex:0};cl.getNormal(Nv,Lv,Uv,f.normal),d.face=f,d.barycoord=u}return d}var nf=class n extends Xi{constructor(e=1,t=1,i=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,i,t,e,s,o,0),p("z","y","x",1,-1,i,t,-e,s,o,1),p("x","z","y",1,1,e,i,t,r,s,2),p("x","z","y",1,-1,e,i,-t,r,s,3),p("x","y","z",1,-1,e,t,i,r,o,4),p("x","y","z",-1,-1,e,t,-i,r,o,5),this.setIndex(l),this.setAttribute("position",new jn(c,3)),this.setAttribute("normal",new jn(d,3)),this.setAttribute("uv",new jn(u,2));function p(v,g,m,b,y,x,_,E,D,O,S){let I=x/D,L=_/O,H=x/2,G=_/2,X=E/2,Y=D+1,K=O+1,W=0,ne=0,ye=new V;for(let xe=0;xe<K;xe++){let Se=xe*L-G;for(let et=0;et<Y;et++){let pt=et*I-H;ye[v]=pt*b,ye[g]=Se*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(et/D),u.push(1-xe/O),W+=1}}for(let xe=0;xe<O;xe++)for(let Se=0;Se<D;Se++){let et=f+Se+Y*xe,pt=f+Se+Y*(xe+1),Wt=f+(Se+1)+Y*(xe+1),Kt=f+(Se+1)+Y*xe;l.push(et,pt,Kt),l.push(pt,Wt,Kt),ne+=6}a.addGroup(h,ne,S),h+=ne,f+=W}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new n(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function ed(n){let e={};for(let t in n){e[t]={};for(let i in n[t]){let r=n[t][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(ft("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=r.clone():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function Ai(n){let e={};for(let t=0;t<n.length;t++){let i=ed(n[t]);for(let r in i)e[r]=i[r]}return e}function x9(n){let e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function ZE(n){let e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var GF={clone:ed,merge:Ai},_9=`void main() {
|
|
5
|
+
`).forEach(t=>{let i=t.indexOf(":");if(i>0){let r=t.slice(0,i),o=t.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,i)=>{this.addHeaderEntry(i,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{this.setHeaderEntries(t,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new n;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}addHeaderEntry(e,t){let i=e.toLowerCase();this.maybeSetNormalizedName(e,i),this.headers.has(i)?this.headers.get(i).push(t):this.headers.set(i,[t])}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var uv=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}},fv=class{encodeKey(e){return GR(e)}encodeValue(e){return GR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ej(n,e){let t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var Mj=/%(\d[a-f0-9])/gi,Tj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function GR(n){return encodeURIComponent(n).replace(Mj,(e,t)=>Tj[t]??e)}function dv(n){return`${n}`}var ao=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new fv,e.fromString){if(e.fromObject)throw new Xe(2805,!1);this.map=Ej(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let i=e.fromObject[t],r=Array.isArray(i)?i.map(dv):[dv(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new n({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(dv(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let i=this.map.get(e.param)||[],r=i.indexOf(dv(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};function Dj(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function HR(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function jR(n){return typeof Blob<"u"&&n instanceof Blob}function WR(n){return typeof FormData<"u"&&n instanceof FormData}function Ij(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var $R="Content-Type",XR="Accept",YR="text/plain",qR="application/json",Pj=`${qR}, ${YR}, */*`,Mu=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,i,r){this.url=t,this.method=e.toUpperCase();let o;if(Dj(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new Xe(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer&&(this.referrer=o.referrer),o.referrerPolicy&&(this.referrerPolicy=o.referrerPolicy),this.transferCache=o.transferCache}if(this.headers??=new lo,this.context??=new uv,!this.params)this.params=new ao,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":a<t.length-1?"&":"";this.urlWithParams=t+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||HR(this.body)||jR(this.body)||WR(this.body)||Ij(this.body)?this.body:this.body instanceof ao?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||WR(this.body)?null:jR(this.body)?this.body.type||null:HR(this.body)?null:typeof this.body=="string"?YR:this.body instanceof ao?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?qR:null}clone(e={}){let t=e.method||this.method,i=e.url||this.url,r=e.responseType||this.responseType,o=e.keepalive??this.keepalive,s=e.priority||this.priority,a=e.cache||this.cache,l=e.mode||this.mode,c=e.redirect||this.redirect,d=e.credentials||this.credentials,u=e.referrer||this.referrer,f=e.integrity||this.integrity,h=e.referrerPolicy||this.referrerPolicy,p=e.transferCache??this.transferCache,v=e.timeout??this.timeout,g=e.body!==void 0?e.body:this.body,m=e.withCredentials??this.withCredentials,b=e.reportProgress??this.reportProgress,y=e.headers||this.headers,x=e.params||this.params,_=e.context??this.context;return e.setHeaders!==void 0&&(y=Object.keys(e.setHeaders).reduce((E,D)=>E.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((E,D)=>E.set(D,e.setParams[D]),x)),new n(t,i,g,{params:x,headers:y,context:_,reportProgress:b,responseType:r,withCredentials:m,transferCache:p,keepalive:o,cache:a,priority:s,timeout:v,mode:l,redirect:c,credentials:d,referrer:u,integrity:f,referrerPolicy:h})}},kc=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(kc||{}),Tu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,i="OK"){this.headers=e.headers||new lo,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.redirected=e.redirected,this.responseType=e.responseType,this.ok=this.status>=200&&this.status<300}},hv=class n extends Tu{constructor(e={}){super(e)}type=kc.ResponseHeader;clone(e={}){return new n({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Du=class n extends Tu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=kc.Response;clone(e={}){return new n({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected,responseType:e.responseType??this.responseType})}},el=class extends Tu{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},Aj=200,Oj=204;var Rj=new $e("");var kj=/^\)\]\}',?\n/;var Aw=(()=>{class n{xhrFactory;tracingService=Z(oa,{optional:!0});constructor(t){this.xhrFactory=t}maybePropagateTrace(t){return this.tracingService?.propagate?this.tracingService.propagate(t):t}handle(t){if(t.method==="JSONP")throw new Xe(-2800,!1);let i=this.xhrFactory;return os(null).pipe(tS(()=>new wn(o=>{let s=i.build();if(s.open(t.method,t.urlWithParams),t.withCredentials&&(s.withCredentials=!0),t.headers.forEach((g,m)=>s.setRequestHeader(g,m.join(","))),t.headers.has(XR)||s.setRequestHeader(XR,Pj),!t.headers.has($R)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader($R,g)}if(t.timeout&&(s.timeout=t.timeout),t.responseType){let g=t.responseType.toLowerCase();s.responseType=g!=="json"?g:"text"}let a=t.serializeBody(),l=null,c=()=>{if(l!==null)return l;let g=s.statusText||"OK",m=new lo(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new hv({headers:m,status:s.status,statusText:g,url:b}),l},d=this.maybePropagateTrace(()=>{let{headers:g,status:m,statusText:b,url:y}=c(),x=null;m!==Oj&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?Aj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let E=x;x=x.replace(kj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=E,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new Du({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new el({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new el({error:g,status:s.status||0,statusText:s.statusText||"Unknown Error",url:m||void 0});o.error(b)}),f=u;t.timeout&&(f=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new el({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:m||void 0});o.error(b)}));let h=!1,p=this.maybePropagateTrace(g=>{h||(o.next(c()),h=!0);let m={type:kc.DownloadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),t.responseType==="text"&&s.responseText&&(m.partialText=s.responseText),o.next(m)}),v=this.maybePropagateTrace(g=>{let m={type:kc.UploadProgress,loaded:g.loaded};g.lengthComputable&&(m.total=g.total),o.next(m)});return s.addEventListener("load",d),s.addEventListener("error",u),s.addEventListener("timeout",f),s.addEventListener("abort",u),t.reportProgress&&(s.addEventListener("progress",p),a!==null&&s.upload&&s.upload.addEventListener("progress",v)),s.send(a),o.next({type:kc.Sent}),()=>{s.removeEventListener("error",u),s.removeEventListener("abort",u),s.removeEventListener("load",d),s.removeEventListener("timeout",f),t.reportProgress&&(s.removeEventListener("progress",p),a!==null&&s.upload&&s.upload.removeEventListener("progress",v)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(Ye(Rc))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Fj(n,e){return e(n)}function Nj(n,e,t){return(i,r)=>Kd(t,()=>e(i,o=>n(o,r)))}var Ow=new $e("",{factory:()=>[]}),Rw=new $e(""),KR=new $e("",{factory:()=>!0});var kw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(Aw),r},providedIn:"root"})}return n})();var pv=(()=>{class n{backend;injector;chain=null;pendingTasks=Z(iu);contributeToStability=Z(KR);constructor(t,i){this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(Ow),...this.injector.get(Rw,[])]));this.chain=i.reduceRight((r,o)=>Nj(r,o,this.injector),Fj)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(fh(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(Ye(kw),Ye(Ei))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Fw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(pv),r},providedIn:"root"})}return n})();function Pw(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer,referrerPolicy:n.referrerPolicy}}var mv=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof Mu)o=t;else{let l;r.headers instanceof lo?l=r.headers:l=new lo(r.headers);let c;r.params&&(r.params instanceof ao?c=r.params:c=new ao({fromObject:r.params})),o=new Mu(t,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,timeout:r.timeout})}let s=os(o).pipe(eS(l=>this.handler.handle(l)));if(t instanceof Mu||r.observe==="events")return s;let a=s.pipe(Q_(l=>l instanceof Du));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(ir(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Xe(2806,!1);return l.body}));case"blob":return a.pipe(ir(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Xe(2807,!1);return l.body}));case"text":return a.pipe(ir(l=>{if(l.body!==null&&typeof l.body!="string")throw new Xe(2808,!1);return l.body}));default:return a.pipe(ir(l=>l.body))}case"response":return a;default:throw new Xe(2809,!1)}}delete(t,i={}){return this.request("DELETE",t,i)}get(t,i={}){return this.request("GET",t,i)}head(t,i={}){return this.request("HEAD",t,i)}jsonp(t,i){return this.request("JSONP",t,{params:new ao().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,i={}){return this.request("OPTIONS",t,i)}patch(t,i,r={}){return this.request("PATCH",t,Pw(r,i))}post(t,i,r={}){return this.request("POST",t,Pw(r,i))}put(t,i,r={}){return this.request("PUT",t,Pw(r,i))}static \u0275fac=function(i){return new(i||n)(Ye(Fw))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Lj=new $e("",{factory:()=>!0}),Uj="XSRF-TOKEN",Bj=new $e("",{factory:()=>Uj}),zj="X-XSRF-TOKEN",Vj=new $e("",{factory:()=>zj}),Gj=(()=>{class n{cookieName=Z(Bj);doc=Z(Cn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ip(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ZR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(Gj),r},providedIn:"root"})}return n})();function Hj(n,e){if(!Z(Lj)||n.method==="GET"||n.method==="HEAD")return e(n);try{let r=Z(iv).href,{origin:o}=new URL(r),{origin:s}=new URL(n.url,o);if(o!==s)return e(n)}catch{return e(n)}let t=Z(ZR).getToken(),i=Z(Vj);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var Nw=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(Nw||{});function jj(n,e){return{\u0275kind:n,\u0275providers:e}}function Lw(...n){let e=[mv,pv,{provide:Fw,useExisting:pv},{provide:kw,useFactory:()=>Z(Rj,{optional:!0})??Z(Aw)},{provide:Ow,useValue:Hj,multi:!0}];for(let t of n)e.push(...t.\u0275providers);return Zs(e)}function Uw(n){return jj(Nw.Interceptors,n.map(e=>({provide:Ow,useValue:e,multi:!0})))}var Wj=new $e(""),$j="b",Xj="h",Yj="s",qj="st",Kj="u",Zj="rt",Bw=new $e(""),Jj=["GET","HEAD"];function Qj(n,e){let h=Z(Bw),{isCacheActive:t}=h,i=Qt(h,["isCacheActive"]),{transferCache:r,method:o}=n;if(!t||r===!1||o==="POST"&&!i.includePostRequests&&!r||o!=="POST"&&!Jj.includes(o)||!i.includeRequestsWithAuthHeaders&&eW(n)||i.filter?.(n)===!1)return e(n);let s=Z(mu);if(Z(Wj,{optional:!0}))throw new Xe(2803,!1);let l=n.url,c=tW(n,l),d=s.get(c,null),u=i.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(u=r.includeHeaders),d){let{[$j]:p,[Zj]:v,[Xj]:g,[Yj]:m,[qj]:b,[Kj]:y}=d,x=p;switch(v){case"arraybuffer":x=QR(p);break;case"blob":x=new Blob([QR(p)]);break}let _=new lo(g);return os(new Du({body:x,headers:_,status:m,statusText:b,url:y}))}return e(n)}function eW(n){return n.headers.has("authorization")||n.headers.has("proxy-authorization")}function JR(n){return[...n.keys()].sort().map(e=>`${e}=${n.getAll(e)}`).join("&")}function tW(n,e){let{params:t,method:i,responseType:r}=n,o=JR(t),s=n.serializeBody();s instanceof URLSearchParams?s=JR(s):typeof s!="string"&&(s="");let a=[i,r,e,s,o].join("|"),l=nW(a);return l}function nW(n){let e=0;for(let t of n)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function QR(n){let e=atob(n);return Uint8Array.from(e,i=>i.charCodeAt(0)).buffer}function ek(n){return[{provide:Bw,useFactory:()=>(Po("NgHttpTransferCache"),R({isCacheActive:!0},n))},{provide:Rw,useValue:Qj,multi:!0},{provide:Su,multi:!0,useFactory:()=>{let e=Z(Ir),t=Z(Bw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var cp=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=_e({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=Ye(iW),r},providedIn:"root"})}return n})(),iW=(()=>{class n extends cp{_doc;constructor(t){super(),this._doc=t}sanitize(t,i){if(i==null)return null;switch(t){case Io.NONE:return i;case Io.HTML:return ia(i,"HTML")?Do(i):M0(this._doc,String(i)).toString();case Io.STYLE:return ia(i,"Style")?Do(i):i;case Io.SCRIPT:if(ia(i,"Script"))return Do(i);throw new Xe(5200,!1);case Io.URL:return ia(i,"URL")?Do(i):Wh(String(i));case Io.RESOURCE_URL:if(ia(i,"ResourceURL"))return Do(i);throw new Xe(5201,!1);default:throw new Xe(5202,!1)}}bypassSecurityTrustHtml(t){return pC(t)}bypassSecurityTrustStyle(t){return mC(t)}bypassSecurityTrustScript(t){return gC(t)}bypassSecurityTrustUrl(t){return vC(t)}bypassSecurityTrustResourceUrl(t){return bC(t)}static \u0275fac=function(i){return new(i||n)(Ye(Cn))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),gv=(function(n){return n[n.NoHttpTransferCache=0]="NoHttpTransferCache",n[n.HttpTransferCacheOptions=1]="HttpTransferCacheOptions",n[n.I18nSupport=2]="I18nSupport",n[n.EventReplay=3]="EventReplay",n[n.IncrementalHydration=4]="IncrementalHydration",n})(gv||{});function rW(n,e=[],t={}){return{\u0275kind:n,\u0275providers:e}}function tk(){return rW(gv.EventReplay,CR())}function nk(...n){let e=[],t=new Set;for(let{\u0275providers:r,\u0275kind:o}of n)t.add(o),r.length&&e.push(r);let i=t.has(gv.HttpTransferCacheOptions);return Zs([[],[],wR(),t.has(gv.NoHttpTransferCache)||i?[]:ek({}),e])}var Iu=class n{loadingCount=F(0);isLoading=Pe(()=>this.loadingCount()>0);show(){this.loadingCount.update(e=>e+1)}hide(){this.loadingCount.update(e=>Math.max(0,e-1))}reset(){this.loadingCount.set(0)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};function vv(n){let e=s=>Array.isArray(s)?s.filter(a=>typeof a=="string").join(", "):"";if(!n)return"Unhandled error";let t=n?.error,i=e(t?.errors);if(i)return i;let r=e(t?.message??t?.Messages);if(r)return r;if(Array.isArray(t)&&t.length>0)return e(t)||"Unhandled error";if(typeof t=="string"&&t.trim())return t;if(Array.isArray(n)&&n.length>0)return e(n)||"Unhandled error";let o=e(n?.messages);if(o)return o;if(typeof n?.messages=="string"&&n.messages.trim())return n.messages;if(typeof n?.message=="string"&&n.message.trim())return n.message;if(t?.errors&&typeof t.errors=="object"&&!Array.isArray(t.errors)){let s=[];for(let a in t.errors)Object.prototype.hasOwnProperty.call(t.errors,a)&&s.push(...t.errors[a]??[]);if(s.length)return s.join(", ")}return n?.status===401?"Unauthorized: Please verify your credentials and try again":"Unhandled error"}var aa=class n{toastsSignal=F([]);toasts=Pe(()=>this.toastsSignal());defaultTimeoutMs=4500;showSuccess(e,t="Success"){this.pushToast("success",t,e)}showInfo(e,t="Info"){this.pushToast("info",t,e)}showWarn(e,t="Warning"){this.pushToast("warning",t,e)}showError(e,t="Error"){this.pushToast("error",t,e)}showContrast(e,t="Note"){this.pushToast("info",t,e)}showSecondary(e,t="Secondary"){this.pushToast("info",t,e)}dismissToast(e){this.toastsSignal.update(t=>t.filter(i=>i.id!==e))}pushToast(e,t,i){let r={id:Date.now()+Math.floor(Math.random()*1e3),type:e,title:t,message:i,timeout:this.defaultTimeoutMs};this.toastsSignal.update(s=>[...s,r]),(e==="error"?console.error:e==="warning"?console.warn:console.info)(`[${t}] ${i}`),setTimeout(()=>{this.dismissToast(r.id)},r.timeout)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var dp=class n{constructor(e){this.toasterService=e}handleError(e){e instanceof el&&this.showError(e)}showError(e){return this.toasterService.showError(vv(e)),Na(()=>e)}static \u0275fac=function(t){return new(t||n)(Ye(aa))};static \u0275prov=_e({token:n,factory:n.\u0275fac,providedIn:"root"})};var ik=(n,e)=>{let t=Z(dp),i=Z(Iu),r=n.headers.has("skipHandleError"),o=n.headers.get("Loader")==="true";return o&&i.show(),e(n).pipe(lc(s=>(r||t.handleError(s),r?os(null):Na(()=>s))),fh(()=>{o&&i.hide()}))};var rk=[ik];var ok={apiUrl:"https://pixeasy-api-esaca7hvgdfxgmcn.westus3-01.azurewebsites.net/api/"};var bv=new $e("ENV"),Jbe=new $e("LOADER_DELAY");var sk={provide:bv,useValue:ok};function ak(){return[e1(),nk(tk()),Lw(Uw(rk)),sk,Iu]}var vk=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,i){this._renderer=t,this._elementRef=i}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(i){return new(i||n)(Gt(ys),Gt(ar))};static \u0275dir=Gn({type:n})}return n})(),gp=(()=>{class n extends vk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,features:[Dr]})}return n})(),tl=new $e(""),aW={provide:tl,useExisting:Bi(()=>Ww),multi:!0},Ww=(()=>{class n extends gp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&ie("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[oo([aW]),Dr]})}return n})(),lW={provide:tl,useExisting:Bi(()=>Ou),multi:!0};function cW(){let n=so()?so().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var dW=new $e(""),Ou=(()=>{class n extends vk{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!cW())}writeValue(t){let i=t??"";this.setProperty("value",i)}_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 \u0275fac=function(i){return new(i||n)(Gt(ys),Gt(ar),Gt(dW,8))};static \u0275dir=Gn({type:n,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(i,r){i&1&&ie("input",function(s){return r._handleInput(s.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(s){return r._compositionEnd(s.target.value)})},standalone:!1,features:[oo([lW]),Dr]})}return n})();var $w=new $e(""),uW=new $e("");function fW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<n?{min:{min:n,actual:e.value}}:null}}function hW(n){return e=>{if(e.value==null||n==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}function lk(n){return null}function bk(n){return n!=null}function yk(n){return _u(n)?uh(n):n}function xk(n){let e={};return n.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function _k(n,e){return e.map(t=>t(n))}function pW(n){return!n.validate}function Sk(n){return n.map(e=>pW(e)?e:t=>e.validate(t))}function mW(n){if(!n)return null;let e=n.filter(bk);return e.length==0?null:function(t){return xk(_k(t,e))}}function Ck(n){return n!=null?mW(Sk(n)):null}function gW(n){if(!n)return null;let e=n.filter(bk);return e.length==0?null:function(t){let i=_k(t,e).map(yk);return J_(i).pipe(ir(xk))}}function wk(n){return n!=null?gW(Sk(n)):null}function ck(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function vW(n){return n._rawValidators}function bW(n){return n._rawAsyncValidators}function zw(n){return n?Array.isArray(n)?n:[n]:[]}function xv(n,e){return Array.isArray(n)?n.includes(e):n===e}function dk(n,e){let t=zw(e);return zw(n).forEach(r=>{xv(t,r)||t.push(r)}),t}function uk(n,e){return zw(e).filter(t=>!xv(n,t))}var _v=class{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}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Ck(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=wk(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control?.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Vw=class extends _v{name;get formDirective(){return null}get path(){return null}},mp=class extends _v{_parent=null;name=null;valueAccessor=null},Gw=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var nl=(()=>{class n extends Gw{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(Gt(mp,2))};static \u0275dir=Gn({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&dt("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)},standalone:!1,features:[Dr]})}return n})();var up="VALID",yv="INVALID",Pu="PENDING",fp="DISABLED",Fc=class{},Sv=class extends Fc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},hp=class extends Fc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},pp=class extends Fc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Au=class extends Fc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var Hw=class extends Fc{source;constructor(e){super(),this.source=e}};function yW(n){return(Cv(n)?n.validators:n)||null}function xW(n){return Array.isArray(n)?Ck(n):n||null}function _W(n,e){return(Cv(e)?e.asyncValidators:n)||null}function SW(n){return Array.isArray(n)?wk(n):n||null}function Cv(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var jw=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return En(this.statusReactive)}set status(e){En(()=>this.statusReactive.set(e))}_status=Pe(()=>this.statusReactive());statusReactive=F(void 0);get valid(){return this.status===up}get invalid(){return this.status===yv}get pending(){return this.status==Pu}get disabled(){return this.status===fp}get enabled(){return this.status!==fp}errors;get pristine(){return En(this.pristineReactive)}set pristine(e){En(()=>this.pristineReactive.set(e))}_pristine=Pe(()=>this.pristineReactive());pristineReactive=F(!0);get dirty(){return!this.pristine}get touched(){return En(this.touchedReactive)}set touched(e){En(()=>this.touchedReactive.set(e))}_touched=Pe(()=>this.touchedReactive());touchedReactive=F(!1);get untouched(){return!this.touched}_events=new Co;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(dk(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(dk(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(uk(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(uk(e,this._rawAsyncValidators))}hasValidator(e){return xv(this._rawValidators,e)}hasAsyncValidator(e){return xv(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsTouched(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new pp(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),e.onlySelf||this._parent?._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new pp(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(ue(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new hp(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),e.onlySelf||this._parent?._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new hp(!0,i))}markAsPending(e={}){this.status=Pu;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Au(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(ue(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=fp,this.errors=null,this._forEachChild(r=>{r.disable(ue(R({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Sv(this.value,i)),this._events.next(new Au(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=up,this._forEachChild(i=>{i.enable(ue(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(ue(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){e.onlySelf||(this._parent?.updateValueAndValidity(e),e.skipPristineCheck||this._parent?._updatePristine({},t),this._parent?._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===up||this.status===Pu)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Sv(this.value,t)),this._events.next(new Au(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(ue(R({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?fp:up}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Pu,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=yk(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i?.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new Au(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new yr,this.statusChanges=new yr}_calculateStatus(){return this._allControlsDisabled()?fp:this.errors?yv:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Pu)?Pu:this._anyControlsHaveStatus(yv)?yv:up}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,e.onlySelf||this._parent?._updatePristine(e,t),r&&this._events.next(new hp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new pp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Cv(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=xW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=SW(this._rawAsyncValidators)}};var Ek=new $e("",{factory:()=>Xw}),Xw="always";function CW(n,e){return[...e.path,n]}function wW(n,e,t=Xw){MW(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),TW(n,e),IW(n,e),DW(n,e),EW(n,e)}function fk(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function EW(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function MW(n,e){let t=vW(n);e.validator!==null?n.setValidators(ck(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=bW(n);e.asyncValidator!==null?n.setAsyncValidators(ck(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();fk(e._rawValidators,r),fk(e._rawAsyncValidators,r)}function TW(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Mk(n,e)})}function DW(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Mk(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function Mk(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function IW(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function PW(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function AW(n){return Object.getPrototypeOf(n.constructor)===gp}function OW(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===Ou?t=o:AW(o)?i=o:r=o}),r||i||t||null}function hk(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function pk(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var RW=class extends jw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(yW(t),_W(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Cv(t)&&(t.nonNullable||t.initialValueIsDefault)&&(pk(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),t.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,t?.emitEvent!==!1&&this._events.next(new Hw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){hk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){hk(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){pk(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var kW={provide:mp,useExisting:Bi(()=>la)},mk=Promise.resolve(),la=(()=>{class n extends mp{_changeDetectorRef;callSetDisabledState;control=new RW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new yr;constructor(t,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=OW(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),PW(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){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&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){wW(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){mk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&nv(i);mk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?CW(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(Gt(Vw,9),Gt($w,10),Gt(uW,10),Gt(tl,10),Gt(tv,8),Gt(Ek,8))};static \u0275dir=Gn({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[oo([kW]),Dr,hu]})}return n})();var FW={provide:tl,useExisting:Bi(()=>vp),multi:!0},vp=(()=>{class n extends gp{writeValue(t){let i=t??"";this.setProperty("value",i)}registerOnChange(t){this.onChange=i=>{t(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&ie("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[oo([FW]),Dr]})}return n})();var NW={provide:tl,useExisting:Bi(()=>wv),multi:!0};function Tk(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function LW(n){return n.split(":")[0]}var wv=(()=>{class n extends gp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Ir).injector;destroyRef=Z(sr);cdr=Z(tv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,P0({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let i=this._getOptionId(t),r=Tk(i,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){let i=LW(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&ie("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[oo([NW]),Dr]})}return n})(),Dk=(()=>{class n{_element;_renderer;_select;id;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(Tk(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select?._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(i){return new(i||n)(Gt(ar),Gt(ys),Gt(wv,9))};static \u0275dir=Gn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),UW={provide:tl,useExisting:Bi(()=>Ik),multi:!0};function gk(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function BW(n){return n.split(":")[0]}var Ik=(()=>{class n extends gp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let i;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let s=o;for(let a=0;a<s.length;a++){let l=s[a],c=this._getOptionValue(l.value);r.push(c)}}else{let s=i.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,t(r)}}_registerOption(t){let i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){let i=BW(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&ie("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[oo([UW]),Dr]})}return n})(),Pk=(()=>{class n{_element;_renderer;_select;id;_value;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(gk(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(gk(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(Gt(ar),Gt(ys),Gt(Ik,9))};static \u0275dir=Gn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function Ak(n){return typeof n=="number"?n:parseFloat(n)}var Ok=(()=>{class n{_validator=lk;_onChange;_enabled;ngOnChanges(t){if(this.inputName in t){let i=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):lk,this._onChange?.()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return t!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Gn({type:n,features:[hu]})}return n})(),zW={provide:$w,useExisting:Bi(()=>bp),multi:!0},bp=(()=>{class n extends Ok{max;inputName="max";normalizeInput=t=>Ak(t);createValidator=t=>hW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&An("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[oo([zW]),Dr]})}return n})(),VW={provide:$w,useExisting:Bi(()=>yp),multi:!0},yp=(()=>{class n extends Ok{min;inputName="min";normalizeInput=t=>Ak(t);createValidator=t=>fW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=na(n)))(r||n)}})();static \u0275dir=Gn({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&An("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[oo([VW]),Dr]})}return n})();var GW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=sa({type:n});static \u0275inj=ls({})}return n})();var co=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Ek,useValue:t.callSetDisabledState??Xw}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=sa({type:n});static \u0275inj=ls({imports:[GW]})}return n})();var bl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},yl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},aF=0,IE=1,lF=2;var jp=1,cF=2,df=3,Fo=0,qi=1,Ms=2,Ts=0,Vc=1,PE=2,AE=3,OE=4,dF=5,dl=100,uF=101,fF=102,hF=103,pF=104,mF=200,gF=201,vF=202,bF=203,qv=204,Kv=205,yF=206,xF=207,_F=208,SF=209,CF=210,wF=211,EF=212,MF=213,TF=214,_b=0,Sb=1,Cb=2,Gc=3,wb=4,Eb=5,Mb=6,Tb=7,Db=0,DF=1,IF=2,Lo=0,RE=1,kE=2,FE=3,Zc=4,NE=5,LE=6,UE=7;var vE=300,xl=301,Jc=302,Ib=303,Pb=304,Wp=306,qu=1e3,Pi=1001,Zv=1002,ui=1003,PF=1004;var $p=1005;var Wn=1006,Ab=1007;var po=1008;var lr=1009,BE=1010,zE=1011,uf=1012,Ob=1013,Uo=1014,Bo=1015,Ds=1016,Rb=1017,kb=1018,ff=1020,VE=35902,GE=35899,HE=1021,jE=1022,mo=1023,ws=1026,_l=1027,WE=1028,Fb=1029,Qc=1030,Nb=1031;var Lb=1033,Xp=33776,Yp=33777,qp=33778,Kp=33779,Ub=35840,Bb=35841,zb=35842,Vb=35843,Gb=36196,Hb=37492,jb=37496,Wb=37488,$b=37489,Xb=37490,Yb=37491,qb=37808,Kb=37809,Zb=37810,Jb=37811,Qb=37812,ey=37813,ty=37814,ny=37815,iy=37816,ry=37817,oy=37818,sy=37819,ay=37820,ly=37821,cy=36492,dy=36494,uy=36495,fy=36283,hy=36284,py=36285,my=36286;var Tp=2300,Jv=2301,Yv=2302,bE=2400,yE=2401,xE=2402;var AF=3200;var $E=0,OF=1,ya="",vn="srgb",Hc="srgb-linear",Dp="linear",on="srgb";var zc=7680;var _E=519,RF=512,kF=513,FF=514,gy=515,NF=516,LF=517,vy=518,UF=519,SE=35044;var XE="300 es",ko=2e3,Ip=2001;function YE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function HW(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Ku(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function BF(){let n=Ku("canvas");return n.style.display="block",n}var Rk={},Zu=null;function qE(...n){let e="THREE."+n.shift();Zu?Zu("log",e,...n):console.log(e,...n)}function ft(...n){let e="THREE."+n.shift();Zu?Zu("warn",e,...n):console.warn(e,...n)}function mt(...n){let e="THREE."+n.shift();Zu?Zu("error",e,...n):console.error(e,...n)}function Ju(...n){let e=n.join(" ");e in Rk||(Rk[e]=!0,ft(...n))}function zF(n,e,t){return new Promise(function(i,r){function o(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:i()}}setTimeout(o,t)})}var Es=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){let i=this._listeners;return i===void 0?!1:i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){let i=this._listeners;if(i===void 0)return;let r=i[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){let t=this._listeners;if(t===void 0)return;let i=t[e.type];if(i!==void 0){e.target=this;let r=i.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,e);e.target=null}}},Di=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],kk=1234567,Ep=Math.PI/180,Qu=180/Math.PI;function hf(){let n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Di[n&255]+Di[n>>8&255]+Di[n>>16&255]+Di[n>>24&255]+"-"+Di[e&255]+Di[e>>8&255]+"-"+Di[e>>16&15|64]+Di[e>>24&255]+"-"+Di[t&63|128]+Di[t>>8&255]+"-"+Di[t>>16&255]+Di[t>>24&255]+Di[i&255]+Di[i>>8&255]+Di[i>>16&255]+Di[i>>24&255]).toLowerCase()}function Vt(n,e,t){return Math.max(e,Math.min(t,n))}function KE(n,e){return(n%e+e)%e}function jW(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function WW(n,e,t){return n!==e?(t-n)/(e-n):0}function Mp(n,e,t){return(1-t)*n+t*e}function $W(n,e,t,i){return Mp(n,e,1-Math.exp(-t*i))}function XW(n,e=1){return e-Math.abs(KE(n,e*2)-e)}function YW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function qW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function KW(n,e){return n+Math.floor(Math.random()*(e-n+1))}function ZW(n,e){return n+Math.random()*(e-n)}function JW(n){return n*(.5-Math.random())}function QW(n){n!==void 0&&(kk=n);let e=kk+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function e9(n){return n*Ep}function t9(n){return n*Qu}function n9(n){return(n&n-1)===0&&n!==0}function i9(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function r9(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function o9(n,e,t,i,r){let o=Math.cos,s=Math.sin,a=o(t/2),l=s(t/2),c=o((e+i)/2),d=s((e+i)/2),u=o((e-i)/2),f=s((e-i)/2),h=o((i-e)/2),p=s((i-e)/2);switch(r){case"XYX":n.set(a*d,l*u,l*f,a*c);break;case"YZY":n.set(l*f,a*d,l*u,a*c);break;case"ZXZ":n.set(l*u,l*f,a*d,a*c);break;case"XZX":n.set(a*d,l*p,l*h,a*c);break;case"YXY":n.set(l*h,a*d,l*p,a*c);break;case"ZYZ":n.set(l*p,l*h,a*d,a*c);break;default:ft("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function $u(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function Wi(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}var nn={DEG2RAD:Ep,RAD2DEG:Qu,generateUUID:hf,clamp:Vt,euclideanModulo:KE,mapLinear:jW,inverseLerp:WW,lerp:Mp,damp:$W,pingpong:XW,smoothstep:YW,smootherstep:qW,randInt:KW,randFloat:ZW,randFloatSpread:JW,seededRandom:QW,degToRad:e9,radToDeg:t9,isPowerOfTwo:n9,ceilPowerOfTwo:i9,floorPowerOfTwo:r9,setQuaternionFromProperEuler:o9,normalize:Wi,denormalize:$u},gt=class n{constructor(e=0,t=0){n.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){let t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Vt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Vt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let i=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*i-s*r+e.x,this.y=o*r+s*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},ho=class{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,o,s,a){let l=i[r+0],c=i[r+1],d=i[r+2],u=i[r+3],f=o[s+0],h=o[s+1],p=o[s+2],v=o[s+3];if(a<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(a>=1){e[t+0]=f,e[t+1]=h,e[t+2]=p,e[t+3]=v;return}if(u!==v||l!==f||c!==h||d!==p){let g=l*f+c*h+d*p+u*v;g<0&&(f=-f,h=-h,p=-p,v=-v,g=-g);let m=1-a;if(g<.9995){let b=Math.acos(g),y=Math.sin(b);m=Math.sin(m*b)/y,a=Math.sin(a*b)/y,l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a}else{l=l*m+f*a,c=c*m+h*a,d=d*m+p*a,u=u*m+v*a;let b=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=b,c*=b,d*=b,u*=b}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,i,r,o,s){let a=i[r],l=i[r+1],c=i[r+2],d=i[r+3],u=o[s],f=o[s+1],h=o[s+2],p=o[s+3];return e[t]=a*p+d*u+l*h-c*f,e[t+1]=l*p+d*f+c*u-a*h,e[t+2]=c*p+d*h+a*f-l*u,e[t+3]=d*p-a*u-l*f-c*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){let i=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,l=Math.sin,c=a(i/2),d=a(r/2),u=a(o/2),f=l(i/2),h=l(r/2),p=l(o/2);switch(s){case"XYZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"YXZ":this._x=f*d*u+c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"ZXY":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u-f*h*p;break;case"ZYX":this._x=f*d*u-c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u+f*h*p;break;case"YZX":this._x=f*d*u+c*h*p,this._y=c*h*u+f*d*p,this._z=c*d*p-f*h*u,this._w=c*d*u-f*h*p;break;case"XZY":this._x=f*d*u-c*h*p,this._y=c*h*u-f*d*p,this._z=c*d*p+f*h*u,this._w=c*d*u+f*h*p;break;default:ft("Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,i=t[0],r=t[4],o=t[8],s=t[1],a=t[5],l=t[9],c=t[2],d=t[6],u=t[10],f=i+a+u;if(f>0){let h=.5/Math.sqrt(f+1);this._w=.25/h,this._x=(d-l)*h,this._y=(o-c)*h,this._z=(s-r)*h}else if(i>a&&i>u){let h=2*Math.sqrt(1+i-a-u);this._w=(d-l)/h,this._x=.25*h,this._y=(r+s)/h,this._z=(o+c)/h}else if(a>u){let h=2*Math.sqrt(1+a-i-u);this._w=(o-c)/h,this._x=(r+s)/h,this._y=.25*h,this._z=(l+d)/h}else{let h=2*Math.sqrt(1+u-i-a);this._w=(s-r)/h,this._x=(o+c)/h,this._y=(l+d)/h,this._z=.25*h}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return i<1e-8?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Vt(this.dot(e),-1,1)))}rotateTowards(e,t){let i=this.angleTo(e);if(i===0)return this;let r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let i=e._x,r=e._y,o=e._z,s=e._w,a=t._x,l=t._y,c=t._z,d=t._w;return this._x=i*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-i*c,this._z=o*d+s*c+i*l-r*a,this._w=s*d-i*a-r*l-o*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let i=e._x,r=e._y,o=e._z,s=e._w,a=this.dot(e);a<0&&(i=-i,r=-r,o=-o,s=-s,a=-a);let l=1-t;if(a<.9995){let c=Math.acos(a),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this._onChangeCallback()}else this._x=this._x*l+i*t,this._y=this._y*l+r*t,this._z=this._z*l+o*t,this._w=this._w*l+s*t,this.normalize();return this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){let e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),o=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},V=class n{constructor(e=0,t=0,i=0){n.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Fk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Fk.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*i+o[6]*r,this.y=o[1]*t+o[4]*i+o[7]*r,this.z=o[2]*t+o[5]*i+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*i+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*i+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*i+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*i+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,i=this.y,r=this.z,o=e.x,s=e.y,a=e.z,l=e.w,c=2*(s*r-a*i),d=2*(a*t-o*r),u=2*(o*i-s*t);return this.x=t+l*c+s*u-a*d,this.y=i+l*d+a*c-o*u,this.z=r+l*u+o*d-s*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){let t=this.x,i=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r,this.y=o[1]*t+o[5]*i+o[9]*r,this.z=o[2]*t+o[6]*i+o[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Vt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){let i=e.x,r=e.y,o=e.z,s=t.x,a=t.y,l=t.z;return this.x=r*l-o*a,this.y=o*s-i*l,this.z=i*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Yw.copy(this).projectOnVector(e),this.sub(Yw)}reflect(e){return this.sub(Yw.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){let t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;let i=this.dot(e)/t;return Math.acos(Vt(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){let r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){let t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let e=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},Yw=new V,Fk=new ho,At=class n{constructor(e,t,i,r,o,s,a,l,c){n.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c)}set(e,t,i,r,o,s,a,l,c){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=l,d[6]=i,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){let t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[3],l=i[6],c=i[1],d=i[4],u=i[7],f=i[2],h=i[5],p=i[8],v=r[0],g=r[3],m=r[6],b=r[1],y=r[4],x=r[7],_=r[2],E=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*E,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*E,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*E,o[8]=f*m+h*x+p*D,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8];return t*s*d-t*a*c-i*o*d+i*a*l+r*o*c-r*s*l}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=d*s-a*c,f=a*l-d*o,h=c*o-s*l,p=t*u+i*f+r*h;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);let v=1/p;return e[0]=u*v,e[1]=(r*c-d*i)*v,e[2]=(a*i-r*s)*v,e[3]=f*v,e[4]=(d*t-r*l)*v,e[5]=(r*o-a*t)*v,e[6]=h*v,e[7]=(i*l-c*t)*v,e[8]=(s*t-i*o)*v,this}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){let t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(i*l,i*c,-i*(l*s+c*a)+s+e,-r*c,r*l,-r*(-c*s+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(qw.makeScale(e,t)),this}rotate(e){return this.premultiply(qw.makeRotation(-e)),this}translate(e,t){return this.premultiply(qw.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}},qw=new At,Nk=new At().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Lk=new At().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function s9(){let n={enabled:!0,workingColorSpace:Hc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=ga(r.r),r.g=ga(r.g),r.b=ga(r.b)),this.spaces[o].primaries!==this.spaces[s].primaries&&(r.applyMatrix3(this.spaces[o].toXYZ),r.applyMatrix3(this.spaces[s].fromXYZ)),this.spaces[s].transfer===on&&(r.r=Xu(r.r),r.g=Xu(r.g),r.b=Xu(r.b))),r},workingToColorSpace:function(r,o){return this.convert(r,this.workingColorSpace,o)},colorSpaceToWorking:function(r,o){return this.convert(r,o,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===ya?Dp:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,o=this.workingColorSpace){return r.fromArray(this.spaces[o].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,o,s){return r.copy(this.spaces[o].toXYZ).multiply(this.spaces[s].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,o){return Ju("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Ju("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),n.colorSpaceToWorking(r,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],i=[.3127,.329];return n.define({[Hc]:{primaries:e,whitePoint:i,transfer:Dp,toXYZ:Nk,fromXYZ:Lk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:vn},outputColorSpaceConfig:{drawingBufferColorSpace:vn}},[vn]:{primaries:e,whitePoint:i,transfer:on,toXYZ:Nk,fromXYZ:Lk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:vn}}}),n}var zt=s9();function ga(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Xu(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var Ru,Qv=class{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let i;if(e instanceof HTMLCanvasElement)i=e;else{Ru===void 0&&(Ru=Ku("canvas")),Ru.width=e.width,Ru.height=e.height;let r=Ru.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=Ru}return i.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){let t=Ku("canvas");t.width=e.width,t.height=e.height;let i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);let r=i.getImageData(0,0,e.width,e.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=ga(o[s]/255)*255;return i.putImageData(r,0,0),t}else if(e.data){let t=e.data.slice(0);for(let i=0;i<t.length;i++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[i]=Math.floor(ga(t[i]/255)*255):t[i]=ga(t[i]);return{data:t,width:e.width,height:e.height}}else return ft("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},a9=0,ef=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:a9++}),this.uuid=hf(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){let t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):typeof VideoFrame<"u"&&t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];let i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)r[s].isDataTexture?o.push(Kw(r[s].image)):o.push(Kw(r[s]))}else o=Kw(r);i.url=o}return t||(e.images[this.uuid]=i),i}};function Kw(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?Qv.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(ft("Texture: Unable to serialize Texture."),{})}var l9=0,Zw=new V,zo=(()=>{class n extends Es{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=Pi,o=Pi,s=Wn,a=po,l=mo,c=lr,d=n.DEFAULT_ANISOTROPY,u=ya){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:l9++}),this.uuid=hf(),this.name="",this.source=new ef(t),this.mipmaps=[],this.mapping=i,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=s,this.minFilter=a,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new gt(0,0),this.repeat=new gt(1,1),this.center=new gt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new At,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(Zw).x}get height(){return this.source.getSize(Zw).y}get depth(){return this.source.getSize(Zw).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,i){this.updateRanges.push({start:t,count:i})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(let i in t){let r=t[i];if(r===void 0){ft(`Texture.setValues(): parameter '${i}' has value of undefined.`);continue}let o=this[i];if(o===void 0){ft(`Texture.setValues(): property '${i}' does not exist.`);continue}o&&r&&o.isVector2&&r.isVector2||o&&r&&o.isVector3&&r.isVector3||o&&r&&o.isMatrix3&&r.isMatrix3?o.copy(r):this[i]=r}}toJSON(t){let i=t===void 0||typeof t=="string";if(!i&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let r={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),i||(t.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==vE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case qu:t.x=t.x-Math.floor(t.x);break;case Pi:t.x=t.x<0?0:1;break;case Zv:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case qu:t.y=t.y-Math.floor(t.y);break;case Pi:t.y=t.y<0?0:1;break;case Zv:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}return n.DEFAULT_IMAGE=null,n.DEFAULT_MAPPING=vE,n.DEFAULT_ANISOTROPY=1,n})(),On=class n{constructor(e=0,t=0,i=0,r=1){n.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){let t=this.x,i=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*i+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*i+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*i+s[11]*r+s[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);let t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,o,l=e.elements,c=l[0],d=l[4],u=l[8],f=l[1],h=l[5],p=l[9],v=l[2],g=l[6],m=l[10];if(Math.abs(d-f)<.01&&Math.abs(u-v)<.01&&Math.abs(p-g)<.01){if(Math.abs(d+f)<.1&&Math.abs(u+v)<.1&&Math.abs(p+g)<.1&&Math.abs(c+h+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let y=(c+1)/2,x=(h+1)/2,_=(m+1)/2,E=(d+f)/4,D=(u+v)/4,O=(p+g)/4;return y>x&&y>_?y<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(y),r=E/i,o=D/i):x>_?x<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),i=E/r,o=O/r):_<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(_),i=D/o,r=O/o),this.set(i,r,o,t),this}let b=Math.sqrt((g-p)*(g-p)+(u-v)*(u-v)+(f-d)*(f-d));return Math.abs(b)<.001&&(b=1),this.x=(g-p)/b,this.y=(u-v)/b,this.z=(f-d)/b,this.w=Math.acos((c+h+m-1)/2),this}setFromMatrixPosition(e){let t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Vt(this.x,e.x,t.x),this.y=Vt(this.y,e.y,t.y),this.z=Vt(this.z,e.z,t.z),this.w=Vt(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=Vt(this.x,e,t),this.y=Vt(this.y,e,t),this.z=Vt(this.z,e,t),this.w=Vt(this.w,e,t),this}clampLength(e,t){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Vt(i,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}},eb=class extends Es{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Wn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=i.depth,this.scissor=new On(0,0,e,t),this.scissorTest=!1,this.viewport=new On(0,0,e,t);let r={width:e,height:t,depth:i.depth},o=new zo(r);this.textures=[];let s=i.count;for(let a=0;a<s;a++)this.textures[a]=o.clone(),this.textures[a].isRenderTargetTexture=!0,this.textures[a].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}_setTextureOptions(e={}){let t={minFilter:Wn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,i=1){if(this.width!==e||this.height!==t||this.depth!==i){this.width=e,this.height=t,this.depth=i;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=e,this.textures[r].image.height=t,this.textures[r].image.depth=i,this.textures[r].isData3DTexture!==!0&&(this.textures[r].isArrayTexture=this.textures[r].image.depth>1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,i=e.textures.length;t<i;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;let r=Object.assign({},e.textures[t].image);this.textures[t].source=new ef(r)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},kr=class extends eb{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}},Pp=class extends zo{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=ui,this.minFilter=ui,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var tb=class extends zo{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=ui,this.minFilter=ui,this.wrapR=Pi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var $i=class{constructor(e=new V(1/0,1/0,1/0),t=new V(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t+=3)this.expandByPoint(Ao.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Ao.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){let i=Ao.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);let i=e.geometry;if(i!==void 0){let o=i.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let s=0,a=o.count;s<a;s++)e.isMesh===!0?e.getVertexPosition(s,Ao):Ao.fromBufferAttribute(o,s),Ao.applyMatrix4(e.matrixWorld),this.expandByPoint(Ao);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Mv.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Mv.copy(i.boundingBox)),Mv.applyMatrix4(e.matrixWorld),this.union(Mv)}let r=e.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Ao),Ao.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(xp),Tv.subVectors(this.max,xp),ku.subVectors(e.a,xp),Fu.subVectors(e.b,xp),Nu.subVectors(e.c,xp),il.subVectors(Fu,ku),rl.subVectors(Nu,Fu),Nc.subVectors(ku,Nu);let t=[0,-il.z,il.y,0,-rl.z,rl.y,0,-Nc.z,Nc.y,il.z,0,-il.x,rl.z,0,-rl.x,Nc.z,0,-Nc.x,-il.y,il.x,0,-rl.y,rl.x,0,-Nc.y,Nc.x,0];return!Jw(t,ku,Fu,Nu,Tv)||(t=[1,0,0,0,1,0,0,0,1],!Jw(t,ku,Fu,Nu,Tv))?!1:(Dv.crossVectors(il,rl),t=[Dv.x,Dv.y,Dv.z],Jw(t,ku,Fu,Nu,Tv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ao).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Ao).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ca[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ca[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ca[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ca[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ca[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ca[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ca[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ca[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ca),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}},ca=[new V,new V,new V,new V,new V,new V,new V,new V],Ao=new V,Mv=new $i,ku=new V,Fu=new V,Nu=new V,il=new V,rl=new V,Nc=new V,xp=new V,Tv=new V,Dv=new V,Lc=new V;function Jw(n,e,t,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){Lc.fromArray(n,o);let a=r.x*Math.abs(Lc.x)+r.y*Math.abs(Lc.y)+r.z*Math.abs(Lc.z),l=e.dot(Lc),c=t.dot(Lc),d=i.dot(Lc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var c9=new $i,_p=new V,Qw=new V,ul=class{constructor(e=new V,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let i=this.center;t!==void 0?i.copy(t):c9.setFromPoints(e).getCenter(i);let r=0;for(let o=0,s=e.length;o<s;o++)r=Math.max(r,i.distanceToSquared(e[o]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){let t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){let i=this.center.distanceToSquared(e);return t.copy(e),i>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;_p.subVectors(e,this.center);let t=_p.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(_p,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Qw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(_p.copy(e.center).add(Qw)),this.expandByPoint(_p.copy(e.center).sub(Qw))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}},da=new V,eE=new V,Iv=new V,ol=new V,tE=new V,Pv=new V,nE=new V,va=class{constructor(e=new V,t=new V(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,da)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=da.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(da.copy(this.origin).addScaledVector(this.direction,t),da.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){eE.copy(e).add(t).multiplyScalar(.5),Iv.copy(t).sub(e).normalize(),ol.copy(this.origin).sub(eE);let o=e.distanceTo(t)*.5,s=-this.direction.dot(Iv),a=ol.dot(this.direction),l=-ol.dot(Iv),c=ol.lengthSq(),d=Math.abs(1-s*s),u,f,h,p;if(d>0)if(u=s*l-a,f=s*a-l,p=o*d,u>=0)if(f>=-p)if(f<=p){let v=1/d;u*=v,f*=v,h=u*(u+s*f+2*a)+f*(s*u+f+2*l)+c}else f=o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f=-o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;else f<=-p?(u=Math.max(0,-(-s*o+a)),f=u>0?-o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c):f<=p?(u=0,f=Math.min(Math.max(-o,-l),o),h=f*(f+2*l)+c):(u=Math.max(0,-(s*o+a)),f=u>0?o:Math.min(Math.max(-o,-l),o),h=-u*u+f*(f+2*l)+c);else f=s>0?-o:o,u=Math.max(0,-(s*f+a)),h=-u*u+f*(f+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(eE).addScaledVector(Iv,f),h}intersectSphere(e,t){da.subVectors(e.center,this.origin);let i=da.dot(this.direction),r=da.dot(da)-i*i,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=i-s,l=i+s;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){let t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;let i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){let i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(i=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(i=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),d>=0?(o=(e.min.y-f.y)*d,s=(e.max.y-f.y)*d):(o=(e.max.y-f.y)*d,s=(e.min.y-f.y)*d),i>s||o>r||((o>i||isNaN(i))&&(i=o),(s<r||isNaN(r))&&(r=s),u>=0?(a=(e.min.z-f.z)*u,l=(e.max.z-f.z)*u):(a=(e.max.z-f.z)*u,l=(e.min.z-f.z)*u),i>l||a>r)||((a>i||i!==i)&&(i=a),(l<r||r!==r)&&(r=l),r<0)?null:this.at(i>=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,da)!==null}intersectTriangle(e,t,i,r,o){tE.subVectors(t,e),Pv.subVectors(i,e),nE.crossVectors(tE,Pv);let s=this.direction.dot(nE),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;ol.subVectors(this.origin,e);let l=a*this.direction.dot(Pv.crossVectors(ol,Pv));if(l<0)return null;let c=a*this.direction.dot(tE.cross(ol));if(c<0||l+c>s)return null;let d=-a*ol.dot(nE);return d<0?null:this.at(d/s,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Mn=class n{constructor(e,t,i,r,o,s,a,l,c,d,u,f,h,p,v,g){n.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,o,s,a,l,c,d,u,f,h,p,v,g)}set(e,t,i,r,o,s,a,l,c,d,u,f,h,p,v,g){let m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=o,m[5]=s,m[9]=a,m[13]=l,m[2]=c,m[6]=d,m[10]=u,m[14]=f,m[3]=h,m[7]=p,m[11]=v,m[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new n().fromArray(this.elements)}copy(e){let t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){let t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){let t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return this.determinant()===0?(e.set(1,0,0),t.set(0,1,0),i.set(0,0,1),this):(e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this)}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){if(e.determinant()===0)return this.identity();let t=this.elements,i=e.elements,r=1/Lu.setFromMatrixColumn(e,0).length(),o=1/Lu.setFromMatrixColumn(e,1).length(),s=1/Lu.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*o,t[5]=i[5]*o,t[6]=i[6]*o,t[7]=0,t[8]=i[8]*s,t[9]=i[9]*s,t[10]=i[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){let t=this.elements,i=e.x,r=e.y,o=e.z,s=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=h+p*c,t[5]=f-v*c,t[9]=-a*l,t[2]=v-f*c,t[6]=p+h*c,t[10]=s*l}else if(e.order==="YXZ"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f+v*a,t[4]=p*a-h,t[8]=s*c,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=h*a-p,t[6]=v+f*a,t[10]=s*l}else if(e.order==="ZXY"){let f=l*d,h=l*u,p=c*d,v=c*u;t[0]=f-v*a,t[4]=-s*u,t[8]=p+h*a,t[1]=h+p*a,t[5]=s*d,t[9]=v-f*a,t[2]=-s*c,t[6]=a,t[10]=s*l}else if(e.order==="ZYX"){let f=s*d,h=s*u,p=a*d,v=a*u;t[0]=l*d,t[4]=p*c-h,t[8]=f*c+v,t[1]=l*u,t[5]=v*c+f,t[9]=h*c-p,t[2]=-c,t[6]=a*l,t[10]=s*l}else if(e.order==="YZX"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=v-f*u,t[8]=p*u+h,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-c*d,t[6]=h*u+p,t[10]=f-v*u}else if(e.order==="XZY"){let f=s*l,h=s*c,p=a*l,v=a*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=f*u+v,t[5]=s*d,t[9]=h*u-p,t[2]=p*u-h,t[6]=a*d,t[10]=v*u+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(d9,e,u9)}lookAt(e,t,i){let r=this.elements;return Ar.subVectors(e,t),Ar.lengthSq()===0&&(Ar.z=1),Ar.normalize(),sl.crossVectors(i,Ar),sl.lengthSq()===0&&(Math.abs(i.z)===1?Ar.x+=1e-4:Ar.z+=1e-4,Ar.normalize(),sl.crossVectors(i,Ar)),sl.normalize(),Av.crossVectors(Ar,sl),r[0]=sl.x,r[4]=Av.x,r[8]=Ar.x,r[1]=sl.y,r[5]=Av.y,r[9]=Ar.y,r[2]=sl.z,r[6]=Av.z,r[10]=Ar.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let i=e.elements,r=t.elements,o=this.elements,s=i[0],a=i[4],l=i[8],c=i[12],d=i[1],u=i[5],f=i[9],h=i[13],p=i[2],v=i[6],g=i[10],m=i[14],b=i[3],y=i[7],x=i[11],_=i[15],E=r[0],D=r[4],O=r[8],S=r[12],I=r[1],L=r[5],H=r[9],G=r[13],X=r[2],Y=r[6],K=r[10],W=r[14],ne=r[3],ye=r[7],xe=r[11],Se=r[15];return o[0]=s*E+a*I+l*X+c*ne,o[4]=s*D+a*L+l*Y+c*ye,o[8]=s*O+a*H+l*K+c*xe,o[12]=s*S+a*G+l*W+c*Se,o[1]=d*E+u*I+f*X+h*ne,o[5]=d*D+u*L+f*Y+h*ye,o[9]=d*O+u*H+f*K+h*xe,o[13]=d*S+u*G+f*W+h*Se,o[2]=p*E+v*I+g*X+m*ne,o[6]=p*D+v*L+g*Y+m*ye,o[10]=p*O+v*H+g*K+m*xe,o[14]=p*S+v*G+g*W+m*Se,o[3]=b*E+y*I+x*X+_*ne,o[7]=b*D+y*L+x*Y+_*ye,o[11]=b*O+y*H+x*K+_*xe,o[15]=b*S+y*G+x*W+_*Se,this}multiplyScalar(e){let t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){let e=this.elements,t=e[0],i=e[4],r=e[8],o=e[12],s=e[1],a=e[5],l=e[9],c=e[13],d=e[2],u=e[6],f=e[10],h=e[14],p=e[3],v=e[7],g=e[11],m=e[15],b=l*h-c*f,y=a*h-c*u,x=a*f-l*u,_=s*h-c*d,E=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-i*(p*b-g*_+m*E)+r*(p*y-v*_+m*D)-o*(p*x-v*E+g*D)}transpose(){let e=this.elements,t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){let r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){let e=this.elements,t=e[0],i=e[1],r=e[2],o=e[3],s=e[4],a=e[5],l=e[6],c=e[7],d=e[8],u=e[9],f=e[10],h=e[11],p=e[12],v=e[13],g=e[14],m=e[15],b=u*g*c-v*f*c+v*l*h-a*g*h-u*l*m+a*f*m,y=p*f*c-d*g*c-p*l*h+s*g*h+d*l*m-s*f*m,x=d*v*c-p*u*c+p*a*h-s*v*h-d*a*m+s*u*m,_=p*u*l-d*v*l-p*a*f+s*v*f+d*a*g-s*u*g,E=t*b+i*y+r*x+o*_;if(E===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/E;return e[0]=b*D,e[1]=(v*f*o-u*g*o-v*r*h+i*g*h+u*r*m-i*f*m)*D,e[2]=(a*g*o-v*l*o+v*r*c-i*g*c-a*r*m+i*l*m)*D,e[3]=(u*l*o-a*f*o-u*r*c+i*f*c+a*r*h-i*l*h)*D,e[4]=y*D,e[5]=(d*g*o-p*f*o+p*r*h-t*g*h-d*r*m+t*f*m)*D,e[6]=(p*l*o-s*g*o-p*r*c+t*g*c+s*r*m-t*l*m)*D,e[7]=(s*f*o-d*l*o+d*r*c-t*f*c-s*r*h+t*l*h)*D,e[8]=x*D,e[9]=(p*u*o-d*v*o-p*i*h+t*v*h+d*i*m-t*u*m)*D,e[10]=(s*v*o-p*a*o+p*i*c-t*v*c-s*i*m+t*a*m)*D,e[11]=(d*a*o-s*u*o-d*i*c+t*u*c+s*i*h-t*a*h)*D,e[12]=_*D,e[13]=(d*v*r-p*u*r+p*i*f-t*v*f-d*i*g+t*u*g)*D,e[14]=(p*a*r-s*v*r-p*i*l+t*v*l+s*i*g-t*a*g)*D,e[15]=(s*u*r-d*a*r+d*i*l-t*u*l-s*i*f+t*a*f)*D,this}scale(e){let t=this.elements,i=e.x,r=e.y,o=e.z;return t[0]*=i,t[4]*=r,t[8]*=o,t[1]*=i,t[5]*=r,t[9]*=o,t[2]*=i,t[6]*=r,t[10]*=o,t[3]*=i,t[7]*=r,t[11]*=o,this}getMaxScaleOnAxis(){let e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let i=Math.cos(t),r=Math.sin(t),o=1-i,s=e.x,a=e.y,l=e.z,c=o*s,d=o*a;return this.set(c*s+i,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+i,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,o,s){return this.set(1,i,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){let r=this.elements,o=t._x,s=t._y,a=t._z,l=t._w,c=o+o,d=s+s,u=a+a,f=o*c,h=o*d,p=o*u,v=s*d,g=s*u,m=a*u,b=l*c,y=l*d,x=l*u,_=i.x,E=i.y,D=i.z;return r[0]=(1-(v+m))*_,r[1]=(h+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(h-x)*E,r[5]=(1-(f+m))*E,r[6]=(g+b)*E,r[7]=0,r[8]=(p+y)*D,r[9]=(g-b)*D,r[10]=(1-(f+v))*D,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){let r=this.elements;if(e.x=r[12],e.y=r[13],e.z=r[14],this.determinant()===0)return i.set(1,1,1),t.identity(),this;let o=Lu.set(r[0],r[1],r[2]).length(),s=Lu.set(r[4],r[5],r[6]).length(),a=Lu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Oo.copy(this);let c=1/o,d=1/s,u=1/a;return Oo.elements[0]*=c,Oo.elements[1]*=c,Oo.elements[2]*=c,Oo.elements[4]*=d,Oo.elements[5]*=d,Oo.elements[6]*=d,Oo.elements[8]*=u,Oo.elements[9]*=u,Oo.elements[10]*=u,t.setFromRotationMatrix(Oo),i.x=o,i.y=s,i.z=a,this}makePerspective(e,t,i,r,o,s,a=ko,l=!1){let c=this.elements,d=2*o/(t-e),u=2*o/(i-r),f=(t+e)/(t-e),h=(i+r)/(i-r),p,v;if(l)p=o/(s-o),v=s*o/(s-o);else if(a===ko)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Ip)p=-s/(s-o),v=-s*o/(s-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=f,c[12]=0,c[1]=0,c[5]=u,c[9]=h,c[13]=0,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,i,r,o,s,a=ko,l=!1){let c=this.elements,d=2/(t-e),u=2/(i-r),f=-(t+e)/(t-e),h=-(i+r)/(i-r),p,v;if(l)p=1/(s-o),v=s/(s-o);else if(a===ko)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Ip)p=-1/(s-o),v=-o/(s-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=d,c[4]=0,c[8]=0,c[12]=f,c[1]=0,c[5]=u,c[9]=0,c[13]=h,c[2]=0,c[6]=0,c[10]=p,c[14]=v,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){let t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){let i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}},Lu=new V,Oo=new Mn,d9=new V(0,0,0),u9=new V(1,1,1),sl=new V,Av=new V,Ar=new V,Uk=new Mn,Bk=new ho,fl=(()=>{class n{constructor(t=0,i=0,r=0,o=n.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=i,this._z=r,this._order=o}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,i,r,o=this._order){return this._x=t,this._y=i,this._z=r,this._order=o,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,i=this._order,r=!0){let o=t.elements,s=o[0],a=o[4],l=o[8],c=o[1],d=o[5],u=o[9],f=o[2],h=o[6],p=o[10];switch(i){case"XYZ":this._y=Math.asin(Vt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,d),this._z=0);break;case"YXZ":this._x=Math.asin(-Vt(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(l,p),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-f,s),this._z=0);break;case"ZXY":this._x=Math.asin(Vt(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-f,p),this._z=Math.atan2(-a,d)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Vt(f,-1,1)),Math.abs(f)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,d));break;case"YZX":this._z=Math.asin(Vt(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-u,d),this._y=Math.atan2(-f,s)):(this._x=0,this._y=Math.atan2(l,p));break;case"XZY":this._z=Math.asin(-Vt(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,d),this._y=Math.atan2(l,s)):(this._x=Math.atan2(-u,p),this._y=0);break;default:ft("Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return Uk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Uk,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return Bk.setFromEuler(this),this.setFromQuaternion(Bk,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],i=0){return t[i]=this._x,t[i+1]=this._y,t[i+2]=this._z,t[i+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return n.DEFAULT_ORDER="XYZ",n})(),tf=class{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}},f9=0,zk=new V,Uu=new ho,ua=new Mn,Ov=new V,Sp=new V,h9=new V,p9=new ho,Vk=new V(1,0,0),Gk=new V(0,1,0),Hk=new V(0,0,1),jk={type:"added"},m9={type:"removed"},Bu={type:"childadded",child:null},iE={type:"childremoved",child:null},Fr=(()=>{class n extends Es{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:f9++}),this.uuid=hf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();let t=new V,i=new fl,r=new ho,o=new V(1,1,1);function s(){r.setFromEuler(i,!1)}function a(){i.setFromQuaternion(r,void 0,!1)}i._onChange(s),r._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:i},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new Mn},normalMatrix:{value:new At}}),this.matrix=new Mn,this.matrixWorld=new Mn,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new tf,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,i){this.quaternion.setFromAxisAngle(t,i)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,i){return Uu.setFromAxisAngle(t,i),this.quaternion.multiply(Uu),this}rotateOnWorldAxis(t,i){return Uu.setFromAxisAngle(t,i),this.quaternion.premultiply(Uu),this}rotateX(t){return this.rotateOnAxis(Vk,t)}rotateY(t){return this.rotateOnAxis(Gk,t)}rotateZ(t){return this.rotateOnAxis(Hk,t)}translateOnAxis(t,i){return zk.copy(t).applyQuaternion(this.quaternion),this.position.add(zk.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(Vk,t)}translateY(t){return this.translateOnAxis(Gk,t)}translateZ(t){return this.translateOnAxis(Hk,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ua.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?Ov.copy(t):Ov.set(t,i,r);let o=this.parent;this.updateWorldMatrix(!0,!1),Sp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ua.lookAt(Sp,Ov,this.up):ua.lookAt(Ov,Sp,this.up),this.quaternion.setFromRotationMatrix(ua),o&&(ua.extractRotation(o.matrixWorld),Uu.setFromRotationMatrix(ua),this.quaternion.premultiply(Uu.invert()))}add(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.add(arguments[i]);return this}return t===this?(mt("Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(jk),Bu.child=t,this.dispatchEvent(Bu),Bu.child=null):mt("Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let i=this.children.indexOf(t);return i!==-1&&(t.parent=null,this.children.splice(i,1),t.dispatchEvent(m9),iE.child=t,this.dispatchEvent(iE),iE.child=null),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ua.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ua.multiply(t.parent.matrixWorld)),t.applyMatrix4(ua),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(jk),Bu.child=t,this.dispatchEvent(Bu),Bu.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,i){if(this[t]===i)return this;for(let r=0,o=this.children.length;r<o;r++){let a=this.children[r].getObjectByProperty(t,i);if(a!==void 0)return a}}getObjectsByProperty(t,i,r=[]){this[t]===i&&r.push(this);let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].getObjectsByProperty(t,i,r);return r}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Sp,t,h9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Sp,p9,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let i=this.matrixWorld.elements;return t.set(i[8],i[9],i[10]).normalize()}raycast(){}traverse(t){t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].traverseVisible(t)}traverseAncestors(t){let i=this.parent;i!==null&&(t(i),i.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);let i=this.children;for(let r=0,o=i.length;r<o;r++)i[r].updateMatrixWorld(t)}updateWorldMatrix(t,i){let r=this.parent;if(t===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),i===!0){let o=this.children;for(let s=0,a=o.length;s<a;s++)o[s].updateWorldMatrix(!1,!0)}}toJSON(t){let i=t===void 0||typeof t=="string",r={};i&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.geometryInfo=this._geometryInfo.map(l=>ue(R({},l),{boundingBox:l.boundingBox?l.boundingBox.toJSON():void 0,boundingSphere:l.boundingSphere?l.boundingSphere.toJSON():void 0})),o.instanceInfo=this._instanceInfo.map(l=>R({},l)),o.availableInstanceIds=this._availableInstanceIds.slice(),o.availableGeometryIds=this._availableGeometryIds.slice(),o.nextIndexStart=this._nextIndexStart,o.nextVertexStart=this._nextVertexStart,o.geometryCount=this._geometryCount,o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.matricesTexture=this._matricesTexture.toJSON(t),o.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(o.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(o.boundingBox=this.boundingBox.toJSON()));function s(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(t)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=s(t.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,u=c.length;d<u;d++){let f=c[d];s(t.shapes,f)}else s(t.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(t.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(s(t.materials,this.material[c]));o.material=l}else o.material=s(t.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(t).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(s(t.animations,c))}}if(i){let l=a(t.geometries),c=a(t.materials),d=a(t.textures),u=a(t.images),f=a(t.shapes),h=a(t.skeletons),p=a(t.animations),v=a(t.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),u.length>0&&(r.images=u),f.length>0&&(r.shapes=f),h.length>0&&(r.skeletons=h),p.length>0&&(r.animations=p),v.length>0&&(r.nodes=v)}return r.object=o,r;function a(l){let c=[];for(let d in l){let u=l[d];delete u.metadata,c.push(u)}return c}}clone(t){return new this.constructor().copy(this,t)}copy(t,i=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),i===!0)for(let r=0;r<t.children.length;r++){let o=t.children[r];this.add(o.clone())}return this}}return n.DEFAULT_UP=new V(0,1,0),n.DEFAULT_MATRIX_AUTO_UPDATE=!0,n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,n})(),Ro=new V,fa=new V,rE=new V,ha=new V,zu=new V,Vu=new V,Wk=new V,oE=new V,sE=new V,aE=new V,lE=new On,cE=new On,dE=new On,cl=class n{constructor(e=new V,t=new V,i=new V){this.a=e,this.b=t,this.c=i}static getNormal(e,t,i,r){r.subVectors(i,t),Ro.subVectors(e,t),r.cross(Ro);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,i,r,o){Ro.subVectors(r,t),fa.subVectors(i,t),rE.subVectors(e,t);let s=Ro.dot(Ro),a=Ro.dot(fa),l=Ro.dot(rE),c=fa.dot(fa),d=fa.dot(rE),u=s*c-a*a;if(u===0)return o.set(0,0,0),null;let f=1/u,h=(c*l-a*d)*f,p=(s*d-a*l)*f;return o.set(1-h-p,p,h)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,ha)===null?!1:ha.x>=0&&ha.y>=0&&ha.x+ha.y<=1}static getInterpolation(e,t,i,r,o,s,a,l){return this.getBarycoord(e,t,i,r,ha)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,ha.x),l.addScaledVector(s,ha.y),l.addScaledVector(a,ha.z),l)}static getInterpolatedAttribute(e,t,i,r,o,s){return lE.setScalar(0),cE.setScalar(0),dE.setScalar(0),lE.fromBufferAttribute(e,t),cE.fromBufferAttribute(e,i),dE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(lE,o.x),s.addScaledVector(cE,o.y),s.addScaledVector(dE,o.z),s}static isFrontFacing(e,t,i,r){return Ro.subVectors(i,t),fa.subVectors(e,t),Ro.cross(fa).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ro.subVectors(this.c,this.b),fa.subVectors(this.a,this.b),Ro.cross(fa).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return n.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return n.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,o){return n.getInterpolation(e,this.a,this.b,this.c,t,i,r,o)}containsPoint(e){return n.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return n.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let i=this.a,r=this.b,o=this.c,s,a;zu.subVectors(r,i),Vu.subVectors(o,i),oE.subVectors(e,i);let l=zu.dot(oE),c=Vu.dot(oE);if(l<=0&&c<=0)return t.copy(i);sE.subVectors(e,r);let d=zu.dot(sE),u=Vu.dot(sE);if(d>=0&&u<=d)return t.copy(r);let f=l*u-d*c;if(f<=0&&l>=0&&d<=0)return s=l/(l-d),t.copy(i).addScaledVector(zu,s);aE.subVectors(e,o);let h=zu.dot(aE),p=Vu.dot(aE);if(p>=0&&h<=p)return t.copy(o);let v=h*c-l*p;if(v<=0&&c>=0&&p<=0)return a=c/(c-p),t.copy(i).addScaledVector(Vu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return Wk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(Wk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(i).addScaledVector(zu,s).addScaledVector(Vu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},VF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},al={h:0,s:0,l:0},Rv={h:0,s:0,l:0};function uE(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}var _t=class{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){let r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=vn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,zt.colorSpaceToWorking(this,t),this}setRGB(e,t,i,r=zt.workingColorSpace){return this.r=e,this.g=t,this.b=i,zt.colorSpaceToWorking(this,r),this}setHSL(e,t,i,r=zt.workingColorSpace){if(e=KE(e,1),t=Vt(t,0,1),i=Vt(i,0,1),t===0)this.r=this.g=this.b=i;else{let o=i<=.5?i*(1+t):i+t-i*t,s=2*i-o;this.r=uE(s,o,e+1/3),this.g=uE(s,o,e),this.b=uE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=vn){function i(o){o!==void 0&&parseFloat(o)<1&&ft("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let o,s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:ft("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(s===6)return this.setHex(parseInt(o,16),t);ft("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=vn){let i=VF[e.toLowerCase()];return i!==void 0?this.setHex(i,t):ft("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=ga(e.r),this.g=ga(e.g),this.b=ga(e.b),this}copyLinearToSRGB(e){return this.r=Xu(e.r),this.g=Xu(e.g),this.b=Xu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=vn){return zt.workingToColorSpace(Ii.copy(this),e),Math.round(Vt(Ii.r*255,0,255))*65536+Math.round(Vt(Ii.g*255,0,255))*256+Math.round(Vt(Ii.b*255,0,255))}getHexString(e=vn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Ii.copy(this),t);let i=Ii.r,r=Ii.g,o=Ii.b,s=Math.max(i,r,o),a=Math.min(i,r,o),l,c,d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case i:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-i)/u+2;break;case o:l=(i-r)/u+4;break}l/=6}return e.h=l,e.s=c,e.l=d,e}getRGB(e,t=zt.workingColorSpace){return zt.workingToColorSpace(Ii.copy(this),t),e.r=Ii.r,e.g=Ii.g,e.b=Ii.b,e}getStyle(e=vn){zt.workingToColorSpace(Ii.copy(this),e);let t=Ii.r,i=Ii.g,r=Ii.b;return e!==vn?`color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,t,i){return this.getHSL(al),this.setHSL(al.h+e,al.s+t,al.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,i){return this.r=e.r+(t.r-e.r)*i,this.g=e.g+(t.g-e.g)*i,this.b=e.b+(t.b-e.b)*i,this}lerpHSL(e,t){this.getHSL(al),e.getHSL(Rv);let i=Mp(al.h,Rv.h,t),r=Mp(al.s,Rv.s,t),o=Mp(al.l,Rv.l,t);return this.setHSL(i,r,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){let t=this.r,i=this.g,r=this.b,o=e.elements;return this.r=o[0]*t+o[3]*i+o[6]*r,this.g=o[1]*t+o[4]*i+o[7]*r,this.b=o[2]*t+o[5]*i+o[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},Ii=new _t;_t.NAMES=VF;var g9=0,Nr=class extends Es{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:g9++}),this.uuid=hf(),this.name="",this.type="Material",this.blending=Vc,this.side=Fo,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=qv,this.blendDst=Kv,this.blendEquation=dl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _t(0,0,0),this.blendAlpha=0,this.depthFunc=Gc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=_E,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=zc,this.stencilZFail=zc,this.stencilZPass=zc,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let i=e[t];if(i===void 0){ft(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){ft(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Vc&&(i.blending=this.blending),this.side!==Fo&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==qv&&(i.blendSrc=this.blendSrc),this.blendDst!==Kv&&(i.blendDst=this.blendDst),this.blendEquation!==dl&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==Gc&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==_E&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==zc&&(i.stencilFail=this.stencilFail),this.stencilZFail!==zc&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==zc&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.allowOverride===!1&&(i.allowOverride=!1),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(i.textures=o),s.length>0&&(i.images=s)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;let t=e.clippingPlanes,i=null;if(t!==null){let r=t.length;i=new Array(r);for(let o=0;o!==r;++o)i[o]=t[o].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}},Ap=class extends Nr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new fl,this.combine=Db,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}};var Jn=new V,kv=new gt,v9=0,Rr=class{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:v9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=SE,this.updateRanges=[],this.gpuType=Bo,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[e+r]=t.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,i=this.count;t<i;t++)kv.fromBufferAttribute(this,t),kv.applyMatrix3(e),this.setXY(t,kv.x,kv.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix3(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.applyMatrix4(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.applyNormalMatrix(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Jn.fromBufferAttribute(this,t),Jn.transformDirection(e),this.setXYZ(t,Jn.x,Jn.y,Jn.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let i=this.array[e*this.itemSize+t];return this.normalized&&(i=$u(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=Wi(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=$u(t,this.array)),t}setX(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=$u(t,this.array)),t}setY(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=$u(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=$u(t,this.array)),t}setW(e,t){return this.normalized&&(t=Wi(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=Wi(t,this.array),i=Wi(i,this.array)),this.array[e+0]=t,this.array[e+1]=i,this}setXYZ(e,t,i,r){return e*=this.itemSize,this.normalized&&(t=Wi(t,this.array),i=Wi(i,this.array),r=Wi(r,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,t,i,r,o){return e*=this.itemSize,this.normalized&&(t=Wi(t,this.array),i=Wi(i,this.array),r=Wi(r,this.array),o=Wi(o,this.array)),this.array[e+0]=t,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==SE&&(e.usage=this.usage),e}};var Op=class extends Rr{constructor(e,t,i){super(new Uint16Array(e),t,i)}};var Rp=class extends Rr{constructor(e,t,i){super(new Uint32Array(e),t,i)}};var jn=class extends Rr{constructor(e,t,i){super(new Float32Array(e),t,i)}},b9=0,uo=new Mn,fE=new Fr,Gu=new V,Or=new $i,Cp=new $i,ci=new V,Xi=class n extends Es{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:b9++}),this.uuid=hf(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(YE(e)?Rp:Op)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,i=0){this.groups.push({start:e,count:t,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){let t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);let i=this.attributes.normal;if(i!==void 0){let o=new At().getNormalMatrix(e);i.applyNormalMatrix(o),i.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return uo.makeRotationFromQuaternion(e),this.applyMatrix4(uo),this}rotateX(e){return uo.makeRotationX(e),this.applyMatrix4(uo),this}rotateY(e){return uo.makeRotationY(e),this.applyMatrix4(uo),this}rotateZ(e){return uo.makeRotationZ(e),this.applyMatrix4(uo),this}translate(e,t,i){return uo.makeTranslation(e,t,i),this.applyMatrix4(uo),this}scale(e,t,i){return uo.makeScale(e,t,i),this.applyMatrix4(uo),this}lookAt(e){return fE.lookAt(e),fE.updateMatrix(),this.applyMatrix4(fE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Gu).negate(),this.translate(Gu.x,Gu.y,Gu.z),this}setFromPoints(e){let t=this.getAttribute("position");if(t===void 0){let i=[];for(let r=0,o=e.length;r<o;r++){let s=e[r];i.push(s.x,s.y,s.z||0)}this.setAttribute("position",new jn(i,3))}else{let i=Math.min(e.length,t.count);for(let r=0;r<i;r++){let o=e[r];t.setXYZ(r,o.x,o.y,o.z||0)}e.length>t.count&&ft("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new $i);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){mt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new V(-1/0,-1/0,-1/0),new V(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let i=0,r=t.length;i<r;i++){let o=t[i];Or.setFromBufferAttribute(o),this.morphTargetsRelative?(ci.addVectors(this.boundingBox.min,Or.min),this.boundingBox.expandByPoint(ci),ci.addVectors(this.boundingBox.max,Or.max),this.boundingBox.expandByPoint(ci)):(this.boundingBox.expandByPoint(Or.min),this.boundingBox.expandByPoint(Or.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&mt('BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new ul);let e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){mt("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new V,1/0);return}if(e){let i=this.boundingSphere.center;if(Or.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];Cp.setFromBufferAttribute(a),this.morphTargetsRelative?(ci.addVectors(Or.min,Cp.min),Or.expandByPoint(ci),ci.addVectors(Or.max,Cp.max),Or.expandByPoint(ci)):(Or.expandByPoint(Cp.min),Or.expandByPoint(Cp.max))}Or.getCenter(i);let r=0;for(let o=0,s=e.count;o<s;o++)ci.fromBufferAttribute(e,o),r=Math.max(r,i.distanceToSquared(ci));if(t)for(let o=0,s=t.length;o<s;o++){let a=t[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)ci.fromBufferAttribute(a,c),l&&(Gu.fromBufferAttribute(e,c),ci.add(Gu)),r=Math.max(r,i.distanceToSquared(ci))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&mt('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){mt("BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let i=t.position,r=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Rr(new Float32Array(4*i.count),4));let s=this.getAttribute("tangent"),a=[],l=[];for(let O=0;O<i.count;O++)a[O]=new V,l[O]=new V;let c=new V,d=new V,u=new V,f=new gt,h=new gt,p=new gt,v=new V,g=new V;function m(O,S,I){c.fromBufferAttribute(i,O),d.fromBufferAttribute(i,S),u.fromBufferAttribute(i,I),f.fromBufferAttribute(o,O),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,I),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let L=1/(h.x*p.y-p.x*h.y);isFinite(L)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(L),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(L),a[O].add(v),a[S].add(v),a[I].add(v),l[O].add(g),l[S].add(g),l[I].add(g))}let b=this.groups;b.length===0&&(b=[{start:0,count:e.count}]);for(let O=0,S=b.length;O<S;++O){let I=b[O],L=I.start,H=I.count;for(let G=L,X=L+H;G<X;G+=3)m(e.getX(G+0),e.getX(G+1),e.getX(G+2))}let y=new V,x=new V,_=new V,E=new V;function D(O){_.fromBufferAttribute(r,O),E.copy(_);let S=a[O];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(E,S);let L=x.dot(l[O])<0?-1:1;s.setXYZW(O,y.x,y.y,y.z,L)}for(let O=0,S=b.length;O<S;++O){let I=b[O],L=I.start,H=I.count;for(let G=L,X=L+H;G<X;G+=3)D(e.getX(G+0)),D(e.getX(G+1)),D(e.getX(G+2))}}computeVertexNormals(){let e=this.index,t=this.getAttribute("position");if(t!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Rr(new Float32Array(t.count*3),3),this.setAttribute("normal",i);else for(let f=0,h=i.count;f<h;f++)i.setXYZ(f,0,0,0);let r=new V,o=new V,s=new V,a=new V,l=new V,c=new V,d=new V,u=new V;if(e)for(let f=0,h=e.count;f<h;f+=3){let p=e.getX(f+0),v=e.getX(f+1),g=e.getX(f+2);r.fromBufferAttribute(t,p),o.fromBufferAttribute(t,v),s.fromBufferAttribute(t,g),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(i,p),l.fromBufferAttribute(i,v),c.fromBufferAttribute(i,g),a.add(d),l.add(d),c.add(d),i.setXYZ(p,a.x,a.y,a.z),i.setXYZ(v,l.x,l.y,l.z),i.setXYZ(g,c.x,c.y,c.z)}else for(let f=0,h=t.count;f<h;f+=3)r.fromBufferAttribute(t,f+0),o.fromBufferAttribute(t,f+1),s.fromBufferAttribute(t,f+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),i.setXYZ(f+0,d.x,d.y,d.z),i.setXYZ(f+1,d.x,d.y,d.z),i.setXYZ(f+2,d.x,d.y,d.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){let e=this.attributes.normal;for(let t=0,i=e.count;t<i;t++)ci.fromBufferAttribute(e,t),ci.normalize(),e.setXYZ(t,ci.x,ci.y,ci.z)}toNonIndexed(){function e(a,l){let c=a.array,d=a.itemSize,u=a.normalized,f=new c.constructor(l.length*d),h=0,p=0;for(let v=0,g=l.length;v<g;v++){a.isInterleavedBufferAttribute?h=l[v]*a.data.stride+a.offset:h=l[v]*d;for(let m=0;m<d;m++)f[p++]=c[h++]}return new Rr(f,d,u)}if(this.index===null)return ft("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let t=new n,i=this.index.array,r=this.attributes;for(let a in r){let l=r[a],c=e(l,i);t.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=c[d],h=e(f,i);l.push(h)}t.morphAttributes[a]=l}t.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];t.addGroup(c.start,c.count,c.materialIndex)}return t}toJSON(){let e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};let t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});let i=this.attributes;for(let l in i){let c=i[l];e.data.attributes[l]=c.toJSON(e.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,f=c.length;u<f;u++){let h=c[u];d.push(h.toJSON(e.data))}d.length>0&&(r[l]=d,o=!0)}o&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(e.data.boundingSphere=a.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let t={};this.name=e.name;let i=e.index;i!==null&&this.setIndex(i.clone());let r=e.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(t))}let o=e.morphAttributes;for(let c in o){let d=[],u=o[c];for(let f=0,h=u.length;f<h;f++)d.push(u[f].clone(t));this.morphAttributes[c]=d}this.morphTargetsRelative=e.morphTargetsRelative;let s=e.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}let a=e.boundingBox;a!==null&&(this.boundingBox=a.clone());let l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},$k=new Mn,Uc=new va,Fv=new ul,Xk=new V,Nv=new V,Lv=new V,Uv=new V,hE=new V,Bv=new V,Yk=new V,zv=new V,Yi=class extends Fr{constructor(e=new Xi,t=new Ap){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){let t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){let r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}getVertexPosition(e,t){let i=this.geometry,r=i.attributes.position,o=i.morphAttributes.position,s=i.morphTargetsRelative;t.fromBufferAttribute(r,e);let a=this.morphTargetInfluences;if(o&&a){Bv.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(hE.fromBufferAttribute(u,e),s?Bv.addScaledVector(hE,d):Bv.addScaledVector(hE.sub(t),d))}t.add(Bv)}return t}raycast(e,t){let i=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),Fv.copy(i.boundingSphere),Fv.applyMatrix4(o),Uc.copy(e.ray).recast(e.near),!(Fv.containsPoint(Uc.origin)===!1&&(Uc.intersectSphere(Fv,Xk)===null||Uc.origin.distanceToSquared(Xk)>(e.far-e.near)**2))&&($k.copy(o).invert(),Uc.copy(e.ray).applyMatrix4($k),!(i.boundingBox!==null&&Uc.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Uc)))}_computeIntersections(e,t,i){let r,o=this.geometry,s=this.material,a=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,u=o.attributes.normal,f=o.groups,h=o.drawRange;if(a!==null)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(a.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=a.getX(x),D=a.getX(x+1),O=a.getX(x+2);r=Vv(this,m,e,i,c,d,u,E,D,O),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(a.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=a.getX(g),y=a.getX(g+1),x=a.getX(g+2);r=Vv(this,s,e,i,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}else if(l!==void 0)if(Array.isArray(s))for(let p=0,v=f.length;p<v;p++){let g=f[p],m=s[g.materialIndex],b=Math.max(g.start,h.start),y=Math.min(l.count,Math.min(g.start+g.count,h.start+h.count));for(let x=b,_=y;x<_;x+=3){let E=x,D=x+1,O=x+2;r=Vv(this,m,e,i,c,d,u,E,D,O),r&&(r.faceIndex=Math.floor(x/3),r.face.materialIndex=g.materialIndex,t.push(r))}}else{let p=Math.max(0,h.start),v=Math.min(l.count,h.start+h.count);for(let g=p,m=v;g<m;g+=3){let b=g,y=g+1,x=g+2;r=Vv(this,s,e,i,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function y9(n,e,t,i,r,o,s,a){let l;if(e.side===qi?l=i.intersectTriangle(s,o,r,!0,a):l=i.intersectTriangle(r,o,s,e.side===Fo,a),l===null)return null;zv.copy(a),zv.applyMatrix4(n.matrixWorld);let c=t.ray.origin.distanceTo(zv);return c<t.near||c>t.far?null:{distance:c,point:zv.clone(),object:n}}function Vv(n,e,t,i,r,o,s,a,l,c){n.getVertexPosition(a,Nv),n.getVertexPosition(l,Lv),n.getVertexPosition(c,Uv);let d=y9(n,e,t,i,Nv,Lv,Uv,Yk);if(d){let u=new V;cl.getBarycoord(Yk,Nv,Lv,Uv,u),r&&(d.uv=cl.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=cl.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=cl.getInterpolatedAttribute(s,a,l,c,u,new V),d.normal.dot(i.direction)>0&&d.normal.multiplyScalar(-1));let f={a,b:l,c,normal:new V,materialIndex:0};cl.getNormal(Nv,Lv,Uv,f.normal),d.face=f,d.barycoord=u}return d}var nf=class n extends Xi{constructor(e=1,t=1,i=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],f=0,h=0;p("z","y","x",-1,-1,i,t,e,s,o,0),p("z","y","x",1,-1,i,t,-e,s,o,1),p("x","z","y",1,1,e,i,t,r,s,2),p("x","z","y",1,-1,e,i,-t,r,s,3),p("x","y","z",1,-1,e,t,i,r,o,4),p("x","y","z",-1,-1,e,t,-i,r,o,5),this.setIndex(l),this.setAttribute("position",new jn(c,3)),this.setAttribute("normal",new jn(d,3)),this.setAttribute("uv",new jn(u,2));function p(v,g,m,b,y,x,_,E,D,O,S){let I=x/D,L=_/O,H=x/2,G=_/2,X=E/2,Y=D+1,K=O+1,W=0,ne=0,ye=new V;for(let xe=0;xe<K;xe++){let Se=xe*L-G;for(let et=0;et<Y;et++){let pt=et*I-H;ye[v]=pt*b,ye[g]=Se*y,ye[m]=X,c.push(ye.x,ye.y,ye.z),ye[v]=0,ye[g]=0,ye[m]=E>0?1:-1,d.push(ye.x,ye.y,ye.z),u.push(et/D),u.push(1-xe/O),W+=1}}for(let xe=0;xe<O;xe++)for(let Se=0;Se<D;Se++){let et=f+Se+Y*xe,pt=f+Se+Y*(xe+1),Wt=f+(Se+1)+Y*(xe+1),Kt=f+(Se+1)+Y*xe;l.push(et,pt,Kt),l.push(pt,Wt,Kt),ne+=6}a.addGroup(h,ne,S),h+=ne,f+=W}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new n(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}};function ed(n){let e={};for(let t in n){e[t]={};for(let i in n[t]){let r=n[t][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(ft("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][i]=null):e[t][i]=r.clone():Array.isArray(r)?e[t][i]=r.slice():e[t][i]=r}}return e}function Ai(n){let e={};for(let t=0;t<n.length;t++){let i=ed(n[t]);for(let r in i)e[r]=i[r]}return e}function x9(n){let e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function ZE(n){let e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var GF={clone:ed,merge:Ai},_9=`void main() {
|
|
6
6
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
7
7
|
}`,S9=`void main() {
|
|
8
8
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|