@pixeasy/customizer 0.0.5-beta.0 → 0.0.6-beta.0

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 a4=Object.defineProperty,l4=Object.defineProperties;var c4=Object.getOwnProp
2
2
  ${t.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
3
3
  `)}`:"",this.name="UnsubscriptionError",this.errors=t});function sh(n,e){if(n){let t=n.indexOf(e);0<=t&&n.splice(t,1)}}var Ni=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(Rt(i))try{i()}catch(o){e=o instanceof jm?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{ID(o)}catch(s){e=e??[],s instanceof jm?e=[...e,...s.errors]:e.push(s)}}if(e)throw new jm(e)}}add(e){var t;if(e&&e!==this)if(this.closed)ID(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)&&sh(t,e)}remove(e){let{_finalizers:t}=this;t&&sh(t,e),e instanceof n&&e._removeParent(this)}};Ni.EMPTY=(()=>{let n=new Ni;return n.closed=!0,n})();var B_=Ni.EMPTY;function Wm(n){return n instanceof Ni||n&&"closed"in n&&Rt(n.remove)&&Rt(n.add)&&Rt(n.unsubscribe)}function ID(n){Rt(n)?n():n.unsubscribe()}var xo={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Gd={setTimeout(n,e,...t){let{delegate:i}=Gd;return i?.setTimeout?i.setTimeout(n,e,...t):setTimeout(n,e,...t)},clearTimeout(n){let{delegate:e}=Gd;return(e?.clearTimeout||clearTimeout)(n)},delegate:void 0};function $m(n){Gd.setTimeout(()=>{let{onUnhandledError:e}=xo;if(e)e(n);else throw n})}function z_(){}var PD=V_("C",void 0,void 0);function AD(n){return V_("E",void 0,n)}function OD(n){return V_("N",n,void 0)}function V_(n,e,t){return{kind:n,value:e,error:t}}var ic=null;function Hd(n){if(xo.useDeprecatedSynchronousErrorHandling){let e=!ic;if(e&&(ic={errorThrown:!1,error:null}),n(),e){let{errorThrown:t,error:i}=ic;if(ic=null,t)throw i}}else n()}function RD(n){xo.useDeprecatedSynchronousErrorHandling&&ic&&(ic.errorThrown=!0,ic.error=n)}var rc=class extends Ni{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,Wm(e)&&e.add(this)):this.destination=x4}static create(e,t,i){return new ka(e,t,i)}next(e){this.isStopped?H_(OD(e),this):this._next(e)}error(e){this.isStopped?H_(AD(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?H_(PD,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()}}},b4=Function.prototype.bind;function G_(n,e){return b4.call(n,e)}var j_=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(i){Xm(i)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(i){Xm(i)}else Xm(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){Xm(t)}}},ka=class extends rc{constructor(e,t,i){super();let r;if(Rt(e)||!e)r={next:e??void 0,error:t??void 0,complete:i??void 0};else{let o;this&&xo.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&G_(e.next,o),error:e.error&&G_(e.error,o),complete:e.complete&&G_(e.complete,o)}):r=e}this.destination=new j_(r)}};function Xm(n){xo.useDeprecatedSynchronousErrorHandling?RD(n):$m(n)}function y4(n){throw n}function H_(n,e){let{onStoppedNotification:t}=xo;t&&Gd.setTimeout(()=>t(n,e))}var x4={closed:!0,next:z_,error:y4,complete:z_};var jd=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Ym(n){return n}function kD(n){return n.length===0?Ym:n.length===1?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}var Cn=(()=>{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=S4(t)?t:new ka(t,i,r);return Hd(()=>{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=FD(i),new i((r,o)=>{let s=new ka({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)}[jd](){return this}pipe(...t){return kD(t)(this)}toPromise(t){return t=FD(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 FD(n){var e;return(e=n??xo.Promise)!==null&&e!==void 0?e:Promise}function _4(n){return n&&Rt(n.next)&&Rt(n.error)&&Rt(n.complete)}function S4(n){return n&&n instanceof rc||_4(n)&&Wm(n)}function C4(n){return Rt(n?.lift)}function ii(n){return e=>{if(C4(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 ri(n,e,t,i,r){return new W_(n,e,t,i,r)}var W_=class extends rc{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 ND=Vd(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var _o=(()=>{class n extends Cn{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let i=new qm(this,this);return i.operator=t,i}_throwIfClosed(){if(this.closed)throw new ND}next(t){Hd(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(t)}})}error(t){Hd(()=>{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(){Hd(()=>{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?B_:(this.currentObservers=null,o.push(t),new Ni(()=>{this.currentObservers=null,sh(o,t)}))}_checkFinalizedStatuses(t){let{hasError:i,thrownError:r,isStopped:o}=this;i?t.error(r):o&&t.complete()}asObservable(){let t=new Cn;return t.source=this,t}}return n.create=(e,t)=>new qm(e,t),n})(),qm=class extends _o{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:B_}};var ah=class extends _o{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 LD(n){return n&&Rt(n.schedule)}function UD(n){return n[n.length-1]}function BD(n){return Rt(UD(n))?n.pop():void 0}function zD(n){return LD(UD(n))?n.pop():void 0}function GD(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 VD(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 oc(n){return this instanceof oc?(this.v=n,this):new oc(n)}function HD(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 oc?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 jD(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 VD=="function"?VD(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 Km=n=>n&&typeof n.length=="number"&&typeof n!="function";function Zm(n){return Rt(n?.then)}function Jm(n){return Rt(n[jd])}function Qm(n){return Symbol.asyncIterator&&Rt(n?.[Symbol.asyncIterator])}function eg(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 w4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var tg=w4();function ng(n){return Rt(n?.[tg])}function ig(n){return HD(this,arguments,function*(){let t=n.getReader();try{for(;;){let{value:i,done:r}=yield oc(t.read());if(r)return yield oc(void 0);yield yield oc(i)}}finally{t.releaseLock()}})}function rg(n){return Rt(n?.getReader)}function Si(n){if(n instanceof Cn)return n;if(n!=null){if(Jm(n))return E4(n);if(Km(n))return M4(n);if(Zm(n))return T4(n);if(Qm(n))return WD(n);if(ng(n))return D4(n);if(rg(n))return I4(n)}throw eg(n)}function E4(n){return new Cn(e=>{let t=n[jd]();if(Rt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function M4(n){return new Cn(e=>{for(let t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}function T4(n){return new Cn(e=>{n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,$m)})}function D4(n){return new Cn(e=>{for(let t of n)if(e.next(t),e.closed)return;e.complete()})}function WD(n){return new Cn(e=>{P4(n,e).catch(t=>e.error(t))})}function I4(n){return WD(ig(n))}function P4(n,e){var t,i,r,o;return GD(this,void 0,void 0,function*(){try{for(t=jD(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 qr(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 og(n,e=0){return ii((t,i)=>{t.subscribe(ri(i,r=>qr(i,n,()=>i.next(r),e),()=>qr(i,n,()=>i.complete(),e),r=>qr(i,n,()=>i.error(r),e)))})}function sg(n,e=0){return ii((t,i)=>{i.add(n.schedule(()=>t.subscribe(i),e))})}function $D(n,e){return Si(n).pipe(sg(e),og(e))}function XD(n,e){return Si(n).pipe(sg(e),og(e))}function YD(n,e){return new Cn(t=>{let i=0;return e.schedule(function(){i===n.length?t.complete():(t.next(n[i++]),t.closed||this.schedule())})})}function qD(n,e){return new Cn(t=>{let i;return qr(t,e,()=>{i=n[tg](),qr(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)}),()=>Rt(i?.return)&&i.return()})}function ag(n,e){if(!n)throw new Error("Iterable cannot be null");return new Cn(t=>{qr(t,e,()=>{let i=n[Symbol.asyncIterator]();qr(t,e,()=>{i.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function KD(n,e){return ag(ig(n),e)}function ZD(n,e){if(n!=null){if(Jm(n))return $D(n,e);if(Km(n))return YD(n,e);if(Zm(n))return XD(n,e);if(Qm(n))return ag(n,e);if(ng(n))return qD(n,e);if(rg(n))return KD(n,e)}throw eg(n)}function lh(n,e){return e?ZD(n,e):Si(n)}function is(...n){let e=zD(n);return lh(n,e)}function Fa(n,e){let t=Rt(n)?n:()=>n,i=r=>r.error(t());return new Cn(e?r=>e.schedule(i,0,r):i)}var JD=Vd(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function sc(n,e){let t=typeof e=="object";return new Promise((i,r)=>{let o=new ka({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{t?i(e.defaultValue):r(new JD)}});n.subscribe(o)})}function nr(n,e){return ii((t,i)=>{let r=0;t.subscribe(ri(i,o=>{i.next(n.call(e,o,r++))}))})}var{isArray:A4}=Array;function O4(n,e){return A4(e)?n(...e):n(e)}function QD(n){return nr(e=>O4(n,e))}var{isArray:R4}=Array,{getPrototypeOf:k4,prototype:F4,keys:N4}=Object;function eI(n){if(n.length===1){let e=n[0];if(R4(e))return{args:e,keys:null};if(L4(e)){let t=N4(e);return{args:t.map(i=>e[i]),keys:t}}}return{args:n,keys:null}}function L4(n){return n&&typeof n=="object"&&k4(n)===F4}function tI(n,e){return n.reduce((t,i,r)=>(t[i]=e[r],t),{})}function nI(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;Si(t(v,d++)).subscribe(ri(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?qr(e,s,()=>p(m)):p(m)}f()}catch(m){e.error(m)}}))};return n.subscribe(ri(e,h,()=>{u=!0,f()})),()=>{a?.()}}function lg(n,e,t=1/0){return Rt(e)?lg((i,r)=>nr((o,s)=>e(i,o,r,s))(Si(n(i,r))),t):(typeof e=="number"&&(t=e),ii((i,r)=>nI(i,r,n,t)))}function $_(...n){let e=BD(n),{args:t,keys:i}=eI(n),r=new Cn(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;Si(t[d]).subscribe(ri(o,f=>{u||(u=!0,c--),a[d]=f},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(i?tI(i,a):a),o.complete())}))}});return e?r.pipe(QD(e)):r}function X_(n,e){return ii((t,i)=>{let r=0;t.subscribe(ri(i,o=>n.call(e,o,r++)&&i.next(o)))})}function ac(n){return ii((e,t)=>{let i=null,r=!1,o;i=e.subscribe(ri(t,void 0,void 0,s=>{o=Si(n(s,ac(n)(e))),i?(i.unsubscribe(),i=null,o.subscribe(t)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(t))})}function Y_(n,e){return Rt(e)?lg(n,e,1):lg(n,1)}function ch(n){return ii((e,t)=>{try{e.subscribe(t)}finally{t.add(n)}})}function q_(n,e){return ii((t,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();t.subscribe(ri(i,l=>{r?.unsubscribe();let c=0,d=o++;Si(n(l,d)).subscribe(r=ri(i,u=>i.next(e?e(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function K_(n,e,t){let i=Rt(n)||e||t?{next:n,error:e,complete:t}:n;return i?ii((r,o)=>{var s;(s=i.subscribe)===null||s===void 0||s.call(i);let a=!0;r.subscribe(ri(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)}))}):Ym}var Z_;function cg(){return Z_}function rs(n){let e=Z_;return Z_=n,e}var iI=Symbol("NotFound");function Wd(n){return n===iI||n?.name==="\u0275NotFound"}function rI(n){let e=st(null);try{return n()}finally{st(e)}}var gg="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",je=class extends Error{code;constructor(e,t){super(Ws(e,t)),this.code=e}};function U4(n){return`NG0${Math.abs(n)}`}function Ws(n,e){return`${U4(n)}${e?": "+e:""}`}var Zr=globalThis;function fn(n){for(let e in n)if(n[e]===fn)return e;throw Error("")}function cI(n,e){for(let t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function vg(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(vg).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 bg(n,e){return n?e?`${n} ${e}`:n:e||""}var B4=fn({__forward_ref__:fn});function Ui(n){return n.__forward_ref__=Ui,n}function gi(n){return dS(n)?n():n}function dS(n){return typeof n=="function"&&n.hasOwnProperty(B4)&&n.__forward_ref__===Ui}function ye(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function ss(n){return{providers:n.providers||[],imports:n.imports||[]}}function yg(n){return z4(n,xg)}function z4(n,e){return n.hasOwnProperty(e)&&n[e]||null}function V4(n){let e=n?.[xg]??null;return e||null}function Q_(n){return n&&n.hasOwnProperty(ug)?n[ug]:null}var xg=fn({\u0275prov:fn}),ug=fn({\u0275inj:fn}),He=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=ye({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function uS(n){return n&&!!n.\u0275providers}var fS=fn({\u0275cmp:fn}),hS=fn({\u0275dir:fn}),pS=fn({\u0275pipe:fn});var uh=fn({\u0275fac:fn}),fc=fn({__NG_ELEMENT_ID__:fn}),oI=fn({__NG_ENV_ID__:fn});function $s(n){return gS(n,"@Component"),n[fS]||null}function _g(n){return gS(n,"@Directive"),n[hS]||null}function mS(n){return gS(n,"@Pipe"),n[pS]||null}function gS(n,e){if(n==null)throw new je(-919,!1)}function gh(n){return typeof n=="string"?n:n==null?"":String(n)}var dI=fn({ngErrorCode:fn}),G4=fn({ngErrorMessage:fn}),H4=fn({ngTokenPath:fn});function vS(n,e){return uI("",-200,e)}function Sg(n,e){throw new je(-201,!1)}function uI(n,e,t){let i=new je(e,n);return i[dI]=e,i[G4]=n,t&&(i[H4]=t),i}function j4(n){return n[dI]}var eS;function fI(){return eS}function Li(n){let e=eS;return eS=n,e}function bS(n,e,t){let i=yg(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;Sg(n,"")}var W4={},lc=W4,$4="__NG_DI_FLAG__",tS=class{injector;constructor(e){this.injector=e}retrieve(e,t){let i=cc(t)||0;try{return this.injector.get(e,i&8?null:lc,i)}catch(r){if(Wd(r))return r;throw r}}};function X4(n,e=0){let t=cg();if(t===void 0)throw new je(-203,!1);if(t===null)return bS(n,void 0,e);{let i=Y4(e),r=t.retrieve(n,i);if(Wd(r)){if(i.optional)return null;throw r}return r}}function We(n,e=0){return(fI()||X4)(gi(n),e)}function Z(n,e){return We(n,cc(e))}function cc(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Y4(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function nS(n){let e=[];for(let t=0;t<n.length;t++){let i=gi(n[t]);if(Array.isArray(i)){if(i.length===0)throw new je(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=q4(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}e.push(We(r,o))}else e.push(We(i))}return e}function q4(n){return n[$4]}function Na(n,e){let t=n.hasOwnProperty(uh);return t?n[uh]:null}function hI(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 pI(n){return n.flat(Number.POSITIVE_INFINITY)}function Cg(n,e){n.forEach(t=>Array.isArray(t)?Cg(t,e):e(t))}function yS(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function vh(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function mI(n,e){let t=[];for(let i=0;i<n;i++)t.push(e);return t}function gI(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 wg(n,e,t){let i=Xd(n,e);return i>=0?n[i|1]=t:(i=~i,gI(n,i,e,t)),i}function Eg(n,e){let t=Xd(n,e);if(t>=0)return n[t|1]}function Xd(n,e){return K4(n,e,1)}function K4(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 Ba={},Ci=[],Xs=new He(""),bh=new He("",-1),xS=new He(""),fh=class{get(e,t=lc){if(t===lc){let r=uI("",-201);throw r.name="\u0275NotFound",r}return t}};function Ys(n){return{\u0275providers:n}}function vI(n){return Ys([{provide:Xs,multi:!0,useValue:n}])}function bI(...n){return{\u0275providers:Mg(!0,n),\u0275fromNgModule:!0}}function Mg(n,...e){let t=[],i=new Set,r,o=s=>{t.push(s)};return Cg(e,s=>{let a=s;fg(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&yI(r,o),t}function yI(n,e){for(let t=0;t<n.length;t++){let{ngModule:i,providers:r}=n[t];_S(r,o=>{e(o,i)})}}function fg(n,e,t,i){if(n=gi(n),!n)return!1;let r=null,o=Q_(n),s=!o&&$s(n);if(!o&&!s){let l=n.ngModule;if(o=Q_(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)fg(c,e,t,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;Cg(o.imports,d=>{fg(d,e,t,i)&&(c||=[],c.push(d))}),c!==void 0&&yI(c,e)}if(!a){let c=Na(r)||(()=>new r);e({provide:r,useFactory:c,deps:Ci},r),e({provide:xS,useValue:r,multi:!0},r),e({provide:Xs,useValue:()=>We(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=n;_S(l,d=>{e(d,c)})}}else return!1;return r!==n&&n.providers!==void 0}function _S(n,e){for(let t of n)uS(t)&&(t=t.\u0275providers),Array.isArray(t)?_S(t,e):e(t)}var Z4=fn({provide:String,useValue:fn});function xI(n){return n!==null&&typeof n=="object"&&Z4 in n}function J4(n){return!!(n&&n.useExisting)}function Q4(n){return!!(n&&n.useFactory)}function dc(n){return typeof n=="function"}function _I(n){return!!n.useClass}var yh=new He(""),dg={},sI={},J_;function Yd(){return J_===void 0&&(J_=new fh),J_}var wi=class{},uc=class extends wi{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,rS(e,s=>this.processProvider(s)),this.records.set(bh,$d(void 0,this)),r.has("environment")&&this.records.set(wi,$d(void 0,this));let o=this.records.get(yh);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(xS,Ci,{self:!0}))}retrieve(e,t){let i=cc(t)||0;try{return this.get(e,lc,i)}catch(r){if(Wd(r))return r;throw r}}destroy(){dh(this),this._destroyed=!0;let e=st(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(),st(e)}}onDestroy(e){return dh(this),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){dh(this);let t=rs(this),i=Li(void 0),r;try{return e()}finally{rs(t),Li(i)}}get(e,t=lc,i){if(dh(this),e.hasOwnProperty(oI))return e[oI](this);let r=cc(i),o,s=rs(this),a=Li(void 0);try{if(!(r&4)){let c=this.records.get(e);if(c===void 0){let d=rz(e)&&yg(e);d&&this.injectableDefInScope(d)?c=$d(iS(e),dg):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c,r)}let l=r&2?Yd():this.parent;return t=r&8&&t===lc?null:t,l.get(e,t)}catch(l){let c=j4(l);throw c===-200||c===-201?new je(c,null):l}finally{Li(a),rs(s)}}resolveInjectorInitializers(){let e=st(null),t=rs(this),i=Li(void 0),r;try{let o=this.get(Xs,Ci,{self:!0});for(let s of o)s()}finally{rs(t),Li(i),st(e)}}toString(){return"R3Injector[...]"}processProvider(e){e=gi(e);let t=dc(e)?e:gi(e&&e.provide),i=tz(e);if(!dc(e)&&e.multi===!0){let r=this.records.get(t);r||(r=$d(void 0,dg,!0),r.factory=()=>nS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t,i){let r=st(null);try{if(t.value===sI)throw vS("");return t.value===dg&&(t.value=sI,t.value=t.factory(void 0,i)),typeof t.value=="object"&&t.value&&iz(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{st(r)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=gi(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 iS(n){let e=yg(n),t=e!==null?e.factory:Na(n);if(t!==null)return t;if(n instanceof He)throw new je(-204,!1);if(n instanceof Function)return ez(n);throw new je(-204,!1)}function ez(n){if(n.length>0)throw new je(-204,!1);let t=V4(n);return t!==null?()=>t.factory(n):()=>new n}function tz(n){if(xI(n))return $d(void 0,n.useValue);{let e=SS(n);return $d(e,dg)}}function SS(n,e,t){let i;if(dc(n)){let r=gi(n);return Na(r)||iS(r)}else if(xI(n))i=()=>gi(n.useValue);else if(Q4(n))i=()=>n.useFactory(...nS(n.deps||[]));else if(J4(n))i=(r,o)=>We(gi(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=gi(n&&(n.useClass||n.provide));if(nz(n))i=()=>new r(...nS(n.deps));else return Na(r)||iS(r)}return i}function dh(n){if(n.destroyed)throw new je(-205,!1)}function $d(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function nz(n){return!!n.deps}function iz(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function rz(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function rS(n,e){for(let t of n)Array.isArray(t)?rS(t,e):t&&uS(t)?rS(t.\u0275providers,e):e(t)}function qd(n,e){let t;n instanceof uc?(dh(n),t=n):t=new tS(n);let i,r=rs(t),o=Li(void 0);try{return e()}finally{rs(r),Li(o)}}function SI(){return fI()!==void 0||cg()!=null}var Bi=0,$e=1,St=2,Bn=3,Jr=4,zi=5,Vi=6,Kd=7,Rn=8,br=9,as=10,Yt=11,Zd=12,CS=13,hc=14,oi=15,za=16,pc=17,ls=18,cs=19,wS=20,js=21,Tg=22,La=23,yr=24,mc=25,ds=26,$t=27,CI=1,So=6,us=7,xh=8,gc=9,En=10;function xr(n){return Array.isArray(n)&&typeof n[CI]=="object"}function rr(n){return Array.isArray(n)&&n[CI]===!0}function ES(n){return(n.flags&4)!==0}function fs(n){return n.componentOffset>-1}function Jd(n){return(n.flags&1)===1}function hs(n){return!!n.template}function vc(n){return(n[St]&512)!==0}function Va(n){return(n[St]&256)===256}var MS="svg",wI="math";function _r(n){for(;Array.isArray(n);)n=n[Bi];return n}function TS(n,e){return _r(e[n])}function Qr(n,e){return _r(e[n.index])}function bc(n,e){return n.data[e]}function Dg(n,e){return n[e]}function DS(n,e,t,i){t>=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}function Sr(n,e){let t=e[n];return xr(t)?t:t[Bi]}function Ig(n){return(n[St]&128)===128}function EI(n){return rr(n[Bn])}function eo(n,e){return e==null?null:n[e]}function IS(n){n[pc]=0}function PS(n){n[St]&1024||(n[St]|=1024,Ig(n)&&yc(n))}function MI(n,e){for(;n>0;)e=e[hc],n--;return e}function _h(n){return!!(n[St]&9216||n[yr]?.dirty)}function Pg(n){n[as].changeDetectionScheduler?.notify(8),n[St]&64&&(n[St]|=1024),_h(n)&&yc(n)}function yc(n){n[as].changeDetectionScheduler?.notify(0);let e=Ua(n);for(;e!==null&&!(e[St]&8192||(e[St]|=8192,!Ig(e)));)e=Ua(e)}function AS(n,e){if(Va(n))throw new je(911,!1);n[js]===null&&(n[js]=[]),n[js].push(e)}function TI(n,e){if(n[js]===null)return;let t=n[js].indexOf(e);t!==-1&&n[js].splice(t,1)}function Ua(n){let e=n[Bn];return rr(e)?e[Bn]:e}function OS(n){return n[Kd]??=[]}function RS(n){return n.cleanup??=[]}function DI(n,e,t,i){let r=OS(e);r.push(t),n.firstCreatePass&&RS(n).push(i,r.length-1)}var Mt={lFrame:VI(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var oS=!1;function II(){return Mt.lFrame.elementDepthCount}function PI(){Mt.lFrame.elementDepthCount++}function kS(){Mt.lFrame.elementDepthCount--}function Ag(){return Mt.bindingsEnabled}function Og(){return Mt.skipHydrationRootTNode!==null}function FS(n){return Mt.skipHydrationRootTNode===n}function AI(n){Mt.skipHydrationRootTNode=n}function NS(){Mt.skipHydrationRootTNode=null}function ft(){return Mt.lFrame.lView}function In(){return Mt.lFrame.tView}function Q(n){return Mt.lFrame.contextLView=n,n[Rn]}function ee(n){return Mt.lFrame.contextLView=null,n}function vi(){let n=LS();for(;n!==null&&n.type===64;)n=n.parent;return n}function LS(){return Mt.lFrame.currentTNode}function OI(){let n=Mt.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}function Qd(n,e){let t=Mt.lFrame;t.currentTNode=n,t.isParent=e}function US(){return Mt.lFrame.isParent}function BS(){Mt.lFrame.isParent=!1}function RI(){return Mt.lFrame.contextLView}function zS(){return oS}function hh(n){let e=oS;return oS=n,e}function eu(){let n=Mt.lFrame,e=n.bindingRootIndex;return e===-1&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function kI(n){return Mt.lFrame.bindingIndex=n}function Ga(){return Mt.lFrame.bindingIndex++}function VS(n){let e=Mt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function FI(){return Mt.lFrame.inI18n}function NI(n,e){let t=Mt.lFrame;t.bindingIndex=t.bindingRootIndex=n,Rg(e)}function LI(){return Mt.lFrame.currentDirectiveIndex}function Rg(n){Mt.lFrame.currentDirectiveIndex=n}function UI(n){let e=Mt.lFrame.currentDirectiveIndex;return e===-1?null:n[e]}function BI(){return Mt.lFrame.currentQueryIndex}function kg(n){Mt.lFrame.currentQueryIndex=n}function oz(n){let e=n[$e];return e.type===2?e.declTNode:e.type===1?n[zi]:null}function GS(n,e,t){if(t&4){let r=e,o=n;for(;r=r.parent,r===null&&!(t&1);)if(r=oz(o),r===null||(o=o[hc],r.type&10))break;if(r===null)return!1;e=r,n=o}let i=Mt.lFrame=zI();return i.currentTNode=e,i.lView=n,!0}function Fg(n){let e=zI(),t=n[$e];Mt.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function zI(){let n=Mt.lFrame,e=n===null?null:n.child;return e===null?VI(n):e}function VI(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 GI(){let n=Mt.lFrame;return Mt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var HS=GI;function Ng(){let n=GI();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 HI(n){return(Mt.lFrame.contextLView=MI(n,Mt.lFrame.contextLView))[Rn]}function qs(){return Mt.lFrame.selectedIndex}function Ha(n){Mt.lFrame.selectedIndex=n}function Sh(){let n=Mt.lFrame;return bc(n.tView,n.selectedIndex)}function tu(){Mt.lFrame.currentNamespace=MS}function Lg(){sz()}function sz(){Mt.lFrame.currentNamespace=null}function jS(){return Mt.lFrame.currentNamespace}var jI=!0;function Ug(){return jI}function Ks(n){jI=n}function sS(n,e=null,t=null,i){let r=WI(n,e,t,i);return r.resolveInjectorInitializers(),r}function WI(n,e=null,t=null,i,r=new Set){let o=[t||Ci,bI(n)],s;return new uc(o,e||Yd(),s||null,r)}var Ei=class n{static THROW_IF_NOT_FOUND=lc;static NULL=new fh;static create(e,t){if(Array.isArray(e))return sS({name:""},t,e,"");{let i=e.name??"";return sS({name:i},e.parent,e.providers,i)}}static \u0275prov=ye({token:n,providedIn:"any",factory:()=>We(bh)});static __NG_ELEMENT_ID__=-1},Mn=new He(""),or=(()=>{class n{static __NG_ELEMENT_ID__=az;static __NG_ENV_ID__=t=>t}return n})(),hg=class extends or{_lView;constructor(e){super(),this._lView=e}get destroyed(){return Va(this._lView)}onDestroy(e){let t=this._lView;return AS(t,e),()=>TI(t,e)}};function az(){return new hg(ft())}var $I=!1,XI=new He(""),ja=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new ah(!1);debugTaskTracker=Z(XI,{optional:!0});get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new Cn(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=ye({token:n,providedIn:"root",factory:()=>new n})}return n})(),aS=class extends _o{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(e=!1){super(),this.__isAsync=e,SI()&&(this.destroyRef=Z(or,{optional:!0})??void 0,this.pendingTasks=Z(ja,{optional:!0})??void 0)}emit(e){let t=st(null);try{super.next(e)}finally{st(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 Ni&&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)}})}}},vr=aS;function pg(...n){}function WS(n){let e,t;function i(){n=pg;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 YI(n){return queueMicrotask(()=>n()),()=>{n=pg}}var $S="isAngularZone",ph=$S+"_ID",lz=0,ir=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new vr(!1);onMicrotaskEmpty=new vr(!1);onStable=new vr(!1);onError=new vr(!1);constructor(e){let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=$I}=e;if(typeof Zone>"u")throw new je(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,uz(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get($S)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new je(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new je(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,cz,pg,pg);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)}},cz={};function XS(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 dz(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function e(){WS(()=>{n.callbackScheduled=!1,lS(n),n.isCheckStableRunning=!0,XS(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{e()}):n._outer.run(()=>{e()}),lS(n)}function uz(n){let e=()=>{dz(n)},t=lz++;n._inner=n._inner.fork({name:"angular",properties:{[$S]:!0,[ph]:t,[ph+t]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(fz(l))return i.invokeTask(o,s,a,l);try{return aI(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&e(),lI(n)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return aI(n),i.invoke(o,s,a,l,c)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!hz(l)&&e(),lI(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,lS(n),XS(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 lS(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function aI(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function lI(n){n._nesting--,XS(n)}var mh=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new vr;onMicrotaskEmpty=new vr;onStable=new vr;onError=new vr;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 fz(n){return qI(n,"__ignore_ng_zone__")}function hz(n){return qI(n,"__scheduler_tick__")}function qI(n,e){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[e]===!0}var Kr=class{_console=console;handleError(e){this._console.error("ERROR",e)}},Zs=new He("",{factory:()=>{let n=Z(ir),e=Z(wi),t;return i=>{n.runOutsideAngular(()=>{e.destroyed&&!t?setTimeout(()=>{throw i}):(t??=e.get(Kr),t.handleError(i))})}}}),KI={provide:Xs,useValue:()=>{let n=Z(Kr,{optional:!0})},multi:!0},pz=new He("",{factory:()=>{let n=Z(Mn).defaultView;if(!n)return;let e=Z(Zs),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(or).onDestroy(()=>{n.removeEventListener("error",i),n.removeEventListener("unhandledrejection",t)})}});function YS(){return Ys([vI(()=>{Z(pz)})])}function N(n,e){let[t,i,r]=F_(n,e?.equal),o=t,s=o[Jn];return o.set=i,o.update=r,o.asReadonly=Bg.bind(o),o}function Bg(){let n=this[Jn];if(n.readonlyFn===void 0){let e=()=>this();e[Jn]=n,n.readonlyFn=e}return n.readonlyFn}var Ch=(()=>{class n{view;node;constructor(t,i){this.view=t,this.node=i}static __NG_ELEMENT_ID__=mz}return n})();function mz(){return new Ch(ft(),vi())}var os=class{},wh=new He("",{factory:()=>!0});var qS=new He(""),nu=(()=>{class n{internalPendingTasks=Z(ja);scheduler=Z(os);errorHandler=Z(Zs);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=ye({token:n,providedIn:"root",factory:()=>new n})}return n})(),zg=(()=>{class n{static \u0275prov=ye({token:n,providedIn:"root",factory:()=>new cS})}return n})(),cS=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}},mg=class{[Jn];constructor(e){this[Jn]=e}destroy(){this[Jn].destroy()}};function qt(n,e){let t=e?.injector??Z(Ei),i=e?.manualCleanup!==!0?t.get(or):null,r,o=t.get(Ch,null,{optional:!0}),s=t.get(os);return o!==null?(r=bz(o.view,s,n),i instanceof hg&&i._lView===o.view&&(i=null)):r=yz(n,t.get(zg),s),r.injector=t,i!==null&&(r.onDestroyFns=[i.onDestroy(()=>r.destroy())]),new mg(r)}var ZI=de(R({},L_),{cleanupFns:void 0,zone:null,onDestroyFns:null,run(){let n=hh(!1);try{U_(this)}finally{hh(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=st(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],st(n)}}}),gz=de(R({},ZI),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){if(tc(this),this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();this.cleanup(),this.scheduler.remove(this)}}),vz=de(R({},ZI),{consumerMarkedDirty(){this.view[St]|=8192,yc(this.view),this.notifier.notify(13)},destroy(){if(tc(this),this.onDestroyFns!==null)for(let n of this.onDestroyFns)n();this.cleanup(),this.view[La]?.delete(this)}});function bz(n,e,t){let i=Object.create(vz);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=e,i.fn=JI(i,t),n[La]??=new Set,n[La].add(i),i.consumerMarkedDirty(i),i}function yz(n,e,t){let i=Object.create(gz);return i.fn=JI(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 JI(n,e){return()=>{e(t=>(n.cleanupFns??=[]).push(t))}}var Vg={JSACTION:"jsaction"};function Lh(n){return{toString:n}.toString()}function Tz(n){return typeof n=="function"}function VP(n,e,t,i){e!==null?e.applyValueToInputSignal(e,i):n[t]=i}var Qg=class{previousValue;currentValue;firstChange;constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}},fu=(()=>{let n=()=>GP;return n.ngInherit=!0,n})();function GP(n){return n.type.prototype.ngOnChanges&&(n.setInput=Iz),Dz}function Dz(){let n=jP(this),e=n?.current;if(e){let t=n.previous;if(t===Ba)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function Iz(n,e,t,i,r){let o=this.declaredInputs[i],s=jP(n)||Pz(n,{previous:Ba,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new Qg(c&&c.currentValue,t,l===Ba),VP(n,e,r,t)}var HP="__ngSimpleChanges__";function jP(n){return n[HP]||null}function Pz(n,e){return n[HP]=e}var QI=[];var en=function(n,e=null,t){for(let i=0;i<QI.length;i++){let r=QI[i];r(n,e,t)}},Ht=(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})(Ht||{});function Az(n,e,t){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){let s=GP(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 WP(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 $g(n,e,t){$P(n,e,3,t)}function Xg(n,e,t,i){(n[St]&3)===t&&$P(n,e,t,i)}function KS(n,e){let t=n[St];(t&3)===e&&(t&=16383,t+=1,n[St]=t)}function $P(n,e,t,i){let r=i!==void 0?n[pc]&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[pc]+=65536),(a<o||o==-1)&&(Oz(n,t,e,l),n[pc]=(n[pc]&4294901760)+l+2),l++}function eP(n,e){en(Ht.LifecycleHookStart,n,e);let t=st(null);try{e.call(n)}finally{st(t),en(Ht.LifecycleHookEnd,n,e)}}function Oz(n,e,t,i){let r=t[i]<0,o=t[i+1],s=r?-t[i]:t[i],a=n[s];r?n[St]>>14<n[pc]>>16&&(n[St]&3)===e&&(n[St]+=16384,eP(a,o)):eP(a,o)}var ru=-1,Sc=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 Rz(n){return(n.flags&8)!==0}function kz(n){return(n.flags&16)!==0}function Fz(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];Lz(o)?n.setProperty(e,o,s):n.setAttribute(e,o,s),i++}}return i}function Nz(n){return n===3||n===4||n===6}function Lz(n){return n.charCodeAt(0)===64}function au(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?tP(n,t,r,null,e[++i]):tP(n,t,r,null,null))}}return n}function tP(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 XP(n){return n!==ru}function ev(n){return n&32767}function Uz(n){return n>>16}function tv(n,e){let t=Uz(n),i=e;for(;t>0;)i=i[hc],t--;return i}var dC=!0;function nv(n){let e=dC;return dC=n,e}var Bz=256,YP=Bz-1,qP=5,zz=0,ps={};function Vz(n,e,t){let i;typeof t=="string"?i=t.charCodeAt(0)||0:t.hasOwnProperty(fc)&&(i=t[fc]),i==null&&(i=t[fc]=zz++);let r=i&YP,o=1<<r;e.data[n+(r>>qP)]|=o}function iv(n,e){let t=KP(n,e);if(t!==-1)return t;let i=e[$e];i.firstCreatePass&&(n.injectorIndex=e.length,ZS(i.data,n),ZS(e,null),ZS(i.blueprint,null));let r=qC(n,e),o=n.injectorIndex;if(XP(r)){let s=ev(r),a=tv(r,e),l=a[$e].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function ZS(n,e){n.push(0,0,0,0,0,0,0,0,e)}function KP(n,e){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||e[n.injectorIndex+8]===null?-1:n.injectorIndex}function qC(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=tA(r),i===null)return ru;if(t++,r=r[hc],i.injectorIndex!==-1)return i.injectorIndex|t<<16}return ru}function uC(n,e,t){Vz(n,e,t)}function ZP(n,e,t){if(t&8||n!==void 0)return n;Sg(e,"NodeInjector")}function JP(n,e,t,i){if(t&8&&i===void 0&&(i=null),(t&3)===0){let r=n[br],o=Li(void 0);try{return r?r.get(e,i,t&8):bS(e,i,t&8)}finally{Li(o)}}return ZP(i,e,t)}function QP(n,e,t,i=0,r){if(n!==null){if(e[St]&2048&&!(i&2)){let s=Wz(n,e,t,i,ps);if(s!==ps)return s}let o=eA(n,e,t,i,ps);if(o!==ps)return o}return JP(e,t,i,r)}function eA(n,e,t,i,r){let o=Hz(t);if(typeof o=="function"){if(!GS(e,n,i))return i&1?ZP(r,t,i):JP(e,t,i,r);try{let s;if(s=o(i),s==null&&!(i&8))Sg(t);else return s}finally{HS()}}else if(typeof o=="number"){let s=null,a=KP(n,e),l=ru,c=i&1?e[oi][zi]:null;for((a===-1||i&4)&&(l=a===-1?qC(n,e):e[a+8],l===ru||!iP(i,!1)?a=-1:(s=e[$e],a=ev(l),e=tv(l,e)));a!==-1;){let d=e[$e];if(nP(o,a,d.data)){let u=Gz(a,e,t,s,i,c);if(u!==ps)return u}l=e[a+8],l!==ru&&iP(i,e[$e].data[a+8]===c)&&nP(o,a,e)?(s=d,a=ev(l),e=tv(l,e)):a=-1}}return r}function Gz(n,e,t,i,r,o){let s=e[$e],a=s.data[n+8],l=i==null?fs(a)&&dC:i!=s&&(a.type&3)!==0,c=r&1&&o===a,d=Yg(a,s,t,l,c);return d!==null?Dh(e,s,d,a,r):ps}function Yg(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&&hs(h)&&h.type===t)return l}return null}function Dh(n,e,t,i,r){let o=n[t],s=e.data;if(o instanceof Sc){let a=o;if(a.resolving)throw vS("");let l=nv(a.canSeeViewProviders);a.resolving=!0;let c=s[t].type||s[t],d,u=a.injectImpl?Li(a.injectImpl):null,f=GS(n,i,0);try{o=n[t]=a.factory(void 0,r,s,n,i),e.firstCreatePass&&t>=i.directiveStart&&Az(t,s[t],e)}finally{u!==null&&Li(u),nv(l),a.resolving=!1,HS()}}return o}function Hz(n){if(typeof n=="string")return n.charCodeAt(0)||0;let e=n.hasOwnProperty(fc)?n[fc]:void 0;return typeof e=="number"?e>=0?e&YP:jz:e}function nP(n,e,t){let i=1<<n;return!!(t[e+(n>>qP)]&i)}function iP(n,e){return!(n&2)&&!(n&1&&e)}var _c=class{_tNode;_lView;constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return QP(this._tNode,this._lView,e,cc(i),t)}};function jz(){return new _c(vi(),ft())}function Qs(n){return Lh(()=>{let e=n.prototype.constructor,t=e[uh]||fC(e),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[uh]||fC(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function fC(n){return dS(n)?()=>{let e=fC(gi(n));return e&&e()}:Na(n)}function Wz(n,e,t,i,r){let o=n,s=e;for(;o!==null&&s!==null&&s[St]&2048&&!vc(s);){let a=eA(o,s,t,i|2,ps);if(a!==ps)return a;let l=o.parent;if(!l){let c=s[wS];if(c){let d=c.get(t,ps,i&-5);if(d!==ps)return d}l=tA(s),s=s[hc]}o=l}return r}function tA(n){let e=n[$e],t=e.type;return t===2?e.declTNode:t===1?n[zi]:null}function $z(){return hu(vi(),ft())}function hu(n,e){return new Er(Qr(n,e))}var Er=(()=>{class n{nativeElement;constructor(t){this.nativeElement=t}static __NG_ELEMENT_ID__=$z}return n})();function Xz(n){return n instanceof Er?n.nativeElement:n}function Yz(){return this._results[Symbol.iterator]()}var rv=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 _o}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=pI(e);(this._changesDetected=!hI(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]=Yz},nA="ngSkipHydration",qz="ngskiphydration";function iA(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()===qz)return!0}return!1}function rA(n){return n.hasAttribute(nA)}function ov(n){return(n.flags&128)===128}function oA(n){if(ov(n))return!0;let e=n.parent;for(;e;){if(ov(n)||iA(e))return!0;e=e.parent}return!1}var KC=(function(n){return n[n.OnPush=0]="OnPush",n[n.Eager=1]="Eager",n[n.Default=1]="Default",n})(KC||{}),sA=new Map,Kz=0;function Zz(){return Kz++}function Jz(n){sA.set(n[cs],n)}function hC(n){sA.delete(n[cs])}var rP="__ngContext__";function lu(n,e){xr(e)?(n[rP]=e[cs],Jz(e)):n[rP]=e}function aA(n){return cA(n[Zd])}function lA(n){return cA(n[Jr])}function cA(n){for(;n!==null&&!rr(n);)n=n[Jr];return n}var pC;function ZC(n){pC=n}function JC(){if(pC!==void 0)return pC;if(typeof document<"u")return document;throw new je(210,!1)}var gs=new He("",{factory:()=>Qz}),Qz="ng";var pv=new He(""),Uh=new He("",{providedIn:"platform",factory:()=>"unknown"});var mv=new He("",{factory:()=>Z(Mn).body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var pu=(()=>{class n{static \u0275prov=ye({token:n,providedIn:"root",factory:()=>{let t=new n;return t.store=e5(Z(Mn),Z(gs)),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 e5(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 dA="h",uA="b",t5="f",n5="n",fA="e",hA="t",gv="c",QC="x",Ih="r",pA="i",mA="n",e1="d";var gA="di",vA="s",bA="p";var Bh=new He(""),yA=!1,t1=new He("",{factory:()=>yA});var n1=new He(""),xA=!1,_A=new He("",{factory:()=>[]}),SA=new He(""),i1=new He("",{factory:()=>new Map});var zh="ngb";var CA=(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},wA=(n,e)=>{let t=n,i=t.getAttribute(zh)??"",r=e.get(i)??new Set;r.has(t)||r.add(t),e.set(i,r)};var EA=n=>{n.removeAttribute(Vg.JSACTION),n.removeAttribute(zh),n.__jsaction_fns=void 0},MA=new He("",{factory:()=>({})});function r1(n,e){let t=e?.__jsaction_fns?.get(n.type);if(!(!t||!e?.isConnected))for(let i of t)i(n)}var mC=new Map;function TA(n,e){return mC.set(n,e),()=>mC.delete(n)}var oP=!1,DA=(n,e,t,i)=>{};function i5(n,e,t,i){DA(n,e,t,i)}function IA(){oP||(DA=(n,e,t,i)=>{let r=n[br].get(gs);mC.get(r)?.(e,t,i)},oP=!0)}var vv=new He("");function Vh(n){return(n.flags&32)===32}var r5="__nghData__",o1=r5,o5="__nghDeferData__",PA=o5;var qg="ngh",AA="nghm",OA=()=>null;function s5(n,e,t=!1){let i=n.getAttribute(qg);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(pu,null,{optional:!0});d!==null&&(l=d.get(o1,[])[Number(i)])}let c={data:l,firstChild:n.firstChild??null};return t&&(c.firstChild=n,bv(c,0,n.nextSibling)),a?n.setAttribute(qg,a):n.removeAttribute(qg),c}function RA(){OA=s5}function kA(n,e,t=!1){return OA(n,e,t)}function FA(n){let e=n._lView;return e[$e].type===2?null:(vc(e)&&(e=e[$t]),e)}function a5(n){return n.textContent?.replace(/\s/gm,"")}function l5(n){let e=JC(),t=e.createNodeIterator(n,NodeFilter.SHOW_COMMENT,{acceptNode(o){let s=a5(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 bv(n,e,t){n.segmentHeads??={},n.segmentHeads[e]=t}function gC(n,e){return n.segmentHeads?.[e]??null}function NA(n){return n.get(SA,!1,{optional:!0})}function c5(n,e){let t=n.data,i=t[fA]?.[e]??null;return i===null&&t[gv]?.[e]&&(i=s1(n,e)),i}function LA(n,e){return n.data[gv]?.[e]??null}function s1(n,e){let t=LA(n,e)??[],i=0;for(let r of t)i+=r[Ih]*(r[QC]??1);return i}function d5(n){if(typeof n.disconnectedNodes>"u"){let e=n.data[e1];n.disconnectedNodes=e?new Set(e):null}return n.disconnectedNodes}function UA(n,e){if(typeof n.disconnectedNodes>"u"){let t=n.data[e1];n.disconnectedNodes=t?new Set(t):null}return!!d5(n)?.has(e)}function yv(n,e){let t=n[Vi];return t!==null&&!Og()&&!Vh(e)&&!UA(t,e.index-$t)}function u5(n,e){let t=e.get(vv),r=e.get(pu).get(PA,{}),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][bA]}return{parentBlockPromise:a,hydrationQueue:l}}function JS(n){return!!n&&n.nodeType===Node.COMMENT_NODE&&n.textContent?.trim()===AA}function sP(n){for(;n&&n.nodeType===Node.TEXT_NODE;)n=n.previousSibling;return n}function BA(n){for(let i of n.body.childNodes)if(JS(i))return;let e=sP(n.body.previousSibling);if(JS(e))return;let t=sP(n.head.lastChild);if(!JS(t))throw new je(-507,!1)}function zA(n,e){let t=n.contentQueries;if(t!==null){let i=st(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];kg(o),a.contentQueries(2,e[s],s)}}}finally{st(i)}}}function vC(n,e,t){kg(0);let i=st(null);try{e(n,t)}finally{st(i)}}function a1(n,e,t){if(ES(e)){let i=st(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{st(i)}}}var Eo=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n[n.ExperimentalIsolatedShadowDom=4]="ExperimentalIsolatedShadowDom",n})(Eo||{});var Gg;function f5(){if(Gg===void 0&&(Gg=null,Zr.trustedTypes))try{Gg=Zr.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Gg}function xv(n){return f5()?.createHTML(n)||n}var Hg;function h5(){if(Hg===void 0&&(Hg=null,Zr.trustedTypes))try{Hg=Zr.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Hg}function aP(n){return h5()?.createHTML(n)||n}var Js=class{changingThisBreaksApplicationSecurity;constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${gg})`}},bC=class extends Js{getTypeName(){return"HTML"}},yC=class extends Js{getTypeName(){return"Style"}},xC=class extends Js{getTypeName(){return"Script"}},_C=class extends Js{getTypeName(){return"URL"}},SC=class extends Js{getTypeName(){return"ResourceURL"}};function Mo(n){return n instanceof Js?n.changingThisBreaksApplicationSecurity:n}function ea(n,e){let t=VA(n);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${gg})`)}return t===e}function VA(n){return n instanceof Js&&n.getTypeName()||null}function l1(n){return new bC(n)}function c1(n){return new yC(n)}function d1(n){return new xC(n)}function u1(n){return new _C(n)}function f1(n){return new SC(n)}function p5(n){let e=new wC(n);return m5()?new CC(e):e}var CC=class{inertDocumentHelper;constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e="<body><remove></remove>"+e;try{let t=new window.DOMParser().parseFromString(xv(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},wC=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=xv(e),t}};function m5(){try{return!!new window.DOMParser().parseFromString(xv(""),"text/html")}catch{return!1}}var g5=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Gh(n){return n=String(n),n.match(g5)?n:"unsafe:"+n}function ta(n){let e={};for(let t of n.split(","))e[t]=!0;return e}function Hh(...n){let e={};for(let t of n)for(let i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}var GA=ta("area,br,col,hr,img,wbr"),HA=ta("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),jA=ta("rp,rt"),v5=Hh(jA,HA),b5=Hh(HA,ta("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")),y5=Hh(jA,ta("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")),lP=Hh(GA,b5,y5,v5),WA=ta("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),x5=ta("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"),_5=ta("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"),S5=Hh(WA,x5,_5),C5=ta("script,style,template"),EC=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=M5(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=E5(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=cP(e).toLowerCase();if(!lP.hasOwnProperty(t))return this.sanitizedSomething=!0,!C5.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(!S5.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;WA[a]&&(l=Gh(l)),this.buf.push(" ",s,'="',dP(l),'"')}return this.buf.push(">"),!0}endElement(e){let t=cP(e).toLowerCase();lP.hasOwnProperty(t)&&!GA.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(dP(e))}};function w5(n,e){return(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function E5(n){let e=n.nextSibling;if(e&&n!==e.previousSibling)throw $A(e);return e}function M5(n){let e=n.firstChild;if(e&&w5(n,e))throw $A(e);return e}function cP(n){let e=n.nodeName;return typeof e=="string"?e:"FORM"}function $A(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var T5=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,D5=/([^\#-~ |!])/g;function dP(n){return n.replace(/&/g,"&amp;").replace(T5,function(e){let t=e.charCodeAt(0),i=e.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(D5,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}var jg;function _v(n,e){let t=null;try{jg=jg||p5(n);let i=e?String(e):"";t=jg.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=jg.getInertBodyElement(i)}while(i!==o);let a=new EC().sanitizeChildren(uP(t)||t);return xv(a)}finally{if(t){let i=uP(t)||t;for(;i.firstChild;)i.firstChild.remove()}}}function uP(n){return"content"in n&&I5(n)?n.content:null}function I5(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var P5=/^>|^->|<!--|-->|--!>|<!-$/g,A5=/(<|>)/g,O5="\u200B$1\u200B";function R5(n){return n.replace(P5,e=>e.replace(A5,O5))}function XA(n,e){return n.createText(e)}function k5(n,e,t){n.setValue(e,t)}function YA(n,e){return n.createComment(R5(e))}function h1(n,e,t){return n.createElement(e,t)}function sv(n,e,t,i,r){n.insertBefore(e,t,i,r)}function qA(n,e,t){n.appendChild(e,t)}function fP(n,e,t,i,r){i!==null?sv(n,e,t,i,r):qA(n,e,t)}function p1(n,e,t,i){n.removeChild(null,e,t,i)}function KA(n){n.textContent=""}function F5(n,e,t){n.setAttribute(e,"style",t)}function N5(n,e,t){t===""?n.removeAttribute(e,"class"):n.setAttribute(e,"class",t)}function ZA(n,e,t){let{mergedAttrs:i,classes:r,styles:o}=t;i!==null&&Fz(n,e,i),r!==null&&N5(n,e,r),o!==null&&F5(n,e,o)}var To=(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})(To||{});function Sv(n){let e=JA();return e?aP(e.sanitize(To.HTML,n)||""):ea(n,"HTML")?aP(Mo(n)):_v(JC(),gh(n))}function Gi(n){let e=JA();return e?e.sanitize(To.URL,n)||"":ea(n,"URL")?Mo(n):Gh(gh(n))}function JA(){let n=ft();return n&&n[as].sanitizer}function m1(n){return n.ownerDocument.defaultView}function QA(n){return n.ownerDocument.body}function L5(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 e2="ng-template";function U5(n,e,t,i){let r=0;if(i){for(;r<e.length&&typeof e[r]=="string";r+=2)if(e[r]==="class"&&L5(e[r+1].toLowerCase(),t,0)!==-1)return!0}else if(g1(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 g1(n){return n.type===4&&n.value!==e2}function B5(n,e,t){let i=n.type===4&&!t?e2:n.value;return e===i}function z5(n,e,t){let i=4,r=n.attrs,o=r!==null?H5(r):0,s=!1;for(let a=0;a<e.length;a++){let l=e[a];if(typeof l=="number"){if(!s&&!Co(i)&&!Co(l))return!1;if(s&&Co(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!B5(n,l,t)||l===""&&e.length===1){if(Co(i))return!1;s=!0}}else if(i&8){if(r===null||!U5(n,r,l,t)){if(Co(i))return!1;s=!0}}else{let c=e[++a],d=V5(l,r,g1(n),t);if(d===-1){if(Co(i))return!1;s=!0;continue}if(c!==""){let u;if(d>o?u="":u=r[d+1].toLowerCase(),i&2&&c!==u){if(Co(i))return!1;s=!0}}}}return Co(i)||s}function Co(n){return(n&1)===0}function V5(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 j5(e,n)}function t2(n,e,t=!1){for(let i=0;i<e.length;i++)if(z5(n,e[i],t))return!0;return!1}function G5(n){let e=n.attrs;if(e!=null){let t=e.indexOf(5);if((t&1)===0)return e[t+1]}return null}function H5(n){for(let e=0;e<n.length;e++){let t=n[e];if(Nz(t))return e}return n.length}function j5(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 W5(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 hP(n,e){return n?":not("+e.trim()+")":e}function $5(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!==""&&!Co(s)&&(e+=hP(o,r),r=""),i=s,o=o||!Co(i);t++}return r!==""&&(e+=hP(o,r)),e}function X5(n){return n.map($5).join(",")}function Y5(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(!Co(r))break;r=o}i++}return t.length&&e.push(1,...t),e}var Mr={};function v1(n,e,t,i,r,o,s,a,l,c,d){let u=$t+i,f=u+r,h=q5(u,f),p=typeof c=="function"?c():c;return h[$e]={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 q5(n,e){let t=[];for(let i=0;i<e;i++)t.push(i<n?null:Mr);return t}function K5(n){let e=n.tView;return e===null||e.incompleteFirstPass?n.tView=v1(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):e}function b1(n,e,t,i,r,o,s,a,l,c,d){let u=e.blueprint.slice();return u[Bi]=r,u[St]=i|4|128|8|64|1024,(c!==null||n&&n[St]&2048)&&(u[St]|=2048),IS(u),u[Bn]=u[hc]=n,u[Rn]=t,u[as]=s||n&&n[as],u[Yt]=a||n&&n[Yt],u[br]=l||n&&n[br]||null,u[zi]=o,u[cs]=Zz(),u[Vi]=d,u[wS]=c,u[oi]=e.type==2?n[oi]:u,u}function Z5(n,e,t){let i=Qr(e,n),r=K5(t),o=n[as].rendererFactory,s=y1(n,b1(n,r,null,n2(t),i,e,null,o.createRenderer(i,t),null,null,null));return n[e.index]=s}function n2(n){let e=16;return n.signals?e=4096:n.onPush&&(e=64),e}function i2(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 y1(n,e){return n[Zd]?n[CS][Jr]=e:n[Zd]=e,n[CS]=e,e}function A(n=1){r2(In(),ft(),qs()+n,!1)}function r2(n,e,t,i){if(!i)if((e[St]&3)===3){let o=n.preOrderCheckHooks;o!==null&&$g(e,o,t)}else{let o=n.preOrderHooks;o!==null&&Xg(e,o,0,t)}Ha(t)}var Cv=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(Cv||{});function MC(n,e,t,i){let r=st(null);try{let[o,s,a]=n.inputs[t],l=null;(s&Cv.SignalBased)!==0&&(l=e[o][Jn]),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):VP(e,l,o,i)}finally{st(r)}}var ms=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(ms||{}),J5;function x1(n,e){return J5(n,e)}var aue=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";var TC=new WeakMap;function Q5(n,e){let t=TC.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 eV(n,e){let t=TC.get(n);t?t.includes(e)||t.push(e):TC.set(n,[e])}var Wa=new Set,wv=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(wv||{}),na=new He(""),pP=new Set;function Do(n){pP.has(n)||(pP.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var _1=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=ye({token:n,providedIn:"root",factory:()=>new n})}return n})(),o2=[0,1,2,3],s2=(()=>{class n{ngZone=Z(ir);scheduler=Z(os);errorHandler=Z(Kr,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){Z(na,{optional:!0})}execute(){let t=this.sequences.size>0;t&&en(Ht.AfterRenderHooksStart),this.executing=!0;for(let i of o2)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&&en(Ht.AfterRenderHooksEnd)}register(t){let{view:i}=t;i!==void 0?((i[mc]??=[]).push(t),yc(i),i[St]|=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(wv.AFTER_NEXT_RENDER,t):t()}static \u0275prov=ye({token:n,providedIn:"root",factory:()=>new n})}return n})(),av=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?.[mc];e&&(this.view[mc]=e.filter(t=>t!==this))}};function Ev(n,e){let t=e?.injector??Z(Ei);return Do("NgAfterNextRender"),nV(n,t,e,!0)}function tV(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function nV(n,e,t,i){let r=e.get(_1);r.impl??=e.get(s2);let o=e.get(na,null,{optional:!0}),s=t?.manualCleanup!==!0?e.get(or):null,a=e.get(Ch,null,{optional:!0}),l=new av(r.impl,tV(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var a2=new He("",{factory:()=>{let n=Z(wi),e=new Set;return n.onDestroy(()=>e.clear()),{queue:e,isScheduled:!1,scheduler:null,injector:n}}});function l2(n,e,t){let i=n.get(a2);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 iV(n,e){let t=n.get(a2);if(e.detachedLeaveAnimationFns){for(let i of e.detachedLeaveAnimationFns)t.queue.delete(i);e.detachedLeaveAnimationFns=void 0}}function rV(n,e){for(let[t,i]of e)l2(n,i.animateFns)}function mP(n,e,t,i){let r=n?.[ds]?.enter;e!==null&&r&&r.has(t.index)&&rV(i,r)}function gP(n,e,t,i){try{t.get(bh)}catch{return i(!1)}let r=n?.[ds],o=oV(n,e,r);if(o.size===0){let s=!1;if(n){let a=[];Mv(n,e,a),s=a.length>0}if(!s)return i(!1)}n&&Wa.add(n[cs]),l2(t,()=>sV(n,e,r||void 0,o,i),r||void 0)}function oV(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[$e].data[o].parent;for(;l;){if(l===e){i.set(o,s);break}l=l.parent}}return i}function sV(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&&Mv(n,e,o),o.length>0){let s=t||n?.[ds];if(s){let a=s.running;a&&o.push(a),s.running=Promise.allSettled(o),aV(n,s.running,r)}else Promise.allSettled(o).then(()=>{n&&Wa.delete(n[cs]),r(!0)})}else n&&Wa.delete(n[cs]),r(!1)}function Mv(n,e,t){if(fs(e)){let r=Sr(e.index,n);vP(r,t)}else if(e.type&12){let r=n[e.index];if(rr(r))for(let o=En;o<r.length;o++){let s=r[o];vP(s,t)}}let i=e.child;for(;i;)Mv(n,i,t),i=i.next}function vP(n,e){let t=n[ds];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[$e].firstChild;for(;i;)Mv(n,i,e),i=i.next}function aV(n,e,t){e.then(()=>{n[ds]?.running===e&&(n[ds].running=void 0,Wa.delete(n[cs])),t(!0)})}function iu(n,e,t,i,r,o,s,a){if(r!=null){let l,c=!1;rr(r)?l=r:xr(r)&&(c=!0,r=r[Bi]);let d=_r(r);n===0&&i!==null?(mP(a,i,o,t),s==null?qA(e,i,d):sv(e,i,d,s||null,!0)):n===1&&i!==null?(mP(a,i,o,t),sv(e,i,d,s||null,!0),Q5(o,d)):n===2?(a?.[ds]?.leave?.has(o.index)&&eV(o,d),gP(a,o,t,u=>{p1(e,d,c,u)})):n===3&&gP(a,o,t,()=>{e.destroyNode(d)}),l!=null&&vV(e,n,t,l,o,i,s)}}function lV(n,e){c2(n,e),e[Bi]=null,e[zi]=null}function cV(n,e,t,i,r,o){i[Bi]=r,i[zi]=e,Dv(n,i,t,1,r,o)}function c2(n,e){e[as].changeDetectionScheduler?.notify(9),Dv(n,e,e[Yt],2,null,null)}function dV(n){let e=n[Zd];if(!e)return QS(n[$e],n);for(;e;){let t=null;if(xr(e))t=e[Zd];else{let i=e[En];i&&(t=i)}if(!t){for(;e&&!e[Jr]&&e!==n;)xr(e)&&QS(e[$e],e),e=e[Bn];e===null&&(e=n),xr(e)&&QS(e[$e],e),t=e&&e[Jr]}e=t}}function S1(n,e){let t=n[gc],i=t.indexOf(e);t.splice(i,1)}function Tv(n,e){if(Va(e))return;let t=e[Yt];t.destroyNode&&Dv(n,e,t,3,null,null),dV(e)}function QS(n,e){if(Va(e))return;let t=st(null);try{e[St]&=-129,e[St]|=256,e[yr]&&tc(e[yr]),fV(n,e),uV(n,e),e[$e].type===1&&e[Yt].destroy();let i=e[za];if(i!==null&&rr(e[Bn])){i!==e[Bn]&&S1(i,e);let r=e[ls];r!==null&&r.detachView(n)}hC(e)}finally{st(t)}}function uV(n,e){let t=n.cleanup,i=e[Kd];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[Kd]=null);let r=e[js];if(r!==null){e[js]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=e[La];if(o!==null){e[La]=null;for(let s of o)s.destroy()}}function fV(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 Sc)){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];en(Ht.LifecycleHookStart,a,l);try{l.call(a)}finally{en(Ht.LifecycleHookEnd,a,l)}}else{en(Ht.LifecycleHookStart,r,o);try{o.call(r)}finally{en(Ht.LifecycleHookEnd,r,o)}}}}}function d2(n,e,t){return hV(n,e.parent,t)}function hV(n,e,t){let i=e;for(;i!==null&&i.type&168;)e=i,i=e.parent;if(i===null)return t[Bi];if(fs(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===Eo.None||r===Eo.Emulated)return null}return Qr(i,t)}function u2(n,e,t){return mV(n,e,t)}function pV(n,e,t){return n.type&40?Qr(n,t):null}var mV=pV,bP;function C1(n,e,t,i){let r=d2(n,i,e),o=e[Yt],s=i.parent||e[zi],a=u2(s,i,e);if(r!=null)if(Array.isArray(t))for(let l=0;l<t.length;l++)fP(o,r,t[l],a,!1);else fP(o,r,t,a,!1);bP!==void 0&&bP(o,i,e,t,r)}function Mh(n,e){if(e!==null){let t=e.type;if(t&3)return Qr(e,n);if(t&4)return DC(-1,n[e.index]);if(t&8){let i=e.child;if(i!==null)return Mh(n,i);{let r=n[e.index];return rr(r)?DC(-1,r):_r(r)}}else{if(t&128)return Mh(n,e.next);if(t&32)return x1(e,n)()||_r(n[e.index]);{let i=f2(n,e);if(i!==null){if(Array.isArray(i))return i[0];let r=Ua(n[oi]);return Mh(r,i)}else return Mh(n,e.next)}}}return null}function f2(n,e){if(e!==null){let i=n[oi][zi],r=e.projection;return i.projection[r]}return null}function DC(n,e){let t=En+n+1;if(t<e.length){let i=e[t],r=i[$e].firstChild;if(r!==null)return Mh(i,r)}return e[us]}function w1(n,e,t,i,r,o,s){for(;t!=null;){let a=i[br];if(t.type===128){t=t.next;continue}let l=i[t.index],c=t.type;if(s&&e===0&&(l&&lu(_r(l),i),t.flags|=2),!Vh(t))if(c&8)w1(n,e,t.child,i,r,o,!1),iu(e,n,a,r,l,t,o,i);else if(c&32){let d=x1(t,i),u;for(;u=d();)iu(e,n,a,r,u,t,o,i);iu(e,n,a,r,l,t,o,i)}else c&16?h2(n,e,i,t,r,o):iu(e,n,a,r,l,t,o,i);t=s?t.projectionNext:t.next}}function Dv(n,e,t,i,r,o){w1(t,i,n.firstChild,e,r,o,!1)}function gV(n,e,t){let i=e[Yt],r=d2(n,t,e),o=t.parent||e[zi],s=u2(o,t,e);h2(i,0,e,t,r,s)}function h2(n,e,t,i,r,o){let s=t[oi],l=s[zi].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++){let d=l[c];iu(e,n,t[br],r,d,i,o,t)}else{let c=l,d=s[Bn];ov(i)&&(c.flags|=128),w1(n,e,c,d,r,o,!0)}}function vV(n,e,t,i,r,o,s){let a=i[us],l=_r(i);a!==l&&iu(e,n,t,o,a,r,s);for(let c=En;c<i.length;c++){let d=i[c];Dv(d[$e],d,n,e,o,a)}}function bV(n,e,t,i,r){if(e)r?n.addClass(t,i):n.removeClass(t,i);else{let o=i.indexOf("-")===-1?void 0:ms.DashCase;r==null?n.removeStyle(t,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=ms.Important),n.setStyle(t,i,r,o))}}function p2(n,e,t,i,r){let o=qs(),s=i&2;try{Ha(-1),s&&e.length>$t&&r2(n,e,$t,!1);let a=s?Ht.TemplateUpdateStart:Ht.TemplateCreateStart;en(a,r,t),t(i,r)}finally{Ha(o);let a=s?Ht.TemplateUpdateEnd:Ht.TemplateCreateEnd;en(a,r,t)}}function Iv(n,e,t){wV(n,e,t),(t.flags&64)===64&&EV(n,e,t)}function jh(n,e,t=Qr){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 yV(n,e,t,i){let o=i.get(t1,yA)||t===Eo.ShadowDom||t===Eo.ExperimentalIsolatedShadowDom,s=n.selectRootElement(e,o);return xV(s),s}function xV(n){m2(n)}var m2=()=>null;function _V(n){rA(n)?KA(n):l5(n)}function g2(){m2=_V}function SV(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function v2(n,e,t,i,r,o){let s=e[$e];if(I1(n,s,e,t,i)){fs(n)&&CV(e,n.index);return}n.type&3&&(t=SV(t)),b2(n,e,t,i,r,o)}function b2(n,e,t,i,r,o){if(n.type&3){let s=Qr(n,e);i=o!=null?o(i,n.value||"",t):i,r.setProperty(s,t,i)}else n.type&12}function CV(n,e){let t=Sr(e,n);t[St]&16||(t[St]|=64)}function wV(n,e,t){let i=t.directiveStart,r=t.directiveEnd;fs(t)&&Z5(e,t,n.data[i+t.componentOffset]),n.firstCreatePass||iv(t,e);let o=t.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=Dh(e,n,s,t);if(lu(l,e),o!==null&&IV(e,s-i,l,a,t,o),hs(a)){let c=Sr(t.index,e);c[Rn]=Dh(e,n,s,t)}}}function EV(n,e,t){let i=t.directiveStart,r=t.directiveEnd,o=t.index,s=LI();try{Ha(o);for(let a=i;a<r;a++){let l=n.data[a],c=e[a];Rg(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&MV(l,c)}}finally{Ha(-1),Rg(s)}}function MV(n,e){n.hostBindings!==null&&n.hostBindings(1,e)}function E1(n,e){let t=n.directiveRegistry,i=null;if(t)for(let r=0;r<t.length;r++){let o=t[r];t2(e,o.selectors,!1)&&(i??=[],hs(o)?i.unshift(o):i.push(o))}return i}function TV(n,e,t,i,r,o){let s=Qr(n,e);DV(e[Yt],s,o,n.value,t,i,r)}function DV(n,e,t,i,r,o,s){if(o==null)n.removeAttribute(e,r,t);else{let a=s==null?gh(o):s(o,i||"",r);n.setAttribute(e,r,a,t)}}function IV(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];MC(i,t,l,c)}}function M1(n,e,t,i,r){let o=$t+t,s=e[$e],a=r(s,e,n,i,t);e[o]=a,Qd(n,!0);let l=n.type===2;return l?(ZA(e[Yt],a,n),(II()===0||Jd(n))&&lu(a,e),PI()):lu(a,e),Ug()&&(!l||!Vh(n))&&C1(s,e,a,n),n}function T1(n){let e=n;return US()?BS():(e=e.parent,Qd(e,!1)),e}function D1(n,e){let t=n[br];if(!t)return;let i;try{i=t.get(Zs,null)}catch{i=null}i?.(e)}function I1(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];MC(u,t[c],d,r),a=!0}if(o)for(let l of o){let c=t[l],d=e.data[l];MC(d,c,i,r),a=!0}return a}function PV(n,e){let t=Sr(e,n),i=t[$e];AV(i,t);let r=t[Bi];r!==null&&t[Vi]===null&&(t[Vi]=kA(r,t[br])),en(Ht.ComponentStart);try{P1(i,t,t[Rn])}finally{en(Ht.ComponentEnd,t[Rn])}}function AV(n,e){for(let t=e.length;t<n.blueprint.length;t++)e.push(n.blueprint[t])}function P1(n,e,t){Fg(e);try{let i=n.viewQuery;i!==null&&vC(1,i,t);let r=n.template;r!==null&&p2(n,e,r,1,t),n.firstCreatePass&&(n.firstCreatePass=!1),e[ls]?.finishViewCreation(n),n.staticContentQueries&&zA(n,e),n.staticViewQueries&&vC(2,n.viewQuery,t);let o=n.components;o!==null&&OV(e,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{e[St]&=-5,Ng()}}function OV(n,e){for(let t=0;t<e.length;t++)PV(n,e[t])}function mu(n,e,t,i){let r=st(null);try{let o=e.tView,a=n[St]&4096?4096:16,l=b1(n,o,t,a,null,e,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),c=n[e.index];l[za]=c;let d=n[ls];return d!==null&&(l[ls]=d.createEmbeddedView(o)),P1(o,l,t),l}finally{st(r)}}function Cc(n,e){return!e||e.firstChild===null||ov(n)}function Ph(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(_r(o)),rr(o)&&y2(o,i);let s=t.type;if(s&8)Ph(n,e,t.child,i);else if(s&32){let a=x1(t,e),l;for(;l=a();)i.push(l)}else if(s&16){let a=f2(e,t);if(Array.isArray(a))i.push(...a);else{let l=Ua(e[oi]);Ph(l[$e],l,a,i,!0)}}t=r?t.projectionNext:t.next}return i}function y2(n,e){for(let t=En;t<n.length;t++){let i=n[t],r=i[$e].firstChild;r!==null&&Ph(i[$e],i,r,e)}n[us]!==n[Bi]&&e.push(n[us])}function x2(n){if(n[mc]!==null){for(let e of n[mc])e.impl.addSequence(e);n[mc].length=0}}var _2=[];function RV(n){return n[yr]??kV(n)}function kV(n){let e=_2.pop()??Object.create(NV);return e.lView=n,e}function FV(n){n.lView[yr]!==n&&(n.lView=null,_2.push(n))}var NV=de(R({},Jl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{yc(n.lView)},consumerOnSignalRead(){this.lView[yr]=this}});function LV(n){let e=n[yr]??Object.create(UV);return e.lView=n,e}var UV=de(R({},Jl),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let e=Ua(n.lView);for(;e&&!S2(e[$e]);)e=Ua(e);e&&PS(e)},consumerOnSignalRead(){this.lView[yr]=this}});function S2(n){return n.type!==2}function C2(n){if(n[La]===null)return;let e=!0;for(;e;){let t=!1;for(let i of n[La])i.dirty&&(t=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));e=t&&!!(n[St]&8192)}}var BV=100;function w2(n,e=0){let i=n[as].rendererFactory,r=!1;r||i.begin?.();try{zV(n,e)}finally{r||i.end?.()}}function zV(n,e){let t=zS();try{hh(!0),IC(n,e);let i=0;for(;_h(n);){if(i===BV)throw new je(103,!1);i++,IC(n,1)}}finally{hh(t)}}function VV(n,e,t,i){if(Va(e))return;let r=e[St],o=!1,s=!1;Fg(e);let a=!0,l=null,c=null;o||(S2(n)?(c=RV(e),l=ec(c)):Bm()===null?(a=!1,c=LV(e),l=ec(c)):e[yr]&&(tc(e[yr]),e[yr]=null));try{IS(e),kI(n.bindingStartIndex),t!==null&&p2(n,e,t,2,i);let d=(r&3)===3;if(!o)if(d){let h=n.preOrderCheckHooks;h!==null&&$g(e,h,null)}else{let h=n.preOrderHooks;h!==null&&Xg(e,h,0,null),KS(e,0)}if(s||GV(e),C2(e),E2(e,0),n.contentQueries!==null&&zA(n,e),!o)if(d){let h=n.contentCheckHooks;h!==null&&$g(e,h)}else{let h=n.contentHooks;h!==null&&Xg(e,h,1),KS(e,1)}jV(n,e);let u=n.components;u!==null&&T2(e,u,0);let f=n.viewQuery;if(f!==null&&vC(2,f,i),!o)if(d){let h=n.viewCheckHooks;h!==null&&$g(e,h)}else{let h=n.viewHooks;h!==null&&Xg(e,h,2),KS(e,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),e[Tg]){for(let h of e[Tg])h();e[Tg]=null}o||(x2(e),e[St]&=-73)}catch(d){throw o||yc(e),d}finally{c!==null&&(Bd(c,l),a&&FV(c)),Ng()}}function E2(n,e){for(let t=aA(n);t!==null;t=lA(t))for(let i=En;i<t.length;i++){let r=t[i];M2(r,e)}}function GV(n){for(let e=aA(n);e!==null;e=lA(e)){if(!(e[St]&2))continue;let t=e[gc];for(let i=0;i<t.length;i++){let r=t[i];PS(r)}}}function HV(n,e,t){en(Ht.ComponentStart);let i=Sr(e,n);try{M2(i,t)}finally{en(Ht.ComponentEnd,i[Rn])}}function M2(n,e){Ig(n)&&IC(n,e)}function IC(n,e){let i=n[$e],r=n[St],o=n[yr],s=!!(e===0&&r&16);if(s||=!!(r&64&&e===0),s||=!!(r&1024),s||=!!(o?.dirty&&rh(o)),s||=!1,o&&(o.dirty=!1),n[St]&=-9217,s)VV(i,n,i.template,n[Rn]);else if(r&8192){let a=st(null);try{C2(n),E2(n,1);let l=i.components;l!==null&&T2(n,l,1),x2(n)}finally{st(a)}}}function T2(n,e,t){for(let i=0;i<e.length;i++)HV(n,e[i],t)}function jV(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)Ha(~r);else{let o=r,s=t[++i],a=t[++i];NI(s,o);let l=e[o];en(Ht.HostBindingsUpdateStart,l);try{a(2,l)}finally{en(Ht.HostBindingsUpdateEnd,l)}}}}finally{Ha(-1)}}function Pv(n,e){let t=zS()?64:1088;for(n[as].changeDetectionScheduler?.notify(e);n;){n[St]|=t;let i=Ua(n);if(vc(n)&&!i)return n;n=i}return null}function D2(n,e,t,i){return[n,!0,0,e,null,i,null,t,null,null]}function I2(n,e){let t=En+e;if(t<n.length)return n[t]}function gu(n,e,t,i=!0){let r=e[$e];if(WV(r,e,n,t),i){let s=DC(t,n),a=e[Yt],l=a.parentNode(n[us]);l!==null&&cV(r,n[zi],a,e,l,s)}let o=e[Vi];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function A1(n,e){let t=Ah(n,e);return t!==void 0&&Tv(t[$e],t),t}function Ah(n,e){if(n.length<=En)return;let t=En+e,i=n[t];if(i){let r=i[za];r!==null&&r!==n&&S1(r,i),e>0&&(n[t-1][Jr]=i[Jr]);let o=vh(n,En+e);lV(i[$e],i);let s=o[ls];s!==null&&s.detachView(o[$e]),i[Bn]=null,i[Jr]=null,i[St]&=-129}return i}function WV(n,e,t,i){let r=En+i,o=t.length;i>0&&(t[r-1][Jr]=e),i<o-En?(e[Jr]=t[r],yS(t,En+i,e)):(t.push(e),e[Jr]=null),e[Bn]=t;let s=e[za];s!==null&&t!==s&&P2(s,e);let a=e[ls];a!==null&&a.insertView(n),Pg(e),e[St]|=128}function P2(n,e){let t=n[gc],i=e[Bn];if(xr(i))n[St]|=2;else{let r=i[Bn][oi];e[oi]!==r&&(n[St]|=2)}t===null?n[gc]=[e]:t.push(e)}var $a=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let e=this._lView,t=e[$e];return Ph(t,e,t.firstChild,[])}constructor(e,t){this._lView=e,this._cdRefInjectingView=t}get context(){return this._lView[Rn]}set context(e){this._lView[Rn]=e}get destroyed(){return Va(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let e=this._lView[Bn];if(rr(e)){let t=e[xh],i=t?t.indexOf(this):-1;i>-1&&(Ah(e,i),vh(t,i))}this._attachedToViewContainer=!1}Tv(this._lView[$e],this._lView)}onDestroy(e){AS(this._lView,e)}markForCheck(){Pv(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[St]&=-129}reattach(){Pg(this._lView),this._lView[St]|=128}detectChanges(){this._lView[St]|=1024,w2(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new je(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=vc(this._lView),t=this._lView[za];t!==null&&!e&&S1(t,this._lView),c2(this._lView[$e],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new je(902,!1);this._appRef=e;let t=vc(this._lView),i=this._lView[za];i!==null&&!t&&P2(i,this._lView),Pg(this._lView)}};var cu=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=$V;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=mu(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:i,dehydratedView:r});return new $a(o)}}return n})();function $V(){return Av(vi(),ft())}function Av(n,e){return n.type&4?new cu(e,n,hu(n,e)):null}function vu(n,e,t,i,r){let o=n.data[e];if(o===null)o=XV(n,e,t,i,r),FI()&&(o.flags|=32);else if(o.type&64){o.type=t,o.value=i,o.attrs=r;let s=OI();o.injectorIndex=s===null?-1:s.injectorIndex}return Qd(o,!0),o}function XV(n,e,t,i,r){let o=LS(),s=US(),a=s?o:o&&o.parent,l=n.data[e]=qV(n,a,t,e,i,r);return YV(n,l,o,s),l}function YV(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 qV(n,e,t,i,r,o){let s=e?e.injectorIndex:-1,a=0;return Og()&&(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 KV=new RegExp(`^(\\d+)*(${uA}|${dA})*(.*)`);function ZV(n){let e=n.match(KV),[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 JV(n){return!n.prev&&n.parent?.type===8}function eC(n){return n.index-$t}function QV(n,e){let t=n.i18nNodes;if(t)return t.get(e)}function Ov(n,e,t,i){let r=eC(i),o=QV(n,r);if(o===void 0){let s=n.data[mA];if(s?.[r])o=tG(s[r],t);else if(e.firstChild===i)o=n.firstChild;else{let a=i.prev===null,l=i.prev??i.parent;if(JV(i)){let c=eC(i.parent);o=gC(n,c)}else{let c=Qr(l,t);if(a)o=c.firstChild;else{let d=eC(l),u=gC(n,d);if(l.type===2&&u){let h=s1(n,d)+1;o=Rv(h,u)}else o=c.nextSibling}}}}return o}function Rv(n,e){let t=e;for(let i=0;i<n;i++)t=t.nextSibling;return t}function eG(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 t5:t=t.firstChild;break;case n5:t=t.nextSibling;break}}return t}function tG(n,e){let[t,...i]=ZV(n),r;if(t===dA)r=e[oi][Bi];else if(t===uA)r=QA(e[oi][Bi]);else{let o=Number(t);r=_r(e[o+$t])}return eG(r,i)}var nG=!1;function A2(n){nG=n}function iG(n){let e=n[Vi];if(e){let{i18nNodes:t,dehydratedIcuData:i}=e;if(t&&i){let r=n[Yt];for(let o of i.values())rG(r,t,o)}e.i18nNodes=void 0,e.dehydratedIcuData=void 0}}function rG(n,e,t){for(let i of t.node.cases[t.case]){let r=e.get(i.index-$t);r&&p1(n,r,!1)}}function kv(n){let e=n[So]??[],i=n[Bn][Yt],r=[];for(let o of e)o.data[gA]!==void 0?r.push(o):O2(o,i);n[So]=r}function oG(n){let{lContainer:e}=n,t=e[So];if(t===null)return;let r=e[Bn][Yt];for(let o of t)O2(o,r)}function O2(n,e){let t=0,i=n.firstChild;if(i){let r=n.data[Ih];for(;t<r;){let o=i.nextSibling;p1(e,i,!1),i=o,t++}}}function Fv(n){kv(n);let e=n[Bi];xr(e)&&lv(e);for(let t=En;t<n.length;t++)lv(n[t])}function lv(n){iG(n);let e=n[$e];for(let t=$t;t<e.bindingStartIndex;t++)if(rr(n[t])){let i=n[t];Fv(i)}else xr(n[t])&&lv(n[t])}function O1(n){let e=n._views;for(let t of e){let i=FA(t);i!==null&&i[Bi]!==null&&(xr(i)?lv(i):Fv(i))}}function sG(n,e,t,i){n!==null&&(t.cleanup(e),Fv(n.lContainer),O1(i))}function aG(n,e){let t=[];for(let i of e)for(let r=0;r<(i[QC]??1);r++){let o={data:i,firstChild:null};i[Ih]>0&&(o.firstChild=n,n=Rv(i[Ih],n)),t.push(o)}return[n,t]}var R2=()=>null,k2=()=>null;function F2(){R2=lG,k2=cG}function lG(n,e){return L2(n,e)?n[So].shift():(kv(n),null)}function Oh(n,e){return R2(n,e)}function cG(n,e,t){if(e.tView.ssrId===null)return null;let i=Oh(n,e.tView.ssrId);return t[$e].firstUpdatePass&&i===null&&dG(t,e),i}function N2(n,e,t){return k2(n,e,t)}function dG(n,e){let t=e;for(;t;){if(yP(n,t))return;if((t.flags&256)===256)break;t=t.prev}for(t=e.next;t&&(t.flags&512)===512;){if(yP(n,t))return;t=t.next}}function L2(n,e){let t=n[So];return!e||t===null||t.length===0?!1:t[0].data[pA]===e}function yP(n,e){let t=e.tView?.ssrId;if(t==null)return!1;let i=n[e.index];return rr(i)&&L2(i,t)?(kv(i),!0):!1}var U2=class{},Nv=class{},PC=class{resolveComponentFactory(e){throw new je(917,!1)}},Lv=class{static NULL=new PC},wc=class{},ia=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>uG()}return n})();function uG(){let n=ft(),e=vi(),t=Sr(e.index,n);return(xr(t)?t:n)[Yt]}var B2=(()=>{class n{static \u0275prov=ye({token:n,providedIn:"root",factory:()=>null})}return n})();var Kg={},ou=class{injector;parentInjector;constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){let r=this.injector.get(e,Kg,i);return r!==Kg||t===Kg?r:this.parentInjector.get(e,t,i)}};function cv(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=bg(r,a);else if(o==2){let l=a,c=e[++s];i=bg(i,l+": "+c+";")}}t?n.styles=i:n.stylesWithoutHost=i,t?n.classes=r:n.classesWithoutHost=r}function jt(n,e=0){let t=ft();if(t===null)return We(n,e);let i=vi();return QP(i,t,gi(n),e)}function z2(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}pG(n,e,t,a,o,l,c)}o!==null&&i!==null&&fG(t,i,o)}function fG(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 je(-301,!1);i.push(e[r],o)}}function hG(n,e,t){e.componentOffset=t,(n.components??=[]).push(e.index)}function pG(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&&hs(h)&&(l=h,hG(n,t,f)),uC(iv(t,e),n,h.type)}xG(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=i2(n,e,a,null);a>0&&(t.directiveToIndex=new Map);for(let f=0;f<a;f++){let h=i[f];if(t.mergedAttrs=au(t.mergedAttrs,h.hostAttrs),gG(n,t,e,u,h),yG(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))xP(0,e,r,i),xP(1,e,r,i),SP(e,i,!1);else{let o=t.get(r);_P(0,e,o,i),_P(1,e,o,i),SP(e,i,!0)}}}function xP(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),V2(e,o)}}function _P(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),V2(e,s)}}function V2(n,e){e==="class"?n.flags|=8:e==="style"&&(n.flags|=16)}function SP(n,e,t){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!t&&r===null||t&&o===null||g1(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 gG(n,e,t,i,r){n.data[i]=r;let o=r.factory||(r.factory=Na(r.type,!0)),s=new Sc(o,hs(r),jt,null);n.blueprint[i]=s,t[i]=s,vG(n,e,i,i2(n,t,r.hostVars,Mr),r)}function vG(n,e,t,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~e.index;bG(s)!=a&&s.push(a),s.push(t,i,o)}}function bG(n){let e=n.length;for(;e>0;){let t=n[--e];if(typeof t=="number"&&t<0)return t}return 0}function yG(n,e,t){if(t){if(e.exportAs)for(let i=0;i<e.exportAs.length;i++)t[e.exportAs[i]]=n;hs(e)&&(t[""]=n)}}function xG(n,e,t){n.flags|=1,n.directiveStart=e,n.directiveEnd=e+t,n.providerIndexes=e}function R1(n,e,t,i,r,o,s,a){let l=e[$e],c=l.consts,d=eo(c,s),u=vu(l,n,t,i,d);return o&&z2(l,e,u,eo(c,a),r),u.mergedAttrs=au(u.mergedAttrs,u.attrs),u.attrs!==null&&cv(u,u.attrs,!1),u.mergedAttrs!==null&&cv(u,u.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,u),u}function k1(n,e){WP(n,e),ES(e)&&n.queries.elementEnd(e)}function _G(n,e,t,i,r,o){let s=e.consts,a=eo(s,r),l=vu(e,n,t,i,a);if(l.mergedAttrs=au(l.mergedAttrs,l.attrs),o!=null){let c=eo(s,o);l.localNames=[];for(let d=0;d<c.length;d+=2)l.localNames.push(c[d],-1)}return l.attrs!==null&&cv(l,l.attrs,!1),l.mergedAttrs!==null&&cv(l,l.mergedAttrs,!0),e.queries!==null&&e.queries.elementStart(e,l),l}function Uv(n,e,t){return n[e]=t}function SG(n,e){return n[e]}function wr(n,e,t){if(t===Mr)return!1;let i=n[e];return Object.is(i,t)?!1:(n[e]=t,!0)}function G2(n,e,t,i){let r=wr(n,e,t);return wr(n,e+1,i)||r}function CG(n,e,t,i,r){let o=G2(n,e,t,i);return wr(n,e+2,r)||o}function Zg(n,e,t){return function i(r){let o=fs(n)?Sr(n.index,e):e;Pv(o,5);let s=e[Rn],a=CP(e,s,t,r),l=i.__ngNextListenerFn__;for(;l;)a=CP(e,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function CP(n,e,t,i){let r=st(null);try{return en(Ht.OutputStart,e,t),t(i)!==!1}catch(o){return D1(n,o),!1}finally{en(Ht.OutputEnd,e,t),st(r)}}function H2(n,e,t,i,r,o,s,a){let l=Jd(n),c=!1,d=null;if(!i&&l&&(d=EG(e,t,o,n.index)),d!==null){let u=d.__ngLastListenerFn__||d;u.__ngNextListenerFn__=s,d.__ngLastListenerFn__=s,c=!0}else{let u=Qr(n,t),f=i?i(u):u;i5(t,f,o,a);let h=r.listen(f,o,a);if(!wG(o)){let p=i?v=>i(_r(v[n.index])):n.index;j2(p,e,t,o,a,h,!1)}}return c}function wG(n){return n.startsWith("animation")||n.startsWith("transition")}function EG(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[Kd],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function j2(n,e,t,i,r,o,s){let a=e.firstCreatePass?RS(e):null,l=OS(t),c=l.length;l.push(r,o),a&&a.push(i,n,c,(c+1)*(s?-1:1))}function wP(n,e,t,i,r,o){let s=e[t],a=e[$e],c=a.data[t].outputs[i],u=s[c].subscribe(o);j2(n.index,a,e,r,o,u,!0)}var AC=Symbol("BINDING");var OC=class extends Lv{ngModule;constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){let t=$s(e);return new du(t,this.ngModule)}};function MG(n){return Object.keys(n).map(e=>{let[t,i,r]=n[e],o={propName:t,templateName:e,isSignal:(i&Cv.SignalBased)!==0};return r&&(o.transform=r),o})}function TG(n){return Object.keys(n).map(e=>({propName:n[e],templateName:e}))}function DG(n,e,t){let i=e instanceof wi?e:e?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new ou(t,i):t}function IG(n){let e=n.get(wc,null);if(e===null)throw new je(407,!1);let t=n.get(B2,null),i=n.get(os,null);return{rendererFactory:e,sanitizer:t,changeDetectionScheduler:i,ngReflect:!1}}function PG(n,e){let t=W2(n);return h1(e,t,t==="svg"?MS:t==="math"?wI:null)}function W2(n){return(n.selectors[0][0]||"div").toLowerCase()}var du=class extends Nv{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=MG(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=TG(this.componentDef.outputs),this.cachedOutputs}constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=X5(e.selectors),this.ngContentSelectors=e.ngContentSelectors??[],this.isBoundToModule=!!t}create(e,t,i,r,o,s){en(Ht.DynamicComponentStart);let a=st(null);try{let l=this.componentDef,c=AG(i,l,s,o),d=DG(l,r||this.ngModule,e),u=IG(d),f=u.rendererFactory.createRenderer(null,l),h=i?yV(f,i,l.encapsulation,d):PG(l,f),p=s?.some(EP)||o?.some(m=>typeof m!="function"&&m.bindings.some(EP)),v=b1(null,c,null,512|n2(l),null,null,u,f,d,null,kA(h,d,!0));v[$t]=h,Fg(v);let g=null;try{let m=R1($t,v,2,"#host",()=>c.directiveRegistry,!0,0);ZA(f,h,m),lu(h,v),Iv(c,v,m),a1(c,m,v),k1(c,m),t!==void 0&&RG(m,this.ngContentSelectors,t),g=Sr(m.index,v),v[Rn]=g[Rn],P1(c,v,null)}catch(m){throw g!==null&&hC(g),hC(v),m}finally{en(Ht.DynamicComponentEnd),Ng()}return new dv(this.componentType,v,!!p)}finally{st(a)}}};function AG(n,e,t,i){let r=n?["ng-version","21.2.0"]:Y5(e.selectors[0]),o=null,s=null,a=0;if(t)for(let d of t)a+=d[AC].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[AC].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=_g(u);l.push(f)}return v1(0,null,OG(o,s),1,a,l,null,null,null,[r],null)}function OG(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 EP(n){let e=n[AC].kind;return e==="input"||e==="twoWay"}var dv=class extends U2{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(e,t,i){super(),this._rootLView=t,this._hasInputBindings=i,this._tNode=bc(t[$e],$t),this.location=hu(this._tNode,t),this.instance=Sr(this._tNode.index,t)[Rn],this.hostView=this.changeDetectorRef=new $a(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=I1(i,r[$e],r,e,t);this.previousInputValues.set(e,t);let s=Sr(i.index,r);Pv(s,1)}get injector(){return new _c(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(e){this.hostView.onDestroy(e)}};function RG(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 bu=(()=>{class n{static __NG_ELEMENT_ID__=kG}return n})();function kG(){let n=vi();return X2(n,ft())}var FG=bu,$2=class extends FG{_lContainer;_hostTNode;_hostLView;constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return hu(this._hostTNode,this._hostLView)}get injector(){return new _c(this._hostTNode,this._hostLView)}get parentInjector(){let e=qC(this._hostTNode,this._hostLView);if(XP(e)){let t=tv(e,this._hostLView),i=ev(e),r=t[$e].data[i+8];return new _c(r,t)}else return new _c(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=MP(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-En}createEmbeddedView(e,t,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=Oh(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Cc(this._hostTNode,s)),a}createComponent(e,t,i,r,o,s,a){let l=e&&!Tz(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 du($s(e)),u=i||this.parentInjector;if(!o&&d.ngModule==null){let m=(l?u:this.parentInjector).get(wi,null);m&&(o=m)}let f=$s(d.componentType??{}),h=Oh(this._lContainer,f?.id??null),p=h?.firstChild??null,v=d.create(u,r,p,o,s,a);return this.insertImpl(v.hostView,c,Cc(this._hostTNode,h)),v}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,i){let r=e._lView;if(EI(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[Bn],c=new $2(l,l[zi],l[Bn]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return gu(s,r,o,i),e.attachToViewContainerRef(),yS(tC(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=MP(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),i=Ah(this._lContainer,t);i&&(vh(tC(this._lContainer),t),Tv(i[$e],i))}detach(e){let t=this._adjustIndex(e,-1),i=Ah(this._lContainer,t);return i&&vh(tC(this._lContainer),t)!=null?new $a(i):null}_adjustIndex(e,t=0){return e??this.length+t}};function MP(n){return n[xh]}function tC(n){return n[xh]||(n[xh]=[])}function X2(n,e){let t,i=e[n.index];return rr(i)?t=i:(t=D2(i,e,null,n),e[n.index]=t,y1(e,t)),Y2(t,e,n,i),new $2(t,n,e)}function NG(n,e){let t=n[Yt],i=t.createComment(""),r=Qr(e,n),o=t.parentNode(r);return sv(t,o,i,t.nextSibling(r),!1),i}var Y2=q2,F1=()=>!1;function LG(n,e,t){return F1(n,e,t)}function q2(n,e,t,i){if(n[us])return;let r;t.type&8?r=_r(i):r=NG(e,t),n[us]=r}function UG(n,e,t){if(n[us]&&n[So])return!0;let i=t[Vi],r=e.index-$t;if(!i||oA(e)||UA(i,r))return!1;let s=gC(i,r),a=i.data[gv]?.[r],[l,c]=aG(s,a);return n[us]=l,n[So]=c,!0}function BG(n,e,t,i){F1(n,t,e)||q2(n,e,t,i)}function K2(){Y2=BG,F1=UG}var RC=class n{queryList;matches=null;constructor(e){this.queryList=e}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},kC=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++)Q2(e,t).matches!==null&&this.queries[t].setDirty()}},FC=class{flags;read;predicate;constructor(e,t,i=null){this.flags=t,this.read=i,typeof e=="string"?this.predicate=$G(e):this.predicate=e}},NC=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)}},LC=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,Yg(t,e,o,!1,!1))}else i===cu?t.type&4&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Yg(t,e,i,!1,!1))}matchTNodeWithReadOption(e,t,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===Er||r===bu||r===cu&&t.type&4)this.addMatch(t.index,-2);else{let o=Yg(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 VG(n,e){return n.type&11?hu(n,e):n.type&4?Av(n,e):null}function GG(n,e,t,i){return t===-1?VG(e,n):t===-2?HG(n,e,i):Dh(n,n[$e],t,e)}function HG(n,e,t){if(t===Er)return hu(e,n);if(t===cu)return Av(e,n);if(t===bu)return X2(e,n)}function Z2(n,e,t,i){let r=e[ls].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(GG(e,d,s[l+1],t.metadata.read))}}r.matches=a}return r.matches}function UC(n,e,t,i){let r=n.queries.getByIndex(t),o=r.matches;if(o!==null){let s=Z2(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=En;u<d.length;u++){let f=d[u];f[za]===f[Bn]&&UC(f[$e],f,c,i)}if(d[gc]!==null){let u=d[gc];for(let f=0;f<u.length;f++){let h=u[f];UC(h[$e],h,c,i)}}}}}return i}function J2(n,e){return n[ls].queries[e].queryList}function jG(n,e,t){let i=new rv((t&4)===4);return DI(n,e,i,i.destroy),(e[ls]??=new kC).queries.push(new RC(i))-1}function WG(n,e,t){let i=In();return i.firstCreatePass&&(XG(i,new FC(n,e,t),-1),(e&2)===2&&(i.staticViewQueries=!0)),jG(i,ft(),e)}function $G(n){return n.split(",").map(e=>e.trim())}function XG(n,e,t){n.queries===null&&(n.queries=new NC),n.queries.track(new LC(e,t))}function Q2(n,e){return n.queries.getByIndex(e)}function YG(n,e){let t=n[$e],i=Q2(t,e);return i.crossesNgTemplate?UC(t,n,e,[]):Z2(t,n,i,e)}function eO(n,e,t){let i,r=oh(()=>{i._dirtyCounter();let o=KG(i,n);if(e&&o===void 0)throw new je(-951,!1);return o});return i=r[Jn],i._dirtyCounter=N(0),i._flatValue=void 0,r}function tO(n){return eO(!0,!1,n)}function nO(n){return eO(!0,!0,n)}function qG(n,e){let t=n[Jn];t._lView=ft(),t._queryIndex=e,t._queryList=J2(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(i=>i+1))}function KG(n,e){let t=n._lView,i=n._queryIndex;if(t===void 0||i===void 0||t[St]&4)return e?void 0:Ci;let r=J2(t,i),o=YG(t,i);return r.reset(o,Xz),e?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var Rh=class{};var kh=class extends Rh{injector;componentFactoryResolver=new OC(this);instance=null;constructor(e){super();let t=new uc([...e.providers,{provide:Rh,useValue:this},{provide:Lv,useValue:this.componentFactoryResolver}],e.parent||Yd(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function N1(n,e,t=null){return new kh({providers:n,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}var ZG=(()=>{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=Mg(!1,t.type),r=i.length>0?N1([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=ye({token:n,providedIn:"environment",factory:()=>new n(We(wi))})}return n})();function pt(n){return Lh(()=>{let e=iO(n),t=de(R({},e),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===KC.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:e.standalone?r=>r.get(ZG).getOrCreateStandaloneInjector(t):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||Eo.Emulated,styles:n.styles||Ci,_:null,schemas:n.schemas||null,tView:null,id:""});e.standalone&&Do("NgStandalone"),rO(t);let i=n.dependencies;return t.directiveDefs=TP(i,JG),t.pipeDefs=TP(i,mS),t.id=t6(t),t})}function JG(n){return $s(n)||_g(n)}function ra(n){return Lh(()=>({type:n.type,bootstrap:n.bootstrap||Ci,declarations:n.declarations||Ci,imports:n.imports||Ci,exports:n.exports||Ci,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function QG(n,e){if(n==null)return Ba;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=Cv.None,l=null),t[o]=[i,a,l],e[o]=s}return t}function e6(n){if(n==null)return Ba;let e={};for(let t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function qn(n){return Lh(()=>{let e=iO(n);return rO(e),e})}function Bv(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 iO(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||Ba,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||Ci,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,controlDef:null,inputs:QG(n.inputs,e),outputs:e6(n.outputs),debugInfo:null}}function rO(n){n.features?.forEach(e=>e(n))}function TP(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 t6(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 n6(n){return Object.getPrototypeOf(n.prototype).constructor}function Tr(n){let e=n6(n.type),t=!0,i=[n];for(;e;){let r;if(hs(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new je(903,!1);r=e.\u0275dir}if(r){if(t){i.push(r);let s=n;s.inputs=nC(n.inputs),s.declaredInputs=nC(n.declaredInputs),s.outputs=nC(n.outputs);let a=r.hostBindings;a&&a6(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&o6(n,l),c&&s6(n,c),i6(n,r),cI(n.outputs,r.outputs),hs(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===Tr&&(t=!1)}}e=Object.getPrototypeOf(e)}r6(i)}function i6(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 r6(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=au(r.hostAttrs,t=au(t,r.hostAttrs))}}function nC(n){return n===Ba?{}:n===Ci?[]:n}function o6(n,e){let t=n.viewQuery;t?n.viewQuery=(i,r)=>{e(i,r),t(i,r)}:n.viewQuery=e}function s6(n,e){let t=n.contentQueries;t?n.contentQueries=(i,r,o)=>{e(i,r,o),t(i,r,o)}:n.contentQueries=e}function a6(n,e){let t=n.hostBindings;t?n.hostBindings=(i,r)=>{e(i,r),t(i,r)}:n.hostBindings=e}function oO(n,e,t,i,r,o,s,a){if(t.firstCreatePass){n.mergedAttrs=au(n.mergedAttrs,n.attrs);let d=n.tView=v1(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),Qd(n,!1);let l=sO(t,e,n,i);Ug()&&C1(t,e,l,n),lu(l,e);let c=D2(l,e,l,n);e[i+$t]=c,y1(e,c),LG(c,n,e)}function l6(n,e,t,i,r,o,s,a,l,c,d){let u=t+$t,f;return e.firstCreatePass?(f=vu(e,u,4,s||null,a||null),Ag()&&z2(e,n,f,eo(e.consts,c),E1),WP(e,f)):f=e.data[u],oO(f,n,e,t,i,r,o,l),Jd(f)&&Iv(e,n,f),c!=null&&jh(n,f,d),f}function Fh(n,e,t,i,r,o,s,a,l,c,d){let u=t+$t,f;if(e.firstCreatePass){if(f=vu(e,u,4,s||null,a||null),c!=null){let h=eo(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 oO(f,n,e,t,i,r,o,l),c!=null&&jh(n,f,d),f}function Xa(n,e,t,i,r,o,s,a){let l=ft(),c=In(),d=eo(c.consts,o);return l6(l,c,n,e,t,i,r,d,void 0,s,a),Xa}var sO=aO;function aO(n,e,t,i){return Ks(!0),e[Yt].createComment("")}function c6(n,e,t,i){let r=!yv(e,t);Ks(r);let o=e[Vi]?.data[hA]?.[i]??null;if(o!==null&&t.tView!==null&&t.tView.ssrId===null&&(t.tView.ssrId=o),r)return aO(n,e);let s=e[Vi],a=Ov(s,n,e,t);bv(s,i,a);let l=s1(s,i);return Rv(l,a)}function lO(){sO=c6}var Cr=(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})(Cr||{}),DP=0,d6=1,Yn=(function(n){return n[n.Placeholder=0]="Placeholder",n[n.Loading=1]="Loading",n[n.Complete=2]="Complete",n[n.Error=3]="Error",n})(Yn||{});var u6=0,Wh=1;var f6=4,h6=5;var p6=7,su=8,m6=9,L1=(function(n){return n[n.Manual=0]="Manual",n[n.Playthrough=1]="Playthrough",n})(L1||{});function Jg(n,e){let t=v6(n),i=e[t];if(i!==null){for(let r of i)r();e[t]=null}}function g6(n){Jg(1,n),Jg(0,n),Jg(2,n)}function v6(n){let e=f6;return n===1?e=h6:n===2&&(e=m6),e}function cO(n){return n+1}function yu(n,e){let t=n[$e],i=cO(e.index);return n[i]}function $h(n,e){let t=cO(e.index);return n.data[t]}function b6(n,e,t){let i=e[$e],r=$h(i,t);switch(n){case Yn.Complete:return r.primaryTmplIndex;case Yn.Loading:return r.loadingTmplIndex;case Yn.Error:return r.errorTmplIndex;case Yn.Placeholder:return r.placeholderTmplIndex;default:return null}}function IP(n,e){return e===Yn.Placeholder?n.placeholderBlockConfig?.[DP]??null:e===Yn.Loading?n.loadingBlockConfig?.[DP]??null:null}function y6(n){return n.loadingBlockConfig?.[d6]??null}function PP(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 x6(n,e){let t=e.primaryTmplIndex+$t;return bc(n,t)}var _6=(()=>{class n{cachedInjectors=new Map;getOrCreateInjector(t,i,r,o){if(!this.cachedInjectors.has(t)){let s=r.length>0?N1(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=ye({token:n,providedIn:"environment",factory:()=>new n})}return n})();var dO=new He("");function iC(n,e,t){return n.get(_6).getOrCreateInjector(e,n,t,"")}function S6(n,e,t){if(n instanceof ou){let r=n.injector,o=n.parentInjector,s=iC(o,e,t);return new ou(r,s)}let i=n.get(wi);if(i!==n){let r=iC(i,e,t);return new ou(n,r)}return iC(n,e,t)}function xc(n,e,t,i=!1){let r=t[Bn],o=r[$e];if(Va(r))return;let s=yu(r,e),a=s[Wh],l=s[p6];if(!(l!==null&&n<l)&&AP(a,n)&&AP(s[u6]??-1,n)){let c=$h(o,e),u=!i&&!0&&(y6(c)!==null||IP(c,Yn.Loading)!==null||IP(c,Yn.Placeholder))?E6:w6;try{u(n,s,t,e,r)}catch(f){D1(r,f)}}}function C6(n,e){let t=n[So]?.findIndex(r=>r.data[vA]===e[Wh])??-1;return{dehydratedView:t>-1?n[So][t]:null,dehydratedViewIx:t}}function w6(n,e,t,i,r){en(Ht.DeferBlockStateStart);let o=b6(n,r,i);if(o!==null){e[Wh]=n;let s=r[$e],a=o+$t,l=bc(s,a),c=0;A1(t,c);let d;if(n===Yn.Complete){let p=$h(s,i),v=p.providers;v&&v.length>0&&(d=S6(r[br],p,v))}let{dehydratedView:u,dehydratedViewIx:f}=C6(t,e),h=mu(r,l,null,{injector:d,dehydratedView:u});if(gu(t,h,c,Cc(l,u)),Pv(h,2),f>-1&&t[So]?.splice(f,1),(n===Yn.Complete||n===Yn.Error)&&Array.isArray(e[su])){for(let p of e[su])p();e[su]=null}}en(Ht.DeferBlockStateEnd)}function AP(n,e){return n<e}function OP(n,e,t){n.loadingPromise.then(()=>{n.loadingState===Cr.COMPLETE?xc(Yn.Complete,e,t):n.loadingState===Cr.FAILED&&xc(Yn.Error,e,t)})}var E6=null;function U1(n){return typeof n=="function"&&n[Jn]!==void 0}function B1(n){return U1(n)&&typeof n.set=="function"}var z1=new He("");function xu(n){return!!n&&typeof n.then=="function"}function V1(n){return!!n&&typeof n.subscribe=="function"}var uO=new He("");var G1=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((t,i)=>{this.resolve=t,this.reject=i});appInits=Z(uO,{optional:!0})??[];injector=Z(Ei);constructor(){}runInitializers(){if(this.initialized)return;let t=[];for(let r of this.appInits){let o=qd(this.injector,r);if(xu(o))t.push(o);else if(V1(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=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),_u=new He("");function fO(){k_(()=>{let n="";throw new je(600,n)})}function hO(n){return n.isBoundToModule}var M6=10;var Dr=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=Z(Zs);afterRenderManager=Z(_1);zonelessEnabled=Z(wh);rootEffectScheduler=Z(zg);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new _o;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=Z(ja);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(nr(t=>!t))}constructor(){Z(na,{optional:!0})}whenStable(){let t;return new Promise(i=>{t=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{t.unsubscribe()})}_injector=Z(wi);_rendererFactory=null;get injector(){return this._injector}bootstrap(t,i){return this.bootstrapImpl(t,i)}bootstrapImpl(t,i,r=Ei.NULL){return this._injector.get(ir).run(()=>{en(Ht.BootstrapComponentStart);let s=t instanceof Nv;if(!this._injector.get(G1).done){let p="";throw new je(405,p)}let l;s?l=t:l=this._injector.get(Lv).resolveComponentFactory(t),this.componentTypes.push(l.componentType);let c=hO(l)?void 0:this._injector.get(Rh),d=i||l.selector,u=l.create(r,[],d,c),f=u.location.nativeElement,h=u.injector.get(z1,null);return h?.registerApplication(f),u.onDestroy(()=>{this.detachView(u.hostView),Th(this.components,u),h?.unregisterApplication(f)}),this._loadComponent(u),en(Ht.BootstrapComponentEnd,u),u})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){en(Ht.ChangeDetectionStart),this.tracingSnapshot!==null?this.tracingSnapshot.run(wv.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw en(Ht.ChangeDetectionEnd),new je(101,!1);let t=st(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,st(t),this.afterTick.next(),en(Ht.ChangeDetectionEnd)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(wc,null,{optional:!0}));let t=0;for(;this.dirtyFlags!==0&&t++<M6;){en(Ht.ChangeDetectionSyncStart);try{this.synchronizeOnce()}finally{en(Ht.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&&!_h(r))continue;let o=i&&!this.zonelessEnabled?0:1;w2(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})=>_h(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;Th(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(_u,[]).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),()=>Th(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new je(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=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Th(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function pO(){let n,e;return{promise:new Promise((i,r)=>{n=i,e=r}),resolve:n,reject:e}}function mO(n,e,t){let i=e[br],r=e[$e];if(n.loadingState!==Cr.NOT_STARTED)return n.loadingPromise??Promise.resolve();let o=yu(e,t),s=x6(r,n);n.loadingState=Cr.IN_PROGRESS,Jg(1,o);let a=n.dependencyResolverFn,l=i.get(nu).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=$s(p)||_g(p);if(v)u.push(v);else{let g=mS(p);g&&f.push(g)}}else{d=!0;break}if(d){if(n.loadingState=Cr.FAILED,n.errorTmplIndex===null){let p=new je(-750,!1);D1(e,p)}}else{n.loadingState=Cr.COMPLETE;let h=s.tView;if(u.length>0){h.directiveRegistry=PP(h.directiveRegistry,u);let p=u.map(g=>g.type),v=Mg(!1,...p);n.providers=v}f.length>0&&(h.pipeRegistry=PP(h.pipeRegistry,f))}}),n.loadingPromise.finally(()=>{n.loadingPromise=null,l()})):(n.loadingPromise=Promise.resolve().then(()=>{n.loadingPromise=null,n.loadingState=Cr.COMPLETE,l()}),n.loadingPromise)}function T6(n,e){return e[br].get(dO,null,{optional:!0})?.behavior!==L1.Manual}function D6(n,e,t){let i=e[$e],r=e[t.index];if(!T6(n,e))return;let o=yu(e,t),s=$h(i,t);switch(g6(o),s.loadingState){case Cr.NOT_STARTED:xc(Yn.Loading,t,r),mO(s,e,t),s.loadingState===Cr.IN_PROGRESS&&OP(s,t,r);break;case Cr.IN_PROGRESS:xc(Yn.Loading,t,r),OP(s,t,r);break;case Cr.COMPLETE:xc(Yn.Complete,t,r);break;case Cr.FAILED:xc(Yn.Error,t,r);break;default:}}async function gO(n,e,t){let i=n.get(vv);if(i.hydrating.has(e))return;let{parentBlockPromise:o,hydrationQueue:s}=u5(e,n);if(s.length===0)return;o!==null&&s.shift(),A6(i,s),o!==null&&await o;let a=s[0];i.has(a)?await RP(n,s,t):i.awaitParentBlock(a,async()=>await RP(n,s,t))}async function RP(n,e,t){let i=n.get(vv),r=i.hydrating,o=n.get(ja),s=o.add();for(let l=0;l<e.length;l++){let c=e[l],d=i.get(c);if(d!=null){if(await R6(d),await O6(n),I6(d)){oG(d),kP(e.slice(l),i);break}r.get(c).resolve()}else{P6(l,e,i),kP(e.slice(l),i);break}}let a=e[e.length-1];await r.get(a)?.promise,o.remove(s),t&&t(e),sG(i.get(a),e,i,n.get(Dr))}function I6(n){return yu(n.lView,n.tNode)[Wh]===Yn.Error}function P6(n,e,t){let i=n-1,r=i>-1?t.get(e[i]):null;r&&Fv(r.lContainer)}function kP(n,e){let t=e.hydrating;for(let i in n)t.get(i)?.reject();e.cleanup(n)}function A6(n,e){for(let t of e)n.hydrating.set(t,pO())}function O6(n){return new Promise(e=>Ev(e,{injector:n}))}async function R6(n){let{tNode:e,lView:t}=n,i=yu(t,e);return new Promise(r=>{k6(i,r),D6(2,t,e)})}function k6(n,e){Array.isArray(n[su])||(n[su]=[]),n[su].push(e)}function Kn(n,e,t,i){let r=ft(),o=Ga();if(wr(r,o,e)){let s=In(),a=Sh();TV(a,r,n,e,t,i)}return Kn}function Ya(){return ft()[oi][Rn]}var BC=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 rC(n,e,t,i,r){return n===t&&Object.is(e,i)?1:Object.is(r(n,e),r(t,i))?-1:0}function F6(n,e,t,i){let r,o,s=0,a=n.length-1,l=void 0;if(Array.isArray(e)){st(i);let c=e.length-1;for(st(null);s<=a&&s<=c;){let d=n.at(s),u=e[s],f=rC(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=rC(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 uv,o??=NP(n,s,a,t),zC(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;)FP(n,r,t,s,e[s]),s++}else if(e!=null){st(i);let c=e[Symbol.iterator]();st(null);let d=c.next();for(;!d.done&&s<=a;){let u=n.at(s),f=d.value,h=rC(s,u,s,f,t);if(h!==0)h<0&&n.updateValue(s,f),s++,d=c.next();else{r??=new uv,o??=NP(n,s,a,t);let p=t(s,f);if(zC(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;)FP(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 zC(n,e,t,i){return e!==void 0&&e.has(i)?(n.attach(t,e.get(i)),e.delete(i),!0):!1}function FP(n,e,t,i,r){if(zC(n,e,i,t(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function NP(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 uv=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){Do("NgControlFlow");let l=ft(),c=In(),d=eo(c.consts,o);return Fh(l,c,n,e,t,i,r,d,256,s,a),H1}function H1(n,e,t,i,r,o,s,a){Do("NgControlFlow");let l=ft(),c=In(),d=eo(c.consts,o);return Fh(l,c,n,e,t,i,r,d,512,s,a),H1}function me(n,e){Do("NgControlFlow");let t=ft(),i=Ga(),r=t[i]!==Mr?t[i]:-1,o=r!==-1?fv(t,$t+r):void 0,s=0;if(wr(t,i,n)){let a=st(null);try{if(o!==void 0&&A1(o,s),n!==-1){let l=$t+n,c=fv(t,l),d=jC(t[$e],l),u=N2(c,d,t),f=mu(t,d,e,{dehydratedView:u});gu(c,f,s,Cc(d,u))}}finally{st(a)}}else if(o!==void 0){let a=I2(o,s);a!==void 0&&(a[Rn]=e)}}var VC=class{lContainer;$implicit;$index;constructor(e,t,i){this.lContainer=e,this.$implicit=t,this.$index=i}get $count(){return this.lContainer.length-En}};function zv(n){return n}function j1(n,e){return e}var GC=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){Do("NgControlFlow");let h=ft(),p=In(),v=l!==void 0,g=ft(),m=a?s.bind(g[oi][Rn]):s,b=new GC(v,m);g[$t+n]=b,Fh(h,p,n+1,e,t,i,r,eo(p.consts,o),256),v&&Fh(h,p,n+2,l,c,d,u,eo(p.consts,f),512)}var HC=class extends BC{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-En}at(e){return this.getLView(e)[Rn].$implicit}attach(e,t){let i=t[Vi];this.needsIndexUpdate||=e!==this.length,gu(this.lContainer,t,e,Cc(this.templateTNode,i)),N6(this.lContainer,e)}detach(e){return this.needsIndexUpdate||=e!==this.length-1,L6(this.lContainer,e),U6(this.lContainer,e)}create(e,t){let i=Oh(this.lContainer,this.templateTNode.tView.ssrId);return mu(this.hostLView,this.templateTNode,new VC(this.lContainer,t,e),{dehydratedView:i})}destroy(e){Tv(e[$e],e)}updateValue(e,t){this.getLView(e)[Rn].$implicit=t}reset(){this.needsIndexUpdate=!1}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e<this.length;e++)this.getLView(e)[Rn].$index=e}getLView(e){return B6(this.lContainer,e)}};function Dt(n){let e=st(null),t=qs();try{let i=ft(),r=i[$e],o=i[t],s=t+1,a=fv(i,s);if(o.liveCollection===void 0){let c=jC(r,s);o.liveCollection=new HC(a,i,c)}else o.liveCollection.reset();let l=o.liveCollection;if(F6(l,n,o.trackByFn,e),l.updateIndexes(),o.hasEmptyBlock){let c=Ga(),d=l.length===0;if(wr(i,c,d)){let u=t+2,f=fv(i,u);if(d){let h=jC(r,u),p=N2(f,h,i),v=mu(i,h,void 0,{dehydratedView:p});gu(f,v,0,Cc(h,p))}else r.firstUpdatePass&&kv(f),A1(f,0)}}}finally{st(e)}}function fv(n,e){return n[e]}function N6(n,e){if(n.length<=En)return;let t=En+e,i=n[t],r=i?i[ds]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[br];iV(o,r),Wa.delete(i[cs]),r.detachedLeaveAnimationFns=void 0}}function L6(n,e){if(n.length<=En)return;let t=En+e,i=n[t],r=i?i[ds]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function U6(n,e){return Ah(n,e)}function B6(n,e){return I2(n,e)}function jC(n,e){return bc(n,e)}function ne(n,e,t){let i=ft(),r=Ga();if(wr(i,r,e)){let o=In(),s=Sh();v2(s,i,n,e,i[Yt],t)}return ne}function WC(n,e,t,i,r){I1(e,n,t,r?"class":"style",i)}function M(n,e,t,i){let r=ft(),o=r[$e],s=n+$t,a=o.firstCreatePass?R1(s,r,2,e,E1,Ag(),t,i):o.data[s];if(M1(a,r,n,e,W1),Jd(a)){let l=r[$e];Iv(l,r,a),a1(l,a,r)}return i!=null&&jh(r,a),M}function I(){let n=In(),e=vi(),t=T1(e);return n.firstCreatePass&&k1(n,t),FS(t)&&NS(),kS(),t.classesWithoutHost!=null&&Rz(t)&&WC(n,t,ft(),t.classesWithoutHost,!0),t.stylesWithoutHost!=null&&kz(t)&&WC(n,t,ft(),t.stylesWithoutHost,!1),I}function J(n,e,t,i){return M(n,e,t,i),I(),J}function Me(n,e,t,i){let r=ft(),o=r[$e],s=n+$t,a=o.firstCreatePass?_G(s,o,2,e,t,i):o.data[s];return M1(a,r,n,e,W1),i!=null&&jh(r,a),Me}function Ge(){let n=vi(),e=T1(n);return FS(e)&&NS(),kS(),Ge}function Lt(n,e,t,i){return Me(n,e,t,i),Ge(),Lt}var W1=(n,e,t,i,r)=>(Ks(!0),h1(e[Yt],i,jS()));function z6(n,e,t,i,r){let o=!yv(e,t);if(Ks(o),o)return h1(e[Yt],i,jS());let s=e[Vi],a=Ov(s,n,e,t);return LA(s,r)&&bv(s,r,a.nextSibling),s&&(iA(t)||rA(a))&&fs(t)&&(AI(t),KA(a)),a}function vO(){W1=z6}function $1(n,e,t){let i=ft(),r=i[$e],o=n+$t,s=r.firstCreatePass?R1(o,i,8,"ng-container",E1,Ag(),e,t):r.data[o];if(M1(s,i,n,"ng-container",bO),Jd(s)){let a=i[$e];Iv(a,i,s),a1(a,s,i)}return t!=null&&jh(i,s),$1}function X1(){let n=In(),e=vi(),t=T1(e);return n.firstCreatePass&&k1(n,t),X1}function Ir(n,e,t){return $1(n,e,t),X1(),Ir}var bO=(n,e,t,i,r)=>(Ks(!0),YA(e[Yt],""));function V6(n,e,t,i,r){let o,s=!yv(e,t);if(Ks(s),s)return YA(e[Yt],"");let a=e[Vi],l=Ov(a,n,e,t),c=c5(a,r);return bv(a,r,l),o=Rv(c,l),o}function yO(){bO=V6}function Xe(){return ft()}function si(n,e,t){let i=ft(),r=Ga();if(wr(i,r,e)){let o=In(),s=Sh();b2(s,i,n,e,i[Yt],t)}return si}var Eh=void 0;function G6(n){let e=Math.floor(Math.abs(n)),t=n.toString().replace(/^[^.]*\.?/,"").length;return e===1&&t===0?1:5}var H6=["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"]],Eh,[["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"]],Eh,[["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}",Eh,Eh,Eh],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",G6],oC={};function Vv(n){let e=j6(n),t=LP(e);if(t)return t;let i=e.split("-")[0];if(t=LP(i),t)return t;if(i==="en")return H6;throw new je(701,!1)}function LP(n){return n in oC||(oC[n]=Zr.ng&&Zr.ng.common&&Zr.ng.common.locales&&Zr.ng.common.locales[n]),oC[n]}var Mc=(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})(Mc||{});function j6(n){return n.toLowerCase().replace(/_/g,"-")}var Xh="en-US";var W6=Xh;function xO(n){typeof n=="string"&&(W6=n.toLowerCase().replace(/_/g,"-"))}function ae(n,e,t){let i=ft(),r=In(),o=vi();return _O(r,i,i[Yt],o,n,e,t),ae}function zn(n,e,t){let i=ft(),r=In(),o=vi();return(o.type&3||t)&&H2(o,r,i,t,i[Yt],n,e,Zg(o,i,e)),zn}function _O(n,e,t,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=Zg(i,e,o),H2(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??=Zg(i,e,o),wP(i,e,f,h,r,l)}if(c&&c.length)for(let u of c)l??=Zg(i,e,o),wP(i,e,u,r,r,l)}}function E(n=1){return HI(n)}function $6(n,e){let t=null,i=G5(n);for(let r=0;r<e.length;r++){let o=e[r];if(o==="*"){t=r;continue}if(i===null?t2(n,o,!0):W5(i,o))return r}return t}function bi(n){let e=ft()[oi][zi];if(!e.projection){let t=n?n.length:1,i=e.projection=mI(t,null),r=i.slice(),o=e.child;for(;o!==null;){if(o.type!==128){let s=n?$6(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function yi(n,e=0,t,i,r,o){let s=ft(),a=In(),l=i?n+1:null;l!==null&&Fh(s,a,l,i,r,o,null,t);let c=vu(a,$t+n,16,null,t||null);c.projection===null&&(c.projection=e),BS();let u=!s[Vi]||Og();s[oi][zi].projection[c.projection]===null&&l!==null?X6(s,a,l):u&&!Vh(c)&&gV(a,s,c)}function X6(n,e,t){let i=$t+t,r=e.data[i],o=n[i],s=Oh(o,r.tView.ssrId),a=mu(n,r,void 0,{dehydratedView:s});gu(o,a,0,Cc(r,s))}function qa(n,e,t,i){return qG(n,WG(e,t,i)),qa}function Tc(n=1){kg(BI()+n)}function to(n){let e=RI();return Dg(e,$t+n)}function Wg(n,e){return n<<17|e<<2}function Ec(n){return n>>17&32767}function Y6(n){return(n&2)==2}function q6(n,e){return n&131071|e<<17}function $C(n){return n|2}function uu(n){return(n&131068)>>2}function sC(n,e){return n&-131069|e<<2}function K6(n){return(n&1)===1}function XC(n){return n|1}function Z6(n,e,t,i,r,o){let s=o?e.classBindings:e.styleBindings,a=Ec(s),l=uu(s);n[i]=t;let c=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||Xd(u,d)>0)&&(c=!0)}else d=t;if(r)if(l!==0){let f=Ec(n[a+1]);n[i+1]=Wg(f,a),f!==0&&(n[f+1]=sC(n[f+1],i)),n[a+1]=q6(n[a+1],i)}else n[i+1]=Wg(a,0),a!==0&&(n[a+1]=sC(n[a+1],i)),a=i;else n[i+1]=Wg(l,0),a===0?a=i:n[l+1]=sC(n[l+1],i),l=i;c&&(n[i+1]=$C(n[i+1])),UP(n,d,i,!0),UP(n,d,i,!1),J6(e,d,n,i,o),s=Wg(a,l),o?e.classBindings=s:e.styleBindings=s}function J6(n,e,t,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof e=="string"&&Xd(o,e)>=0&&(t[i+1]=XC(t[i+1]))}function UP(n,e,t,i){let r=n[t+1],o=e===null,s=i?Ec(r):uu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],c=n[s+1];Q6(l,e)&&(a=!0,n[s+1]=i?XC(c):$C(c)),s=i?Ec(c):uu(c)}a&&(n[t+1]=i?$C(r):XC(r))}function Q6(n,e){return n===null||e==null||(Array.isArray(n)?n[1]:n)===e?!0:Array.isArray(n)&&typeof e=="string"?Xd(n,e)>=0:!1}var wo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function e8(n){return n.substring(wo.key,wo.keyEnd)}function t8(n){return n8(n),SO(n,CO(n,0,wo.textEnd))}function SO(n,e){let t=wo.textEnd;return t===e?-1:(e=wo.keyEnd=i8(n,wo.key=e,t),CO(n,e,t))}function n8(n){wo.key=0,wo.keyEnd=0,wo.value=0,wo.valueEnd=0,wo.textEnd=n.length}function CO(n,e,t){for(;e<t&&n.charCodeAt(e)<=32;)e++;return e}function i8(n,e,t){for(;e<t&&n.charCodeAt(e)>32;)e++;return e}function no(n,e,t){return wO(n,e,t,!1),no}function ut(n,e){return wO(n,e,null,!0),ut}function vs(n){o8(u8,r8,n,!0)}function r8(n,e){for(let t=t8(e);t>=0;t=SO(e,t))wg(n,e8(e),!0)}function wO(n,e,t,i){let r=ft(),o=In(),s=VS(2);if(o.firstUpdatePass&&MO(o,n,s,i),e!==Mr&&wr(r,s,e)){let a=o.data[qs()];TO(o,a,r,r[Yt],n,r[s+1]=h8(e,t),i,s)}}function o8(n,e,t,i){let r=In(),o=VS(2);r.firstUpdatePass&&MO(r,null,o,i);let s=ft();if(t!==Mr&&wr(s,o,t)){let a=r.data[qs()];if(DO(a,i)&&!EO(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=bg(l,t||"")),WC(r,a,s,t,i)}else f8(r,a,s,s[Yt],s[o+1],s[o+1]=d8(n,e,t),i,o)}}function EO(n,e){return e>=n.expandoStartIndex}function MO(n,e,t,i){let r=n.data;if(r[t+1]===null){let o=r[qs()],s=EO(n,t);DO(o,i)&&e===null&&!s&&(e=!1),e=s8(r,o,e,i),Z6(r,o,e,t,s,i)}}function s8(n,e,t,i){let r=UI(n),o=i?e.residualClasses:e.residualStyles;if(r===null)(i?e.classBindings:e.styleBindings)===0&&(t=aC(null,n,e,t,i),t=Nh(t,e.attrs,i),o=null);else{let s=e.directiveStylingLast;if(s===-1||n[s]!==r)if(t=aC(r,n,e,t,i),o===null){let l=a8(n,e,i);l!==void 0&&Array.isArray(l)&&(l=aC(null,n,e,l[1],i),l=Nh(l,e.attrs,i),l8(n,e,i,l))}else o=c8(n,e,i)}return o!==void 0&&(i?e.residualClasses=o:e.residualStyles=o),t}function a8(n,e,t){let i=t?e.classBindings:e.styleBindings;if(uu(i)!==0)return n[Ec(i)]}function l8(n,e,t,i){let r=t?e.classBindings:e.styleBindings;n[Ec(r)]=i}function c8(n,e,t){let i,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=Nh(i,s,t)}return Nh(i,e.attrs,t)}function aC(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=Nh(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(t.directiveStylingLast=a),i}function Nh(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]),wg(n,s,t?!0:e[++o]))}return n===void 0?null:n}function d8(n,e,t){if(t==null||t==="")return Ci;let i=[],r=Mo(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 u8(n,e,t){let i=String(e);i!==""&&!i.includes(" ")&&wg(n,i,t)}function f8(n,e,t,i,r,o,s,a){r===Mr&&(r=Ci);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&&TO(n,e,t,i,p,v,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}function TO(n,e,t,i,r,o,s,a){if(!(e.type&3))return;let l=n.data,c=l[a+1],d=K6(c)?BP(l,e,t,r,uu(c),s):void 0;if(!hv(d)){hv(o)||Y6(c)&&(o=BP(l,null,t,r,a,s));let u=TS(qs(),t);bV(i,s,u,r,o)}}function BP(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===Mr&&(f=u?Ci:void 0);let h=u?Eg(f,i):d===i?f:void 0;if(c&&!hv(h)&&(h=Eg(l,i)),hv(h)&&(a=h,s))return a;let p=n[r+1];r=s?Ec(p):uu(p)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=Eg(l,i))}return a}function hv(n){return n!==void 0}function h8(n,e){return n==null||n===""||(typeof e=="string"?n=n+e:typeof n=="object"&&(n=vg(Mo(n)))),n}function DO(n,e){return(n.flags&(e?8:16))!==0}function z(n,e=""){let t=ft(),i=In(),r=n+$t,o=i.firstCreatePass?vu(i,r,1,e,null):i.data[r],s=IO(i,t,o,e);t[r]=s,Ug()&&C1(i,t,s,o),Qd(o,!1)}var IO=(n,e,t,i)=>(Ks(!0),XA(e[Yt],i));function p8(n,e,t,i){let r=!yv(e,t);if(Ks(r),r)return XA(e[Yt],i);let o=e[Vi];return Ov(o,n,e,t)}function PO(){IO=p8}function AO(n,e,t,i=""){return wr(n,Ga(),t)?e+gh(t)+i:Mr}function rt(n){return Ut("",n),rt}function Ut(n,e,t){let i=ft(),r=AO(i,n,e,t);return r!==Mr&&m8(i,qs(),r),Ut}function m8(n,e,t){let i=TS(e,n);k5(n[Yt],i,t)}function Dc(n,e,t){B1(e)&&(e=e());let i=ft(),r=Ga();if(wr(i,r,e)){let o=In(),s=Sh();v2(s,i,n,e,i[Yt],t)}return Dc}function bs(n,e){let t=B1(n);return t&&n.set(e),t}function Yh(n,e){let t=ft(),i=In(),r=vi();return _O(i,t,t[Yt],r,n,e),Yh}function Y1(n,e,t=""){return AO(ft(),n,e,t)}function zP(n,e,t){let i=In();i.firstCreatePass&&OO(e,i.data,i.blueprint,hs(n),t)}function OO(n,e,t,i,r){if(n=gi(n),Array.isArray(n))for(let o=0;o<n.length;o++)OO(n[o],e,t,i,r);else{let o=In(),s=ft(),a=vi(),l=dc(n)?n:gi(n.provide),c=SS(n),d=a.providerIndexes&1048575,u=a.directiveStart,f=a.providerIndexes>>20;if(dc(n)||!n.multi){let h=new Sc(c,r,jt,null),p=cC(l,e,r?d:d+f,u);p===-1?(uC(iv(a,s),o,l),lC(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=cC(l,e,d+f,u),p=cC(l,e,d,d+f),v=h>=0&&t[h],g=p>=0&&t[p];if(r&&!g||!r&&!v){uC(iv(a,s),o,l);let m=b8(r?v8:g8,t.length,r,i,c,n);!r&&g&&(t[p].providerFactory=m),lC(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=RO(t[r?p:h],c,!r&&i);lC(o,n,h>-1?h:p,m)}!r&&i&&g&&t[p].componentProviders++}}}function lC(n,e,t,i){let r=dc(e),o=_I(e);if(r||o){let l=(o?gi(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 RO(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function cC(n,e,t,i){for(let r=t;r<i;r++)if(e[r]===n)return r;return-1}function g8(n,e,t,i,r){return YC(this.multi,[])}function v8(n,e,t,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Dh(i,i[$e],this.providerFactory.index,r);s=l.slice(0,a),YC(o,s);for(let c=a;c<l.length;c++)s.push(l[c])}else s=[],YC(o,s);return s}function YC(n,e){for(let t=0;t<n.length;t++){let i=n[t];e.push(i())}return e}function b8(n,e,t,i,r,o){let s=new Sc(n,t,jt,null);return s.multi=[],s.index=e,s.componentProviders=0,RO(s,r,i&&!t),s}function io(n,e){return t=>{t.providersResolver=(i,r)=>zP(i,r?r(n):n,!1),e&&(t.viewProvidersResolver=(i,r)=>zP(i,r?r(e):e,!0))}}function q1(n,e){let t=eu()+n,i=ft();return i[t]===Mr?Uv(i,t,e()):SG(i,t)}function ys(n,e,t){return y8(ft(),eu(),n,e,t)}function Gv(n,e,t,i){return kO(ft(),eu(),n,e,t,i)}function K1(n,e){let t=n[e];return t===Mr?void 0:t}function y8(n,e,t,i,r,o){let s=e+t;return wr(n,s,r)?Uv(n,s+1,o?i.call(o,r):i(r)):K1(n,s+1)}function kO(n,e,t,i,r,o,s){let a=e+t;return G2(n,a,r,o)?Uv(n,a+2,s?i.call(s,r,o):i(r,o)):K1(n,a+2)}function x8(n,e,t,i,r,o,s,a){let l=e+t;return CG(n,l,r,o,s)?Uv(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):K1(n,l+3)}function Mi(n,e){let t=In(),i,r=n+$t;t.firstCreatePass?(i=_8(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=Na(i.type,!0)),s,a=Li(jt);try{let l=nv(!1),c=o();return nv(l),DS(t,ft(),r,c),c}finally{Li(a)}}function _8(n,e){if(e)for(let t=e.length-1;t>=0;t--){let i=e[t];if(n===i.name)return i}}function Hi(n,e,t,i){let r=n+$t,o=ft(),s=Dg(o,r);return FO(o,r)?kO(o,eu(),e,s.transform,t,i,s):s.transform(t,i)}function Z1(n,e,t,i,r){let o=n+$t,s=ft(),a=Dg(s,o);return FO(s,o)?x8(s,eu(),e,a.transform,t,i,r,a):a.transform(t,i,r)}function FO(n,e){return n[$e].data[e].pure}function Ka(n,e){return Av(n,e)}var NO=(()=>{class n{applicationErrorHandler=Z(Zs);appRef=Z(Dr);taskService=Z(ja);ngZone=Z(ir);zonelessEnabled=Z(wh);tracing=Z(na,{optional:!0});zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Ni;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(ph):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(Z(qS,{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?YI:WS;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(ph+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=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function LO(){return[{provide:os,useExisting:NO},{provide:ir,useClass:mh},{provide:wh,useValue:!0}]}function S8(){return typeof $localize<"u"&&$localize.locale||Xh}var qh=new He("",{factory:()=>Z(qh,{optional:!0,skipSelf:!0})||S8()});var Kh=class{destroyed=!1;listeners=null;errorHandler=Z(Kr,{optional:!0});destroyRef=Z(or);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(e){if(this.destroyed)throw new je(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(Ws(953,!1));return}if(this.listeners===null)return;let t=st(null);try{for(let i of this.listeners)try{i(e)}catch(r){this.errorHandler?.handleError(r)}}finally{st(t)}}};function Sn(n){return rI(n)}function Ie(n,e){return oh(n,e?.equal)}var nw={JSACTION:"__jsaction",OWNER:"__owner"},VO={};function C8(n){return n[nw.JSACTION]}function UO(n,e){n[nw.JSACTION]=e}function w8(n){return VO[n]}function E8(n,e){VO[n]=e}var ct={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"},M8=[ct.MOUSEENTER,ct.MOUSELEAVE,"pointerenter","pointerleave"],wue=[ct.CLICK,ct.DBLCLICK,ct.FOCUSIN,ct.FOCUSOUT,ct.KEYDOWN,ct.KEYUP,ct.KEYPRESS,ct.MOUSEOVER,ct.MOUSEOUT,ct.SUBMIT,ct.TOUCHSTART,ct.TOUCHEND,ct.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"],T8=[ct.FOCUS,ct.BLUR,ct.ERROR,ct.LOAD,ct.TOGGLE],iw=n=>T8.indexOf(n)>=0;function D8(n){return n===ct.MOUSEENTER?ct.MOUSEOVER:n===ct.MOUSELEAVE?ct.MOUSEOUT:n===ct.POINTERENTER?ct.POINTEROVER:n===ct.POINTERLEAVE?ct.POINTEROUT:n}function I8(n,e,t,i){let r=!1;iw(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 P8(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 A8(n){n.preventDefault?n.preventDefault():n.returnValue=!1}var BO=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function O8(n){return n.which===2||n.which==null&&n.button===4}function R8(n){return BO&&n.metaKey||!BO&&n.ctrlKey||O8(n)||n.shiftKey}function k8(n,e,t){let i=n.relatedTarget;return(n.type===ct.MOUSEOVER&&e===ct.MOUSEENTER||n.type===ct.MOUSEOUT&&e===ct.MOUSELEAVE||n.type===ct.POINTEROVER&&e===ct.POINTERENTER||n.type===ct.POINTEROUT&&e===ct.POINTERLEAVE)&&(!i||i!==t&&!t.contains(i))}function F8(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===ct.MOUSEOVER?t.type=ct.MOUSEENTER:n.type===ct.MOUSEOUT?t.type=ct.MOUSELEAVE:n.type===ct.POINTEROVER?t.type=ct.POINTERENTER:t.type=ct.POINTERLEAVE,t.target=t.srcElement=e,t.bubbles=!1,t._originalEvent=n,t}var N8=typeof navigator<"u"&&/iPhone|iPad|iPod/.test(navigator.userAgent),$v=class{element;handlerInfos=[];constructor(e){this.element=e}addEventListener(e,t,i){N8&&(this.element.style.cursor="pointer"),this.handlerInfos.push(I8(this.element,e,t(this.element),i))}cleanUp(){for(let e=0;e<this.handlerInfos.length;e++)P8(this.element,this.handlerInfos[e]);this.handlerInfos=[]}},L8={NAMESPACE_ACTION_SEPARATOR:".",EVENT_ACTION_SEPARATOR:":"};function Za(n){return n.eventType}function rw(n,e){n.eventType=e}function jv(n){return n.event}function GO(n,e){n.event=e}function HO(n){return n.targetElement}function jO(n,e){n.targetElement=e}function WO(n){return n.eic}function U8(n,e){n.eic=e}function B8(n){return n.timeStamp}function z8(n,e){n.timeStamp=e}function Wv(n){return n.eia}function $O(n,e,t){n.eia=[e,t]}function J1(n){n.eia=void 0}function Hv(n){return n[1]}function V8(n){return n.eirp}function XO(n,e){n.eirp=e}function YO(n){return n.eir}function qO(n,e){n.eir=e}function KO(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 G8(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 Q1=class n{eventInfo;constructor(e){this.eventInfo=e}getEventType(){return Za(this.eventInfo)}setEventType(e){rw(this.eventInfo,e)}getEvent(){return jv(this.eventInfo)}setEvent(e){GO(this.eventInfo,e)}getTargetElement(){return HO(this.eventInfo)}setTargetElement(e){jO(this.eventInfo,e)}getContainer(){return WO(this.eventInfo)}setContainer(e){U8(this.eventInfo,e)}getTimestamp(){return B8(this.eventInfo)}setTimestamp(e){z8(this.eventInfo,e)}getAction(){let e=Wv(this.eventInfo);if(e)return{name:e[0],element:e[1]}}setAction(e){if(!e){J1(this.eventInfo);return}$O(this.eventInfo,e.name,e.element)}getIsReplay(){return V8(this.eventInfo)}setIsReplay(e){XO(this.eventInfo,e)}getResolved(){return YO(this.eventInfo)}setResolved(e){qO(this.eventInfo,e)}clone(){return new n(KO(this.eventInfo))}},H8={},j8=/\s*;\s*/,W8=ct.CLICK,ew=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&&Za(e)===ct.CLICK&&R8(jv(e))?rw(e,ct.CLICKMOD):this.a11yClickSupport&&this.updateEventInfoForA11yClick(e)}resolveAction(e){YO(e)||(this.populateAction(e,HO(e)),qO(e,!0))}resolveParentAction(e){let t=Wv(e),i=t&&Hv(t);J1(e);let r=i&&this.getParentNode(i);r&&this.populateAction(e,r)}populateAction(e,t){let i=t;for(;i&&i!==WO(e)&&(i.nodeType===Node.ELEMENT_NODE&&this.populateActionOnElement(i,e),!Wv(e));)i=this.getParentNode(i);let r=Wv(e);if(r&&(this.a11yClickSupport&&this.preventDefaultForA11yClick(e),this.syntheticMouseEventSupport&&(Za(e)===ct.MOUSEENTER||Za(e)===ct.MOUSELEAVE||Za(e)===ct.POINTERENTER||Za(e)===ct.POINTERLEAVE)))if(k8(jv(e),Za(e),Hv(r))){let o=F8(jv(e),Hv(r));GO(e,o),jO(e,Hv(r))}else J1(e)}getParentNode(e){let t=e[nw.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[Za(t)];r!==void 0&&$O(t,r,e),this.a11yClickSupport&&this.populateClickOnlyAction(e,t,i)}parseActions(e){let t=C8(e);if(!t){let i=e.getAttribute(Vg.JSACTION);if(!i)t=H8,UO(e,t);else{if(t=w8(i),!t){t={};let r=i.split(j8);for(let o=0;o<r.length;o++){let s=r[o];if(!s)continue;let a=s.indexOf(L8.EVENT_ACTION_SEPARATOR),l=a!==-1,c=l?s.substr(0,a).trim():W8,d=l?s.substr(a+1).trim():s;t[c]=d}E8(i,t)}UO(e,t)}}return t}addA11yClickSupport(e,t,i){this.a11yClickSupport=!0,this.updateEventInfoForA11yClick=e,this.preventDefaultForA11yClick=t,this.populateClickOnlyAction=i}},ZO=(function(n){return n[n.I_AM_THE_JSACTION_FRAMEWORK=0]="I_AM_THE_JSACTION_FRAMEWORK",n})(ZO||{}),tw=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 Q1(e);this.actionResolver?.resolveEventType(e),this.actionResolver?.resolveAction(e);let i=t.getAction();if(i&&$8(i.element,t)&&A8(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 $8(n,e){return n.tagName==="A"&&(e.getEventType()===ct.CLICK||e.getEventType()===ct.CLICKMOD)}var JO=Symbol.for("propagationStopped"),ow={REPLAY:101};var X8="`preventDefault` called during event replay.";var Y8="`composedPath` called during event replay.",Xv=class{dispatchDelegate;clickModSupport;actionResolver;dispatcher;constructor(e,t=!0){this.dispatchDelegate=e,this.clickModSupport=t,this.actionResolver=new ew({clickModSupport:t}),this.dispatcher=new tw(i=>{this.dispatchToDelegate(i)},{actionResolver:this.actionResolver})}dispatch(e){this.dispatcher.dispatch(e)}dispatchToDelegate(e){for(e.getIsReplay()&&Z8(e),q8(e);e.getAction();){if(J8(e),iw(e.getEventType())&&e.getAction().element!==e.getTargetElement()||(this.dispatchDelegate(e.getEvent(),e.getAction().name),K8(e)))return;this.actionResolver.resolveParentAction(e.eventInfo)}}};function q8(n){let e=n.getEvent(),t=n.getEvent().stopPropagation.bind(e),i=()=>{e[JO]=!0,t()};Ic(e,"stopPropagation",i),Ic(e,"stopImmediatePropagation",i)}function K8(n){return!!n.getEvent()[JO]}function Z8(n){let e=n.getEvent(),t=n.getTargetElement(),i=e.preventDefault.bind(e);Ic(e,"target",t),Ic(e,"eventPhase",ow.REPLAY),Ic(e,"preventDefault",()=>{throw i(),new Error(X8+"")}),Ic(e,"composedPath",()=>{throw new Error(Y8+"")})}function J8(n){let e=n.getEvent(),t=n.getAction()?.element;t&&Ic(e,"currentTarget",t,{configurable:!0})}function Ic(n,e,t,{configurable:i=!1}={}){Object.defineProperty(n,e,{value:t,configurable:i})}function QO(n,e){n.ecrd(t=>{e.dispatch(t)},ZO.I_AM_THE_JSACTION_FRAMEWORK)}function Q8(n){return n?.q??[]}function eH(n){n&&(zO(n.c,n.et,n.h),zO(n.c,n.etc,n.h,!0))}function zO(n,e,t,i){for(let r=0;r<e.length;r++)n.removeEventListener(e[r],t,i)}var tH=!1,eR=(()=>{class n{static MOUSE_SPECIAL_SUPPORT=tH;containerManager;eventHandlers={};browserEventTypeToExtraEventTypes={};dispatcher=null;queuedEventInfos=[];constructor(t){this.containerManager=t}handleEvent(t,i,r){let o=G8(t,i,i.target,r,Date.now());this.handleEventInfo(o)}handleEventInfo(t){if(!this.dispatcher){XO(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&&M8.indexOf(t)>=0)return;let o=(a,l,c)=>{this.handleEvent(a,l,c)};this.eventHandlers[t]=o;let s=D8(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),eH(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=KO(r);rw(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 tR(n,e=window){return Q8(e._ejsas?.[n])}function sw(n,e=window){e._ejsas&&(e._ejsas[n]=void 0)}var Kv=Symbol("InputSignalNode#UNSET"),dR=de(R({},Hm),{transformFn:void 0,applyValueToInputSignal(n,e){nc(n,e)}});function uR(n,e){let t=Object.create(dR);t.value=n,t.transformFn=e?.transform;function i(){if(Ql(t),t.value===Kv){let r=null;throw new je(-950,r)}return t.value}return i[Jn]=t,i}function It(n){return new Kh}function nR(n,e){return uR(n,e)}function xH(n){return uR(Kv,n)}var we=(nR.required=xH,nR);function iR(n,e){return tO(e)}function _H(n,e){return nO(e)}var Su=(iR.required=_H,iR);function fR(n,e){let t=Object.create(dR),i=new Kh;t.value=n;function r(){return Ql(t),rR(t.value),t.value}return r[Jn]=t,r.asReadonly=Bg.bind(r),r.set=o=>{t.equal(t.value,o)||(nc(t,o),i.emit(o))},r.update=o=>{rR(t.value),r.set(o(t.value))},r.subscribe=i.subscribe.bind(i),r.destroyRef=i.destroyRef,r}function rR(n){if(n===Kv)throw new je(952,!1)}function oR(n,e){return fR(n,e)}function SH(n){return fR(Kv,n)}var xs=(oR.required=SH,oR);var aw=new He(""),CH=new He("");function Zh(n){return!n.moduleRef}function wH(n){let e=Zh(n)?n.r3Injector:n.moduleRef.injector,t=e.get(ir);return t.run(()=>{Zh(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=e.get(Zs),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:i})}),Zh(n)){let o=()=>e.destroy(),s=n.platformInjector.get(aw);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(aw);s.add(o),n.moduleRef.onDestroy(()=>{Th(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return MH(i,t,()=>{let o=e.get(ja),s=o.add(),a=e.get(G1);return a.runInitializers(),a.donePromise.then(()=>{let l=e.get(qh,Xh);if(xO(l||Xh),!e.get(CH,!0))return Zh(n)?e.get(Dr):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(Zh(n)){let d=e.get(Dr);return n.rootComponent!==void 0&&d.bootstrap(n.rootComponent),d}else return EH?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var EH;function MH(n,e,t){try{let i=t();return xu(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n(i)),i}}var qv=null;function TH(n=[],e){return Ei.create({name:e,providers:[{provide:yh,useValue:"platform"},{provide:aw,useValue:new Set([()=>qv=null])},...n]})}function DH(n=[]){if(qv)return qv;let e=TH(n);return qv=e,fO(),IH(e),e}function IH(n){let e=n.get(pv,null);qd(n,()=>{e?.forEach(t=>t())})}var Yv=new WeakSet,sR="";function aR(n){return n.get(n1,xA)}function hR(){let n=[{provide:n1,useFactory:()=>{let e=!0;{let t=Z(gs);e=!!window._ejsas?.[t]}return e&&Do("NgEventReplay"),e}}];return n.push({provide:Xs,useValue:()=>{let e=Z(Dr),{injector:t}=e;if(!Yv.has(e)){let i=Z(i1);if(aR(t)){IA();let r=t.get(gs),o=TA(r,(s,a,l)=>{s.nodeType===Node.ELEMENT_NODE&&(CA(s,a,l),wA(s,i))});e.onDestroy(o)}}},multi:!0},{provide:_u,useFactory:()=>{let e=Z(Dr),{injector:t}=e;return()=>{if(!aR(t)||Yv.has(e))return;Yv.add(e);let i=t.get(gs);e.onDestroy(()=>{Yv.delete(e),sw(i)}),e.whenStable().then(()=>{if(e.destroyed)return;let r=t.get(MA);PH(r,t);let o=t.get(i1);o.get(sR)?.forEach(EA),o.delete(sR);let s=r.instance;NA(t)?e.onDestroy(()=>s.cleanUp()):s.cleanUp()})}},multi:!0}),n}var PH=(n,e)=>{let t=e.get(gs),i=window._ejsas[t],r=n.instance=new eR(new $v(i.c));for(let a of i.et)r.addEvent(a);for(let a of i.etc)r.addEvent(a);let o=tR(t);r.replayEarlyEventInfos(o),sw(t);let s=new Xv(a=>{AH(e,a,a.currentTarget)});QO(r,s)};function AH(n,e,t){let i=(t&&t.getAttribute(zh))??"";/d\d+/.test(i)?OH(i,n,e,t):e.eventPhase===ow.REPLAY&&r1(e,t)}function OH(n,e,t,i){let r=e.get(_A);r.push({event:t,currentTarget:i}),gO(e,n,RH(r))}function RH(n){return e=>{let t=new Set(e),i=[];for(let{event:r,currentTarget:o}of n){let s=o.getAttribute(zh);t.has(s)?r1(r,o):i.push({event:r,currentTarget:o})}n.length=0,n.push(...i)}}var lR=!1;var kH=1e4;function FH(){lR||(lR=!0,RA(),vO(),PO(),yO(),lO(),K2(),F2(),g2())}function NH(n){return n.whenStable()}function pR(){let n=[{provide:Bh,useFactory:()=>{let e=!0;return e=!!Z(pu,{optional:!0})?.get(o1,null),e&&Do("NgHydration"),e}},{provide:Xs,useValue:()=>{A2(!1);let e=Z(Mn);Z(Bh)&&(BA(e),FH())},multi:!0}];return n.push({provide:t1,useFactory:()=>Z(Bh)},{provide:_u,useFactory:()=>{let e=Z(os);if(Z(Bh)){let t=Z(Dr);return()=>{NH(t).then(()=>{t.destroyed||(O1(t),e.notify(7))})}}return()=>{}},multi:!0}),Ys(n)}var vge=kH-1e3;var Zv=(()=>{class n{static __NG_ELEMENT_ID__=LH}return n})();function LH(n){return UH(vi(),ft(),(n&16)===16)}function UH(n,e,t){if(fs(n)&&!t){let i=Sr(n.index,e);return new $a(i,i)}else if(n.type&175){let i=e[oi];return new $a(i,e)}return null}function mR(n){let{rootComponent:e,appProviders:t,platformProviders:i,platformRef:r}=n;en(Ht.BootstrapApplicationStart);try{let o=r?.injector??DH(i),s=[LO(),KI,...t||[]],a=new kh({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return wH({r3Injector:a.injector,platformInjector:o,rootComponent:e})}catch(o){return Promise.reject(o)}finally{en(Ht.BootstrapApplicationEnd)}}function Jv(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}function gR(n,e){let t=$s(n),i=e.elementInjector||Yd();return new du(t).create(i,e.projectableNodes,e.hostElement,e.environmentInjector,e.directives,e.bindings)}var vR=null;function ro(){return vR}function lw(n){vR??=n}var Jh=class{},Qv=(()=>{class n{historyGo(t){throw new Error("")}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:()=>Z(bR),providedIn:"platform"})}return n})();var bR=(()=>{class n extends Qv{_location;_history;_doc=Z(Mn);constructor(){super(),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return ro().getBaseHref(this._doc)}onPopState(t){let i=ro().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",t,!1),()=>i.removeEventListener("popstate",t)}onHashChange(t){let i=ro().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=ye({token:n,factory:()=>new n,providedIn:"platform"})}return n})();var uw=(function(n){return n[n.Decimal=0]="Decimal",n[n.Percent=1]="Percent",n[n.Currency=2]="Currency",n[n.Scientific=3]="Scientific",n})(uw||{});var _s={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 Cu(n,e){let t=Vv(n),i=t[Mc.NumberSymbols][e];if(typeof i>"u"){if(e===_s.CurrencyDecimal)return t[Mc.NumberSymbols][_s.Decimal];if(e===_s.CurrencyGroup)return t[Mc.NumberSymbols][_s.Group]}return i}function xR(n,e){return Vv(n)[Mc.NumberFormats][e]}var BH=/^(\d+)?\.((\d+)(-(\d+))?)?$/,yR=22,e0=".",Qh="0",zH=";",VH=",",cw="#";function GH(n,e,t,i,r,o,s=!1){let a="",l=!1;if(!isFinite(n))a=Cu(t,_s.Infinity);else{let c=WH(n);s&&(c=jH(c));let d=e.minInt,u=e.minFrac,f=e.maxFrac;if(o){let b=o.match(BH);if(b===null)throw new je(2306,!1);let y=b[1],x=b[3],_=b[5];y!=null&&(d=dw(y)),x!=null&&(u=dw(x)),_!=null?f=dw(_):x!=null&&u>f&&(f=u)}$H(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(Cu(t,i)),g.length&&(a+=Cu(t,r)+g.join("")),v&&(a+=Cu(t,_s.Exponential)+"+"+v)}return n<0&&!l?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function _R(n,e,t){let i=xR(e,uw.Decimal),r=HH(i,Cu(e,_s.MinusSign));return GH(n,r,e,_s.Group,_s.Decimal,t)}function HH(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(e0)!==-1?r.split(e0):[r.substring(0,r.lastIndexOf(Qh)+1),r.substring(r.lastIndexOf(Qh)+1)],a=s[0],l=s[1]||"";t.posPre=a.substring(0,a.indexOf(cw));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===Qh?t.minFrac=t.maxFrac=d+1:u===cw?t.maxFrac=d+1:t.posSuf+=u}let c=a.split(VH);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(cw);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 jH(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 WH(n){let e=Math.abs(n)+"",t=0,i,r,o,s,a;for((r=e.indexOf(e0))>-1&&(e=e.replace(e0,"")),(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)===Qh;o++);if(o===(a=e.length))i=[0],r=1;else{for(a--;e.charAt(a)===Qh;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(e.charAt(o))}return r>yR&&(i=i.splice(0,yR-1),t=r-1,r=1),{digits:i,exponent:t,integerLen:r}}function $H(n,e,t){if(e>t)throw new je(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 dw(n){let e=parseInt(n);if(isNaN(e))throw new je(2305,!1);return e}var Pc=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;injector=Z(Ei);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)(jt(bu))};static \u0275dir=qn({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[fu]})}return n})();function SR(n,e){return new je(2100,!1)}var Ac=(()=>{class n{_locale;constructor(t){this._locale=t}transform(t,i,r){if(!XH(t))return null;r||=this._locale;try{let o=YH(t);return _R(o,r,i)}catch(o){throw SR(n,o.message)}}static \u0275fac=function(i){return new(i||n)(jt(qh,16))};static \u0275pipe=Bv({name:"number",type:n,pure:!0})}return n})();function XH(n){return!(n==null||n===""||n!==n)}function YH(n){if(typeof n=="string"&&!isNaN(Number(n)-parseFloat(n)))return Number(n);if(typeof n!="number")throw new je(2309,!1);return n}var fw=(()=>{class n{transform(t,i,r){if(t==null)return null;if(!(typeof t=="string"||Array.isArray(t)))throw SR(n,t);return t.slice(i,r)}static \u0275fac=function(i){return new(i||n)};static \u0275pipe=Bv({name:"slice",type:n,pure:!1})}return n})();var tn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ra({type:n});static \u0275inj=ss({})}return n})();function ep(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 Oc=class{};var CR="browser";var tp=class{_doc;constructor(e){this._doc=e}manager},n0=(()=>{class n extends tp{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)(We(Mn))};static \u0275prov=ye({token:n,factory:n.\u0275fac})}return n})(),o0=new He(""),gw=(()=>{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 n0));this._plugins=r.slice().reverse();let o=t.find(s=>s instanceof n0);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 je(5101,!1);return this._eventNameToPlugin.set(t,i),i}static \u0275fac=function(i){return new(i||n)(We(o0),We(ir))};static \u0275prov=ye({token:n,factory:n.\u0275fac})}return n})(),hw="ng-app-id";function wR(n){for(let e of n)e.remove()}function ER(n,e){let t=e.createElement("style");return t.textContent=n,t}function KH(n,e,t,i){let r=n.head?.querySelectorAll(`style[${hw}="${e}"],link[${hw}="${e}"]`);if(r)for(let o of r)o.removeAttribute(hw),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 mw(n,e){let t=e.createElement("link");return t.setAttribute("rel","stylesheet"),t.setAttribute("href",n),t}var vw=(()=>{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,KH(t,i,this.inline,this.external),this.hosts.add(t.head)}addStyles(t,i){for(let r of t)this.addUsage(r,this.inline,ER);i?.forEach(r=>this.addUsage(r,this.external,mw))}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&&(wR(r.elements),i.delete(t)))}ngOnDestroy(){for(let[,{elements:t}]of[...this.inline,...this.external])wR(t);this.hosts.clear()}addHost(t){this.hosts.add(t);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(t,ER(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(t,mw(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)(We(Mn),We(gs),We(mv,8),We(Uh))};static \u0275prov=ye({token:n,factory:n.\u0275fac})}return n})(),pw={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"},bw=/%COMP%/g;var TR="%COMP%",ZH=`_nghost-${TR}`,JH=`_ngcontent-${TR}`,QH=!0,ej=new He("",{factory:()=>QH});function tj(n){return JH.replace(bw,n)}function nj(n){return ZH.replace(bw,n)}function DR(n,e){return e.map(t=>t.replace(bw,n))}var yw=(()=>{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 np(t,s,a,this.tracingService)}createRenderer(t,i){if(!t||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(t,i);return r instanceof r0?r.applyToHost(t):r instanceof ip&&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 Eo.Emulated:o=new r0(l,c,i,this.appId,d,s,a,u);break;case Eo.ShadowDom:return new i0(l,t,i,s,a,this.nonce,u,c);case Eo.ExperimentalIsolatedShadowDom:return new i0(l,t,i,s,a,this.nonce,u);default:o=new ip(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)(We(gw),We(vw),We(gs),We(ej),We(Mn),We(ir),We(mv),We(na,8))};static \u0275prov=ye({token:n,factory:n.\u0275fac})}return n})(),np=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(pw[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(MR(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(MR(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 je(-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=pw[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){let r=pw[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&(ms.DashCase|ms.Important)?e.style.setProperty(t,i,r&ms.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&ms.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=ro().getGlobalEventTarget(this.doc,e),!e))throw new je(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 MR(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var i0=class extends np{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=DR(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=mw(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)}},ip=class extends np{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?DR(l,c):c,this.styleUrls=i.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&Wa.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},r0=class extends ip{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=tj(c),this.hostAttr=nj(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 s0=class n extends Jh{supportsDOMEvents=!0;static makeCurrent(){lw(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=ij();return t==null?null:rj(t)}resetBaseElement(){rp=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return ep(document.cookie,e)}},rp=null;function ij(){return rp=rp||document.head.querySelector("base"),rp?rp.getAttribute("href"):null}function rj(n){return new URL(n,document.baseURI).pathname}var oj=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:n.\u0275fac})}return n})(),IR=["alt","control","meta","shift"],sj={"\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"},aj={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},PR=(()=>{class n extends tp{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(()=>ro().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."),IR.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=sj[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"),IR.forEach(s=>{if(s!==r){let a=aj[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)(We(Mn))};static \u0275prov=ye({token:n,factory:n.\u0275fac})}return n})();async function xw(n,e){return mR(lj(n,e))}function lj(n,e){return{platformRef:e?.platformRef,appProviders:[...hj,...n?.providers??[]],platformProviders:fj}}function cj(){s0.makeCurrent()}function dj(){return new Kr}function uj(){return ZC(document),document}var fj=[{provide:Uh,useValue:CR},{provide:pv,useValue:cj,multi:!0},{provide:Mn,useFactory:uj}];var hj=[{provide:yh,useValue:"root"},{provide:Kr,useFactory:dj},{provide:o0,useClass:n0,multi:!0},{provide:o0,useClass:PR,multi:!0},yw,vw,gw,{provide:wc,useExisting:yw},{provide:Oc,useClass:oj},[]];var so=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 l0=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()}},c0=class{encodeKey(e){return AR(e)}encodeValue(e){return AR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function pj(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,gj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function AR(n){return encodeURIComponent(n).replace(mj,(e,t)=>gj[t]??e)}function a0(n){return`${n}`}var oo=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new c0,e.fromString){if(e.fromObject)throw new je(2805,!1);this.map=pj(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(a0):[a0(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(a0(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(a0(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 vj(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function OR(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function RR(n){return typeof Blob<"u"&&n instanceof Blob}function kR(n){return typeof FormData<"u"&&n instanceof FormData}function bj(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var FR="Content-Type",NR="Accept",LR="text/plain",UR="application/json",yj=`${UR}, ${LR}, */*`,wu=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(vj(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 je(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 so,this.context??=new l0,!this.params)this.params=new oo,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"||OR(this.body)||RR(this.body)||kR(this.body)||bj(this.body)?this.body:this.body instanceof oo?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||kR(this.body)?null:RR(this.body)?this.body.type||null:OR(this.body)?null:typeof this.body=="string"?LR:this.body instanceof oo?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?UR: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((w,D)=>w.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,D)=>w.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})}},Rc=(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})(Rc||{}),Eu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,i="OK"){this.headers=e.headers||new so,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}},d0=class n extends Eu{constructor(e={}){super(e)}type=Rc.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})}},Mu=class n extends Eu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Rc.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})}},Ja=class extends Eu{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}},xj=200,_j=204;var Sj=new He("");var Cj=/^\)\]\}',?\n/;var Sw=(()=>{class n{xhrFactory;tracingService=Z(na,{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 je(-2800,!1);let i=this.xhrFactory;return is(null).pipe(q_(()=>new Cn(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(NR)||s.setRequestHeader(NR,yj),!t.headers.has(FR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(FR,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 so(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new d0({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!==_j&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?xj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(Cj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=w,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new Mu({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new Ja({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new Ja({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 Ja({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:Rc.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:Rc.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:Rc.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)(We(Oc))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function wj(n,e){return e(n)}function Ej(n,e,t){return(i,r)=>qd(t,()=>e(i,o=>n(o,r)))}var Cw=new He("",{factory:()=>[]}),ww=new He(""),BR=new He("",{factory:()=>!0});var Ew=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Sw),r},providedIn:"root"})}return n})();var u0=(()=>{class n{backend;injector;chain=null;pendingTasks=Z(nu);contributeToStability=Z(BR);constructor(t,i){this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(Cw),...this.injector.get(ww,[])]));this.chain=i.reduceRight((r,o)=>Ej(r,o,this.injector),wj)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(ch(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(We(Ew),We(wi))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Mw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(u0),r},providedIn:"root"})}return n})();function _w(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 f0=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof wu)o=t;else{let l;r.headers instanceof so?l=r.headers:l=new so(r.headers);let c;r.params&&(r.params instanceof oo?c=r.params:c=new oo({fromObject:r.params})),o=new wu(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=is(o).pipe(Y_(l=>this.handler.handle(l)));if(t instanceof wu||r.observe==="events")return s;let a=s.pipe(X_(l=>l instanceof Mu));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(nr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new je(2806,!1);return l.body}));case"blob":return a.pipe(nr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new je(2807,!1);return l.body}));case"text":return a.pipe(nr(l=>{if(l.body!==null&&typeof l.body!="string")throw new je(2808,!1);return l.body}));default:return a.pipe(nr(l=>l.body))}case"response":return a;default:throw new je(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 oo().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,_w(r,i))}post(t,i,r={}){return this.request("POST",t,_w(r,i))}put(t,i,r={}){return this.request("PUT",t,_w(r,i))}static \u0275fac=function(i){return new(i||n)(We(Mw))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Mj=new He("",{factory:()=>!0}),Tj="XSRF-TOKEN",Dj=new He("",{factory:()=>Tj}),Ij="X-XSRF-TOKEN",Pj=new He("",{factory:()=>Ij}),Aj=(()=>{class n{cookieName=Z(Dj);doc=Z(Mn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ep(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),zR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Aj),r},providedIn:"root"})}return n})();function Oj(n,e){if(!Z(Mj)||n.method==="GET"||n.method==="HEAD")return e(n);try{let r=Z(Qv).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(Pj);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var Tw=(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})(Tw||{});function Rj(n,e){return{\u0275kind:n,\u0275providers:e}}function Dw(...n){let e=[f0,u0,{provide:Mw,useExisting:u0},{provide:Ew,useFactory:()=>Z(Sj,{optional:!0})??Z(Sw)},{provide:Cw,useValue:Oj,multi:!0}];for(let t of n)e.push(...t.\u0275providers);return Ys(e)}function Iw(n){return Rj(Tw.Interceptors,n.map(e=>({provide:Cw,useValue:e,multi:!0})))}var kj=new He(""),Fj="b",Nj="h",Lj="s",Uj="st",Bj="u",zj="rt",Pw=new He(""),Vj=["GET","HEAD"];function Gj(n,e){let h=Z(Pw),{isCacheActive:t}=h,i=Qt(h,["isCacheActive"]),{transferCache:r,method:o}=n;if(!t||r===!1||o==="POST"&&!i.includePostRequests&&!r||o!=="POST"&&!Vj.includes(o)||!i.includeRequestsWithAuthHeaders&&Hj(n)||i.filter?.(n)===!1)return e(n);let s=Z(pu);if(Z(kj,{optional:!0}))throw new je(2803,!1);let l=n.url,c=jj(n,l),d=s.get(c,null),u=i.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(u=r.includeHeaders),d){let{[Fj]:p,[zj]:v,[Nj]:g,[Lj]:m,[Uj]:b,[Bj]:y}=d,x=p;switch(v){case"arraybuffer":x=GR(p);break;case"blob":x=new Blob([GR(p)]);break}let _=new so(g);return is(new Mu({body:x,headers:_,status:m,statusText:b,url:y}))}return e(n)}function Hj(n){return n.headers.has("authorization")||n.headers.has("proxy-authorization")}function VR(n){return[...n.keys()].sort().map(e=>`${e}=${n.getAll(e)}`).join("&")}function jj(n,e){let{params:t,method:i,responseType:r}=n,o=VR(t),s=n.serializeBody();s instanceof URLSearchParams?s=VR(s):typeof s!="string"&&(s="");let a=[i,r,e,s,o].join("|"),l=Wj(a);return l}function Wj(n){let e=0;for(let t of n)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function GR(n){let e=atob(n);return Uint8Array.from(e,i=>i.charCodeAt(0)).buffer}function HR(n){return[{provide:Pw,useFactory:()=>(Do("NgHttpTransferCache"),R({isCacheActive:!0},n))},{provide:ww,useValue:Gj,multi:!0},{provide:_u,multi:!0,useFactory:()=>{let e=Z(Dr),t=Z(Pw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var op=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We($j),r},providedIn:"root"})}return n})(),$j=(()=>{class n extends op{_doc;constructor(t){super(),this._doc=t}sanitize(t,i){if(i==null)return null;switch(t){case To.NONE:return i;case To.HTML:return ea(i,"HTML")?Mo(i):_v(this._doc,String(i)).toString();case To.STYLE:return ea(i,"Style")?Mo(i):i;case To.SCRIPT:if(ea(i,"Script"))return Mo(i);throw new je(5200,!1);case To.URL:return ea(i,"URL")?Mo(i):Gh(String(i));case To.RESOURCE_URL:if(ea(i,"ResourceURL"))return Mo(i);throw new je(5201,!1);default:throw new je(5202,!1)}}bypassSecurityTrustHtml(t){return l1(t)}bypassSecurityTrustStyle(t){return c1(t)}bypassSecurityTrustScript(t){return d1(t)}bypassSecurityTrustUrl(t){return u1(t)}bypassSecurityTrustResourceUrl(t){return f1(t)}static \u0275fac=function(i){return new(i||n)(We(Mn))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),h0=(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})(h0||{});function Xj(n,e=[],t={}){return{\u0275kind:n,\u0275providers:e}}function jR(){return Xj(h0.EventReplay,hR())}function WR(...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(h0.HttpTransferCacheOptions);return Ys([[],[],pR(),t.has(h0.NoHttpTransferCache)||i?[]:HR({}),e])}var Tu=class n{loadingCount=N(0);isLoading=Ie(()=>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=ye({token:n,factory:n.\u0275fac,providedIn:"root"})};function p0(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 oa=class n{toastsSignal=N([]);toasts=Ie(()=>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=ye({token:n,factory:n.\u0275fac,providedIn:"root"})};var sp=class n{constructor(e){this.toasterService=e}handleError(e){e instanceof Ja&&this.showError(e)}showError(e){return this.toasterService.showError(p0(e)),Fa(()=>e)}static \u0275fac=function(t){return new(t||n)(We(oa))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})};var $R=(n,e)=>{let t=Z(sp),i=Z(Tu),r=n.headers.has("skipHandleError"),o=n.headers.get("Loader")==="true";return o&&i.show(),e(n).pipe(ac(s=>(r||t.handleError(s),r?is(null):Fa(()=>s))),ch(()=>{o&&i.hide()}))};var XR=[$R];var YR={apiUrl:"https://localhost:8000/api/"};var m0=new He("ENV"),Pbe=new He("LOADER_DELAY");var qR={provide:m0,useValue:YR};function KR(){return[YS(),WR(jR()),Dw(Iw(XR)),qR,Tu]}var sk=(()=>{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)(jt(ia),jt(Er))};static \u0275dir=qn({type:n})}return n})(),fp=(()=>{class n extends sk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,features:[Tr]})}return n})(),Qa=new He(""),Kj={provide:Qa,useExisting:Ui(()=>Nw),multi:!0},Nw=(()=>{class n extends fp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&ae("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[io([Kj]),Tr]})}return n})(),Zj={provide:Qa,useExisting:Ui(()=>Pu),multi:!0};function Jj(){let n=ro()?ro().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Qj=new He(""),Pu=(()=>{class n extends sk{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Jj())}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)(jt(ia),jt(Er),jt(Qj,8))};static \u0275dir=qn({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&&ae("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:[io([Zj]),Tr]})}return n})();var Lw=new He(""),eW=new He("");function tW(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 nW(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 ZR(n){return null}function ak(n){return n!=null}function lk(n){return xu(n)?lh(n):n}function ck(n){let e={};return n.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function dk(n,e){return e.map(t=>t(n))}function iW(n){return!n.validate}function uk(n){return n.map(e=>iW(e)?e:t=>e.validate(t))}function rW(n){if(!n)return null;let e=n.filter(ak);return e.length==0?null:function(t){return ck(dk(t,e))}}function fk(n){return n!=null?rW(uk(n)):null}function oW(n){if(!n)return null;let e=n.filter(ak);return e.length==0?null:function(t){let i=dk(t,e).map(lk);return $_(i).pipe(nr(ck))}}function hk(n){return n!=null?oW(uk(n)):null}function JR(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function sW(n){return n._rawValidators}function aW(n){return n._rawAsyncValidators}function Aw(n){return n?Array.isArray(n)?n:[n]:[]}function v0(n,e){return Array.isArray(n)?n.includes(e):n===e}function QR(n,e){let t=Aw(e);return Aw(n).forEach(r=>{v0(t,r)||t.push(r)}),t}function ek(n,e){return Aw(e).filter(t=>!v0(n,t))}var b0=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=fk(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=hk(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}},Ow=class extends b0{name;get formDirective(){return null}get path(){return null}},up=class extends b0{_parent=null;name=null;valueAccessor=null},Rw=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 el=(()=>{class n extends Rw{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(jt(up,2))};static \u0275dir=qn({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ut("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:[Tr]})}return n})();var ap="VALID",g0="INVALID",Du="PENDING",lp="DISABLED",kc=class{},y0=class extends kc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},cp=class extends kc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},dp=class extends kc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Iu=class extends kc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var kw=class extends kc{source;constructor(e){super(),this.source=e}};function lW(n){return(x0(n)?n.validators:n)||null}function cW(n){return Array.isArray(n)?fk(n):n||null}function dW(n,e){return(x0(e)?e.asyncValidators:n)||null}function uW(n){return Array.isArray(n)?hk(n):n||null}function x0(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var Fw=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 Sn(this.statusReactive)}set status(e){Sn(()=>this.statusReactive.set(e))}_status=Ie(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===ap}get invalid(){return this.status===g0}get pending(){return this.status==Du}get disabled(){return this.status===lp}get enabled(){return this.status!==lp}errors;get pristine(){return Sn(this.pristineReactive)}set pristine(e){Sn(()=>this.pristineReactive.set(e))}_pristine=Ie(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return Sn(this.touchedReactive)}set touched(e){Sn(()=>this.touchedReactive.set(e))}_touched=Ie(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new _o;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(QR(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(QR(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ek(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ek(e,this._rawAsyncValidators))}hasValidator(e){return v0(this._rawValidators,e)}hasAsyncValidator(e){return v0(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(de(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new dp(!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 dp(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(de(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new cp(!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 cp(!0,i))}markAsPending(e={}){this.status=Du;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Iu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(de(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=lp,this.errors=null,this._forEachChild(r=>{r.disable(de(R({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new y0(this.value,i)),this._events.next(new Iu(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(de(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=ap,this._forEachChild(i=>{i.enable(de(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(de(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===ap||this.status===Du)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new y0(this.value,t)),this._events.next(new Iu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(de(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()?lp:ap}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Du,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=lk(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 Iu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new vr,this.statusChanges=new vr}_calculateStatus(){return this._allControlsDisabled()?lp:this.errors?g0:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Du)?Du:this._anyControlsHaveStatus(g0)?g0:ap}_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 cp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new dp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){x0(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=cW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=uW(this._rawAsyncValidators)}};var pk=new He("",{factory:()=>Uw}),Uw="always";function fW(n,e){return[...e.path,n]}function hW(n,e,t=Uw){mW(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),gW(n,e),bW(n,e),vW(n,e),pW(n,e)}function tk(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function pW(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=sW(n);e.validator!==null?n.setValidators(JR(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=aW(n);e.asyncValidator!==null?n.setAsyncValidators(JR(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();tk(e._rawValidators,r),tk(e._rawAsyncValidators,r)}function gW(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&mk(n,e)})}function vW(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 bW(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function yW(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function xW(n){return Object.getPrototypeOf(n.constructor)===fp}function _W(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===Pu?t=o:xW(o)?i=o:r=o}),r||i||t||null}function nk(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function ik(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var SW=class extends Fw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(lW(t),dW(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),x0(t)&&(t.nonNullable||t.initialValueIsDefault)&&(ik(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 kw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){nk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){nk(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){ik(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 CW={provide:up,useExisting:Ui(()=>sa)},rk=Promise.resolve(),sa=(()=>{class n extends up{_changeDetectorRef;callSetDisabledState;control=new SW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new vr;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=_W(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),yW(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(){hW(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){rk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&Jv(i);rk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?fW(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(jt(Ow,9),jt(Lw,10),jt(eW,10),jt(Qa,10),jt(Zv,8),jt(pk,8))};static \u0275dir=qn({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:[io([CW]),Tr,fu]})}return n})();var wW={provide:Qa,useExisting:Ui(()=>hp),multi:!0},hp=(()=>{class n extends fp{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=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&ae("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[io([wW]),Tr]})}return n})();var EW={provide:Qa,useExisting:Ui(()=>_0),multi:!0};function gk(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function MW(n){return n.split(":")[0]}var _0=(()=>{class n extends fp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Dr).injector;destroyRef=Z(or);cdr=Z(Zv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Ev({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=gk(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=MW(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&ae("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[io([EW]),Tr]})}return n})(),vk=(()=>{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(gk(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)(jt(Er),jt(ia),jt(_0,9))};static \u0275dir=qn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),TW={provide:Qa,useExisting:Ui(()=>bk),multi:!0};function ok(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function DW(n){return n.split(":")[0]}var bk=(()=>{class n extends fp{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=DW(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&ae("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[io([TW]),Tr]})}return n})(),yk=(()=>{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(ok(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(ok(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)(jt(Er),jt(ia),jt(bk,9))};static \u0275dir=qn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function xk(n){return typeof n=="number"?n:parseFloat(n)}var _k=(()=>{class n{_validator=ZR;_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):ZR,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=qn({type:n,features:[fu]})}return n})(),IW={provide:Lw,useExisting:Ui(()=>pp),multi:!0},pp=(()=>{class n extends _k{max;inputName="max";normalizeInput=t=>xk(t);createValidator=t=>nW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({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&&Kn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[io([IW]),Tr]})}return n})(),PW={provide:Lw,useExisting:Ui(()=>mp),multi:!0},mp=(()=>{class n extends _k{min;inputName="min";normalizeInput=t=>xk(t);createValidator=t=>tW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({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&&Kn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[io([PW]),Tr]})}return n})();var AW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ra({type:n});static \u0275inj=ss({})}return n})();var ao=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:pk,useValue:t.callSetDisabledState??Uw}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ra({type:n});static \u0275inj=ss({imports:[AW]})}return n})();var gl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},vl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Kk=0,xE=1,Zk=2;var zp=1,Jk=2,lf=3,Ro=0,Yi=1,ws=2,Es=0,zc=1,_E=2,SE=3,CE=4,Qk=5,ll=100,eF=101,tF=102,nF=103,iF=104,rF=200,oF=201,sF=202,aF=203,$0=204,X0=205,lF=206,cF=207,dF=208,uF=209,fF=210,hF=211,pF=212,mF=213,gF=214,bb=0,yb=1,xb=2,Vc=3,_b=4,Sb=5,Cb=6,wb=7,Eb=0,vF=1,bF=2,Fo=0,wE=1,EE=2,ME=3,Kc=4,TE=5,DE=6,IE=7;var lE=300,bl=301,Zc=302,Mb=303,Tb=304,Vp=306,Xu=1e3,Ii=1001,Y0=1002,ci=1003,yF=1004;var Gp=1005;var Gn=1006,Db=1007;var fo=1008;var sr=1009,PE=1010,AE=1011,cf=1012,Ib=1013,No=1014,Lo=1015,Ms=1016,Pb=1017,Ab=1018,df=1020,OE=35902,RE=35899,kE=1021,FE=1022,ho=1023,Ss=1026,yl=1027,NE=1028,Ob=1029,Jc=1030,Rb=1031;var kb=1033,Hp=33776,jp=33777,Wp=33778,$p=33779,Fb=35840,Nb=35841,Lb=35842,Ub=35843,Bb=36196,zb=37492,Vb=37496,Gb=37488,Hb=37489,jb=37490,Wb=37491,$b=37808,Xb=37809,Yb=37810,qb=37811,Kb=37812,Zb=37813,Jb=37814,Qb=37815,ey=37816,ty=37817,ny=37818,iy=37819,ry=37820,oy=37821,sy=36492,ay=36494,ly=36495,cy=36283,dy=36284,uy=36285,fy=36286;var Cp=2300,q0=2301,W0=2302,cE=2400,dE=2401,uE=2402;var xF=3200;var LE=0,_F=1,va="",gn="srgb",Gc="srgb-linear",wp="linear",on="srgb";var Bc=7680;var fE=519,SF=512,CF=513,wF=514,hy=515,EF=516,MF=517,py=518,TF=519,hE=35044;var UE="300 es",Oo=2e3,Ep=2001;function BE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function OW(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Yu(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function DF(){let n=Yu("canvas");return n.style.display="block",n}var Sk={},qu=null;function zE(...n){let e="THREE."+n.shift();qu?qu("log",e,...n):console.log(e,...n)}function dt(...n){let e="THREE."+n.shift();qu?qu("warn",e,...n):console.warn(e,...n)}function mt(...n){let e="THREE."+n.shift();qu?qu("error",e,...n):console.error(e,...n)}function Ku(...n){let e=n.join(" ");e in Sk||(Sk[e]=!0,dt(...n))}function IF(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 Cs=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}}},Ti=["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"],Ck=1234567,_p=Math.PI/180,Zu=180/Math.PI;function uf(){let n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Ti[n&255]+Ti[n>>8&255]+Ti[n>>16&255]+Ti[n>>24&255]+"-"+Ti[e&255]+Ti[e>>8&255]+"-"+Ti[e>>16&15|64]+Ti[e>>24&255]+"-"+Ti[t&63|128]+Ti[t>>8&255]+"-"+Ti[t>>16&255]+Ti[t>>24&255]+Ti[i&255]+Ti[i>>8&255]+Ti[i>>16&255]+Ti[i>>24&255]).toLowerCase()}function Vt(n,e,t){return Math.max(e,Math.min(t,n))}function VE(n,e){return(n%e+e)%e}function RW(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function kW(n,e,t){return n!==e?(t-n)/(e-n):0}function Sp(n,e,t){return(1-t)*n+t*e}function FW(n,e,t,i){return Sp(n,e,1-Math.exp(-t*i))}function NW(n,e=1){return e-Math.abs(VE(n,e*2)-e)}function LW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function UW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function BW(n,e){return n+Math.floor(Math.random()*(e-n+1))}function zW(n,e){return n+Math.random()*(e-n)}function VW(n){return n*(.5-Math.random())}function GW(n){n!==void 0&&(Ck=n);let e=Ck+=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 HW(n){return n*_p}function jW(n){return n*Zu}function WW(n){return(n&n-1)===0&&n!==0}function $W(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function XW(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function YW(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:dt("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function ju(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 ji(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:_p,RAD2DEG:Zu,generateUUID:uf,clamp:Vt,euclideanModulo:VE,mapLinear:RW,inverseLerp:kW,lerp:Sp,damp:FW,pingpong:NW,smoothstep:LW,smootherstep:UW,randInt:BW,randFloat:zW,randFloatSpread:VW,seededRandom:GW,degToRad:HW,radToDeg:jW,isPowerOfTwo:WW,ceilPowerOfTwo:$W,floorPowerOfTwo:XW,setQuaternionFromProperEuler:YW,normalize:ji,denormalize:ju},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}},uo=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:dt("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(wk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(wk.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 Bw.copy(this).projectOnVector(e),this.sub(Bw)}reflect(e){return this.sub(Bw.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}},Bw=new V,wk=new uo,Pt=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],w=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*w,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*w,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*w,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(zw.makeScale(e,t)),this}rotate(e){return this.premultiply(zw.makeRotation(-e)),this}translate(e,t){return this.premultiply(zw.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)}},zw=new Pt,Ek=new Pt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Mk=new Pt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function qW(){let n={enabled:!0,workingColorSpace:Gc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=pa(r.r),r.g=pa(r.g),r.b=pa(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=Wu(r.r),r.g=Wu(r.g),r.b=Wu(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===va?wp: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 Ku("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Ku("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({[Gc]:{primaries:e,whitePoint:i,transfer:wp,toXYZ:Ek,fromXYZ:Mk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:gn},outputColorSpaceConfig:{drawingBufferColorSpace:gn}},[gn]:{primaries:e,whitePoint:i,transfer:on,toXYZ:Ek,fromXYZ:Mk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:gn}}}),n}var zt=qW();function pa(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Wu(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var Au,K0=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{Au===void 0&&(Au=Yu("canvas")),Au.width=e.width,Au.height=e.height;let r=Au.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=Au}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=Yu("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]=pa(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(pa(t[i]/255)*255):t[i]=pa(t[i]);return{data:t,width:e.width,height:e.height}}else return dt("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},KW=0,Ju=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:KW++}),this.uuid=uf(),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(Vw(r[s].image)):o.push(Vw(r[s]))}else o=Vw(r);i.url=o}return t||(e.images[this.uuid]=i),i}};function Vw(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?K0.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(dt("Texture: Unable to serialize Texture."),{})}var ZW=0,Gw=new V,Uo=(()=>{class n extends Cs{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=Ii,o=Ii,s=Gn,a=fo,l=ho,c=sr,d=n.DEFAULT_ANISOTROPY,u=va){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:ZW++}),this.uuid=uf(),this.name="",this.source=new Ju(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 Pt,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(Gw).x}get height(){return this.source.getSize(Gw).y}get depth(){return this.source.getSize(Gw).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){dt(`Texture.setValues(): parameter '${i}' has value of undefined.`);continue}let o=this[i];if(o===void 0){dt(`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!==lE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Xu:t.x=t.x-Math.floor(t.x);break;case Ii:t.x=t.x<0?0:1;break;case Y0: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 Xu:t.y=t.y-Math.floor(t.y);break;case Ii:t.y=t.y<0?0:1;break;case Y0: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=lE,n.DEFAULT_ANISOTROPY=1,n})(),Pn=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,w=(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=w/i,o=D/i):x>_?x<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),i=w/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}},Z0=class extends Cs{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Gn,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 Pn(0,0,e,t),this.scissorTest=!1,this.viewport=new Pn(0,0,e,t);let r={width:e,height:t,depth:i.depth},o=new Uo(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:Gn,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 Ju(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"})}},Rr=class extends Z0{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}},Mp=class extends Uo{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=ci,this.minFilter=ci,this.wrapR=Ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var J0=class extends Uo{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=ci,this.minFilter=ci,this.wrapR=Ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Wi=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(Io.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Io.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=Io.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,Io):Io.fromBufferAttribute(o,s),Io.applyMatrix4(e.matrixWorld),this.expandByPoint(Io);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),C0.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),C0.copy(i.boundingBox)),C0.applyMatrix4(e.matrixWorld),this.union(C0)}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,Io),Io.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(gp),w0.subVectors(this.max,gp),Ou.subVectors(e.a,gp),Ru.subVectors(e.b,gp),ku.subVectors(e.c,gp),tl.subVectors(Ru,Ou),nl.subVectors(ku,Ru),Fc.subVectors(Ou,ku);let t=[0,-tl.z,tl.y,0,-nl.z,nl.y,0,-Fc.z,Fc.y,tl.z,0,-tl.x,nl.z,0,-nl.x,Fc.z,0,-Fc.x,-tl.y,tl.x,0,-nl.y,nl.x,0,-Fc.y,Fc.x,0];return!Hw(t,Ou,Ru,ku,w0)||(t=[1,0,0,0,1,0,0,0,1],!Hw(t,Ou,Ru,ku,w0))?!1:(E0.crossVectors(tl,nl),t=[E0.x,E0.y,E0.z],Hw(t,Ou,Ru,ku,w0))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Io).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Io).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:(aa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),aa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),aa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),aa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),aa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),aa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),aa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),aa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(aa),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}},aa=[new V,new V,new V,new V,new V,new V,new V,new V],Io=new V,C0=new Wi,Ou=new V,Ru=new V,ku=new V,tl=new V,nl=new V,Fc=new V,gp=new V,w0=new V,E0=new V,Nc=new V;function Hw(n,e,t,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){Nc.fromArray(n,o);let a=r.x*Math.abs(Nc.x)+r.y*Math.abs(Nc.y)+r.z*Math.abs(Nc.z),l=e.dot(Nc),c=t.dot(Nc),d=i.dot(Nc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var JW=new Wi,vp=new V,jw=new V,cl=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):JW.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;vp.subVectors(e,this.center);let t=vp.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(vp,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):(jw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(vp.copy(e.center).add(jw)),this.expandByPoint(vp.copy(e.center).sub(jw))),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}},la=new V,Ww=new V,M0=new V,il=new V,$w=new V,T0=new V,Xw=new V,ma=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,la)),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=la.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(la.copy(this.origin).addScaledVector(this.direction,t),la.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Ww.copy(e).add(t).multiplyScalar(.5),M0.copy(t).sub(e).normalize(),il.copy(this.origin).sub(Ww);let o=e.distanceTo(t)*.5,s=-this.direction.dot(M0),a=il.dot(this.direction),l=-il.dot(M0),c=il.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(Ww).addScaledVector(M0,f),h}intersectSphere(e,t){la.subVectors(e.center,this.origin);let i=la.dot(this.direction),r=la.dot(la)-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,la)!==null}intersectTriangle(e,t,i,r,o){$w.subVectors(t,e),T0.subVectors(i,e),Xw.crossVectors($w,T0);let s=this.direction.dot(Xw),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;il.subVectors(this.origin,e);let l=a*this.direction.dot(T0.crossVectors(il,T0));if(l<0)return null;let c=a*this.direction.dot($w.cross(il));if(c<0||l+c>s)return null;let d=-a*il.dot(Xw);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)}},wn=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/Fu.setFromMatrixColumn(e,0).length(),o=1/Fu.setFromMatrixColumn(e,1).length(),s=1/Fu.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(QW,e,e9)}lookAt(e,t,i){let r=this.elements;return Pr.subVectors(e,t),Pr.lengthSq()===0&&(Pr.z=1),Pr.normalize(),rl.crossVectors(i,Pr),rl.lengthSq()===0&&(Math.abs(i.z)===1?Pr.x+=1e-4:Pr.z+=1e-4,Pr.normalize(),rl.crossVectors(i,Pr)),rl.normalize(),D0.crossVectors(Pr,rl),r[0]=rl.x,r[4]=D0.x,r[8]=Pr.x,r[1]=rl.y,r[5]=D0.y,r[9]=Pr.y,r[2]=rl.z,r[6]=D0.z,r[10]=Pr.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],w=r[0],D=r[4],O=r[8],S=r[12],T=r[1],F=r[5],H=r[9],G=r[13],X=r[2],Y=r[6],q=r[10],W=r[14],te=r[3],ve=r[7],be=r[11],xe=r[15];return o[0]=s*w+a*T+l*X+c*te,o[4]=s*D+a*F+l*Y+c*ve,o[8]=s*O+a*H+l*q+c*be,o[12]=s*S+a*G+l*W+c*xe,o[1]=d*w+u*T+f*X+h*te,o[5]=d*D+u*F+f*Y+h*ve,o[9]=d*O+u*H+f*q+h*be,o[13]=d*S+u*G+f*W+h*xe,o[2]=p*w+v*T+g*X+m*te,o[6]=p*D+v*F+g*Y+m*ve,o[10]=p*O+v*H+g*q+m*be,o[14]=p*S+v*G+g*W+m*xe,o[3]=b*w+y*T+x*X+_*te,o[7]=b*D+y*F+x*Y+_*ve,o[11]=b*O+y*H+x*q+_*be,o[15]=b*S+y*G+x*W+_*xe,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,w=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-i*(p*b-g*_+m*w)+r*(p*y-v*_+m*D)-o*(p*x-v*w+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,w=t*b+i*y+r*x+o*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/w;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,w=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)*w,r[5]=(1-(f+m))*w,r[6]=(g+b)*w,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=Fu.set(r[0],r[1],r[2]).length(),s=Fu.set(r[4],r[5],r[6]).length(),a=Fu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Po.copy(this);let c=1/o,d=1/s,u=1/a;return Po.elements[0]*=c,Po.elements[1]*=c,Po.elements[2]*=c,Po.elements[4]*=d,Po.elements[5]*=d,Po.elements[6]*=d,Po.elements[8]*=u,Po.elements[9]*=u,Po.elements[10]*=u,t.setFromRotationMatrix(Po),i.x=o,i.y=s,i.z=a,this}makePerspective(e,t,i,r,o,s,a=Oo,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===Oo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Ep)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=Oo,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===Oo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Ep)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}},Fu=new V,Po=new wn,QW=new V(0,0,0),e9=new V(1,1,1),rl=new V,D0=new V,Pr=new V,Tk=new wn,Dk=new uo,dl=(()=>{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:dt("Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return Tk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Tk,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return Dk.setFromEuler(this),this.setFromQuaternion(Dk,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})(),Qu=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}},t9=0,Ik=new V,Nu=new uo,ca=new wn,I0=new V,bp=new V,n9=new V,i9=new uo,Pk=new V(1,0,0),Ak=new V(0,1,0),Ok=new V(0,0,1),Rk={type:"added"},r9={type:"removed"},Lu={type:"childadded",child:null},Yw={type:"childremoved",child:null},kr=(()=>{class n extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:t9++}),this.uuid=uf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();let t=new V,i=new dl,r=new uo,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 wn},normalMatrix:{value:new Pt}}),this.matrix=new wn,this.matrixWorld=new wn,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Qu,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 Nu.setFromAxisAngle(t,i),this.quaternion.multiply(Nu),this}rotateOnWorldAxis(t,i){return Nu.setFromAxisAngle(t,i),this.quaternion.premultiply(Nu),this}rotateX(t){return this.rotateOnAxis(Pk,t)}rotateY(t){return this.rotateOnAxis(Ak,t)}rotateZ(t){return this.rotateOnAxis(Ok,t)}translateOnAxis(t,i){return Ik.copy(t).applyQuaternion(this.quaternion),this.position.add(Ik.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(Pk,t)}translateY(t){return this.translateOnAxis(Ak,t)}translateZ(t){return this.translateOnAxis(Ok,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ca.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?I0.copy(t):I0.set(t,i,r);let o=this.parent;this.updateWorldMatrix(!0,!1),bp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ca.lookAt(bp,I0,this.up):ca.lookAt(I0,bp,this.up),this.quaternion.setFromRotationMatrix(ca),o&&(ca.extractRotation(o.matrixWorld),Nu.setFromRotationMatrix(ca),this.quaternion.premultiply(Nu.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(Rk),Lu.child=t,this.dispatchEvent(Lu),Lu.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(r9),Yw.child=t,this.dispatchEvent(Yw),Yw.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),ca.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ca.multiply(t.parent.matrixWorld)),t.applyMatrix4(ca),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Rk),Lu.child=t,this.dispatchEvent(Lu),Lu.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(bp,t,n9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(bp,i9,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=>de(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})(),Ao=new V,da=new V,qw=new V,ua=new V,Uu=new V,Bu=new V,kk=new V,Kw=new V,Zw=new V,Jw=new V,Qw=new Pn,eE=new Pn,tE=new Pn,al=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),Ao.subVectors(e,t),r.cross(Ao);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){Ao.subVectors(r,t),da.subVectors(i,t),qw.subVectors(e,t);let s=Ao.dot(Ao),a=Ao.dot(da),l=Ao.dot(qw),c=da.dot(da),d=da.dot(qw),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,ua)===null?!1:ua.x>=0&&ua.y>=0&&ua.x+ua.y<=1}static getInterpolation(e,t,i,r,o,s,a,l){return this.getBarycoord(e,t,i,r,ua)===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,ua.x),l.addScaledVector(s,ua.y),l.addScaledVector(a,ua.z),l)}static getInterpolatedAttribute(e,t,i,r,o,s){return Qw.setScalar(0),eE.setScalar(0),tE.setScalar(0),Qw.fromBufferAttribute(e,t),eE.fromBufferAttribute(e,i),tE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(Qw,o.x),s.addScaledVector(eE,o.y),s.addScaledVector(tE,o.z),s}static isFrontFacing(e,t,i,r){return Ao.subVectors(i,t),da.subVectors(e,t),Ao.cross(da).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 Ao.subVectors(this.c,this.b),da.subVectors(this.a,this.b),Ao.cross(da).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;Uu.subVectors(r,i),Bu.subVectors(o,i),Kw.subVectors(e,i);let l=Uu.dot(Kw),c=Bu.dot(Kw);if(l<=0&&c<=0)return t.copy(i);Zw.subVectors(e,r);let d=Uu.dot(Zw),u=Bu.dot(Zw);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(Uu,s);Jw.subVectors(e,o);let h=Uu.dot(Jw),p=Bu.dot(Jw);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(Bu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return kk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(kk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(i).addScaledVector(Uu,s).addScaledVector(Bu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},PF={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},ol={h:0,s:0,l:0},P0={h:0,s:0,l:0};function nE(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 xt=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=gn){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=VE(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=nE(s,o,e+1/3),this.g=nE(s,o,e),this.b=nE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=gn){function i(o){o!==void 0&&parseFloat(o)<1&&dt("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:dt("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);dt("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=gn){let i=PF[e.toLowerCase()];return i!==void 0?this.setHex(i,t):dt("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=pa(e.r),this.g=pa(e.g),this.b=pa(e.b),this}copyLinearToSRGB(e){return this.r=Wu(e.r),this.g=Wu(e.g),this.b=Wu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=gn){return zt.workingToColorSpace(Di.copy(this),e),Math.round(Vt(Di.r*255,0,255))*65536+Math.round(Vt(Di.g*255,0,255))*256+Math.round(Vt(Di.b*255,0,255))}getHexString(e=gn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Di.copy(this),t);let i=Di.r,r=Di.g,o=Di.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(Di.copy(this),t),e.r=Di.r,e.g=Di.g,e.b=Di.b,e}getStyle(e=gn){zt.workingToColorSpace(Di.copy(this),e);let t=Di.r,i=Di.g,r=Di.b;return e!==gn?`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(ol),this.setHSL(ol.h+e,ol.s+t,ol.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(ol),e.getHSL(P0);let i=Sp(ol.h,P0.h,t),r=Sp(ol.s,P0.s,t),o=Sp(ol.l,P0.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}},Di=new xt;xt.NAMES=PF;var o9=0,Fr=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:o9++}),this.uuid=uf(),this.name="",this.type="Material",this.blending=zc,this.side=Ro,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=$0,this.blendDst=X0,this.blendEquation=ll,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new xt(0,0,0),this.blendAlpha=0,this.depthFunc=Vc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=fE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Bc,this.stencilZFail=Bc,this.stencilZPass=Bc,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){dt(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){dt(`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!==zc&&(i.blending=this.blending),this.side!==Ro&&(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!==$0&&(i.blendSrc=this.blendSrc),this.blendDst!==X0&&(i.blendDst=this.blendDst),this.blendEquation!==ll&&(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!==Vc&&(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!==fE&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Bc&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Bc&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Bc&&(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++}},Tp=class extends Fr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new xt(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 dl,this.combine=Eb,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 Zn=new V,A0=new gt,s9=0,Or=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:s9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=hE,this.updateRanges=[],this.gpuType=Lo,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++)A0.fromBufferAttribute(this,t),A0.applyMatrix3(e),this.setXY(t,A0.x,A0.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.applyMatrix3(e),this.setXYZ(t,Zn.x,Zn.y,Zn.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.applyMatrix4(e),this.setXYZ(t,Zn.x,Zn.y,Zn.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.applyNormalMatrix(e),this.setXYZ(t,Zn.x,Zn.y,Zn.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.transformDirection(e),this.setXYZ(t,Zn.x,Zn.y,Zn.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=ju(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=ji(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=ju(t,this.array)),t}setX(e,t){return this.normalized&&(t=ji(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=ju(t,this.array)),t}setY(e,t){return this.normalized&&(t=ji(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=ju(t,this.array)),t}setZ(e,t){return this.normalized&&(t=ji(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=ju(t,this.array)),t}setW(e,t){return this.normalized&&(t=ji(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=ji(t,this.array),i=ji(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=ji(t,this.array),i=ji(i,this.array),r=ji(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=ji(t,this.array),i=ji(i,this.array),r=ji(r,this.array),o=ji(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!==hE&&(e.usage=this.usage),e}};var Dp=class extends Or{constructor(e,t,i){super(new Uint16Array(e),t,i)}};var Ip=class extends Or{constructor(e,t,i){super(new Uint32Array(e),t,i)}};var Vn=class extends Or{constructor(e,t,i){super(new Float32Array(e),t,i)}},a9=0,lo=new wn,iE=new kr,zu=new V,Ar=new Wi,yp=new Wi,ai=new V,$i=class n extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:a9++}),this.uuid=uf(),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(BE(e)?Ip:Dp)(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 Pt().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 lo.makeRotationFromQuaternion(e),this.applyMatrix4(lo),this}rotateX(e){return lo.makeRotationX(e),this.applyMatrix4(lo),this}rotateY(e){return lo.makeRotationY(e),this.applyMatrix4(lo),this}rotateZ(e){return lo.makeRotationZ(e),this.applyMatrix4(lo),this}translate(e,t,i){return lo.makeTranslation(e,t,i),this.applyMatrix4(lo),this}scale(e,t,i){return lo.makeScale(e,t,i),this.applyMatrix4(lo),this}lookAt(e){return iE.lookAt(e),iE.updateMatrix(),this.applyMatrix4(iE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(zu).negate(),this.translate(zu.x,zu.y,zu.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 Vn(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&&dt("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 Wi);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];Ar.setFromBufferAttribute(o),this.morphTargetsRelative?(ai.addVectors(this.boundingBox.min,Ar.min),this.boundingBox.expandByPoint(ai),ai.addVectors(this.boundingBox.max,Ar.max),this.boundingBox.expandByPoint(ai)):(this.boundingBox.expandByPoint(Ar.min),this.boundingBox.expandByPoint(Ar.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 cl);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(Ar.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];yp.setFromBufferAttribute(a),this.morphTargetsRelative?(ai.addVectors(Ar.min,yp.min),Ar.expandByPoint(ai),ai.addVectors(Ar.max,yp.max),Ar.expandByPoint(ai)):(Ar.expandByPoint(yp.min),Ar.expandByPoint(yp.max))}Ar.getCenter(i);let r=0;for(let o=0,s=e.count;o<s;o++)ai.fromBufferAttribute(e,o),r=Math.max(r,i.distanceToSquared(ai));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++)ai.fromBufferAttribute(a,c),l&&(zu.fromBufferAttribute(e,c),ai.add(zu)),r=Math.max(r,i.distanceToSquared(ai))}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 Or(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,T){c.fromBufferAttribute(i,O),d.fromBufferAttribute(i,S),u.fromBufferAttribute(i,T),f.fromBufferAttribute(o,O),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,T),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let F=1/(h.x*p.y-p.x*h.y);isFinite(F)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(F),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(F),a[O].add(v),a[S].add(v),a[T].add(v),l[O].add(g),l[S].add(g),l[T].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 T=b[O],F=T.start,H=T.count;for(let G=F,X=F+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,w=new V;function D(O){_.fromBufferAttribute(r,O),w.copy(_);let S=a[O];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(w,S);let F=x.dot(l[O])<0?-1:1;s.setXYZW(O,y.x,y.y,y.z,F)}for(let O=0,S=b.length;O<S;++O){let T=b[O],F=T.start,H=T.count;for(let G=F,X=F+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 Or(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++)ai.fromBufferAttribute(e,t),ai.normalize(),e.setXYZ(t,ai.x,ai.y,ai.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 Or(f,d,u)}if(this.index===null)return dt("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"})}},Fk=new wn,Lc=new ma,O0=new cl,Nk=new V,R0=new V,k0=new V,F0=new V,rE=new V,N0=new V,Lk=new V,L0=new V,Xi=class extends kr{constructor(e=new $i,t=new Tp){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){N0.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(rE.fromBufferAttribute(u,e),s?N0.addScaledVector(rE,d):N0.addScaledVector(rE.sub(t),d))}t.add(N0)}return t}raycast(e,t){let i=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),O0.copy(i.boundingSphere),O0.applyMatrix4(o),Lc.copy(e.ray).recast(e.near),!(O0.containsPoint(Lc.origin)===!1&&(Lc.intersectSphere(O0,Nk)===null||Lc.origin.distanceToSquared(Nk)>(e.far-e.near)**2))&&(Fk.copy(o).invert(),Lc.copy(e.ray).applyMatrix4(Fk),!(i.boundingBox!==null&&Lc.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Lc)))}_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 w=a.getX(x),D=a.getX(x+1),O=a.getX(x+2);r=U0(this,m,e,i,c,d,u,w,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=U0(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 w=x,D=x+1,O=x+2;r=U0(this,m,e,i,c,d,u,w,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=U0(this,s,e,i,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function l9(n,e,t,i,r,o,s,a){let l;if(e.side===Yi?l=i.intersectTriangle(s,o,r,!0,a):l=i.intersectTriangle(r,o,s,e.side===Ro,a),l===null)return null;L0.copy(a),L0.applyMatrix4(n.matrixWorld);let c=t.ray.origin.distanceTo(L0);return c<t.near||c>t.far?null:{distance:c,point:L0.clone(),object:n}}function U0(n,e,t,i,r,o,s,a,l,c){n.getVertexPosition(a,R0),n.getVertexPosition(l,k0),n.getVertexPosition(c,F0);let d=l9(n,e,t,i,R0,k0,F0,Lk);if(d){let u=new V;al.getBarycoord(Lk,R0,k0,F0,u),r&&(d.uv=al.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=al.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=al.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};al.getNormal(R0,k0,F0,f.normal),d.face=f,d.barycoord=u}return d}var ef=class n extends $i{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 Vn(c,3)),this.setAttribute("normal",new Vn(d,3)),this.setAttribute("uv",new Vn(u,2));function p(v,g,m,b,y,x,_,w,D,O,S){let T=x/D,F=_/O,H=x/2,G=_/2,X=w/2,Y=D+1,q=O+1,W=0,te=0,ve=new V;for(let be=0;be<q;be++){let xe=be*F-G;for(let Qe=0;Qe<Y;Qe++){let ht=Qe*T-H;ve[v]=ht*b,ve[g]=xe*y,ve[m]=X,c.push(ve.x,ve.y,ve.z),ve[v]=0,ve[g]=0,ve[m]=w>0?1:-1,d.push(ve.x,ve.y,ve.z),u.push(Qe/D),u.push(1-be/O),W+=1}}for(let be=0;be<O;be++)for(let xe=0;xe<D;xe++){let Qe=f+xe+Y*be,ht=f+xe+Y*(be+1),Wt=f+(xe+1)+Y*(be+1),Kt=f+(xe+1)+Y*be;l.push(Qe,ht,Kt),l.push(ht,Wt,Kt),te+=6}a.addGroup(h,te,S),h+=te,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 Qc(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?(dt("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 Pi(n){let e={};for(let t=0;t<n.length;t++){let i=Qc(n[t]);for(let r in i)e[r]=i[r]}return e}function c9(n){let e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function GE(n){let e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var AF={clone:Qc,merge:Pi},d9=`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 l0=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()}},c0=class{encodeKey(e){return AR(e)}encodeValue(e){return AR(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function pj(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,gj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function AR(n){return encodeURIComponent(n).replace(mj,(e,t)=>gj[t]??e)}function a0(n){return`${n}`}var oo=class n{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new c0,e.fromString){if(e.fromObject)throw new je(2805,!1);this.map=pj(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(a0):[a0(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(a0(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(a0(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 vj(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function OR(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function RR(n){return typeof Blob<"u"&&n instanceof Blob}function kR(n){return typeof FormData<"u"&&n instanceof FormData}function bj(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var FR="Content-Type",NR="Accept",LR="text/plain",UR="application/json",yj=`${UR}, ${LR}, */*`,wu=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(vj(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 je(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 so,this.context??=new l0,!this.params)this.params=new oo,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"||OR(this.body)||RR(this.body)||kR(this.body)||bj(this.body)?this.body:this.body instanceof oo?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||kR(this.body)?null:RR(this.body)?this.body.type||null:OR(this.body)?null:typeof this.body=="string"?LR:this.body instanceof oo?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?UR: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((w,D)=>w.set(D,e.setHeaders[D]),y)),e.setParams&&(x=Object.keys(e.setParams).reduce((w,D)=>w.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})}},Rc=(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})(Rc||{}),Eu=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(e,t=200,i="OK"){this.headers=e.headers||new so,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}},d0=class n extends Eu{constructor(e={}){super(e)}type=Rc.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})}},Mu=class n extends Eu{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=Rc.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})}},Ja=class extends Eu{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}},xj=200,_j=204;var Sj=new He("");var Cj=/^\)\]\}',?\n/;var Sw=(()=>{class n{xhrFactory;tracingService=Z(na,{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 je(-2800,!1);let i=this.xhrFactory;return is(null).pipe(q_(()=>new Cn(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(NR)||s.setRequestHeader(NR,yj),!t.headers.has(FR)){let g=t.detectContentTypeHeader();g!==null&&s.setRequestHeader(FR,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 so(s.getAllResponseHeaders()),b=s.responseURL||t.url;return l=new d0({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!==_j&&(x=typeof s.response>"u"?s.responseText:s.response),m===0&&(m=x?xj:0);let _=m>=200&&m<300;if(t.responseType==="json"&&typeof x=="string"){let w=x;x=x.replace(Cj,"");try{x=x!==""?JSON.parse(x):null}catch(D){x=w,_&&(_=!1,x={error:D,text:x})}}_?(o.next(new Mu({body:x,headers:g,status:m,statusText:b,url:y||void 0})),o.complete()):o.error(new Ja({error:x,headers:g,status:m,statusText:b,url:y||void 0}))}),u=this.maybePropagateTrace(g=>{let{url:m}=c(),b=new Ja({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 Ja({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:Rc.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:Rc.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:Rc.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)(We(Oc))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function wj(n,e){return e(n)}function Ej(n,e,t){return(i,r)=>qd(t,()=>e(i,o=>n(o,r)))}var Cw=new He("",{factory:()=>[]}),ww=new He(""),BR=new He("",{factory:()=>!0});var Ew=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Sw),r},providedIn:"root"})}return n})();var u0=(()=>{class n{backend;injector;chain=null;pendingTasks=Z(nu);contributeToStability=Z(BR);constructor(t,i){this.backend=t,this.injector=i}handle(t){if(this.chain===null){let i=Array.from(new Set([...this.injector.get(Cw),...this.injector.get(ww,[])]));this.chain=i.reduceRight((r,o)=>Ej(r,o,this.injector),wj)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(t,r=>this.backend.handle(r)).pipe(ch(i))}else return this.chain(t,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(We(Ew),We(wi))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Mw=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(u0),r},providedIn:"root"})}return n})();function _w(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 f0=(()=>{class n{handler;constructor(t){this.handler=t}request(t,i,r={}){let o;if(t instanceof wu)o=t;else{let l;r.headers instanceof so?l=r.headers:l=new so(r.headers);let c;r.params&&(r.params instanceof oo?c=r.params:c=new oo({fromObject:r.params})),o=new wu(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=is(o).pipe(Y_(l=>this.handler.handle(l)));if(t instanceof wu||r.observe==="events")return s;let a=s.pipe(X_(l=>l instanceof Mu));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(nr(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new je(2806,!1);return l.body}));case"blob":return a.pipe(nr(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new je(2807,!1);return l.body}));case"text":return a.pipe(nr(l=>{if(l.body!==null&&typeof l.body!="string")throw new je(2808,!1);return l.body}));default:return a.pipe(nr(l=>l.body))}case"response":return a;default:throw new je(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 oo().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,_w(r,i))}post(t,i,r={}){return this.request("POST",t,_w(r,i))}put(t,i,r={}){return this.request("PUT",t,_w(r,i))}static \u0275fac=function(i){return new(i||n)(We(Mw))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Mj=new He("",{factory:()=>!0}),Tj="XSRF-TOKEN",Dj=new He("",{factory:()=>Tj}),Ij="X-XSRF-TOKEN",Pj=new He("",{factory:()=>Ij}),Aj=(()=>{class n{cookieName=Z(Dj);doc=Z(Mn);lastCookieString="";lastToken=null;parseCount=0;getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=ep(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),zR=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We(Aj),r},providedIn:"root"})}return n})();function Oj(n,e){if(!Z(Mj)||n.method==="GET"||n.method==="HEAD")return e(n);try{let r=Z(Qv).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(Pj);return t!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,t)})),e(n)}var Tw=(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})(Tw||{});function Rj(n,e){return{\u0275kind:n,\u0275providers:e}}function Dw(...n){let e=[f0,u0,{provide:Mw,useExisting:u0},{provide:Ew,useFactory:()=>Z(Sj,{optional:!0})??Z(Sw)},{provide:Cw,useValue:Oj,multi:!0}];for(let t of n)e.push(...t.\u0275providers);return Ys(e)}function Iw(n){return Rj(Tw.Interceptors,n.map(e=>({provide:Cw,useValue:e,multi:!0})))}var kj=new He(""),Fj="b",Nj="h",Lj="s",Uj="st",Bj="u",zj="rt",Pw=new He(""),Vj=["GET","HEAD"];function Gj(n,e){let h=Z(Pw),{isCacheActive:t}=h,i=Qt(h,["isCacheActive"]),{transferCache:r,method:o}=n;if(!t||r===!1||o==="POST"&&!i.includePostRequests&&!r||o!=="POST"&&!Vj.includes(o)||!i.includeRequestsWithAuthHeaders&&Hj(n)||i.filter?.(n)===!1)return e(n);let s=Z(pu);if(Z(kj,{optional:!0}))throw new je(2803,!1);let l=n.url,c=jj(n,l),d=s.get(c,null),u=i.includeHeaders;if(typeof r=="object"&&r.includeHeaders&&(u=r.includeHeaders),d){let{[Fj]:p,[zj]:v,[Nj]:g,[Lj]:m,[Uj]:b,[Bj]:y}=d,x=p;switch(v){case"arraybuffer":x=GR(p);break;case"blob":x=new Blob([GR(p)]);break}let _=new so(g);return is(new Mu({body:x,headers:_,status:m,statusText:b,url:y}))}return e(n)}function Hj(n){return n.headers.has("authorization")||n.headers.has("proxy-authorization")}function VR(n){return[...n.keys()].sort().map(e=>`${e}=${n.getAll(e)}`).join("&")}function jj(n,e){let{params:t,method:i,responseType:r}=n,o=VR(t),s=n.serializeBody();s instanceof URLSearchParams?s=VR(s):typeof s!="string"&&(s="");let a=[i,r,e,s,o].join("|"),l=Wj(a);return l}function Wj(n){let e=0;for(let t of n)e=Math.imul(31,e)+t.charCodeAt(0)<<0;return e+=2147483648,e.toString()}function GR(n){let e=atob(n);return Uint8Array.from(e,i=>i.charCodeAt(0)).buffer}function HR(n){return[{provide:Pw,useFactory:()=>(Do("NgHttpTransferCache"),R({isCacheActive:!0},n))},{provide:ww,useValue:Gj,multi:!0},{provide:_u,multi:!0,useFactory:()=>{let e=Z(Dr),t=Z(Pw);return()=>{e.whenStable().then(()=>{t.isCacheActive=!1})}}}]}var op=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275prov=ye({token:n,factory:function(i){let r=null;return i?r=new(i||n):r=We($j),r},providedIn:"root"})}return n})(),$j=(()=>{class n extends op{_doc;constructor(t){super(),this._doc=t}sanitize(t,i){if(i==null)return null;switch(t){case To.NONE:return i;case To.HTML:return ea(i,"HTML")?Mo(i):_v(this._doc,String(i)).toString();case To.STYLE:return ea(i,"Style")?Mo(i):i;case To.SCRIPT:if(ea(i,"Script"))return Mo(i);throw new je(5200,!1);case To.URL:return ea(i,"URL")?Mo(i):Gh(String(i));case To.RESOURCE_URL:if(ea(i,"ResourceURL"))return Mo(i);throw new je(5201,!1);default:throw new je(5202,!1)}}bypassSecurityTrustHtml(t){return l1(t)}bypassSecurityTrustStyle(t){return c1(t)}bypassSecurityTrustScript(t){return d1(t)}bypassSecurityTrustUrl(t){return u1(t)}bypassSecurityTrustResourceUrl(t){return f1(t)}static \u0275fac=function(i){return new(i||n)(We(Mn))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),h0=(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})(h0||{});function Xj(n,e=[],t={}){return{\u0275kind:n,\u0275providers:e}}function jR(){return Xj(h0.EventReplay,hR())}function WR(...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(h0.HttpTransferCacheOptions);return Ys([[],[],pR(),t.has(h0.NoHttpTransferCache)||i?[]:HR({}),e])}var Tu=class n{loadingCount=N(0);isLoading=Ie(()=>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=ye({token:n,factory:n.\u0275fac,providedIn:"root"})};function p0(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 oa=class n{toastsSignal=N([]);toasts=Ie(()=>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=ye({token:n,factory:n.\u0275fac,providedIn:"root"})};var sp=class n{constructor(e){this.toasterService=e}handleError(e){e instanceof Ja&&this.showError(e)}showError(e){return this.toasterService.showError(p0(e)),Fa(()=>e)}static \u0275fac=function(t){return new(t||n)(We(oa))};static \u0275prov=ye({token:n,factory:n.\u0275fac,providedIn:"root"})};var $R=(n,e)=>{let t=Z(sp),i=Z(Tu),r=n.headers.has("skipHandleError"),o=n.headers.get("Loader")==="true";return o&&i.show(),e(n).pipe(ac(s=>(r||t.handleError(s),r?is(null):Fa(()=>s))),ch(()=>{o&&i.hide()}))};var XR=[$R];var YR={apiUrl:"https://pixeasy-stage-api-htapefcta9c3arfd.westus3-01.azurewebsites.net/api/"};var m0=new He("ENV"),Pbe=new He("LOADER_DELAY");var qR={provide:m0,useValue:YR};function KR(){return[YS(),WR(jR()),Dw(Iw(XR)),qR,Tu]}var sk=(()=>{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)(jt(ia),jt(Er))};static \u0275dir=qn({type:n})}return n})(),fp=(()=>{class n extends sk{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,features:[Tr]})}return n})(),Qa=new He(""),Kj={provide:Qa,useExisting:Ui(()=>Nw),multi:!0},Nw=(()=>{class n extends fp{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&ae("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[io([Kj]),Tr]})}return n})(),Zj={provide:Qa,useExisting:Ui(()=>Pu),multi:!0};function Jj(){let n=ro()?ro().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Qj=new He(""),Pu=(()=>{class n extends sk{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Jj())}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)(jt(ia),jt(Er),jt(Qj,8))};static \u0275dir=qn({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&&ae("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:[io([Zj]),Tr]})}return n})();var Lw=new He(""),eW=new He("");function tW(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 nW(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 ZR(n){return null}function ak(n){return n!=null}function lk(n){return xu(n)?lh(n):n}function ck(n){let e={};return n.forEach(t=>{e=t!=null?R(R({},e),t):e}),Object.keys(e).length===0?null:e}function dk(n,e){return e.map(t=>t(n))}function iW(n){return!n.validate}function uk(n){return n.map(e=>iW(e)?e:t=>e.validate(t))}function rW(n){if(!n)return null;let e=n.filter(ak);return e.length==0?null:function(t){return ck(dk(t,e))}}function fk(n){return n!=null?rW(uk(n)):null}function oW(n){if(!n)return null;let e=n.filter(ak);return e.length==0?null:function(t){let i=dk(t,e).map(lk);return $_(i).pipe(nr(ck))}}function hk(n){return n!=null?oW(uk(n)):null}function JR(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function sW(n){return n._rawValidators}function aW(n){return n._rawAsyncValidators}function Aw(n){return n?Array.isArray(n)?n:[n]:[]}function v0(n,e){return Array.isArray(n)?n.includes(e):n===e}function QR(n,e){let t=Aw(e);return Aw(n).forEach(r=>{v0(t,r)||t.push(r)}),t}function ek(n,e){return Aw(e).filter(t=>!v0(n,t))}var b0=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=fk(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=hk(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}},Ow=class extends b0{name;get formDirective(){return null}get path(){return null}},up=class extends b0{_parent=null;name=null;valueAccessor=null},Rw=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 el=(()=>{class n extends Rw{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(jt(up,2))};static \u0275dir=qn({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ut("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:[Tr]})}return n})();var ap="VALID",g0="INVALID",Du="PENDING",lp="DISABLED",kc=class{},y0=class extends kc{value;source;constructor(e,t){super(),this.value=e,this.source=t}},cp=class extends kc{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},dp=class extends kc{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Iu=class extends kc{status;source;constructor(e,t){super(),this.status=e,this.source=t}};var kw=class extends kc{source;constructor(e){super(),this.source=e}};function lW(n){return(x0(n)?n.validators:n)||null}function cW(n){return Array.isArray(n)?fk(n):n||null}function dW(n,e){return(x0(e)?e.asyncValidators:n)||null}function uW(n){return Array.isArray(n)?hk(n):n||null}function x0(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var Fw=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 Sn(this.statusReactive)}set status(e){Sn(()=>this.statusReactive.set(e))}_status=Ie(()=>this.statusReactive());statusReactive=N(void 0);get valid(){return this.status===ap}get invalid(){return this.status===g0}get pending(){return this.status==Du}get disabled(){return this.status===lp}get enabled(){return this.status!==lp}errors;get pristine(){return Sn(this.pristineReactive)}set pristine(e){Sn(()=>this.pristineReactive.set(e))}_pristine=Ie(()=>this.pristineReactive());pristineReactive=N(!0);get dirty(){return!this.pristine}get touched(){return Sn(this.touchedReactive)}set touched(e){Sn(()=>this.touchedReactive.set(e))}_touched=Ie(()=>this.touchedReactive());touchedReactive=N(!1);get untouched(){return!this.touched}_events=new _o;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(QR(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(QR(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ek(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ek(e,this._rawAsyncValidators))}hasValidator(e){return v0(this._rawValidators,e)}hasAsyncValidator(e){return v0(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(de(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new dp(!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 dp(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;e.onlySelf||this._parent?.markAsDirty(de(R({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new cp(!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 cp(!0,i))}markAsPending(e={}){this.status=Du;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Iu(this.status,t)),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.markAsPending(de(R({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=lp,this.errors=null,this._forEachChild(r=>{r.disable(de(R({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new y0(this.value,i)),this._events.next(new Iu(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(de(R({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=ap,this._forEachChild(i=>{i.enable(de(R({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(de(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===ap||this.status===Du)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new y0(this.value,t)),this._events.next(new Iu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),e.onlySelf||this._parent?.updateValueAndValidity(de(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()?lp:ap}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Du,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=lk(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 Iu(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new vr,this.statusChanges=new vr}_calculateStatus(){return this._allControlsDisabled()?lp:this.errors?g0:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Du)?Du:this._anyControlsHaveStatus(g0)?g0:ap}_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 cp(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new dp(this.touched,t)),e.onlySelf||this._parent?._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){x0(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=cW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=uW(this._rawAsyncValidators)}};var pk=new He("",{factory:()=>Uw}),Uw="always";function fW(n,e){return[...e.path,n]}function hW(n,e,t=Uw){mW(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),gW(n,e),bW(n,e),vW(n,e),pW(n,e)}function tk(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function pW(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=sW(n);e.validator!==null?n.setValidators(JR(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=aW(n);e.asyncValidator!==null?n.setAsyncValidators(JR(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();tk(e._rawValidators,r),tk(e._rawAsyncValidators,r)}function gW(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&mk(n,e)})}function vW(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 bW(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function yW(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function xW(n){return Object.getPrototypeOf(n.constructor)===fp}function _W(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===Pu?t=o:xW(o)?i=o:r=o}),r||i||t||null}function nk(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function ik(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var SW=class extends Fw{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(lW(t),dW(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),x0(t)&&(t.nonNullable||t.initialValueIsDefault)&&(ik(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 kw(this))}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){nk(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){nk(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){ik(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 CW={provide:up,useExisting:Ui(()=>sa)},rk=Promise.resolve(),sa=(()=>{class n extends up{_changeDetectorRef;callSetDisabledState;control=new SW;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new vr;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=_W(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),yW(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(){hW(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){rk.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&Jv(i);rk.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?fW(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(jt(Ow,9),jt(Lw,10),jt(eW,10),jt(Qa,10),jt(Zv,8),jt(pk,8))};static \u0275dir=qn({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:[io([CW]),Tr,fu]})}return n})();var wW={provide:Qa,useExisting:Ui(()=>hp),multi:!0},hp=(()=>{class n extends fp{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=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&ae("input",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[io([wW]),Tr]})}return n})();var EW={provide:Qa,useExisting:Ui(()=>_0),multi:!0};function gk(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function MW(n){return n.split(":")[0]}var _0=(()=>{class n extends fp{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=Z(Dr).injector;destroyRef=Z(or);cdr=Z(Zv);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,Ev({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=gk(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=MW(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&ae("change",function(s){return r.onChange(s.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[io([EW]),Tr]})}return n})(),vk=(()=>{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(gk(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)(jt(Er),jt(ia),jt(_0,9))};static \u0275dir=qn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),TW={provide:Qa,useExisting:Ui(()=>bk),multi:!0};function ok(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function DW(n){return n.split(":")[0]}var bk=(()=>{class n extends fp{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=DW(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&ae("change",function(s){return r.onChange(s.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[io([TW]),Tr]})}return n})(),yk=(()=>{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(ok(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(ok(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)(jt(Er),jt(ia),jt(bk,9))};static \u0275dir=qn({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function xk(n){return typeof n=="number"?n:parseFloat(n)}var _k=(()=>{class n{_validator=ZR;_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):ZR,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=qn({type:n,features:[fu]})}return n})(),IW={provide:Lw,useExisting:Ui(()=>pp),multi:!0},pp=(()=>{class n extends _k{max;inputName="max";normalizeInput=t=>xk(t);createValidator=t=>nW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({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&&Kn("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[io([IW]),Tr]})}return n})(),PW={provide:Lw,useExisting:Ui(()=>mp),multi:!0},mp=(()=>{class n extends _k{min;inputName="min";normalizeInput=t=>xk(t);createValidator=t=>tW(t);static \u0275fac=(()=>{let t;return function(r){return(t||(t=Qs(n)))(r||n)}})();static \u0275dir=qn({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&&Kn("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[io([PW]),Tr]})}return n})();var AW=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ra({type:n});static \u0275inj=ss({})}return n})();var ao=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:pk,useValue:t.callSetDisabledState??Uw}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ra({type:n});static \u0275inj=ss({imports:[AW]})}return n})();var gl={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},vl={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Kk=0,xE=1,Zk=2;var zp=1,Jk=2,lf=3,Ro=0,Yi=1,ws=2,Es=0,zc=1,_E=2,SE=3,CE=4,Qk=5,ll=100,eF=101,tF=102,nF=103,iF=104,rF=200,oF=201,sF=202,aF=203,$0=204,X0=205,lF=206,cF=207,dF=208,uF=209,fF=210,hF=211,pF=212,mF=213,gF=214,bb=0,yb=1,xb=2,Vc=3,_b=4,Sb=5,Cb=6,wb=7,Eb=0,vF=1,bF=2,Fo=0,wE=1,EE=2,ME=3,Kc=4,TE=5,DE=6,IE=7;var lE=300,bl=301,Zc=302,Mb=303,Tb=304,Vp=306,Xu=1e3,Ii=1001,Y0=1002,ci=1003,yF=1004;var Gp=1005;var Gn=1006,Db=1007;var fo=1008;var sr=1009,PE=1010,AE=1011,cf=1012,Ib=1013,No=1014,Lo=1015,Ms=1016,Pb=1017,Ab=1018,df=1020,OE=35902,RE=35899,kE=1021,FE=1022,ho=1023,Ss=1026,yl=1027,NE=1028,Ob=1029,Jc=1030,Rb=1031;var kb=1033,Hp=33776,jp=33777,Wp=33778,$p=33779,Fb=35840,Nb=35841,Lb=35842,Ub=35843,Bb=36196,zb=37492,Vb=37496,Gb=37488,Hb=37489,jb=37490,Wb=37491,$b=37808,Xb=37809,Yb=37810,qb=37811,Kb=37812,Zb=37813,Jb=37814,Qb=37815,ey=37816,ty=37817,ny=37818,iy=37819,ry=37820,oy=37821,sy=36492,ay=36494,ly=36495,cy=36283,dy=36284,uy=36285,fy=36286;var Cp=2300,q0=2301,W0=2302,cE=2400,dE=2401,uE=2402;var xF=3200;var LE=0,_F=1,va="",gn="srgb",Gc="srgb-linear",wp="linear",on="srgb";var Bc=7680;var fE=519,SF=512,CF=513,wF=514,hy=515,EF=516,MF=517,py=518,TF=519,hE=35044;var UE="300 es",Oo=2e3,Ep=2001;function BE(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}function OW(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Yu(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function DF(){let n=Yu("canvas");return n.style.display="block",n}var Sk={},qu=null;function zE(...n){let e="THREE."+n.shift();qu?qu("log",e,...n):console.log(e,...n)}function dt(...n){let e="THREE."+n.shift();qu?qu("warn",e,...n):console.warn(e,...n)}function mt(...n){let e="THREE."+n.shift();qu?qu("error",e,...n):console.error(e,...n)}function Ku(...n){let e=n.join(" ");e in Sk||(Sk[e]=!0,dt(...n))}function IF(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 Cs=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}}},Ti=["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"],Ck=1234567,_p=Math.PI/180,Zu=180/Math.PI;function uf(){let n=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Ti[n&255]+Ti[n>>8&255]+Ti[n>>16&255]+Ti[n>>24&255]+"-"+Ti[e&255]+Ti[e>>8&255]+"-"+Ti[e>>16&15|64]+Ti[e>>24&255]+"-"+Ti[t&63|128]+Ti[t>>8&255]+"-"+Ti[t>>16&255]+Ti[t>>24&255]+Ti[i&255]+Ti[i>>8&255]+Ti[i>>16&255]+Ti[i>>24&255]).toLowerCase()}function Vt(n,e,t){return Math.max(e,Math.min(t,n))}function VE(n,e){return(n%e+e)%e}function RW(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function kW(n,e,t){return n!==e?(t-n)/(e-n):0}function Sp(n,e,t){return(1-t)*n+t*e}function FW(n,e,t,i){return Sp(n,e,1-Math.exp(-t*i))}function NW(n,e=1){return e-Math.abs(VE(n,e*2)-e)}function LW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function UW(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function BW(n,e){return n+Math.floor(Math.random()*(e-n+1))}function zW(n,e){return n+Math.random()*(e-n)}function VW(n){return n*(.5-Math.random())}function GW(n){n!==void 0&&(Ck=n);let e=Ck+=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 HW(n){return n*_p}function jW(n){return n*Zu}function WW(n){return(n&n-1)===0&&n!==0}function $W(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function XW(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function YW(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:dt("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function ju(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 ji(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:_p,RAD2DEG:Zu,generateUUID:uf,clamp:Vt,euclideanModulo:VE,mapLinear:RW,inverseLerp:kW,lerp:Sp,damp:FW,pingpong:NW,smoothstep:LW,smootherstep:UW,randInt:BW,randFloat:zW,randFloatSpread:VW,seededRandom:GW,degToRad:HW,radToDeg:jW,isPowerOfTwo:WW,ceilPowerOfTwo:$W,floorPowerOfTwo:XW,setQuaternionFromProperEuler:YW,normalize:ji,denormalize:ju},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}},uo=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:dt("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(wk.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(wk.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 Bw.copy(this).projectOnVector(e),this.sub(Bw)}reflect(e){return this.sub(Bw.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}},Bw=new V,wk=new uo,Pt=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],w=r[5],D=r[8];return o[0]=s*v+a*b+l*_,o[3]=s*g+a*y+l*w,o[6]=s*m+a*x+l*D,o[1]=c*v+d*b+u*_,o[4]=c*g+d*y+u*w,o[7]=c*m+d*x+u*D,o[2]=f*v+h*b+p*_,o[5]=f*g+h*y+p*w,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(zw.makeScale(e,t)),this}rotate(e){return this.premultiply(zw.makeRotation(-e)),this}translate(e,t){return this.premultiply(zw.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)}},zw=new Pt,Ek=new Pt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Mk=new Pt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function qW(){let n={enabled:!0,workingColorSpace:Gc,spaces:{},convert:function(r,o,s){return this.enabled===!1||o===s||!o||!s||(this.spaces[o].transfer===on&&(r.r=pa(r.r),r.g=pa(r.g),r.b=pa(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=Wu(r.r),r.g=Wu(r.g),r.b=Wu(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===va?wp: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 Ku("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),n.workingToColorSpace(r,o)},toWorkingColorSpace:function(r,o){return Ku("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({[Gc]:{primaries:e,whitePoint:i,transfer:wp,toXYZ:Ek,fromXYZ:Mk,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:gn},outputColorSpaceConfig:{drawingBufferColorSpace:gn}},[gn]:{primaries:e,whitePoint:i,transfer:on,toXYZ:Ek,fromXYZ:Mk,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:gn}}}),n}var zt=qW();function pa(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Wu(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}var Au,K0=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{Au===void 0&&(Au=Yu("canvas")),Au.width=e.width,Au.height=e.height;let r=Au.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),i=Au}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=Yu("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]=pa(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(pa(t[i]/255)*255):t[i]=pa(t[i]);return{data:t,width:e.width,height:e.height}}else return dt("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}},KW=0,Ju=class{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:KW++}),this.uuid=uf(),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(Vw(r[s].image)):o.push(Vw(r[s]))}else o=Vw(r);i.url=o}return t||(e.images[this.uuid]=i),i}};function Vw(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?K0.getDataURL(n):n.data?{data:Array.from(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(dt("Texture: Unable to serialize Texture."),{})}var ZW=0,Gw=new V,Uo=(()=>{class n extends Cs{constructor(t=n.DEFAULT_IMAGE,i=n.DEFAULT_MAPPING,r=Ii,o=Ii,s=Gn,a=fo,l=ho,c=sr,d=n.DEFAULT_ANISOTROPY,u=va){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:ZW++}),this.uuid=uf(),this.name="",this.source=new Ju(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 Pt,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(Gw).x}get height(){return this.source.getSize(Gw).y}get depth(){return this.source.getSize(Gw).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){dt(`Texture.setValues(): parameter '${i}' has value of undefined.`);continue}let o=this[i];if(o===void 0){dt(`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!==lE)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Xu:t.x=t.x-Math.floor(t.x);break;case Ii:t.x=t.x<0?0:1;break;case Y0: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 Xu:t.y=t.y-Math.floor(t.y);break;case Ii:t.y=t.y<0?0:1;break;case Y0: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=lE,n.DEFAULT_ANISOTROPY=1,n})(),Pn=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,w=(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=w/i,o=D/i):x>_?x<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(x),i=w/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}},Z0=class extends Cs{constructor(e=1,t=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Gn,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 Pn(0,0,e,t),this.scissorTest=!1,this.viewport=new Pn(0,0,e,t);let r={width:e,height:t,depth:i.depth},o=new Uo(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:Gn,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 Ju(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"})}},Rr=class extends Z0{constructor(e=1,t=1,i={}){super(e,t,i),this.isWebGLRenderTarget=!0}},Mp=class extends Uo{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=ci,this.minFilter=ci,this.wrapR=Ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}};var J0=class extends Uo{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=ci,this.minFilter=ci,this.wrapR=Ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var Wi=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(Io.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,i=e.count;t<i;t++)this.expandByPoint(Io.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=Io.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,Io):Io.fromBufferAttribute(o,s),Io.applyMatrix4(e.matrixWorld),this.expandByPoint(Io);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),C0.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),C0.copy(i.boundingBox)),C0.applyMatrix4(e.matrixWorld),this.union(C0)}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,Io),Io.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(gp),w0.subVectors(this.max,gp),Ou.subVectors(e.a,gp),Ru.subVectors(e.b,gp),ku.subVectors(e.c,gp),tl.subVectors(Ru,Ou),nl.subVectors(ku,Ru),Fc.subVectors(Ou,ku);let t=[0,-tl.z,tl.y,0,-nl.z,nl.y,0,-Fc.z,Fc.y,tl.z,0,-tl.x,nl.z,0,-nl.x,Fc.z,0,-Fc.x,-tl.y,tl.x,0,-nl.y,nl.x,0,-Fc.y,Fc.x,0];return!Hw(t,Ou,Ru,ku,w0)||(t=[1,0,0,0,1,0,0,0,1],!Hw(t,Ou,Ru,ku,w0))?!1:(E0.crossVectors(tl,nl),t=[E0.x,E0.y,E0.z],Hw(t,Ou,Ru,ku,w0))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Io).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Io).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:(aa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),aa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),aa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),aa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),aa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),aa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),aa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),aa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(aa),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}},aa=[new V,new V,new V,new V,new V,new V,new V,new V],Io=new V,C0=new Wi,Ou=new V,Ru=new V,ku=new V,tl=new V,nl=new V,Fc=new V,gp=new V,w0=new V,E0=new V,Nc=new V;function Hw(n,e,t,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){Nc.fromArray(n,o);let a=r.x*Math.abs(Nc.x)+r.y*Math.abs(Nc.y)+r.z*Math.abs(Nc.z),l=e.dot(Nc),c=t.dot(Nc),d=i.dot(Nc);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var JW=new Wi,vp=new V,jw=new V,cl=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):JW.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;vp.subVectors(e,this.center);let t=vp.lengthSq();if(t>this.radius*this.radius){let i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(vp,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):(jw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(vp.copy(e.center).add(jw)),this.expandByPoint(vp.copy(e.center).sub(jw))),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}},la=new V,Ww=new V,M0=new V,il=new V,$w=new V,T0=new V,Xw=new V,ma=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,la)),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=la.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(la.copy(this.origin).addScaledVector(this.direction,t),la.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Ww.copy(e).add(t).multiplyScalar(.5),M0.copy(t).sub(e).normalize(),il.copy(this.origin).sub(Ww);let o=e.distanceTo(t)*.5,s=-this.direction.dot(M0),a=il.dot(this.direction),l=-il.dot(M0),c=il.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(Ww).addScaledVector(M0,f),h}intersectSphere(e,t){la.subVectors(e.center,this.origin);let i=la.dot(this.direction),r=la.dot(la)-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,la)!==null}intersectTriangle(e,t,i,r,o){$w.subVectors(t,e),T0.subVectors(i,e),Xw.crossVectors($w,T0);let s=this.direction.dot(Xw),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;il.subVectors(this.origin,e);let l=a*this.direction.dot(T0.crossVectors(il,T0));if(l<0)return null;let c=a*this.direction.dot($w.cross(il));if(c<0||l+c>s)return null;let d=-a*il.dot(Xw);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)}},wn=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/Fu.setFromMatrixColumn(e,0).length(),o=1/Fu.setFromMatrixColumn(e,1).length(),s=1/Fu.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(QW,e,e9)}lookAt(e,t,i){let r=this.elements;return Pr.subVectors(e,t),Pr.lengthSq()===0&&(Pr.z=1),Pr.normalize(),rl.crossVectors(i,Pr),rl.lengthSq()===0&&(Math.abs(i.z)===1?Pr.x+=1e-4:Pr.z+=1e-4,Pr.normalize(),rl.crossVectors(i,Pr)),rl.normalize(),D0.crossVectors(Pr,rl),r[0]=rl.x,r[4]=D0.x,r[8]=Pr.x,r[1]=rl.y,r[5]=D0.y,r[9]=Pr.y,r[2]=rl.z,r[6]=D0.z,r[10]=Pr.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],w=r[0],D=r[4],O=r[8],S=r[12],T=r[1],F=r[5],H=r[9],G=r[13],X=r[2],Y=r[6],q=r[10],W=r[14],te=r[3],ve=r[7],be=r[11],xe=r[15];return o[0]=s*w+a*T+l*X+c*te,o[4]=s*D+a*F+l*Y+c*ve,o[8]=s*O+a*H+l*q+c*be,o[12]=s*S+a*G+l*W+c*xe,o[1]=d*w+u*T+f*X+h*te,o[5]=d*D+u*F+f*Y+h*ve,o[9]=d*O+u*H+f*q+h*be,o[13]=d*S+u*G+f*W+h*xe,o[2]=p*w+v*T+g*X+m*te,o[6]=p*D+v*F+g*Y+m*ve,o[10]=p*O+v*H+g*q+m*be,o[14]=p*S+v*G+g*W+m*xe,o[3]=b*w+y*T+x*X+_*te,o[7]=b*D+y*F+x*Y+_*ve,o[11]=b*O+y*H+x*q+_*be,o[15]=b*S+y*G+x*W+_*xe,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,w=s*f-l*d,D=s*u-a*d;return t*(v*b-g*y+m*x)-i*(p*b-g*_+m*w)+r*(p*y-v*_+m*D)-o*(p*x-v*w+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,w=t*b+i*y+r*x+o*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/w;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,w=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)*w,r[5]=(1-(f+m))*w,r[6]=(g+b)*w,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=Fu.set(r[0],r[1],r[2]).length(),s=Fu.set(r[4],r[5],r[6]).length(),a=Fu.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),Po.copy(this);let c=1/o,d=1/s,u=1/a;return Po.elements[0]*=c,Po.elements[1]*=c,Po.elements[2]*=c,Po.elements[4]*=d,Po.elements[5]*=d,Po.elements[6]*=d,Po.elements[8]*=u,Po.elements[9]*=u,Po.elements[10]*=u,t.setFromRotationMatrix(Po),i.x=o,i.y=s,i.z=a,this}makePerspective(e,t,i,r,o,s,a=Oo,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===Oo)p=-(s+o)/(s-o),v=-2*s*o/(s-o);else if(a===Ep)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=Oo,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===Oo)p=-2/(s-o),v=-(s+o)/(s-o);else if(a===Ep)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}},Fu=new V,Po=new wn,QW=new V(0,0,0),e9=new V(1,1,1),rl=new V,D0=new V,Pr=new V,Tk=new wn,Dk=new uo,dl=(()=>{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:dt("Euler: .setFromRotationMatrix() encountered an unknown order: "+i)}return this._order=i,r===!0&&this._onChangeCallback(),this}setFromQuaternion(t,i,r){return Tk.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Tk,i,r)}setFromVector3(t,i=this._order){return this.set(t.x,t.y,t.z,i)}reorder(t){return Dk.setFromEuler(this),this.setFromQuaternion(Dk,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})(),Qu=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}},t9=0,Ik=new V,Nu=new uo,ca=new wn,I0=new V,bp=new V,n9=new V,i9=new uo,Pk=new V(1,0,0),Ak=new V(0,1,0),Ok=new V(0,0,1),Rk={type:"added"},r9={type:"removed"},Lu={type:"childadded",child:null},Yw={type:"childremoved",child:null},kr=(()=>{class n extends Cs{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:t9++}),this.uuid=uf(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=n.DEFAULT_UP.clone();let t=new V,i=new dl,r=new uo,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 wn},normalMatrix:{value:new Pt}}),this.matrix=new wn,this.matrixWorld=new wn,this.matrixAutoUpdate=n.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Qu,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 Nu.setFromAxisAngle(t,i),this.quaternion.multiply(Nu),this}rotateOnWorldAxis(t,i){return Nu.setFromAxisAngle(t,i),this.quaternion.premultiply(Nu),this}rotateX(t){return this.rotateOnAxis(Pk,t)}rotateY(t){return this.rotateOnAxis(Ak,t)}rotateZ(t){return this.rotateOnAxis(Ok,t)}translateOnAxis(t,i){return Ik.copy(t).applyQuaternion(this.quaternion),this.position.add(Ik.multiplyScalar(i)),this}translateX(t){return this.translateOnAxis(Pk,t)}translateY(t){return this.translateOnAxis(Ak,t)}translateZ(t){return this.translateOnAxis(Ok,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ca.copy(this.matrixWorld).invert())}lookAt(t,i,r){t.isVector3?I0.copy(t):I0.set(t,i,r);let o=this.parent;this.updateWorldMatrix(!0,!1),bp.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ca.lookAt(bp,I0,this.up):ca.lookAt(I0,bp,this.up),this.quaternion.setFromRotationMatrix(ca),o&&(ca.extractRotation(o.matrixWorld),Nu.setFromRotationMatrix(ca),this.quaternion.premultiply(Nu.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(Rk),Lu.child=t,this.dispatchEvent(Lu),Lu.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(r9),Yw.child=t,this.dispatchEvent(Yw),Yw.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),ca.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),ca.multiply(t.parent.matrixWorld)),t.applyMatrix4(ca),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Rk),Lu.child=t,this.dispatchEvent(Lu),Lu.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(bp,t,n9),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(bp,i9,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=>de(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})(),Ao=new V,da=new V,qw=new V,ua=new V,Uu=new V,Bu=new V,kk=new V,Kw=new V,Zw=new V,Jw=new V,Qw=new Pn,eE=new Pn,tE=new Pn,al=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),Ao.subVectors(e,t),r.cross(Ao);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){Ao.subVectors(r,t),da.subVectors(i,t),qw.subVectors(e,t);let s=Ao.dot(Ao),a=Ao.dot(da),l=Ao.dot(qw),c=da.dot(da),d=da.dot(qw),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,ua)===null?!1:ua.x>=0&&ua.y>=0&&ua.x+ua.y<=1}static getInterpolation(e,t,i,r,o,s,a,l){return this.getBarycoord(e,t,i,r,ua)===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,ua.x),l.addScaledVector(s,ua.y),l.addScaledVector(a,ua.z),l)}static getInterpolatedAttribute(e,t,i,r,o,s){return Qw.setScalar(0),eE.setScalar(0),tE.setScalar(0),Qw.fromBufferAttribute(e,t),eE.fromBufferAttribute(e,i),tE.fromBufferAttribute(e,r),s.setScalar(0),s.addScaledVector(Qw,o.x),s.addScaledVector(eE,o.y),s.addScaledVector(tE,o.z),s}static isFrontFacing(e,t,i,r){return Ao.subVectors(i,t),da.subVectors(e,t),Ao.cross(da).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 Ao.subVectors(this.c,this.b),da.subVectors(this.a,this.b),Ao.cross(da).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;Uu.subVectors(r,i),Bu.subVectors(o,i),Kw.subVectors(e,i);let l=Uu.dot(Kw),c=Bu.dot(Kw);if(l<=0&&c<=0)return t.copy(i);Zw.subVectors(e,r);let d=Uu.dot(Zw),u=Bu.dot(Zw);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(Uu,s);Jw.subVectors(e,o);let h=Uu.dot(Jw),p=Bu.dot(Jw);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(Bu,a);let g=d*p-h*u;if(g<=0&&u-d>=0&&h-p>=0)return kk.subVectors(o,r),a=(u-d)/(u-d+(h-p)),t.copy(r).addScaledVector(kk,a);let m=1/(g+v+f);return s=v*m,a=f*m,t.copy(i).addScaledVector(Uu,s).addScaledVector(Bu,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},PF={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},ol={h:0,s:0,l:0},P0={h:0,s:0,l:0};function nE(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 xt=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=gn){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=VE(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=nE(s,o,e+1/3),this.g=nE(s,o,e),this.b=nE(s,o,e-1/3)}return zt.colorSpaceToWorking(this,r),this}setStyle(e,t=gn){function i(o){o!==void 0&&parseFloat(o)<1&&dt("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:dt("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);dt("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=gn){let i=PF[e.toLowerCase()];return i!==void 0?this.setHex(i,t):dt("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=pa(e.r),this.g=pa(e.g),this.b=pa(e.b),this}copyLinearToSRGB(e){return this.r=Wu(e.r),this.g=Wu(e.g),this.b=Wu(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=gn){return zt.workingToColorSpace(Di.copy(this),e),Math.round(Vt(Di.r*255,0,255))*65536+Math.round(Vt(Di.g*255,0,255))*256+Math.round(Vt(Di.b*255,0,255))}getHexString(e=gn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=zt.workingColorSpace){zt.workingToColorSpace(Di.copy(this),t);let i=Di.r,r=Di.g,o=Di.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(Di.copy(this),t),e.r=Di.r,e.g=Di.g,e.b=Di.b,e}getStyle(e=gn){zt.workingToColorSpace(Di.copy(this),e);let t=Di.r,i=Di.g,r=Di.b;return e!==gn?`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(ol),this.setHSL(ol.h+e,ol.s+t,ol.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(ol),e.getHSL(P0);let i=Sp(ol.h,P0.h,t),r=Sp(ol.s,P0.s,t),o=Sp(ol.l,P0.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}},Di=new xt;xt.NAMES=PF;var o9=0,Fr=class extends Cs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:o9++}),this.uuid=uf(),this.name="",this.type="Material",this.blending=zc,this.side=Ro,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=$0,this.blendDst=X0,this.blendEquation=ll,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new xt(0,0,0),this.blendAlpha=0,this.depthFunc=Vc,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=fE,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Bc,this.stencilZFail=Bc,this.stencilZPass=Bc,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){dt(`Material: parameter '${t}' has value of undefined.`);continue}let r=this[t];if(r===void 0){dt(`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!==zc&&(i.blending=this.blending),this.side!==Ro&&(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!==$0&&(i.blendSrc=this.blendSrc),this.blendDst!==X0&&(i.blendDst=this.blendDst),this.blendEquation!==ll&&(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!==Vc&&(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!==fE&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Bc&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Bc&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Bc&&(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++}},Tp=class extends Fr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new xt(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 dl,this.combine=Eb,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 Zn=new V,A0=new gt,s9=0,Or=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:s9++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=hE,this.updateRanges=[],this.gpuType=Lo,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++)A0.fromBufferAttribute(this,t),A0.applyMatrix3(e),this.setXY(t,A0.x,A0.y);else if(this.itemSize===3)for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.applyMatrix3(e),this.setXYZ(t,Zn.x,Zn.y,Zn.z);return this}applyMatrix4(e){for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.applyMatrix4(e),this.setXYZ(t,Zn.x,Zn.y,Zn.z);return this}applyNormalMatrix(e){for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.applyNormalMatrix(e),this.setXYZ(t,Zn.x,Zn.y,Zn.z);return this}transformDirection(e){for(let t=0,i=this.count;t<i;t++)Zn.fromBufferAttribute(this,t),Zn.transformDirection(e),this.setXYZ(t,Zn.x,Zn.y,Zn.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=ju(i,this.array)),i}setComponent(e,t,i){return this.normalized&&(i=ji(i,this.array)),this.array[e*this.itemSize+t]=i,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=ju(t,this.array)),t}setX(e,t){return this.normalized&&(t=ji(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=ju(t,this.array)),t}setY(e,t){return this.normalized&&(t=ji(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=ju(t,this.array)),t}setZ(e,t){return this.normalized&&(t=ji(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=ju(t,this.array)),t}setW(e,t){return this.normalized&&(t=ji(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,i){return e*=this.itemSize,this.normalized&&(t=ji(t,this.array),i=ji(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=ji(t,this.array),i=ji(i,this.array),r=ji(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=ji(t,this.array),i=ji(i,this.array),r=ji(r,this.array),o=ji(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!==hE&&(e.usage=this.usage),e}};var Dp=class extends Or{constructor(e,t,i){super(new Uint16Array(e),t,i)}};var Ip=class extends Or{constructor(e,t,i){super(new Uint32Array(e),t,i)}};var Vn=class extends Or{constructor(e,t,i){super(new Float32Array(e),t,i)}},a9=0,lo=new wn,iE=new kr,zu=new V,Ar=new Wi,yp=new Wi,ai=new V,$i=class n extends Cs{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:a9++}),this.uuid=uf(),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(BE(e)?Ip:Dp)(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 Pt().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 lo.makeRotationFromQuaternion(e),this.applyMatrix4(lo),this}rotateX(e){return lo.makeRotationX(e),this.applyMatrix4(lo),this}rotateY(e){return lo.makeRotationY(e),this.applyMatrix4(lo),this}rotateZ(e){return lo.makeRotationZ(e),this.applyMatrix4(lo),this}translate(e,t,i){return lo.makeTranslation(e,t,i),this.applyMatrix4(lo),this}scale(e,t,i){return lo.makeScale(e,t,i),this.applyMatrix4(lo),this}lookAt(e){return iE.lookAt(e),iE.updateMatrix(),this.applyMatrix4(iE.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(zu).negate(),this.translate(zu.x,zu.y,zu.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 Vn(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&&dt("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 Wi);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];Ar.setFromBufferAttribute(o),this.morphTargetsRelative?(ai.addVectors(this.boundingBox.min,Ar.min),this.boundingBox.expandByPoint(ai),ai.addVectors(this.boundingBox.max,Ar.max),this.boundingBox.expandByPoint(ai)):(this.boundingBox.expandByPoint(Ar.min),this.boundingBox.expandByPoint(Ar.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 cl);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(Ar.setFromBufferAttribute(e),t)for(let o=0,s=t.length;o<s;o++){let a=t[o];yp.setFromBufferAttribute(a),this.morphTargetsRelative?(ai.addVectors(Ar.min,yp.min),Ar.expandByPoint(ai),ai.addVectors(Ar.max,yp.max),Ar.expandByPoint(ai)):(Ar.expandByPoint(yp.min),Ar.expandByPoint(yp.max))}Ar.getCenter(i);let r=0;for(let o=0,s=e.count;o<s;o++)ai.fromBufferAttribute(e,o),r=Math.max(r,i.distanceToSquared(ai));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++)ai.fromBufferAttribute(a,c),l&&(zu.fromBufferAttribute(e,c),ai.add(zu)),r=Math.max(r,i.distanceToSquared(ai))}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 Or(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,T){c.fromBufferAttribute(i,O),d.fromBufferAttribute(i,S),u.fromBufferAttribute(i,T),f.fromBufferAttribute(o,O),h.fromBufferAttribute(o,S),p.fromBufferAttribute(o,T),d.sub(c),u.sub(c),h.sub(f),p.sub(f);let F=1/(h.x*p.y-p.x*h.y);isFinite(F)&&(v.copy(d).multiplyScalar(p.y).addScaledVector(u,-h.y).multiplyScalar(F),g.copy(u).multiplyScalar(h.x).addScaledVector(d,-p.x).multiplyScalar(F),a[O].add(v),a[S].add(v),a[T].add(v),l[O].add(g),l[S].add(g),l[T].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 T=b[O],F=T.start,H=T.count;for(let G=F,X=F+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,w=new V;function D(O){_.fromBufferAttribute(r,O),w.copy(_);let S=a[O];y.copy(S),y.sub(_.multiplyScalar(_.dot(S))).normalize(),x.crossVectors(w,S);let F=x.dot(l[O])<0?-1:1;s.setXYZW(O,y.x,y.y,y.z,F)}for(let O=0,S=b.length;O<S;++O){let T=b[O],F=T.start,H=T.count;for(let G=F,X=F+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 Or(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++)ai.fromBufferAttribute(e,t),ai.normalize(),e.setXYZ(t,ai.x,ai.y,ai.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 Or(f,d,u)}if(this.index===null)return dt("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"})}},Fk=new wn,Lc=new ma,O0=new cl,Nk=new V,R0=new V,k0=new V,F0=new V,rE=new V,N0=new V,Lk=new V,L0=new V,Xi=class extends kr{constructor(e=new $i,t=new Tp){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){N0.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=a[l],u=o[l];d!==0&&(rE.fromBufferAttribute(u,e),s?N0.addScaledVector(rE,d):N0.addScaledVector(rE.sub(t),d))}t.add(N0)}return t}raycast(e,t){let i=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),O0.copy(i.boundingSphere),O0.applyMatrix4(o),Lc.copy(e.ray).recast(e.near),!(O0.containsPoint(Lc.origin)===!1&&(Lc.intersectSphere(O0,Nk)===null||Lc.origin.distanceToSquared(Nk)>(e.far-e.near)**2))&&(Fk.copy(o).invert(),Lc.copy(e.ray).applyMatrix4(Fk),!(i.boundingBox!==null&&Lc.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Lc)))}_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 w=a.getX(x),D=a.getX(x+1),O=a.getX(x+2);r=U0(this,m,e,i,c,d,u,w,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=U0(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 w=x,D=x+1,O=x+2;r=U0(this,m,e,i,c,d,u,w,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=U0(this,s,e,i,c,d,u,b,y,x),r&&(r.faceIndex=Math.floor(g/3),t.push(r))}}}};function l9(n,e,t,i,r,o,s,a){let l;if(e.side===Yi?l=i.intersectTriangle(s,o,r,!0,a):l=i.intersectTriangle(r,o,s,e.side===Ro,a),l===null)return null;L0.copy(a),L0.applyMatrix4(n.matrixWorld);let c=t.ray.origin.distanceTo(L0);return c<t.near||c>t.far?null:{distance:c,point:L0.clone(),object:n}}function U0(n,e,t,i,r,o,s,a,l,c){n.getVertexPosition(a,R0),n.getVertexPosition(l,k0),n.getVertexPosition(c,F0);let d=l9(n,e,t,i,R0,k0,F0,Lk);if(d){let u=new V;al.getBarycoord(Lk,R0,k0,F0,u),r&&(d.uv=al.getInterpolatedAttribute(r,a,l,c,u,new gt)),o&&(d.uv1=al.getInterpolatedAttribute(o,a,l,c,u,new gt)),s&&(d.normal=al.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};al.getNormal(R0,k0,F0,f.normal),d.face=f,d.barycoord=u}return d}var ef=class n extends $i{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 Vn(c,3)),this.setAttribute("normal",new Vn(d,3)),this.setAttribute("uv",new Vn(u,2));function p(v,g,m,b,y,x,_,w,D,O,S){let T=x/D,F=_/O,H=x/2,G=_/2,X=w/2,Y=D+1,q=O+1,W=0,te=0,ve=new V;for(let be=0;be<q;be++){let xe=be*F-G;for(let Qe=0;Qe<Y;Qe++){let ht=Qe*T-H;ve[v]=ht*b,ve[g]=xe*y,ve[m]=X,c.push(ve.x,ve.y,ve.z),ve[v]=0,ve[g]=0,ve[m]=w>0?1:-1,d.push(ve.x,ve.y,ve.z),u.push(Qe/D),u.push(1-be/O),W+=1}}for(let be=0;be<O;be++)for(let xe=0;xe<D;xe++){let Qe=f+xe+Y*be,ht=f+xe+Y*(be+1),Wt=f+(xe+1)+Y*(be+1),Kt=f+(xe+1)+Y*be;l.push(Qe,ht,Kt),l.push(ht,Wt,Kt),te+=6}a.addGroup(h,te,S),h+=te,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 Qc(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?(dt("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 Pi(n){let e={};for(let t=0;t<n.length;t++){let i=Qc(n[t]);for(let r in i)e[r]=i[r]}return e}function c9(n){let e=[];for(let t=0;t<n.length;t++)e.push(n[t].clone());return e}function GE(n){let e=n.getRenderTarget();return e===null?n.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:zt.workingColorSpace}var AF={clone:Qc,merge:Pi},d9=`void main() {
6
6
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
7
7
  }`,u9=`void main() {
8
8
  gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );